Skip to content

fix(census): comment-aware proof-holes.sh, Idris2 undefined-declaration axioms; refresh 13 rows - #27

Open
hyperpolymath wants to merge 4 commits into
mainfrom
claude/ephapax-architecture-plan-gzyctr
Open

hyperpolymath wants to merge 4 commits into
mainfrom
claude/ephapax-architecture-plan-gzyctr

Conversation

@hyperpolymath

@hyperpolymath hyperpolymath commented Nov 9, 2026 •

Copy link
Copy Markdown
Owner

Summary

This PR fixes three problems with scripts/census/proof-holes.sh:

  • False positives from comments. It matched markers one line at a time and skipped only lines that start with a comment. So prose inside a multi-line comment counted as a hole, for example "introduces ZERO new [Admitted.]".
  • Missed markers after comments. A marker after a closed comment on the same line was missed, for example (* c *) Lemma a : False. Admitted..
  • Idris2 postulates were invisible. Idris2 0.8.0 accepts a top-level signature with no clauses and treats it as a postulate, even under %default total. I checked this by hand: 0 bad : Void lets a module prove 1 = 2 with no warning. The scanner never saw these.

What changes:

  • Comment blanking. The scanner now matches against a copy of each file with comments blanked out, plus string literals where the string syntax is simple. It handles nested block comments, comments spanning several lines and trailing line comments. Line numbers and Agda/Idris pragmas are kept.
  • Idris2 undefined declarations. A new scripts/census/idris2-undefined.awk reports top-level Idris2 signatures that have no clauses, as class axiom with marker undefined declaration. Signatures after %foreign/%extern are FFI and are not reported. Backtick infix clauses count as definitions.

The 13 census rows in this session's repository scope are re-run with the fixed scanner. For ephapax: 0 holes (it was 15, all prose in comments, after its D0/D0b retirement in hyperpolymath/ephapax#422), and 12 axioms. The 12 are the erased declarations in src/abi that its ABI documents as "erased postulates".

