Skip to content

Latest commit

 

History

History
685 lines (581 loc) · 36 KB

File metadata and controls

685 lines (581 loc) · 36 KB

Ephemeral AI FS implementation plan

Field Value
Status M7 complete; overall plan in progress
Target Version 0.1 integration candidate
Delivery style Milestone exits with objective acceptance evidence
Database foundation SQLite remains authoritative

Use the ready-to-paste implementation prompt to start an execution task that follows this plan.

1. Execution rules

Milestones are ordered by dependency. Work inside one milestone may proceed in parallel, but the next milestone does not become the integration baseline until the current milestone's acceptance criteria pass.

Each milestone exit records:

  • the exact commit;
  • completed checklist items;
  • commands and environments used;
  • machine-readable correctness and benchmark results;
  • known deviations with an owner and follow-up milestone; and
  • confirmation that the working tree and generated package artifacts are reproducible from a clean checkout.

Correctness, durability, integrity, and resource ceilings are hard gates. Latency cannot waive them. Tests are finite and iteration-based:

  • the mandatory smoke profile is capped at 60 seconds per target;
  • the default correctness and benchmark selection should finish within 10 minutes per target;
  • an optional load-10m profile is hard-capped at 10 minutes; and
  • 10 GiB logical manifests and millions-of-rows jobs are extended, non-gating diagnostics.

Execution environments and external authority

The normative Durable Object runtime terms are defined in filesystem-api.md. M6 uses the credential-free faithful local Workers runtime for its complete conformance and 60-second smoke gates. M6 creates a deployable preview fixture but MUST NOT deploy it. M9 is the first milestone whose gate requires that reviewed fixture to run in a hosted Cloudflare preview.

The other external gates are equally explicit:

  • M7 requires a privileged Linux runner with a real mounted FUSE filesystem. A shim, mocked binding, or bridge-only test does not satisfy the real-FUSE acceptance items.
  • M8 may use the faithful local Durable Object runtime for its Node-to-Durable-Object correctness matrix; hosted replication evidence is deferred to M9/M10.
  • M9 requires the hosted Cloudflare preview, the real-FUSE reference runner, the isolated DOFS comparison, and publication of the selected release-candidate package set.
  • M10 requires the actual Computer integration target and the exact published package versions selected by M9.

Git pushes, hosted deployments, registry publication, changes outside the authorized workspace, and mutations of a Computer integration repository are external actions. They MUST NOT be inferred from a request to implement or validate a milestone. Each requires explicit user authorization at the point of execution. If a mandatory external gate lacks its environment, access, or authorization, the milestone remains incomplete and is reported as blocked; local evidence MUST NOT be relabeled as the missing external evidence.

2. Dependency map

M0 repository and test foundation
  -> M1 CAS, CDC, COW, patches, and manifests
      -> M2 SQLite storage and Node driver
          -> M3 filesystem namespace and I/O
              -> M4 branches and publication
                  -> M5 maintenance and recovery
                      -> M6 Cloudflare SQLite parity
                          -> M7 Node VFS
                          -> M8 replication
                              -> M9 release candidate
                                  -> M10 Computer integration

Milestones 7 and 8 may proceed in parallel after milestones 0 through 6 pass.

3. Milestone 0: Repository and test foundation

M0 objective

Create a buildable monorepo whose package and dependency boundaries prevent later implementations from bypassing the architecture.

