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 — mcpx: Phase 1 of #1834 — typed sampling errors (-1 on rejection, -32602 tool-shape, expiry stays -32603) · Issue #1835 · developing-today/code

mcpx: Phase 1 of #1834 — typed sampling errors (-1 on rejection, -32602 tool-shape, expiry stays -32603) #1835

New issue
Copy link
New issue
Copy link
Closed
#2440
Closed
mcpx: Phase 1 of #1834 — typed sampling errors (-1 on rejection, -32602 tool-shape, expiry stays -32603)#1835
#2440
Copy link
Assignees
dezren39
Labels
app/mcpxPackage/app: mcpx (pkgs/ or apps/ in this repo)effort/mMedium: expected under 1 day of workkind/bugSomething isn't working (prefixed form of the classic bug label)priority/normalOrdinary priority (the default)source/design-architectFiled by the repo design architect job

Description

@dezren39
dezren39
opened on Oct 28, 2026
Issue body actions

Phase 1 of #1834 — typed sampling errors

Design: #1834 (mcpx sampling trust boundary). Design doc: files/designs/code-mcpx-sampling-trust-boundary.md in the keep-the-four-repos-healthy goal workspace. Origin: dezren39/darwin-nix#256.

Problem

Every sampling failure reaches the upstream as -32603. The 2025-11-25 sampling error table assigns -1 to user rejection and -32602 to tool-shape violations (tool result missing in a request; tool results mixed with other content), but mcpx produces neither: a declined sampling answer becomes errors.New("the sampling request was " + action) in sampleViaBroker (pkgs/mcpx/internal/daemon/hooks.go), an expired/cancelled wait becomes the raw broker Await error, and Client.answer's handler wrap (pkgs/mcpx/internal/mcpclient/modern.go ~L296-303) flattens every handler error to &rpcError{Code: -32603}. Gap: sampling-client-errors-user-rejected-and-tool-shape in pkgs/mcpx/internal/conformance/coverage_clientfeatures.go.

