ci: add CI OK aggregate required check with skip-detection (toon-meta#279) - #154
Merged
Conversation
…#279) Append a ci-ok job (name: CI OK) that needs every job in ci.yml and becomes the single required branch-protection check. Branch protection counts a skipped required check as passing, so requiring the ~20 paths-filtered jobs individually cannot catch a job that should have run but didn't. CI OK closes that hole: for each needed job it mirrors the job's own if: condition from the same needs.changes.outputs.* flags, and a 'skipped' result passes only when that mirrored condition is false. Unconditional jobs (changes, dead-token-guard) must be 'success' outright; 'failure'/'cancelled' always fail. Matrix jobs are collapsed via needs.<job>.result, never required per leg. Verified with actionlint 1.7.7 and by simulating the verdict script across docs-only, filtered-run, wrongly-skipped, failed-detect, push, and cancelled scenarios. Part of toon-protocol/toon-meta#270 Part of toon-protocol/toon-meta#279 Co-Authored-By: Claude Fable 5 <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.
Adds a single aggregate job
ci-ok(context name CI OK) to.github/workflows/ci.yml, intended to replace the interim required-check pair (Detect Changed Paths+Dead Token Reference Guard) as the ONE required branch-protection check. Branch protection counts a skipped required check as passing, so requiring the ~20 paths-filtered jobs individually can never catch a job that should have run but didn't.CI OKrunsif: always(),needsall 18 other jobs, and produces a real verdict on every PR — including docs-only PRs, which end green with legitimate skips rather than an empty check set.Three-way verdict logic
For each needed job:
changes(Detect Changed Paths) anddead-token-guard(Dead Token Reference Guard), the only unconditional jobs in ci.yml: any result other thansuccessfails.successpasses;skippedpasses ONLY IF the job's ownif:condition, mirrored in the aggregate from the exact sameneeds.changes.outputs.*flags the job consumes (plusgithub.event_name == 'push'), evaluates false. If the flags say the job should have run but it'sskipped, the aggregate fails with an explicit "expected to run but was skipped" error.failure/cancelledalways fail.Matrix jobs (
desktop-smoke-e2e,desktop-e2e-integration-shard,server-cross-compile) surface as one collapsedneeds.<job>.result— success only when every leg succeeded — so legs are never required individually. Ifchangesitself fails, its outputs are empty, every mirrored condition reads false, and the must-run check onchangesis what turns the run red. The implementation interpolates all workflow context into env vars once, then computes a readablejob | result | expectedtable in pure bash.Job classification
Must-always-run:
changesdead-token-guardConditionally expected (skip-allowed only when their detect flags are all false;
pushevents always expect them):rust-lintunit-testsdesktop-coredesktop-smoke-e2edesktopdesktop-e2e-relaydesktop-e2e-integration-sharddesktop-e2e-integrationbackend-integrationrelay-e2ewebmobilesecurityserver-cross-compilewindows-rustdesktop-build-macosSkippable-by-design on agent PRs (when their paths didn't change — the aggregate enforces that the skip is legitimate):
mobile(Flutter),server-cross-compile,windows-rust,desktop-build-macos, and the whole desktop e2e family.on: pull_requestat workflow level has nopaths:filter, soCI OKruns on every PR. Existing jobs, theirif:conditions, and the detect filters are untouched.Verification
actionlint1.7.7: clean..github/workflows/ci.yml, which is in therustandmobiledetect filters — so the rust family, desktop family, mobile, and the aggregate all run here; onlyweblegitimately skips.Part of toon-protocol/toon-meta#270
Part of toon-protocol/toon-meta#279
🤖 Generated with Claude Code