Date. 2026-08-11 · Author. Claude Code (execution). Operator: Marvin Percival.
CR. change-requests/cr-2026-202-loomworks-b77-prompt-cache-v0_1.md (filed, record b00f85e; number confirmed non-colliding).
Baseline confirmed. Engine f9372d6, tree clean at Step 0. Working tree: engagement/seed_lookup.py (two helpers), orchestration/prompt.py (marker fields + validity check + build-time stamp), tests/test_cr_2026_202_prompt_cache.py (new, 3 tests). Nothing committed, tagged, or pushed.
The halt condition (seed writes landing elsewhere): not needed. The remedy touches only where the cache looks, never where seeds land.
Remedy chosen: option 2 — the resolved seed identity in the entry, compared at validity time — with one refinement the code supplied. A working-version match already proves the seed_ref itself is unchanged (the ref lives on the Engagement object; re-pointing it bumps the version). So the entry stamps a seed marker at build — seed_id, the rendered seed_version, and whether the ref is pinned — and the validity check branches:
MAX(object_version) query against the seed's own log (admin first, personal fallback, mirroring _load_seed_by_ref's order). Mismatch → rebuild, so the prompt carries the current seed.Why not option 1 (watch the admin log's version): the admin log moves on every seed write for any engagement — one amendment anywhere would flush every cached context. Over-invalidation across the fleet to catch a per-engagement event. Why not option 3 alone (per the CR's own instruction): pinning bootstrap refs and making the convergence call explicit removes today's exposure without fixing the mechanism — the next unpinned path re-creates it. Option 3 was not taken alongside either: with the mechanism fixed, pinning is no longer load-bearing for the cache, and touching the bootstraps would widen this CR for a guarantee the validity check now provides directly. Reported as available, deliberately not taken.
What else the cache holds, and the trade: EngagementContext carries title, tier, the classifier summary, the assembled text (and its without-notes variant), and the organized-view citation ref — all correctly invalidated by the working version today, since every one of them changes only via working-log events. The remedy adds no invalidation pressure on any of them: recomputation happens exactly when the seed actually moved, which is when it is wanted. Net recomputation cost: zero for pinned, one query per cache check for unpinned-seed engagements.
The test stages the CR's exact scenario, not the mechanism that already works: an unpinned seed_ref, a seed amended on the administrative log, working version untouched — and asserts the assembled prompt carries the new content. Observed failing against current code at precisely that assertion (the prompt kept OLD-SEED-CONTENT). Two controls passed pre-fix and pin the fix's edges: the pinned ref keeps serving its pinned version (a later seed version must not leak in — pin semantics) and stays on the identity-preserved zero-cost cache hit (ctx2 is ctx1 — the trade promise as an assertion); and working-version invalidation still rebuilds. Post-remedy: 3/3.
Full suite 3673 passed (+3), 68 skipped, 0 failed (8m20s). Ruff clean; mypy 0 new (helpers fully annotated). Prompt-assembly and room-reads suites explicitly green.
Until this CR, two incidental behaviors were the only things preventing the live defect: seed-amendment convergence happens to call revise_engagement on the working engagement (bumping the watched version as a side effect of its own bookkeeping), and operator-created engagements happen to pin seed_ref at creation. Neither was a maintained guarantee. With the marker check in place, both remain true and neither is load-bearing for the cache — a future change to either is no longer a silent regression here, though the convergence call still matters for everything else keyed on the working version.
This CR narrows B-77's first Kind B entry: the Companion no longer speaks from a superseded seed — the prompt cache now notices a seed moving under an unpinned ref. What it deliberately leaves open: nothing about what happens to already-derived artefacts when a seed moves is settled — the Manifestation preview's frozen ordering (B-77's second Kind B entry) is untouched, and B-69's seed-mutability decision is not advanced by this fix and must not be read as such. The Kind B classification stands with a narrower blast radius.
Tag cr-2026-202-b77-prompt-cache. Push. Watch the CI run and report its result.
DUNIN7 — Done In Seven LLC — Miami, Florida CR-2026-202 — Checkpoint A — v0.1 — 2026-08-11 The cache now asks the seed's own log — and only when the ref leaves it free to move.