Skip to content

Weekly scheduled dependency-breakage check#200

Merged
lesnik512 merged 7 commits into
mainfrom
scheduled-dep-check
Jun 9, 2026
Merged

Weekly scheduled dependency-breakage check#200
lesnik512 merged 7 commits into
mainfrom
scheduled-dep-check

Conversation

@lesnik512

Copy link
Copy Markdown
Member

Summary

  • Extracts the existing lint + pytest matrix from ci.yml into a reusable workflow _checks.yml (triggered via workflow_call). ci.yml becomes a thin caller; push/PR behavior is unchanged.
  • Adds scheduled.yml — runs _checks.yml every Monday at 06:00 UTC, also dispatchable via the Actions tab.
  • On scheduled-event failure, a report-failure job opens or updates a single rolling tracking issue labeled scheduled-failure, via gh issue invocations in .github/scripts/report-scheduled-failure.sh. Manual workflow_dispatch failures intentionally do not file issues.
  • Spec: planning/specs/2026-06-08-scheduled-dep-check-design.md. Plan: planning/plans/2026-06-08-scheduled-dep-check-plan.md.

What this catches

Because just install does uv lock --upgrade, every CI run already uses freshest deps — but only when a PR exists. The scheduled run fills the quiet-period gap: a new ruff / ty / pytest / typing-extensions / eof-fixer release that breaks the existing matrix will be noticed within a week instead of waiting for the next contributor's red CI.

Test plan

  • ci.yml runs green on this PR (proves the reusable-workflow refactor preserved push/PR behavior — same matrix, same commands).
  • Post-merge: trigger scheduled-dep-check manually from the Actions tab (workflow_dispatch). Expected: checks passes green, report-failure is skipped (if: guard excludes dispatch events).
  • Post-merge red-path verification (optional but recommended): in a follow-up branch, temporarily change just install lint-cijust install lint-ci && false AND drop the && github.event_name == 'schedule' half of the if: guard. Push, dispatch, confirm a new issue is filed with the correct title (Scheduled dependency check failed), label (scheduled-failure), and run URL. Then dispatch a second time and confirm a comment appears on the same issue rather than a second issue. Revert both temp edits before merging.

Why post-merge for live scheduled.yml testing

GitHub requires workflow_dispatch workflows to exist on the default branch before they can be dispatched. The refactored ci.yml still gets exercised on this PR (because pull_request triggers don't have that constraint), so the reusable-workflow extraction is fully validated here.

Files

  • .github/workflows/_checks.yml (new)
  • .github/workflows/ci.yml (rewritten as thin caller)
  • .github/workflows/scheduled.yml (new)
  • .github/scripts/report-scheduled-failure.sh (new, +x)
  • planning/specs/2026-06-08-scheduled-dep-check-design.md (new)
  • planning/plans/2026-06-08-scheduled-dep-check-plan.md (new)

lesnik512 added 7 commits June 8, 2026 23:48
Captures decisions for a weekly GitHub Actions workflow that runs the
existing lint + pytest matrix and opens a rolling tracking issue on
failure, so dev/lint dependency regressions are caught during quiet
periods between PRs.
Five tasks: (1) refactor ci.yml into reusable _checks.yml,
(2) add gh CLI issue-management helper script,
(3) add scheduled.yml with weekly cron + report-failure job,
(4) live green/red-path validation on the branch,
(5) open the PR.

Implements planning/specs/2026-06-08-scheduled-dep-check-design.md.
ci.yml now delegates to a workflow_call-triggered _checks.yml.
No behavior change for push/PR runs; same matrix, same commands,
same concurrency.

Prepares the ground for a sibling scheduled workflow to reuse the
same jobs.
Maintains a single open issue labeled scheduled-failure: opens one
on first failure, comments on subsequent failures while open.
Idempotently creates the label with gh label create --force.

Consumed by scheduled.yml in a later commit.
Runs the reusable _checks.yml every Monday at 06:00 UTC.
On scheduled-event failure only, opens or updates a rolling
GitHub issue via .github/scripts/report-scheduled-failure.sh.
Manual workflow_dispatch failures intentionally do not report.

Closes the implementation portion of
planning/specs/2026-06-08-scheduled-dep-check-design.md.
When any permissions block is declared at job level, GitHub Actions
sets unspecified permissions to none. The report-failure job runs
actions/checkout@v4 which needs contents: read to clone the repo;
without it the step can fail on private repos and is fragile on
public repos.
…testing

The implementation includes contents: read alongside issues: write
on the report-failure job (required for actions/checkout when any
job-level permissions block is declared). Update the spec text and
YAML example accordingly.

Also reframe the 'Testing the workflow' section: workflow_dispatch
requires the workflow file on the default branch, so live testing
of scheduled.yml itself is post-merge. ci.yml's refactor is
fully exercised by the PR's pull_request run.
@lesnik512 lesnik512 self-assigned this Jun 9, 2026
@lesnik512 lesnik512 merged commit e0e84a5 into main Jun 9, 2026
6 checks passed
@lesnik512 lesnik512 deleted the scheduled-dep-check branch June 9, 2026 05:09
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.

1 participant