Repository navigation
Copy roots by file layout; check-root tests derive scratch under their own HOME - #2785
Merged
Merged
Conversation
… HOME HistoryArchive.files_in decoded the whole history catalogue in today's HistorySource shape only to learn where archived roots live. Every rehearsal copy (StoreBackup.copy_tree -> RootFile.owned_files) therefore refused a root still in an older shape before any carry could read it; test_carry_bus_history has been red all day on whichever predecessor field the decoder met first. Archived roots are wherever attach puts them, so archive_directory owns that layout once and files_in lists it without decoding. scratch_root derived the agent-scratch directory from StorageRule() before durable_home set the test's HOME, so it wrote under the developer's real ~/.cache/agent-scratch; once dc7557a made the rule read HOME when built, the registry's rule and the fixture disagreed and CheckRoot refused the root. scratch_root now requests durable_home and derives from the rule under it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… them With the copy no longer refusing predecessor roots, the carry rehearsal met the red behind it: an archived bus.sqlite3's -wal and -shm were reported as changed files no step names. Archived files were keyed to HistoryArchive in owned_files but never became primaries, so their store never claimed its companions. RootFile.archived_roots declares the whole roots a declaration keeps; owned_files takes primaries from primaries_in, which recurses through them. Carry walks (declarations_in, existing_in) still see only the top root, so no carry rewrites an archive. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
trissim
marked this pull request as ready for review
October 23, 2026 14:01
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
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.
Two reds on main (1da51e0) with no owner.
test_check_root (2 tests). Not environmental, it was the test reading the machine. The
scratch_rootfixture builtStorageRule()beforedurable_homeset the test's HOME, so it derived the developer's real~/.cache/agent-scratch. After dc7557a (#2776)scratch_basereads HOME when the rule is built, so the registry's rule (test HOME) and the fixture (real HOME) disagreed andcheck_root.py:64-69correctly refused. The owner already derives from the declared storage rule; the fixture now depends ondurable_homeand derives from that same rule.test_carry_bus_history.
HistoryArchive.files_indecodedhistory_sources.jsonin today'sHistorySourceschema only to learn where archived roots live.StoreBackup.copy_tree→RootFile.owned_files→files_intherefore refused any predecessor-shape root before a carry could run. It was red across today's commits on whichever predecessor field the decoder met first (54b2e14, 57b51b6 and their parents all red). Archived roots are now found by whereattachputs them (archive_directory, one spelling). The copy step is now byte-level by owner identity.That exposed the next red behind it: archived
bus.sqlite3-wal/-shmwere reported as unnamed changed files, because archived files never resolved to their own owner.RootFile.owned_filesnow takes primaries fromprimaries_in, which recurses through the newarchived_rootshook. Each archived store's companions then fold into that store. Carry walks (declarations_in,existing_in) are untouched, so carries never rewrite an archive.🤖 Generated with Claude Code