Repository navigation
An edge has a second limit, unattended_max, that a person acting restarts - #138
Conversation
…arts iteration_max counts across the whole run, and a run that goes back to a person many times lives long. A line that wanted "escalate once in each human round" had to build it from a note file and prompt text. unattended_max is how many times a run may take an edge without a person acting. Its count starts again when a human station reports or a node is started by hand, the boundary the node ceiling already uses. Spending it ends the run as iteration_max, the reason naming the unattended budget. iteration_max does not change, so no line that runs today changes. The key reaches every place an edge's limit is read: the kernel and its cycle rule, the store's walk, the pipeline file's spelling and schema, lint's unbounded-retry, the graph's labels, Studio's inspector and its run-ended frame, the generated field table and JSON Schema, and the docs. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
Lore is reviewing this PR — dc38c617-c87b-4edd-8d37-f7f5e0157e5e. Submit a review that requests changes to have Lore push a fix for it. Comment |
Lore code reviewReviewed revision The story the tests tellA line's loop edge can now carry a separate budget for retries that happen with no person acting. When that budget runs out, the run stops, and the validator, reader, graph and studio all understand the new setting. The full story, with its testsThe main change is a new edge limit, Tests: The cycle check accepts the new limit as a guard. A self-loop whose edge sets Tests: The pipeline file format accepts Tests: The graph and studio show the limit. An edge label gets a suffix such as "max 1 unattended". When both limits are set, both appear, for example "failed · max 5 · max 1 unattended", and the label gets wider to fit. The visible-graph labels for a changes_requested hop follow the same pattern, with an unattended-only or combined suffix. The studio's line inspector shows an "Unattended limit" row with value 2 for such an edge. The run.ended frame parser accepts an edge that carries Tests: Gaps
What the checks readThe story holds for the walk, store, cycle check, file format, graph labels, studio inspector and frame parser. I found one untested behaviour: the new lint message for an unbounded self-loop retry. The story holds for the walk, store, cycle check, file format, graph and studio; the only gap is the untested hand-start restart of the unattended count, since the unbounded-retry lint wording is already reported by the implementation check. All seven statements match the code: getNextTransition replays visits, both budgets are derived rather than stored, and unattended_max restarts at a human visit or a hand-run start while iteration_max restarts only at a hand-run start. |
There was a problem hiding this comment.
Lore review — Changes suggested
2 gaps separate the story the tests tell from the implementation, the issue and the changed documents.
Must fix (2) · Consider (0) · Nits (0)
Reviewed by claude-sonnet-5-5
Submit a review that requests changes to have Lore push a fix for it. Comment @lore review to re-run the review.
Notes on lines outside changed hunks
packages/pipeline/src/collection/lint-rules.test.ts:126 — issue (blocking): Missing test: Lint message names unattended_max for unbounded retry
The diff changes the unbounded-retry lint detail to "... with no iteration_max and no unattended_max; the walk would retry without bound". The story only says lint reports nothing for an edge carrying unattended_max. The one existing test checks stringContaining("iteration_max"), which the old message also satisfied. Nothing asserts the new wording, so reverting the message would still pass.
Proposed:
it("names both limits in the unbounded-retry detail", () => {
const retrying = SOUND.replace(SELF_EDGE, " - from: work\n to: work\n on: failed");
expect(problems(retrying)).toMatchObject([{ rule: "unbounded-retry", detail: expect.stringContaining("no iteration_max and no unattended_max") }]);
});
Evidence: packages/pipeline/src/collection/lint-rules.ts 24; packages/pipeline/src/collection/lint-rules.test.ts 125
Posted by floor, visit ea1016f6-e343-420a-966e-a4f6c9fd4e3f.
| nodeId: "work", | ||
| iteration: 4, | ||
| }); | ||
| }); |
There was a problem hiding this comment.
issue (blocking): Missing test: Hand-started node restarts the unattended count
The PR description says the unattended count starts again when a node is started by hand, the boundary the node ceiling uses. The walk does this through visitsSinceHandRun, which starts the replay from the last hand-run visit. The story tells only the human-report restart, and no test with unattendedMax uses a visit with requestedBy. If the hand-run boundary stopped resetting the unattended counts, no test would fail.
Proposed:
it("counts review->work unattendedMax 1 from the start again after a person ran a node by hand", () => {
const visits = [
visit("work", 1, "success"),
visit("review", 1, "changes_requested"),
visit("work", 2, "success"),
{ ...visit("review", 2, "changes_requested"), requestedBy: "gedaiu" },
];
expect(getNextTransition(reviewWithHuman, visits)).toEqual({ kind: "launch", nodeId: "work", iteration: 3 });
});
Evidence: packages/assembly-lines/src/transition.ts 58; discussion: pull request description, line 5 5
There was a problem hiding this comment.
Added in 426907a: "launches work at iteration 3 when review->work with unattendedMax 1 is taken a second time from a review a person ran by hand". It is your proposed case. It would fail if a start by hand stopped restarting the unattended count, because the second take would then spend the budget of 1.
…etry names both limits Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
On gap 1 (the lint message for an unbounded retry): fixed in 426907a. The existing test only checked that the detail contains |
iteration_maxcounts how many times one run takes an edge, across the whole run. A planning run goes back to a person many times and lives long, so a line that wanted "escalate once in each human round" could not say it. One collection built it from a note file and prompt instructions, withiteration_maxleft as a tripwire that ends the run.An edge can now also set
unattended_max: how many times a run may take it without a person acting. The count starts again when ahumanstation reports, and when a node is started by hand, which is the boundary the node ceiling already uses. When the edge is needed once more, the run ends with the outcomeiteration_max, and its reason names the unattended budget.It is a second key and not a change to
iteration_max. Restarting every count at a human report would change lines that run today, and would take away the one way to cap how many times a run goes back to a person. An edge may set both. No existing line changes behaviour.The key reaches every place an edge's limit is read. The kernel counts it and restarts it. The cycle rule accepts a loop it bounds, and its refusal now reads
has no iteration_max, no unattended_max and no human node. The store passes a line's edges to the walk as they are, where it used to copy four named fields and would have dropped the new one. The pipeline file spells itunattended_max, the shared schema lists it, and lint'sunbounded-retryaccepts it. The graph shows it in an edge's label, asfailed · max 5 · max 1 unattended. Studio shows an "Unattended limit" row in the line inspector, and its run-ended frame, which is strict, accepts an edge that carries it.Both specifications, the two concept pages, the retry-loop cookbook, the storage design document and the decision log describe it, and the field table and JSON Schema are regenerated.
Not in this change: the lore converter. No field of a lore line maps to the new key.
Checked with nothing else going on: every package's tests pass (assembly-lines 202, graph 316, store 408, pipeline 266, Studio 459, API 414, cluster-agent 132, docs-reference 37, and the three small ones), with the typecheck, ESLint on the whole repo and the docs check clean. One docs-reference test that pins the list of an edge's fields failed in that run, was updated to include the new key, and passes. I did not run a line with the new key against a live floor.
🤖 Generated with Claude Code