Repository navigation
The Delivery owns its steps and the Failed run path, tested in-process behind a seam - #385
Merged
Merged
Conversation
…s behind a seam (#384) The Delivery's steps, catch-up included, run in its own code through a private seam, and the Failed run path moves in from its own module and runs through a second one, once the sessions have ended. Each has a production adapter and a scripted fake. Interrupts and warnings cross the seams as questions and messages. End-to-end tests that checked only one of these rules give way to unit tests; one per wiring path stays. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
The Delivery now runs its steps and the Failed run path in its own code, through two private seams. Each seam has a production adapter and a scripted fake.
interrupted()), not as the process-wide flag. That covers both "an interrupt wins over the error" and "a step after the merge is retried if interrupted".interrupt::retry_if_interruptedis gone.Worktree::keepnow takes&mut self, so the adapter that owns the worktree can keep it.interrupt.rsunit-tests all three signals.Evidence
Before: marking ready, the steps after the merge and the Failed run path had no unit tests. They were reached only by driving whole Runs against the fake
gh,gitandclaude.After: 22 new in-process tests in
delivery::testscover:cargo testpasses in full, andcargo clippy --all-targetsandcargo fmt --checkare clean.Merge Danger
Door: two-way
This moves code inside the binary. Nothing persisted and no interface changes.
Blast Radius: Delivery
Every Run and Spec PR goes through this path. The progress lines, warnings, requests and git effects are meant to be byte-identical. One difference is that the Factory skills plugin is now written before a Spec PR's catch-up rather than after it.
Unaddressed findings
Standards
retry_if_interruptedduplicated inclaim.rsanddelivery.rs: each is a few lines over its own module's seam, as the Claim seam set the pattern. A cross-module trait to share them would couple two private seams.OutsideandFailedOutsidesharepull_request/interrupted/step; suggested a supertrait: the spec chose two seams on purpose. A supertrait adds a third abstraction to save three one-line methods.issue,base, branch) acrossRoute/InWorktree/OnFailure/RunOutside: each adapter needs a different subset and different ownership (borrowed vs. owned worktree), so bundling them would not remove any parameters.before_ready: FnOnce(&mut O)shaped by tests: passing the outside lets the fake record the step in order with the others. The publicdeliverkeeps itsFnOnce()parameter.InWorktree,OnFailure,Scripted) vs.OnGitHub/InMemory:Scriptedmatches the Repair loop's fake. The adapter names say where each runs: within the worktree's sessions, and on a failure.interrupted_ormadepubinfailed_run.rs: theFromconversion the spec keeps there uses it too. Sharing it keeps one definition of "an interrupt wins".interrupt.rs's unit test still records SIGINT, SIGTERM and SIGHUP.Worktree::keeptakes&mut self: needed so the Failed run adapter can own the worktree, as the spec asks.Spec
interrupted_orleft in the Failed run module: the conversion from a plain error, which the spec keeps there, depends on it.merge_run.rsend-to-end tests may check a single rule (closing into develop, Ctrl-C after the merge, branch already deleted by GitHub): each checks wiring the unit tests can't. They are the non-default base on the real merge, the real signal flag through the adapter, and the adapter's own already-deleted check.Closes #384
🤖 Generated with Claude Code