Repository navigation
perf(task-board): enqueue enabled reviewers concurrently - #5541
Merged
Merged
Conversation
enqueueEnabledReviewers awaited each reviewer's claim+enqueue sequentially, even though QA and Code Reviewer are independent DB rows keyed by their own kind. This runs on TASK_BOARD_ITEM_PRS_GET's synchronous 10s-poll path, so with both reviewers enabled (shipped in #5520) the round-trip serialized two full claim+thread-create+dispatch chains back to back.
decocms Bot
pushed a commit
that referenced
this pull request
Aug 1, 2026
PR: #5541 perf(task-board): enqueue enabled reviewers concurrently Bump type: patch - decocms (apps/api/package.json): 4.158.4 -> 4.158.5 - @decocms/native (apps/native/package.json): 4.158.4 -> 4.158.5 Deploy-Scope: server
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follows #5520 (QA Agent + Code Reviewer review flow).
enqueueEnabledReviewerslooped over the org's enabled reviewer kinds (qa,code_review) andawaited each one'sclaimReviewer+enqueueReviewerForTasksequentially, even though the two are fully independent — each claim is its own DB row keyed by(task, reviewer, cycle), and each enqueue creates its own thread/dispatch. This function is called synchronously fromTASK_BOARD_ITEM_PRS_GET's handler (the board's 10s poll), so with both reviewers enabled — the default shape after #5520 — every poll that triggers the hand-off paid two full claim+thread-create+dispatch round-trips back to back instead of one.Change: run the per-reviewer work via
Promise.allinstead of afor...awaitloop. Behavior is unchanged — each reviewer's claim/enqueue/error-handling is identical, just concurrent instead of serial; no shared mutable state between iterations (each writes to its own claim row and its own thread).How to verify:
cd apps/api && bunx tsc --noEmitandbunx oxlint apps/api/src/tools/task-board/enqueue-reviewer.ts(both clean). No behavior change to unit-test —enqueue-reviewer.test.ts's existing coverage ofreviewerHandledThisCycle(the pure guard this loop calls) is untouched and still passes. Full CI validates the rest.Locally ran:
bun run fmt,cd apps/api && bunx tsc --noEmit,bunx oxlint apps/api/src/tools/task-board/enqueue-reviewer.ts.Summary by cubic
Run QA and Code Reviewer enqueueing in parallel to reduce task board poll latency. Behavior is unchanged; each reviewer still claims and enqueues independently.
Promise.allinenqueueEnabledReviewersto run per-reviewer claim+enqueue concurrently, reducingTASK_BOARD_ITEM_PRS_GETpoll path latency.(task, reviewer, cycle)row.Written for commit 52a26b4. Summary will update on new commits.