feat(snapshot): monorepo versioning spec and immutable source reader - #56
Draft
Ivanbeethoven wants to merge 8 commits into
Draft
feat(snapshot): monorepo versioning spec and immutable source reader#56Ivanbeethoven wants to merge 8 commits into
Ivanbeethoven wants to merge 8 commits into
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.
Summary
Start with the concise Chinese design overview:
docs/versioned-readonly-layer-design.md. It focuses on one rule: each workspace pins one complete Mega version; detailed protocol terminology stays in linked implementation specs.The client design now includes missing-object batching into tar+zstd packages, per-object cache reuse across versions, bounded prefetch, and a separate large-file range reader. It follows the shared Mega transfer spec. These are proposed client changes, not implemented mount capabilities.
Draft review checkpoint for ScorpioFS/Mega version management. Not ready to merge as end-to-end versioned mounts. This PR is part of the full delivery, not a reduction to the library-only slice.
SourceReaderthat traverses immutable trees, asks its backend for source/path/kind/OID, enforces object limits and verifies Git object hashes.The HTTP adapter sends fixed descriptor/path context with sensitive access-token and lease headers, rejects redirects/partial/non-object responses, bounds streamed downloads and redacts transport errors. Existing Dicfuse/Antares mounts are not yet wired to it and retain their old behavior. Mega snapshot routes are not exposed yet. No new production capability is advertised.
Research design
The research plan separates transport format from candidate contributions, records relevant prior systems and REAPI, and defines correctness invariants, a proposed bounded transfer selector, falsifiable hypotheses and controlled baselines/ablations. Package-count examples now explicitly require known or concurrent demand. This is an experimental plan, not evidence of novelty or measured performance.
Validation
Transfer-design documentation: JSON examples, relative links, example arithmetic and whitespace checks passed. No transfer implementation or performance benchmark is claimed by this documentation update.
Local WSL Ubuntu 24.04 checks:
cargo test --lib snapshot --locked -j 1— 24 tests passed, including 6 HTTP adapter tests and 5 shared namespace codec tests; object fixture OIDs obtained withgit hash-object --stdin, without writing Git objects.cargo clippy --lib --locked -- -D warnings— passed.cargo fmt --all --check— passed.Tests cover delayed reads after a newer fixture exists, source isolation, root-relative paths, modes/symlinks, failed backend requests, hash corruption, malformed trees and byte limits. They do not replace real server/FUSE, lease, CAS, update or crash-recovery tests.
Remaining full-delivery gates
Related: #55, #42, #43 and #44. These remain open; this PR does not claim their full completion.
Companion Mega draft: gitmono-dev/mega#2181.
No existing workspace/layer directories were deleted or switched. The system-paper optimization and full experiment programme are separately tracked, not automatically included here.