GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — feat(mcpx): handle upstream -32042 in CallTool — broker URL elicitations, retry once (#2079) by dezren39 · Pull Request #2760 · developing-today/code Conversation
|
|
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 36 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. Comment |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Codex Review SummaryThis 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. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Here are some automated review suggestions for this pull request.
Reviewed commit: 6ed09b9544
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| // migrated; they expire by TTL. | ||
| brokerID := p.ElicitationID | ||
| if brokerID != "" { | ||
| brokerID = server + ":" + brokerID |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Encode server and elicitation ID as an unambiguous pair
When server names or upstream elicitation IDs contain :, concatenation can map distinct pairs to the same broker key. For example, server a with ID b:c and server a:b with ID c both become a:b:c; server names are unrestricted in config.Config.Resolve, and elicitation IDs are opaque strings. Previously these two IDs were distinct. The second request now fails the broker's primary-key constraint, and a completion notification from that server can accept the other server's pending question because OnElicitationComplete uses the same ambiguous encoding. Use an unambiguous tuple encoding for both opening and completing requests.
Useful? React with 👍 / 👎.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 3adca52. The broker row key is now brokerRowID(server, elicitationId) — a length-prefixed encoding (<len(server)>:<server>:<elicitationId>) used by both elicitViaBroker (open) and OnElicitationComplete (complete), so server a + ID b:c and server a:b + ID c map to distinct rows and a completion can only settle its own server's question. Empty (minted) IDs stay bare, as before. Added TestBrokerKeyingColonAmbiguity covering exactly that pair plus cross-settlement; existing keying tests now compose IDs through the helper. Verified on the laptop: go test ./internal/daemon/ -run TestBrokerKeying -race -count=1 ok.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| // happen exactly once regardless. Malformed data, or no handler | ||
| // installed, leaves the original error untouched; any other | ||
| // negotiated version is untouched too. | ||
| if !retried32042 && err != nil && c.Negotiated == "2025-11-25" && |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Read the negotiated version through its atomic mirror
On a shared legacy HTTP connection, another concurrent request can receive a session-ending 404 and run reinitializeLegacy, whose finishLegacy writes c.Negotiated without synchronization. This new read on the failed-tool-call path races with that write, making the protocol-version gate unsafe during session recovery. Use the existing c.negotiatedVersion() helper, which reads the atomic mirror published by finishLegacy, instead of accessing the plain string field.
Useful? React with 👍 / 👎.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 3adca52. The -32042 gate in CallTool now reads c.negotiatedVersion() — the atomic mirror that every writer (finishLegacy, probe, handoff) publishes — instead of the plain c.Negotiated field, so the protocol-version gate no longer races a concurrent reinitializeLegacy/finishLegacy write during session recovery. Verified on the laptop: go test ./internal/mcpclient/ -run TestURLElicitationRequired -race -count=1 ok (retry, malformed-passthrough, and era-gate suites).
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…ex PR #2760 findings) brokerRowID length-prefixes the (server, elicitationId) pair so server "a"/ID "b:c" and server "a:b"/ID "c" no longer collide on one broker row; OnElicitationComplete composes the same ID. The -32042 gate in CallTool now reads c.negotiatedVersion() (the atomic mirror every writer publishes) instead of the plain Negotiated field, which races reinitializeLegacy/finishLegacy writes during session recovery. Adds TestBrokerKeyingColonAmbiguity.
…ons, retry once (#2079)
…ex PR #2760 findings) brokerRowID length-prefixes the (server, elicitationId) pair so server "a"/ID "b:c" and server "a:b"/ID "c" no longer collide on one broker row; OnElicitationComplete composes the same ID. The -32042 gate in CallTool now reads c.negotiatedVersion() (the atomic mirror every writer publishes) instead of the plain Negotiated field, which races reinitializeLegacy/finishLegacy writes during session recovery. Adds TestBrokerKeyingColonAmbiguity.
3adca52 to
f3cd691
Compare
There was an error while loading. Please reload this page.
|
🤖 Agent note · picked up → blocked (packet_defect)
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
🤖 Agent note · correction to the note above
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.