Repository navigation
One module for how a Run's ending shows and how a child Run's is read back - #258
Merged
Merged
Conversation
… back The Run ending module shows how a Run, a Spec run or a failed Architect run ended, and reads a child Run's ending back from the lines it relayed. The session-log and Base fix prefixes are private to it. A cause of several lines is read back as its first line, and only the child's own progress lines count toward its ending: the progress module now says which relayed lines those are. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…itect run's ending shows through the Run ending module, clearer names in the relay Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…g to fix on the branch) 2026-10-01T09:45:33Z, host tracewake. Uncommitted work at the time of failure is included in this commit.
JacobStephens2
marked this pull request as draft
October 1, 2026 09:45
…eading past the advice and showing a skipped Architect run's URLs Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… fix and progress modules, a clearer name for a line from a child's own child Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
JacobStephens2
marked this pull request as ready for review
October 1, 2026 17:49
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
One module,
src/run_ending.rs, now owns a Run's ending both ways: how it shows, and how a Run reads back the ending of a child Run it started. What a Run prints does not change.How a child Run's ending is read:
The branch merges
main, which since added the advice a Run gives when Inherited failures fail it (between its cause and its session log) and the skipped Architect run (no URL, or several, on stdout). Both now show through the module, and the reader passes over advice asmain's did.Seams under test: the Run ending module's interface (show an ending as values, feed its lines to
Reader, compare what comes back), and the progress module's relay (relayed,ChildLine::of).Evidence
Before: the reader ported as it was into the new module, with the round-trip tests written first:
After:
cargo teston the merge withmain: all 29 suites pass, the end-to-end tests unedited (this branch changes nothing undertests/). The 119 unit tests include 10 round trips inrun_ending: ready for review; merged; reached after a Base fix; failed with and without a session log; failed with a pull request left open; a cause of several lines; failed with advice; failed after a Base fix that did not merge; an ending shown after lines relayed from a child of its own; a child that showed nothing. The progress module's tests cover which relayed lines are a child's own.cargo clippy --all-targetsandcargo fmt --checkare clean.Unaddressed findings
Standards
progress::stamped,progress::relayedandChildLine::ofarepubwith no caller outsideprogress.rsbut the Run ending tests. Kept: the issue asks that the round trip "go through the same formatting and parsing a progress line gets, and start no process", which needs the formatting as a value. They are whatstepandrelayprint, not a second path.main::architectpicks amongshow,show_architectandshow_failure. Kept: the issue fixes the interface as show, with "showing a failure alone … exposed for the Architect run".show_architectis the line and URLsmainalready printed for an Architect run that dispatched nothing.show_architect's doc says "dispatched no run" in lower case. Kept: it is the wordingmain.rsand the help already use for "a Spec run or a Run".relayparses a line twice, once to print it and once to say what it is. Kept: two short passes over one line; sharing them would tie the printing to the classifying for no gain a reader would notice.ChildEndingandChildFailurenearly mirrorchild_run::Ended, whichwaitmaps them onto. Kept: the issue leaves the child Run'sEndedas it is and keeps interruption and the exit status with the child Run module, sowaithas to map one onto the other.ChildEnding.base_fixis read back for a failed child butchild_run::waitdrops it. Kept: the issue decides it "is read back whichever way the child ended, since it is shown either way".relay,relayedandChildLine::Relayedshare a stem, andrun_ending::Readersits besideBufReader. Partly addressed (the local inChildLine::ofis renamed); the rest kept:relayedis the linerelayprints, and the issue names the reading half "read".finish(stdout, exited_zero: bool)andShown.success: boolare bare booleans. Kept: each has one caller and one meaning, and the issue words the interface as "whether it exited 0".Spec
Base check,Retry with,Or set) stay in the Base fix module, so the Run ending module asksAdvice::is_line. Not moved: the advice arrived onmainafter the issue was written, the labels are what the Base fix module builds its advice with, and the Run notification lays them out too. The acceptance criterion names the session-log and Base fix prefixes, which are private. The module's doc now says what it leaves to the Base fix and progress modules.main's reader does, and the cause line carries no mark to tell it from a step, so telling them apart would change what a Run prints, which the issue rules out. A child that showed nothing of its own still fails with its exit status.show_architectis a third way in, beyond "show and read", with no unit test. Kept: an Architect run that dispatched nothing must "print what it prints today" through the module, and the end-to-end Architect run tests pin its line and URLs.ChildLine::Relayedwould also drop a progress line of the child's own whose message starts#<number>:. Kept: no such line exists outside the relay, and the classification is what keeps a relayed line from being read as the cause.thirdshift: failed runcommit 07d073c is on the branch. Left: it is the marker an earlier Run left, and removing it would rewrite pushed history.Merge Danger
Door: two-way
A refactor inside one binary, with no stored format, flag or published interface changed. Reverting the PR restores the old reader.
Blast Radius: contained
Two behaviours differ from
main, both in what a Run reads back from a child Run, never in what it prints. A cause of several lines is now named by its first line in the Tickets checklist, the Spec run's summary, the Run notification and the cause of a Run whose Base fix failed. And only the child's own progress lines can be its cause: not a line it relayed from its own child (one starting#<number>:), nor one with no progress prefix. A parent and child of different thirdshift versions can't meet: a child Run is the same executable.Closes #253
🤖 Generated with Claude Code