Repository navigation
fix(shim): preserve snapshot isolation across delete and recreate - #303
Merged
Merged
Conversation
vinceblock99
marked this pull request as ready for review
October 28, 2026 18:43
Contributor
|
@vince can you expound on the last section? What exactly do you mean? |
graywolf336
approved these changes
Oct 29, 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.
With the Git shim enabled, an immediate native deletion record could report “Nothing to record” after its entry-boundary snapshot had captured the deletion. Replacing the old private snapshot realigned the shared TREE cache to the private view, hiding the pending deletion from the next record on the same handle. Keep that realignment limited to membership changes in the selected view, preserving staged working-copy paths and the existing canonical graph/closure rules.
Recreating a recorded-deleted path could also make
atomic addfail during its pre-entry snapshot with “new attribute path … has no FileAdd inode”. Capture includes untracked files before add stages an inode: content assembly correctly chooses the existing claimant’s undelete, but attribute assembly expected a new FileAdd. Resolve unstaged reappearance attributes through the same canonical absent claimant, retaining its inode, mode/kind, and graph-only representation.Fixes the reproduced behaviors in
ATOM::bradley::23andATOM::bradley::24. There are no automatic retries, preliminary status calls in the deletion fix, new runtime flags, or relaxed validation.Regression coverage includes same-handle snapshot replacement followed by the first durable deletion record; genuine no-op records; staged work surviving replacement; unstaged undelete identity through reopen; stale promotion rejection preserving newer bytes, membership, and the captured object; and successful fresh recapture/promotion. CLI tests cover ordinary and default rolling imports, both a one-file minimization and the Unicode move/percent-path/attributes/executable/symlink fixture, with regular/executable/symlink recreation and exact bytes, attributes, identity, Git tree, and neighbor checks. The new CLI tests are children of the existing shim suite and inherit its platform/build gates.
Validation
Local macOS validation against dev
cedd877d:-D warnings), formatting, and patch whitespace checks pass.5347739b(60 commits) and antirez/linenoise ata473823d(163 commits). Both rolling-import runs pass the deletion/recreation, exact bytes/mode/neighbor, subsequent Git commit/reconcile, subsequent Atomic record, and genuine no-op checks.Known follow-up from real-repository testing
The complete ordinary-import workflow is not all green. On SDS, native edit → delete → recreate/add/record succeeds and verifies clean, but a subsequent Git commit/reconcile fails staged semantic-closure verification for
LICENSE(same byte length, different rendered content). Rolling import passes the complete scenario.The frozen pre-fix dev CLI
be83f20also produces the same reconciliation error after a control that bypasses its earlier add failure by calling the unchangedRepository::addAPI solely to stage the recreated file. That helper links the current repository build but does not invoke either changed snapshot/record path; subsequent record, hooks, and reconcile use the old CLI. Simple native-edit → Git-commit and native-delete → Git-recreate controls pass on both versions. This supports treating the ordinary-import/native-undelete synthesis failure as a separate existing issue; this PR does not fix it.