GeezerVison is showing github.com — mcpx: Phase 1 of #1554 — one durable task store across MCP and /v1 (internal/tasks wiring) · Issue #1555 · developing-today/code
mcpx: Phase 1 of #1554 — one durable task store across MCP and /v1 (internal/tasks wiring) #1555DescriptionPhase 1 of design #1554 (filed by the design architect, 2026-10-27). Design doc: files/designs/code-mcpx-tasks-one-store.md in the keep-the-four-repos-healthy goal workspace.
Decision in force (from #1554, do not re-litigate in triage): one tasks.Store instance serves both the MCP surface and the daemon's /v1 surface. The shared instance is the daemon's existing durable store (SQLite at <state>/tasks.db, in-memory fallback) — not the MCP server's in-memory one. Standalone mcpserver embeddings without a daemon keep a private in-memory store. MCP ownership/visibility semantics do not change; /v1 keeps its unscoped operator view. Origin: dezren39/darwin-nix#209 rows TASK-27 (one store across MCP and /v1) and TASK-20 (durable creation).
Scope
- Today:
internal/mcpserver/tasks.go tasks() lazily creates tasks.New() (in-memory; field taskStore at internal/mcpserver/server.go:273-274, no seam), while internal/daemon/ops.go:436-453 taskStore() creates the daemon's own store (tasks.Open(<state>/tasks.db), fallback tasks.New()), used by /v1 handlers and by internal/daemon/routes_proto.go, routes_exec.go, input_required.go.
- Add a store seam to
mcpserver.Server (setter or exported field, following the existing wiring style — srv.Notify, srv.Passthrough, srv.Timing are set the same way in App.MCPServer()). When a store is injected, tasks() uses it and never creates its own; when none is injected, today's lazy in-memory behaviour is unchanged.
- Wire it in
internal/cli/serve.go App.MCPServer() (~line 474): the daemon's store, constructed once, is shared by the daemon's /v1 handlers and the MCP server. The daemon's lazy taskStore() construction may stay, as long as exactly one instance exists per daemon.
- One
PollInterval source: today the MCP store takes Timing.resolved().TaskPoll and the daemon store takes the protoTasks.pollInterval setting. The shared store is configured once, from settings, at construction — and the PR states which setting won and what the other surface's cadence becomes.
- Retire the conformance gap
ext-tasks-durable-before-response (internal/conformance/coverage_stateful.go:112) — its stated reason ("the task store is an in-memory map; a task does not survive the daemon") stops being true for the daemon's MCP surface.
Acceptance
- Defining tests:
- a task started through the MCP surface is visible via the daemon store (
Get/List/result) under the same id, and a daemon-side task is reachable through the same shared instance — one store, both surfaces;
- MCP cross-connection invisibility is preserved after the merge: connection B cannot get/list/cancel connection A's owned task, and
/v1-started tasks (no MCP owner) are not listed by any MCP connection (legacy list requires an owner match);
- restart durability: a terminal MCP-started task is still readable after the store is closed and reopened from the same
tasks.db; a task that was working at close reloads as Failed with the existing "daemon restarted before task completion" message;
- standalone construction (no injected store) behaves exactly as today (existing mcpserver task tests pass unmodified in behaviour).
- No protocol/wire changes on either surface; no changes to
internal/tasks semantics (the store type is shared as-is).
- Verification via CI per fleet policy:
cd pkgs/mcpx && go test ./... on the PR.
Out of scope: client-side task execution (Phase 2 of #1554); register/docs truth-up and nix#209 closure (Phase 3, gated on Phases 1–2); operational limits, cooperative cancel, audit logging (open questions on #1554).
Acceptance criteria
-
mcpserver.Server accepts an injected *tasks.Store; the daemon injects its single store at App.MCPServer(); exactly one store instance exists per daemon.
- Cross-surface, visibility-preservation, and restart-durability tests above pass in CI.
-
PollInterval for the shared store comes from one named settings source, stated in the PR.
- Gap
ext-tasks-durable-before-response removed from internal/conformance/coverage_stateful.go.
- Standalone embeddings (
adapter.go, openapi.go) unchanged in behaviour; full mcpx suite green via CI.
Activitydeveloping-today commented on Oct 28, 2026 dezren39 commented on Oct 28, 2026 🤖 Agent note · filed
- Agent: design architect (repo-design-architect-code job)
- Session / ID: repo-design-architect-code cron run, 2026-10-27 20:25 CDT
- Found via: filed this run
- Task: Phase 1 implementation issue for design design(mcpx): tasks, finished — one task store for MCP and /v1, and a client that can call task-required tools #1554 (mcpx tasks — one durable task store across MCP and /v1, internal/tasks wiring). Linked as a sub-issue of design(mcpx): tasks, finished — one task store for MCP and /v1, and a client that can call task-required tools #1554. Enqueued as a triage packet in repo-health-code-pilot this run (queue task 1609) — first fleet step is triage/confirmation of scope, the seam shape and the winning PollInterval setting, then implementation.
- Expectation: effort/m; done = acceptance criteria in the body, defining tests = cross-surface visibility / MCP cross-connection invisibility preserved / restart durability, in pkgs/mcpx.
- Links: design design(mcpx): tasks, finished — one task store for MCP and /v1, and a client that can call task-required tools #1554; design doc
files/designs/code-mcpx-tasks-one-store.md (goal workspace); queue task 1609 (repo-health-code-pilot); origin mcpx: tasks — the 2026 extension is advertised and not implemented; core tasks are unbound and live in two stores dezren39/darwin-nix#209
dezren39 commented on Oct 28, 2026 dezren39 commented on Oct 28, 2026
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|