M0 checklist

  • Create the package workspace and lockfile.
  • Add packages/fs as @ephemeralai/fs.
  • Add packages/sqlite-node as @ephemeralai/fs-sqlite-node.
  • Add packages/sqlite-cloudflare as @ephemeralai/fs-sqlite-cloudflare.
  • Add packages/node-vfs as @ephemeralai/fs-node-vfs.
  • Add packages/replication as @ephemeralai/fs-replication.
  • Add packages/testkit as @ephemeralai/fs-testkit.
  • Add shared TypeScript, lint, formatting, build, and test configuration.
  • Add clean-package and packed-tarball test fixtures.
  • Add architecture checks for cycles and forbidden imports.
  • Add API extraction or an equivalent export-snapshot check.
  • Configure the @ephemeralai/fs export map with only the root, sqlite-driver, and two integration bridge subpaths.
  • Add deterministic fixture generation with recorded seeds and SHA-256 digests.
  • Add Node and Durable Object testkit factory contracts.
  • Add fault-controller, restart, read-only, and second-connection hooks.
  • Add machine-readable correctness and benchmark result schemas.
  • Add CI jobs for documentation, architecture, unit, package, and testkit harness checks.

M0 acceptance criteria

  • A clean install builds every empty package without unpublished local state.
  • The dependency graph has zero cycles and matches the allowed direction.
  • Packed consumers can import only documented export paths.
  • Deep imports of CAS, CDC, COW, manifests, repositories, schema, and transactions fail.
  • The testkit can create, label, seed, and dispose a driver fixture through a recording implementation.
  • Fixture generation is byte-identical across two clean runs.
  • Documentation lint, link validation, build, and architecture checks pass.

4. Milestone 1: Content algorithms and binary formats

M1 objective

Implement the pure, host-independent CAS, CDC, COW, patch, and segmented manifest algorithms before adding persistence.

M1 checklist

  • Implement checked integer and byte-view utilities.
  • Implement branded CAS object and manifest identifiers.
  • Implement incremental SHA-256 hashing and object verification.
  • Implement the exact fastcdc-v1 Gear table and boundary algorithm.
  • Implement resumable streaming FastCDC state.
  • Implement COW page-size, page-key, dirty-range, and page-overlay math.
  • Implement ordered insertion, deletion, replacement, and truncation patches.
  • Implement the manifest root-envelope codec.
  • Implement leaf and internal manifest-node codecs.
  • Implement deterministic content-defined manifest grouping.
  • Implement bounded root-to-leaf lookup and sequential manifest cursors.
  • Implement canonical manifest building from a CAS-entry stream.
  • Implement fixed-capacity pure diagnostic FastCDC/manifest reconnection with a bounded streamed full-scan fallback when any diagnostic cap is reached.
  • Add golden vectors for CAS, FastCDC, root envelopes, leaves, internal nodes, grouping, and complete manifest roots.
  • Add property tests for byte coverage, determinism, overflow, malformed encodings, and full-rebuild equivalence.

M1 acceptance criteria

  • All golden vectors match on supported Node and workerd runtimes.
  • FastCDC results are independent of input buffer partitioning.
  • Identical bytes and parameters produce identical manifest roots.
  • Start, middle, end, and EOF lookup scan no more than one leaf after traversing the bounded tree path.
  • Corrupt root, node, span, count, or child data is rejected before affected bytes are returned.
  • Within the explicit pure diagnostic caps, local insertion, deletion, truncation, and overwrite produce exactly the full-rebuild manifest root.
  • Above those caps, the pure operation takes the bounded streamed fallback and reports the local-attempt plus fallback work; M1 makes no large-file local-edit performance claim.
  • Within the diagnostic fixtures, unchanged CAS objects and manifest subtrees are reused after deterministic reconnection.
  • COW and patch cases pass at 4, 8, and 16 KiB page sizes.
  • Pure algorithms import no SQLite, branch, host, RPC, or FUSE module.

5. Milestone 2: Transactional SQLite storage and Node driver

M2 objective

Persist the content engine, revisions, staging, quotas, and schema through one transaction-only SQLite contract and a production-capable Node driver.

