Skip to content

fix: add schedule to orchestrator if: condition#176

Merged
microsasa merged 1 commit intomainfrom
fix/schedule-if-condition
Mar 20, 2026
Merged

fix: add schedule to orchestrator if: condition#176
microsasa merged 1 commit intomainfrom
fix/schedule-if-condition

Conversation

@microsasa
Copy link
Owner

Fixes #175

Problem

PR #174 enabled a 5-minute cron on the orchestrator but didn't add schedule to the job's if: condition. Cron fired at 07:52 UTC but the job was immediately skipped.

Fix

Added github.event_name == 'schedule' to the if: condition on the orchestrate job.

Docs

How this happened

Copilot CLI added the cron trigger to on: but didn't read the existing if: condition to check if it gates on event_name. This is the same class of bug as the quality gate workflow_dispatch switch where the if: wasn't updated either.

Copilot AI review requested due to automatic review settings March 20, 2026 07:59
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

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 job if: 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.

- 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.
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
- 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.

Copilot uses AI. Check for mistakes.
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>
@microsasa microsasa force-pushed the fix/schedule-if-condition branch from 061829e to 951dbc7 Compare March 20, 2026 08:06
@microsasa microsasa merged commit f39c725 into main Mar 20, 2026
3 checks passed
@microsasa microsasa deleted the fix/schedule-if-condition branch March 20, 2026 08:07
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: cron schedule trigger skipped — missing from orchestrator if: condition

2 participants