Skip to content

feat(mcp-server): configurable async concurrency controller (#238)#252

Merged
Neftedollar merged 1 commit intomasterfrom
feat/238-p0-replace-global-busy-lock-with-configurable-concurrency-controller
Apr 20, 2026
Merged

feat(mcp-server): configurable async concurrency controller (#238)#252
Neftedollar merged 1 commit intomasterfrom
feat/238-p0-replace-global-busy-lock-with-configurable-concurrency-controller

Conversation

@Neftedollar
Copy link
Copy Markdown
Owner

Summary

  • replace async global inflight lock with a configurable concurrency controller
  • add CLI/programmatic concurrency options (maxConcurrentJobs, maxConcurrentJobsPerWorkflow, workflow-scoped maps)
  • preserve sync-path behavior and keep async observer tools non-blocking
  • keep async persistence/recovery integration intact after rebasing on P0: Persist async job registry and recover jobs after server restart #237

What changed

  • added packages/mcp-server/src/concurrency.ts with validated limits and deterministic BUSY errors
  • wired concurrency permits into async dispatchStart (start + job permits with safe release on complete/error)
  • extended single-workflow and programmatic APIs to accept concurrency/async settings
  • validated programmatic per-workflow concurrency references against known workflow names
  • updated CLI parsing/validation/help for concurrency flags
  • merged with persistence changes from P0: Persist async job registry and recover jobs after server restart #237 (RunStore + sqlite store path)

Tests

  • bun run --filter @ageflow/mcp-server typecheck
  • bun run --filter @ageflow/mcp-server test
  • bun run --filter @ageflow/cli typecheck
  • bun run --filter @ageflow/cli test

Closes #238

@Neftedollar Neftedollar merged commit 282693a into master Apr 20, 2026
1 of 3 checks passed
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.

P0: Replace global BUSY lock with configurable concurrency controller

1 participant