M2 checklist

  • Implement FilesystemSQLiteDriver and callback-scoped transaction values.
  • Invalidate transaction values immediately after callback completion.
  • Implement the private SQLite unit of work.
  • Implement bounded statement, binding, BLOB, and result handling.
  • Implement schema identity, version metadata, migrations, and fixtures.
  • Implement CAS object, manifest-root, and manifest-node relations.
  • Implement an authenticated durable manifest cursor/path port whose root-to-leaf membership is verified against the selected root. Offset/group side indexes are non-authoritative and corruption or staleness may cause only rejection or a safe fallback, never redirect a splice.
  • Implement durable local manifest path-copy with explicit per-level and aggregate record-read, emitted-node, retained-segment, byte, and transaction caps. Test full-scan equivalence, empty/single-leaf height growth, stale/corrupt indexes, and a tiny edit in a manifest with more than 16,384 entries.
  • Route readManifestRange and readManifestInto through the authenticated sequential cursor (or an equivalent single validated traversal). Before exposing bytes, enforce supported materialization parameters, root totals, child span/count declarations, canonical grouping, and depth; remove the provisional double-decode path and add recomputed-digest corruption regressions.
  • Re-audit every provisional storage streaming/chunking caller, including streaming-prepare, against the M1 draining-consumer contract. No storage path may use collecting push() as an uncharged output buffer; admission and cancellation tests must cover prebuffered output and pending-entry metadata.
  • Implement namespace-head and immutable revision relations.
  • Implement lease, staged-membership, and closure-certificate relations.
  • Implement immutable COW page versions and mutable page heads.
  • Implement structural-patch and insertion-segment relations.
  • Enforce the canonical structural-patch sequence as contiguous integers beginning at zero in repository/schema transactions, with gap, duplicate, rollback, and reopen tests.
  • Implement exact efs_usage count and byte deltas.
  • Implement root-change journal and maintenance reserve accounting.
  • Own-test only the storage-safety maintenance prerequisites needed by M2: tombstone cleanup, root-generation checks before sweep deletion, bounded mark/run cleanup, and accounting recovery. Public maintenance orchestration and performance remain M5 acceptance work.
  • Implement bounded repositories requiring an active transaction.
  • Implement batched CAS insertion and collision verification.
  • Implement staged closure sealing and constant-row final validation.
  • Implement the file-backed Node SQLite driver.
  • Configure foreign keys, acknowledged durability, busy timeout, WAL, checkpointing, 16 MiB cache target, and zero-byte mmap default.
  • Enforce the main-database page ceiling and report observable soft WAL checkpoint/backpressure behavior without claiming a hard journal ceiling.
  • Add initialization, reopen, read-only, second-connection, migration, corruption, and statement-fault tests.

M2 acceptance criteria

  • The driver exposes no connection-level SQL execution.
  • A transaction value used after its callback fails before issuing SQL.
  • Failure after every statement leaves the complete old or complete new state after reopen.
  • Schema creation and every migration are deterministic and restart-safe.
  • CAS deduplication retains one verified payload and detects corruption.
  • Manifest roots and nodes round-trip and traverse in bounded batches.
  • A staged file with more than 100,000 CAS entries finalizes from one sealed certificate without rescanning every membership row.
  • Concurrent quota races cannot exceed hard payload, metadata, or main-database ceilings; WAL overshoot remains observable and a pinned soft target backpressures the next writer.
  • efs_usage matches bounded direct recalculation after commit, rollback, replacement, expiry, and collection setup.
  • The Node driver passes the milestone's shared storage suite.

6. Milestone 3: Filesystem namespace, revisions, and I/O

M3 objective

Deliver the public filesystem facade with complete namespace semantics, revision commits, bounded range I/O, and snapshot streams on Node SQLite.

