fix(dispatch): label-aware concurrency prevents routing-label cancellation#5472
fix(dispatch): label-aware concurrency prevents routing-label cancellation#5472ggallen wants to merge 1 commit into
Conversation
PR Summary by QodoFix dispatch concurrency for labeled events to prevent routing cancellation
AI Description
Diagram
High-Level Assessment
Files changed (4)
|
|
🤖 Review · |
Site previewPreview: https://df697b2a-site.fullsend-ai.workers.dev Commit: |
4ec46ff to
761aadf
Compare
|
🤖 Finished Review · ✅ Success · Started 4:01 PM UTC · Completed 4:19 PM UTC |
Code Review by Qodo
1. PR label whitelist mismatch
|
ReviewFindingsMedium
Previous runReviewFindingsMedium
Low
Previous run (2)ReviewFindingsMedium
Previous run (3)ReviewFindingsMedium
Low
Previous run (4)ReviewFindingsMedium
Low
Previous run (5)ReviewFindingsMedium
Low
Previous run (6)ReviewFindingsMedium
Low
Labels: PR modifies dispatch workflow routing (concurrency groups and labeled-event filtering) |
761aadf to
e909805
Compare
|
🤖 Finished Review · ✅ Success · Started 4:45 PM UTC · Completed 4:58 PM UTC |
waynesun09
left a comment
There was a problem hiding this comment.
Multi-agent review squad pass (4 reviewers: Claude x2, Grok, Gemini) — no Critical/High findings survived verification. 7 Medium findings posted inline covering: unverified core fix behavior in a live GH Actions environment, a weak test assertion (substring-only, not semantic), a fragile positional test slice, a stale ADR invariant re: per-role concurrency, an ADR update that overgeneralizes which shim gained label-aware concurrency, an unacknowledged "Confidence: Medium" root cause from the source issue, and hand-copied if:/group: blocks with no single source of truth. Two prior review threads (label-whitelist mismatch, weak concurrency test) are already resolved/declared-intentional and not re-flagged.
e909805 to
aed6789
Compare
|
🤖 Finished Review · ✅ Success · Started 7:00 PM UTC · Completed 7:14 PM UTC |
aed6789 to
9ea85ce
Compare
|
🤖 Review · |
9ea85ce to
f3f1315
Compare
|
🤖 Finished Review · ✅ Success · Started 8:27 PM UTC · Completed 8:41 PM UTC |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
f3f1315 to
fe15fd5
Compare
|
🤖 Finished Review · ✅ Success · Started 11:57 AM UTC · Completed 12:10 PM UTC |
fe15fd5 to
4a399c0
Compare
|
🤖 Finished Review · ✅ Success · Started 8:49 PM UTC · Completed 9:06 PM UTC |
…ation (fullsend-ai#2452) When triage applies multiple labels rapidly, all issues/labeled events shared the same concurrency group (fullsend-dispatch-{number}). GitHub Actions cancels intermediate pending runs, so the ready-to-code event could be cancelled while a non-routing label (type/bug) survives and exits with "No stage matched" — the code agent never dispatches. Two complementary fixes: 1. Label-aware concurrency key: for labeled events, include the label name in the group so ready-to-code and type/bug get separate slots. Non-labeled events share a common "dispatch" suffix to preserve existing queuing behavior. 2. Early-exit non-routing labels: add an if: guard that skips the dispatch job entirely for labeled events where the label isn't one of the three routing labels (ready-to-code, ready-for-review, ready-for-triage). This prevents non-routing labels from consuming concurrency slots or wasting runner time. Applied to all three shim files (fullsend.yaml, shim-workflow-call.yaml, shim-per-repo.yaml). Added TestShimLabeledEventFiltering to prevent regression. Signed-off-by: Claude Opus 4.6 <noreply@anthropic.com> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Greg Allen <gallen@redhat.com> docs: note ready- prefix convention for routing labels Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Greg Allen <gallen@redhat.com> docs: note ready- prefix convention in glossary Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Greg Allen <gallen@redhat.com> docs: promote ready- prefix note to callout, clarify silent skip Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Greg Allen <gallen@redhat.com> docs: use standard ADR annotation format Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Greg Allen <gallen@redhat.com>
4a399c0 to
5262b33
Compare
|
🤖 Finished Review · ✅ Success · Started 9:15 PM UTC · Completed 9:28 PM UTC |
Summary
Fixes #2452. When triage applies multiple labels rapidly, all
issues/labeledevents shared the same concurrency group (fullsend-dispatch-{number}). GitHub Actions cancels intermediate pending runs, so theready-to-codeevent could be cancelled while a non-routing label (type/bug) survives — the code agent never dispatches.Two complementary fixes:
labeledevents, include the label name in the group soready-to-codeandtype/bugget separate concurrency slots. Non-labeled events share a commondispatchsuffix to preserve existing queuing behavior.if:guard skips the dispatch job entirely for labeled events where the label isn'tready-to-code,ready-for-review, orready-for-triage. Prevents non-routing labels from consuming concurrency slots or wasting runner time.Applied to all three shim files:
.github/workflows/fullsend.yaml(this repo)internal/scaffold/fullsend-repo/templates/shim-workflow-call.yaml(per-org template)internal/scaffold/fullsend-repo/templates/shim-per-repo.yaml(per-repo template,if:guard only — no concurrency group)Test plan
TestShimLabeledEventFiltering— validates all three shims have the routing-label whitelist and the workflow-call shims have label-aware concurrency keysactionlintpasses onfullsend.yamlready-to-codeas a non-final label). Verify theready-to-coderun completes with "Routed to stage: code" rather than being cancelled🤖 Generated with Claude Code