Skip to content

fix: prevent duplicate implementer dispatches#190

Merged
microsasa merged 1 commit intomainfrom
fix/orchestrator-dedup
Mar 21, 2026
Merged

fix: prevent duplicate implementer dispatches#190
microsasa merged 1 commit intomainfrom
fix/orchestrator-dedup

Conversation

@microsasa
Copy link
Owner

Problem

The orchestrator dispatches a new implementer on every trigger without checking if one is already running. When multiple triggers fire in quick succession (e.g., two PRs merging back-to-back), multiple implementers get dispatched for different issues. GitHub's concurrency group then cancels intermediate runs, leaving those issues with aw-dispatched label but never worked on.

Observed: 4 implementer dispatches in 10 minutes, 1 cancelled, issues #160-#182 all labeled aw-dispatched.

Changes

  1. Remove push trigger — cron every 5 min covers post-merge dispatch, removing a major source of rapid-fire triggers
  2. cancel-in-progress: false — queue orchestrator runs instead of cancelling, so queued runs see state left by previous run
  3. In-flight implementer checkgh run list for in_progress/queued before dispatching

Fixes #164

Copilot AI review requested due to automatic review settings March 21, 2026 02:17
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Pipeline Orchestrator workflow to reduce duplicate “issue implementer” dispatches by de-duplicating triggers, queueing orchestrator runs instead of cancelling them, and adding an in-flight implementer guard before dispatch.

Changes:

  • Removed the push trigger on main to avoid rapid back-to-back orchestrator invocations on merges.
  • Set concurrency.cancel-in-progress: false so orchestrator runs queue rather than canceling each other.
  • Added a pre-dispatch check using gh run list to skip dispatching when an implementer run is already queued/in progress.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@microsasa microsasa force-pushed the fix/orchestrator-dedup branch from 939007e to 07a1d0a Compare March 21, 2026 02:25
Copilot AI review requested due to automatic review settings March 21, 2026 02:28
@microsasa microsasa force-pushed the fix/orchestrator-dedup branch from 07a1d0a to 2323763 Compare March 21, 2026 02:28
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

- Remove push trigger (cron every 5 min covers post-merge dispatch)
- cancel-in-progress: false (queue runs instead of cancelling, so
  queued runs see state left by previous run)
- Check for in-flight implementer runs before dispatching

Fixes #164

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@microsasa microsasa force-pushed the fix/orchestrator-dedup branch from 2323763 to 6b8f0df Compare March 21, 2026 02:35
@microsasa microsasa merged commit 86825de into main Mar 21, 2026
3 checks passed
@microsasa microsasa deleted the fix/orchestrator-dedup branch March 21, 2026 02:35
microsasa pushed a commit that referenced this pull request Mar 21, 2026
…d label desync

- Changelog: entries for PR #186 (pre-fetch), PR #190 (dedup fix),
  quality gate label/approval desync
- Agentic-workflows: 5 new pitfalls (#23-27), updated agent inventory
  table, history entry for 2026-03-20/21 session

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
microsasa pushed a commit that referenced this pull request Mar 21, 2026
…d label desync

- Changelog: entries for PR #186 (pre-fetch), PR #190 (dedup fix),
  quality gate label/approval desync
- Agentic-workflows: 5 new pitfalls (#23-27), updated agent inventory
  table, history entry for 2026-03-20/21 session

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
microsasa pushed a commit that referenced this pull request Mar 21, 2026
…d label desync

- Changelog: entries for PR #186 (pre-fetch), PR #190 (dedup fix),
  quality gate label/approval desync
- Agentic-workflows: 5 new pitfalls (#23-27), updated agent inventory
  table, history entry for 2026-03-20/21 session

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
microsasa pushed a commit that referenced this pull request Mar 21, 2026
…d label desync

- Changelog: entries for PR #186 (pre-fetch), PR #190 (dedup fix),
  quality gate label/approval desync
- Agentic-workflows: 5 new pitfalls (#23-27), updated agent inventory
  table, history entry for 2026-03-20/21 session

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
microsasa pushed a commit that referenced this pull request Mar 21, 2026
…d label desync

- Changelog: entries for PR #186 (pre-fetch), PR #190 (dedup fix),
  quality gate label/approval desync
- Agentic-workflows: 5 new pitfalls (#23-27), updated agent inventory
  table, history entry for 2026-03-20/21 session

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
microsasa added a commit that referenced this pull request Mar 21, 2026
* fix: re-add labels config to implementer create-pull-request

The labels: [aw] config was removed based on a vague 'node ID
resolution error' that was never properly investigated. The gh-aw
docs officially support this field. Re-adding it so labels are
applied by infrastructure, not dependent on agent behavior.

Closes #108

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* docs: update changelog and agentic-workflows for pre-fetch, dedup, and label desync

- Changelog: entries for PR #186 (pre-fetch), PR #190 (dedup fix),
  quality gate label/approval desync
- Agentic-workflows: 5 new pitfalls (#23-27), updated agent inventory
  table, history entry for 2026-03-20/21 session

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Sasa Junuzovic <sasa@Sasas-MacBook-Air.local>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: orchestrator dispatches responder twice from duplicate triggers

2 participants