M3 checklist

  • Implement absolute POSIX path parsing and UTF-8 validation.
  • Implement inode and directory-entry resolution.
  • Implement readFile, readRange, and readStream.
  • Implement writeFile, writeRange, replaceRange, and truncate.
  • Route public range edits through persisted COW and the authenticated durable local manifest path-copy; a small edit MUST NOT read or rebuild the complete file, and a capped path-copy MUST fall back safely without trusting a derived side index.
  • Implement mkdir, readdir, stat, lstat, and chmod.
  • Implement symbolic links, hard links, link counts, and final-link rules.
  • Implement atomic rename, unlink, and recursive removal.
  • Implement timestamps using one nondecreasing clock sample per mutation.
  • Implement immutable revision deltas, checkpoints, and head projection.
  • Implement snapshot leases and bounded stream backpressure.
  • Select and pin the immutable root before any multi-transaction readFile or readRange materialization; a concurrent writer and collector MUST NOT reclaim the selected closure between windows.
  • Implement shared resident-memory admission and byte-weighted caches.
  • Implement stable error codes, precedence, lifecycle, and idempotent close.
  • Implement capabilities, limits, observations, and operation counters.
  • Add filesystem conformance and fault-injection suites.

M3 acceptance criteria

  • All portable namespace and I/O conformance cases pass on Node SQLite.
  • Links, rename, timestamps, revision history, and UTF-8 ordering survive reopen.
  • Every mutation is atomic under statement-level fault injection.
  • Reads return exact selected bytes and create no durable content state except a required bounded lease.
  • A cold range lookup does not enumerate the complete manifest.
  • A one-byte edit in files with both fewer and more than 16,384 manifest entries reads authenticated work bounded by manifest depth plus affected groups, or takes an explicitly reported safe fallback; stale/corrupt derived indexes cannot change the result.
  • Increasing a streamed fixture from 100 MiB to 1 GiB adds no more than one output chunk, one maximum CAS object, and one manifest node to managed memory high-water.
  • Cancellation, failure, and close release every lease and reservation.
  • The 60-second Node SQLite smoke profile passes.

7. Milestone 4: Branches and publication

M4 objective

Deliver durable private branches, deterministic conflicts, atomic publication, and exact replay without copying whole workspaces.

M4 status

Complete. All M4 checklist items and acceptance criteria below are verified. The final M4 suite passes 58/58 tests, including the 50-writer publication cases, fault-injected preparation and finalization, replay after physical reopen, stream and lease stability, COW cleanup, retention, and bounded publication preflight. The smaller branch benchmark passes 20/20 cells; see the repository README for the measured preparation and publication results.

M4 checklist

  • Implement branch creation, open, info, discard, and handle close.
  • Implement branch namespace overlays and durable base expectations.
  • Implement immutable page versions with atomic page-head replacement.
  • Implement ordered structural patches and branch materialization.
  • Implement branch generation and write-set tracking.
  • Implement entry, inode, subtree, and ancestor conflict tokens.
  • Implement hard-link alias and parent-timestamp conflict behavior.
  • Implement deterministic exact changed paths and conflict records.
  • Implement operation-ID reservation and branch-generation binding.
  • Implement publication preparation and sealed staging.
  • Implement the constant-bounded final publication transaction.
  • Implement merged, conflict, replay, expired-result, and mismatch outcomes.
  • Implement terminal metadata and result retention.
  • Add branch lifecycle, conflict, replay, restart, and fault suites.

M4 acceptance criteria

  • Fifty independent writers publish into one valid parent chain.
  • Fifty same-inode writers produce one merge and 49 explicit conflicts.
  • A conflict changes neither main nor the active branch overlay.
  • Lost-response replay returns the original result after physical restart.
  • One operation ID can never publish another branch or generation.
  • Independent sibling publications succeed in either order with exact parent timestamps.
  • Hard-link aliases preserve inode identity and conflict as one node.
  • A branch stream retains its original bytes across later edit, materialization, publication or discard, collection, and restart.
  • Repeated same-page writes retain one current page plus only explicitly leased predecessor versions.

8. Milestone 5: Maintenance, recovery, and bounded scale

M5 objective

Make long-lived databases self-verifying and reclaimable without unbounded transactions, memory, WAL retention, or process-local indexes.

M5 status

