Skip to content

Commit 645e2d0

Browse files
MuhDurclaude
andcommitted
CI: hold mathlib to Bend's proven kernel (bend --verdict)
The kernel package and 7 of 10 mathlib modules must print exactly ALL PROOFS CHECK under --verdict; algebra, order, sort (and all, which imports them) must still show the known mismatch of bendlang/bend#1182, so the job fails the day upstream fixes it and they can join the list. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WumTgxoPzsEmZEydbf6bHm
1 parent 2b29568 commit 645e2d0

1 file changed

Lines changed: 31 additions & 0 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,37 @@ jobs:
117117
path: .lawcheck-stamp
118118
key: lawcheck-${{ matrix.module }}-${{ hashFiles('packages/**','tools/lawcheck/**','tools/reader/**','tools/mathlib/**','toolchain.json') }}
119119

120+
verdict:
121+
# bend --verdict re-checks every def in BendTT, the kernel whose soundness is proved in Lean.
122+
runs-on: ubuntu-latest
123+
env:
124+
BEND_NO_TELEMETRY: "1"
125+
steps:
126+
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
127+
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
128+
with:
129+
bun-version: 1.4.2
130+
- run: bun tools/install-bend.ts
131+
- name: Lean v4.34.0 (bend --verdict builds its kernel with it)
132+
run: |
133+
curl -fsSL -o elan-init.sh https://raw.githubusercontent.com/leanprover/elan/v4.2.4/elan-init.sh
134+
echo "a620ff1641616222c8d37c54845492004bb84d6877cdbc944dd65c1aa685bf53 elan-init.sh" | sha256sum -c -
135+
sh elan-init.sh -y --no-modify-path --default-toolchain leanprover/lean4:v4.34.0
136+
echo "$HOME/.elan/bin" >> "$GITHUB_PATH"
137+
- name: the proven kernel accepts every module it can express
138+
run: |
139+
verdict() { bun tools/mathlib/devlib.ts run -- "$HOME/.bend/bin/bend" "$1" --verdict 2>&1; }
140+
for f in packages/bendlib-kernel-list/list.bend packages/bend-mathlib/{bool,equal,list,maybe,nat,perm,string}.bend; do
141+
out=$(verdict "$f") && [ "$out" = "ALL PROOFS CHECK" ] || { echo "$f: $out"; exit 1; }
142+
echo "ok $f"
143+
done
144+
# bendlang/bend#1182: the kernel cannot yet express a call of a higher-order ~ parameter whose result is an equation
145+
for f in packages/bend-mathlib/{algebra,order,sort,all}.bend; do
146+
out=$(verdict "$f") && { echo "$f now passes --verdict: move it to the list above"; exit 1; }
147+
echo "$out" | grep -q "mismatch between the TypeScript implementation" || { echo "$f: $out"; exit 1; }
148+
echo "blocked upstream (#1182) $f"
149+
done
150+
120151
latest-compiler:
121152
# Early warning only: the newest Bend release against our sources.
122153
if: github.event_name != 'push' && github.event_name != 'pull_request'

0 commit comments

Comments
 (0)