feat(snapshot): namespace spec, persistent sources and scoped read foundations - #2181
Draft
Ivanbeethoven wants to merge 13 commits into
Draft
feat(snapshot): namespace spec, persistent sources and scoped read foundations#2181Ivanbeethoven wants to merge 13 commits into
Ivanbeethoven wants to merge 13 commits into
Conversation
10 tasks
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 plain-language Chinese design overview:
docs/monorepo-versioning-design.md. It walks through a complete V100-to-V101 dependency update, includes the concrete manifest and core data structures, shows how each Mega directory type advances the monorepo version, and keeps storage/codec details in linked implementation specs.The proposed file-transfer design targets many small source files: exact directory sizes, bounded on-demand tar+zstd packages, reusable hot-directory packages, and independently verified large-file chunks backed by a trusted Mega chunk map. Read the worked example and protocol spec. These are design documents; transfer endpoints, caches and performance gates are not implemented.
Draft review checkpoint for Mega/ScorpioFS version management. Not ready to merge or deploy as a snapshot capability. This PR is part of the full namespace-publication effort, not a replacement for it.
The catalog trusts existing ingestion commit/tag metadata; it does not claim raw commit/tag re-verification. The catalog is not an authorization grant or retention lease, and is not exposed by a new HTTP endpoint.
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 -p ceres --lib snapshot --locked -j 1 -- --include-ignored --nocapturewith the explicit disposable PostgreSQL URL — 37 tests passed, including shared namespace manifests, real PostgreSQL and the million-binding fixture.cargo test -p jupiter --lib snapshot_storage --locked -j 2— 6 tests passed.cargo test -p jupiter --lib namespace_storage --locked -j 2— 3 tests passed.cargo test -p jupiter --lib publication_storage --locked -j 1 -- --include-ignored --nocapture— 6 tests passed across SQLite and PostgreSQL, using the real import_refs and publication tables. Includes duplicate-key races, expected-old competition, rollback after head CAS, dropped transactions, no-op fencing by an independent connection and reconnect receipt lookup. The storage fixture uses opaque view bytes; it does not prove full native/import composition.cargo test -p jupiter-migrate --lib snapshot --locked -j 2 -- --include-ignored --nocapture— 2 tests passed: SQLite up/down/up preserves legacy data; PostgreSQL UTC forward/down/up preserves known UTC values under a non-UTC session.cargo +nightly fmt --all --check— passed.cargo clippy -p ceres -p jupiter -p jupiter-migrate --lib --locked -j 2 -- -D warnings— passed.clippy::items_after_test_modulelint allowed; the unmodifiedmono_storage.rstriggers that lint under Rust 1.95. The strict test-code command without that allowance is not green.PostgreSQL 16.15 validation covers source/node persistence and publication storage concurrency, not the full application publisher. The million-binding fixture measured 7 node reads and 7 writes (2235 bytes each) per single update, 44 reads for page 32 and 7 for one prefix; these are logical index calls, not SQL counts or full service performance. See
docs/spec/namespace-index-v1.mdanddocs/spec/namespace-publication-core.mdfor methodology and evidence limits. At706051f8, the focused PostgreSQL/index job, fmt and Clippy passed; other CI was still pending when checked. CI for the latest publication-core commit must be reviewed separately. Real HTTP/FUSE integration, process/host crash recovery, retention and production writer gates remain unvalidated.Remaining full-delivery gates
Related: gitmono-dev/scorpiofs#55 and gitmono-dev/scorpiofs#42. These issues remain open; foundations do not close them.
Companion ScorpioFS draft: gitmono-dev/scorpiofs#56.
Existing original worktrees were preserved. No deployment, destructive data backfill or feature enablement is included.