Skip to content

v0.1.6: implement Snapshot-Isolated Workspace with non-pausing Commit #124

Description

@yifanxuaaa

Objective

Implement v0.1.6 Snapshot-Isolated Workspace: one current mutable overlay with shared host backing, an owned temporary snapshot per Commit attempt, and independent canonical construction -> workspace_stages -> conditional branch publication. Reads, writes, namespace changes, SDK operations, running commands, mount identity and open handles must remain valid while Commit runs.

This is product implementation work, broader than the pending-metadata capacity objective in #123. Coordinate with #123 without silently replacing or closing it. Benchmark issue #125 owns the implementation plan's final full-suite execution/reporting phase. #122's benchmark campaign is explicitly outside this work.

Source of truth

The owner-discussed documents are under docs/roadmap/0.1/0.1.6/:

  • overlay-snapshot-rule.md
  • overlay-snapshot-architecture-design.md
  • overlay-snapshot-spec.md
  • overlay-snapshot-spec-review.md
  • overlay-snapshot-implementation-plan.md
  • benchmark-exclusions-issue122.json

At issue creation these are local uncommitted drafts in the main working checkout. They are not published immutable source, implemented behavior, or benchmark results. Freeze/commit/push the authoritative documents at the start of implementation and attach immutable links here. This issue body is self-contained scope until those links exist.

Required resulting behavior

  • Commit does not freeze/quiesce the Workspace for construction/publication, require writers/commands to finish, remount, or install an older captured state back into live inodes.
  • Ordinary mutations atomically update current state and change tracking. There is no per-file checkpoint, operation-history log, or automatic intermediate branch Commit.
  • Snapshot acquisition is bounded root/ownership acquisition; no changed-map clone, full dirty-fact export, complete cache drain, or delayed whole-overlay clone on the first later write.
  • Preserve one consistent captured view of namespace, attributes and content, including the actual supported FUSE cache/mapping contract. Do not pretend a host root alone captures kernel-visible bytes.
  • One unresolved Commit attempt per Workspace; no global construction serialization across independent Workspaces. Existing branch leases and expected-head/base publication checks remain.
  • C1 excludes a change x installed after its snapshot; C2 includes x if still effective at its own snapshot. Publication advances only exact covered/comparison context and leaves live contents untouched.
  • Keep the existing shared Init/Commit content/output/admission machinery, CAS/authentication, FULL/DELTA policies, large-file CDC/extents, packing/compression, sorted namespace updates and staged publication.
  • Make indexes/caches/ownership/cursors/queues/FDs and transient allocation bounded. Reclaim superseded state by ownership; preserve held readers and open-unlinked lifetime.

Resolve known specification blockers honestly

V1 kernel visibility, V2 page/catalog/ownership/backend and retry-fairness details, V3 bounded predecessor correspondence, and V4 exact uncertain Created/UpToDate resolution must be made concrete and proved. If a compliant kernel mechanism cannot be established, record the precise blocker; do not silently disable mmap, require implicit user fsync, weaken visibility, or restore a global freeze. V5 is later evaluation using existing benchmarks, not a new numerical performance gate.

Removal / addition boundaries

Add/adapt: host snapshot-capable backing/root bundle, bounded snapshot reader/cursors, independent attempt context, atomic dual change indexes, metadata-only canonical/range correspondence, bounded replay and reclamation.

Remove from ordinary Commit: pause/quiesce/resume and writer-finish dependency, long live/fact locks, mandatory checkpoint reinstallation, global dirty/generation reset, pending-stage/publication-as-inactive, and retries rebuilt from newer current state.

Replace: full dirty-prefix export/mirrored maps as Commit input, unbounded piece/map/path access, whole-extent-only retention and unbounded segment-descriptor growth where the new model requires it.

Preserve/audit: shared canonical engine, workspace_stages, conditional publication and all independent fsync/cache/SDK/reconciliation/End/Discard consumers. Do not delete shared helpers solely because Commit stops using them.

Plan and acceptance

  • Resolve and freeze the actual implementation contracts and attach source links. Governing documents and V2/V3/V4 decisions are published; V1 remains OPEN. The predecessor's Phase1-complete/universal-incompatibility/owner-wait classification is superseded by the retrieval correction: checked generic FUSE retrieval retains mutable pages. No semantic relaxation is approved; dependency-ready implementation continues.
  • Implement host overlay ownership and atomic current state with source-root lease/revalidation; unrelated writers cannot lose updates.
  • Integrate FUSE/SDK operation semantics and owned snapshot access without global Commit exclusion.
  • Integrate independent attempts, unchanged shared construction, exact staging/publication and safe C1/C2 correspondence.
  • Remove obsolete ordinary-Commit coupling and finish failure-safe cleanup/explicit lifecycle handling.
  • Pass applicable existing correctness/integration checks plus focused missing coverage: root races, replay, tombstones, zero-range alignment, unequal edits, kernel visibility, retained readers, open-unlinked files, conflicts/uncertainty and cleanup.
  • Complete v0.1.6: spill pending Workspace metadata to disk for bounded-memory large change sets #123's explicit million-changed-regular-file correctness/capacity proof in one Workspace before one final Commit, with declared RAM/disk/work/deadline and fresh reopen; no arithmetic-only or incremental-Commit substitute.
  • Seal a correct candidate and hand it to the benchmark issue v0.1.6: run full existing benchmarks excluding #122 and report actual numbers #125 for the plan's last phase: full existing benchmark suite excluding v0.1.6: implement and qualify mixed-development benchmark families, 10/100-commit histories and concurrent workspaces #122.
  • Link final benchmark evidence and track any discovered product defects; do not claim implementation correct with unresolved correctness failures.

Performance policy and exclusions

Implement correctly first, then run the existing sophisticated benchmark suite and inspect/report real numbers. No new capture-latency, throughput, or sampling gates. Existing benchmark contracts remain unchanged.

The final benchmark campaign excludes all 36 #122-owned cases in cases.json (33 regular + 3 extended), in every mode and case-specific preparation. Exclude exact cases, not entire shared families: inherited cases in dedup_branch_history, mixed_load_bearing, and historical_access remain eligible. Reconcile renamed/versioned successors with #122 before freezing the suite manifest.

No implementation or benchmark was executed merely by opening this issue. No release/tag/website publication or completion of #122 is requested.

Benchmark execution/reporting: #125. Handoff requires a correct sealed candidate, not closure of this issue; final campaign evidence is linked back here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions