Repository navigation
ci: run code-quality on main nightly, and on demand - #6246
chalfontchubby wants to merge 3 commits into
Conversation
Main's checks only ran on a merge, so a failure caused by the date (#6244) or by a dependency release first showed up on the next unrelated PR. A nightly scheduled run at 00:17 UTC puts it on main instead, and workflow_dispatch allows a manual run. kernel-binaries still runs only on PRs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
springfall2008
left a comment
There was a problem hiding this comment.
Automated comment from the triage bot.
Review of 6b1013e5 (ci: run code-quality on main nightly, and on demand): 1 finding, inline; 0 in the body.
Checked: the YAML parses to pull_request / push: [main] / schedule: 17 0 * * * / workflow_dispatch; kernel-binaries stays skipped on a non-PR event because its if reads github.event.pull_request.head.repo.full_name, which is null on schedule, and the existing push: main runs already exercise that path; pre-commit-ci/lite-action stays behind its pull_request guard; no other workflow in .github/workflows/ has a schedule to collide with it, and nothing on main reads code-quality's check names. The gap the change leaves is the one the PR body states itself - it reports a broken main a day late rather than preventing it, which needs strict_required_status_checks_policy or a merge queue, and that was a deliberate decision.
Note, not a finding: the first nightly run will fail on web_pv_calibration_chart until #6245 merges, as the PR's Testing section already says.
| branches: [main] | ||
| # Nightly on main (scheduled runs use the default branch), so a failure that comes from the date or from a new | ||
| # dependency release, rather than from a merge, shows on main before it shows up on the next unrelated PR (#6244). | ||
| # Just after midnight UTC, when a test written against "today" first goes wrong. kernel-binaries only runs on a PR |
There was a problem hiding this comment.
Automated comment from the triage bot.
This sentence is cut off mid-way: it ends "kernel-binaries only runs on a PR" with no verb and no full stop, immediately before the schedule: key it is meant to explain. The reader is left without the consequence - the PR body's own wording is "kernel-binaries already runs only on PRs from this repo, so it is skipped".
Failure scenario: nothing at runtime, but this is the only place in the file that says what a scheduled trigger does to kernel-binaries, and it is the line a maintainer will read when asking whether schedule: can try to commit kernel binaries to main. As written it stops before answering. Completing it - e.g. "... so a scheduled run skips it." - keeps the file's existing rationale-per-trigger style intact.
Verified by reading the checkout: the job does skip on schedule, because its if: github.event.pull_request.head.repo.full_name == github.repository resolves to null == repo, hence false, on an event with no pull_request payload; the pre-existing push: main runs already take that same path, so the new trigger adds no new risk there.
There was a problem hiding this comment.
Automated reply from the triage bot.
Fixed in 5bf5dd2. The comment now ends "kernel-binaries only runs on a PR from this repo, so a scheduled run skips it." This is a comment-only change, and the triggers are as they were. Pre-commit (check yaml and the quick suite) passes locally.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Opened by Claude on behalf of @chalfontchubby.
Summary: run the
code-qualityworkflow onmainevery night at 00:17 UTC, and allow it to be started by hand, so a brokenmainshows up onmainrather than on the next unrelated PR.Why: the checks on
mainonly run when something merges. A failure that doesn't come from a merge stays hidden until someone's PR trips over it:web_pv_calibration_chartpassed in its PR and onmain, then failed from 2026-11-17 00:00 UTC because it read the real clock. The first sign was unrelated PRs going red (fix in test(web): pin the clock in the PV Calibration page test #6245).ModuleNotFoundError: No module named 'requests', a change in the build environment rather than in the code.A nightly run catches both kinds within a day, on
main's own commit status. It runs just after midnight UTC, when a test written against "today" first goes wrong.What changes:
schedule(cron17 0 * * *) andworkflow_dispatchare added toon:in.github/workflows/code-quality.yml. Nothing else changes:pre-commitjob runs exactly as on a push tomain, andpre-commit-ci/lite-actionstays limited to PRs.kernel-binariesalready runs only on PRs from this repo, so it is skipped.Note: GitHub sends notifications for a failed scheduled run to the person who last changed the cron line, which after this merges is me.
This PR doesn't stop merges that are green only against an older
main, which caused the 14 Nov breakages (Black ontest_savings_bookkeeping.py,docs_marketplaceon the Anker docs). That needs the "require branches to be up to date" setting or a merge queue, which is a separate decision.Testing: pre-commit's lint hooks,
check yamlincluded, pass. The quick-test hook fails only onweb_pv_calibration_chart, which is fixed in #6245. The schedule itself can only be exercised once this is onmain;workflow_dispatchthen lets it be tried at once.🤖 Generated with Claude Code