Repository navigation
Deepen Recovery so each layer adds its facts and Recovery owns the rules for its lines - #871
Merged
Merged
Conversation
…les for its lines Recovery's fields are private. The Delivery records its worktree as it builds the Recovery, the Spec run adds Ticket progress and child work, and the Run's start and end add the Continuation context and Base fix work; Recovery decides the preservation upgrade, the final-review flag and the order of retained work, and its own tests read them through lines(). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…eep the review flag with its Ticket progress Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
Recovery's fields are now private. Each layer of a Failed run adds the fact it knows, and Recovery decides how that fact changes the lines.
TicketProgressno longer has areviewedfield. The Ticket board reports only landed and total.GLOSSARY.mdgains a Recovery entry, and the Failed run entry links to it.docs/code-navigation.mdgains a Recovery row.Evidence
src/recovery.rshad no tests. Its rules were tested only end to end, through the Spec run and Run notification fakes.recovery::tests, each asserting only onlines():Retained worklines in order, plusBefore retrying;Test runs:
cargo teston the first commit: every suite passed (lib: 1108 passed, 2 ignored).cargo test --bin thirdshift -- recovery:: run_ending:: delivery::tests spec_run:: run::: 136 passed.tests/failed_run.rs,tests/spec_run.rs,tests/run_notification.rsandtests/continuation.rs: all passed.tests/changed, so the end-to-end tests check that the lines are unchanged.Merge Danger
Door: two-way
It is an in-process refactor with no change in behaviour, and it is easy to revert.
Blast Radius: small
It affects the lines a Failed run prints: in the terminal, the Activity log, the Command record and the Run notification. The unchanged end-to-end tests cover each of them.
Review coverage
Both reviewers read every changed file. No generated output was excluded.
Unaddressed findings
Standards
Recovery::stage()getter exists only for tests (judgement call).#[cfg(test)], because no production code reads it any more.Stagevalues (src/delivery.rs,fn stopped). Rewriting them to matchStopped at:text would only couple them to the line format.add_ticketsandadd_command_context(smell).src/spec_run.rsandsrc/run.rsthe flag is passed as a named expression; only the hand-builtrun_ending.rstest passes literals.record_worktreebreaks theadd_*naming (smell).add_would misdescribe it. The spec's Decisions word it as "record the worktree".failtakes the worktree path as an extra parameter (weak smell).failis given the worktree path." Getting it fromFailedOutsideinstead would add a method to every test double for no change in behaviour.Spec
stage()is test-only rather than part of the production interface (noted as a deviation, not a defect).dead_codewould reject an unused public method.None of these needs a Day shift decision, so no
needs-triageissue was filed.Closes #867
🤖 Generated with Claude Code
Built with claude · claude-opus-5-5 · medium
Security review outcome
No unaddressed introduced findings.