Repository navigation
ci: add the required CI/gate check; declare the prover-only coverage exemption - #41
Merged
Merged
Conversation
The live Branch-Floor ruleset requires a status check named exactly `CI/gate` but no workflow reported it. Add a gate job to proofs.yml that aggregates the Agda, Lean and Rocq legs and the coverage-exemption check with needs:, and fails on failure, cancellation, skipping or an empty set. Declare the prover-only coverage exemption in .machine_readable/coverage-exemption.toml and verify it in CI. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J4QvDf74BGYFzth9JRdGby
Contributor
|
Caution Review failedThe pull request is closed.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
|
hyperpolymath
marked this pull request as ready for review
November 17, 2026 02:10
hyperpolymath
enabled auto-merge (squash)
November 17, 2026 02:11
This was referenced Nov 17, 2026
hyperpolymath
added a commit
that referenced
this pull request
Nov 17, 2026
… in-workflow job to Proofs verdict (#43) ## Summary Adds `.github/workflows/ci-gate.yml`, a thin caller of the reusable `ci-gate.yml` in hyperpolymath/proven-cicd-and-workflows. It posts the commit status `CI/gate` that the Branch-Floor ruleset (25434034) requires and that nothing emitted. The suite publisher is now the only producer of `CI/gate`. **This is the bootstrap PR.** `CI/gate` cannot report on it: `workflow_run` and `schedule` run only the workflow file on the default branch, so the owner merges this PR past the gate once. ## Before merge Pinned to the suite PR head 0862fe8 for review. Merge only after proven-cicd-and-workflows#139 has merged, then re-pin to #139's merge commit on the suite's main: the sweep triggers below are only complete once the suite carries its sweep mode, and the lock record's `ref: 'main'` is only true after that. The re-pin touches `ci-gate.yml`, the `actions.lock` key and record, and one row of `tests/workflows/actions_lock_sha_refs_test.sh`. After merge, every PR needs every check in `profiles/ci-gate/hyperpolymath/resource-algebra.json` (schema v2, workflow and job; re-read at 0862fe8, unchanged since 1d657fe): - dogfood-gate.yml: 🔴 GATE: Empty-linter (invisible characters) - empty-linter.yml: 🔴 GATE: Empty-linter (invisible characters) - estate-rules.yml: estate-rules - governance.yml: Estate Governance Policy - lock-sync-gate.yml: actions.lock is in sync with the workflow YAML - main-estate-audit.yml: Central Estate CI/CD Audit - ossf-best-practices.yml: openssf-compliance - proofs.yml: Core proofs and expected rejections - proofs.yml: Lean recheck leg - proofs.yml: Proofs verdict - proofs.yml: Rocq recheck leg - proven-tests.yml: Proven 3-outcome test & bench suite - rust-ci.yml: Rust standalone tools and workspace gate - secret-scanner.yml: scan / gitleaks - secret-scanner.yml: scan / shell-secrets - squabble.yml: Squabble CI chains & required-context gate ## Changes - New `ci-gate.yml` caller: `workflow_run` with `types: [completed, in_progress]`, job id `gate`, `with: context: "CI/gate"`. - **Sweep triggers:** the caller also runs on `schedule` (`7,22,37,52 * * * *`) and `workflow_dispatch`. Every 15 minutes it re-evaluates `CI/gate` for open PR heads and the default branch. This bounds, but does not eliminate, a stale status: statuses are last-writer-wins, and GitHub may delay or skip scheduled runs. Permissions are `statuses: write, actions: read, contents: read, pull-requests: read` (`pull-requests: read` lists open PRs). - **Typed status mapping in the squabble checker:** `scripts/check-required-contexts.sh` accepts `<context> => status:<workflow file>`. For such a mapping it parses the workflow in-process with `Bun.YAML`, the same as for plain mappings, and verifies that: - the file exists; - it triggers on `workflow_run` with type `completed`; - a job's `uses:` is `hyperpolymath/proven-cicd-and-workflows/.github/workflows/ci-gate.yml@<40-hex>` or the local `./.github/workflows/ci-gate.yml`; - that job passes `with.context` exactly equal to the context. Any mismatch fails and names what is wrong. A plain mapping keeps its meaning. It is in this PR because the checker must verify the publisher this PR adds, and this PR is the one merged past the gate once. Same change as rsr-template-repo (the source) and mathesis; tests are in `tests/workflows/squabble_gate_test.sh`, section 5b. An earlier revision spawned yq here, which tripped the benchmark regression gate (2.025x against a 2.0x limit); in-process parsing brings it back to the main baseline (12 ms median, the same as main). - `.machine_readable/required-contexts-allow.txt` maps `CI/gate => status:.github/workflows/ci-gate.yml`, so the publisher is verified even though no repo-local ruleset JSON lists the context. - `tests/workflows/ci_gate_test.sh` (needs mikefarah yq v4, as `actions_lock_sha_refs_test.sh` already does): the "no workflow job is named `CI/gate`" negative reads parsed job names instead of a grep, so plain, double-quoted and single-quoted spellings all count. Planted controls for each spelling are detected, and an unrelated name is not flagged. - Reusable behaviour at 0862fe8: on an `in_progress` event it posts pending as its first step, and it re-checks the runs before and after every status write. Statuses stay last-writer-wins (the API has no compare-and-swap), so a stale state can stand until a later evaluation; the sweep mode that bounds this lands with the suite re-pin. The caller therefore has no `concurrency:` block, which would only delay the pending status. - Onboarded in `actions.lock`: a workflow key plus a leaf dependency record `hyperpolymath/proven-cicd-and-workflows@0862fe8…` with `ref: 'main'`, `commit`, `owner_id: 6759885`, `repo_id: 1326697643`, as the suite README prescribes for consumers with a lock-sync gate. - **Renamed the in-workflow job** `proofs.yml` `gate` from `name: CI/gate` to `name: Proofs verdict`; the job id, `needs:` and verdict logic are unchanged (from #41). `CI/gate` now belongs to the suite publisher alone. Updated: workflow comments, `scripts/ci-gate.sh` messages, `.machine_readable/coverage-exemption.toml` comment, `.github/workflows/README.adoc`, and `CHANGELOG.adoc`. The CHANGELOG entry was lost in the merge of main and is restored in ebd11ae. - `tests/workflows/actions_lock_sha_refs_test.sh`: one row added to its case table for the new SHA-keyed record. Nothing weakened. - Drift, owner to decide: the repo-local `.github/rulesets/*.json` does not list `CI/gate`, while the live ruleset requires it. The rulesets JSON is not edited here. ## Testing Compared against a worktree of origin/main, with actionlint and yq v4. - `scripts/check-lock-sync.sh`, `bun scripts/check-action-pinning.js`, `scripts/check-required-contexts.sh .`: pass. The checker reports 1 pull_request producer and 1 commit-status publisher verified. - actionlint on `ci-gate.yml`: clean. - Every `tests/workflows/*.sh`: no regressions against the baseline, including `ci_gate_test.sh` and `squabble_gate_test.sh` (104 passed). Not tested: no live run. End-to-end behaviour on GitHub, including the schedule and the suite's sweep mode, is unproven until a caller is on a default branch. Two known limits are left for the owner: third-party checks are not counted by the gate, and anyone with write access can post a `CI/gate` status by hand because the ruleset pins no integration. ## RSR Quality Checklist ### Required - [x] Tests pass: the repo's fast checks (`scripts/check-lock-sync.sh`, `bun scripts/check-action-pinning.js`, `scripts/check-required-contexts.sh`, every `tests/workflows/*.sh`) were run against an `origin/main` baseline, with no regressions. `just test` itself was not run, because `just` and the prover toolchains are not installed in this session. - [x] Formatting: no formatter applies to the changed YAML, shell, AsciiDoc and allow-file content. The changes follow the repo's existing style. - [x] Linter is clean: actionlint reports nothing on `.github/workflows/ci-gate.yml`. - [x] No banned language patterns: the diff has no Python, Go, TypeScript, Deno or ReScript. The checker's embedded JavaScript runs on Bun. - [x] No `unsafe` blocks: not applicable (no Rust changes). - [x] No banned functions: none are introduced. - [x] SPDX headers: present on every new or modified source file, including `ci-gate.yml` (`MPL-2.0`). `actions.lock` is machine-generated and carries none, as before. - [x] No secrets, credentials or `.env` files. ### As Applicable - [ ] Repo deed `(status)` / `(maturity)`: not updated; project state is unchanged. - [ ] Repo deed `(ecosystem)`: not updated. The new suite dependency is recorded in `actions.lock`. - [ ] Repo deed `(meta)` / `docs/decisions/`: not updated. - [ ] `docs/status/ROADMAP.adoc`: not updated. - [x] Documentation: `.github/workflows/README.adoc` describes the CI/gate publisher. - [ ] `TOPOLOGY.md`: not applicable. - [x] `CHANGELOG.adoc` updated. - [x] New dependencies: the only one is the estate's own `hyperpolymath/proven-cicd-and-workflows` reusable, pinned by full SHA. No third-party licence change. - [ ] ABI/FFI: not applicable. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01J4QvDg8YzLVHtwwDfcY3J9 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **New Features** * Added a `CI/gate` status check for pull requests from the same repository, with scheduled, manual, and workflow-run updates. * Added safeguards that require an owner-applied approval label for pull requests changing protected CI gate files. * **Changes** * Renamed the workflow’s aggregate result to **Proofs verdict**; the `CI/gate` status is published separately. * Required-check configuration now supports commit-status checks alongside pull-request workflow checks. * **Documentation** * Added guidance on CI gate behavior, approval safeguards, and setup. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Jonathan D.A. Jewell <6759885+hyperpolymath@users.noreply.github.com> Co-authored-by: Claude <noreply@anthropic.com>
hyperpolymath
pushed a commit
that referenced
this pull request
Nov 17, 2026
main moved six commits ahead (#36, #37, #41, #43, #44, #47). The branch's proofs.yml predated #43's rename of the aggregating job to `Proofs verdict`, so the CI/gate publisher reported "never reported: proofs.yml:Proofs verdict" on this PR's head. Conflicts: CHANGELOG.adoc keeps both sides' entries, newest first; PROOF-STATUS takes main's revdate. The port's changelog line said the gate's `-W noUnsupportedIndexedMatch` was unchanged; #37 removed it, so the line now says the gate suppresses no warning and names the abbreviated and split-pragma refusals. coverage-exemption.toml: drop `pending-removal = ["src/interface"]`, whose comment says to delete it when this PR merges; this PR removes the tree. The exemption still holds, and a planted src/interface/*.zig is refused. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J4QvDjDR2MdRwZH9b4rKJn
Open
12 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
The live
Branch-Floorruleset (25434034) requires a status check named exactlyCI/gate, and no workflow reports it. That blocks #36 and #37. This PR adds the job. It does not touch #36, #37 or #96.Changes
.github/workflows/proofs.yml: new jobname: CI/gate, withneeds: [proofs, lean-leg, rocq-leg, coverage-exemption]andif: always().scripts/ci-gate.sh, which fails onfailure,cancelled,skipped, an emptyneeds, or malformed input.contents: read.proofs.ymlbecauseneeds:only reaches jobs in the same workflow, and those are the repo's real correctness legs. No reusable workflow for this exists instandards(checked: noCI/gatethere, onlyrequired-contexts.ymland the coverage uploader for Rust), so none was reused..machine_readable/coverage-exemption.toml+scripts/check-coverage-exemption.sh+ jobcoverage-exemption: the repo declaresmeasurable-runtime-code = false, and CI checks that claim. It fails if runtime code appears undersrc/, outside a declared shrink-only pending list (src/interface, the Idris2/Zig scaffold that Port template fixes (rsr-template-repo #421 and earlier); remove the unused ABI/FFI scaffold #40 removes).tests/workflows/ci_gate_test.sh: positive control, failure/cancelled/skipped/empty/malformed cases, a check thatneeds:lists every other job inproofs.yml, and a planted-runtime-code case.CHANGELOG.adoc.Testing
Run locally:
tests/workflows/ci_gate_test.shcheck-lock-sync,check-required-contexts,check-root-shape,check-no-placeholders,check-action-pinning.jsNot run locally: shellcheck and asciidoctor are not installed in this environment. The real proof is the
CI/gatecheck run on this PR (see the comment below once it reports).Known limitations / owner-only items
uses:isactions/checkout@v7.0.1, the same refproofs.ymlalready uses andactions.lockalready lists. A raw SHA would desyncactions.lock, andgh actions-lockis not available here, so I did not hand-edit the lock. Re-pinning to a SHA is a lock-tool run.quality.yml,estate-rules.ymland the other PR workflows are not aggregated, becauseneeds:cannot cross workflow files. Say if you want those folded in (reusable-workflow calls, or a check-run poller).code_coveragerule is in the live ruleset, not in any file here. An Agda repo uploads no Cobertura report, so the rule cannot pass, and uploading a fabricated report would be a lie. The honest fix is to remove the rule:gh api -X PUT repos/hyperpolymath/resource-algebra/rulesets/25434034with the current body minus{"type":"code_coverage",…}. The canonicalstandardsbranch-floor.jsonhas onlydeletionandnon_fast_forward, and the estate already retiredcode_coveragefromBaseon 2026-10-02. Until then this PR's declared exemption is evidence for the change, not a bypass.CI/gate), so.github/rulesets/branch-floor.jsonno longer describes it.Generated by Claude Code