Stop a loop running main's script once at the cut-over, and tick off the item
This commit is contained in:
@@ -21,6 +21,6 @@ Decisions live in `docs/decisions.md`:
|
||||
- loop-claude: the judge is retried alone, on its own counter
|
||||
- loop-claude: the judge loads `CLAUDE.md`
|
||||
- loop-claude: the archive keeps the raw transcript, and a failed archive stops the loop
|
||||
- loop-claude: the rebuild keeps main's `--reloaded` state
|
||||
- loop-claude: a loop running main's script stops once at the cut-over
|
||||
- rebuild: a chunk into `rebuild` takes no comprehension scoring run
|
||||
- loop-claude: a `claude` that cannot start is a failed worker run, retried
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
- `loop-claude` skips a transcript line it cannot parse, exits 1 naming a transcript it cannot read, and counts a `claude` it cannot start as a failed worker run.
|
||||
- `loop-claude`'s judge quotes the transcript for every verdict, and a verdict quoting nothing or interrupting without a question, or a `claude` the judge cannot start, is a failed judge run; a `claude` that cannot start for an interrupt exits 1.
|
||||
- `loop-claude`'s exit-2 message says what the human is needed for.
|
||||
- `loop-claude` retries a failed worker within its cycle; a loop running the previous `loop-claude` exits 1 at its next cycle boundary, and rerunning `loop-claude <task>` resumes it.
|
||||
- `loop-claude` counts an interrupt reply starting with `<` as typed.
|
||||
- `loop-claude`'s judge sees a reply the human types while claude works, and an interrupt counts one as typed.
|
||||
- `loop-claude`'s archive holds the raw `.jsonl` transcript, one copy per distinct transcript, named by its SHA-256, with the verdict beside it in `<sha256>.verdict.md`; a transcript it cannot archive exits 1.
|
||||
|
||||
@@ -116,7 +116,7 @@ class Verdict(unittest.TestCase):
|
||||
|
||||
class LoopState(unittest.TestCase):
|
||||
def test_stops_naming_the_reload_when_it_hands_over_anything_but_the_state_with_a_task(self):
|
||||
for handed in (["3", "2", "/r", "do it"], ["3"], ["[1]"], [json.dumps({"cycle_number": 3, "root": "/r"})], [json.dumps({"cycle_number": 3, "root": "/r", "task": ""})], [json.dumps({"cycle_number": "3", "root": "/r", "task": "do it"})], [json.dumps({"cycle_number": 3, "root": "", "task": "do it"})], [json.dumps({"cycle_number": 3, "root": "/r", "task": "do it", "turns": 1})]):
|
||||
for handed in (["3", "2", "/r", "do it"], ["3"], ["[1]"], [json.dumps({"cycle_number": 3, "root": "/r"})], [json.dumps({"cycle_number": 3, "root": "/r", "task": ""})], [json.dumps({"cycle_number": "3", "root": "/r", "task": "do it"})], [json.dumps({"cycle_number": 3, "root": "", "task": "do it"})], [json.dumps({"cycle_number": 3, "root": "/r", "task": "do it", "turns": 1})], [json.dumps({"cycle_number": 3, "failures": 0, "root": "/r", "task": "do it"})]):
|
||||
with self.subTest(handed=handed):
|
||||
self.assertEqual(main.loop_state([main.RELOAD_FLAG, *handed], CWD), Stop(1, f"the reload cannot read the loop's state from {handed}; rerun loop-claude <task>"))
|
||||
|
||||
|
||||
+2
-2
@@ -68,9 +68,9 @@
|
||||
|
||||
2026-09-28, lilleman, for the rebuild. Serves goals 2 and 4: saving each transcript locally is the first step of backing it up, and it shows afterwards what an unattended run did. A copy of the `.jsonl`, deduplicated by content hash, with the verdict beside it; a rendering drops tool results, and a second-resolution stamp names two states within one second as one file. A failed archive exits 1, since a loop that loses its record silently fails the backup goal. Valid while transcripts stay small enough to copy whole.
|
||||
|
||||
## loop-claude: the rebuild keeps main's `--reloaded` state
|
||||
## loop-claude: a loop running main's script stops once at the cut-over
|
||||
|
||||
2026-09-28, lilleman, for the rebuild. Serves goal 4. A loop running main's script reloads into the rebuilt one at its next cycle boundary and carries on; `decode_state` accepts only JSON whose keys and value types match `LoopState` exactly, so renaming, adding, dropping or retyping a field breaks that reload, and no code exists only for the cut-over. Valid until the rebuild merges.
|
||||
2026-09-29, lilleman. Serves goal 4. The rebuild retries the worker within its cycle, so `LoopState` carries no failure count and rejects main's state; the loop exits 1 naming the rerun, one rerun for a one-human audience, and no code exists only for the cut-over. Valid until the rebuild merges.
|
||||
|
||||
## rebuild: a chunk into `rebuild` takes no comprehension scoring run
|
||||
|
||||
|
||||
@@ -8,7 +8,6 @@ The rebuild lifts every dimension, one chunk per item, until the last item opens
|
||||
|
||||
The places the panel on `rebuild` at 2f9ab2f named (`docs/decisions.md`), capping dimension first:
|
||||
|
||||
- **Count the worker's and the judge's failures in one place, under one name.** All four seats traced `LoopState.failures` in `run_loop` and `judge`'s local counter to learn which run each counts.
|
||||
- **Declare `LoopState` beside `decode_state`, as the state a reload carries.** All four seats held `run_loop`, `loop_state` and `exec_if_edited` open together; one found a field change ends a running loop with nothing at the dataclass saying so.
|
||||
- **Hand `run_cycle` and `judge_through_interrupts` one cycle context.** Two seats: eight positional arguments.
|
||||
- **Build `premises.sections` without filling `found` through an alias.** Two seats traced `current` by hand.
|
||||
|
||||
Reference in New Issue
Block a user