ci: consolidate trivial gates into hygiene.yml, add concurrency - #169
Merged
Merged
Conversation
Consolidation: generated-file-gate, multi-arch-check, and doc-sync (each a
few seconds, no toolchain) were three separate near-instant workflows each
claiming their own runner on every push/PR. Merged into one hygiene.yml
job with a single checkout — 1 runner claim instead of 3. Trigger scope is
the union of the three originals, so nothing that used to run stops
running. The doc-sync steps are guarded to pull_request events only (the
script reads github.base_ref, unset on push).
clean-root.yml and gitleaks.yml are DELIBERATELY LEFT ALONE, even though
clean-root is exactly the class of job this consolidation targets. Both
back required branch-protection checks ('clean-root' and 'gitleaks') and
already carry their own concurrency groups — the safest option per the
task brief is to leave two checks branch protection depends on for every
PR as untouched, standalone workflow files rather than risk a check-name
change from folding them into a shared file. Verified byte-identical to
origin/main.
nself-first-check.yml, security.yml, desktop-{linux,macos,windows}.yml,
mobile-ci.yml, tvos-ci.yml, and e2e.yml are untouched — all already carry
concurrency and tight paths: filters (docker-compose paths, mobile/**,
tv/**, tests/**, etc.); nothing to add.
ci.yml is untouched — already has concurrency, and 4 of its jobs back
required checks ('nself CLI Check', 'Version Lockstep',
'Mobile Tests (coverage gate >=60%)', 'I18n Completeness Gate (N-S3-T3)').
No paths filter was added: GitHub does not skip a required check just
because paths-ignore excluded a push, it blocks merge waiting on a check
that never runs, so path-filtering a workflow that carries ANY required
check is unsafe.
Concurrency added to wiki-sync.yml and dependabot-review.yml (both plain
push/pull_request, not pull_request_target, so ref-keyed grouping is
safe and a stale rerun losing to a fresher one is the correct behavior).
Left alone, all release/publish/schedule-triggered by design:
android-release.yml, ios-release.yml, publish-updater.yml,
quarterly-doc-audit.yml (per the deploy-workflow exception), and
desktop-release.yml (already cancel-in-progress: false, correctly, and
untouched). dependabot-auto-merge.yml untouched (pull_request_target trap).
Required check names 'clean-root' (job id + name in clean-root.yml) and
'gitleaks' (job id in gitleaks.yml) are unchanged — files are
byte-identical to origin/main. ci.yml is also byte-identical to
origin/main, preserving 'nself CLI Check', 'Version Lockstep',
'Mobile Tests (coverage gate >=60%)', and
'I18n Completeness Gate (N-S3-T3)'.
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
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.
Summary
generated-file-gate.yml,multi-arch-check.yml,doc-sync.yml(each a few seconds, no toolchain) into onehygiene.ymljob with a single checkout — 1 runner claim per push instead of 3.doc-sync's steps are guarded topull_requestevents only (needsgithub.base_ref, unset on push).clean-root.ymlandgitleaks.ymlare deliberately left alone, even thoughclean-rootis exactly the class of job this consolidation targets. Both back required branch-protection checks (clean-root,gitleaks) and already carry their own concurrency groups. Per the hard safety constraint on this repo, the safer option is to leave the two checks branch protection depends on for every PR as untouched, standalone files rather than risk a check-name change from folding them into a shared workflow. Verified byte-identical toorigin/main.nself-first-check.yml,security.yml,desktop-{linux,macos,windows}.yml,mobile-ci.yml,tvos-ci.yml,e2e.yml— untouched, already carry concurrency + tightpaths:filters. Nothing to add.ci.yml— untouched, already has concurrency. Nopaths:filter added: 4 of its jobs back required checks (nself CLI Check,Version Lockstep,Mobile Tests (coverage gate ≥60%),I18n Completeness Gate (N-S3-T3)), and GitHub blocks a merge waiting on a required check thatpaths-ignoreprevented from running — path-filtering a workflow carrying any required check is unsafe.concurrencytowiki-sync.ymlanddependabot-review.yml(both plainpush/pull_request, notpull_request_target, so ref-keyed grouping is safe).android-release.yml,ios-release.yml,publish-updater.yml,quarterly-doc-audit.yml,desktop-release.yml(alreadycancel-in-progress: false, correctly).dependabot-auto-merge.ymluntouched (pull_request_targettrap).Safety — required check names verified byte-identical
clean-root(job id +name:inclean-root.yml) — file diff vsorigin/mainis empty.gitleaks(job id ingitleaks.yml) — file diff vsorigin/mainis empty.nself CLI Check,Version Lockstep,Mobile Tests (coverage gate ≥60%),I18n Completeness Gate (N-S3-T3)(all inci.yml) — file diff vsorigin/mainis empty.continue-on-error, no loosened assertions.Test plan
actionlinton all 20 workflow files post-change: exit 1, 5 findings — all 5 are pre-existingSC2086/SC2046/SC2012/SC2129/SC2010style/info notices, one-to-one matched against theorigin/mainbaseline (including the one now inhygiene.yml, copied verbatim fromdoc-sync.yml)actionlinton theorigin/mainbaseline (all 22 original files): exit 1, same 5 findings — zero new findingsgit diff origin/mainonclean-root.yml,gitleaks.yml,ci.yml: empty for all three