Skip to content

mcpx: sampling relay -- human review, validation of results, error mapping (8 conformance rows) #1955

Closed

Description

@dezren39

Relocated from dezren39/darwin-nix#256 on 2026-10-28 (placement audit): mcpx's single source lives in developing-today/code (pkgs/mcpx); re-home tracked at #309. Original body below; issue references inside it are historical (dezren39/nix numbering).

Gap keys sampling-review (4), sampling-validation (2), sampling-errors (1) in docs/spec/conformance-matrix.md: relayed sampling/createMessage is not offered for human review, results are not validated against the request (model/tool-use shape), and failures are not mapped to the codes the revisions specify. Sampling is deprecated in 2026-07-28; user instruction is to keep it working, add nothing new -- so scope is conformance only.

Acceptance criteria

  • Relayed sampling/createMessage is offered for human review per the sampling-review rows.
  • Sampling results are validated against the request (model/tool-use shape) before relay.
  • Sampling failures map to the error codes the current revision specifies.
  • Scope stays conformance-only: sampling is deprecated in 2026-07-28 and the standing instruction is keep-working, add-nothing-new.

Activity

  1. developing-today commented on Oct 28, 2026

    @developing-today
    Contributor
  2. dezren39 commented on Oct 28, 2026

    @dezren39
    MemberAuthor

    History carried over from dezren39/darwin-nix#256 (verbatim, oldest first):


    @dezren39 · 2026-10-27T15:35:39Z

    Intake review

    Fleet monitor intake pass, 2026-10-27 (repo-fleet-monitor).

    Related: the 2026-09-30 mcpx conformance set — parent analysis #252, siblings #253, #254, #255, #256, #257, #258, #259 (filed together from docs/spec/conformance-matrix.md in dezren39/nix). Treat the set as one body of work; do not re-file per-gap issues.

    Notes: 8 conformance rows (sampling-review ×4, sampling-validation ×2, sampling-errors ×1 +1). Effort l. The deprecation note in the body is the scope guard — this is correctness of an existing relay, not new sampling features.

    Risks: Building review UI beyond the conformance rows; keep to the matrix.

    Suggested approach: error mapping and result validation first (pure relay logic), human-review surface last.


    @dezren39 · 2026-10-28T19:12:51Z

    Triage verdict (task 2310): CONFIRMED at current main for validation + error mapping; human-review subset needs a design decision first.

    Verified at developing-today/code main 35726e8e (mcpx source: pkgs/mcpx):

    • The conformance matrix still cites fix(id): show world chat only to participants who may chat or read history #256 on 26 rows. Distinct open gaps: sampling-both-validate-message-content (both sides, every spec section), sampling-client-errors-user-rejected-and-tool-shape (conformance-matrix.md:1621), and the four human-review keys.
    • Code confirms the first two: internal/mcpclient/modern.go answer() relays sampling/createMessage straight to the handler — params/results are not validated against the request — and every handler error returns -32603 (~:296–300). Neither -1 (user rejected) nor -32602 is produced on this path. (Older-revision user-rejected rows are already tested; the gap is the 2025-11-25 combined row.)
    • Human review: the matrix says 'a sampling request is routed to the agent audience; nothing lets a person review or edit the prompt or the result'. That routing is deliberate — internal/elicit/policy.go:138: 'sampling asks a model, and the agent driving mcpx has one'. What 'human review' should mean for a headless agent relay (interrupt the agent flow? an approval audience like elicitation's?) is a design decision, not an implementation detail, so it is not in the fix packet. Drew/design: this is the decision fix(id): show world chat only to participants who may chat or read history #256 still needs.

    Routing: validation + error-mapping fix enqueued as task 2620 (queue repo-health-nix-pilot, dedupe repo-health:v1:fix:dezren39/nix:issue:256), conformance-only scope per the standing instruction (sampling is deprecated in 2026-07-28: keep working, add nothing new). This issue stays open for the human-review decision + the packet's matrix rows.

  3. added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    priority/lowNice to have; do when convenient
    effort/lLarge: multi-day or open-ended; expect staged check-ins
    meta/enrichedIntake review done: acceptance criteria, links, and normalized labels added
    app/mcpxPackage/app: mcpx (pkgs/ or apps/ in this repo)
    queue/queuedHas a queued task in the Supabase agent queue
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    and removed
    queue/queuedHas a queued task in the Supabase agent queue
    on Oct 28, 2026
  4. dezren39 commented on Oct 28, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · picked up

  5. dezren39 commented on Oct 28, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · done

    Dedupe result (checked fresh 2026-10-28T22:53Z)

    Design #1834 — "mcpx: design — sampling trust boundary (reviewable, validated, honestly error-coded)" (filed 2026-10-28T21:35Z, origin: dezren39/darwin-nix#256) scopes exactly this issue's subject, including its conformance-only scope guard, and settles the human-review design question the earlier task-2310 triage left open: review happens through the existing mcpx elicit surface — "no Drew direction decision is needed — nix#256's acceptance is explicit". Its three phase issues map 1:1 onto this issue's acceptance criteria:

    This issue's acceptance Covered by
    Sampling failures map to the error codes the revision specifies (-1 user-rejected, -32602 tool-shape, expiry stays -32603) #1835 Phase 1 — typed sampling errors (open, queue/queued)
    Sampling results validated against the request (model/tool-use shape) before relay #1836 Phase 2 — sampling message + result validation at the broker (open, queue/queued); tool-shape side also in #1835
    Relayed sampling/createMessage offered for human review per the sampling-review rows #1837 Phase 3 — reviewable sampling in mcpx elicit + matrix/register truth-up + nix#256 evidence (open, queue/queued, gated on Phase 2)
    Conformance-only scope (deprecated in 2026-07-28; keep working, add nothing new) #1834 design states the same guard verbatim

    Scope itself is confirmed live, not stale: the conformance matrix at current main (6a284efd7) still cites #256 on 26 rows, and #1835/#1836/#1837 cite the current code sites (sampleViaBroker in internal/daemon/hooks.go, the -32603 flattening wrap in internal/mcpclient/modern.go ~L296-303, renderQuestion in internal/cli/elicit.go).

    Loose end named

    Task 2620 (queue repo-health-nix-pilot, dedupe repo-health:v1:fix:dezren39/nix:issue:256) — the validation+error-mapping packet the task-2310 triage enqueued before relocation — is superseded by #1835/#1836 in the code pilot queue. It is not claimed (nix queue claimed_count 0 at check time); flagging it here for cancellation by the nix lane / fleet monitor rather than cancelling another queue's task from this lane.

    Closing this issue as a duplicate (GitHub state_reason: duplicate) per the triage packet's duplicate rule — scope is not shrunk; every acceptance item has a named, queued home above.

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/lLarge: multi-day or open-ended; expect staged check-inskind/bugSomething isn't working (prefixed form of the classic bug label)meta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedpriority/lowNice to have; do when convenientstatus:done

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions