Repository navigation
feat(rpc): pending/failed terminals and message-correlated append joins (S05, part of #4272) - #4374
Merged
Merged
Conversation
Co-authored-by: sisyphus-dev-ai <sisyphus-dev-ai@users.noreply.github.com>
Co-authored-by: sisyphus-dev-ai <sisyphus-dev-ai@users.noreply.github.com>
code-yeongyu
marked this pull request as ready for review
October 26, 2026 10:30
…ns' into feat/4272-s05-terminal-joins # Conflicts: # packages/coding-agent/src/core/agent-session.ts
This was referenced Oct 27, 2026
Open
MoerAI
pushed a commit
to MoerAI/senpi
that referenced
this pull request
Oct 27, 2026
…he stack merge (part of code-yeongyu#4272) The merge of code-yeongyu#4374 onto code-yeongyu#4425 compiled S05's CompactSettledMessages against the S03a index API: synchronous has() and a generic FrozenIndex no longer exist, so every append threw. Keep the exact membership S05 relied on in a resident key set (its pruning stays carried item 9), and let a retired lane freeze without asking its retired paged store for a cut. (cherry picked from commit e0fea84)
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.
Part of #4272. S05: R3.C2 pending/failed terminals + message-correlated append joins, behind the OFF-by-default compact-updates flag.
Stacked on S04b #4347 (feat/4272-s04b-transcript-versions); its first commit e5192e4 merges origin/main for the S03a compact storage prerequisites.
Contract: R3.C2 (C2.1-C2.4); RULING-12 (S05 design); RULING-24 + its clarification: an end is "unknown" when THIS epoch's producer did not vouch for it. The host passes a random per-epoch nonce to the producer at bootstrap/worker-init; the producer mints epoch-bound ids; the reducer accepts a terminal carrier only when its epoch equals the lane's. The nonce stays internal (never in legacy bytes, persisted records or client events). Restart/resume mints a new epoch. No wire change. This revises S04a's internal identity contract inside S05, as the clarification allows. The messageId/turnId mint itself landed in S04a and is not re-implemented.
Tests (packages/coding-agent/test/suite/regressions): 4272-epoch-carrier (RED commit 0d65487: prev-epoch / foreign / unminted ids recognized, in-process and across a worker frame), 4272-epoch-producer, 4272-terminal-joins, -inprocess, -worker, -storage, -lifetime, -bytes, -hint-failure, -producer-paths.
Lane verification at b618018: all 4272-* regression files + rpc client-message identity/ledger, serial: 26 files / 101 tests passed; build, tsc, lint-ratchet, oxlint, oxfmt exit 0. Oversized existing files carry wiring only (agent-session.ts, session-manager.ts, session-worker-client.ts +8, session-worker.ts +13); new logic sits in compact-settled-messages.ts (135 pure LOC) and session-acceptance-lane.ts (212).
LOW-2 (index rows are not pruned) is carried to S03b-2/3 (the first PR stacked on both S05 and the S03b-1b index; S03b-1b's base does not contain S05) and is intentionally unchanged in S05.