Repository navigation
fix(project): adopt moved stores by explicit identity - #4701
Merged
Merged
Conversation
|
ScriptedAlchemy
marked this pull request as ready for review
November 3, 2026 02:09
ScriptedAlchemy
enabled auto-merge (squash)
November 3, 2026 02:22
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 3, 2026
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.
Problem
Moved-project adoption scanned every registered project before honoring an explicit ID. An unrelated unreadable store could block adoption, and uniqueness-based selection could choose a history for a new directory. Some daemon and cached routes could also ignore
--adopt-projectand return a different registered project.Changes
--adopt-project <id>for adoption and interrupted-remap retries.AdoptUnique,OfferCandidates, and--fresh.init --yeswith an explicit replacement instruction instead of silently changing its meaning. Help directs discovery totracedecay projects list.Verification before the alias-replay follow-up
Passed 16 focused tests on the earlier combined worktree:
The application and registry now agree that only a surviving directory at the former root prevents non-Git relocation; metadata errors remain typed refusals.
That local validation used the combined worktree for #4698–#4703 with pinned Rust 1.99.1. Native Cargo compilation includes #4703 and the checked-in
scripts/bazel/patches/grafeo-core-read-allocation.patchapplied to Cargo's pinned Grafeo checkout, matchingMODULE.bazel; dependency revisions and the lockfile are unchanged. Profile fixtures ran on supportedtmpfsbecause that container'soverlayfilesystem is rejected by existing storage admission. Production project admission remained enabled. Formatting, whitespace checks, and independent source review passed for that earlier tree. Hosted CI still needs to verify each PR branch independently.Alias-replay follow-up
Commit
3cb3e1a103720e17a4798b19057c3020c9eef9dcfixes an additional source-confirmed shortcut: the real registry may retain the live canonical root while recording another alias for the same project. The adoption path previously returned success solely because the alias matched the requested project ID.Added
named_adoption_requires_canonical_root_agreement_for_existing_aliasusing the existing registered-database fixture and actual registry writer. It verifies refusal while the original directory survives, unchanged manifest/registration/source after refusal, successful remapping after the actual directory move, and idempotent replay after completion.The new regression and this commit have not been compiled or executed locally. This repair session has no supplied checkout or Bazel toolchain, and no Cargo commands were run. Hosted validation is pending in https://github.com/ScriptedAlchemy/tracedecay/actions/runs/41572545625; the earlier 16-test result is not a pass claim for this new revision.
Fixes #4429.