Repository navigation
fix(census): do not count identifiers such as partial' as the Idris2 partial annotation - #101
Conversation
…partial annotation The proof-holes rules end in a bare \b. A prime is not a word character, so `partial'`, `believe_me'`, `sorry'`, `axiom'` matched as the keyword. The hypatia receipt fixture ReceiptP5MissingExact.idr defines a total function `partial'` and was counted as unsafe = 4 (true count 0). Idris2, Agda, Lean, Rocq, Isabelle and Dedukti rules now use (?<![\w']) and (?![\w']) in place of \b (grep -P). Rust and Ada rules are unchanged: a prime is not an identifier character there. Controls added to proof_holes_control_test.sh: primed identifiers must not count, real keywords must. No census row or generated view is touched. Co-Authored-By: Claude Fable 5.2 <[email protected]> Claude-Session: https://claude.ai/code/session_01J4QvDiW8qD4f2JDQJ4buGo
The Branch-Floor ruleset requires a status check named exactly `CI/gate`. This repo never emitted it. Add job `ci-gate` (name: CI/gate) to proven-tests.yml, which triggers on every pull_request with no path filter and starts and runs today. It needs every other job in the workflow (proven-suite), runs with if: always(), uses no third-party action, and exits 0 only when every required job succeeded (a skip passes only for a job configured as skipped-by-design behind a detector that itself succeeded). Failure, cancelled, missing or empty results all fail the gate. Map the context in required-contexts-allow.txt so check-required-contexts.sh keeps verifying it. Co-Authored-By: Claude Fable 5.2 <[email protected]> Claude-Session: https://claude.ai/code/session_01J4QvDiW8qD4f2JDQJ4buGo
SonarCloud rule githubactions:S7679 flags $1 and $2 used directly in result_of, in_list and detector_of. Each is now assigned to a named local. No change in behaviour: the gate's decision logic was re-run locally with success, failure, cancelled, skipped, empty, designed-skip and unclassified-job inputs and gives the same exit codes as before. Co-Authored-By: Claude Fable 5.2 <[email protected]> Claude-Session: https://claude.ai/code/session_01J4QvDiW8qD4f2JDQJ4buGo
|
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 17 minutes. View limit details
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. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
#101 landed on main while this PR was open. It fixes the same partial' false positive, and does so for every marker rule rather than only `partial`, with its own tests. So this merge keeps main's scripts/census/proof-holes.sh and drops this branch's narrower rule and its regression test. The PR now changes census data only. The rows were re-censused on top of #101 (update-rows.sh, 16 repos): hypatia 58 -> 77 own files, 680 -> 1040 declarations, unsafe 0; standards 2 -> 3 own files, 40 -> 66 declarations; the 14 Idris2 rows with unsafe markers moved to their current commits with no unsafe count changing; echidna 170 -> 163 own files from newer commits. Census tests pass, the catalogue matches its rows, the atlas check passes and the atlas tests pass 13/13. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01TbbnKqskQA5mj5gfMniPzi
…rkers (#105) ## Summary This refreshes the census rows for hyperpolymath/hypatia, metadatastician/standards and the 14 rows that have Idris2 proofs and a non-zero `unsafe` count. The hypatia row now covers the actions.lock closure work in hyperpolymath/hypatia#1026 and hyperpolymath/hypatia#1187. This PR first carried its own fix for a scanner false positive: the Idris2 function `partial'` was counted as four `partial` annotations. #101 landed on main meanwhile with the same fix, applied to every marker rule. The merge `39ea12a` keeps main's scanner and drops this PR's narrower rule and test. **The PR now changes census data only.** ## Changes | Repository | Change | |---|---| | hyperpolymath/hypatia @ `29a9e4a` | own files 58 → 77, declarations 680 → 1040, unsafe 0 | | metadatastician/standards @ `b49a33e` | own files 2 → 3, declarations 40 → 66 | | hyperpolymath/echidna | own files 170 → 163, declarations 1969 → 1676, from its newer commits | | 13 other Idris2 rows with unsafe markers | move to their current commits; counts unchanged | The 13 rows in the last line are ambientops, deed-core, developer-ecosystem, ephapax, poly-ssg, proven, raze-tui, reposystem, ssg-collection, cerro-torre, gossamer, paint-type and vordr. No unsafe count changed in the 14 refreshed Idris2 rows. Their markers are real `partial` annotations, and the false positive affected only hypatia. `docs/atlas/generated/*` is regenerated with `census-atlas.mjs build` and `render-catalogue.sh`. ## Follow-up Standards' row still names `docs/proof-debt.adoc` as its status document. standards#1635 renames standards' record to `3-practice/PROOF-STATUS.adoc` and retires that ledger. Once it merges, one more `update-rows.sh metadatastician/standards` will name the new file. ## RSR Quality Checklist ### Required - [x] Tests pass: `tests/census/*.sh` all pass, `bun test tests/atlas/census-atlas.test.mjs` 13/13 - [x] Catalogue matches rows; `census-atlas.mjs check` PASS - [x] No banned language patterns, no secrets - [x] No source files changed ### As Applicable - [ ] Deed and ROADMAP: not changed; project state did not change ## Open PRs this touches This PR changes only `docs/atlas/census/rows.jsonl` and the four generated atlas files. Of the other open PRs: - **#98** refreshes the same hypatia row at `6f3f16f`. This PR refreshes it at `29a9e4a`, which is later and includes hypatia#1187. If this merges, #98 is superseded. - **#96** (resource-algebra row) and **#100** (ddraig-ssg row) refresh different rows. They still edit the same files, so whichever merges second will conflict. To resolve, rerun `scripts/census/update-rows.sh` for its row on top of the new main, then regenerate. Do not hand-merge the generated files. - **#99** touches `docs/atlas/generated/registry.adoc`, which this PR does not change. **#102** and **#103** do not overlap with this PR. ## Testing Ran `update-rows.sh` on the 16 repositories on top of main at `261e6dc`. Then ran the census tests, the catalogue diff, and the atlas build, check and tests. No licence content is touched. https://claude.ai/code/session_01TbbnKqskQA5mj5gfMniPzi --- _Generated by [Claude Code](https://claude.ai/code)_ --------- Co-authored-by: Claude <[email protected]>
…bels (#102) ## Summary Two small fixes found during the trope-checker proof close-out. 1. `validate()` in `scripts/registry/claims-registry.mjs` accepted any extra field. A row carrying `pwg: 'PWG-1'`, `token` or `nonsense: 42` passed. ADR 0004 lists the exact fields, and says a record holds no grade, token, leg or flag. The validator is now closed over that set, as `bridges.mjs` and `theory.mjs` already are. 2. `docs/status/PROOF-STATUS.adoc` still labelled the THY-1 Rocq and Lean CI receipts of run 42896264290 "(current)". The receipt deed records them as superseded by run 43498592499. ## Changes - `validate()` refuses any top-level field outside `id, repo, claim, kind, statement, status_doc, agda, shelf, source_commit, receipt`. It also refuses any field of `agda` other than `{module, names}`, and any field of `receipt` other than `{path, sha256}`. A record that is not an object is refused too. - New test `validation is closed over the ADR 0004 field set`. It covers `pwg`, `grade`, `token`, `legs`, `leg`, `flags`, `foundation_diverse`, `nonsense`, a grade nested in `agda`, a grade nested in `receipt`, and a missing required field. - PROOF-STATUS, THY-1 Rocq and Lean rows: run 42896264290 is now labelled "(superseded on 2026-11-13)". Each row adds the current receipt, run 43498592499 at main `034f215`. This follows the Agda row, which already said so. Evidence: `verification/receipts/theory_praxis.deed` lines 66–81 and 89–105, written in `580f9f9` on 2026-11-13. The file SHA-256s in the current manifests (`e2f900…`, `4158e5…`) match the ones the doc gives, so "unchanged" is checked, not assumed. This is PROOF-POLICY §8.4 rule 5. Shared-file note: none of the open PRs (#96, #98, #99, #101) touch these three files. I ran the closed validator on the `claims.jsonl` of #96 (49 rows) and of #99 (22 rows). Both pass, so this change does not break either of them. ## Testing **Falsified first.** I ran the new test against the pre-fix validator and it failed (`Received function did not throw`). I also ran a probe script against the pre-fix validator with ten rows: `pwg`, `grade`, `token`, `legs`, `leg`, `flags`, `foundation_diverse`, `nonsense:42`, `agda.pwg` and `receipt.pwg`. Every row came back **ACCEPTED**. After the fix all ten are refused, each with a message that names the field. `MATHESIS_STANDARDS=<standards @ e5a39d7> bun test tests/registry/` → 27 pass, 0 fail. The reader digest `37ff85be…` was verified. Not done here: `just check`. It needs the pinned Guix shell. CI runs `registry-check`. ## Not changed (reported to the owner separately) - The THY-1 Lean leg's empty `(axioms)` is vacuous. `lean4/FeatureReachability.lean` declares no theorem or lemma, and the axiom audit keeps only `.thmInfo`. This PR keeps the historical sentence "no declared theorem depends on an axiom" on the superseded line. For the current receipt, the new text says only that it "records … an empty `(axioms)` clause", and does not claim more. - ADR 0004 says `agda` is `null` for a non-theorem. `validate()` still does not enforce that. Left alone, because it is outside the scope of this PR. ## RSR Quality Checklist - [x] Tests pass (`bun test tests/registry/`) - [x] No banned language patterns (Bun JS only) - [x] SPDX headers unchanged on modified files - [x] No secrets --- _Generated by [Claude Code](https://claude.ai/code/session_01J4QvDg2kzHbnbH2pmDf2Ar)_ Signed-off-by: Jonathan D.A. Jewell <[email protected]> Co-authored-by: Claude <[email protected]>
… in-workflow job to Proven suite verdict (#106) ## 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 (27264518) requires. 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` and the `actions.lock` key and record. After merge, every PR needs every check in `profiles/ci-gate/hyperpolymath/mathesis.json` (schema v2, workflow and job; re-read at 0862fe8, unchanged since 1d657fe): - agda-proof-policy.yml: Agda, Rocq and Lean in the pinned Guix - 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 - proven-tests.yml: Proven 3-outcome test & bench suite - proven-tests.yml: Proven suite verdict - 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` is what lists open PRs. - **Typed status mapping, which closes the former open item:** `scripts/check-required-contexts.sh` accepts `<context> => status:<workflow file>`. For such a mapping it parses the workflow in-process with `Bun.YAML`, as it does for plain mappings. An earlier revision spawned yq and tripped the benchmark regression gate. It then verifies that: - the file exists; - it triggers on `workflow_run` with type `completed`; - it has a job whose `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, and a plain mapping keeps its meaning. `.machine_readable/required-contexts-allow.txt` now maps `CI/gate => status:.github/workflows/ci-gate.yml`, replacing the stale `proven-tests.yml` line, which passed even when the publisher was removed. The change 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. It is the same change as in rsr-template-repo (the source) and resource-algebra; the tests are in `tests/workflows/squabble_gate_test.sh`, section 5b. - 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, because 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. For the same reason the caller has no `concurrency:` block, which would only delay the pending status. - Onboarded in `actions.lock`: workflow key plus a leaf dependency record `hyperpolymath/proven-cicd-and-workflows@0862fe8…` with `ref: 'main'`, `commit`, `owner_id: 6759885` and `repo_id: 1326697643`, as the suite README prescribes for consumers with a lock-sync gate. - **Renamed the in-workflow job:** `proven-tests.yml` job `ci-gate` changes from `name: CI/gate` to `name: Proven suite verdict`, together with its step-summary heading and messages. Job id, `needs:` and verdict logic are unchanged (from #101). `CHANGELOG.adoc` has a new entry, and `.github/workflows/README.adoc` documents the caller. - This repo has no `ci_gate` test, so none was changed or added. ## Testing Compared against a worktree of origin/main, with actionlint and yq v4. - `scripts/check-lock-sync.sh`, `bun scripts/check-action-pinning.js` and `scripts/check-required-contexts.sh .` pass; the last reports 1 pull_request producer and 1 status publisher. - actionlint on `ci-gate.yml`: clean. - Every `tests/workflows/*.sh`: no regressions against the baseline. All pass in this run, including `squabble_gate_test.sh` (102 passed). - `Hypatia neurosymbolic scan` segfaulted (exit 139) on the merge commit 443bf0f, before and on one re-run. It passed on main and on this PR's earlier head, so this is a scanner crash, not a finding; see the PR comment. Newer heads re-run it. 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 to the owner's decision: 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 were run against an `origin/main` baseline with no regressions: `scripts/check-lock-sync.sh`, `bun scripts/check-action-pinning.js`, `scripts/check-required-contexts.sh` and every `tests/workflows/*.sh`. `just check` itself was not run, because `just` and the pinned Guix prover shell are not available in this session. - [x] Formatting: no formatter applies to the changed YAML, shell, AsciiDoc and allow-file content, and 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; `CHANGELOG.adoc` keeps its existing header form. - [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 pull-request CI gate that publishes a `CI/gate` status, with a separate approval-label check for changes to protected workflow files. * **Bug Fixes** * Improved required-check validation to recognize workflow-published statuses and flag invalid or inconsistent publishers. * **Documentation** * Documented the new gate workflows, protected files, approval requirements, and setup. * **Tests** * Added coverage for gate workflows and required-status publisher validation. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Claude <[email protected]>



Summary
scripts/census/proof-holes.shcounted ordinary identifiers as proof escape hatches. Its rules end in a bare\b, and a prime (') is not a word character, sopartial'matched the Idris2partialrule (classunsafe). In hyperpolymath/hypatia at 6f3f16f,tests/accept/ReceiptP5MissingExact.idrlines 33-36 define a total function namedpartial'; the census reported unsafe = 4 where the true count is 0. Open PR 98 carries that row. This PR does not touch PR 98 or any census row.The rules are evaluated by
grep -rnPI(PCRE), so the fix uses(?<[\w'])and(?[\w']).Changes
scripts/census/proof-holes.sh: in the Agda, Idris2, Lean, Rocq, Isabelle and Dedukti rules, a leading\bbecomes(?<[\w'])and a trailing\bbecomes(?[\w']). Demonstrated defects (a concrete line matched before the change, not after):partial',partial'',believe_me',assert_total'(Idris2),sorry'andaxiom'(Lean),Axiom'(Rocq). Agda, Isabelle and Dedukti rules got the same treatment without a separate demonstration (those languages allow primes in identifiers).'is a lifetime or attribute tick, not an identifier character. The?holerule already excludes primes by its own pattern.tests/census/proof_holes_control_test.sh: negative controls (partial' : Body -> Nat,partial'',partial_sum,partialApply,believe_me',assert_total',sorry',axiom',Axiom'must not count) and positive controls (partialalone,partial,partial h : Nat,believe_me,sorry,axiommust count).RSR Quality Checklist
Required
unsafeblocks without// SAFETY:comments.envfiles includedAs Applicable
Testing
Bun 1.4.4 and bash, no
just, Agda, Rocq, Lean or Guix.tests/census/*_test.sh(9 scripts): all PASS before and after.tests/census/proof_holes_control_test.shwith the new controls: FAIL on the old script (primed identifiers counted:Ids.idr:2 unsafe partialand others), PASS on the new one.tests/shape/*.sh: PASS.bun test tests/atlas tests/registry tests/applied: 31 pass, 1 fail, identical before and after (MATHESIS_STANDARDSnot set, so the claims-registry reader cannot load).tests/golden/check_controls_test.shandtests/proofs/gate_controls_test.sh: NOT RUN meaningfully (needjustand a prover argument).Screenshots
Not applicable.
Generated by Claude Code
CI/gate
The account ruleset "Branch-Floor" requires a status check named exactly
CI/gate. This repo never emitted it. Commitci: emit the required CI/gate check from proven-tests.ymladds jobci-gate(name: CI/gate) to.github/workflows/proven-tests.yml, by satisfying the gate (no check skipped, weakened or path-filtered).proven-tests.ymltriggers on everypull_requestwith no path filter and starts and runs today.quality.yml("Code Quality") fails at startup on this branch, so the gate is not hosted there.needs: [proven-suite],if: always(),permissions: {},timeout-minutes: 5,runs-on: ubuntu-24.04, purerun:shell, nouses:step (actions.lockunchanged). Exit 0 only when every required job issuccess, orskippedfor a job configured as skipped-by-design behind a detector whose own result issuccess(none configured).failure,cancelled, an empty or missing result, a skip without a successful detector, and a needed job that is neither required nor advisory all exit 1. It prints a job/result table and the denominator to the log and$GITHUB_STEP_SUMMARY. Denominator: 1 required job, 0 advisory..machine_readable/required-contexts-allow.txtgainsCI/gate => .github/workflows/proven-tests.yml.bash scripts/check-required-contexts.sh .before: OK, 1 context; after: OK, 2 contexts.scripts/check-lock-sync.shPASS;bun scripts/check-action-pinning.jsPASS. shellcheck and actionlint not installed: NOT RUN.Gate logic, extracted from the committed YAML and run with hand-set
NEEDS_JSON:The two skip cases use a synthetic config (
DESIGNED_SKIPS=proven-suite:detect); the real config has no designed skips.