ci: run every workflow on merge to main, except the release - #272
Merged
Conversation
The repository became PUBLIC on 2026-08-15. GitHub bills no Actions minutes for standard runners on public repositories, so the cost argument that kept `code-quality` and `migrate` off `push` no longer applies. Both now also run on merge to `main`; `ci` already did. `release.yml` stays `workflow_dispatch` only, deliberately and by the operator's explicit instruction. Its own header states the rule -- "Nothing about a money-moving tool should ship on a merge" -- and it could not run on `push` anyway: its `version` input is required and a push event supplies no inputs, so the job would fail at its first validation step. `migrate.yml` gains a safety property worth naming, because it is a property of the EVENT rather than of anyone's care: `db_path` is a `workflow_dispatch` input, and a push carries no inputs, so on a merge `inputs.db_path` renders empty and the job always takes its `migration_smoke.py` branch. No merge can supply a value that makes it write to a real database. The comment says so, and says not to add a default target or read one from a repo variable, since either would remove the property. `code-quality.yml` keeps its weekly schedule rather than replacing it: a CVE published against an unchanged pin is invisible to a per-merge trigger and obvious to a scheduled one. It still does NOT run on `pull_request`, and on a public repo that is now a security choice rather than a cost one -- fork PRs receive no repository secrets, so every one would fail at the preflight for a reason the contributor could not fix. KNOWN CONSEQUENCE: SONAR_TOKEN and SNYK_TOKEN do not exist at repo or org level, so `code-quality` will fail its preflight on every merge until they are added. That job exists to say why in one line rather than let the scanners fail obscurely, but it will now say it on a schedule of every merge. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
eaitbrahim
added a commit
that referenced
this pull request
Aug 15, 2026
…atched (#276) `code-quality` has failed on every merge to `main` since #272 added the `push` trigger. The cause is exactly what the job was written to report: Missing: SONAR_TOKEN SNYK_TOKEN ##[error]Process completed with exit code 1 Neither secret exists at repo or org level, so the preflight exits 1 and both scans are skipped. Nothing is broken in the code -- the workflow is correctly telling us it is not configured. WHY THAT ANSWER STOPPED BEING RIGHT. Failing loudly was correct when this ran weekly and on dispatch: an unconfigured repo produced one red X every Monday, and the message named the missing secrets instead of letting Sonar and Snyk fail with their own unhelpful auth errors. #272 added `push: [main]`, and the same behaviour now means `main` is permanently red for a condition that is not a defect. A red X on every merge is worse than a missing scan: it is a signal the reader learns to ignore, and it hides the next real failure. WHAT CHANGES. The preflight now reports rather than decides, and who asked determines the verdict: workflow_dispatch -> a human asked for a scan. Still FAILS, loudly. Silently doing nothing in response to a direct request is the worse outcome, so that path is unchanged. push / schedule -> nobody asked. Skips both scans, writes the missing secrets and where to get them to the run summary, and emits a ::notice. The build stays green. The two scan jobs are gated on a `configured` output rather than a condition written on them directly, because `secrets` cannot be referenced from a job-level `if:`. The skip is announced, never silent -- same standard the rest of this repo holds discovery to. A scan that did not run and says so is honest; one that quietly does nothing is not. Verified by running the preflight script directly in all three states: push without tokens exits 0 with `configured=false` and a correctly rendered summary; dispatch without tokens exits 1; either event with both tokens exits 0 with `configured=true`. This does not add the secrets. Once they exist the scans run and none of the above applies. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The repository became public on 2026-08-15. GitHub bills no Actions minutes for standard runners on public repositories, so the cost argument that kept
code-qualityandmigrateoffpushno longer applies.Final trigger set
main?ci.ymlpull_request,push [main],workflow_dispatchcode-quality.ymlpush [main],schedule,workflow_dispatchmigrate.ymlpush [main],workflow_dispatchrelease.ymlworkflow_dispatchrelease.ymlstays manualBy explicit instruction, and it could not work otherwise: its
versioninput isrequired, a push event supplies no inputs, so the job would fail at its first validation step. Its own header already states the rule — "Nothing about a money-moving tool should ship on a merge."The safety property that makes
migrateonpushsoundThis is a property of the event, not of anyone's care.
db_pathis aworkflow_dispatchinput; a push carries no inputs, so on a merge${{ inputs.db_path }}renders empty and the job always takes itsmigration_smoke.pybranch. No merge can supply a value that makes it write to a real database. The comment says so, and says not to add a default target or read one from a repo variable — either would remove the property.code-qualitykeeps its schedule, and still has nopull_requestThe weekly run is kept rather than replaced: a CVE published against an unchanged pin is invisible to a per-merge trigger and obvious to a scheduled one.
pull_requestremains absent, and on a public repo that is now a security choice rather than a cost one — fork PRs receive no repository secrets, so every one would fail at the preflight for a reason the contributor cannot fix.SONAR_TOKENandSNYK_TOKENdo not exist at repo or org level, socode-qualitywill fail its preflight on every merge until they are added. That job exists to say why in one line rather than let the scanners fail obscurely — but it will now say it on every merge rather than once a week. Add the two secrets, or say the word and I will make the preflight skip cleanly instead of failing red.🤖 Generated with Claude Code