Skip to content

proofs: declare the strict flag set in every module - #46

Merged
hyperpolymath merged 1 commit into
mainfrom
proofs/strict-pragmas
Oct 27, 2026
Merged

hyperpolymath merged 1 commit into
mainfrom
proofs/strict-pragmas

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

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 proofs: declare the strict flag set in every module that can take it 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

Adds --cubical-compatible --exact-split --no-sized-types --no-guardedness
to the OPTIONS pragma of all 22 source modules and all 13 rejection
fixtures, keeping --safe --without-K. #45 made the code compatible; this
declares it, so choreographic-types can adopt the strict set:
--cubical-compatible is coinfective.

Under --cubical-compatible, Agda warns (UnsupportedIndexedMatch) at 23
clauses that match on indexed constructors: those functions would not
compute on Cubical transports. That is irrelevant under --without-K, and
the estate strict set silences it, as agda-stdlib's own library file
does. tests/check-proofs.sh and tests/check-rejections.sh run with
-W error, so both now also pass -W noUnsupportedIndexedMatch.

tests/integration/CanonicalEcho.agda is left unchanged: it imports
echo-types at a pinned commit whose modules do not yet declare the flag.
Update it after the pin moves.

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

coderabbitai Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Caution

Review failed

The pull request is closed.

📝 Summary

Summary by CodeRabbit

  • Chores
    • Updated proof modules and validation checks to use consistent Agda compiler settings.
    • Adjusted warning handling in the proof and rejection checks.

Production modules and rejection fixtures add Agda compiler options for cubical compatibility, exact splitting, and disabling sized types and guardedness. Test commands disable the UnsupportedIndexedMatch warning.

Changes: Agda compiler option alignment

Layer / File(s) Summary
Production module options
src/EpistemicTypes/*.agda, src/EpistemicTypes/Applications/*.agda, src/EpistemicTypes/Kripke/*.agda
Production module option pragmas add --cubical-compatible, --exact-split, --no-sized-types and --no-guardedness. Existing --safe and --without-K options remain enabled.
Test commands and rejection fixtures
tests/check-proofs.sh, tests/check-rejections.sh, tests/reject/*.agda
The test commands disable the UnsupportedIndexedMatch warning. Rejection fixtures add the new module options.

Priority: Not assessed

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other

Possibly related PRs

Merge Risk: Low · up to c9ab6

The proof gates may accept code with unsupported Cubical transport computation; keep the suppression scoped to the canonical integration.

Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
  • 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

Comment @coderabbitai help to get the list of available commands.

@hyperpolymath
hyperpolymath marked this pull request as ready for review October 27, 2026 03:39
@hyperpolymath
hyperpolymath enabled auto-merge (squash) October 27, 2026 03:39
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-27T03:40:52.981006Z c9ab62a 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.

@hyperpolymath
hyperpolymath merged commit 5422cd5 into main Oct 27, 2026
6 of 7 checks passed
@hyperpolymath
hyperpolymath deleted the proofs/strict-pragmas branch October 27, 2026 03:43
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