Skip to content

fix(census): do not count identifiers such as partial' as the Idris2 partial annotation - #101

Merged
hyperpolymath merged 3 commits into
mainfrom
claude/focused-meitner-uf53td
Nov 17, 2026
Merged

hyperpolymath merged 3 commits into
mainfrom
claude/focused-meitner-uf53td

Conversation

@hyperpolymath

@hyperpolymath hyperpolymath commented Nov 16, 2026 •

Copy link
Copy Markdown
Owner

Summary

scripts/census/proof-holes.sh counted ordinary identifiers as proof escape hatches. Its rules end in a bare \b, and a prime (') is not a word character, so partial' matched the Idris2 partial rule (class unsafe). In hyperpolymath/hypatia at 6f3f16f, tests/accept/ReceiptP5MissingExact.idr lines 33-36 define a total function named partial'; 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 \b becomes (?<[\w']) and a trailing \b becomes (?[\w']). Demonstrated defects (a concrete line matched before the change, not after): partial', partial'', believe_me', assert_total' (Idris2), sorry' and axiom' (Lean), Axiom' (Rocq). Agda, Isabelle and Dedukti rules got the same treatment without a separate demonstration (those languages allow primes in identifiers).
  • Left unchanged: the Rust (creusot, verus) and Ada (spark) rules, where ' is a lifetime or attribute tick, not an identifier character. The ?hole rule 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 (partial alone, partial, partial h : Nat, believe_me, sorry, axiom must count).

RSR Quality Checklist

Required

  • Tests pass (the ones runnable here; see Testing)
  • Code is formatted: not applicable, no formatter run
  • Linter is clean: not run
  • No banned language patterns
  • No unsafe blocks without // SAFETY: comments
  • No banned functions added
  • SPDX license headers present on modified files (unchanged)
  • No secrets, credentials, or .env files included

As Applicable

  • No census row or generated view is regenerated here. The re-census of hypatia (and the affected rows) is a separate step for the owner.

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.sh with the new controls: FAIL on the old script (primed identifiers counted: Ids.idr:2 unsafe partial and 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_STANDARDS not set, so the claims-registry reader cannot load).
  • tests/golden/check_controls_test.sh and tests/proofs/gate_controls_test.sh: NOT RUN meaningfully (need just and a prover argument).
  • Commit is SSH-signed; signature verification not possible locally (no allowedSigners file).

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. Commit ci: emit the required CI/gate check from proven-tests.yml adds job ci-gate (name: CI/gate) to .github/workflows/proven-tests.yml, by satisfying the gate (no check skipped, weakened or path-filtered).

  • Host: proven-tests.yml triggers on every pull_request with 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.
  • Job: needs: [proven-suite], if: always(), permissions: {}, timeout-minutes: 5, runs-on: ubuntu-24.04, pure run: shell, no uses: step (actions.lock unchanged). Exit 0 only when every required job is success, or skipped for a job configured as skipped-by-design behind a detector whose own result is success (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.txt gains CI/gate => .github/workflows/proven-tests.yml. bash scripts/check-required-contexts.sh . before: OK, 1 context; after: OK, 2 contexts. scripts/check-lock-sync.sh PASS; bun scripts/check-action-pinning.js PASS. shellcheck and actionlint not installed: NOT RUN.

Gate logic, extracted from the committed YAML and run with hand-set NEEDS_JSON:

all success                                  exit=0 (expected 0) PASS
one failure                                  exit=1 (expected 1) PASS
one cancelled                                exit=1 (expected 1) PASS
designed skip, detector success (synthetic)  exit=0 (expected 0) PASS
skip, no successful detector (synthetic)     exit=1 (expected 1) PASS

The two skip cases use a synthetic config (DESIGNED_SKIPS=proven-suite:detect); the real config has no designed skips.

t and others added 2 commits November 16, 2026 23:08
…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 <noreply@anthropic.com>
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 <noreply@anthropic.com>
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 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01J4QvDiW8qD4f2JDQJ4buGo
@sonarqubecloud

Copy link
Copy Markdown

@hyperpolymath
hyperpolymath marked this pull request as ready for review November 16, 2026 23:32
@hyperpolymath
hyperpolymath enabled auto-merge (squash) November 16, 2026 23:33
@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-16T23:33:00.303949Z
We couldn’t complete this review. Comment @codex review to try again.
24800e6 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Nov 16, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You'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.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 327e4d2 and 24800e6.

Files selected for processing: 4

  • .github/workflows/proven-tests.yml
  • .machine_readable/required-contexts-allow.txt
  • scripts/census/proof-holes.sh
  • tests/census/proof_holes_control_test.sh

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.

Share

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@hyperpolymath
hyperpolymath merged commit aebdf06 into main Nov 17, 2026
45 checks passed
@hyperpolymath
hyperpolymath deleted the claude/focused-meitner-uf53td branch November 17, 2026 01:58
hyperpolymath pushed a commit that referenced this pull request Nov 17, 2026
#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 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TbbnKqskQA5mj5gfMniPzi
hyperpolymath added a commit that referenced this pull request Nov 17, 2026
…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 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants