Skip to content

mcpx: Phase 2 of #2434 — advertised-capability gate at dispatch (-32601 for completion/complete pre-2025-03-26 and resources/subscribe when not advertised) #2436

Closed

Description

@dezren39

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

Activity

  1. added
    task/triageQueue packet kind: verify, reproduce, and route this item
    priority/normalOrdinary priority (the default)
    queue/queuedHas a queued task in the Supabase agent queue
    app/mcpxPackage/app: mcpx (pkgs/ or apps/ in this repo)
    on Oct 29, 2026
  2. developing-today commented on Oct 29, 2026

    @developing-today
    Contributor
  3. dezren39 commented on Oct 29, 2026

    @dezren39
    MemberAuthor

    🤖 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.

  4. added
    meta/enrichedIntake review done: acceptance criteria, links, and normalized labels added
    on Oct 30, 2026
  5. dezren39 commented on Oct 30, 2026

    @dezren39
    MemberAuthor

    Intake review (fleet monitor, 2026-10-29 run):

  6. 49 remaining items

  7. dezren39 commented on Oct 31, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · picked up (resume)

  8. dezren39 commented on Oct 31, 2026

    @dezren39
    MemberAuthor

    🤖 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.
  9. added
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    status/parkedDeliberately paused with a recorded resume condition
    and removed
    queue/claimedQueue worker lifecycle state
    on Oct 31, 2026
  10. dezren39 commented on Oct 31, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · done

  11. removed
    status/parkedDeliberately paused with a recorded resume condition
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    work/assignedQueue worker lifecycle state
    on Oct 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

app/mcpxPackage/app: mcpx (pkgs/ or apps/ in this repo)effort/mMedium: expected under 1 day of workkind/enhancementmeta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedpriority/normalOrdinary priority (the default)source/design-architectFiled by the repo design architect jobtask/triageQueue packet kind: verify, reproduce, and route this item

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions