Repository navigation
Verify project-history package transport before importing - #70
Merged
Merged
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.
Add a read-only verifier for extracted version-1 project-history packages before a future supported importer writes destination projects. It requires an independently trusted checksums.json SHA-256, verifies the exact file/link inventory and fingerprints, rejects unsafe paths/hard links/special files/duplicate manifest keys, and checks working-file records against transport metadata. It never extracts archives, invokes Git or packaged scripts, follows directory symlinks, imports projects or changes grants.
The summary explicitly reports git_history_checked=false and imported=false. Documentation separates trusted transfer, transport verification, Git-history acceptance and runtime migration, and keeps #64 open for general export/import. Existing private Foundry artifacts remain unchanged.
Validation (2026-11-15): 35 focused cases and all 467 regression tests pass locally. Cases include dotfiles, Unicode, legitimate trailing-dot names, tampered/resealed manifests, missing/extra/changed files, executable bits, hard links, directory symlinks, duplicate IDs/keys, escaping paths, no symlink target reads and unchanged source bytes/modes. This does not validate complete Git histories or the actual private Foundry package.
Agent review: Foundry task 3cffe669a5104ef49015cac85b6c8ac6 proposed the small pure path validator. Forge removed its unnecessary PurePath import and unsupported rejection of ordinary filenames ending in a dot, retained the canonical-path checks, and independently tested the corrected version. The surrounding verifier and acceptance tests were supplied by Forge.