Repository navigation
Description
Phase 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 advertisecompletions(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 saidsubscribe: 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/completegets -32601; 2025-03-26+ peers are served exactly as today -
resources/subscribeon a connection whose advertisement saidsubscribe: falsegets -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/completefor revisions that cannot advertisecompletions, 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 existingRemoved()check, whose precedence is kept. - Tests pin both refusals and that methods whose capability IS advertised still dispatch normally.
Activity
developing-today commentedon Oct 29, 2026
CODE-1243
dezren39 commentedon 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 commentedon Oct 30, 2026
Intake review (fleet monitor, 2026-10-29 run):
capabilities()does, or advertisement and enforcement drift apart again.Removed()check, reusing thecapabilities()computation; pin both refusals with tests before touching anything else.49 remaining items
dezren39 commentedon Oct 31, 2026
🤖 Agent note · picked up (resume)
fix(mcpx): gate only peers that declared a revision; configure notifi…
dezren39 commentedon Oct 31, 2026
🤖 Agent note · parked (CI pending)
feat(mcpx): advertised-capability gate at dispatch (#2436) (#2873)
dezren39 commentedon Oct 31, 2026
🤖 Agent note · done