Skip to content

CI: one gate job as the only required build check - #129

Merged
CaffeinatedCoder merged 2 commits into
mainfrom
chore/110-ci-gate
Oct 20, 2026
Merged

CaffeinatedCoder merged 2 commits into
mainfrom
chore/110-ci-gate

Conversation

@CaffeinatedCoder

@CaffeinatedCoder CaffeinatedCoder commented Oct 20, 2026 •

Copy link
Copy Markdown
Owner

Closes #110

Problem

main requires four job names: Test (ubuntu-latest), Pack, Integration (PostgreSQL 18) and Consumer smoke test. GitHub reports a skipped job as Success, even on a required check, so those checks cannot tell an intended skip from an accidental one. Every new lane also costs a protection edit on every protected branch: Integration (SQL Server 2022) (#100) runs today and is required nowhere.

Change

  • .github/workflows/dotnet.yml: a CI job that needs all five lanes, runs if: always(), reads toJSON(needs) and fails on any result except success. It writes a job/result table to the job summary. Skipped and cancelled lanes fail it, because no lane is skipped on purpose until CI: select the PostgreSQL, SQL Server, consumer and pack lanes from a derived map CodoMetis.EFCore.SchemaKit#12.
  • test/…/WorkflowGateConventionTests.cs (new) and Harness/WorkflowFile.cs (a small reader for workflow jobs and needs): every other job in dotnet.yml is in the gate's needs, the gate runs always(), it reads toJSON(needs) and fails on anything but success, and it reports as CI (and no other job does).
  • CLAUDE.md (CI section and the quality-controls table), CONTRIBUTING.md and ROADMAP.md: the required check for main and release/5.x is now CI.

No changelog line, since nothing a consumer sees changes.

Tests

Proof runs, dispatched on throwaway branches (now deleted), each with one lane seeded:

Branch Seeded lane Lanes CI
proof/110-lane-fails consumer: exit 1 consumer failure, the rest success failure
proof/110-lane-skips consumer: if: false consumer skipped, the rest success failure
proof/110-lane-cancelled consumer: timeout-minutes: 1 + sleep 300 consumer cancelled, the rest success failure
chore/110-ci-gate none all success success

In the skip proof every lane except the skipped one is green. Under today's four required checks that PR would merge.

Guard: each of these seeds fails WorkflowGateConventionTests: consumer dropped from needs, pack dropped from a block-list needs, a new docs job outside needs, if: always() removed, the gate renamed to Gate, and the result check loosened to == "failure". The complete block-list form passes. Unit suite: 490 passed.

Branch protection (for you to apply; I changed no settings)

Merge this PR first and wait until CI has reported green on main. If you remove the old names first, every open PR waits for a check that never reports. Then replace main's four contexts with the gate. app_id 15368 is GitHub Actions, as today:

gh api -X PATCH repos/CaffeinatedCoder/EFCore.ComplexIndexes/branches/main/protection/required_status_checks --input - <<'JSON'
{ "strict": true, "checks": [ { "context": "CI", "app_id": 15368 } ] }
JSON
gh api repos/CaffeinatedCoder/EFCore.ComplexIndexes/branches/main/protection/required_status_checks -q '.checks'

The issue says Labels and issue link may be required too, because it never stays pending. To require it as well, use "checks": [ { "context": "CI", "app_id": 15368 }, { "context": "Labels and issue link", "app_id": 15368 } ].

After the v5.5.0 cut, release/5.x gets the same protection with CI. The full command is in the corrected cut steps on CaffeinatedCoder/EFCore.ComplexIndexes#36.

🤖 Generated with Claude Code

dotnet.yml gains a `CI` job that needs every lane, runs `if: always()`
and passes only when each lane reports `success`. GitHub reports a
skipped job as Success even on a required check, so a skipped or
cancelled lane fails the gate too.

WorkflowGateConventionTests holds the gate to that rule: every other job
is in its needs, it runs always(), it reads toJSON(needs) whole, it fails
any result but success, and it still reports as `CI`.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@CaffeinatedCoder
CaffeinatedCoder merged commit 07db567 into main Oct 20, 2026
@CaffeinatedCoder
CaffeinatedCoder deleted the chore/110-ci-gate branch October 20, 2026 08:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/release Versioning, changelogs, release wiring chore Build, CI, packaging, refactoring with no behaviour change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI: one gate job as the only required build check

1 participant