feat(rendering): slice 10 — runtime→collector adapter (the shadow seam)#436
Merged
Juliusolsson05 merged 1 commit intoJul 6, 2026
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stage 1, slice 10 — the doorway to Stage 2.
createLedgerInputAdapter()is the single module that vouches realSessionRuntimeshapes satisfy the pipeline's structural types:blockOrder→ ordered block arrays (startedAt/endedAt→ the collectors' ms fields).entries(uuid prefixoptimistic-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.observations/ghosts.ts):_atpmetadata → predicate facts (superseded/orphaned/updatedAt/single-text-length/tool_use), mirroring legacyghostHasSidecarShapeextraction. Opencode is gated out entirely — its supersede-less ghosts would orphan and double every turn.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