fix(#1408): deduplicate retro dispatches on PR merge - #1412
fix(#1408): deduplicate retro dispatches on PR merge#1412fullsend-ai-coder[bot] wants to merge 1 commit into
Conversation
When a PR is merged, multiple queued shim runs (each using cancel-in-progress: false) independently process the closed event and dispatch a retro workflow. While retro.yml already has a concurrency group with cancel-in-progress: true, retro runs may complete before the next dispatch arrives, making cancellation ineffective and producing 2-6 duplicate retro runs per merge. Add a dedup check in the dispatch step: before dispatching a retro workflow, query the GitHub API for queued or in-progress retro runs with matching source repo and PR number. If a match is found, skip the dispatch with a notice annotation. The check is fail-open — API errors fall through to normal dispatch to avoid blocking legitimate retro runs. Note: Go tests could not run (sandbox has Go 1.23, project requires 1.26). The change is workflow YAML only and does not affect Go source. Pre-commit could not complete (Go toolchain download blocked in sandbox). Manual verification required. Closes #1408
Site previewPreview: https://ad3ebc4d-site.fullsend-ai.workers.dev Commit: |
ReviewFindingsNo findings. The dedup logic is correctly scoped to |
|
/fix implement the preferred method described in the linked issue: "Preferred: Add a concurrency group in the retro.yml workflow keyed on the originating PR URL/number with cancel-in-progress: true. This way, if multiple retro dispatches arrive for the same PR, only the last one runs." |
|
/fs-fix implement the preferred method described in the linked issue: "Preferred: Add a concurrency group in the retro.yml workflow keyed on the originating PR URL/number with cancel-in-progress: true. This way, if multiple retro dispatches arrive for the same PR, only the last one runs." |
|
Replaced by #1468 |
Adds a 60-second debounce job before the retro job. Multiple dispatches for the same PR close (from shim retries or burst webhook deliveries) start simultaneously but the sleep keeps runs active long enough for the existing cancel-in-progress: true concurrency group to cancel stale ones. Only the last run survives the debounce and proceeds. Supersedes #1412, which used a pre-dispatch API dedup check instead. Closes #1408. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Hector Martinez <hemartin@redhat.com>
Adds a 60-second debounce job before the retro job. Multiple dispatches for the same PR close (from shim retries or burst webhook deliveries) start simultaneously but the sleep keeps runs active long enough for the existing cancel-in-progress: true concurrency group to cancel stale ones. Only the last run survives the debounce and proceeds. Supersedes #1412, which used a pre-dispatch API dedup check instead. Closes #1408. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Hector Martinez <hemartin@redhat.com>
When a PR is merged, multiple queued shim runs (each using cancel-in-progress: false) independently process the closed event and dispatch a retro workflow. While retro.yml already has a concurrency group with cancel-in-progress: true, retro runs may complete before the next dispatch arrives, making cancellation ineffective and producing 2-6 duplicate retro runs per merge.
Add a dedup check in the dispatch step: before dispatching a retro workflow, query the GitHub API for queued or in-progress retro runs with matching source repo and PR number. If a match is found, skip the dispatch with a notice annotation. The check is fail-open — API errors fall through to normal dispatch to avoid blocking legitimate retro runs.
Note: Go tests could not run (sandbox has Go 1.23, project requires 1.26). The change is workflow YAML only and does not affect Go source. Pre-commit could not complete (Go toolchain download blocked in sandbox). Manual verification required.
Closes #1408
Post-script verification
agent/1408-dedup-retro-dispatch)6cdb528b675d3c97499252b6a11606631ecc127e..HEAD)