Merge origin/main (reach rule, floor verdict) with attach and stated quota resets; one model's cap stays its own
ci / test (push) Waiting to run
ci / test (push) Waiting to run
Both sides kept: the reach column, floor verdict and reach line from origin;
`pick --node ID --started WORKER`, running nodes kept on re-record, stated
resets and plan-wide `out` only on quota wording from the fix branch. The
short `sisi help` is kept and names the floor verdict.
Also: a message naming one model's own cap ("your Fable limit", "limit for
this model") takes off only that model, even with a reset time; attaching a
running job prints the node header, reach and all. sisi/ is 3269 lines, the
cap as origin set it.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
commit
ee9a856160
9 files changed
+262
-129
No files matched your search
+50
-1
@@ -12,6 +12,7 @@ TABLE = test_core.HEADER + (
|
||||
"| beta | host subagent model `beta` | ordinary | free | edits | |\n"
|
||||
"| gamma | host subagent model `gamma` | hard | per use | everything | |\n")
|
||||
COLS = "| node | class | needs | branch | files | check | why |\n|---|---|---|---|---|---|---|\n"
|
||||
REACH = "| node | class | needs | branch | files | check | reach | why |\n|---|---|---|---|---|---|---|---|\n"
|
||||
PLAN = COLS + (
|
||||
"| a | routine | - | p-a | sisi/a.py | test a passes | exact spec, test decides |\n"
|
||||
"| b | ordinary | - | p-b | sisi/b.py | test b passes | some judgement |\n"
|
||||
@@ -124,6 +125,52 @@ class Plan(unittest.TestCase):
|
||||
out = self.ready_plan(text=six)
|
||||
self.assertIn("wave 1: a (routine), b (ordinary)", out)
|
||||
|
||||
def test_a_reach_column_records_its_cell(self):
|
||||
self.ready_plan(text=REACH + (
|
||||
"| a | routine | - | p-a | sisi/a.py | test a passes | make this 100x faster | exact spec, test decides |\n"
|
||||
"| b | ordinary | - | p-b | sisi/b.py | test b passes | | some judgement |\n"
|
||||
"| join | lead | a, b | - | - | full suite passes | | the lead merges |\n"))
|
||||
self.assertEqual([n["reach"] for n in self.state()["plan"]["nodes"]], ["make this 100x faster", "", ""])
|
||||
|
||||
def test_tables_without_the_reach_column_record_with_reach_empty(self):
|
||||
six = "\n".join("|".join(l.split("|")[:-2]) + "|" if l.startswith("|") else l for l in PLAN.splitlines()) + "\n"
|
||||
for sid, text in (("s1", PLAN), ("s2", six)):
|
||||
self.ready_plan(sid=sid, text=text)
|
||||
self.assertEqual({n["reach"] for n in self.state(sid)["plan"]["nodes"]}, {""})
|
||||
|
||||
def test_plan_brief_asks_for_the_reach_column_with_its_four_examples(self):
|
||||
self.ready_plan()
|
||||
out = self.sisi("plan", "brief", sid="s1")[1]
|
||||
self.assertIn("| node | class | needs | branch | files | check | reach | why |", out)
|
||||
for ex in ('"make this 100x faster"', '"delete half the codebase without breaking anything"',
|
||||
'"turn every bug we\'ve ever fixed into a property test"',
|
||||
'"find all implicit invariants, formally prove them or find counterexamples"'):
|
||||
self.assertIn(ex, out)
|
||||
|
||||
def test_pick_node_prints_the_reach_and_the_reach_line(self):
|
||||
from sisi import plan
|
||||
self.ready_plan(text=REACH + (
|
||||
"| a | routine | - | p-a | sisi/a.py | test a passes | make this 100x faster | exact spec |\n"
|
||||
"| b | ordinary | - | p-b | sisi/b.py | test b passes | | some judgement |\n"
|
||||
"| join | lead | a, b | - | - | full suite passes | | the lead merges |\n"))
|
||||
out = self.pick("a")
|
||||
self.assertIn("reach: make this 100x faster", out)
|
||||
self.assertIn(plan.REACH_LINE, out)
|
||||
|
||||
def test_pick_without_a_node_prints_the_reach_line_but_no_reach(self):
|
||||
from sisi import plan
|
||||
self.table(TABLE)
|
||||
rc, out, _ = self.sisi("pick", "routine")
|
||||
self.assertEqual(rc, 0, out)
|
||||
self.assertIn(plan.REACH_LINE, out)
|
||||
self.assertEqual([l for l in out.splitlines() if l.startswith("reach:")], [], out)
|
||||
self.ready_plan(text=REACH + (
|
||||
"| a | routine | - | p-a | sisi/a.py | test a passes | make this 100x faster | exact spec |\n"
|
||||
"| b | ordinary | - | p-b | sisi/b.py | test b passes | | some judgement |\n"
|
||||
"| join | lead | a, b | - | - | full suite passes | | the lead merges |\n"))
|
||||
out = self.pick("a")
|
||||
self.assertEqual(out.count(plan.REACH_LINE), 1, out)
|
||||
|
||||
def test_record_line_counts_the_last_twenty_judged_per_class(self):
|
||||
self.table(TABLE + "| delta | host subagent model `delta` | deep | per use | deepest | |\n")
|
||||
line = lambda w, v: json.dumps({"ts": "2026-11-20T10:00:00", "worker": w, "verdict": v, "why": "did it fine"})
|
||||
@@ -161,6 +208,8 @@ class Plan(unittest.TestCase):
|
||||
self.pick("a") # the wheel said alpha, but the lead sent it to a running agent
|
||||
rc, out, _ = attach("a", "gate-solver")
|
||||
self.assertEqual(rc, 0, out)
|
||||
self.assertIn("sisi node: a\n", out) # the header, reach and all, as any pick of a node prints it
|
||||
self.assertIn("\nreach: -\n", out)
|
||||
self.assertEqual(self.nodes()["a"], "running")
|
||||
self.assertEqual(self.state()["picked"], []) # the pick made for this node is withdrawn
|
||||
self.assertNotIn("ready and not started", self.hook("gate")[1])
|
||||
@@ -186,7 +235,7 @@ class Plan(unittest.TestCase):
|
||||
rc, out, _ = self.sisi("plan", "brief", sid="s1")
|
||||
self.assertEqual(rc, 0, out)
|
||||
self.assertRegex(out.splitlines()[0], r"^sisi chore: plan [0-9a-f]{8}$")
|
||||
for want in ("export every row without losing any", "1. row counts match", "| node | class | needs | branch | files | check | why |",
|
||||
for want in ("export every row without losing any", "1. row counts match", "| node | class | needs | branch | files | check | reach | why |",
|
||||
"routine, ordinary, hard, deep, or lead", "Class by total cost", "routine nodes whenever their",
|
||||
"deep (the dearest tier)", "never inherited as hard or deep", "record (last 20 judged per class)",
|
||||
"prefer many small nodes", "quick test of its own change", "merges its needs, runs them once and fixes what broke"):
|
||||
|
||||
Reference in new issue
Block a user