Skip to content

Commit 18a2a69

Browse files
fix(ci): repair + wire status-gate; require coq-build-gate (#301)
Three gate-integrity fixes surfaced by the 2026-06-16 ground-truth sweep (companion to the proof-status doc PR #300). ## Changes 1. **`scripts/status-gate.sh:3`** — `//` C-style comment → `#`. The script was a **bash syntax error** and aborted immediately (delimiter-only fix; owner string unchanged). 2. **`.github/workflows/status-gate.yml`** (new) — runs `status-gate.sh` on PRs touching `formal/**`, `PROOF-NEEDS.md`, `TEST-NEEDS.md`, or the script. The gate **never ran in CI before** (only `just status-gate`), which is why a live count drift went unnoticed. Non-required for now. 3. **`.github/settings.yml`** — adds the always-on `coq-build-gate` aggregator (PR #254) to `required_status_checks`, so **a broken proof / new `Admitted` cannot merge to `main` undetected.** ## ⚠ Two things to decide - **Branch-protection change (owner-only).** Item 3 edits `required_status_checks`. Please confirm before merge — that's the intentional completion of PR #254 (the aggregator was built to be required-safe), but it's your call. - **Merge order — #300 first.** The new `status-gate` check is **currently RED on purpose**: it correctly detects the live `main`-wide count drift (marker says `4`, `coqc`/grep say `5`). PR #300 corrects the marker to `5`; once that merges, this check goes green. So: **merge #300, then this.** - **Unverified:** I did **not** run `cargo test --all-targets -- --list`, so I can't confirm `TEST-NEEDS.md`'s `467` test-count marker is current. If it has also drifted, the `status-gate` check will stay red on the *test-count* assertion until that marker is refreshed. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent e879fe1 commit 18a2a69

3 files changed

Lines changed: 49 additions & 1 deletion

File tree

.github/settings.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,10 @@ branches:
115115
contexts:
116116
- "hypatia-scan"
117117
- "codeql"
118+
# Added 2026-06-16: make the always-on Coq aggregator (PR #254) a
119+
# required check so a broken proof / new Admitted cannot merge to
120+
# main undetected. Owner: confirm this branch-protection change.
121+
- "coq-build-gate"
118122
enforce_admins: true
119123
required_signatures: true
120124
restrictions: null

.github/workflows/status-gate.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# SPDX-License-Identifier: MPL-2.0
2+
# Owner: Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
3+
# Status Gate — fail a PR when the PROOF-NEEDS.md / TEST-NEEDS.md count
4+
# markers drift from coqc/cargo ground truth. This wires the previously
5+
# broken (`//` syntax error on line 3) + unwired scripts/status-gate.sh
6+
# into CI so admit-count / test-count drift is caught automatically.
7+
# NOTE: not yet a required status check — see .github/settings.yml.
8+
name: Status Gate
9+
10+
on:
11+
pull_request:
12+
paths:
13+
- 'formal/**'
14+
- 'PROOF-NEEDS.md'
15+
- 'TEST-NEEDS.md'
16+
- 'scripts/status-gate.sh'
17+
- 'Cargo.toml'
18+
- 'Cargo.lock'
19+
- '**/Cargo.toml'
20+
- '.github/workflows/status-gate.yml'
21+
workflow_dispatch:
22+
23+
permissions:
24+
contents: read
25+
26+
concurrency:
27+
group: status-gate-${{ github.ref }}
28+
cancel-in-progress: true
29+
30+
jobs:
31+
status-gate:
32+
name: status-gate
33+
runs-on: ubuntu-latest
34+
steps:
35+
- name: Checkout repository
36+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
37+
- name: Install Rust toolchain
38+
uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9 # stable
39+
- name: Cache cargo
40+
uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2
41+
- name: Run status-gate (proof + test count drift)
42+
env:
43+
CARGO_INCREMENTAL: "0"
44+
run: ./scripts/status-gate.sh

scripts/status-gate.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22
# SPDX-License-Identifier: MPL-2.0
3-
// Owner: Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
3+
# Owner: Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
44
set -euo pipefail
55

66
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"

0 commit comments

Comments
 (0)