Complete. All mandatory M5 checklist items and acceptance criteria below are verified. The default pnpm validate:m5:pre-evidence Node selection builds once, measures its benchmarks and 60-second smoke without competing I/O, and then runs isolated correctness groups concurrently without repeating predecessor maintenance tests; it enforces the ten-minute per-target ceiling directly. The final M5 suite passes 34/34 tests. Its physical-reopen fault matrix independently tests all 328 observed durable statement positions and all 150 committed batch positions, including root mutations between interruption and reopen. The mandatory scale fixture contains 100,001 namespace rows, 100,001 reachable objects, 100,002 manifest roots, and 100,001 manifest nodes, plus 300,003 durable snapshot and collection marks. It completes full verification, snapshotting, collection, exact usage recount, concurrent writing, WAL checkpointing, and physical reopen. Identical workloads at 10,240 and 100,000 fixture rows measured 9,274,632 and 9,315,643 bytes of managed-memory high-water, respectively, proving a 41,011-byte non-proportional difference under the 16 MiB asserted ceiling. Exact run-specific process peaks, WAL high-water, and maximum bounded-call duration are retained in the candidate's machine-readable exit evidence; the executable gates require absolute heap below 512 MiB, RSS below 768 MiB, WAL at or below the explicit 512 MiB limit, and every maintenance call below 5 seconds. The optional 10 GiB and millions-of-rows diagnostics remain intentionally deferred.

M5 checklist

  • Implement bounded storage snapshots with high-water capture and reconciliation.
  • Implement bounded integrity verification with resumable cursors.
  • Implement root enumeration for main, revisions, branches, results, leases, staging, checkpoints, and holds.
  • Implement durable manifest-tree and CAS mark traversal.
  • Implement root-change reconciliation without restarting completed work.
  • Implement bounded sweep, overlay pruning, and revision pruning.
  • Implement interrupted-run resume and abandoned-run cleanup.
  • Implement lease renewal, expiry, release, and cleanup races.
  • Implement root-journal compaction and emergency maintenance reserve.
  • Implement metadata, database-page, and WAL-pressure behavior.
  • Add 100,000-row object, namespace, manifest-root, manifest-node, durable-mark, cursor, accounting, verification, and collection cases under 256-row / 256 KiB query envelopes and a 4 MiB cache.
  • Add optional 10 GiB logical-manifest and millions-of-rows diagnostics.

M5 acceptance criteria

  • Collection never deletes any value reachable from a required root.
  • Reachable corruption stops the sweep and reports integrity failure.
  • Mark and sweep resume after every injected interruption.
  • Root additions reconcile without discarding completed mark work.
  • Bounded storage accounting holds no database-wide read transaction.
  • Managed memory does not grow with the mandatory 100,000-row fixture.
  • Metadata-only and blocked-checkpoint workloads enforce finite ceilings.
  • Quota failure leaves usage counters exact and maintenance able to progress.
  • All maintenance operations expose bounded progress and stable metrics.

9. Milestone 6: Cloudflare Durable Object SQLite parity

M6 objective

Run the same filesystem engine and portable conformance outcomes on Durable Object SQLite without importing DOFS or reimplementing filesystem logic.

M6 checklist

  • Implement the Cloudflare SQLite driver over Durable Object SQLite.
  • Map callback-scoped transactions to the runtime transaction facility.
  • Normalize rows, BLOBs, safe integers, constraints, busy errors, and corruption errors.
  • Report conservative BLOB, binding, physical quota, journal, durability, and runtime-memory capabilities.
  • Implement runtime restart and eviction test hooks.
  • Add the deployable preview fixture and exercise its exact Worker bundle, compatibility date, bindings, and SQLite migration in the faithful local Workers runtime without deploying it.
  • Run storage, filesystem, branch, maintenance, recovery, and resource suites through the shared testkit in the faithful local Workers runtime.
  • Add the credential-free, faithful-local 60-second Durable Object SQLite smoke profile.

