From 2a607492cce50d066a3f80c2c9eb54b6613e6204 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 17 Nov 2026 00:08:50 +0000 Subject: [PATCH] fix(ci): emit CI/gate from rust-ci so the Branch-Floor ruleset can pass echidna's Branch-Floor ruleset requires the status check `CI/gate`, but no workflow emitted it, so every pull request since 2026-11-16 19:45Z has stayed blocked without a failing check to show why. The owner ruled on 2026-11-17 to keep the requirement and give it a producer. The new `gate` job in rust-ci.yml is named `CI/gate` and needs the five Rust jobs. It passes only when Cargo.toml was detected and detect, check, test, audit and coverage all succeeded; a skipped, cancelled or missing job fails it. It uses no action, so actions.lock is unchanged. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_019a95kk88TZ1iegsBK3kox3 --- .github/workflows/rust-ci.yml | 36 +++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/.github/workflows/rust-ci.yml b/.github/workflows/rust-ci.yml index 5a29a7d5..5586886c 100644 --- a/.github/workflows/rust-ci.yml +++ b/.github/workflows/rust-ci.yml @@ -266,3 +266,39 @@ jobs: if (p + 0 < f + 0) { printf "FAIL: line coverage %.2f%% is below floor %s%%\n", p, f; exit 1 } printf "OK: line coverage %.2f%% >= floor %s%%\n", p, f }' + + # One context for the Branch-Floor ruleset, which requires `CI/gate` (owner + # ruling 2026-11-17: keep that requirement and give it a producer). Until + # this job existed nothing emitted `CI/gate`, so every pull request stayed + # blocked with no failing check to say why. The job name is the context, so + # it carries no `rust-ci / ` prefix. It passes only when Cargo.toml was + # found and every Rust job above succeeded: a skipped, cancelled or missing + # job fails it, so the gate cannot go green on work that did not run. + gate: + timeout-minutes: 5 + name: CI/gate + runs-on: ubuntu-latest + needs: [detect, check, test, audit, coverage] + if: always() + permissions: {} + steps: + - name: Check every Rust job succeeded + env: + NEEDS_JSON: ${{ toJSON(needs) }} + run: | + set -euo pipefail + has_cargo=$(jq -r '.detect.outputs.has_cargo // "missing"' <<< "$NEEDS_JSON") + if [ "$has_cargo" != true ]; then + echo "::error::Cargo.toml was not detected (has_cargo=$has_cargo); echidna is a Rust workspace, so this is a failure, not a skip" + exit 1 + fi + failed=0 + for job in detect check test audit coverage; do + result=$(jq -r --arg job "$job" '.[$job].result // "missing"' <<< "$NEEDS_JSON") + if [ "$result" != success ]; then + echo "::error::$job did not succeed (result: $result)" + failed=1 + fi + done + [ "$failed" = 0 ] || exit 1 + echo "CI/gate passed: detect, check, test, audit and coverage all succeeded."