Skip to content

feat(#394): MCP real-time progress reporting for workflow runs - #408

Merged
admarble merged 4 commits into
mainfrom
feature/394-mcp-server-real-time-progress-reporting-for-workfl
Mar 24, 2026
Merged

admarble merged 4 commits into
mainfrom
feature/394-mcp-server-real-time-progress-reporting-for-workfl

Conversation

@admarble

Copy link
Copy Markdown
Contributor

Summary

  • Add active run registry (src/mcp/run-registry.ts) that tracks spawned workflow processes by issue number
  • sequant_status now returns isRunning: true/false indicating whether a sequant_run is actively executing for the queried issue
  • Tool description includes polling guidance ("Poll every 5-10 seconds during active runs")

AC Verification

AC Source Description Status Evidence
AC-1 Original sequant_status returns current phase and phase status during run ✅ Implemented src/mcp/tools/status.ts — existing phase data + new isRunning
AC-2 Original State file reflects in-progress phase before phase start ✅ Already true batch-executor.ts calls updatePhaseStatus() before execution
AC-3 Original Document recommended polling interval ✅ Implemented Status tool description includes "Poll every 5-10 seconds"
AC-4 Original sequant_status includes isRunning indicator ✅ Implemented src/mcp/tools/status.ts:50,68
AC-5 Derived Active run registry tracks processes by issue ✅ Implemented src/mcp/run-registry.ts
AC-6 Derived isRunning returns false after run exits ✅ Implemented finally block in run.ts ensures cleanup
AC-7 Derived Integration test for concurrent status polling ✅ Implemented server-extended.test.ts lifecycle test

Test plan

  • npm run build — passes
  • npm run lint — passes (0 errors, 0 warnings)
  • npm test — 1803 tests pass across 78 files
  • Unit tests: registry register/unregister/clear/concurrent runs
  • Integration tests: isRunning during active run, after completion, polling guidance in description

Closes #394

🤖 Generated with Claude Code

Add active run registry so sequant_status can report isRunning state
while sequant_run is executing. This enables MCP clients to poll for
live progress during workflow runs.

- Add run-registry module with register/unregister/isRunning API
- Wire registry into sequant_run (register on spawn, unregister in finally)
- Add isRunning field to sequant_status response (both tracked and untracked)
- Add polling guidance to status tool description (5-10s interval)
- Add unit tests for registry and integration tests for isRunning lifecycle

Entire-Checkpoint: 6d31652b23fb
Integrate resolveCliBinary (#389) and structured output (#391) into
the progress reporting feature. Place registerRun/unregisterRun calls
in the updated async handler alongside the new structured response
construction.

Entire-Checkpoint: 6d31652b23fb
- Remove unused `pid` field from ActiveRun interface — it stored the
  server PID (not the child process PID) and was never read
- Simplify registerRun() to take only the issue number
- Document isRunning field and polling pattern in mcp-server.md

Entire-Checkpoint: 6d31652b23fb
- Add full response field table for sequant_status (matching sequant_run style)
- Update MCP vs CLI comparison to reference isRunning polling
- Add #394 to provenance line
@admarble
admarble merged commit 11100b9 into main Mar 24, 2026
5 checks passed
@admarble
admarble deleted the feature/394-mcp-server-real-time-progress-reporting-for-workfl branch March 24, 2026 07:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MCP server: real-time progress reporting for workflow runs

1 participant