chore(actions): name every run, and stop re-scanning the merge commit - #674
Merged
Conversation
TWO PROBLEMS, ONE OF THEM COSMETIC AND ONE NOT. The Actions list titles every run with the COMMIT MESSAGE. One push to `main` starts four workflows, so all four appear under the same `Merge pull request #NNN from ...` heading -- which reads as one job running four times rather than four different checks running once. That is how this change came to exist: the quartet at 12:22:08Z on 6ca893a looked like duplicated work and was not. `run-name` on all SEVEN workflows, not the four that collide today. Two of the others (`install-smoke`, `installer-smoke`) already run on pull requests, and a release run sitting in the same list under a commit message is the same confusion, just rarer. DELIBERATELY NOT `github.event.head_commit.message`. That was the obvious interpolation and it is the wrong one here: this repository writes long, multi-paragraph commit messages, GitHub already shows the commit beside every run, and re-titling with it restores exactly the clutter this removes. What the default title DROPS is the workflow's own identity, so that is what run-name carries -- name, event, and ref. THE REAL COST WAS ELSEWHERE. `security.yml` answered both `pull_request` and `push: branches: [main]`, so both its jobs ran a second time on the merge commit to re-answer a question the pull-request run had answered four minutes earlier: `dependencies` audits `uv.lock`, which the merge does not change, and neither job reads anything a merge could combine differently. Measured over the last forty runs: 11.4 minutes, ~2.5 per merge, 30s of it `dependencies` and ~2min `codeql`. The `push` trigger goes. `ci.yml` KEEPS its one -- when two pull requests merge in quick succession the post-merge run is the only thing that ever tests the tree that actually landed, and that argument does not transfer to a dependency audit.⚠️ The tradeoff is recorded in the file rather than left to be discovered. Code scanning reports alerts against the DEFAULT BRANCH, and that baseline is refreshed by analyses OF the default branch -- which now means the weekly cron alone. A finding introduced by a merge, or an alert a merge fixes, can take up to seven days to appear or clear in the Security tab. Pull-request analysis is unaffected and still runs on every change, so nothing reaches `main` unscanned; what is slower is the SUMMARY of what is on `main`, not the scanning itself. Pinned, because the clutter is caused by the workflows nobody thinks about: the new test discovers every `*.yml` from disk rather than listing them, so a workflow added tomorrow is covered on the day it lands. 4 mutants, 4 killed. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NzuKAe2RVrPt9acVAWjRyL
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.
1.
run-nameon all seven workflowsThe Actions list titles every run with the commit message, so one push to
mainproduced four entries all readingMerge pull request #673 from CodeGateSoftware/chore-v0.13.2-bump— four different checks that looked like one job running four times.Applied to seven, not the four that collide today —
install-smokeandinstaller-smokealready run on PRs, and a release run under a commit-message title is the same confusion, just rarer.Deliberately not
github.event.head_commit.message. That was the obvious interpolation and it's the wrong one here: this repo writes long multi-paragraph commit messages, GitHub already shows the commit beside every run, and re-titling with it restores exactly the clutter being removed. What the default title drops is the workflow's identity, so that's whatrun-namecarries — name, event, ref:2.
security.ymlno longer runs on pushBoth its jobs ran a second time on the merge commit to re-answer what the PR run answered four minutes earlier.
dependenciesauditsuv.lock, which the merge doesn't change, and neither job reads anything a merge could combine differently.Measured over the last 40 runs: 11.4 minutes, ~2.5 per merge (30s
dependencies, ~2mincodeql).ci.ymlkeeps its push trigger. When two PRs merge in quick succession the post-merge run is the only thing that ever tests the tree that actually landed — and that argument doesn't transfer to a dependency audit.Code scanning reports alerts against the default branch, and that baseline is refreshed by analyses of the default branch — which now means the weekly cron alone. A finding introduced by a merge, or an alert a merge fixes, can take up to seven days to appear or clear in the Security tab.
PR analysis is unaffected and still runs on every change, so nothing reaches
mainunscanned; what's slower is the summary of what's onmain, not the scanning. It's recorded in the file with the note that if the lag ever matters, restorepushrather than shortening the cron — a daily scan pays most of the cost for a fraction of the freshness.Happy to revert this half alone if you'd rather keep same-day Security-tab accuracy; the run-name half stands on its own.
Verification
New pin discovers every
*.ymlfrom disk rather than listing them, so a workflow added tomorrow is covered on the day it lands. 4 mutants, 4 killed — including one asserting the commit-message interpolation is rejected. Full suite 5110 passed / 3 skipped; ruff clean.