Repository navigation
mcpx: correlate -32042 retries with the suspended call via requestState (#2897) - #8999
Conversation
…te (#2897) Both -32042 triggers (entry and in-loop ErrNoPush) mint a signed requestState bound to the call and the request binding and carry it in the error data; no state mintable means no -32042 rather than an uncorrelated retry invitation. The broker keeps the pending questions (no Abandon, #2080 preserved). mcpx client echoes the token on its out-of-band retry in params._meta under dev.mcpx/requestState -- 2025-11-25 defines no requestState parameter and strict frame validation rejects one -- and mcpserver resumeOf accepts that vehicle alongside the top-level field. Exactly-once proven by tests: post-completion and pre-completion retries resume the original call (began == 1) on both server triggers, and the client retry carries the token. Core salvaged verbatim from uncommitted changes found parked in the laptop primary clone; completed and verified by lane any-a, task 8931.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 39 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Conductor duplicate-pair salvage comparison against PR #8995 (full diffs compared, not just file lists):
#8995 is being closed as the duplicate now that this note is posted. No merge requested. |
What
Correlates -32042 (UrlElicitationRequired) retries with the suspended call so a host retry cannot start a second upstream operation (#2897):
mcpserver: both -32042 triggers (entry trigger and the in-loop ErrNoPush trigger) now mint a signedrequestState— bound to the call id and to the request binding (method + parameter digest), expiring — andurlRequiredResponsecarries it in the errordatanext toelicitations. If no state can be minted, no -32042 is answered at all rather than inviting an uncorrelated retry. The broker still keeps the pending questions; no Abandon is introduced (mcpx: Phase 3 of #2077 — produce -32042 where it is true, register truth-up (ELI-04/09/12), and #1935 closure #2080 behaviour preserved).mcpclient: mcpx's own client reads therequestStateout of a -32042 error's data and echoes it on its out-of-band retry (withRequestState), so the retry resumes the original call via the existingbeginAsk/verifyRoundpath.requestStateremains indistinguishable from a new call and starts one — that is the documented contract: the host must echo the token, exactly as the MRTR flow already requires.Provenance
The core of this change was found as uncommitted changes parked in the laptop primary clone (a prior session for this issue had recorded "no code changed"); it was salvaged verbatim into this branch, completed (in-loop trigger test coverage), and verified here.
Tests
TestURLRequiredWhenNoChannelToAskOn— entry-trigger -32042 carries requestState; a pre-completion retry with the token stays -32042 on the original call; a post-completion retry resumes it; the upstream operation begins exactly once.TestURLRequiredWhenPushFailsInLoop— extended: the in-loop -32042 also carries requestState and a correlated retry after out-of-band completion begins the operation exactly once.url_elicitation_32042_test.go(mcpclient).go build ./...OK;go test ./internal/mcpserver/ -count=1ok (17.6s);go test ./internal/mcpclient/ -count=1ok (13.4s);go test ./internal/daemon/ -run '32042|URLElicitation' -count=1ok (3.3s). CI to follow on this PR.Closes #2897
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.