fix: add schedule to orchestrator if: condition#176
Conversation
There was a problem hiding this comment.
Pull request overview
Fixes an orchestrator gating bug where scheduled (cron) runs were triggered but immediately skipped due to the job-level if: not allowing the schedule event, and documents the pitfall to avoid repeating it.
Changes:
- Allow cron-triggered runs by adding
github.event_name == 'schedule'to the orchestrator jobif:condition. - Document the incident in the repo changelog.
- Add a “pitfall” note and a historical timeline bullet describing the failure mode.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
docs/changelog.md |
Adds a changelog entry documenting the skipped cron runs and the fix. |
docs/agentic-workflows.md |
Adds Pitfall #22 about updating if: gates when adding new triggers; notes the incident in the history section. |
.github/workflows/pipeline-orchestrator.yml |
Updates the orchestrator job gate to allow schedule events through. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
docs/agentic-workflows.md
Outdated
| - Discovered `submit_pull_request_review` safe output doesn't support `target: "*"` — no `pull_request_number` field in tool schema. Fix: use `target: ${{ inputs.pr_number }}` per gh-aw docs. `add_labels` uses `target: "*"` (different handler, has `item_number` field). | ||
| - PR #167 eventually merged after testing the fix from branch via `gh workflow run --ref`. | ||
| - Enabled 5-minute cron on orchestrator. Public repo — Actions minutes are unlimited. Cron catches new issues when pipeline is idle. Closes #135. | ||
| - Bug: cron trigger was added to `on:` but `schedule` was not added to the job `if:` condition — cron fired but job was skipped every time. Fixed in PR following #175. |
There was a problem hiding this comment.
This history bullet is ambiguous/incorrectly referenced: it says "Fixed in PR following #175", but #175 is an issue (and this PR is the fix). Suggest rewording to reference the issue directly (e.g., "Fixed in #175") or name the actual PR that fixed it so the link is unambiguous.
| - Bug: cron trigger was added to `on:` but `schedule` was not added to the job `if:` condition — cron fired but job was skipped every time. Fixed in PR following #175. | |
| - Bug: cron trigger was added to `on:` but `schedule` was not added to the job `if:` condition — cron fired but job was skipped every time. Fixed in #175. |
The cron trigger was added in PR #174 but the job-level if: condition did not include github.event_name == 'schedule', causing all cron runs to be skipped immediately. - Added 'schedule' to the if: condition - Changelog: new entry for this bug - Pitfall #22: always check if: conditions when adding triggers - History: noted the bug in 2026-03-19/20 entry Fixes #175 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
061829e to
951dbc7
Compare
Fixes #175
Problem
PR #174 enabled a 5-minute cron on the orchestrator but didn't add
scheduleto the job'sif:condition. Cron fired at 07:52 UTC but the job was immediately skipped.Fix
Added
github.event_name == 'schedule'to theif:condition on theorchestratejob.Docs
if:conditions when adding triggersHow this happened
Copilot CLI added the cron trigger to
on:but didn't read the existingif:condition to check if it gates onevent_name. This is the same class of bug as the quality gateworkflow_dispatchswitch where theif:wasn't updated either.