Phase 2: stream reads and durable imports through Tek9 #36

Merged
lost-rob0t merged 56 commits from agent/issue-35-tek9-streaming into main 2026-08-18 02:43:39 +00:00
lost-rob0t commented 2026-08-17 23:09:20 +00:00 (Migrated from github.com)

Scope

Implements #35 as the next bounded-memory slice of #24 without changing the Phase 1 canonical Tek9 schema.

TDD / invariant plan

The branch intentionally starts red. The first commits add the Phase 2 ADR extension and regression tests that prove current main still violates the contract:

  • document.get after restart must not materialize the corpus into control-plane-workspaces;
  • paged workspace.snapshot must not materialize the corpus;
  • import stage authority must live in Tek9, not control-plane-import-sessions;
  • staged imports must survive a new store + new control-plane process lifecycle;
  • same-sequence/same-content chunk replay must be idempotent;
  • same-sequence/different-content and sequence gaps must return stable typed errors;
  • revision conflict after restart must leave canonical state exact;
  • abort after restart must be deterministic/idempotent;
  • successful import journal records must be compact and must not contain encodedChunks.

Next implementation steps are store-first: direct document/meta paging APIs, durable stage namespace + lifecycle, bounded range batches, atomic promotion, then control-plane rewiring. Existing Tek9 public range/transaction APIs appear sufficient; no Tek9 change is planned unless a live implementation blocker proves otherwise.

Merge gates

  • focused Phase 2 storage tests green;
  • all existing Common Lisp tests green;
  • complete repository CI green on the exact PR head;
  • adversarial review finds no remaining corpus-sized import/read retention;
  • #24 stays open unless ordinary non-import mutation copying is also proven bounded or completed in a follow-up phase.

Closes #35 after all invariants are proven.

Parent: #24.

## Scope Implements #35 as the next bounded-memory slice of #24 without changing the Phase 1 canonical Tek9 schema. ## TDD / invariant plan The branch intentionally starts red. The first commits add the Phase 2 ADR extension and regression tests that prove current `main` still violates the contract: - `document.get` after restart must not materialize the corpus into `control-plane-workspaces`; - paged `workspace.snapshot` must not materialize the corpus; - import stage authority must live in Tek9, not `control-plane-import-sessions`; - staged imports must survive a new store + new control-plane process lifecycle; - same-sequence/same-content chunk replay must be idempotent; - same-sequence/different-content and sequence gaps must return stable typed errors; - revision conflict after restart must leave canonical state exact; - abort after restart must be deterministic/idempotent; - successful import journal records must be compact and must not contain `encodedChunks`. Next implementation steps are store-first: direct document/meta paging APIs, durable stage namespace + lifecycle, bounded range batches, atomic promotion, then control-plane rewiring. Existing Tek9 public range/transaction APIs appear sufficient; no Tek9 change is planned unless a live implementation blocker proves otherwise. ## Merge gates - focused Phase 2 storage tests green; - all existing Common Lisp tests green; - complete repository CI green on the exact PR head; - adversarial review finds no remaining corpus-sized import/read retention; - #24 stays open unless ordinary non-import mutation copying is also proven bounded or completed in a follow-up phase. Closes #35 after all invariants are proven. Parent: #24.
Sign in to join this conversation.
No description provided.