Skip to content

[P1][Plan 2] SF-037 — Prevent long MCP generation from blocking unrelated requests #36

Description

@Ankit6149

Confirmed problem

The MCP server processes requests through one serial promise chain. A long campaign generation can block ping, tools/list, provider status, cancellation, and every other request until generation finishes.

Scope

  • Remove global serialization while preserving safe per-campaign ordering.
  • Run independent read/status/protocol requests concurrently.
  • Model long generation as trackable work with status and cancellation.
  • Add bounded worker/concurrency controls rather than unlimited parallel execution.
  • Ensure one failed request cannot poison the request processor.

Acceptance criteria

  • ping, tools/list, status, and cancellation respond while a campaign is generating.
  • Requests for the same campaign remain ordered where necessary.
  • Independent campaigns respect configured concurrency limits.
  • A rejected promise does not block later requests.
  • Shutdown/cancellation cleans up active work safely.

Required verification

  • Concurrent JSON-RPC test with one long generation and multiple quick requests.
  • Cancellation-during-generation test.
  • Failure-isolation and ordering tests.
  • External MCP client verification.

Dependency

Coordinate with SF-006 and SF-036 so web and MCP use the same generation job model.

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