diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 0470a463..296f8cb3 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -21,6 +21,28 @@ env: # recompiling the vendored copy (matches the documented local build). OPENSSL_NO_VENDOR: '1' jobs: + gate: + name: CI/gate + runs-on: ubuntu-24.04 + timeout-minutes: 5 + permissions: {} + needs: [rust, dispatch-contracts, gsbot] + if: always() + steps: + - name: Require every CI job to succeed + env: + NEEDS_JSON: ${{ toJSON(needs) }} + run: | + set -euo pipefail + for job in rust dispatch-contracts gsbot; do + result=$(jq -r --arg job "$job" '.[$job].result // "missing"' <<< "$NEEDS_JSON") + if [[ "$result" != success ]]; then + echo "::error::$job did not succeed (result: $result)" + exit 1 + fi + done + echo 'CI/gate passed: Rust matrix, dispatch contracts and GSBot succeeded.' + rust: name: build · test · clippy (${{ matrix.module }}) runs-on: ubuntu-latest diff --git a/docs/REQUIRED-CI-GATE.adoc b/docs/REQUIRED-CI-GATE.adoc new file mode 100644 index 00000000..db6e435c --- /dev/null +++ b/docs/REQUIRED-CI-GATE.adoc @@ -0,0 +1,15 @@ +// SPDX-License-Identifier: CC-BY-SA-4.0 += Required CI gate + +The Branch-Floor ruleset requires the exact check name `CI/gate`. The gate +in `rust.yml` waits for its Rust build/test/Clippy/format matrix, dispatch +contracts and GSBot build/test/dependency-audit job. All three dependency +results must be success; GitHub aggregates all Rust matrix legs into the +Rust dependency result. Failed, skipped, cancelled, missing or unexpected +results fail the gate. The gate itself requires no token permissions. + +This is the primary CI aggregate, not a replacement for the separate source +attestation, E2E, governance, security or reviewer checks. It does not assert +a coverage percentage. GitHub's native coverage threshold rule requires +Code Quality and uploaded coverage data; those prerequisites need their own +evidence. No branch rule or coverage threshold is changed by this gate.