Skip to content

Commit c8780bf

Browse files
claudehyperpolymath
authored andcommitted
ci(lean): add Lean proof gate (lake build) guarding the metatheory
There was no Lean CI anywhere in the estate, so the mechanized proofs (type safety, Sandbox Isolation Thm 1, Capability Soundness Thm 2, Ethical Verdict Consistency, BFT quorum-intersection Thm 3) were unguarded against regression. This gate runs `lake build` on every push/PR via leanprover/lean-action (SHA-pinned v1.5.0), building academic/formal-verification/lean4/ on core Lean (no Mathlib, no test/lint targets). A broken proof now fails CI. https://claude.ai/code/session_01DQACj3RFmAPZaBPgR9SAaS
1 parent d2c1d03 commit c8780bf

1 file changed

Lines changed: 46 additions & 0 deletions

File tree

.github/workflows/lean.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# SPDX-License-Identifier: MPL-2.0
2+
# lean.yml — build + verify the Phronesis Lean 4 metatheory on every push/PR.
3+
#
4+
# Guards the mechanized proofs against regression. `lake build` typechecks the
5+
# whole development (a broken proof fails the build):
6+
# * type safety — progress / preservation / determinism
7+
# * Sandbox Isolation (safety_proofs.md Theorem 1)
8+
# * Capability Soundness (Theorem 2) + Ethical Verdict Consistency
9+
# * BFT quorum-intersection safety (Theorem 3)
10+
# Core Lean only (no Mathlib): the toolchain pinned in
11+
# academic/formal-verification/lean4/lean-toolchain is all CI needs.
12+
name: Lean Proofs
13+
14+
on:
15+
push:
16+
branches: [main, master]
17+
pull_request:
18+
workflow_dispatch:
19+
20+
# Estate guardrail: cancel superseded runs (read-only check, safe to cancel).
21+
concurrency:
22+
group: ${{ github.workflow }}-${{ github.ref }}
23+
cancel-in-progress: true
24+
25+
permissions:
26+
contents: read
27+
28+
jobs:
29+
lean:
30+
name: Build Lean metatheory (lake build)
31+
runs-on: ubuntu-latest
32+
timeout-minutes: 20
33+
steps:
34+
- name: Checkout
35+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
36+
37+
# Installs elan + the toolchain from lean-toolchain, then runs `lake build`.
38+
# No test/lint targets and no Mathlib in this project, so those are off.
39+
- name: Build + verify Lean proofs
40+
uses: leanprover/lean-action@38fbc41a8c28c4cbaec22d7f7de508ec2e7c0dd9 # v1.5.0
41+
with:
42+
lake-package-directory: academic/formal-verification/lean4
43+
build: "true"
44+
test: "false"
45+
lint: "false"
46+
use-mathlib-cache: "false"

0 commit comments

Comments
 (0)