Skip to content

feat(rendering): slice 10 — runtime→collector adapter (the shadow seam)#436

Merged
Juliusolsson05 merged 1 commit into
integration/rendering-pipelinefrom
feat/rendering-slice10-adapter
Jul 6, 2026
Merged

feat(rendering): slice 10 — runtime→collector adapter (the shadow seam)#436
Juliusolsson05 merged 1 commit into
integration/rendering-pipelinefrom
feat/rendering-slice10-adapter

Conversation

@Juliusolsson05

Copy link
Copy Markdown
Owner

Stage 1, slice 10 — the doorway to Stage 2. createLedgerInputAdapter() is the single module that vouches real SessionRuntime shapes satisfy the pipeline's structural types:

  • Semantic translation: record-keyed blocks + blockOrder → ordered block arrays (startedAt/endedAt → the collectors' ms fields).
  • Optimistic partition: rows the submit path embeds in entries (uuid prefix optimistic-codex-user:) are routed to the optimistic plane — through the committed collector they would carry committed-grade trust and suppress the live stream instead of reconciling against it.
  • Ghost collector (observations/ghosts.ts): _atp metadata → predicate facts (superseded/orphaned/updatedAt/single-text-length/tool_use), mirroring legacy ghostHasSidecarShape extraction. Opencode is gated out entirely — its supersede-less ghosts would orphan and double every turn.
  • Plane-level reference stability (D11): each plane caches on exactly the runtime slice references it reads; the merged live+optimistic array is memoized on both source refs; unchanged planes hand back previous arrays by reference so the ledger's identity cache composes end-to-end. Bundle-level cache returns the same object when nothing moved.
  • Compile-time seam checks: type-only assertions (SemanticLiveTurn extends RuntimeSemanticTurn, GhostEntry extends GhostLike) make the tsc merge gate fail on runtime-type drift instead of it surfacing as a shadow-diff mystery. Zero runtime dependency on the legacy system; both target types are KEEP-fated in the deletion manifest.

Closes the "runtime→collector adapter" item from the Stage 1 progress marker. 56/56 pipeline tests; tsc gate (node + web) clean including the seam assertions against real runtime types.

🤖 Generated with Claude Code

…m) + ghost collector

createLedgerInputAdapter() is the single module that vouches real
SessionRuntime shapes satisfy the collectors' structural types: record-
keyed semantic blocks → blockOrder-ordered arrays, optimistic rows
partitioned back out of entries (committed-grade trust would let them
SUPPRESS the live stream), ghost _atp metadata → predicate facts.

Reference stability is enforced per PLANE on the runtime slice references
each plane reads, composing with the ledger's last-call cache into
'no real change ⇒ same RenderLedger object' end-to-end (D11). Merged
live+optimistic array is memoized on both source refs.

collectGhostCandidates gates opencode entirely (supersede-less ghosts
would double every turn) and keeps the five rules provider-neutral.

Type-only seam assertions make the tsc gate fail on runtime-type drift
instead of it surfacing as a shadow-diff mystery. 56/56 pipeline tests.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@Juliusolsson05 Juliusolsson05 merged commit 33b48cf into integration/rendering-pipeline Jul 6, 2026
@Juliusolsson05 Juliusolsson05 deleted the feat/rendering-slice10-adapter branch July 7, 2026 21:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant