Repository navigation
feat(dir-tree): single-file roots — snapshot returns a content-addressed Link - #111
Merged
Merged
Conversation
Adapts the proptest round-trip to Link roots; covers extra digests on a file root and refusal of a symlink / fifo given directly as the root. Co-Authored-By: Claude Sonnet <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet <noreply@anthropic.com>
…ix storage docs Tests for InvalidDigest on file roots (resolve and verify), a surplus node on a file-root proof, and the storage description (#109 review). Co-Authored-By: Claude Sonnet <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet <noreply@anthropic.com>
Only a multi-digest test uses it, so a `--features dir-tree` build warned (unused import) and `clippy --all-targets --features dir-tree -D warnings` failed. CI and `just check` build with --all-features, which hid it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Summary
Linkis nowContentAddressable, and the one root id always names aLink: a file root isLink::File, a directory root isLink::Dirwrapping the existingDirNodeid.snapshot/snapshot_withaccept a regular file or a directory, return the rootLink, and store it so its id can be fetched; symlink and special-file roots are still refused.resolvetakes the rootLink's id: an empty path on a file root yields that file's proof; a path on a file root isNotADirectory. Proofs carry the rootLinkas their first node.DirNodebytes are unchanged (pinned by a test against an id captured before this change).InvalidDigestonresolve(feat(dir-tree): multi-digest file links — BLAKE3 identity plus carried digests #108 review nit).Test plan
verify_file, file vs directory roots over the same bytes get different ids, tampered or mismatched root nodes rejected, wrong-kind paths typed; existing directory tests adapted toLinkroots; proptest round-trip green.just checkgreen;cargo +1.85 test --all-featuresgreen.Fixes #109
🤖 Generated with Claude Code