Skip to content

[Lean Squad] feat(ci): Task 9 — fix elan SHA256, cache ordering, conditional lake update, proof summary#7924

Merged
Evangelink merged 2 commits intomainfrom
lean-squad/task9-ci-proof-summary-2026-04-28-c4f8dc642ffc3bc0
Apr 29, 2026
Merged

[Lean Squad] feat(ci): Task 9 — fix elan SHA256, cache ordering, conditional lake update, proof summary#7924
Evangelink merged 2 commits intomainfrom
lean-squad/task9-ci-proof-summary-2026-04-28-c4f8dc642ffc3bc0

Conversation

@Evangelink
Copy link
Copy Markdown
Member

@Evangelink Evangelink commented Apr 29, 2026

Improvements to lean-proofs.yml:

  1. Fix SHA256 verification bug: the previous workflow hardcoded the SHA256
    hash from elan v3.1.0 but was downloading v4.2.1. The verification step
    would always fail once .lean files are committed. Now the SHA256 checksum
    file is downloaded from the same GitHub release and used for verification,
    so upgrading elan requires only a version bump.

  2. Cache-before-install ordering: move the cache restore step to before the
    elan install step. Both elan install and lake update are now gated on
    cache-hit != 'true', so cold builds install/resolve while warm builds skip
    straight to lake build.

  3. Conditional lake update: previously lake update ran unconditionally on
    every CI run, potentially drifting the pinned lake-manifest.json. Now it
    only runs on cache miss (i.e. the first run per toolchain/lakefile hash).

  4. Proof summary step: after a successful build, post a markdown summary to
    the GitHub Actions step summary showing theorem/lemma count and the number
    of lines using sorry (stub markers).

🔬 Lean Squad — automated formal verification agent
Run: https://github.com/microsoft/testfx/actions/runs/25043800787

Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com

Fixes #7902

… lake update, proof summary

Improvements to lean-proofs.yml:

1. Fix SHA256 verification bug: the previous workflow hardcoded the SHA256
   hash from elan v3.1.0 but was downloading v4.2.1. The verification step
   would always fail once .lean files are committed. Now the SHA256 checksum
   file is downloaded from the same GitHub release and used for verification,
   so upgrading elan requires only a version bump.

2. Cache-before-install ordering: move the cache restore step to before the
   elan install step. Both elan install and lake update are now gated on
   cache-hit != 'true', so cold builds install/resolve while warm builds skip
   straight to lake build.

3. Conditional lake update: previously lake update ran unconditionally on
   every CI run, potentially drifting the pinned lake-manifest.json. Now it
   only runs on cache miss (i.e. the first run per toolchain/lakefile hash).

4. Proof summary step: after a successful build, post a markdown summary to
   the GitHub Actions step summary showing theorem/lemma count and the number
   of lines using sorry (stub markers).

🔬 Lean Squad — automated formal verification agent
Run: https://github.com/microsoft/testfx/actions/runs/25043800787

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 29, 2026 05:17
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the Lean proofs CI workflow to make elan installation/checksum verification more reliable, improve cache effectiveness, reduce unnecessary dependency resolution, and add a post-build proof metric summary.

Changes:

  • Restore the elan/Lake cache earlier and gate elan install + lake update on cache misses.
  • Fix elan SHA256 verification by downloading the checksum file from the same GitHub release as the archive.
  • Add a GitHub Actions step summary with theorem/lemma counts and sorry usage counts.
Show a summary per file
File Description
.github/workflows/lean-proofs.yml Reorders caching/installation, updates checksum verification, conditions lake update, and adds a proof summary step.

Copilot's findings

  • Files reviewed: 1/1 changed files
  • Comments generated: 2

Comment thread .github/workflows/lean-proofs.yml Outdated
Comment thread .github/workflows/lean-proofs.yml
@Evangelink
Copy link
Copy Markdown
Member Author

@copilot address review comments

…t.json from cache key

Agent-Logs-Url: https://github.com/microsoft/testfx/sessions/222d104a-b307-4ead-ad24-1f39a8a9a694

Co-authored-by: Evangelink <11340282+Evangelink@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 29, 2026

@copilot address review comments

Addressed in b4a6ebb:

  1. Fixed SORRY_COUNT grep: replaced \bsorry\b with the POSIX portable word-boundary syntax \<sorry\> which works correctly in GNU grep without requiring -P.
  2. Removed lake-manifest.json from the hashFiles() cache key expression — the file doesn't exist in the repo, so including it was misleading. The key now hashes only lean-toolchain and lakefile.toml.

@Evangelink Evangelink merged commit 26d824c into main Apr 29, 2026
17 checks passed
@Evangelink Evangelink deleted the lean-squad/task9-ci-proof-summary-2026-04-28-c4f8dc642ffc3bc0 branch April 29, 2026 09:08
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.

[Lean Squad] feat(ci): Task 9 — fix elan SHA256, cache ordering, conditional lake update, proof summary

3 participants