Changes

  • scripts/census/proof-holes.sh:
    • adds the comment-blanking pass, with comment syntax per language: Rocq, Isabelle, Agda, Idris2, Lean, Rust/Creusot, Ada/SPARK, Dedukti;
    • adds the Idris2 undefined-declaration pass;
    • drops the line-start comment test;
    • notes that the change is local to this copy and needs carrying back to the proof-craft skill.
  • scripts/census/idris2-undefined.awk (new).
  • tests/census/proof_holes_comments_test.sh (new, wired into estate-rules.yml):
    • plants 15 markers in code across 7 languages, including one undefined Idris2 declaration;
    • adds decoys that must not be reported: markers in comments and strings, an FFI signature, and an infix definition.
  • docs/catalogue/census/catalogue-rows.json: the 13 in-scope rows are re-run from one clean pass (an earlier pass lost rows when the disk filled). Repo order is unchanged.
  • docs/catalogue/census/refreshes.json (new) records which rows were re-run and why, and render-catalogue.sh prints it under the intro.
  • docs/catalogue/catalogue.adoc and docs/atlas/generated/* are regenerated.

RSR Quality Checklist

Required

  • Tests pass:
    • tests/census/proof_holes_comments_test.sh: PASS;
    • bun test tests/atlas/census-atlas.test.mjs: 10 pass.
  • Code is formatted (shell and awk; no formatter applies)
  • Linter is clean (bash -n)
  • No banned language patterns (bash, awk, jq)
  • No unsafe blocks without // SAFETY: comments (n/a)
  • No banned functions: the markers in the test are fixture data written to a temp directory; scripts/check-escape-hatches.sh passes.
  • SPDX license headers present on all new/modified source files
  • No secrets, credentials, or .env files included

As Applicable

  • Documentation updated: the catalogue intro now lists partial refreshes.
  • Repo deed, ROADMAP, TOPOLOGY, CHANGELOG: not changed.

Testing

  • Comment pass, 16 local repos, old vs new scanner:
    • 0 findings added.
    • 9 removed, each checked by hand to occur only inside a comment: 6 in ephapax, 2 in absolute-zero, 1 in tropical-types.
  • Idris2 pass:
    • Over every .idr file in the Idris2 0.8.0 libs/ tree (base, contrib, linear, network, papers, prelude, test): 0 reports.
    • Over 238 other local .idr files: only the 12 ephapax declarations.
    • The first draft of the pass flagged %foreign signatures that come after modifier lines, and backtick infix definitions. Both are fixed and covered by the test.
  • Planted-marker test: the new scanner reports exactly the 15 planted markers. The old scanner misses the inline Admitted and the undefined declaration.
  • Checks:
    • catalogue re-render matches the committed file;
    • census-atlas.mjs check: PASS;
    • check-ijson-jcs.sh --enforce: 5/5 canonical;
    • check-adoc-renders.sh: PASS;
    • check-lock-sync.sh, check-root-shape.sh: PASS.

Not done

🤖 Generated with Claude Code

https://claude.ai/code/session_01J4QvDjUNwStGwcKTtAQ3NY

…rows

proof-holes.sh matched markers line by line and skipped only lines that
start with a comment, so prose inside multi-line comments (for example
"no new [Admitted.]") was counted as a hole, and a marker after a closed
comment on the same line was missed. It now matches against a copy of
each file with block comments (nested), line comments and simple string
literals blanked out, keeping line numbers and Agda/Idris pragmas.

Evidence: on 16 local repos the change adds no finding and removes 9,
each a marker that appears only in a comment (6 in ephapax, 2 in
absolute-zero, 1 in tropical-types). tests/census/proof_holes_comments_test.sh
plants 14 markers in code across Rocq, Agda, Idris2, Lean, Creusot,
SPARK and Isabelle plus decoys in comments and strings; the new scanner
reports exactly the 14 and the old one misses the inline Admitted. The
test is wired into estate-rules.yml.

Census: the 13 rows in this session's repository scope were re-run with
census-repo.sh and merged; docs/catalogue/census/refreshes.json records
which rows and why, and the catalogue prints it. ephapax drops from 15
holes to 0 after the D0/D0b retirement (hyperpolymath/ephapax#422).
Atlas regenerated; catalogue-check, atlas check and tests, ijson-jcs and
adoc render checks pass.

The comment-blanking pass is a local change to a copy of the proof-craft
skill's scanner and needs carrying back to the skill.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01J4QvDjUNwStGwcKTtAQ3NY
@coderabbitai

coderabbitai Bot commented Nov 9, 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 29 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 a3dbe73 and aa353b5.

Files ignored due to path filters: 4

  • docs/atlas/generated/az.adoc is excluded by !**/generated/**
  • docs/atlas/generated/classes.adoc is excluded by !**/generated/**
  • docs/atlas/generated/index.json is excluded by !**/generated/**
  • docs/atlas/generated/organisations.adoc is excluded by !**/generated/**
Files selected for processing: 10

  • .github/workflows/estate-rules.yml
  • docs/architecture/REPOSITORY-MAP.adoc
  • docs/catalogue/catalogue.adoc
  • docs/catalogue/census/catalogue-rows.json
  • docs/catalogue/census/refreshes.json
  • mathesis_chora.deed
  • scripts/census/idris2-undefined.awk
  • scripts/census/proof-holes.sh
  • scripts/census/render-catalogue.sh
  • tests/census/proof_holes_comments_test.sh
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

…ates

Idris2 0.8.0 accepts a top-level type signature that has no clauses and
treats it as a postulate, even under %default total: `0 bad : Void` lets
a module prove `1 = 2` with no warning (checked by hand). proof-holes.sh
did not see these, so a repo could hold postulates and still report 0
axioms. scripts/census/idris2-undefined.awk now reports such signatures,
on the comment-blanked copy, as class `axiom`, marker
`undefined declaration`. Signatures after %foreign/%extern are FFI and
are not reported; infix (backtick) clauses count as definitions.

Evidence: across all .idr files in the Idris2 0.8.0 libs (base, contrib,
linear, network, papers, prelude, test) it reports nothing. In ephapax it
finds the 12 erased declarations of src/abi (Invariants.idr x11,
Foreign.idr x1), which the ABI documents as "erased postulates". The
census test now plants one, plus an FFI signature and an infix
definition that must not be reported (15 markers).

The 13 in-scope rows were re-run from one clean pass (an earlier pass
lost rows when the disk filled): ephapax now shows 0 holes, 12 axioms.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01J4QvDjUNwStGwcKTtAQ3NY
@hyperpolymath hyperpolymath changed the title fix(census): skip comments and strings in proof-holes.sh; refresh 13 rows fix(census): comment-aware proof-holes.sh, Idris2 undefined-declaration axioms; refresh 13 rows Nov 9, 2026
estate-rules failed on ec833bc at "Repository map generates identically
across locales": the committed map predates applied-systems/ (added on
main in 1058bb8, 2026-11-07, without a regeneration). origin/main
(a3dbe73) fails the same test, so this is inherited, not caused by the
census change; tests/census/ is not listed in the map. This is the
output of `bash scripts/gen-repo-map.sh .`, unedited, and is a no-op
once main carries the same regeneration.

Verified: tests/shape/repo_map_determinism_test.sh fails before and
passes after; the remaining estate-rules steps that the red step had
masked also pass locally (root shape, no-md, adoc renders with
asciidoctor 2.0.26, no-vlang, no-a2ml, the new census comment test,
deed clause, mint tests with just 1.43.0, template conformance,
governance, ijson-jcs --enforce, required contexts).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01J4QvDjUNwStGwcKTtAQ3NY
Canon lockstep fails on main (a3dbe73) and on this PR: the deed pins
canon 2.1.3, while metadatastician/standards main canon.lock is 2.1.5
(gate table 0.3.1). This ports f22faaf from #29 unchanged: :version
"2.1.5" and :gates-sha256 5c510bba…; criteria-sha256 is unchanged.
The resulting blob equals #29's (ddb2e29), so this is a no-op once #29
lands.

Verified against the live canon.lock: [canon] version 2.1.5, gates
sha256 5c510bba…, criteria 6a5aa885…; the gates file on standards main
hashes to 5c510bba…. The lockstep job's own compare step, run locally,
passes on all three pins. validate-deed.sh with deed_lint.js at the
pinned standards 8e48b1c reports 2 files, 0 failing; deed_clause_test,
root shape, template conformance and governance tests pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01J4QvDjUNwStGwcKTtAQ3NY

Copy link
Copy Markdown
Owner Author

CI status for the two red checks on ec833bc:


Generated by Claude Code

@sonarqubecloud

sonarqubecloud Bot commented Nov 9, 2026

Copy link
Copy Markdown

@hyperpolymath
hyperpolymath marked this pull request as ready for review November 9, 2026 15:41
@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-09T15:41:57.047308Z
We couldn’t complete this review. Comment @codex review to try again.
aa353b5 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.

@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.

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.

3 participants