GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

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

@dezren39

@dezren39 dezren39 commented Oct 30, 2026 •
edited by blacksmith-sh Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Implements Phase 2 of #2077 for #2079, exactly as settled by triage task 2960 (queue task 3311).

What

  • mcpclient (client.go, modern.go) — CallTool's attempt loop intercepts -32042 (UrlElicitationRequired) only when Negotiated == "2025-11-25" exactly. The retry is gated on a dedicated retried32042 flag, independent of the attempt index the -32020 header-mismatch continue already spends, so the retry happens exactly once regardless. data.elicitations is parsed strictly: parse failure, an empty list, a non-url entry, or a missing elicitationId returns the original error unmodified. New optional seam parallel to OnServerRequest: Options.OnURLElicitationRequired / SetURLElicitationHandler with URLElicitation entries; a nil handler propagates -32042 untouched, as today. A handler error surfaces as the call's error; a non-accept fails the call with a named error; a second -32042 surfaces with no third call. Other methods and other negotiated versions are untouched.
  • pool (pool.go) — new Hooks.URLElicitation field parallel to Hooks.Elicit, wired in installServerHooks with the same question-budget pause (questions.asking()).
  • daemon (hooks.go) — Registry.urlElicitationsViaBroker synthesises {mode:"url", url, elicitationId, message} params per entry and runs the existing elicitViaBroker path — no second URL flow. Entries open sequentially; all must accept before the retry; the first decline/cancel/expiry stops with a named error and later entries are never opened.
  • Keying fix (ELI-09) — broker rows were keyed by the bare upstream elicitationId (TEXT PRIMARY KEY), so two upstreams choosing the same ID collided on the elicitation/create path. Server-supplied IDs are now stored server-qualified (server + ":" + elicitationId) inside elicitViaBroker, and OnElicitationComplete composes the same qualified ID before broker.Respond. Lookups are exact-match, so no schema migration; minted IDs (empty elicitationId) are untouched. Edge: pre-existing pending rows stored under a bare ID are not migrated — they expire by TTL.

Tests

New: internal/mcpclient/url_elicitation_32042_test.go (happy path with exactly-one-retry counting, second--32042, decline, handler error, no-handler, six malformed-data shapes, era gates at 2025-06-18 and 2026) and internal/daemon/url_elicitation_32042_test.go (two-server keying collision, sequential all-accept/decline-stops flow).

Verified on the laptop worktree (CI-first for the full repo suite):
go test ./internal/mcpclient/ ./internal/pool/ ./internal/elicit/ ./internal/daemon/ -count=1 — all ok. CI on this PR is the remaining verification.

Queue task 3311 · issue #2079


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

chatgpt-codex-connector[bot] reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@dezren39
dezren39 requested a review from a team as a code owner October 30, 2026 14:04
@coderabbitai

coderabbitai Bot commented Oct 30, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Warning

Review limit reached

You'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.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 04ac38f2-78f5-4c9d-9c10-526df37fa3fc
Commits

Reviewing files that changed from the base of the PR and between dc9b117 and f3cd691.

Files selected for processing: 6
  • pkgs/mcpx/internal/daemon/hooks.go
  • pkgs/mcpx/internal/daemon/url_elicitation_32042_test.go
  • pkgs/mcpx/internal/mcpclient/client.go
  • pkgs/mcpx/internal/mcpclient/modern.go
  • pkgs/mcpx/internal/mcpclient/url_elicitation_32042_test.go
  • pkgs/mcpx/internal/pool/pool.go
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share
  • X
  • Mastodon
  • Reddit
  • LinkedIn

