Repository navigation
fix(ci): live label queries, real allow-ci gating, dead triggers - #607
Merged
Merged
Conversation
- query allow-ci/allow-bench/bench-skip labels via API instead of the event payload: re-runs reuse the payload frozen at trigger time, so labels added after a failure were never seen - gate ci-deep and flake-check behind allow-ci with a hard-fail step; they previously ran for fork PRs regardless of the gate. Fail instead of skip because skipped required checks count as passing - stop cancel-in-progress on main: back-to-back merges cancelled each other's runs, leaving main untested - non-draft emits a nix-changed output instead of failing grep on docs-only PRs (red herring X); downstream jobs skip cleanly - only approved reviews re-trigger CI, not comment reviews - branches: ["!main"] in bogus/docs never matched anything (only-negative patterns match no branch); use branches-ignore - docs concurrency group per-ref so PRs don't cancel each other - paginate gh-pages artifact listing (was capped at 30) and pick newest artifact per name - handle permission API failure gracefully; pin nothing-but-nix@v10 in bogus
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.
Why
PR #606 exposed a CI gating bug: re-running the failed
allow-cijob kept failing even after theallow-cilabel was added. The label check readgithub.event.pull_request.labels— a payload frozen at trigger time, which re-runs reuse verbatim. A general audit of the workflows turned up several more robustness issues.Changes
test.yml
allow-ciqueries labels live via the API instead of the event payload, so re-runs see labels added after the triggering event. Permission-check fallback kept (auto-allow-ci'sGITHUB_TOKENlabeling doesn't re-trigger workflows).ci-deepandflake-checkare now actually gated byallow-ci— previously they ran for fork PRs regardless; the gate only protected the cheap template jobs. They fail (via aRequire allow-cifirst step) rather than skip, because skipped required checks count as passing under the ruleset and would let an unvetted PR satisfyTests ubuntu-latest. Behavior change: external PRs get no CI until labeled, matching the gate's stated intent.cancel-in-progressis now conditional. Back-to-back merges to main previously cancelled each other's runs, leaving main untested.non-draftemits anix-changedoutput instead of failinggrep '.nix'on docs-only PRs (red ❌ on every review of a non-nix PR). Downstream jobs skip cleanly, preserving the skipped-required-checks path that lets docs-only PRs merge. Also fixes the unescaped-dot regex.pull_request_review: submittedpreviously fired full CI on comment/changes-requested reviews too.benchmark.yml
allow-benchandbench-skip.bogus.yml / docs.yml
branches: ["!main"]was a dead trigger — a filter with only negative patterns matches no branch at all. Replaced withbranches-ignore: [main]."docs"group made concurrent PRs cancel each other's builds. Review-triggered docs builds gated to approvals.nothing-but-nixpinned to@v10in bogus.yml for consistency.gh-pages.yml
docs-*name instead of an arbitrary one.Not changed (flagged)
EndBug/latest-tag@latestin particular) — separate supply-chain hardening if desired.pull_request_reviewkeeps no paths filter by design: it's the re-trigger lever and the docs-only-merge mechanism.Validated with
actionlint(only pre-existing info-level SC2086 notes remain) andjust fmt.