Repository navigation
fix(rpc): every queue clear closes drained input as cleared - #3445
Merged
Merged
Conversation
…t-outcome # Conflicts: # packages/coding-agent/CHANGELOG.md # packages/coding-agent/src/modes/rpc/changes.md
… is described in #3412's own entry
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.
Fixes #3412
Problem
Queued input dropped by
clear_queue, or byunload_session { clearQueue: true }, was closed with a plaincompletedreceipt.get_effect_statusthen reported it as if it had been delivered.abort { clearQueue }(#3345) used its owncleared_by_abortoutcome, so one kind of event had two answers depending on the path.Change
cleared(withreason,detailandaction), for every path that drains the queue:clear_queue,unload_session { clearQueue: true }andabort { clearQueue }. The receipt is projected asfailed, because the input never ran.ClientAdmissions.clearQueued()writes the receipts before the drain.ClientAdmissions.clearQueuedFor(session)does so only when a ledger for that session already exists; it never creates one, since creating one would restore queued input.cleared_by_abortis renamed tocleared. It was never released (it lands with feat(rpc): abort awaits quiesce, clears the queue, and names who aborted #3345).docs/rpc.md, bothchanges.mdtrackers and the CHANGELOG.Tests
rpc-unload-session.test.tsunloads withclearQueue, and the cleared input comes back ascompleted.cleared. A newclear_queuetest expects afailedreceipt with outcomecleared, and the feat(rpc): abort awaits quiesce, clears the queue, and names who aborted #3345 abort test now expectscleared.Stack
Base: #3345 (
feat/3156-abort-quiesce). It retargets tomainonce #3345 merges.Evidence at 5504677 (boat:bx_eycscmer, bun 1.4.2)
bun install --frozen-lockfile,bun run buildandbun run checkall exit 0.bun run teston rpc-unload-session, rpc-abort-quiesce, rpc-effect-ledger-host, rpc-effect-held-switch, rpc-effect-outcome-copy and rpc-queued-open-record: 50 passed, 0 failed.Summary by cubic
Fixes #3412 by giving every path that drains the queue the same
clearedoutcome, soclear_queue,unload_session { clearQueue: true }, andabort { clearQueue: true }no longer report dropped input as delivered.Bug Fixes
failedreceipt with outcomecleared(withreason,detail,action) instead of a plaincompletedreceipt.cleared_by_abortby 2026.10.16-2 are still read and reported as stored, so that input is never restored on reopen; clients matchingoutcome.kindshould accept both values.ClientAdmissions.clearQueuedFor(session)marks receipts only on an existing session ledger, never creating one (which would restore queued input).docs/rpc.md, bothchanges.mdtrackers, and the CHANGELOG.Written for commit b7512b4. Summary will update on new commits.