Skip to content

Arena: run the Lean Kernel Arena test suite in CI - #24

Merged
gimbalzero merged 4 commits into
mainfrom
kernel-arena
Nov 21, 2026
Merged

gimbalzero merged 4 commits into
mainfrom
kernel-arena

Conversation

@gimbalzero

@gimbalzero gimbalzero commented Nov 21, 2026 •

Copy link
Copy Markdown
Owner

Closes #4

Runs the Lean Kernel Arena tests against Certus in CI.

  • tests/arena/run.py (standard library only) downloads a suite into ~/.cache/certus-arena, runs certus check on every test with a time limit and a resident-memory limit, and compares verdicts. Nothing large is committed. Two suites:
    • round-2026-09: the closed round, pinned by SHA-256 (4 MB). This one gates CI.
    • live: whatever arena.lean-lang.org serves today, mostly Lean 4.36 exports. Runs with continue-on-error.
  • .github/workflows/arena.yml runs both suites on PRs, on pushes to main, weekly and on demand, and writes a verdict table to the job summary.
  • It fails on any new false acceptance. The Arena found one: a proof of False with no axioms (Soundness: projection out of a Prop whose sort is stuck proves False (Arena bugs/proj-of-subst-prop) #17). It is tracked in tests/arena/known-unsound.txt so the job can still catch new ones, and it is still reported in every run. When Soundness: projection out of a Prop whose sort is stuck proves False (Arena bugs/proj-of-subst-prop) #17 is fixed, the job fails until that line is deleted, so the fix cannot silently regress.
  • The summary also lists bad tests that are rejected only because a feature is "not supported yet". After Kernel: support nested inductive types #25 there are none.
  • README gets a short section.

The large real-world corpora (Init, Std, Mathlib, cslib, …) are not in the Arena's download and are skipped. So are the either corner cases, which the Arena does not score.

Results at main 6069b8f (after nested inductives, #25)

round-2026-09 (Lean 4.29) live 2026-11-21 (Lean 4.36)
tests run (skipped) 193 (26) 226 (40)
correct accepts 112 133
correct rejects 69 89
false rejections 3 3
timeouts / over the memory limit 8 0
false acceptances 1 (#17) 1 (#17)

These are local numbers (Apple M2, 300 s per test). On the ubuntu runner, a few heavy tests hit the 6 GB cap instead. See the job summaries.

False rejections, by cause

🤖 Generated with Claude Code

gimbalzero and others added 3 commits November 21, 2026 10:53
tests/arena/run.py downloads an Arena suite into ~/.cache/certus-arena
(the closed round 2026-09, pinned by SHA-256, or the live suite), runs
`certus check` on every test and compares verdicts. It fails on any new
false acceptance. Known ones, each with a soundness issue, live in
tests/arena/known-unsound.txt and fail the run once they are fixed, so a
fix cannot silently regress.

.github/workflows/arena.yml runs both suites; the live one does not gate.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
On the Lean 4.29 round, the nat-lit tests unfold literals in unary and
grow without bound. Four in parallel exhausted the runner's memory. Cap
each test's address space (Linux) and run 3 tests at a time in CI. A test
that hits the cap is reported as an error, never as an acceptance.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
RLIMIT_AS also counts reserved but untouched memory, such as the checker's
1 GiB stack. Tests that use 10 MB (init-prelude) failed allocation under a
4 GB cap. Poll the child's resident set instead and kill it past the limit.
This also works on macOS.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
On Linux, gf3-matrix-product and magma-list-pair-n21 need more than 4 GB
resident. They pass locally.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@gimbalzero
gimbalzero merged commit 47a8e71 into main Nov 21, 2026
4 checks passed
@gimbalzero
gimbalzero deleted the kernel-arena branch November 21, 2026 21:12
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.

Kernel: run the Lean Kernel Arena test suite in CI

1 participant