Recover durable context mounts on current main #270

Merged
lost-rob0t merged 12 commits from rage/223-durable-context-mount-recovery into main 2026-08-27 14:12:41 +00:00
lost-rob0t commented 2026-08-27 12:13:23 +00:00 (Migrated from github.com)

Recovers Slice 2 of #223 from stale/conflicted #228 without rewriting shared history.

RAGE baseline

Starts from exact canonical main 7f0050f524db6de5293163241176ac4660f04349 after Slice 1 landed. The old #228 branch is 42 commits behind current main and contains obsolete Slice-1 benchmark history, so this recovery preserves only the generic durable-context-mount slice rather than force-rewriting that shared branch.

TDD recovery

All approved durable-mount defect contracts are now pinned and repaired on current main:

  • cross-store cache identity is partitioned by artifact store + mount key + version;
  • concurrent same-key/version resolves use first-live-winner installation so returned handles are not invalidated by a competing resolver;
  • concurrent identical persistent mounts serialize the mount-level latest -> reusable? -> put transaction by store + mount key;
  • the race regressions use deterministic message-queue synchronization with no sleeps;
  • SWI 9.0.4 public artifact projection binds/extracts the artifact value before field access;
  • canonical persisted source rehydration remains covered.

Realization

  • persistent_mount_cache/4 includes artifact-store identity;
  • rehydration creates a candidate, re-checks under the cache mutex, keeps an existing live winner, and deletes only the losing candidate;
  • persistent publication is serialized per store + mount key without changing rlm_artifact semantics;
  • opaque-by-default visibility and authority boundaries remain unchanged.

Validation

Exact head 680fdcc368343a8e2bfbd183496130e7186780a9:

  • deterministic unit/load gate: green, including aggregate PlUnit, benchmark/conformance, deep recursion, CLI smoke, fresh-process graph resume, durable artifact handoff, and whitespace checks;
  • Tree-sitter FFI: green;
  • Clean SWI pack install: green;
  • Nix flake: green;
  • CI REAL OpenRouter: core, structured repair, and benchmark green; depth 0/1/2 recursion currently running;
  • Paid OpenRouter: core, structured repair, and benchmark green; depth 0/1/2 recursion currently running.

Non-goals

No provider/planner changes, no second persistence plane, no product/UI integration, no authority/capability widening, no serialized live handles, and no force-push of #228.

Keep draft until the remaining exact-head live-provider jobs complete green. Supersedes the stale implementation transaction in #228; #223 remains the canonical epic.

Recovers Slice 2 of #223 from stale/conflicted #228 without rewriting shared history. ## RAGE baseline Starts from exact canonical `main` `7f0050f524db6de5293163241176ac4660f04349` after Slice 1 landed. The old #228 branch is 42 commits behind current main and contains obsolete Slice-1 benchmark history, so this recovery preserves only the generic durable-context-mount slice rather than force-rewriting that shared branch. ## TDD recovery All approved durable-mount defect contracts are now pinned and repaired on current main: - cross-store cache identity is partitioned by artifact store + mount key + version; - concurrent same-key/version resolves use first-live-winner installation so returned handles are not invalidated by a competing resolver; - concurrent identical persistent mounts serialize the mount-level `latest -> reusable? -> put` transaction by store + mount key; - the race regressions use deterministic message-queue synchronization with no sleeps; - SWI 9.0.4 public artifact projection binds/extracts the artifact value before field access; - canonical persisted source rehydration remains covered. ## Realization - `persistent_mount_cache/4` includes artifact-store identity; - rehydration creates a candidate, re-checks under the cache mutex, keeps an existing live winner, and deletes only the losing candidate; - persistent publication is serialized per store + mount key without changing `rlm_artifact` semantics; - opaque-by-default visibility and authority boundaries remain unchanged. ## Validation Exact head `680fdcc368343a8e2bfbd183496130e7186780a9`: - deterministic unit/load gate: green, including aggregate PlUnit, benchmark/conformance, deep recursion, CLI smoke, fresh-process graph resume, durable artifact handoff, and whitespace checks; - Tree-sitter FFI: green; - Clean SWI pack install: green; - Nix flake: green; - CI REAL OpenRouter: core, structured repair, and benchmark green; depth 0/1/2 recursion currently running; - Paid OpenRouter: core, structured repair, and benchmark green; depth 0/1/2 recursion currently running. ## Non-goals No provider/planner changes, no second persistence plane, no product/UI integration, no authority/capability widening, no serialized live handles, and no force-push of #228. Keep draft until the remaining exact-head live-provider jobs complete green. Supersedes the stale implementation transaction in #228; #223 remains the canonical epic.
Sign in to join this conversation.
No description provided.