feat: bridge stow sweeps across Claude compaction - #55
Open
ruby-dlee wants to merge 7 commits into
Open
Conversation
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.
Intent
Close the Claude context-compaction knowledge gap by making compact-sourced recovery require a scoped
stowsweep over the lost transcript, with durable acknowledgement that cannot silently skip unswept conversation.What changed
stowskill as the routing owner.mark-stowedwith immutable transcript/boundary arguments and compare-and-swap checks. A stale sweep or changed marker fails closed and leaves the newer boundary pending for re-sweep.AGENTS.mdanddocs/autocompact-recovery.md, including a real Claude Code 2.1.220 compaction transcript.Targeted verification
bash tests/fm-autocompact.test.shpassed all 15 checks:jq.Additional evidence:
/compact, received the directive in resumed context, loadedstow, read transcript bytes[0, 86349), and advanced the marker through byte 86349. The fixture used project-only settings and its ownFM_HOME; live primary settings were untouched.Unrelated broad-suite failures
The serial broad shell suite still reports the four known unrelated failure areas:
These areas fail identically without this change. This branch changes only autocompact recovery, its focused tests, and the owning documentation; it does not touch any of those four areas. Firstmate reviewed the diff and explicitly authorized publishing on the targeted evidence while a separate lane shards and repairs the broad suite.
Review fixes
No-mistakes review caught and fixed two important races before publication:
mark-stowedto the exact injected transcript path and end offset with compare-and-swap rejection of stale acknowledgements.Review re-check, documentation, lint, push, and PR creation all passed.