Skip to content

feat(rpc): pending/failed terminals and message-correlated append joins (S05, part of #4272) - #4374

Merged
code-yeongyu merged 9 commits into
mainfrom
feat/4272-s05-terminal-joins
Oct 27, 2026
Merged

code-yeongyu merged 9 commits into
mainfrom
feat/4272-s05-terminal-joins

Conversation

@code-yeongyu

@code-yeongyu code-yeongyu commented Oct 26, 2026 •

Copy link
Copy Markdown
Owner

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.

@code-yeongyu code-yeongyu added the no-changelog No changelog required label Oct 26, 2026
@code-yeongyu
code-yeongyu marked this pull request as ready for review October 26, 2026 10:30
code-yeongyu and others added 3 commits October 26, 2026 19:52
… bytes (part of #4272)

Co-authored-by: sisyphus-dev-ai <sisyphus-dev-ai@users.noreply.github.com>
… is a no-op (part of #4272)

Co-authored-by: sisyphus-dev-ai <sisyphus-dev-ai@users.noreply.github.com>
…ns' into feat/4272-s05-terminal-joins

# Conflicts:
#	packages/coding-agent/src/core/agent-session.ts
@code-yeongyu
code-yeongyu merged commit e366403 into main Oct 27, 2026
45 checks passed
@code-yeongyu
code-yeongyu deleted the feat/4272-s05-terminal-joins branch October 27, 2026 09:18
code-yeongyu added a commit that referenced this pull request Oct 27, 2026
fix(rpc): restore main typecheck after #4374 + #4398 (settled terminals on the paged index, part of #4272)
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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-changelog No changelog required

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant