Skip to content

mcpx: Phase 3 of #1834 — reviewable sampling in mcpx elicit + matrix/register truth-up + nix#256 evidence #1837

Open

Description

@dezren39

Phase 3 of #1834 — reviewable sampling in mcpx elicit + truth-up + nix#256 evidence

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. Gated on Phase 2 of #1834 (the rendering shows the validated shapes, and the truth-up needs both earlier phases' as-built state).

Problem

A person cannot review a sampling request, because the prompt is not shown. Sampling questions are broker rows whose Message is the request's system prompt (or "<server> asks for a model completion") and whose Schema field carries the full CreateMessageRequest — but renderQuestion (pkgs/mcpx/internal/cli/elicit.go) renders Schema as a JSON Schema: describeSchema looks for properties, a sampling request has none, so the messages render as nothing and the answer example offered is '{}'. elicit.Route (internal/elicit/elicit.go ~L502-503) also sends every Sample question to the agent audience unconditionally. Gaps: sampling-app-review-ui, sampling-app-view-edit-prompts, sampling-app-review-responses, sampling-client-user-approval-controls in pkgs/mcpx/internal/conformance/coverage_clientfeatures.go.

Scope — the existing surface learns sampling (no new UI)

  • renderQuestion for a Sample question renders it as sampling: requesting server, system prompt, and the message list (role + content per message, text verbatim) — not via describeSchema. mcpx elicit show gives the full request JSON.
  • The answer example for a Sample question is a real CreateMessageResult skeleton (role/model/content/stopReason), not '{}'.
  • CLI help/docs for Sample questions state the review story plainly: a pending question can be inspected and answered/overridden by a person through list/show/answer; answered results are recorded on the broker row and visible via mcpx elicit result <id>. Do NOT claim a pre-delivery staging state exists — building one is an open question on mcpx: design — sampling trust boundary (reviewable, validated, honestly error-coded) #1834, not part of this phase.
  • Existing approval controls (audience routing, policy, decline) stay as they are; no new gate is invented.

Truth-up

  • pkgs/mcpx/docs/spec/conformance-matrix.md rows for all seven scoped #256 gaps updated to as-built — retired, or explicitly partial per row where the as-built state only partially meets the row (the review rows in particular: claim only what the rendering/routing changes actually deliver).
  • Compare-register sampling rows touched by this design (SMP-05, SMP-06, SMP-10 in pkgs/mcpx/docs/compare/register/sampling.md) updated to as-built.
  • Completion evidence comment on mcpx: sampling relay -- human review, validation of results, error mapping (8 conformance rows) dezren39/darwin-nix#256 against each of its four acceptance bullets with the landing PRs; close nix#256 if and only if every bullet is met, naming any that is not.

