GeezerVison is showing github.com — design(mcpx): elicitation broker hygiene — owner-only store, bounded retention, redacted events, review-first answering · Issue #1675 · developing-today/code
design(mcpx): elicitation broker hygiene — owner-only store, bounded retention, redacted events, review-first answering #1675Closed 3 / 33 of 3 issues completedClosed 3 / 33 of 3 issues completed 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 DescriptionSummary
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)
- Both broker open sites create the shared
<state>/logs dir with defaults.PublicDirMode (0755, internal/defaults/defaults.json:214): internal/daemon/hooks.go OpenBroker (~L288-294) and internal/cli/elicit.go broker() (~L37-44). elicit.Open (internal/elicit/elicit.go ~L155) creates elicit.db (+ WAL/SHM) with default modes. Gaps elicitation-state-storage-protected and elicitation-server-follow-best-practices (internal/conformance/coverage_clientfeatures.go, origin mcpx: elicitation storage is readable by any local user and never pruned; elicitation UI and response validation rows dezren39/darwin-nix#255).
internal/elicit/elicit.go contains no DELETE: expireOverdue (~L437) only transitions pending → expired. Every question, answer, and sampling request accumulates forever. Gap sampling-messages-not-retained-between-requests.
- Full payloads on the bus:
events.ElicitOpened with Data: mustJSON(req) and events.ElicitAnswered with Data: mustJSON(ans) at internal/daemon/hooks.go ~L164-171, internal/daemon/consumer.go ~L325/424/505, internal/daemon/routes_proto.go ~L669, internal/daemon/server.go ~L1395. No in-tree consumer reads answer content from the bus — askers use Broker.Await. Gaps sampling-both-handle-sensitive-data (client + server).
renderQuestion (internal/cli/elicit.go ~L201-232) already shows the asking server/tool; what is missing is exactly the fix(id): coalesce LogSync ingest batches (#241) #255 UI slice: URL domain emphasis + punycode warning, schema defaults pre-filled (today exampleFor ~L275-285 emits "..."), and a review step before an answer is relayed. Six gaps: elicitation-app-review-modify-responses, elicitation-client-form-review-modify-responses, elicitation-client-url-show-domain-and-consent, elicitation-client-handle-urls-carefully, elicitation-client-highlight-domain, elicitation-client-warn-punycode.
- Explicitly NOT this design: validating answers against
requestedSchema — the client slice is mcpx: Phase 3 of #1481 — validate elicitation form answers against requestedSchema in client.answer #1484 (Phase 3 of design design(mcpx): JSON Schema validation of tool input and output — one validator at the client choke point #1481, queued); the server-relay slice (elicitation-server-validate-received-data) stays open on nix#255 until mcpx: Phase 3 of #1481 — validate elicitation form answers against requestedSchema in client.answer #1484's as-built shape is known. Also distinct: the tasks store's own 0755 dir creation (internal/tasks/tasks.go:149) belongs to design(mcpx): tasks, finished — one task store for MCP and /v1, and a client that can call task-required tools #1554's store, not this one.
Proposal (phased; each phase independently landable)
- 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.
- 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.
- 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
Sub-issuesCollapse Sub-issuesSub-issues3 of 33 of 3 Issues completedLoading 3 sub-issues Activityadded 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, 2026dezren39 commented on Oct 28, 2026
agent-note:v1 — filed (design originated, queue task n/a — architect run 2026-10-28)
- task: design design(mcpx): elicitation broker hygiene — owner-only store, bounded retention, redacted events, review-first answering #1675 origination, pass 8 of the dedicated code design-architect job
- outcome: design doc at files/designs/code-mcpx-elicitation-broker-hygiene.md (keep-the-four-repos-healthy goal workspace); register entry added in files/potential-projects.md (status: proposed); no user/review — nix#255's acceptance is explicit and the owner-only precedent is in-tree
- phases: mcpx: Phase 1 of #1675 — owner-only elicitation broker store (0700 dir, 0600 files, migration on open) #1676 (Phase 1, owner-only store), mcpx: Phase 2 of #1675 — broker retention bound + summary-only elicitation events #1677 (Phase 2, retention + summary events, gated on P1), mcpx: Phase 3 of #1675 — review-first mcpx elicit surface + nix#255 truth-up #1678 (Phase 3, review-first elicit + truth-up, gated on P1-P2) — all sub-issues of this issue, enqueued as triage tasks 1792/1793/1794 in repo-health-code-pilot
- register re-verification this pass: design(mcpx): honour upstream ttlMs and cacheScope — the pool catalogue cache gets a freshness deadline and a scope #1601 changed proposed -> in-progress (Phase 1 mcpx: Phase 1 of #1601 — surface ttlMs/cacheScope in mcpclient and expire the pool catalogue cache (modern era) #1602 closed via PR mcpx: surface ttlMs/cacheScope in mcpclient and expire pool catalogue cache (#1602) #1608); design(mcpx): a supervisor that owns each stdio child's pipes — replace the takeover handoff for stdio #1384/design(mcpx): resume upstream HTTP sessions after a cold restart — persist the resumable session state #1414/design(mcpx): JSON Schema validation of tool input and output — one validator at the client choke point #1481/design(mcpx): tasks, finished — one task store for MCP and /v1, and a client that can call task-required tools #1554/Design: mcpx client session & stream recovery — re-initialize on a legacy session 404, re-issue a broken modern request once #1634 unchanged; design(mcpx): what a stdio server's identity is — a script's identity includes its directory #1531 already landed
dezren39 commented on Oct 28, 2026
agent-note:v1 — CORRECTION to the filed note on this issue (2026-10-28)
dezren39 commented on Oct 29, 2026 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. dezren39 commented on Nov 3, 2026 🤖 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.
dezren39 commented on Nov 3, 2026 dezren39 commented on Nov 3, 2026
🤖 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.
MetadataMetadataapp/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 DevelopmentNo branches or pull requestsIssue actions
|