Skip to content

feat(rendering): slice 11 — fold-policy yield-hatch absorption + queue-handoff e2e (Stage 1 complete)#437

Merged
Juliusolsson05 merged 1 commit into
integration/rendering-pipelinefrom
feat/rendering-slice11-foldpolicy-queue
Jul 6, 2026
Merged

feat(rendering): slice 11 — fold-policy yield-hatch absorption + queue-handoff e2e (Stage 1 complete)#437
Juliusolsson05 merged 1 commit into
integration/rendering-pipelinefrom
feat/rendering-slice11-foldpolicy-queue

Conversation

@Juliusolsson05

Copy link
Copy Markdown
Owner

Stage 1, final slice.

Fold-policy yield-hatch absorption (policy/foldPolicy.ts, plan D10 drift item): the two proxy-string yield hatches hardcoded in legacy foldEvent.ts (isCompletedProxyTurnReadyToYield, isEmptyNonProxyShellTurn) become policy data — terminalYieldSources / shellClaimants per provider — with policy-parameterized predicates; no provider-source literal in any logic path. Claude/opencode encode the hatches as EMPTY (unreachable / never-applied respectively) so the asymmetry is visible as policy, not accident. Parity tests pin the 2026-05-16T18:42 hybrid-terminal-marker class, the 19:08 completed-function-call trap, the rollout empty-shell claim, the streaming flicker defense, and the shared ended-turn rule. Legacy fold untouched until Stage 3 cutover.

Queue-handoff race e2e (fixtures.queueHandoff.test.ts, #172 comment 6): queue is a composer lane (D1) — the adapter never sees queued messages (absence asserted); the committed twin takes exactly the position its optimistic stand-in held; and the overlap tick where both rows legitimately coexist suppresses the optimistic copy by normalized text.

Plan marker updated: Stage 1 COMPLETE — slices 1–11, 67 pipeline tests, six e2e fixtures. Unknowns population is deliberately deferred to Stage 2: unknowns are discovered at the shadow seam from real IPC, not in fixtures (registry + ledger plumbing already landed).

tsc gate (node + web) clean on main + integration diff.

🤖 Generated with Claude Code

…e-handoff e2e; Stage 1 complete

policy/foldPolicy.ts encodes the two proxy-literal yield hatches from
legacy foldEvent (isCompletedProxyTurnReadyToYield /
isEmptyNonProxyShellTurn) as per-provider policy data
(terminalYieldSources / shellClaimants) with policy-parameterized
predicates — no provider-source literal in any logic path. Parity tests
pin both 2026-05-16 bundle classes, the flicker defense, and the shared
ended-turn rule. Legacy fold untouched until Stage 3 (plan drift item).

fixtures.queueHandoff.test.ts pins the queue→optimistic→committed race:
queue is a composer lane (D1, absence asserted), the committed twin takes
exactly the optimistic row's position, and the overlap tick (both rows
present) suppresses the optimistic copy by normalized text.

Plan progress marker updated: Stage 1 COMPLETE, 67 pipeline tests.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@Juliusolsson05 Juliusolsson05 merged commit 0bf2e93 into integration/rendering-pipeline Jul 6, 2026
@Juliusolsson05 Juliusolsson05 deleted the feat/rendering-slice11-foldpolicy-queue 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