Repository navigation
Prove BH step-up (P5); gate self-test covers every audit check - #2
Conversation
…elf-test (18 controls); PROOF-STATUS; axiom-audit executable Rebased onto PR #1. The two self-tests are merged: the theorem mutants and StepUp controls from this branch, plus one audit control per axiom-audit check from PR #1. Each audit control must fail with its named finding. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019Y6e175rh1LbrsEhQvCrJ1
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (7)
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review. 📜 Recent review details⏰ Context from checks skipped due to timeout. (3)
🧰 Additional context used🪛 ast-grep (0.45.3)proofs/tests/gate-selftest.sh[error] 137-137: A variable, parameter expansion, or command-substitution result is passed as the command string to (bash-c-variable-injection-bash) 🪛 LanguageToolproofs/PROOF-STATUS.md[style] ~22-~22: Would you like to use the Oxford spelling “normalizes”? The spelling ‘normalises’ is also correct. (OXFORD_SPELLING_Z_NOT_S) [uncategorized] ~32-~32: The official name of this software platform is spelled with a capital “H”. (GITHUB) [style] ~48-~48: Would you like to use the Oxford spelling “parametrized”? The spelling ‘parametrised’ is also correct. (OXFORD_SPELLING_Z_NOT_S) [style] ~93-~93: Would you like to use the Oxford spelling “generalized”? The spelling ‘generalised’ is also correct. (OXFORD_SPELLING_Z_NOT_S) [misspelling] ~96-~96: This word is normally spelled as one. (EN_COMPOUNDS_SUB_MODULE) [duplication] ~96-~96: Possible typo: you repeated a word. (ENGLISH_WORD_REPEAT_RULE) [style] ~130-~130: Would you like to use the Oxford spelling “formalized”? The spelling ‘formalised’ is also correct. (OXFORD_SPELLING_Z_NOT_S) [uncategorized] ~162-~162: A comma may be missing after the conjunctive/linking adverb ‘Likewise’. (SENT_START_CONJUNCTIVE_LINKING_ADVERB_COMMA) [grammar] ~231-~231: The word ‘install’ is not a noun. (A_INSTALL) 🪛 Shellcheck (0.11.0)proofs/tests/gate-selftest.sh[info] 209-209: Expressions don't expand in single quotes, use double quotes for that. (SC2016) [info] 212-212: Expressions don't expand in single quotes, use double quotes for that. (SC2016) [info] 215-215: Expressions don't expand in single quotes, use double quotes for that. (SC2016) [info] 220-220: Expressions don't expand in single quotes, use double quotes for that. (SC2016) [info] 223-223: Expressions don't expand in single quotes, use double quotes for that. (SC2016) [info] 226-226: Expressions don't expand in single quotes, use double quotes for that. (SC2016) [info] 229-229: Expressions don't expand in single quotes, use double quotes for that. (SC2016) [info] 234-234: Expressions don't expand in single quotes, use double quotes for that. (SC2016) [info] 237-237: Expressions don't expand in single quotes, use double quotes for that. (SC2016) [info] 240-240: Expressions don't expand in single quotes, use double quotes for that. (SC2016) [info] 243-243: Expressions don't expand in single quotes, use double quotes for that. (SC2016) [info] 246-246: Expressions don't expand in single quotes, use double quotes for that. (SC2016) [info] 249-249: Expressions don't expand in single quotes, use double quotes for that. (SC2016) [info] 252-252: Expressions don't expand in single quotes, use double quotes for that. (SC2016) 🔇 Additional comments (8)
📝 SummarySummary by CodeRabbit
WalkthroughThe PR adds Agda proofs for Benjamini–Hochberg step-up adjustment over exact rationals, documents proof claims and remaining obligations, and replaces the proof gate self-test with stricter mutation and acceptance controls. ChangesProof model and validation
Priority: ⬇️ Low Estimated code review effort: 4 (Complex) | ~45 minutes Change: Other Merge Risk: ⚪ Minimal · up to The proof and gate changes are ready for normal merge checks; the suggested per-control reset is not needed for the current controls. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The visible change is confined to formal guarantees and proof validation. One allocation-failure path can escape the self-test's disposable workspace, but normal CI still runs the pinned proof gate independently. No remotely reachable attack path was established. Retained concerns
Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Hardening Proposals
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
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. A rabbit checks each proof in turn, Comment |
Conflicts in proofs/PROOF-STATUS.md and proofs/tests/gate-selftest.sh resolved by taking main's (#2's) content and re-applying this branch's toolchain change: gate-selftest.sh now sources proofs/lib.sh (resolve_agda, resolve_stdlib, write_libraries) instead of reading bootstrap.sh's vendored stdlib, and PROOF-STATUS's toolchain, gate, reproducing and last-verified sections describe Debian 13's agda 2.6.4.3 + agda-stdlib 2.1 and proofs/check.sh. StepUp.agda needed no source change. proofs/check.sh on the merged tree: exit 0, 7 modules audited clean, gate-selftest 18/18; a planted type error in StepUp.agda is refused with exit 42. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WpM43to7Y8kCFbxyHvQ5Tp
## What Moves the proof gate from Agda 2.7.0.1 + a vendored agda-stdlib 3.0-dev SHA to the estate standard: Debian 13's `agda-bin=2.6.4.3-1+b2` and `agda-stdlib=2.1-4` inside the digest-pinned `debian:13-slim` image, the same recipe as MetaManifold-Evidence and residual-evidence-types. **Rebased onto #2** (`320513d`, merged 2026-10-02T14:52Z). #2 brought `BenjaminiHochberg/StepUp.agda` and the 18-control gate self-test; this PR keeps both as they are on `main` and re-applies only the toolchain change on top. The two files that conflicted (`proofs/PROOF-STATUS.md`, `proofs/tests/gate-selftest.sh`) were resolved by taking `main`'s version and re-applying the toolchain edits; `README.md` merged cleanly. ## Measured - The only incompatibility between the two stdlib lines is `_≡?_` on ℤ → `_≟_` (three sites in `Prelude.agda`). `StepUp.agda` needs nothing. Every other imported module and name exists in 2.1. - `PROOF-STATUS.md` claimed the proofs "do not compile against v2.4 or v2.1". That was false; the line is replaced with the measured port note. - Local run after the rebase, interface files deleted first, with the wrong Agda (2.7.0.1) first on `PATH` to show `lib.sh` resolves `/usr/bin/agda` ahead of it: ``` check: Agda version 2.6.4.3, standard-library-2.1 axiom-audit: auditing 7 module(s) … 7 module(s) reachable from CompositionalDA.All … clean check: CompositionalDA/All.agda type-checks gate-selftest: 18/18 controls behaved correctly check: OK ``` Wall-clock 14:58:02Z → 15:00:00Z. - `Pkg.test()`: 43/43, including the mutants in `test/mutants.jl`. ## Files - `proofs/lib.sh` (new) — toolchain resolution; dies naming what it found. - `proofs/check.sh` (new) — the gate in CI order; replaces `proofs/bootstrap.sh`, which is deleted along with the vendoring and `.agda-libraries` machinery. - `proofs/tests/gate-selftest.sh` — `main`'s 18 controls unchanged; the bootstrap-based resolver block is replaced by sourcing `lib.sh`, and the libraries file is written by `write_libraries`. - `.github/workflows/ci.yml` — `proofs` job rewritten to the Debian container recipe. - `README.md`, `proofs/PROOF-STATUS.md` (toolchain paragraphs and a fresh "Last verified" block), `.gitignore`, `proofs/.gitignore`. ## Merge No required contexts on `main` (`rules/branches/main` is empty), so automerge is deliberately not armed; held for a human squash merge once the checks are green. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01AjVQUkziVYywrLNsbPordh Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Proves P5, the Benjamini–Hochberg step-up, and makes the gate self-test cover every audit check.
What changes
proofs/agda/CompositionalDA/BenjaminiHochberg/StepUp.agdaproves three properties over exact rationals ℚᵘ: q ≥ p, q ≤ 1, and order preservation (p_i ≤ p_j ⇒ q_i ≤ q_j).proofs/tests/gate-selftest.shnow has 18 controls:axiom-audit.shcheck. Each must fail with its named finding;reject/files;proofs/PROOF-STATUS.mdandproofs/residue/*.residueseparate what is proved, what is tested, and what is open.README.mdno longer says the BH proofs cover only the scaling step.Verified locally (Agda 2.7.0.1, stdlib 2ffa8b7d, Julia 1.12)
proofs/bootstrap.sh: exit 0, 7 modules, audit clean.proofs/tests/gate-selftest.sh: exit 0, 18/18. A planted wrong reason on one audit control is reported as FAIL (17/18).Pkg.test(): 43/43.🤖 Generated with Claude Code
https://claude.ai/code/session_019Y6e175rh1LbrsEhQvCrJ1