Skip to content

ci(gate): the aggregate check fails when path detection does - #493

Merged
DemchaAV merged 1 commit into
developfrom
ci/gate-covers-path-detection
Aug 3, 2026
Merged

ci(gate): the aggregate check fails when path detection does#493
DemchaAV merged 1 commit into
developfrom
ci/gate-covers-path-detection

Conversation

@DemchaAV

@DemchaAV DemchaAV commented Aug 3, 2026

Copy link
Copy Markdown
Owner

Why

CI Gate is one of the two checks develop and main require — gh api repos/DemchaAV/GraphCompose/branches/develop/protection returns ["Architecture and Documentation Guards", "CI Gate"] for both. It aggregated the four heavy jobs but not changes, the path-detection job every one of them gates on.

That is not hypothetical. On run 30796472533 the detection step died on git fetch --no-tags --depth=100 origin main develop with RPC failed; HTTP 503. The four reactor jobs downstream resolved to skipped, not failure; contains(needs.*.result, 'failure') was therefore false, and the gate reported success. The run is red, but both required checks are green — on a pull request that is branch protection satisfied by a build that never happened.

What changed

  • .github/workflows/ci.ymlchanges joins the ci-gate needs list, with a comment naming the skipped-vs-failed distinction that made the omission invisible.
  • CiGateCoverageGuardTest (new, core) — parses the workflow and asserts every job that can run on a pull request is aggregated by the gate. A schedule-only job is recognised from its own if: condition (github.event_name == 'schedule') rather than an exclusion list, so a new job either joins the gate or fails this test. A second case fails when the gate names a job id that no longer exists, which is what a rename leaves behind.
  • The guard joins the -Dtest= list of the job it protects, so a bad edit fails the step that made it — the CiGuardListGuardTest pattern, which in turn verifies the new name resolves under core.

Verification

./mvnw -B -ntp clean verifyBUILD SUCCESS, exit 0. 692 tests in the closing module.

Both cases were confirmed to fail for the right reason before being accepted:

  • reverting needs to the pre-fix list → Expecting empty but was: ["changes"]
  • misspelling changes in needs'ci-gate' aggregates a job id that no longer exists

The workflow is checked out CRLF on Windows, so the parser normalises line endings before matching — without that the jobs: anchor misses and the guard silently reads nothing; that failure mode was hit and fixed during development, and the empty-parse assertion now catches it.

Lane: build/CI. No production code, no public API.

CI Gate is one of the two checks develop and main require, and it watched
the four heavy jobs without watching the path-detection job they all gate
on. When that job's git fetch returned HTTP 503 on run 30796472533 the four
resolved to skipped rather than failure, so the gate found nothing to report
and went green over a run that compiled nothing — both required checks green,
and on a pull request that is branch protection satisfied by a build that
never happened.

The gate now aggregates the detection job. CiGateCoverageGuardTest reads the
workflow and fails if any job that can run on a pull request is missing from
that list; a schedule-only job is recognised from its own if: condition
rather than an exclusion list, so a new job either joins the gate or fails
the guard. A second case fails when the gate names a job that no longer
exists, which is what a rename would leave behind.

./mvnw -B -ntp clean verify — BUILD SUCCESS. Both new cases confirmed red
first: dropping `changes` from the needs list reports ["changes"] unwatched,
and misspelling it reports the stale id.
@DemchaAV
DemchaAV merged commit 8ce43cf into develop Aug 3, 2026
12 checks passed
@DemchaAV
DemchaAV deleted the ci/gate-covers-path-detection branch August 3, 2026 12:39
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