Skip to content

design(mcpx): elicitation broker hygiene — owner-only store, bounded retention, redacted events, review-first answering #1675

Closed
3 of 3 issues completed

Description

@dezren39

Summary

The elicitation broker is where mcpx puts the most sensitive data it handles — questions routed to a human precisely because an agent should not hold them (password/credential-shaped fields, per elicit.Route), sampling prompts "stored exactly as sent", and the answers — and it is the least protected store in the daemon. On current main the broker DB sits in a 0755 directory any local user can read, no row is ever deleted, and the full question and answer are broadcast as event-bus data to every subscriber. The one human surface over the store, mcpx elicit, prints raw URLs with no domain emphasis or punycode warning, pre-fills "..." instead of schema defaults, and answers with no review step. This design gives the broker an owner-only home with migration for existing installs, a documented retention bound, summary-only event payloads, and a review-first answering surface.

Design doc: files/designs/code-mcpx-elicitation-broker-hygiene.md in the keep-the-four-repos-healthy goal workspace (full audit, alternatives, risks, open questions).

No Drew direction decision needed: origin dezren39/darwin-nix#255's acceptance is explicit (owner-only store verified on disk; pruning with a documented bound), the owner-only precedent is already in-tree (internal/artifacts and the state dir at 0o700), and the judgment calls (dedicated 0700 subdir rather than tightening the shared logs dir; summary-only events; retention defaults of 30 days / 1000 terminal rows) are recorded in the design doc.

Current state (verified on main d39e611, 2026-10-28)

Proposal (phased; each phase independently landable)

  1. Phase 1 — owner-only store. One path helper in internal/elicit; the store moves to a dedicated state subdir at 0700, DB files 0600; a legacy logs/elicit.db is migrated on open with pending questions preserved; modes are tightened on open for pre-existing installs and failure to tighten is an error. Both open sites use the helper.
  2. Phase 2 — bounded retention + redacted events (gated on Phase 1). Terminal rows pruned on open by age + count bounds from defaults.json (30 days / 1000 rows, recorded defaults); pending rows never pruned. ElicitOpened/ElicitAnswered payloads become summary-only (id, server, tool, mode, audience, state, expiry — never message/schema/url/content) at all publish sites, with a tree-wide consumer audit.
  3. Phase 3 — review-first answering surface + truth-up (gated on Phases 1–2). URL domain emphasis + punycode warning; schema defaults pre-filled in form rendering; interactive render-and-confirm for mcpx elicit answer with a script-preserving opt-out (non-interactive behaviour unchanged). Retire the six elicit-ui gaps; completion evidence on mcpx: elicitation storage is readable by any local user and never pruned; elicitation UI and response validation rows dezren39/darwin-nix#255 — commenting, not closing (its validation acceptance is only partly this design's).

Open questions (stay questions; not filed)

  • Should the logs directory itself go owner-only later (log index can carry tool-call arguments)? Its own design if evidence appears.
  • Should sampling rows get a different retention bound than form answers? One bound until size evidence argues otherwise.
  • Does the OpenCode plugin (out-of-tree) read bus payload fields Phase 2 removes? To confirm in Phase 2 triage; the fix is routing it through the broker read path, not restoring the leak.
  • Full TUI edit-in-place for answers vs render-and-confirm? Evidence from actual use first.

Acceptance (design level)

  • Phases 1–3 filed as sub-issues of this issue and landed.
  • Fresh and upgraded installs: elicit.db + its directory owner-only, verified on disk; a question pending across the upgrade is still answerable.
  • Terminal history bounded by the documented age/count limits; pending never pruned.
  • No bus event carries a question's message/schema/URL or an answer's content.
  • mcpx elicit shows the asking server, the URL domain called out (punycode warning where applicable), defaults pre-filled, and an interactive review before relay.
  • mcpx: elicitation storage is readable by any local user and never pruned; elicitation UI and response validation rows dezren39/darwin-nix#255 carries the completion evidence with its remaining validation slice named honestly.

agent-note:v1 — filed by repo design architect (dedicated code job, pass 8, 2026-10-28)

  • task: design origination for the nix#255 elicitation/sampling hygiene cluster, audited against main d39e611
  • outcome: design doc written (files/designs/code-mcpx-elicitation-broker-hygiene.md in the keep-the-four-repos-healthy goal workspace); 3 phases to be filed as sub-issues and enqueued as triage packets
  • dedupe: searched code issues 2026-10-28 (elicit storage, elicit.db, punycode, broker store, prune elicitation) — no existing issue covers this scope; mcpx: Phase 3 of #1481 — validate elicitation form answers against requestedSchema in client.answer #1484 owns only the requestedSchema-validation slice

Activity

  1. added
    priority/normalOrdinary priority (the default)
    app/mcpxPackage/app: mcpx (pkgs/ or apps/ in this repo)
    epicMeta-issue grouping multiple items (org Project Type=Epic)
    effort/lLarge: multi-day or open-ended; expect staged check-ins
    meta/enrichedIntake review done: acceptance criteria, links, and normalized labels added
    kind/designA design proposal (design-architect): multi-step, phased, decision-bearing
    on Oct 28, 2026
  2. dezren39 commented on Oct 28, 2026

    @dezren39
    MemberAuthor

    agent-note:v1 — filed (design originated, queue task n/a — architect run 2026-10-28)

  3. dezren39 commented on Oct 28, 2026

    @dezren39
    MemberAuthor

    agent-note:v1 — CORRECTION to the filed note on this issue (2026-10-28)

  4. dezren39 commented on Oct 29, 2026

    @dezren39
    MemberAuthor

    Program tending — Phase 1 child closed

    Program-tender note (2026-10-29): sub-issue #1676 (Phase 1 of this design) closed 2026-10-29T00:37Z. The remaining phases #1677 and #1678 are still open and were active today (updated 2026-10-29T13:43Z / 13:30Z), so the next step is simply those phases proceeding — nothing is blocked on this epic itself.

  5. 23 remaining items

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

    @dezren39
    MemberAuthor

    🤖 Agent note · handed off

    • Agent: fleet monitor (repo-fleet-monitor)
    • Session / ID: task 7709
    • Found via: monitor reconciliation
    • Task: Claim-eviction repair: the queue task for this issue is queued and unclaimed (its previous claim's lease expired without a complete/park/block), but the issue labels still said claimed. Labels reset to the truth: queue/queued + status/needs-triage. Checkpoint stage on the task: handed_off.
    • Expectation: a queue lane re-claims the task and resumes from the checkpoint stage named in the task progress.
  8. added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed
    queue/queuedHas a queued task in the Supabase agent queue
    on Nov 3, 2026
  9. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · picked up

  10. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · triage verdict — complete; closing parent

    • Agent: queue worker repo-worker-code, OpenChamber scheduled lane (ec118cad-0fd3-4652-91c4-27432f2f2efd)
    • Queue task: 7709 (triage)
    • Verified against: developing-today/code main 52fd50d17e750ae84385b5b41414e886eccee95e and fresh GitHub state, 2026-11-03.

    All three phases of this design are complete: #1676/#1677/#1678 are CLOSED and their implementation PRs are MERGED — #1724 (2953f274), #2202 (7c52ced1), #3011 (16d6d5a8). Current main contains the owner-only store tests (pkgs/mcpx/internal/elicit/store_test.go asserts 0700), prune-on-open at internal/elicit/elicit.go:213-232, and retention defaults 720h / 1000. The review-first CLI phase and its test evidence are in merged #3011. The required completion evidence was posted on relocated tracker #1954, and the legacy dezren39/nix#255 cross-reference names the remaining server-relay validation slice.

    Scope boundary: requested-schema/server-relay validation was explicitly excluded from this three-phase design. A separate validation PR #2646 is currently OPEN; it does not block #1675 acceptance. No live PR remains for any #1675 phase.

    Verdict: the design issue’s acceptance is met; no further split or queue task is needed. Closing #1675 as completed.

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-insepicMeta-issue grouping multiple items (org Project Type=Epic)kind/designA design proposal (design-architect): multi-step, phased, decision-bearingmeta/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