lambdaclass / lambdaclass/trust-lean

Enable --wfail axiom-guard gate once warnings are clean

Open
#2 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Lean
Stars
3
Forks
3
PR merge metrics
No merged PRs in 30d

Description

The lean_extensions axiom-guard plugin is now wired into the lakefile and active during lake build. CI currently runs a plain lake build rather than lake build --wfail, because the axiom guard reports pre-existing declarations that depend on non-standard axioms. These all come from native_decide-style proofs and pull in two axioms: Lean.ofReduceBool and Lean.trustCompiler.

Once these are resolved (e.g. replaced with decide or kernel-checkable proofs, or explicitly allowlisted via linter.axiomGuard.allowedAxioms), switch the CI workflow (.github/workflows/ci.yml) to build-args: "--wfail" so the axiom guard is enforced as a gate.

Affected declarations (22 total, each depends on both Lean.ofReduceBool and Lean.trustCompiler):

  • TrustLean/Backend/Common.lean:244 TrustLean.countChar_joinCode
  • TrustLean/Backend/Common.lean:452 TrustLean.sanitizeIdentifierRust_idempotent
  • TrustLean/MicroC/Int64.lean:54 TrustLean.wrapInt64_zero
  • TrustLean/MicroC/Int64.lean:55 TrustLean.wrapInt64_one
  • TrustLean/MicroC/Int64.lean:56 TrustLean.wrapInt64_neg_one
  • TrustLean/MicroC/Int64.lean:57 TrustLean.wrapInt64_maxInt64
  • TrustLean/MicroC/Int64.lean:58 TrustLean.wrapInt64_minInt64
  • TrustLean/MicroC/Int64.lean:60 TrustLean.wrapInt64_overflow
  • TrustLean/MicroC/Int64.lean:63 TrustLean.wrapInt64_underflow
  • TrustLean/MicroC/Roundtrip.lean:179 TrustLean.char_ofNat_toNat_digit
  • TrustLean/MicroC/Roundtrip.lean:187 TrustLean.char_ofNat_isDigit
  • TrustLean/MicroC/Roundtrip.lean:202 TrustLean.natToChars_all_digits
  • TrustLean/MicroC/Roundtrip.lean:223 TrustLean.natToChars_roundtrip
  • TrustLean/MicroC/Roundtrip.lean:265 TrustLean.pNat_natToChars
  • TrustLean/MicroC/Roundtrip.lean:365 TrustLean.binOp_roundtrip_all
  • TrustLean/MicroC/Roundtrip.lean:371 TrustLean.unaryOp_roundtrip_all
  • TrustLean/MicroC/Roundtrip.lean:377 TrustLean.litBool_roundtrip
  • TrustLean/MicroC/Roundtrip.lean:421 TrustLean.stmt_skip_roundtrip
  • TrustLean/MicroC/Roundtrip.lean:424 TrustLean.stmt_break_roundtrip
  • TrustLean/MicroC/Roundtrip.lean:427 TrustLean.stmt_continue_roundtrip
  • TrustLean/MicroC/Roundtrip.lean:430 TrustLean.stmt_return_none_roundtrip
  • TrustLean/MicroC/Simulation.lean:539 TrustLean.sanitizeIdentifier_mem

Representative warning output:

warning: TrustLean/Backend/Common.lean:244:0: `TrustLean.countChar_joinCode` depends on non-standard axiom `Lean.ofReduceBool`
Allow it via `linter.axiomGuard.allowedAxioms`, or silence with `set_option linter.axiomGuard false`.
warning: TrustLean/Backend/Common.lean:244:0: `TrustLean.countChar_joinCode` depends on non-standard axiom `Lean.trustCompiler`
Allow it via `linter.axiomGuard.allowedAxioms`, or silence with `set_option linter.axiomGuard false`.

(There are also unrelated linter.unusedSimpArgs warnings in TrustLean/Backend/Common.lean that would independently block --wfail.)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the axiom-guard warnings at the listed declarations in TrustLean/Backend/Common.lean, TrustLean/MicroC/Int64.lean, TrustLean/MicroC/Roundtrip.lean, and TrustLean/MicroC/Simulation.lean, then inspect .github/workflows/ci.yml and the lakefile. Done means the reported warnings and unrelated unusedSimpArgs warnings are resolved or intentionally allowed, and CI uses build-args: "--wfail".

Written by the indexing model from the issue text.

Assessment

Domain
build-system, ci-cd
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.