Skip to content

fix(tri): m2l scratch Lake package pins Trinity's lean-toolchain (#5982) - #6364

Merged
gHashTag merged 1 commit into
masterfrom
claude/m2l-lean-toolchain
Oct 5, 2026
Merged

gHashTag merged 1 commit into
masterfrom
claude/m2l-lean-toolchain

Conversation

@gHashTag

@gHashTag gHashTag commented Oct 5, 2026

Copy link
Copy Markdown
Collaborator

Refs #5982 (follows #5990).

Defect

m2l_standalone_lake_check in cli/tri/src/fpga.rs writes a temp Lake package (lakefile.lean + TrinityStandalone.lean) that does require trinity from "<repo>/proofs/lean4", but it wrote no lean-toolchain. elan therefore resolved the newest Lean (v4.34.1) instead of Trinity's pin, and the package built Trinity and mathlib against a toolchain they are not pinned to: the likely cause of the lake build failure.

Fix

  • The package now gets a byte-for-byte copy of proofs/lean4/lean-toolchain (currently leanprover/lean4:v4.31.0). The version is read from that file, never restated in code; a missing pin fails the check loudly.
  • The repo-root lookup moves into a small helper m2l_trinity_pkg() shared by the check and the new test.

Test

m2l_package_pins_trinitys_lean_toolchain runs the whole check with cmp lean-toolchain <proofs/lean4/lean-toolchain> as the build step (the build program is already a parameter since #5990). It passes only if the scratch package's lean-toolchain exists and equals the repo pin. Negative control by reasoning: drop the copy and cmp exits 2 on the missing file, so the check panics on its build assertion. The existing scratch-cleanup probes still assert that nothing is left behind.

Not run locally (the Mac is starved; no cargo there). CI on this PR is the proof. rustfmt --check on the file is clean; the NOW entry passes tools/check_now_entry_shape.py.

🤖 Generated with Claude Code

…#5982)

The temp package the measured-to-lean standalone lake check writes had
no lean-toolchain file, so elan resolved the newest Lean (v4.34.1)
instead of the v4.31.0 that proofs/lean4 pins, and `require trinity`
built against a toolchain mathlib was never built for.

Copy proofs/lean4/lean-toolchain into the package next to lakefile.lean
(read from the file, not restated). New test
m2l_package_pins_trinitys_lean_toolchain drives the check with
`cmp lean-toolchain <pin>` as the build step.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-05 05:23:53 UTC

Summary

Status Count
Total Open PRs 46
PRs with Failing Checks 34
PRs with All Checks Green 12
READY 11
FAILING 34
PENDING 0
NO CHECKS YET 0

These columns do not partition: 11 + 34 + 0 + 0 = 45, and there are 46 open PRs. A PR is being counted twice or not at all.

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=8597b6ded596 != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

@gHashTag gHashTag added the bee-reviewed A reviewer bee reviewed and verified this PR at its current head; the only merge signal (#5525) label Oct 5, 2026
@gHashTag
gHashTag merged commit 73a6f11 into master Oct 5, 2026
30 of 32 checks passed
@gHashTag
gHashTag deleted the claude/m2l-lean-toolchain branch October 26, 2026 05:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bee-reviewed A reviewer bee reviewed and verified this PR at its current head; the only merge signal (#5525)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant