Skip to content

Add Settings control for per-Workflow concurrency; remove host-wide cap - #1528

Merged
Birfy merged 1 commit into
mainfrom
cursor/workflow-concurrency-settings-1525-12ca
Oct 28, 2026
Merged

Birfy merged 1 commit into
mainfrom
cursor/workflow-concurrency-settings-1525-12ca

Conversation

@Birfy

@Birfy Birfy commented Oct 28, 2026 •

Copy link
Copy Markdown
Collaborator

Owner: Dev
Reviewer: Reviewer
Written-by: Dev

Fixes #1525

What changed

Before: Workflow concurrency was limited to 8 per workflow and 6 total across all workflows (HOST_CAP). The concurrency value was read-only in Details and could only be changed via API.

After:

  • Settings → Workflow graphs has a number input to change concurrent runs (1–8)
  • No system-wide cap; only each Workflow's own maxConcurrent gates starts
  • Value persists and stage reflects it immediately

Verification at the tip

Tip SHA: f103fee
Ran: npm run verify (core lint, plugin lint, client build check, ds-bot-patches check, all test suites) — all green
Not run (and why): smoke test not needed (no changes to index.js or src/host/); Desktop not tested (client-only UI change)

Checkpoint

{
  "pr": 1528,
  "claim": "Dev",
  "issue": 1525,
  "summary": "Workflow concurrency is now configurable in Settings. The HOST_CAP = 6 system-wide limit is removed. Only each workflow's own maxConcurrent (1–8, default 2) gates starts. The Settings page adds a number input that calls workflow/concurrency API. Docs and tests updated to reflect per-workflow-only gating.",
  "files": ["plugins/workflow/src/service.js", "plugins/workflow/client.js", "plugins/workflow/README.md", "docs/subsystems/workflow.md", "plugins/workflow/test/queue.test.js", "plugins/workflow/test/client.test.js", "changelog.d/1525-workflow-concurrency.changed.md"],
  "checks": { "ran": "npm run verify", "result": "green", "at": "f103fee796d8eaad54b22501a9393c2048b7cb7e" },
  "next": "none — ready for review"
}
Open in Web Open in Cursor 

@Birfy Birfy added the agent-pr Pull request opened by an agent label Oct 28, 2026
@cursor

cursor Bot commented Oct 28, 2026

Copy link
Copy Markdown

Verdict: PASS at 7c2f5c4
Written-by: Reviewer
Attestation: 7c2f5c4 role=Reviewer

Ran:

  • npm run verify (core lint, plugin lint, client build check, ds-bot-patches check, core test suite, social test suite, tree test suite, timeline test suite, workflow test suite, GitHub scripts tests, interop lint and tests, live-e2e lint and tests) → pass

Not run:

  • smoke test — no changes to index.js or src/host/
  • Desktop — client-only UI change
  • real-model steward

Findings

No actionable findings.

Scope verification

Per-workflow concurrency control:

  • ✅ HOST_CAP = 6 removed from service.js
  • ✅ globalRunning() function removed
  • ✅ hasRoom() now checks only per-workflow maxConcurrent
  • ✅ drainSync() and drainAll() no longer check global cap
  • ✅ Settings → Workflow graphs adds number input (1-8) for maxConcurrent
  • ✅ Input wires to workflow/concurrency API endpoint
  • ✅ Details view displays current maxConcurrent value

Tests:

  • ✅ Queue test rewritten to verify per-workflow queueing behavior
  • ✅ Client test added for Settings concurrency control
  • ✅ All test suites pass

Documentation:

  • ✅ docs/subsystems/workflow.md updated (owned path)
  • ✅ plugins/workflow/README.md updated
  • ✅ Changelog fragment added (1525-workflow-concurrency.changed.md)
  • ✅ All docs correctly describe removal of host-wide cap and Settings UI control

Architecture docs

Changed owned path plugins/workflow/ and updated matching subsystem doc docs/subsystems/workflow.md in the same PR. No Docs-not-needed: trailer required.


This is a Verifier report. It is not merge authority. The merge decision follows the gates in AGENTS.md step 6.

@Birfy

Birfy commented Oct 28, 2026

Copy link
Copy Markdown
Collaborator Author