M6 acceptance criteria

  • Every mandatory portable test from milestones 1 through 5 passes on both Node and Durable Object SQLite.
  • Adapter-specific setup does not change public results or error codes.
  • Runtime restart reconstructs all state from committed SQLite data.
  • The driver never uses an in-memory SQLite mirror or filesystem index.
  • The driver reports finite conservative resource capabilities.
  • The faithful-local 60-second Durable Object smoke profile passes without a Cloudflare account, credentials, network deployment, or remote resource.
  • pnpm test:m6 and pnpm validate:m6 are fully local and create no external state.

10. Milestone 7: Node VFS and real FUSE readiness

M7 objective

Provide the synchronous Node filesystem surface needed by Computer while keeping FUSE and process ownership outside Ephemeral AI FS.

M7 checklist

  • Implement the supported Node VFS integration bridge in the core.
  • Implement pinned read sessions and bounded manifest cursors.
  • Implement readIntoSync without an equal-sized intermediate allocation.
  • Implement writable file sessions and read-after-write visibility.
  • Implement provider-wide per-inode monotonic write admission.
  • Implement bounded pooled slab ownership and transfer.
  • Implement stagePrefixSync for hidden durable staging.
  • Implement commitVisibleSync for flush and fsync durability.
  • Implement provider sync, close, retry, abort, and error translation.
  • Implement shared backpressure across 1, 16, and 64 sessions.
  • Add real-FUSE test fixtures without adding FUSE to the core package.
  • Add the 60-second smoke profile on a privileged Linux runner with a real mounted FUSE filesystem.

M7 acceptance criteria

  • Repeated reads on one handle reuse a pinned selection and return exact bytes.
  • Three sessions on one inode pass every commit order without lost updates.
  • Hidden staging never satisfies fsync or advances visible state.
  • Successful commit, close, restart, unmount, and remount preserve digest.
  • Large reads and writes allocate no whole-file buffer.
  • Sixty-four sessions remain inside pending-write and aggregate memory limits with backpressure.
  • The real-mounted-FUSE smoke profile completes within 60 seconds; a shim or mocked binding does not count.
  • Computer needs only handle forwarding and no filesystem semantics.

The implementation, shared conformance/fault suite, resource gates, and test-only real FUSE host are complete. The candidate-bound profile completed in 24,815 ms with all 9,056 operations, exact digests, three restarts, resumed collection, and zero active durable state. M7 is accepted and validate:accepted selects it.

11. Milestone 8: Replication

M8 objective

Replicate revisions, active private branches, manifests, CAS objects, and authority-owned results through a bounded host-neutral protocol without exposing tables or raw content mutation. Deliver the shared-runtime, branch-mounted, resumable contract required by the pinned Ephemeral AI Computer fork; production cutover remains M10.

