Skip to content

[FEATURE][CF-DATAPLANE][TASKS]: Proxy tasks/get, tasks/update, and tasks/cancel #6186

Description

@lucarlig

Part of #5683.

Blocked by

Scope

Implement this in the Rust dataplane repository (contextforge-org/contextforge-data-plane) for MCP 2026-07-28 only.

After a task-capable upstream returns a task handle, the client drives the lifecycle through tasks/get, tasks/update, and tasks/cancel. The dataplane must route each stateless request to the backend that owns the task.

Work

  • Implement the RMCP ServerHandler methods for tasks/get, tasks/update, and tasks/cancel.
  • Decode the exposed handle from [FEATURE][CF-DATAPLANE][TASKS]: Add stateless backend-scoped task handles #6185, verify that its backend remains authorized and visible in the caller's virtual host, restore the upstream taskId, and forward exactly one upstream RPC.
  • Rewrite the taskId in each tasks/get response back to the exposed handle.
  • Preserve task status, inputRequests, inputResponses, terminal result/error payloads, metadata, TTL, and changing pollIntervalMs.
  • Preserve cooperative, eventually-consistent cancellation and update acknowledgements.
  • Let the downstream client control polling and honor pollIntervalMs; do not add a gateway polling loop or blocking tasks/result adapter.
  • Ensure a completed deferred tool result is subject to the configured CPEx/plugin policy, or fail closed when that policy cannot be preserved statelessly.
  • Ensure upstream Streamable HTTP requests use the restored upstream task ID for Mcp-Name routing.
  • Update the MCP routing and method-reference documentation.

Acceptance criteria

  • tasks/get routes to the owning backend and returns every valid task state without loss.
  • input_required requests round-trip through tasks/update, including partial and eventually-consistent updates.
  • tasks/cancel forwards cooperative cancellation and returns a valid empty acknowledgement.
  • Malformed, expired, unavailable-backend, cross-virtual-host, and unauthorized handles fail closed without upstream leakage.
  • Polling is one downstream request to one upstream request; pollIntervalMs is preserved.
  • No MCP session header, in-memory affinity, tasks/list, or tasks/result path is introduced.
  • Focused tests cover all statuses, updates, cancellation, headers, authorization, and backend failures.

Out of scope

  • Python control-plane implementations and legacy 2025-11-25 Tasks APIs.
  • Optional notifications/tasks delivery over subscriptions/listen.

Metadata

Metadata

Assignees

Labels

CF-DATAPLANETasks related to the creation of new Data Plane for ContextForge.blockedBlocked by some other predecessor issue or PR. See notes.mcp-2026-07-28Issues related to compliance with MCP 2026-07-28rustRust programming

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions