Skip to content

Clamp fleet dispatch concurrency to at least one - #377

Merged
abhishekgahlot2 merged 1 commit into
useagenthq:mainfrom
gezerui888:fix/fleet-dispatch-concurrency
Oct 26, 2026
Merged

abhishekgahlot2 merged 1 commit into
useagenthq:mainfrom
gezerui888:fix/fleet-dispatch-concurrency

Conversation

@gezerui888

@gezerui888 gezerui888 commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

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
Contributor 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
@gezerui888

Copy link
Copy Markdown
Contributor Author

Hi @abhishekgahlot2, could you review my fix for the dispatch freeze when you have a moment? CI is still waiting for approval, so I'd appreciate your help with that too.

@abhishekgahlot2
abhishekgahlot2 merged commit ea17b71 into useagenthq:main Oct 26, 2026
1 of 2 checks passed
@abhishekgahlot2

Copy link
Copy Markdown
Contributor

Merged, thanks @gezerui888! Nice touch running the real dispatch loop in the test.

@github-actions github-actions Bot locked and limited conversation to collaborators Oct 26, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

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

2 participants