Scope

  • A typed sampling-rejection error in the daemon sampling path, carrying its JSON-RPC code.
  • Answerer decline or cancel of a sampling question surfaces to the upstream as -1 with the action named in the message.
  • Expiry / no answerer stays -32603, with a message explicitly naming expiry — nobody chose, so it is not a rejection. Do not map it to -1.
  • Client.answer's handler-error wrap preserves a typed error's code instead of flattening it to -32603 (typed errors pass through; untyped handler errors keep today's -32603).
  • Define the -32602 tool-shape error type here so Phase 2 (mcpx: design — sampling trust boundary (reviewable, validated, honestly error-coded) #1834's validation phase) raises it; Phase 1 does not itself add content checks.

Out of scope: any message/result validation (Phase 2), CLI rendering (Phase 3), elicitation error paths (untouched), sampling rate limits (nix#257).

Tests (defining)

  • Declined sampling answer → upstream sees -1 naming the decline.
  • Cancelled sampling answer → upstream sees -1.
  • Expired wait (broker TTL) → upstream sees -32603 with expiry named in the message.
  • Untyped handler failure → still -32603.
  • Elicitation decline/cancel behaviour unchanged (existing tests pass).

Acceptance criteria

  • Declined/cancelled sampling reaches the upstream as -1; expired waits as -32603 naming expiry; the typed-error passthrough in Client.answer is covered by tests in both the legacy wire path and the modern input_required path (the answer path is shared — verify both).
  • Gap sampling-client-errors-user-rejected-and-tool-shape is retired for its -1 half; the -32602 half is exercised end-to-end by Phase 2.
  • No elicitation error behaviour changes.

Activity

Next
  1. dezren39
    added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    task/triageQueue packet kind: verify, reproduce, and route this item
    status/needs-triageNot yet triaged; needs a first look
    priority/normalOrdinary priority (the default)
    queue/queuedHas a queued queue task
    app/mcpxPackage/app: mcpx (pkgs/ or apps/ in this repo)
    effort/mMedium: expected under 1 day of work
    source/design-architectFiled by the repo design architect job
    on Oct 28, 2026
  2. developing-today commented on Oct 28, 2026

    @developing-today
    developing-todayBot
    on Oct 28, 2026 – with developing.today
    Contributor
    More actions

    CODE-764

  3. dezren39
    added a parent issue on Oct 28, 2026
    • mcpx: design — sampling trust boundary (reviewable, validated, honestly error-coded) #1834
  4. dezren39 commented on Oct 28, 2026

    @dezren39
    dezren39
    on Oct 28, 2026
    MemberAuthor
    More actions

    Phase 1 of design #1834, filed by the design architect (2026-10-28). Triage packet enqueued to repo-health-code-pilot as task 2718 (verified: queue=repo-health-code-pilot, status=queued, last_error=null).

  5. github-actions
    assigned
    dezren39
    on Oct 28, 2026
  6. dezren39
    added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    on Oct 29, 2026
  7. 30 remaining items

  8. dezren39
    added
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    status/parkedDeliberately paused with a recorded resume condition
    and removed
    status/in-progressQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    on Oct 29, 2026
  9. dezren39 commented on Oct 29, 2026

    @dezren39
    dezren39
    on Oct 29, 2026
    MemberAuthor
    More actions

    🤖 Agent note · parked (Lane C shift, gate recheck 23:01Z)

    • Task: 3050 (mcpx Phase 1 typed sampling errors). PR mcpx: typed sampling errors — -1 on rejection, expiry stays -32603 (#1835) #2440 OPEN, MERGEABLE/CLEAN, head 8e5c00d, no failing/pending checks; prior verification: all basic checks PASS, Codex completed with no findings.
    • Gate unchanged: main still 5a34fa7; ci: merge queue ejects every PR — no merge since #2233 (10:57Z), entries dropped 2-6 min into AWAITING_CHECKS #2403 still OPEN (merge-queue freeze; admin config decision pending). Ejection of this PR was already verified earlier today.
    • Action: re-parked 1h without an enqueue cycle. Resume when ci: merge queue ejects every PR — no merge since #2233 (10:57Z), entries dropped 2-6 min into AWAITING_CHECKS #2403 fix lands: re-enqueue mcpx: typed sampling errors — -1 on rejection, expiry stays -32603 (#1835) #2440, merge, complete fixed_merged.
  10. dezren39 commented on Oct 29, 2026

    @dezren39
    dezren39
    on Oct 29, 2026
    MemberAuthor
    More actions

    Lane D (queue task 3050) gate recheck: PR #2440 still OPEN/CLEAN/MERGEABLE at 8e5c00d, no failing or pending checks; #2403 still OPEN; main still 5a34fa7. Gate unmet — re-parked without another enqueue cycle (four enqueue attempts by this shift on sibling PRs were all ejected within minutes; evidence on #2403). Resume verbatim: main advances past 5a34fa7 or #2403 closes → disposition any Codex findings on #2440 → re-enqueue → merge → complete fixed_merged + close this issue.

  11. dezren39
    closed this as completedin #2440on Oct 30, 2026
  12. developing-today
    added
    status:done
    and removed
    status:in-review
    on Oct 30, 2026
  13. dezren39 commented on Oct 30, 2026

    @dezren39
    dezren39
    on Oct 30, 2026
    MemberAuthor
    More actions

    🤖 Agent note · done

    • Agent: queue worker (repo-worker-code), lane C shift
    • Session / ID: queue task 3050, shift 2026-10-29 19:14 CDT
    • Found via: queue claim (resume of merge_ready park)
    • Task: Merge PR mcpx: typed sampling errors — -1 on rejection, expiry stays -32603 (#1835) #2440 (typed sampling errors, Phase 1 of mcpx: design — sampling trust boundary (reviewable, validated, honestly error-coded) #1834) once the merge queue recovered
    • Result: PR mcpx: typed sampling errors — -1 on rejection, expiry stays -32603 (#1835) #2440 MERGED at 2026-10-30T00:34:46Z, merge commit 1ddc772. Codex gate checked fresh this shift: the Codex review summary on head 8e5c00d reports no findings and none unresolved, and the PR has zero review threads; basic checks (proxy port fallbacks, spec parity, test) all pass. This issue auto-closed on merge; its in-flight queue/work/status labels were stripped (the task/triage label was also removed — this was an implementation fix, not a triage item).
  14. dezren39
    removed
    status:done
    task/triageQueue packet kind: verify, reproduce, and route this item
    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 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @dezren39
    dezren39

Labels

app/mcpxPackage/app: mcpx (pkgs/ or apps/ in this repo)effort/mMedium: expected under 1 day of workkind/bugSomething isn't working (prefixed form of the classic bug label)priority/normalOrdinary priority (the default)source/design-architectFiled by the repo design architect job

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    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.