M8 checklist

  • Freeze the canonical version 1 wire format, golden vectors, discriminated global-flow plan, semantic error envelopes, result shape, operation ID, and opaque resume-key contract.
  • Implement the schema-free replication integration bridge in the core.
  • Add one public runtime owner that derives the portable filesystem, replication endpoint, and branch-scoped Node VFS from one cache, mutation coordinator, and aggregate admission controller.
  • Implement an authenticated empty-only replica bootstrap that atomically adopts the authority's exact filesystem and genesis identity, resumes only the recognized durable unbound state, rejects unrelated nonempty or mismatched databases without writes, and survives restart after every accepted batch.
  • Implement protocol capabilities, the normative role/flow matrix, and explicit logical filesystem-schema, storage-user-version, protocol, and format compatibility.
  • Bind authenticated principal, host scope, filesystem, role, global flow, branch, policy version, and limits before durable session creation.
  • Implement durable operation, cursor, nonce, receipt, retry-budget, terminal-result, and resume-key state. Hosts schedule returned wake-ups but do not own protocol retry accounting.
  • Enable Node VFS mounts of one exact active private branch, make execution-replica main read-only, and fail missing or terminal branch reconnect without main fallback.
  • Implement bounded manifest-root, manifest-node, and CAS negotiation.
  • Implement incremental envelopes with no complete duplicate buffer.
  • Implement checkpoint bootstrap, authoritative-main-to-replica catch-up, and every allowed exact branch flow in the normative role matrix.
  • Return the imported branch generation and digest and add generation-guarded, operation-ID publication so an intervening mutation cannot be published.
  • Enforce authority-only terminal branch state and publication-result origination.
  • Implement durable export and staging leases.
  • Implement staging-certificate updates and constant-row final activation.
  • Specify and implement live activation for namespace caches, new opens, pinned read snapshots, and dirty writers without silent rebase or lost updates.
  • Implement dropped-response replay and retry exhaustion.
  • Implement bounded abandoned-session cleanup.
  • Add Node-to-Node, Node-to-Durable-Object, and restart suites.
  • Add the Computer carrier profile: authentication before exchange, outer raw and decompressed frame limits before JSON/base64 decode, decoded-envelope limits, canonical semantic errors, one mutating exchange in flight, disconnect cleanup, and combined transport-plus-filesystem memory accounting.
  • Run the pinned Computer fork end to end through its actual Cap'n Web carrier and a real FUSE mount: provision, main transfer, exact branch mount, shell and Git mutation, restart/remount, branch return, guarded publication, replay, and cleanup.
  • Bind the Computer compatibility evidence to exact clean Ephemeral AI FS and Ephemeral AI Computer commits, commands, logs, artifact hashes, carrier settings, and runtime environment.
  • Replicate the unchanged accepted 100,000-row CT-SCALE-1 fixture Node-to-Node and Node-to-Durable-Object under its tiny query and memory limits before collection.

M8 acceptance criteria

  • A one-byte edit transfers only its root envelope, changed manifest nodes, missing CAS objects, revision metadata, and protocol overhead.
  • Already-present content adds no duplicate CAS payload.
  • Dropping a response in every phase resumes without duplicate activation.
  • Peak buffers remain within the negotiated and shared runtime limits.
  • The receiver never retains the complete missing-object or manifest graph.
  • Retry exhaustion releases or expires all leases and reservations.
  • The bridge exposes no SQL, schema, repository, standalone CAS insertion, or standalone COW mutation.
  • A fresh authenticated replica adopts the exact authority genesis; recognized durable unbound state resumes, while unrelated nonempty, wrong-workspace, wrong-engine, and unsupported-version targets fail before writes.
  • Replica main is read-only, an active branch mounts through Node VFS and real FUSE, base-main content is visible, branch-private mutations remain invisible to main and siblings, sibling-private mutations remain invisible to the mounted branch, and missing or terminal branches never fall back to main.
  • Replication and Node VFS share one runtime budget; live activation preserves pinned snapshots and rejects or serializes dirty-writer conflicts without lost updates.
  • Imported generation and digest expectations prevent publication of a later branch generation, lost responses replay one activation and one publication, and the authority's terminal state returns to the replica before reconnect.
  • The actual Computer Cap'n Web carrier enforces pre-decode and decoded limits, preserves stable errors, releases RPC stubs, and stays within the single configured process-memory budget.
  • The complete Computer profile verifies the source and final authoritative digests through real mounted FUSE and reports carrier, managed-memory, RSS, SQLite, WAL, lease, reservation, and retry metrics.
  • Evidence verification rejects drift in either recorded candidate tree and validates every stored command, exit code, log hash, workload count, identity, digest, restart, resource, and cleanup assertion.
  • Deleting the local replica and provisioning a replacement from empty restores exact main and active-branch identity and digest without a duplicate authority activation.

12. Milestone 9: Version 0.1 integration candidate

M9 objective

Turn the implementation into reproducible packages with complete correctness, resource, performance, migration, and compatibility evidence.

