Skip to content

Clamp fleet dispatch concurrency to at least one - #377

Open
gezerui888 wants to merge 1 commit into
useagenthq:mainfrom
gezerui888:fix/fleet-dispatch-concurrency
Open

gezerui888 wants to merge 1 commit into
useagenthq:mainfrom
gezerui888:fix/fleet-dispatch-concurrency

Conversation

@gezerui888

@gezerui888 gezerui888 commented Oct 21, 2026 •

Copy link
Copy Markdown

By opening this pull request you agree to the Contributor License Agreement. On your first pull request a bot asks you to sign it with a one-line comment.

Fixes #314.

I clamped maxDispatchConcurrency to at least 1 after integer parsing. This prevents 0 and 0.5 from freezing reconciliation when a task is queued. Other fleet settings keep their existing behavior.

I added regression tests for both values with a queued task. They check the config before reconciliation, so the old code fails without hanging the suite.

Tests:

  • bun run typecheck
  • bun test scripts/agent-docs.test.ts
  • cd backend && bun run test
  • cd frontend && bun run test && bun run lint
  • Independent backend processes with PostgreSQL 16 and Bun 1.3.14: for both inputs, I submitted a task through POST /api/runs. Before the fix, subsequent health requests timed out. After the fix, health and run requests returned HTTP 200.

Screenshots / Recordings

Before

Before

After

After


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@gezerui888

Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA

github-actions Bot added a commit that referenced this pull request Oct 21, 2026
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.

Stop FLEET_MAX_DISPATCH_CONCURRENCY=0 from freezing the backend

1 participant