Skip to content

ci: add a stable aggregate check so the lanes can be required - #155

Merged
rubenhensen merged 1 commit into
mainfrom
ci/required-checks
Jul 30, 2026
Merged

ci: add a stable aggregate check so the lanes can be required#155
rubenhensen merged 1 commit into
mainfrom
ci/required-checks

Conversation

@rubenhensen

Copy link
Copy Markdown
Contributor

Prerequisite for turning on required status checks. Merge this before the ruleset changes, or every open PR blocks on a check its base does not run yet.

Nothing is required today

ruleset "main" (active): deletion, non_fast_forward, pull_request
legacy protection:       1 approving review, no required_status_checks

Envelope compatibility was built in #153 to become a required check, and was deliberately not path-filtered for exactly that reason — a path-filtered required check never reports on PRs that miss the filter, and branch protection then blocks them indefinitely. That cost was paid for a benefit that does not exist yet: today it runs on every PR and blocks nothing, same as API surface and the test lanes. A PR with a red gate merges on one approval.

Why not just require the lanes

Node 22, Bun 1.3.14, Deno 2.8.0 are matrix-named — the version is the check name. Require Bun 1.3.14, bump the matrix to 1.4.0, and that check never reports again: main blocks on a name nothing produces, with no failing job to fix. Same shape as the path-filtering trap, reached from a different direction.

Integration complete has a fixed name and needs: every lane, so a runtime bump stays a one-line matrix edit and branch protection never has to know.

Two details that carry the guarantee

  • if: always(). Without it the job is skipped when any lane fails — and GitHub counts a skipped check as passing for branch protection. The required gate would report green on a red build, which is precisely what it exists to prevent.
  • The empty-RESULTS guard. The loop runs zero times if needs resolves to nothing, and the step would exit 0 having asserted nothing.

Verified against the real shell

Extracted the run: block and ran it under bash --noprofile --norc -eo pipefail — what shell: bash actually gets — rather than a plain bash, which does not reproduce that environment:

RESULTS exit annotation
success success success success success 0
success failure success 1 an integration lane did not succeed
success skipped 1 an integration lane did not succeed
success cancelled 1 an integration lane did not succeed
(empty) 1 no lane results; the needs list resolved to nothing

Every annotation is reachable — the failure mode where a guard ships with its own error branch unreachable is what that table is checking for.

actionlint clean.

After this merges

The ruleset gets a required_status_checks rule covering Integration complete plus the stable-named checks from the other workflows. Deliberately excluded: nginx config test, which exists in both outlook-addon.yml and website.yml — requiring by name covers both copies, and deleting one job would leave the name still reporting from the other, so the gate would look alive while covering half of what you expect. Worth renaming one of them separately.

Part of encryption4all/postguard#247.

Nothing on `main` is a required status check today: the ruleset carries
deletion, non_fast_forward and pull_request rules only, and legacy protection
requires one review and no checks. So `Envelope compatibility` — built in #153
specifically to become required, and deliberately not path-filtered because a
path-filtered required check never reports — runs on every PR and blocks
nothing.

Requiring the lanes as they are named today would trade that for a worse
failure. `Node 22`, `Bun 1.3.14` and `Deno 2.8.0` are matrix-named, so the
version IS the check name: bumping the matrix retires the required check
silently, and main blocks with no failing job to point at. `integration-complete`
has a fixed name, so a runtime bump stays a one-line matrix edit.

Two details carry the guarantee:

- `if: always()`, because without it the job is SKIPPED when a lane fails and
  GitHub counts a skipped check as PASSING for branch protection. The gate
  would report green on a red build.
- an empty-`RESULTS` guard, because the loop over lane results runs zero times
  when `needs` resolves to nothing and the step would exit 0 having checked
  nothing.

Verified by extracting the `run:` block and running it under the shell Actions
actually uses (`bash --noprofile --norc -eo pipefail`), not a plain `bash`:
all-success exits 0; failure, skipped, cancelled and empty each exit 1 with a
reachable error annotation.
@rubenhensen
rubenhensen merged commit 96840cb into main Jul 30, 2026
30 checks passed
rubenhensen added a commit that referenced this pull request Jul 30, 2026
apps/outlook-addon and apps/website each had a job named `nginx config test`.
A required status check is matched by name across the whole repository, so the
two were indistinguishable to branch protection: requiring the name would cover
both copies, and deleting either job would leave the name still reporting from
the other — a gate that looks alive while covering half of what it names. Both
were therefore left out of the required set added in #155.

Only the display name changes. Both job ids stay `nginx`, so outlook-addon.yml's
`needs: [check, test, urls, nginx]` still resolves.
@dobby-coder
dobby-coder Bot deleted the ci/required-checks branch August 2, 2026 20:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant