Skip to content

feat(rendering): slice 12 — Stage 2 shadow mode behind AGENT_CODE_RENDER_SHADOW - #439

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

Juliusolsson05 merged 1 commit into
integration/rendering-pipelinefrom
feat/rendering-slice12-shadow

Conversation

@Juliusolsson05

Copy link
Copy Markdown
Owner

Stage 2 opens: the new pipeline now runs beside the legacy renderer on real sessions when AGENT_CODE_RENDER_SHADOW=1.

  • shadow/shadowDiff.ts — normalizes both renderers to the coarsest shared grain (rows by stable id, semantic turns by turnId, work/empty flags). Representation differences (block-level vs turn-level, plane prefixes vs ghost-folded uuids) never read as divergence; real ones (missing / extra / mis-ordered rows) always do. Set difference before order comparison — one missing row is one finding, not an order-mismatch cascade.
  • shadow/useRenderShadow.ts — mounted in TileLeaf (the one component holding the full SessionRuntime). Probes the flag once app-wide, recomputes the legacy comparable from the same pure functions Feed uses (flag-gated, zero prod cost), runs adapter+ledger per session via refs so the D11 identity caches are exercised on real ticks, and records divergences to globalThis.__agentCodeRenderShadow (ring of 50, each report a fixture seed) + one console.warn per divergence signature.
  • Flag plumbing — renderShadowEnabled rides the existing dev-debug:get-config channel (no channel proliferation); flag + shadow + diff are all DELETE-fated at Stage 3 cutover together.

Next: run real sessions with the flag on across all three providers; every untriaged divergence class becomes a fixture per the plan's Stage 2 exit criterion.

72 pipeline tests; tsc gate (node + web) clean.

🤖 Generated with Claude Code

…DER_SHADOW

shadowDiff.ts normalizes both renderers to the coarsest grain they share
(committed/optimistic/ghost rows by stable id, semantic turns by turnId,
work/empty flags) so representation differences — block-level vs
turn-level, plane prefixes vs folded uuids — never read as divergence,
while real ones (missing/extra/mis-ordered rows) always do. Set
difference before order comparison so one missing row is one finding,
not a cascade of order mismatches.

useRenderShadow mounts in TileLeaf (the one component holding the full
runtime): probes the flag once app-wide via the existing dev-debug
config channel, recomputes the legacy model from the same pure functions
Feed uses, runs the adapter+ledger per-session (refs, so the D11 caches
are actually exercised on real ticks), and records divergences to a ring
buffer on globalThis.__agentCodeRenderShadow + console.warn once per
signature. Zero cost when the flag is off; DELETE-fated at Stage 3.

72 pipeline tests.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@Juliusolsson05
Juliusolsson05 merged commit 8ccc497 into integration/rendering-pipeline Jul 6, 2026
@Juliusolsson05
Juliusolsson05 deleted the feat/rendering-slice12-shadow 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