Skip to content

PVL-001 EV-5a: pin Mathlib, scoped Lean warning gate, orphan allowlist #4122

Closed as not planned
4 of 4 issues completed
Closed as not planned

Description

@noahgift

PVL-001 EV-5a (see the PVL-001 spec and the infra PVL ledger). It is the root of the EV-6a → EV-7a → EV-8a/8b → EV-9 chain, so it unblocks #4083.

Scope:

  • pin Mathlib;
  • add a scoped Lean warning gate;
  • add an orphan allowlist.

The Lean build runs on lambda: about 90 min warm, and lambda compute is pre-authorized. No workflow edit.

Done when:

  • the pinned build is reproducible from a clean cache;
  • the warning gate goes RED on a planted warning inside its scope and ignores one outside it;
  • the orphan allowlist goes RED on a new unlisted orphan.

Filed by the cop (aprender-cf); owner aprender-6c [8b6b78].

Activity

  1. added this to the 0.70.0 milestone on Sep 24, 2026
  2. noahgift commented on Sep 24, 2026

    @noahgift
    MemberAuthor

    EV-5a is implemented on feat/4122-pvl-5a-mathlib-pin. It stopped at the receipt: no PR is armed. Code head d18e411aa, receipt on top.

    • Mathlib pinned: lakefile.lean @ "master" → @ "1d042d3e1e93904b24c4fe209c75d2adbb22ee24"; the manifest's inputRev matches its rev.
    • lean/build.sh:
      • runs lake exe cache get + unpack, then lake build (rc read directly), then a gate over the log;
      • a warning in ProvableContracts.lean or ProvableContracts/** → RED;
      • Mathlib warnings are ignored;
      • an otherwise-clean log that elaborated Mathlib → rc 2 decline: mathlib cache miss -- not a verdict;
      • a failed build is RED even on a cold cache.
    • lean/check-orphans.sh + orphan-allowlist.yaml: 162 modules, 103 in the root's import cone, 59 orphans, all allowlisted (PVL EV-5a orphan group ProvableContracts.Theorems: 55 module(s) outside the root import cone #4124: 55 Theorems, PVL EV-5a orphan group ProvableContracts.Defs: 4 module(s) outside the root import cone #4125: 4 Defs). An unlisted orphan, a ticketless or reasonless entry, or a stale entry → RED.
    • Found and fixed: main's root build was broken. Alibi.Basic and Alibi.Slopes both declared ProvableContracts.Alibi.alibi_slope_pos, so lake build failed with "environment already contains". Slopes' theorem is renamed alibi_slope_real_pos, and contracts/contracts.nt is regenerated (9 triples; pv extract --check is a fixed point).
    • Found and fixed: lake exe cache get never unpacks on a fresh checkout when ~/.cache/mathlib already holds the .ltar files. It printed "No files to download", unpacked 0 oleans, and the build then compiled Mathlib from source. The gate declined that correctly (4979 Mathlib modules, rc 2).

    Acceptance, lambda, fresh checkout (no .lake):

    • Decompressing 8101 file(s)
    • 0 Mathlib modules elaborated
    • Build completed successfully (16435 jobs)
    • ./build.sh rc 0 in 804 s

    The machine-level ~/.cache/mathlib was warm. An empty machine cache was not measured.

    Self-tests (each mutant is killed by its named row; a crash is refused, never counted as a kill):

    • build.sh: 10 fixtures, 8 mutants + crash control
    • check-orphans.sh: 10 fixtures, 6 mutants + crash control

    Quorum, degraded: same-family (agy out):

    Lane Verdict at d18e411aa Earlier rounds
    Sonnet 5 PASS 2 FAILs, both fixed
    Fable 5.1 PASS 6 findings, all fixed

    The lanes' fixes: the cache-miss decline masked failed builds, root-module warnings were out of scope, the fixtures were gitignored by *.log, a crash counted as a kill, and doc-comment imports counted. Receipt: docs/audits/quorum-GH-4122-pvl-5a-degraded.json. receipt-lint refuses same-family lanes until #363, so that artifact is where this stops.

    Spec mismatch for infra PVL-001 §EV-5a: the probe greps the lakefile for inputRev := "<40-hex>", and lakefile.lean has no such syntax (the pin is require … @ "<rev>"). A correctly pinned lakefile fails that probe, so it needs amending rather than gaming.

  3. added 3 commits that reference this issue on Sep 24, 2026
  4. noahgift commented on Sep 24, 2026

    @noahgift
    MemberAuthor

    The foldable quorum receipt is in: 3/3 gemini PASS (3.1-pro-high, 3.8-flash-high, 3.7-flash-high) on judged head 486bd9ff1, whose code is d18e411aa. receipt-lint is clean (receipt complete: kind=artifact lanes=3). Artifact docs/audits/quorum-PMAT-4122.json is committed on top as 0bfa011a9. Nothing is armed; this stops at the receipt.

  5. added
    kind:codeWork is a code change (derived rule, #4159)
    on Sep 24, 2026
  6. 1 remaining item

  7. modified the milestones: 0.70.0, 0.71.0 on Oct 4, 2026
  8. noahgift commented on Oct 12, 2026

    @noahgift
    MemberAuthor

    EV-5a evidence: clean-cache build on main @ 03d4af19f0 (aprender-78; branch-only lane, no PR)

    EV-5a reached main through #4655, so this checks the landed state rather than the old branch: 91 of 93 branch files are identical to main, and main has since refined build.sh and orphan-allowlist.yaml.

    • Pin: lake-manifest.json locks Mathlib rev = inputRev = 1d042d3e1e93904b24c4fe209c75d2adbb22ee24. The toolchain is leanprover/lean4:v4.29.0-rc4.
    • Clean-cache build: started from a detached worktree with no .lake. Plain ./build.sh (fetch, cache, build, judge) gave rc 0 in 575 s, with lake build rc=0, 0 warning(s) in ProvableContracts/.
    • Orphans: check-orphans.sh reports modules=161 in-cone=107 orphans=54 allowlisted=54.
    • Self-tests: build.sh --self-test PASS, and check-orphans.sh --self-test PASS.
    • Measurement note: the first attempt declined because the build shell had no lake on PATH. build.sh failed closed with rc 2 and named the missing tool. I re-ran it on a fresh .lake with the toolchain on PATH.

    Evidence only. I am not closing anything.

  9. noahgift commented on Oct 14, 2026

    @noahgift
    MemberAuthor

    Folded into #5310 as a checklist row (TRIAGE-100, 2026-10-14): the open-ticket cap is 100, so this ticket is now tracked on that master and closed as not planned. Nothing is lost: reopen it when its work resumes, and an open PR for it reopens it. Pushed branch: 5d/4122-orphans-wire.

    Agent: aprender-clerk

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

    P1High prioritykind:codeWork is a code change (derived rule, #4159)owner:aprender-a7owner sessionsize:MK̂ 3-4 h

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions