Skip to content

P0: Lean/leanchecker must not overload lambda — narrow Mathlib imports, lake build vs leanchecker tiers, thread cap, no heavy kernel decide #4348

Description

@noahgift

Operator, verbatim, 2026-09-25: "yes to all, p0" (answering the cop's 4 proposals below). Context, verbatim: "remember this host must be able to do other work, so never let it get overloaded"

Measured 2026-09-25 07:34Z on lambda:

  • leanchecker ProvableContracts (pvl-a, PID 614236) used 51 threads, about 9 cores, and 58 to 60 GB RSS.
  • Host load was 79 on 48 cores; memory was 99 of 125 GB.
  • Cause: the project does require mathlib (5.4 GB of compiled .olean files). leanchecker reloads and re-checks the whole imported environment. Our own 237 .lean files are a small share of that.

P0 — all four:

  1. Narrow the imports: no import Mathlib. Import only the specific Mathlib modules each file needs. Receipt: RSS and wall time before and after.
  2. Split the check tiers:
    • Day to day: lake build, which trusts Mathlib's compiled files and checks only our files.
    • Release gate only: leanchecker, run under systemd-run --user --scope -p MemoryMax=24G -p CPUQuota=800%, or on gx10 after checking disk space.
    • The pv discharge check --leanchecker call sites and CI must follow this split.
  3. Cap threads: at most 8 threads for Lean and leanchecker (-j8 / LEAN_NUM_THREADS=8 or its equivalent). Make it the default in the pv wrapper.
  4. Keep computation out of the kernel: for PVL: prove all 7 escape-allowlist axioms (DPO x3, f16 bound, NF4 x3) instead of confirming them #4347 (the NF4 table and the others), prefer norm_num, simp or rfl lemmas over heavy decide. Never use native_decide, because it adds an axiom.

Done when: a full pv discharge check --leanchecker runs within 24G and 800% CPU on lambda, and a regression guard fails if an unscoped leanchecker invocation appears in scripts or CI.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P0Critical priority

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions