Parent research epic: #39
Related: #42 (snapshot read adapter), #43 (CAS identity), #44 (refresh), #51 (shared lower), #53 (Libra/Orion).
Problem
The current SnapshotId draft assumes one repository/commit/tree can describe a mounted monorepo subtree. Mega's namespace can cross native scopes, import repositories, and intermediate directories. Fixed blob OIDs alone do not freeze path ownership or import revisions.
This issue tracks the missing namespace contract. It precedes the composite-view portion of #42; single-source fake-backend work in #42 and M0 work can proceed in parallel.
Verified baseline (2026-09-06)
Mega: c4c79bc195541a13ac1505b94728c81a8ff3d603; ScorpioFS: 6a2e7f2ddb7d913b497167f76ff6539bfbb983c2. These are upstream source checks, not a claim about the running deployment.
- Native refs have
(path, ref_name) scope. A child-scope commit tree is not rooted at monorepo /: mega_refs, parent tree/ref updates.
- REST routing uses the configured import directory and registered repository boundaries: api_handler.
- Native tree reads already accept commit/tag selectors, but import
get_root_tree ignores refs and reads the default ref: native, import.
- Import attach constructs placeholder path trees rather than embedding the complete import content into the native root: receive-pack handler.
/file/tree?path=...&oid=... checks a current path tree against an optional OID; it is not historical tree lookup: tree_ops.
Proposed contract (draft, policy decisions pending)
SourceSnapshot: instance/source/repo identity, commit OID, tree OID, object format, explicit scope_path.
NamespaceView: native snapshot + immutable path-to-source bindings index + explicit candidate overrides + materialization policy.
view_id: immutable descriptor identity; projection_key: content/routing identity for sharing; workspace generation, delta_seq, and server publication_seq have separate semantics.
- Ordinary native directories derive from one selected native root. Independent native scope commits are explicit scoped selections, not silently mixed global revisions.
- Import directories resolve a selected commit/tree once. Intermediate directory listings and repository boundaries are frozen by the view.
- Versioned import paths still pin content OIDs. Names such as
1.3.0 do not prove content immutability.
- CL views record base namespace view, scope, base/head commit and delta digest. A moved CL creates a new candidate identity.
- Scale the bindings index incrementally; no full registry enumeration on each mount.
Work
Mega-side implementation is a cross-repository dependency to scope separately. This issue does not claim those changes have been implemented or approved for deployment.
Acceptance
Decisions requiring owner confirmation
- Recommend Mega-published composite views; alternative is source-only first, with full-namespace consistency deferred.
- Recommend immutable published version-number paths; alternative permits replacement with retained historical objects.
- Recommend existing tasks stay pinned and existing mounts update at controlled pause/restart boundaries; transparent live refresh needs a separate handle/mmap/cwd protocol.
Draft specs have been prepared locally on codex/system-paper-spec: docs/spec/monorepo-versioning.md and docs/spec/system-paper-spec.md. They are not yet published on the default branch. The questions above remain pending; recommendations are not recorded as accepted decisions.
Parent research epic: #39
Related: #42 (snapshot read adapter), #43 (CAS identity), #44 (refresh), #51 (shared lower), #53 (Libra/Orion).
Problem
The current SnapshotId draft assumes one repository/commit/tree can describe a mounted monorepo subtree. Mega's namespace can cross native scopes, import repositories, and intermediate directories. Fixed blob OIDs alone do not freeze path ownership or import revisions.
This issue tracks the missing namespace contract. It precedes the composite-view portion of #42; single-source fake-backend work in #42 and M0 work can proceed in parallel.
Verified baseline (2026-09-06)
Mega:
c4c79bc195541a13ac1505b94728c81a8ff3d603; ScorpioFS:6a2e7f2ddb7d913b497167f76ff6539bfbb983c2. These are upstream source checks, not a claim about the running deployment.(path, ref_name)scope. A child-scope commit tree is not rooted at monorepo/: mega_refs, parent tree/ref updates.get_root_treeignores refs and reads the default ref: native, import./file/tree?path=...&oid=...checks a current path tree against an optional OID; it is not historical tree lookup: tree_ops.Proposed contract (draft, policy decisions pending)
SourceSnapshot: instance/source/repo identity, commit OID, tree OID, object format, explicitscope_path.NamespaceView: native snapshot + immutable path-to-source bindings index + explicit candidate overrides + materialization policy.view_id: immutable descriptor identity;projection_key: content/routing identity for sharing; workspacegeneration,delta_seq, and serverpublication_seqhave separate semantics.1.3.0do not prove content immutability.Work
source-snapshot.v1, replayableview-lock.v1, and atomically publishednamespace-snapshot.v1.Mega-side implementation is a cross-repository dependency to scope separately. This issue does not claim those changes have been implemented or approved for deployment.
Acceptance
HISTORICAL_BINDINGS_UNAVAILABLE.Decisions requiring owner confirmation
Draft specs have been prepared locally on
codex/system-paper-spec:docs/spec/monorepo-versioning.mdanddocs/spec/system-paper-spec.md. They are not yet published on the default branch. The questions above remain pending; recommendations are not recorded as accepted decisions.