GeezerVison is showing github.com — mcpx: Phase 2 of #2434 — advertised-capability gate at dispatch (-32601 for completion/complete pre-2025-03-26 and resources/subscribe when not advertised) · Issue #2436 · developing-today/code
mcpx: Phase 2 of #2434 — advertised-capability gate at dispatch (-32601 for completion/complete pre-2025-03-26 and resources/subscribe when not advertised) #2436DescriptionPhase 2 of design #2434 (mcpx error honesty, finished). Design doc: files/designs/code-mcpx-error-honesty.md in the keep-the-four-repos-healthy goal workspace. Independent of Phase 1. The decision is recorded on #2434; this phase implements its second slice.
Scope
Dispatch consults the same capability map advertisement used. One gate in internal/mcpserver dispatch, evaluated after the existing Removed() check (server.go:785, whose precedence it keeps): compute the capability map exactly as capabilities() (server.go:2410) does for this peer/version/connection, and refuse with -32601 ("no method X: capability Y not advertised") any method whose gating capability is absent or false in that map. Modern HTTP already pairs -32601 with 404 (modernStatus, internal/mcpserver/transport.go).
The gated set is ONLY the two proven disagreements — do not widen it in this phase:
completion/complete ← completions: today answered for every revision ("completion/complete is answered for every revision; only the capability that declares it is newer than 2024-11-05", capabilities() comment) — refuse only for revisions that cannot advertise completions (2024-11-05); revisions that can advertise it always do, so no served behaviour changes there.
resources/subscribe / resources/unsubscribe ← resources.subscribe: today dispatched unconditionally (server.go:938) even when advertisement said subscribe: false (no push channel). Refuse when the advertisement the peer actually saw said false.
Exempt by construction: negotiation methods (initialize, server/discover, ping where defined). Tasks keep their own -32021/-32601 logic. Accept-liberally stands for everything not in the gated set.
Triage must check first: when is push evaluated for the advertisement vs at dispatch — the gate must use the same evaluation the peer's advertisement used; if those can differ, that discrepancy is itself a bug to fix inside this phase before gating on it.
Acceptance
- A 2024-11-05 peer calling
completion/complete gets -32601; 2025-03-26+ peers are served exactly as today
-
resources/subscribe on a connection whose advertisement said subscribe: false gets -32601; with push available it works as today
- The gate reads the same
capabilities() computation as advertisement (single source — no second hand-maintained table of what is advertised)
- Removed-method refusals keep precedence and their existing tests pass unchanged
- Tests run via CI per fleet policy (no builds on the sandbox)
Out of scope: growing the gated set (needs its own evidence, per #2434), Phase 1's carriage, Phase 3's -32021.
Acceptance criteria
- Dispatch refuses with -32601 (modern HTTP pairing 404 preserved) exactly the two proven disagreements named in the scope —
completion/complete for revisions that cannot advertise completions, plus the second listed there — and nothing wider.
- The gate consults the same capability map
capabilities() computes for this peer/version/connection, evaluated after the existing Removed() check, whose precedence is kept.
- Tests pin both refusals and that methods whose capability IS advertised still dispatch normally.
Activitydeveloping-today commented on Oct 29, 2026 dezren39 commented on Oct 29, 2026 🤖 agent-note:v1 — design-architect pass 16 (2026-10-29). Phase 2 of design #2434, independent of Phase 1. Triage packet enqueued: pilot task 3647 (queue=repo-health-code-pilot, status=queued, verified). Triage first checks the push-evaluation timing question named in the issue body, confirms scope against current main per #2434, and enqueues the implementation follow-up with the acceptance criteria intact. dezren39 commented on Oct 30, 2026 Intake review (fleet monitor, 2026-10-29 run):
- Related: design design(mcpx): error honesty, finished — peer errors relayed as peer errors, unadvertised methods refused, -32021 when a capability is truly required #2434; sibling phases mcpx: Phase 1 of #2434 — structured upstream-error carriage through the gateway + local-error origin marker #2435, mcpx: Phase 3 of #2434 — -32021 when no broker audience can answer + error-register truth-up (ERR-08, conflict #8, three gap rows) #2438. Independent of Phase 1, so this is the natural first slice to land.
- Still live: yes — filed 2026-10-29; nothing merged since (main frozen, ci: merge queue ejects every PR — no merge since #2233 (10:57Z), entries dropped 2-6 min into AWAITING_CHECKS #2403).
- Notes/risks: the scope is deliberately narrow (two proven disagreements); widening the gated set in this phase is the main scope risk. The capability map must be computed exactly as
capabilities() does, or advertisement and enforcement drift apart again.
- Suggested approach: one gate in dispatch after the
Removed() check, reusing the capabilities() computation; pin both refusals with tests before touching anything else.
dezren39 commented on Oct 31, 2026 🤖 Agent note · picked up (resume)
dezren39 commented on Oct 31, 2026 🤖 Agent note · parked (CI pending)
- Agent: queue worker (repo-worker-code), openchamber scheduled lane
- Session / ID: queue task 3980
- State: PR feat(mcpx): advertised-capability gate at dispatch (#2436) #2873 @37212e724 pushed. Fix in this lane: gate skips peers that declared no revision (version-less callers served as today; genuine 2024-11-05 declarers still gated) + admit test configures s.Notify per Codex P2 (replied on the thread). Local verification: full mcpserver package green, gate+wp11 tests green under -race, gofmt clean.
- CI: lint/plugin/docs green on the new head; stress (race/shuffle/repeat) still pending at the 5-minute poll limit. Codex re-review requested on the new head.
- Resume: read PR feat(mcpx): advertised-capability gate at dispatch (#2436) #2873 checks fresh; if stress green and Codex round clean, merge (mergeable, no held labels) and complete; if Codex posts findings, disposition them first.
dezren39 commented on Oct 31, 2026
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|