Repository navigation
The Sessions module owns its Resume rules, tested in-process behind a seam - #408
Merged
Merged
Conversation
… seam (#407) The Resume rules reach the machine only through a private `Outside` seam: run one session, and hand on a progress line. The real adapter spawns the Harness's CLI as before; a scripted one drives the rules in-process. The end-to-end tests those now cover go, with the fakes' no-session-id knob. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ecords no ending 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 Resume rules now reach the machine only through a private
Outsideseam, as the Claim, Delivery, Run, CI watch and Base fix rules already do.OnMachineowns a clone of the worktree path and the HarnessChoice. If it held borrows,RefCell<Box<dyn Outside + 'a>>would makeSessions<'a>invariant and break Delivery's&'a Sessions<'a>.Evidence
claude/codexon PATH. Seven end-to-end tests intests/background_work.rs.After: seven in-process tests in
session::testspass in about 0.01s:FAKE_CLAUDE_NO_SESSION_IDknob was removed from the fakes. The Claude Resume test, the merge refused after killed work, the session that ends in an error, and every Codex test are kept.cargo clippy --all-targetsis clean. The last twocargo testruns passed in full (1,053 tests). One earlier full run reported a single failure that did not happen again. Its name wasn't captured, and it was likely a timing-sensitive end-to-end test on a loaded machine.Merge Danger
Door: two-way
The change is internal to
src/session.rs, plus test deletions. Reverting it brings everything back.Blast Radius: sessions
Every Run, Repair and Architect run session goes through the real adapter. It is the old spawn and follow code, moved but otherwise unchanged. The kept end-to-end tests exercise it on both Harnesses.
Unaddressed findings
Standards
(kind, resume, prompt, log): skipped. The four values travel together only across a private seam with a single method, and the issue specifies this signature.Call::Sessionconstruction inScripted::run_sessionand thesession()test helper: skipped. One builds from what was received and the other from what is expected. Sharing that code would hide what the test asserts.log.exists()filter applies inwithinbut not intaking: skipped. The issue asks for exactly this ("The rules' own entry point … returns the last log unfiltered"), andtaking's doc comment says so.Spec
Closes #407
🤖 Generated with Claude Code