Skip to content

MCP Phase 3b: Tasks (progress/cancel) — deferred, needs reindex_files cancel/progress infra + ownership model #2216

Description

@jamie8johnson

Phase 3b of #2124 (MCP Tasks — progress/cancel for the long-runners), split out of the Phase-3 arc after a four-adversary attack on the design doc (docs/plans/2026-07-03-mcp-phase3-decisions.md) convicted the Tasks half on false premises. Phase 3a (the HTTP transport) ships independently; this tracks the deferred Tasks work.

Trigger to enter: an eval-core lift (#NEW-eval-issue) + a GPU-contention policy — the same gate as the eval descope.

What 3b must BUILD (the draft under-budgeted all of these):

  1. Progress + cancellation added to reindex_files (the daemon's actual index engine) — it has NEITHER today; the run_index_pipeline atomics/cancel-checks the draft cited are CLI-only and unreachable from the daemon.
  2. A DECIDABLE cancel rule: job-cancel honored only while QUEUED; once pending_files drains, cancel = detach-only, job runs to completion. ("job was task-initiated" is undecidable — file provenance is destroyed when a task walk and inotify events merge into one HashSet.)
  3. Store-side cancel-safety: requeue unprocessed files (the events.rs Err arm doesn't today) + don't skip the post-run SPLADE encode for committed files (else the dense-only drift window becomes client-triggerable). The manifest-generation "abort-anywhere safe" claim covers only the HNSW sidecar.
  4. An OWNERSHIP model: shared token + always-advertised tasks/list means any holder can list+cancel any task (re-entering cancel-one-cancels-all). Decide single-principal or taskId-as-capability. Resolve current-vs-next attachment.
  5. tasks/result as a transport-side poll loop, NOT a blocking relay (a blocking relay times out AND exhausts the capped daemon handler pool = self-DoS).
  6. Tasks spec conformance: task-gone ⇒ JSON-RPC -32602 not HTTP 404; createdAt/lastUpdatedAt; related-task _meta; capability at init; taskSupport -32601. Verify session-scoping of tasks vs the survive-restart property.

Full corrected design in the plan doc's PHASE 3b section.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions