Route prints notes for passed-over workers only under --explain; plain output at most 6 lines. done / next: fix 3 (unused code)
This commit is contained in:
1 parent
05ac5342d0
commit
b114b29221
2 files changed
+27
-4
No files matched your search
@@ -123,14 +123,32 @@ class NotesAndLimitsTests(RouteCase):
|
||||
text = "\n".join(notes)
|
||||
self.assertIn("set it lower", text)
|
||||
self.assertIn("information, not an instruction", text)
|
||||
self.assertIn("passed over", text)
|
||||
self.assertIn("approvals", text)
|
||||
self.assertNotIn("approvals", text) # a passed-over worker's note waits for --explain
|
||||
ex = self.sisi("route", "--kind", "impl", "--difficulty", "2", "--explain", env=self.env())
|
||||
self.assertIn("passed over", ex.stdout)
|
||||
self.assertIn("approvals", ex.stdout)
|
||||
listing = self.sisi("workers", env=self.env())
|
||||
self.assertIn("set it lower", listing.stdout)
|
||||
self.sisi("workers", "note", "wk-fast", "--remove", env=self.env())
|
||||
after = self.sisi("route", "--kind", "impl", "--difficulty", "2", env=self.env())
|
||||
self.assertNotIn("set it lower", after.stdout)
|
||||
|
||||
def test_plain_route_is_short_and_quiet_about_workers_it_did_not_choose(self):
|
||||
"""Plain `sisi route` is at most 6 lines; notes on passed-over workers (down or not) appear only with --explain."""
|
||||
self.seed_real_shape()
|
||||
self.down("muse/beta-1")
|
||||
for pat in ("beta", "alpha", "muse", "codex", "wk-mid"):
|
||||
self.sisi("workers", "note", pat, "standing fact about %s" % pat, "--why", "owner", env=self.env())
|
||||
self.sisi("workers", "note", "wk-fast", "chosen worker fact", "--why", "owner", env=self.env())
|
||||
r = self.sisi("route", "--kind", "impl", "--difficulty", "2", env=self.env())
|
||||
self.assertEqual(r.returncode, 0, r.stdout)
|
||||
lines = r.stdout.splitlines()
|
||||
self.assertLessEqual(len(lines), 6, r.stdout)
|
||||
self.assertIn("chosen worker fact", r.stdout)
|
||||
self.assertNotIn("passed over", r.stdout)
|
||||
ex = self.sisi("route", "--kind", "impl", "--difficulty", "2", "--explain", env=self.env())
|
||||
self.assertIn("passed over", ex.stdout)
|
||||
|
||||
def test_only_limits_a_provider_to_named_models(self):
|
||||
"""R-7.2-1, R-7.3-3: a newly discovered, cheap model on a limited provider is not routed."""
|
||||
self.seed([("muse/beta-1", 9, 9)], difficulty=1)
|
||||
|
||||
Reference in new issue
Block a user