Repository navigation
Conversation
Every CI `lake build` now runs under a watchdog that stops any Lean process still running after 60 minutes. After the build, CI reads Lake's per-module times from the log and fails when a file the PR adds or modifies took more than 600 seconds. Existing files are checked only once a PR changes them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Proof profile (new / modified Lean files)No added or modified Lean files under Advisory only — never blocks merge. |
|
Advisory cross-file review against Lean Pool's supervisory rubric. This is not by itself a significance, source-verification, or merge verdict. [Medium impact] The PR appears safe to merge; both previous findings are addressed. SummaryThis PR adds a 60-minute limit for each Lean process and a 600-second budget for changed pool files.
Reviews (2) · Last reviewed commit: "Never reuse builds compiled before the b..." · Reviewed by Greptile |
Reused PR, rebase and queue builds now have to match build_time_limits.py, like the toolchain and Lake files, so a changed file restored from an older run is recompiled and timed. The unchanged-file test now uses an untouched module above the limit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Vilin97
left a comment
There was a problem hiding this comment.
Source133 — current head 1403b38ee7229e551dc52db82acdff1ed0cc0534, all ten authored paths reviewed. Technical verdict: changes requested.
The new PINNED_INPUTS entry fixes the project-artifact reuse path, and the untouched-900s / changed-300s regression now tests the intended exemption. Those published findings are resolved. Two issues remain:
-
P2 — the direct whole-build cache still lacks the timing-policy boundary. The
LeanPoolBuild-v1lookup/restore keys use the three configuration files andci_cache.build_revision’s Lean-only source identity; they do not include this helper or validate timing evidence after restoring.lake/build. This is separate from the repaired PR/rebase/queue project-artifact manifests.A concrete counterexample is a retained pre-policy Main cache for source version S1, followed by Main changing that file to S2 and introducing the policy, followed by a PR reverting S2 to S1. With the other Lean/configuration inputs unchanged, the PR has the old cache’s exact key. Its restored trace can replay S1, while
checkaccepts the missing fresh timing. The exact-function fixture confirms equal old/PR build identities and exit 0 for the replayed changed module. Ordinary edits to uncached source correctly rebuild; this finding concerns reverting to a retained cached source.Bind every whole-build restore path, including restore prefixes, to the timing policy, or require matching per-file timing receipts / fresh measurement for reused changed files. Add the retained-pre-policy-cache plus source-reversion regression. Pinning only the project-artifact manifest does not cover the actions-cache route.
-
P2 — complete watchdog cleanup after parent exit or reparenting. The watchdog module is unchanged.
watchescalates only while the build parent remains alive and the target remains in its current descendant tree. An isolated fixture executing this exact module showed a TERM-ignoring Lean-named child surviving beyond the grace interval after its parent exited, althoughwatchreturned 124. The workflow’steepipeline can remain open if that survivor retains its output descriptor.Track an isolated owned process group or identity-bound targets, and finish TERM/grace/KILL cleanup before returning, even after parent exit. Test that no owned child/output writer survives; the existing ordinary-
sleeptest checks only the easy TERM-success case. Also fail closed when thepsobserver fails: its nonzero status is currently discarded and can be treated as an empty successful observation.
Validation: all eight current watchdog/log-checker unit tests pass. The additional source-bound probes establish the gaps above; the cache/timing scenario uses controlled inputs, not a claimed hosted failure or measured 865-second compile.
These are protected workflow/gate changes, so the separate authorization applicable to PR773 must still be established before queue admission. Other PRs’ grants and the author’s claim about another session are not adopted as a new grant here.
Why
One slow file can stall all of CI. In the last full rebuild (merge-queue run 42209045242), MovingSofa's certificate files took up to 865 s each and pushed one shard to 4h08m. That pushed a full-pool rebuild past the merge queue's 6-hour limit, and #751 timed out three times. This adopts Tau Ceti's CI performance gate, with the limits the maintainer chose.
What changes
lake build(single build, shards, assemble, rebased root) runs underpython -m lean_pool.build_time_limits watch.SIGTERMto anyleanprocess under the build that has run longer than 60 minutes, thenSIGKILLafter 30 s.::error file=…annotation naming the file.build_time_limits checkreads Lake'sBuilt <module> (<time>)lines from the build log.LeanPool/**/*.leanfile that the PR adds or modifies, measured against the PR, merge-group or push base, took more than 600 s..github/CODE_QUALITY.md,CONTRIBUTING.md,CLAUDE.mdandAGENTS.mddocument both limits.Measured impact on the current pool
From every module time in run 42209045242 (31,177 pool files):
MovingSofa: 14GerverSofa.KernelOnly.PartE.Certificates.Bundle*files plusCore.Bundle003.Differences from Tau Ceti
/profilecomparison already measures them and could become that gate later.Verification
python/tests/test_build_time_limits.pycover:pstime formats;:c.oand other libraries;lean-namedsleep;ruff check,ruff formatandactionlintpass.test_notice(NOTICE is stale on main) and 3 macOS-onlytest_proof_profilecases.This changes CI gates, authorized by the maintainer (@Vilin97) in a Claude Code session on 2026-11-06.
🤖 Generated with Claude Code