Repository navigation
Description
Story
As an org administrator,
I want the off-peak scheduling standard codified in standards/ci-standards.md and this repo's own minute-0 crons offset,
so that the org source-of-truth repo both documents and obeys the convention before it is rolled out to the fleet.
Context
Promoted from petry-projects/.github-private#726 (epic #722). Phase 1 established the convention repo-locally in .github-private, which is now fully compliant: 0 minute-0 crons out of 20. The convention was never lifted into the org standard, and this repo is now the worst offender in the fleet — 11 of 14 scheduled workflows fire on the top of the hour, including one hourly 0 * * * *.
This story was previously held as hands_off because .github-private's dev-lead could not modify this repo. That is no longer true: this repo has its own dev-lead.yml, so the work is in-repo and automatable here.
Current violations in this repo
| Workflow | Cron |
|---|---|
compliance-retrigger.yml |
0 * * * * — hourly, on the hour |
dependabot-rebase.yml |
0 */4 * * * |
canary-rollout.yml |
0 */4 * * * |
add-to-project-reconcile.yml |
0 7 * * * |
feature-ideation.yml |
0 7 * * 5 |
standards-deploy.yml |
0 8 * * 1 |
pinned-version-report.yml |
0 8 * * 1 |
org-scorecard.yml |
0 9 * * 1 |
daily-org-status.yml |
0 11 * * * |
pr-limits-report.yml |
0 12 * * * |
compliance-audit-and-improvement.yml |
0 12 * * 5 |
Note standards-deploy.yml and pinned-version-report.yml collide exactly (0 8 * * 1), as do the two 0 */4 entries.
Acceptance Criteria
standards/ci-standards.mdgains a Scheduled workflow timing section codifying: no0 * * * *; no minute-0 starts; spread minutes across the hour; guidance for higher-frequency idempotent sweeps. It cites the.github-privaterepo-local section as its origin and is written so downstream repos defer to it.- Every scheduled workflow in this repo is offset off the top of the hour, changing only the cron minute field — never the hour, day, or frequency. No two workflows in this repo share an identical cron expression afterward.
- A CI compliance check fails any workflow in this repo whose cron minute is
0, with a message pointing at the new standard section. Wire it into the existing lint job. - The check and the offsets are covered by tests using the repo's existing bats conventions;
shellcheck --severity=warning -xstays clean. - Downstream fan-out is explicitly out of scope and stated as such in the PR — 18 minute-0 crons across 9 consumer repos remain, tracked in
.github-private#726.
Tasks / Subtasks
- Add the Scheduled workflow timing section to
standards/ci-standards.md(AC: Addressing PR comments #1) - Offset all 11 minute-0 crons, minute field only, de-duplicating the two collisions (AC: Add multi-agent isolation strategy using git worktrees #2)
- Add the minute-0 CI compliance check and wire it into lint (AC: Add coding standards & principles section to AGENTS.md #3)
- Add bats coverage; confirm shellcheck (AC: Add workflow, environment, and orchestration guidance #4)
- State the downstream-fan-out exclusion in the PR description (AC: Add stacked PR strategy and Epic-level workflow guidance #5)
Dev Notes
- Change the minute field only.
canary-rollout.ymlmust stay every-4-hours;compliance-retrigger.ymlmust stay hourly. Retiming frequency is not in scope and would change agent behaviour. - Pick offsets deterministically (e.g. hash the workflow filename into 1–59) rather than by hand, so the CI check and the values agree and new workflows get a defensible minute.
.github-private/AGENTS.mdhas the repo-local "Scheduled workflows" section this standard is promoted from — mirror its wording so the two do not drift, and expect that repo to replace its copy with a deferral pointer once this lands.- Precedent for repo-local → org promotion is the Cost-reporting section noted in
AGENTS.md; reuse that pattern rather than inventing a new one.
References
standards/ci-standards.mdpetry-projects/.github-private#726(origin), epic#722
Activity
don-petry commentedon Sep 1, 2026
Dev-Lead Implementation Plan
Issue: #1052 — Codify the off-peak scheduling standard and offset this repo's 11 minute-0 crons
Scope
Codify an off-peak "Scheduled workflow timing" section in
standards/ci-standards.md(promoted from the.github-privaterepo-local convention), offset all 11 minute-0 crons in this repo's own.github/workflows/(minute field only, de-duplicating the two colliding pairs via a deterministic filename hash), and add a CI lint check + bats coverage that fails any minute-0 cron. Downstream fan-out to consumer repos is explicitly out of scope.Implementation Checklist
standards/ci-standards.md: add the Scheduled Workflow Timing section (AC Addressing PR comments #1) — no0 * * * *, no minute-0 starts, spread minutes, guidance for high-frequency idempotent sweeps; cites the.github-privaterepo-local origin and is written for downstream deferral.scripts/lib/cron-timing.sh: pure, sourceable helpers —cron_minute_field,cron_minute_is_zero, deterministiccron_offset_minute(cksum-based, 1–59).scripts/check-cron-timing.sh: scans.github/workflows/*.yml, fails on any minute-0 cron, message points at the new standard section (AC Add coding standards & principles section to AGENTS.md #3).0 */4and two0 8 * * 1collisions (AC Add multi-agent isolation strategy using git worktrees #2).ci.yml's Lint job and.dev-lead/scripts/dev-lead-lint.sh(AC Add coding standards & principles section to AGENTS.md #3)..github/workflows/cron-timing-tests.yml: bats runner for the new suite.Tests to Write
test/scripts/cron-timing/cron-timing.bats: unit-test the lib helpers (minute extraction, minute-0 detection, deterministic/collision-free offsets).test/scripts/cron-timing/check.bats: the check fails on a fixture with a minute-0 cron and passes on the real.github/workflows/after offsetting; asserts no two workflows share an identical cron expression.Test Command
bats test/scripts/cron-timing/(plusbash scripts/check-cron-timing.shandbash .dev-lead/scripts/dev-lead-lint.sh)don-petry commentedon Sep 1, 2026
Dev-Lead: Implementation Complete
Plan Execution
standards/ci-standards.md(AC Addressing PR comments #1) — codifies no0 * * * *, no minute-0 starts, spread minutes, and the higher-frequency-idempotent-sweep guidance; cites the.github-private#726repo-local origin and the Cost-reporting promotion precedent, and is written so downstream repos defer to it.scripts/lib/cron-timing.sh(cron_minute_field,cron_minute_is_zero, deterministiccron_offset_minute=cksum(basename) % 59 + 1, range 1–59).scripts/check-cron-timing.sh— scans.github/workflows/*.yml, fails any minute-0 cron with a message pointing at the standard section + the suggested replacement minute (AC Add coding standards & principles section to AGENTS.md #3).ci.yml's Lint job and.dev-lead/scripts/dev-lead-lint.sh(AC Add coding standards & principles section to AGENTS.md #3).test/scripts/cron-timing/+ acron-timing-tests.ymlrunner;shellcheck --severity=warning -xclean (AC Add workflow, environment, and orchestration guidance #4).Offsets applied (minute field only)
compliance-retrigger.yml0 * * * *11 * * * *dependabot-rebase.yml0 */4 * * *50 */4 * * *canary-rollout.yml0 */4 * * *33 */4 * * *add-to-project-reconcile.yml0 7 * * *54 7 * * *feature-ideation.yml0 7 * * 541 7 * * 5standards-deploy.yml0 8 * * 116 8 * * 1pinned-version-report.yml0 8 * * 131 8 * * 1org-scorecard.yml0 9 * * 16 9 * * 1daily-org-status.yml0 11 * * *55 11 * * *pr-limits-report.yml0 12 * * *44 12 * * *compliance-audit-and-improvement.yml0 12 * * 557 12 * * 5Both collisions are resolved (
50vs33;16vs31) and no two workflows in.github/workflows/share an identical cron expression.Test Results
Files Changed
standards/ci-standards.md: new Scheduled Workflow Timing section; org-scorecard schedule line updated to09:06 UTC..github/workflows/*.yml: minute-only cron offsets (table above), comments updated to the new times.scripts/lib/cron-timing.sh,scripts/check-cron-timing.sh: new (lib + check)..github/workflows/ci.yml: new "Lint scheduled workflow timing" step in the Lint job..dev-lead/scripts/dev-lead-lint.sh: runs the check locally..github/workflows/cron-timing-tests.yml,test/scripts/cron-timing/{cron-timing,check}.bats: new tests + runner.docs/initiatives/canary-rollout-adr.md: cron reference updated to33 */4 * * *.Notes
standards/workflows/(e.g.feature-ideation.yml0 7 * * 5,dependabot-rebase.yml0 */4 * * *) are left untouched, and the check deliberately does not sweep them. The remaining 18 minute-0 crons across 9 consumer repos remain tracked inpetry-projects/.github-private#726; retiming a template changes what every consumer receives and belongs to that fan-out effort, not this source-of-truth timing fix.cron_offset_minute), so the CI check and the values agree and any newly added workflow gets a defensible, collision-resistant minute.stub-surface-driftcompliance test already asserts feature-ideation cron retuning is not drift, so the minute change there is expressly sanctioned.feat: implement issue #1052 — Codify the off-peak scheduling standard…