M9 checklist

  • Run the complete mandatory correctness matrix on both SQLite drivers.
  • Run architecture, packed-export, migration, corruption, and fault suites.
  • After explicit authorization, deploy the exact M6 fixture to a dedicated non-production hosted Cloudflare preview using the release-plan safety interlock.
  • Run the 60-second smoke profile on Node, hosted-preview Durable Object SQLite, and real mounted FUSE; retain the faithful-local M6 result separately.
  • Run B01 through B09 from the release benchmark plan.
  • Compare common workloads with explicitly selected isolated DOFS.
  • Verify the 80% bounded-range throughput comparison gate.
  • Verify the 1.10-times materialization comparison gate.
  • Verify the 10% accepted-baseline regression policy.
  • Verify the 128 MiB managed-memory default and smaller-budget behavior.
  • Run the optional load-10m profile when rollout resources permit.
  • Produce package provenance, changelog, migration guide, and known limits.
  • Pack and install every package in clean consumer fixtures.
  • Publish a versioned unstable or release-candidate package set.

M9 acceptance criteria

  • Every normative MUST and MUST NOT maps to passing evidence.
  • There are zero digest mismatches, partial commits, lost updates, unsafe collections, leaked reservations, or usage-counter mismatches.
  • All mandatory gates complete without an elapsed-time soak.
  • Default correctness and benchmarks finish within the documented bounded profile on the reference targets.
  • Performance and resource result artifacts are checked in and reproducible.
  • Public exports match the approved API snapshot.
  • A clean consumer can open, use, close, reopen, and verify both drivers.
  • The hosted-preview artifact identifies the reviewed bundle, compatibility date, target environment, Durable Object migration, and non-secret capability limits.

13. Milestone 10: Ephemeral AI Computer integration

M10 objective

Make Ephemeral AI FS the default Computer filesystem while retaining DOFS only as an explicitly selected, isolated benchmark comparison.

M10 checklist

  • Publish the exact package versions selected for Computer integration.
  • Provide the engine factory and capability-selection example.
  • Wire authoritative Durable Object SQLite through the Cloudflare driver.
  • Wire the local Computer database through the Node driver and Node VFS.
  • Wire authenticated sync transport to the replication endpoint.
  • Map Computer-owned FUSE handles to Node file sessions.
  • Route workspace.fs, shell, Git, tools, push, and pull through the common filesystem contract.
  • Make omitted engine configuration select Ephemeral AI FS.
  • Keep DOFS behind an explicit comparison selector and isolated database.
  • Replace table-inspecting tests with public behavior and maintenance results.
  • Run the complete Computer integration path and smoke profile.
  • Document new-workspace, preview, rollback, and legacy-data policy.

M10 acceptance criteria

  • The full path passes:

    workspace.fs
      -> authenticated replication
      -> computerd
      -> real FUSE
      -> shell and Git
      -> pull
      -> branch publication
      -> restart and reconnect
      -> collection and verification
    
  • Computer's default path contains transport, execution, workspace, and user-facing integration logic but no filesystem persistence semantics.

  • The Ephemeral AI FS wiring remains within 100 net-new Computer production lines, excluding tests, benchmark harnesses, generated code, and the optional DOFS comparison adapter.

  • Omitted configuration selects Ephemeral AI FS; DOFS never becomes an automatic fallback.

  • Ephemeral AI FS and DOFS schemas, diagnostics, and databases remain isolated.

  • Durable Object restart, container restart, FUSE remount, branch reconnect, and final integrity verification pass.

  • The 60-second end-to-end smoke profile passes.

14. Milestone status template

Use this block when recording a milestone exit:

### Milestone N exit

- Commit:
- Date:
- Checklist complete: yes/no
- Correctness artifact:
- Benchmark artifact:
- Smoke duration and operation counts:
- Resource high-water:
- Known deviations:
- Approved to begin next milestone: yes/no