Out of scope: validation or error-code changes (Phases 1–2), a pre-delivery staging hold, sampling rate limits (nix#257), elicitation rendering (that is #1675 Phase 3's ground — reuse its patterns, don't redo it).

Acceptance criteria

Activity

  1. added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    task/triageQueue packet kind: verify, reproduce, and route this item
    status/blockedQueue or user escalation state
    priority/normalOrdinary priority (the default)
    queue/queuedHas a queued task in the Supabase agent queue
    on Oct 28, 2026
  2. developing-today commented on Oct 28, 2026

    @developing-today
    Contributor
  3. added
    app/mcpxPackage/app: mcpx (pkgs/ or apps/ in this repo)
    effort/mMedium: expected under 1 day of work
    on Oct 28, 2026
  4. dezren39 commented on Oct 28, 2026

    @dezren39
    MemberAuthor

    Phase 3 of design #1834, filed by the design architect (2026-10-28), status/blocked gated on Phase 2 (#1836). Triage packet enqueued to repo-health-code-pilot as task 2720 (verified: queue=repo-health-code-pilot, status=queued, last_error=null).

  5. dezren39 commented on Oct 28, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · handed off

  6. added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed
    queue/queuedHas a queued task in the Supabase agent queue
    on Oct 29, 2026
  7. dezren39 commented on Oct 29, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · picked up

  8. dezren39 commented on Oct 29, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · triage verdict — BLOCKED on Phase 2 landing

    Verdict: scope confirmed as written, but Phase 3 is not yet triage-completable — its gate (Phase 2 as-built state) does not exist. This task is blocked on #1836's implementation landing; status/blocked remains, truthfully.

    What triage verified fresh (2026-10-29 ~03:58Z):

    1. The Phase 3 problem is confirmed unchanged on current main. pkgs/mcpx/internal/cli/elicit.go: renderQuestion (~L204) still feeds the question's Schema to describeSchema (~L233), which looks up properties (~L242) — a sampling request carries a full CreateMessageRequest there, not a JSON Schema, so its messages render as nothing; exampleFor (~L273) is the path that offers '{}' for such a question. pkgs/mcpx/internal/elicit/elicit.go Route still returns ToAgent unconditionally for Mode == Sample. No superseding PR or competing branch was found for this work.
    2. The Phase 2 gate is not met. mcpx: Phase 1 of #1834 — typed sampling errors (-1 on rejection, -32602 tool-shape, expiry stays -32603) #1835 (Phase 1) and mcpx: Phase 2 of #1834 — sampling message + result validation at the broker (pairing, era shape, no silent fill-in) #1836 (Phase 2) are both OPEN; their triage tasks were only claimed today (2026-10-29T03:53Z, mcpx: Phase 2 of #1834 — sampling message + result validation at the broker (pairing, era shape, no silent fill-in) #1836 = task 2719, Lane C) and neither phase's implementation has landed. There is therefore no Phase 2 as-built state to confirm the rendering scope or the truth-up rows against, and no landing PRs to cite as completion evidence. Enqueueing the Phase 3 implementation packet now would mean guessing the as-built shapes it must match — so no follow-up packet is enqueued in this pass, deliberately, and the issue's acceptance criteria are left fully intact (no silent shrink). Packet scope also excludes unblocking this phase before Phase 2 lands.
    3. nix#256 state correction: mcpx: sampling relay -- human review, validation of results, error mapping (8 conformance rows) dezren39/darwin-nix#256 is CLOSED, but its closure (2026-10-28T22:44Z) was a relocation ("Moved to mcpx: sampling relay -- human review, validation of results, error mapping (8 conformance rows) #1955"), not an acceptance-met closure — its four acceptance bullets remain unchecked, and mcpx: sampling relay -- human review, validation of results, error mapping (8 conformance rows) #1955 was itself closed as a duplicate of the mcpx: design — sampling trust boundary (reviewable, validated, honestly error-coded) #1834 set with this issue as the named home for the human-review item. The completion-evidence comment on nix#256 is therefore still owed at Phase 3 completion, and its closed state must not be read as "bullets met."
    4. Settled by this triage — non-text content blocks in the rendered message list: text blocks render verbatim; each non-text block renders as a one-line typed placeholder in message order giving the block type and mime/source kind (e.g. [image content: image/png — payload not inlined]), with the payload/base64 never inlined and the block never silently dropped. The reviewer sees the full request shape, the terminal stays readable, and no binary or credential-bearing payload spills into the CLI surface. This matches the design doc's content-shape terms in files/designs/code-mcpx-sampling-trust-boundary.md.

    Resume condition: when #1836's implementation PR has merged, re-run this triage — confirm the Phase 3 scope against Phase 2's as-built state, then enqueue the Phase 3 implementation packet with the acceptance criteria above intact (rendering + CreateMessageResult skeleton + honest review-story docs + seven-gap matrix truth-up + SMP-05/SMP-06/SMP-10 + nix#256 evidence comment).

  9. added
    queue/blockedQueue or user escalation state
    queue/queuedHas a queued task in the Supabase agent queue
    and removed
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on Oct 29, 2026
  10. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    Gate check from the #1834 triage (task 7749): Phase 3's blocker is satisfied.

  11. developing-today commented on Nov 3, 2026

    @developing-today
    Contributor

    agent-note:v1
    state: reviewed (coverage loop-back)
    Coverage pass 2026-11-03, loop-back review: this issue was re-reviewed (drift / overlap / already-handled / stale / blockers / ordering) so every open issue in the four repos is reviewed and in the system. Verdict: still live; in the system as task 2720 (triage, blocked, priority 30) in repo-health-code-pilot. Labels audited and synced. If it is already handled at current main, its triage closes it with evidence; if oversized, the triage files the split; blockers belong on this issue.
    Found via: coverage loop-back 2026-11-03

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/bugSomething isn't working (prefixed form of the classic bug label)priority/normalOrdinary priority (the default)queue/blockedQueue or user escalation statequeue/queuedHas a queued task in the Supabase agent queuesource/design-architectFiled by the repo design architect jobstatus/blockedQueue or user escalation statetask/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