Repository navigation
proofs: declare the strict flag set in every module that can take it - #357
Conversation
Adds --cubical-compatible --exact-split --no-sized-types --no-guardedness to the OPTIONS pragma of 141 modules, keeping --safe --without-K. #355 made the code compatible; this declares it, so downstream repos that adopt the strict set (choreographic-types, through experimental/echo-additive/Grade.agda) can import these modules: --cubical-compatible is coinfective. Left unchanged, for these reasons: - EchoCNOBridge, EchoThermodynamicsArbitrary: import absolute-zero's CNO, which does not declare --cubical-compatible yet. - All, Smoke: import those two. - EchoImageFactorizationPropCubical (--cubical island) and EchoImageFactorizationPropPostulated (quarantined postulate): exempt. scripts/kernel-guard.sh: the safety-relaxing-flag check matched `--cubical` inside `--cubical-compatible`. It now matches whole flags only. Planting --cubical, --sized-types or --guardedness in Echo.agda still fails it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MF5GeeBBDF6sUzr6pZTjWV
|
Important Review skippedToo many files! This PR contains 142 files, which is 42 over the limit of 100. To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch. Upgrade to a paid plan to raise the limit. This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry.
|
Codex Review SummaryThis 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. |
## Summary #45 made the code compatible with the strict Agda flag set. This PR declares the flags in the files. `--cubical-compatible` is coinfective: a module that declares it may only import modules that also declare it. So choreographic-types cannot adopt the strict set while the epistemic-types modules it imports lack the flag. - **All 22 source modules and all 13 rejection fixtures:** the `OPTIONS` pragma gains `--cubical-compatible --exact-split --no-sized-types --no-guardedness`, keeping `--safe --without-K`. - **`tests/check-proofs.sh` and `tests/check-rejections.sh`:** both now also pass `-W noUnsupportedIndexedMatch`. - Under `--cubical-compatible`, Agda emits an `UnsupportedIndexedMatch` warning at 23 clauses that match on indexed constructors. It means those functions would not compute on Cubical transports. - That is irrelevant under `--without-K`. The estate strict set silences it, as agda-stdlib's own library file does. - Both scripts run with `-W error`, so without the flag the warning would be fatal. - Sites: - `Applications/IntegerModel`: 3 - `Applications/SortedRow`: 2 - `ContinuityExamples`: 1 - `EchoBridge`: 2 - `Examples`: 1 - `Kripke/Belief`: 1 - `Kripke/Dependence`: 1 - `Kripke/Residual`: 1 - `ProofTransport`: 6 - `ReadConsistency`: 2 - `SurrealBridge`: 3 - **`tests/integration/CanonicalEcho.agda` is unchanged.** It imports echo-types at pin `46cd1a3`, whose modules do not yet declare the flag. A file without the flag may still import ones that have it, so it keeps building. Add the flag after the pin moves to an echo-types commit that carries hyperpolymath/echo-types#357's change. ## Verification (Agda 2.6.3 locally; CI checks the pinned 2.6.4.3) - `tests/check-proofs.sh`: PASS, 22 source modules. - `tests/check-rejections.sh`: PASS, all 13 rejected for the expected type mismatch. - `CanonicalEcho.agda`, built against echo-types `46cd1a3` exactly as the workflow does: compiles. --- _Generated by [Claude Code](https://claude.ai/code/session_01MF5GeeBBDF6sUzr6pZTjWV)_ Co-authored-by: Claude <noreply@anthropic.com>
Summary
#355 made the code compatible with the strict Agda flag set. This PR declares the flags in the files, which is what downstream repos need.
--cubical-compatibleis coinfective: a module that declares it may only import modules that also declare it. choreographic-types importsexperimental/echo-additive/Grade.agda, and through itEchoGraded,Echo,EchoCharacteristicandEchoResidue. It cannot adopt the strict set until these modules declare the flag.141 modules: the
OPTIONSpragma gains--cubical-compatible --exact-split --no-sized-types --no-guardedness, keeping--safe --without-K.6 modules left unchanged:
EchoCNOBridge,EchoThermodynamicsArbitraryCNO, which does not declare--cubical-compatibleyetAll,SmokeEchoImageFactorizationPropCubical--cubicalislandEchoImageFactorizationPropPostulatedA module without the flag may still import modules that have it, so these all keep building. Once absolute-zero lands the flag, a follow-up adds it to the first four.
scripts/kernel-guard.sh: the safety-relaxing-flag check matched the substring--cubicalinside--cubical-compatible, which strengthens safety rather than relaxing it. It now matches whole flags only.Verification (Agda 2.6.3, stdlib 2.3)
--ignore-interfaces:AllSmokecharacteristic/Allexamples/Allexperimental/echo-additive/Alltutorial/Allcompiles.scripts/kernel-guard.sh: PASS. Negative controls: planting--cubical,--sized-typesor--guardednessinEcho.agdastill fails the guard.tools/check-guardrails.sh: OK (137 modules).Companion PR: epistemic-types (same change).
Generated by Claude Code