Item 2: session start never argues against delegating on missing data. done / next: item 3 route with providers down

This commit is contained in:
swaits committed 2026-11-23 12:25:25 -07:00
1 parent e875ac9a7f
commit 1208df9b1b
3 files changed
+63 -35

No files matched your search

+27
View File
@@ -78,5 +78,32 @@ class HostNativeTests(RouteCase):
self.assertNotIn("wk-", r.stdout.splitlines()[0])
class SessionStartTests(RouteCase):
def tick(self, sid, model="mystery-9", source="startup"):
return self.sisi("tick", stdin=json.dumps({"session_id": sid, "cwd": self.proj, "source": source,
"model": model}))
def test_unknown_standing_says_nothing_about_delegating(self):
"""R-7.1-1, R-17-3: with no facts and an unknown main model, session start argues
neither for nor against delegating; at most one line asks for facts, once per session."""
r = self.tick("s-unk")
self.assertEqual(r.returncode, 0, r.stderr)
low = r.stdout.lower()
for bad in ("yourself", "rather than delegating", "on a guess", "do the work"):
self.assertNotIn(bad, low)
sisi_lines = [l for l in r.stdout.splitlines() if "worker facts" in l]
self.assertEqual(len(sisi_lines), 1, r.stdout)
again = self.tick("s-unk", source="resume")
self.assertNotIn("worker facts", again.stdout)
def test_unknown_standing_with_a_recorded_ledger(self):
"""The same holds with a thick ledger and no discovered tools."""
self.seed_real_shape()
r = self.sisi("tick", stdin=json.dumps({"session_id": "s-led", "cwd": self.proj, "source": "startup",
"model": "mystery-9"}), env=dict(PATH=""))
self.assertNotIn("yourself", r.stdout.lower())
self.assertNotIn("rather than", r.stdout.lower())
if __name__ == "__main__":
unittest.main()
+2 -2
View File
@@ -214,7 +214,7 @@ class SessionModelTests(WorkerCase):
def test_tick_weak_line_names_stronger(self):
self.seed_strength({"beta-1": 95, "alpha-1": 60})
r = self.tick({"session_id": "weak-1", "cwd": self.proj, "source": "startup", "model": "alpha-1"})
self.assertIn("do the work yourself", r.stdout)
self.assertNotIn("do the work yourself", r.stdout) # a lower standing never argues against orchestrating
self.assertIn("beta-1", r.stdout)
def test_tick_subagent_gets_no_delegation_line(self):
@@ -226,7 +226,7 @@ class SessionModelTests(WorkerCase):
def test_tick_unknown_strength_says_so(self):
r = self.tick({"session_id": "unk-1", "cwd": self.proj, "source": "startup", "model": "mystery-9"})
self.assertIn("unknown", r.stdout.lower())
self.assertNotIn("yourself", r.stdout.lower()) # unknown standing says nothing about delegating
class RoutingPropertyTests(unittest.TestCase):