Persist Quasar workspaces in Tek9 #34

Merged
lost-rob0t merged 27 commits from agent/issue-33-tek9-store into main 2026-08-17 21:36:43 +00:00
lost-rob0t commented 2026-08-17 20:59:40 +00:00 (Migrated from github.com)

Implements Phase 1 tracked by #33 under parent #24.

Scope

  • make Tek9 the process-durable embedded store for normal Quasar document, named-graph, topology, workspace-meta, and journal mutations;
  • preserve the existing control-plane single-writer/revision/event ordering and atomic commit contract;
  • use structured per-record Tek9 storage rather than a whole-workspace blob or full-corpus rewrite;
  • restore from a newly opened store/control-plane instance;
  • keep active heap workspaces/import candidates for this phase, so #24 remains open for direct reads/snapshots and durable streaming import staging.

TDD state

The first commit intentionally adds red integration invariants for close/reopen recovery, graph/document/journal restoration, workspace namespace isolation, mixed-domain rollback/no-event behavior, and one-record write scaling. The implementation and exact merged Tek9 pin follow after the blocker PR in lost-rob0t/tek9 is green and merged.

Cross-links: lost-rob0t/tek9#4, lost-rob0t/tek9#5, lost-rob0t/tek9#6.

Closes #33.

Implements Phase 1 tracked by #33 under parent #24. ## Scope - make Tek9 the process-durable embedded store for normal Quasar document, named-graph, topology, workspace-meta, and journal mutations; - preserve the existing control-plane single-writer/revision/event ordering and atomic commit contract; - use structured per-record Tek9 storage rather than a whole-workspace blob or full-corpus rewrite; - restore from a newly opened store/control-plane instance; - keep active heap workspaces/import candidates for this phase, so #24 remains open for direct reads/snapshots and durable streaming import staging. ## TDD state The first commit intentionally adds red integration invariants for close/reopen recovery, graph/document/journal restoration, workspace namespace isolation, mixed-domain rollback/no-event behavior, and one-record write scaling. The implementation and exact merged Tek9 pin follow after the blocker PR in `lost-rob0t/tek9` is green and merged. Cross-links: lost-rob0t/tek9#4, lost-rob0t/tek9#5, lost-rob0t/tek9#6. Closes #33.
lost-rob0t commented 2026-08-17 21:36:27 +00:00 (Migrated from github.com)

Adversarial review completed

I separately reviewed the final storage diff against the Phase 1 invariants after the normal tests passed.

Real defects found and fixed during that review:

  • the explicit full save-workspace bootstrap/migration path could remove Quasar graph metadata/sidecars while leaving superseded Tek9 graph/v2 topology unreachable; it now clears old logical graph namespaces atomically and has a regression test;
  • the first cleanup version enumerated old graph metadata before opening the write transaction, leaving a read/write race for direct store callers; enumeration and cleanup now occur inside the same outer Tek9 write transaction;
  • earlier test harness reader/DECLARE failures were corrected rather than bypassed.

Reviewed specifically for:

  • partial document/graph/meta/journal commits;
  • durable revision mismatch/stale-candidate overwrite;
  • event emission before durable commit;
  • restart fixtures accidentally reusing old workspace/store objects;
  • full-corpus rewrites on ordinary single-record mutation;
  • namespace collisions;
  • lost canonical edge/node sidecar fields;
  • graph deletion/node deletion stale topology;
  • unclosed Tek9 environments;
  • raw lmdb:* or private tek9:: access from Quasar;
  • floating/unpinned Tek9 dependencies;
  • accidentally declaring parent #24 complete.

Final dependency pin is the merged Tek9 SHA ca24ef35ea6877420cbca057dd7fb702fe29a740.

Final clean CI run 32071591030 is green across static/dependency checks, frontend unit+integration tests/build, Common Lisp transaction/persistence tests, real quasar-web load, development-stack smoke, Playwright desktop/mobile mutation+reload paths, and packaged production/security/PWA smoke.

No unresolved review threads remain. #24 must stay open: active workspaces and import staging/chunks are still heap-bound; follow-on is #35.

## Adversarial review completed I separately reviewed the final storage diff against the Phase 1 invariants after the normal tests passed. Real defects found and fixed during that review: - the explicit full `save-workspace` bootstrap/migration path could remove Quasar graph metadata/sidecars while leaving superseded Tek9 graph/v2 topology unreachable; it now clears old logical graph namespaces atomically and has a regression test; - the first cleanup version enumerated old graph metadata before opening the write transaction, leaving a read/write race for direct store callers; enumeration and cleanup now occur inside the same outer Tek9 write transaction; - earlier test harness reader/`DECLARE` failures were corrected rather than bypassed. Reviewed specifically for: - partial document/graph/meta/journal commits; - durable revision mismatch/stale-candidate overwrite; - event emission before durable commit; - restart fixtures accidentally reusing old workspace/store objects; - full-corpus rewrites on ordinary single-record mutation; - namespace collisions; - lost canonical edge/node sidecar fields; - graph deletion/node deletion stale topology; - unclosed Tek9 environments; - raw `lmdb:*` or private `tek9::` access from Quasar; - floating/unpinned Tek9 dependencies; - accidentally declaring parent #24 complete. Final dependency pin is the merged Tek9 SHA `ca24ef35ea6877420cbca057dd7fb702fe29a740`. Final clean CI run `32071591030` is green across static/dependency checks, frontend unit+integration tests/build, Common Lisp transaction/persistence tests, real `quasar-web` load, development-stack smoke, Playwright desktop/mobile mutation+reload paths, and packaged production/security/PWA smoke. No unresolved review threads remain. #24 must stay open: active workspaces and import staging/chunks are still heap-bound; follow-on is #35.
Sign in to join this conversation.
No description provided.