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
Merged
12 tasks done
hyperpolymath
added a commit
that referenced
this pull request
Nov 30, 2026
…unused ABI/FFI scaffold (#40) ## Summary This PR brings resource-algebra into line with fixes in hyperpolymath/rsr-template-repo. **It ports from the still-open hyperpolymath/rsr-template-repo#421 at `f846da9`**, which was the owner's decision. If #421 changes in review, re-sync this PR before merging. The proof wording comes from template `main`. Per the owner's decision, it also removes the template ABI/FFI scaffold. This is a pure-theory Agda repository and ships no FFI. `main` is merged in at `8c35136`, which brings #36, #37, #41, #43, #44 and #47. ## Changes - **Rust proof wording**: `CLAUDE.md`'s Proofs table and `verification/proofs/README.adoc` name Creusot with Pearlite contracts and Verus, with Kani and Aeneas alongside the default toolset, never instead (standards PROOF-POLICY §1.2). - The `CLAUDE.md` block sits below `ARRIVAL-PACK:END` and is hand-authored, so it is edited in place. `generate.sh` output is byte-identical, and `verify.sh` passes. - `governance_policy_test.sh` carries the template's matching assertions. - `docs/status/PROOF-STATUS.adoc` records that no Rust verifier has run. The only Rust is the `scripts/*.rs` mint tooling, which implements no theorem. Kani and Aeneas are not applicable. - **Container engine guard**: `build/just/container.just` and `build/container/stapeln/ct-build.sh` accept only `podman | nerdctl | docker` and exit 2 for anything else. - `tests/workflows/container_engine_test.sh` is wired into `estate-rules.yml`, with a pinned Just 1.56.0 step. - **Agda OPTIONS pragma refusal**: `scripts/check-agda.sh` and the agda branch of `scripts/check-proofs.sh` refuse, before Agda runs, any gated module whose `OPTIONS` pragma could override `-W error`. That covers: - `-W`, `--warning`, and every abbreviation of `--warning` that Agda accepts (`--warn`, `--wa`, …). On Agda 2.6.3, `--warn=noerror` and `--wa=noerror` both checked a warning module with rc 0. - Pragmas split over lines, read whole up to `#-}`. `check-proofs.sh` fails closed if the scan cannot run. - Negative tests: `tests/workflows/check_agda_pragma_test.sh` and `tests/workflows/check_proofs_agda_test.sh`. - With `main`'s #37 the gate suppresses no warning, so nothing on the command line or in a pragma can weaken `-W error`. - **ABI/FFI scaffold removed**: `src/interface/` (Zig FFI, Idris2 ABI, generated stubs), `tests/ffi_strings_test.sh` and `docs/developer/ABI-FFI-README.adoc`. - `just test` and `just quality` now gate on the real Agda check. Before, they ran only idris2 and zig. - `validate.just`, `validate-template.sh` and `run-proven-suite.sh` accept a tree with no `src/interface/`. They still fail closed if the tree has one but it is incomplete, and `--require-zig` still fails. - Zig and Idris2 are dropped from the mise and Guix toolchain files. `SETUP.adoc`'s Guix route now says Agda must be installed separately. - `.machine_readable/coverage-exemption.toml` drops its `pending-removal = ["src/interface"]` entry, whose comment said to delete it when this PR merges. - Recorded in the deed `(variant (paths :removed …))`, `docs/status/PROOF-NEEDS.adoc` (no ABI/FFI proof obligations, dated 2026-11-16) and `CHANGELOG.adoc`. ## RSR Quality Checklist ### Required - [x] Tests pass: `just test` and `just quality` pass, and so do all 37 `tests/workflows/*.sh` and `tests/*.sh` scripts on the merged tree. - [x] Code is formatted. `just fmt` is N/A now that the Zig is gone. shellcheck at warning level and above is clean on the changed shell files. - [x] Linter is clean - [x] No banned language patterns - [x] No `unsafe` blocks without `// SAFETY:` comments (none) - [x] No banned functions - [x] SPDX headers present on the new files (MPL-2.0) - [x] No secrets, credentials, or `.env` files ### As Applicable - [x] Repo deed updated: `(variant)` and `:last-updated`. - [x] Documentation updated: README, SETUP, QUICKSTART-DEV, REPOSITORY-MAP, proof guide, PROOF-STATUS. - [x] CHANGELOG updated - [x] ABI/FFI: scaffold removed, so no seam remains to validate. ## Testing | Check | Before | After | |---|---|---| | `just test` | fail (rc 127: idris2 and zig not installed) | **pass**: core proofs, unit tests, all 9 expected rejections | | `just quality` | fail (same cause) | **pass** | | `tests/workflows/*.sh` and `tests/*.sh` | pass | **pass** (37 scripts) | | `scripts/check-agda.sh` | pass | **pass** | | arrival-pack `verify.sh` | pass | **pass** | | `just validate` | pass | **pass** | | `just doctor` | fail (idris2 and zig missing) | **pass** | These additional gates also pass on the merged tree: - `check-required-contexts`, `check-lock-sync`, `check-adoc-renders`, `check-coverage-exemption` - the cicd-suite code-hygiene gate, run at its CI pin Negative checks: - `CONTAINER_ENGINE=rokur just container-verify` exits 2. - With `--warn=noerror` planted in `Core.agda`, the real gate refuses the module before Agda runs. - Every new test fails against the scripts it guards. A planted `src/interface/*.zig` fails the coverage exemption. Known limitations: - `check-template-conformance.sh` T4 fails because the work-branch name is not in `:extra-branches`. It fails the same way on unchanged `main`, so it is environmental. - Local Agda is 2.6.3; CI pins 2.6.4.3. - Commits carry the environment's SSH signature, which could not be verified locally (no `allowedSignersFile`), and the estate key `id_ed25519_signing` is not in this container. - `resource-algebra.agda-lib` has a `flags:` line that the gate ignores (`--no-libraries`), so a `-W` placed there is not checked. --- _Generated by [Claude Code](https://claude.ai/code/session_01J4QvDjDR2MdRwZH9b4rKJn)_ <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **Changes** * The repository now focuses on its Agda proof library; the example Idris2/Zig interface and related documentation and tests have been removed. * Agda verification now rejects warning-option overrides and treats warnings as errors. * The Zig FFI test lane is reported as not applicable when the interface is absent, rather than as passed. * **Documentation** * Setup and proof guidance now reflect the Agda workflow and document Rust verifier requirements. * **Validation** * Container checks now accept only Podman, nerdctl, or Docker. <!-- 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>
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