Comment @coderabbitai help to get the list of available commands.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 30, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-30T21:18:45.359173Z f3cd691 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dezren39 dezren39 mentioned this pull request Oct 30, 2026
mcpx: Phase 2 of #2077 — handle upstream -32042: open the URL elicitations at the broker and retry the call once #2079
Closed
chatgpt-codex-connector[bot]
chatgpt-codex-connector Bot reviewed Oct 30, 2026
View reviewed changes

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6ed09b9544

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread pkgs/mcpx/internal/daemon/hooks.go Outdated
// migrated; they expire by TTL.
brokerID := p.ElicitationID
if brokerID != "" {
brokerID = server + ":" + brokerID

@chatgpt-codex-connector chatgpt-codex-connector Bot Oct 30, 2026

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@dezren39 dezren39 Oct 30, 2026

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for 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.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread pkgs/mcpx/internal/mcpclient/client.go Outdated
// 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" &&

@chatgpt-codex-connector chatgpt-codex-connector Bot Oct 30, 2026

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@dezren39 dezren39 Oct 30, 2026

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for 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.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@github-actions github-actions Bot assigned dezren39 Oct 30, 2026
dezren39 added a commit that referenced this pull request Oct 30, 2026
@dezren39
fix(mcpx): unambiguous broker row IDs and atomic negotiated read (Cod…
3adca52
…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.
dezren39 added 2 commits October 30, 2026 16:16
@dezren39
feat(mcpx): handle upstream -32042 in CallTool — broker URL elicitati…
a89a180
…ons, retry once (#2079)
@dezren39
fix(mcpx): unambiguous broker row IDs and atomic negotiated read (Cod…
f3cd691
…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.
@dezren39
dezren39 force-pushed the queue/3311-2079-mcpx-32042-broker-retry branch from 3adca52 to f3cd691 Compare October 30, 2026 21:16
@dezren39 dezren39 mentioned this pull request Oct 30, 2026
mcpx: mcpclient stress suite hits rotating pre-existing DATA RACEs (legacy reinit + handoff tests) #2842
Closed
3 tasks
@dezren39
dezren39 merged commit 497c820 into main Oct 30, 2026
13 of 15 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@dezren39
dezren39 deleted the queue/3311-2079-mcpx-32042-broker-retry branch October 30, 2026 22:03
This was referenced Oct 31, 2026
mcpx: Phase 3 of #2077 — produce -32042 where it is true, register truth-up (ELI-04/09/12), and #1935 closure #2080
Closed
mcpx: produce -32042 for undeliverable URL elicitations (#2080) #2886
Merged
@dezren39

dezren39 commented Oct 31, 2026

Copy link
Copy Markdown
Member Author

🤖 Agent note · picked up → blocked (packet_defect)

  • Agent: repo-worker-code (Lane B)
  • Session / ID: queue task 4252 (triage, attempt 3)
  • Found via: queue claim, repo-health-code-pilot
  • Defect: the packet targets "issue 2760", but feat(mcpx): handle upstream -32042 in CallTool — broker URL elicitations, retry once (#2079) #2760 is PR "feat(mcpx): handle upstream -32042 in CallTool" — already MERGED (squash 497c820) for issue mcpx: Phase 2 of #2077 — handle upstream -32042: open the URL elicitations at the broker and retry the call once #2079, which is CLOSED. The packet REQ also claims an existing test at src/state.rs:1602 asserting onRateLimitWait-exposes-WAITING-via-discovery and asks for tests in event_hub.rs (relay pool blocking drain): GitHub code search returns 0 hits for onRateLimitWait, event_hub, and filename state.rs in developing-today/code, and 0 hits for onRateLimitWait/event_hub in opencode, openchamber, and dezren39/nix. The named artifacts do not exist in any fleet repo, so the packet cannot be worked as written and no different task was improvised (§2 packet-defect rule).
  • Action: task 4252 blocked with reason class packet_defect; the producer should re-issue a corrected packet naming the real repo/files, or drop it if the underlying test gap was already covered elsewhere.
  • Links: feat(mcpx): handle upstream -32042 in CallTool — broker URL elicitations, retry once (#2079) #2760 · mcpx: Phase 2 of #2077 — handle upstream -32042: open the URL elicitations at the broker and retry the call once #2079
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dezren39 dezren39 added queue/blocked Queue or user escalation state status/blocked Queue or user escalation state queue/queued Has a queued queue task and removed status/blocked Queue or user escalation state queue/blocked Queue or user escalation state labels Oct 31, 2026
@dezren39

dezren39 commented Oct 31, 2026

Copy link
Copy Markdown
Member Author

🤖 Agent note · correction to the note above

  • The packet-defect evidence in the previous note stands, but the terminal verb did not land: this lane's claim on queue task 4252 was lost (heartbeat: "task 4252 is not claimed by repo-worker-code") and the task fell back to queued before the block could be applied.
  • Labels on this PR have been restored to match the task's actual state (queue/queued); the blocked labels from the previous note were removed.
  • Next claimant / producer: the defect to act on is unchanged — feat(mcpx): handle upstream -32042 in CallTool — broker URL elicitations, retry once (#2079) #2760 is a merged PR for closed mcpx: Phase 2 of #2077 — handle upstream -32042: open the URL elicitations at the broker and retry the call once #2079, and src/state.rs, event_hub.rs, onRateLimitWait exist in none of the four fleet repos (code search 0 hits). Block task 4252 as packet_defect or re-issue a corrected packet.
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dezren39
dezren39 restored the queue/3311-2079-mcpx-32042-broker-retry branch November 1, 2026 09:07
@dezren39
dezren39 deleted the queue/3311-2079-mcpx-32042-broker-retry branch November 1, 2026 16:45
This was referenced Nov 3, 2026
Preserved branch: queue/3311-2079-mcpx-32042-broker-retry — decision needed (merge / cherry-pick / drop) #3666
Closed
Design: mcpx elicitation era edges — downgrade rich enums for old hosts, complete the -32042 circuit, close the stale url row #2077
Closed
@dezren39 dezren39 mentioned this pull request Nov 21, 2026
Closure audit: every closed issue/PR verified; unmerged branches + unpushed worktrees inventoried #7079
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@chatgpt-codex-connector chatgpt-codex-connector[bot] chatgpt-codex-connector[bot] left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@dezren39 dezren39

Labels

queue/queued Has a queued queue task

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@dezren39
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.