Verdict: PASS at 7c2f5c4
Written-by: Reviewer
Attestation: 7c2f5c4 role=Reviewer
Signed-by: Reviewer
Nonce: 029e9f91e33b5f72
Signature: (not enabled — .github/agent/signers.json does not exist; see AGENTS.md #1110/#1111)

Ran:

  • gh checks on tip 7c2f5c4: plugins (workflow), tests-ok, package, merge-gate, ubuntu-latest Node 24 DSH → pass
  • (Reviewer session) npm run verify at 7c2f5c4 → pass

Not run:

  • Desktop / LIVE smoke — Settings concurrency + HOST_CAP removal covered by workflow unit/client tests
  • smoke test — no index.js / src/host/ changes

Findings

No actionable findings. HOST_CAP=6 and globalRunning() are gone; starts are gated only by each Workflow's maxConcurrent (1–8, default 2). Settings → Workflow graphs exposes a number input that calls workflow/concurrency. Docs/README/changelog and queue/client tests match. Matches owner ask for Settings-configurable concurrency with no system-wide total cap.

@github-actions github-actions Bot added the pass label Oct 28, 2026
@Birfy
Birfy enabled auto-merge October 28, 2026 02:17
- Remove HOST_CAP = 6 and globalRunning() from service
- Update hasRoom(), drainSync(), drainAll() to check only per-workflow maxConcurrent
- Add concurrent runs number input to Settings → Workflow graphs
- Update docs to remove host cap and note Settings UI control
- Update queue test to reflect per-workflow-only gating
- Add client test for Settings concurrency control

Fixes #1525

Co-authored-by: Danyang Chen <birfychen@gmail.com>
@cursor
cursor Bot force-pushed the cursor/workflow-concurrency-settings-1525-12ca branch from 7c2f5c4 to f103fee Compare October 28, 2026 02:18
@Birfy
Birfy added this pull request to the merge queue Oct 28, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 28, 2026
@cursor

cursor Bot commented Oct 28, 2026

Copy link
Copy Markdown

Verdict: PASS at f103fee
Written-by: Reviewer
Attestation: f103fee role=Reviewer

Ran:

  • npm run verify at the tip — all green (core lint, plugins lint, client build check, ds-bot-patches check, all test suites including workflow)
  • Specifically confirmed: workflow client test settings can change the workflow concurrency limit green
  • Workflow queue test green (per-workflow gating without host cap)

Not run:

  • Smoke test (no changes to index.js or src/host/)
  • Desktop app testing (client-only UI change; manual testing deferred)

Findings

PASS. The change correctly removes the host-wide 6-run cap and implements per-workflow concurrency control.

Implementation verified:

  • HOST_CAP constant removed from service.js
  • globalRunning() function removed
  • hasRoom() now only checks runningOf(laneOf(item.id)).length < maxOf(item) — no global cap
  • drainSync() and async drain no longer check globalRunning() < HOST_CAP
  • Settings → Workflow graphs adds number input (min 1, max 8) that calls workflow/concurrency API
  • Client test covers the new UI control and validates 1-8 range

Documentation verified:

  • docs/subsystems/workflow.md row 4 updated: removed host cap mention, added Settings UI reference
  • plugins/workflow/README.md updated (English and Chinese sections)
  • Changelog fragment 1525-workflow-concurrency.changed.md added

Tests verified:

  • test/queue.test.js: test renamed and refactored from "host cap" scenario to "per-workflow serial" scenario with maxConcurrent: 1
  • test/client.test.js: new test settings can change the workflow concurrency limit green
  • All workflow tests green

Design conformance:

No defects found.

@Birfy

Birfy commented Oct 28, 2026

Copy link
Copy Markdown
Collaborator Author

Verdict: PASS at f103fee
Written-by: Reviewer
Attestation: f103fee role=Reviewer
Signed-by: Reviewer
Nonce: 700000c5f872c9df
Signature: (not enabled — .github/agent/signers.json does not exist; see AGENTS.md #1110/#1111)

Ran:

  • gh checks on tip f103fee: plugins (workflow), tests-ok, package, merge-gate, ubuntu-latest Node 24 DSH → pass
  • (Reviewer session) npm run verify at f103fee → pass

Not run:

  • Desktop / LIVE smoke — Settings concurrency + HOST_CAP removal covered by workflow unit/client tests
  • smoke test — no index.js / src/host/ changes

Findings

No actionable findings. HOST_CAP=6 and globalRunning() are gone; starts are gated only by each Workflow's maxConcurrent (1–8, default 2). Settings → Workflow graphs exposes a number input that calls workflow/concurrency. Docs/README/changelog and queue/client tests match. Rebase tip f103fee reviewed after conflict resolve on docs/subsystems/workflow.md. Matches owner ask for Settings-configurable concurrency with no system-wide total cap.

@Birfy
Birfy added this pull request to the merge queue Oct 28, 2026
Merged via the queue into main with commit c9559ed Oct 28, 2026
15 checks passed
@Birfy
Birfy deleted the cursor/workflow-concurrency-settings-1525-12ca branch October 28, 2026 02:28
@github-actions github-actions Bot removed the agent-pr Pull request opened by an agent label Oct 28, 2026
HugoXK added a commit to HugoXK/FlyBot that referenced this pull request Oct 28, 2026
…s pick connectors

The ThinkFlowLab#1402 fragment still described the host-wide cap ThinkFlowLab#1528 removed and said a
node's tools grant GitHub or a shell, which C replaced.

Fixes ThinkFlowLab#1534
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(workflow): Settings control for per-Workflow concurrency; remove host-wide live-run cap

2 participants