feat(rendering): slice 11 — fold-policy yield-hatch absorption + queue-handoff e2e (Stage 1 complete)#437
Merged
Juliusolsson05 merged 1 commit intoJul 6, 2026
Conversation
…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>
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, final slice.
Fold-policy yield-hatch absorption (
policy/foldPolicy.ts, plan D10 drift item): the two proxy-string yield hatches hardcoded in legacyfoldEvent.ts(isCompletedProxyTurnReadyToYield,isEmptyNonProxyShellTurn) become policy data —terminalYieldSources/shellClaimantsper 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