Skip to content

fix(proofs): run Agda with --without-K --cubical-compatible - #260

Merged
hyperpolymath merged 2 commits into
mainfrom
claude/proof-policy-drift
Nov 17, 2026
Merged

hyperpolymath merged 2 commits into
mainfrom
claude/proof-policy-drift

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Finding (agda-not-strict, PROOF-POLICY §2.1)

The Agda generator template under aletheia/templates/agda ran plain agda in its Justfile and ci.yml. Neither template module had an OPTIONS pragma, so every generated Agda repo started without --safe. This still applied at HEAD. This PR fixes it at the template source.

Changes (all under aletheia/templates/agda/)

  • Justfile: the build and test recipes now run agda --safe --without-K --cubical-compatible ....
  • .github/workflows/ci.yml: both run: lines use the same flags. No uses: line and no actions.lock was touched.
  • src/@@MOD_CAMEL@@.agda and src/Properties.agda: {-# OPTIONS --safe --without-K --cubical-compatible #-} above the module line. The SPDX headers are untouched.

Verification

  • I instantiated the two modules in a scratch directory with @@MOD_CAMEL@@ set to Demo and @@PROJECT_NAME@@ set to demo. The template's .agda-lib says include: src, which I mirrored with -i src.
  • agda --safe --without-K --cubical-compatible -i src src/Demo.agda (Agda 2.8.0.2): exit 0.
  • agda --safe --without-K --cubical-compatible -i src src/Properties.agda: exit 0.
  • Both modules import only Agda.Builtin, so no standard library was needed.
  • I did not run the Justfile or the workflow. The @@ placeholders are unsubstituted in the template.

Undetermined

I found no reference to this template outside aletheia/templates/agda (grep), so I could not determine whether the generator injects flags itself. With the flags in the template, that no longer matters.


Generated by Claude Code

PROOF-POLICY 2.1: fix the Agda template at the source. Add the OPTIONS
pragma to both template modules and the canonical flags to the template
Justfile and ci.yml, so generated repos start strict.

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

coderabbitai Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Explain Change →

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 55 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

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 59cca08f-42cc-477e-87e5-72cae0687eb2
Commits

Reviewing files that changed from the base of the PR and between 9e733c8 and e240d47.

Files selected for processing: 4

  • aletheia/templates/agda/.github/workflows/ci.yml
  • aletheia/templates/agda/Justfile
  • aletheia/templates/agda/src/@@MOD_CAMEL@@.agda
  • aletheia/templates/agda/src/Properties.agda

No actionable comments were generated in the recent review.

Summary

Summary by CodeRabbit

  • Chores
    • Agda builds, tests and continuous integration checks now use safe, without-K and cubical-compatible settings. This means these checks apply the same stricter compiler requirements across local and automated validation.

The Agda template now enables --safe, --without-K, and --cubical-compatible in its module declarations and uses these options in its build, test, and CI typecheck commands.

Changes: Agda compiler options

Layer / File(s) Summary
Align Agda typechecking options
aletheia/templates/agda/src/@@MOD_CAMEL@@.agda, aletheia/templates/agda/src/Properties.agda, aletheia/templates/agda/Justfile, aletheia/templates/agda/.github/workflows/ci.yml
Both Agda modules enable --safe, --without-K, and --cubical-compatible. The build and test recipes and both CI typecheck commands pass the same options.

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

Change: Bug fix

Merge Risk: Minimal · previous review 9e733

This change makes Agda typechecking strict in the template modules, the build and test recipes and CI. Generated repositories inherit these options. No merge-blocking risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: the Agda flags --without-K and --cubical-compatible are added to the template. It omits the --safe flag and the template scope, but it is accurate and specific.
Description check Passed The description states the finding (Agda template ran without --safe), lists the changed files (Justfile, ci.yml, two Agda modules), and gives verification steps. It is directly related to the changes…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description states the finding (Agda template ran without --safe), lists the changed files (Justfile, ci.yml, two Agda modules), and gives verification steps. It is directly related to the changeset.

  • 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

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: c2242d81-79f1-454e-ac7f-092da49f7573
Commits

Reviewing files that changed from the base of the PR and between eaa5eed and 9e733c8.

Files selected for processing: 4

  • aletheia/templates/agda/.github/workflows/ci.yml
  • aletheia/templates/agda/Justfile
  • aletheia/templates/agda/src/@@MOD_CAMEL@@.agda
  • aletheia/templates/agda/src/Properties.agda

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: 10

  • GitHub Check: CodeRabbit
  • GitHub Check: build (debug + release)
  • GitHub Check: fmt --check
  • GitHub Check: test (unit + integration)
  • GitHub Check: clippy -D warnings
  • GitHub Check: zero-dependency check
  • GitHub Check: Empty-linter (invisible characters)
  • GitHub Check: Validate DEED manifests
  • GitHub Check: analyze (actions, none)
  • GitHub Check: semgrep-cloud-platform/scan
Additional comments: 1

aletheia/templates/agda/src/@@MOD_CAMEL@@.agda: 1

7-7: Data Integrity & Integration

The generator copies the Agda template module, so the pragma is inherited.

Generating an Agda project selects templates/agda and copies every file in that layer. This includes src/@@MOD_CAMEL@@.agda, and placeholder rendering leaves its OPTIONS line unchanged. The concern that generated projects lack the pragma is not supported.

@linear-code
linear-code Bot marked this pull request as ready for review November 17, 2026 22:22
@sonarqubecloud

Copy link
Copy Markdown

@hyperpolymath
hyperpolymath merged commit 4f22a10 into main Nov 17, 2026
16 of 17 checks passed
@hyperpolymath
hyperpolymath deleted the claude/proof-policy-drift branch November 17, 2026 22:34

Copy link
Copy Markdown
Owner Author

CI triage: the failing clippy -D warnings check is not caused by this PR. Main fails it with the same error, clippy::needless_bool at aletheia/src/checks.rs:1394 (new lint in Rust 1.100.0): https://github.com/hyperpolymath/maa-framework/actions/runs/44191316411/job/134421163892 (this PR's run: https://github.com/hyperpolymath/maa-framework/actions/runs/44189822420/job/134415928905). This PR only edits Agda template files under aletheia/templates/agda, so it does not touch that code.

No push made for this. All other checks are green.


Generated by Claude Code

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