Repository navigation
An Architect run owns its lifecycle to its dispatch, tested in-process behind the Pass seam (#415) - #418
Merged
Conversation
…s behind the Pass seam (#415) The Pass seam grows a pull of the Launch directory's Base branch and the Architecture review session, which runs its conclusion inside the session and returns its result with the Session log. Everything in an Architect run after its lock and preflight checks runs in run_through, generic over the seam: the gates, the Harness check, the start, the pull, the review and the plan's dispatch, unless plan-only. The entry point no longer builds Asks or calls run_to_end for one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ktree, and clearer names The Pass seam's review call hands on the review's starting line once its worktree is ready, as before, so it follows the worktree's lines and is not printed when the worktree can't be made. The Architect run's outcome past its skip is Ran, the step before the dispatch is up_to_the_dispatch, and the tests no longer reach calls by position. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
An Architect run now handles its whole lifecycle in its own module, up to the dispatch of its plan, and is tested in-process through the Pass seam.
The Pass seam gets two new calls:
pull(base)review(base, starting, prompt, conclude) -> (Result<T>, Option<Session log>)In production (
LaunchAndGitHub),reviewdoes the following, in order:Sessions::within, with a clone of the Harness choice, to the session's final message;InMemoryrecordsPullandReviewin its ordered call list. Its review hands a scripted final message to the conclusion and returns a scripted Session log, or fails. It also recordsDispatchPlan.Reviewed::PlanReadyno longer carries the Base branch, becauserun_throughalready has it.Evidence
Before: the unit tests could only reach an Architect run's gates and conclusion. Ordering rules, such as the dispatch's line coming after the label swap and a skipped run making no Harness check, could only be checked by end-to-end tests.
After: new unit tests through
InMemoryinsrc/architect.rscover each rule the issue lists:The three end-to-end tests that only checked one of these rules were removed.
progress_lines_cover_the_worktree_the_review_starting_…now also checks that the worktree line comes before the review's starting line, as it did before this change.cargo test: every suite passes.cargo clippy --all-targets -- -D warningsis clean.Merge Danger
Door: two-way
This is a refactor with no change in behaviour, and it reverts cleanly.
Blast Radius: Architect-runs
If something is wrong, it would show up in Architect runs: the order of their progress lines, their failure handling, or their dispatch. Runs and Pickup runs are untouched.
Unaddressed findings
Standards
architect::runreturnsOutcomewhilepickup::runreturnsResult<Outcome>. Kept as is: an Architect run's failures, preflight included, end as a failed review with a Run notification.Outcome::Rancarries that failure, asEnding::Architectdoes.Outcome::Ranhas the same shape asEnding::Architect(Duplicated Code / Middle Man). Kept as is:commandwould otherwise depend onarchitect's outcome type, andmainmaps one to the other in a single line.Outside::pullonly delegates (Middle Man). It is a seam call that the issue asks for, so the tests can see it.plan_onlyandpullare bools (Primitive Obsession). They mirror the command's flag andlaunch.pull; an enum would add ceremony for one guard each.widgets()andready_for_review()duplicate test helpers inpickup.rs. These are small fixtures, and sharing them across modules is out of scope here.let Outcome::Ran { review: Err(failed), dispatched: None } elseblock appears twice in the tests. Those two tests also checkfailed.interruptedandfailed.log, which thereviewed()helper drops.Spec
a_focus_goes_into_the_session_promptoverlaps the new unit test. Kept: it also checks that the focus is parsed before or after--plan-only, which only an end-to-end test covers.Closes #415
🤖 Generated with Claude Code