GeezerVison is showing github.com — fix(server): a secret card closes when its request is aborted right after it opens by SvetlomirB · Pull Request #42135 · pingdotgg/t3code
Conversation
Problem
request_secret recorded the card before attaching the cleanup that closes it, so a call aborted in between left the card pending for good. Fixes #42134.
Change
The wait now runs in Effect.acquireUseRelease: recording the card is the acquire step and closing it is the release, which also covers a timeout. Most of the diff is re-indentation.
Scope
A bug fix with a regression test. Same function as #34634 and #38167, different failure.
Verification
- New case in
OrchestratorMcpService.activity.test.ts aborts the call while the card is being recorded. On main: expected [ 'pending' ] to deeply equal [ 'pending', 'cancelled' ]. With the fix it passes.
- The existing timeout case now also checks that only a timed-out card is closed.
vp run check:changed passes at 4146b1b3b6.
- Real web app: the replay agent calls
request_secret over MCP, then aborts the call. Real Chromium web client, 1280×800, light theme, fresh isolated databases and synthetic data on both commits. For the captures only, both commits carry a yield* Effect.sleep("3 seconds") right after the card is recorded, so the abort lands in the window.
| Step |
Before — 75443857dc |
After — 4146b1b3b6 |
| Card open |
 |
 |
| Call aborted, run ended |
 |
 |
| Recording |
stranded-base.webm
|
stranded-head.webm
|
Scenario and replay driver · proof.json. scenarios:prove exited 0: failed on base and passed on head.
Not checked: desktop, mobile, and a real provider's abort.
Done with claude-opus-5-5 via Claude Code
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
…fter it opens
request_secret recorded the card as pending before installing the cleanup that
closes it. A call aborted in between (a Stop, or the MCP client dropping the
call) left the card pending for good: the thread showed "Input" with no one
waiting, a secret saved there never reached the agent, and after the run ended
the form stayed in the thread and failed with "The agent that asked has stopped".
Record the pending card as the acquire step of acquireUseRelease, with the wait
as its use and closing the card as its release. The release also covers a
timeout, so every way the wait ends without an answer closes the card, and an
abort lands either before the card exists or after its cleanup is in place.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
coderabbitai
Bot
commented
Nov 24, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|

No actionable comments were generated in the recent review.
Walkthrough
-
requestSecret now records pending within the wait’s resource scope and closes the card on release unless the wait succeeds with a timeout result. Tests verify dispatched status sequences for timeout, decline, cancellation, and interruption.
Changes: Secret request cleanup
| Layer / File(s) |
Summary |
Wait and cleanup lifecycle apps/server/src/mcp/OrchestratorMcpService.ts, apps/server/src/mcp/OrchestratorMcpService.activity.test.ts |
The wait records pending during resource acquisition. The release step closes the card unless the wait succeeds with a timeout result. Tests check timeout and interruption sequences, and confirm declined and cancelled requests record only pending. |
Estimated code review effort: 2 (Simple) | ~15 minutes
Change: Bug fix · Severity of issue fixed: Low
Possibly related issues
- Issue 41797: Both issues involve cleanup when an MCP client aborts
request_secret. The reported client-side timeout remains outside this change.
Suggested reviewers: ali-al1, juliusmarminge
Merge Risk: Minimal · up to 23118
-
This fix makes a secret request card close as "Request ended" when the call is aborted just after the card is recorded. The change is localized to the server's secret-request wait, with new test coverage for the abort case. No remaining merge-blocking risk was found.
Pre-merge checks: 4
-
| Check name |
Status |
Explanation |
| Title check |
 |
The title names the fix: a secret card closes when its request is aborted right after it opens. The raw summary shows the change wraps the pending-card recording in an acquire/use/release scope, so th… |
| Description check |
 |
The description follows the template. It has Problem, Change, Scope, and Verification sections. The Problem section states the bug and links issue #42134. The Change section explains the acquire/use/r… |
| Linked Issues check |
 |
Issue #42134 requires that a secret card closes as "Request ended" when its request_secret call is aborted while the card is being recorded. The test diff at the reviewed head adds `requestSecret clos… |
| Out of Scope Changes check |
 |
The test diff contains only changes that support the fix. It adds the Deferred import and the abort-during-recording regression case. It records secret statuses in the existing outcome test and checks… |
Full details: Title check
-
Explanation
The title names the fix: a secret card closes when its request is aborted right after it opens. The raw summary shows the change wraps the pending-card recording in an acquire/use/release scope, so the release closes the card on abort. The title matches the main change and the linked issue #42134.
Full details: Description check
-
Explanation
The description follows the template. It has Problem, Change, Scope, and Verification sections. The Problem section states the bug and links issue #42134. The Change section explains the acquire/use/release fix. The Scope section says it is a bug fix with a regression test. Verification gives a focused test with observed failure and pass results, a check command result, and before/after evidence. It also states what was not checked (desktop, mobile, real provider abort). The template's optional agent-model line is present. The Problem section does not describe expected behavior in detail, and the Scope section does not explicitly link the bug issue beyond the Problem section, but both are covered elsewhere, so the description is mostly complete.
Full details: Linked Issues check
-
Explanation
Issue #42134 requires that a secret card closes as "Request ended" when its request_secret call is aborted while the card is being recorded. The test diff at the reviewed head adds requestSecret closes its card when the call is aborted while the card is being recorded. That test blocks the dispatch of the "pending" record, interrupts the request, and expects the recorded statuses to equal ["pending", "cancelled"]. The timeout test now expects ["pending", "cancelled"] and the declined and cancelled tests expect ["pending"]. This matches the issue's expected behavior. The service diff for apps/server/src/mcp/OrchestratorMcpService.ts could not be read because changed blobs are missing from the checkout. The implementation claim (acquire records pending, release writes cancelled unless the use ends with a timeout result) rests on the AI-generated summary. The test pass result and check:changed result are author-reported and were not run.
Full details: Out of Scope Changes check
-
Explanation
The test diff contains only changes that support the fix. It adds the Deferred import and the abort-during-recording regression case. It records secret statuses in the existing outcome test and checks the timeout cancellation. The service changes, as summarized, restructure the secret wait into acquire/use/release, remove the pre-wait pending record and the separate timeout cancellation, and keep the polling cancellation rules and the MAX_SECRET_REQUEST_TIMEOUT_MS cap. The summary lists no exported declaration changes. The re-indentation follows from the restructuring. Limitation: the service diff could not be read, so this verdict relies on the summary for those hunks.
Finishing Touches
-
Generate unit tests (beta)
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info
-
Run configuration
-
Commits
-
Reviewing files that changed from the base of the PR and between 4146b1b and 2311818.
Files selected for processing: 1
-
apps/server/src/mcp/OrchestratorMcpService.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Evidence
Real web client, Replay provider, fresh synthetic data, 1280×800 viewport, light theme. Both commits received the same temporary three-second delay after recording the pending card. Replay called request_secret with clientRequestId: router-key, sent MCP cancellation after 1.2 seconds during that delay, and ended the run. The base retained Save securely and Decline; the fix displayed Request ended. scenarios:prove exited 0. Captures and recordings were visually inspected.
Scenario · Replay and timing fixture · Scenario startup hook
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Labels
size:S
10-29 changed lines (additions + deletions).
vouch:unvouched
Author is not yet trusted in the VOUCHED list.
Milestone
No milestone
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.
|