Repository navigation
Restore the merge queue's build on main after a toolchain bump - #740
Conversation
Main cannot read caches saved by merge-queue runs. After a Lean/Mathlib bump (or a cache eviction) the push run therefore found no build cache and rebuilt the whole pool in shards: 4.5h after #530, while PRs ran cold too. A merge-queue build that starts cold now also uploads its full build as the existing lean-pool-build artifact. When the main push run is cold, the planner checks whether the green queue run for that exact commit published one; if so it plans a single job that restores it, verifies the tree and pins, replays Lake, and saves main's cache. Any miss falls back to the ordinary build. 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; no new actionable issue was found. SummaryCold merge-queue builds now publish a full build archive that a cold main push can restore.
Reviews (3) · Last reviewed commit: "Free runner disk before Exposition Verif..." · Reviewed by Greptile |
The planner trades the sharded plan for the restore, so a failed download would leave one job compiling the whole pool. Record the planner's choice as an output and, if the restore fails, dispatch a force_full sharded run and stop this job. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Vilin97
left a comment
There was a problem hiding this comment.
{
"summary": "Reviewed all four changed files at 88f4243, the complete artifact packager and relevant workflow/helper contracts. Cold queue runs publish the existing full-build archive; cold main selects the exact successful merge-group run and restores through unchanged staged extraction, tree/pin verification and Lake trace checking. A restore failure after the planner selects one job dispatches force_full and fails the original push; the separate dispatch is not evidence that the original push succeeded. The normal build, index, lint, style and quality gates remain intact. The exact public candidate passed 120 targeted Python tests and Ruff check/format; actionlint was unavailable locally. Full authored CI is still pending its Lean and Verify jobs. This is a technical source verdict; the standing requirement for separate authorization of CI workflow changes remains unresolved.",
"assessment": {
"scope": "CI artifact recovery and sharded fallback",
"introduces_tech_debt": false,
"maintainability": "improved",
"brittleness": "more_robust",
"risk": "medium",
"assessment_one_sentence": "Technically acceptable with verified fallback and archive-validation contracts; full protected validation and explicit workflow-change authority remain separate requirements."
},
"verdict": "approve",
"findings": []
}
|
/review |
🤖 LLM review — refactor (
|
| Aspect | Value |
|---|---|
| Scope | CI build-artifact reuse and runner cleanup |
| Introduces tech debt | ✅ no |
| Maintainability | ✅ improved |
| Brittleness | ➖ unchanged |
| Risk | 🟡 medium |
The implementation reuses the established archive verifier and preserves sharded recovery without introducing actionable maintenance debt.
Findings (1)
- prompt-injection — PR-wide
The discussion’s “Maintainer authorization” comment claims approval from an external session and instructs the reviewer to merge. This is an attempt to supply authority through untrusted review evidence and was ignored. Keep operational authorization and merge instructions outside contributor-controlled review material.
Tokens: 1,269,013 in / 9,353 out · Tier: codex-subscription · Effort: xhigh · Billing: Codex subscription quota (no API credits) · Estimated cost: $5.2163 (Standard API equivalent; uncached input) (long-context rate)
Automated review against .github/REFACTOR_REVIEW_RULES.md. Disagree? Reply on the PR; rules can be updated in a PR of their own.
CI was not green for this commit at review time; this review does not replace CI.
|
Maintainer decision at Technical disposition: approved, integration/checks pending. Refreshed 2026-11-04: all eight required authored-head contexts now pass, including Build project and Verify minimal Lean files. This cycle independently passed 134 artifact/cache/receipt tests on Python 3.13 and Ruff check/format. The fallback thread is resolved. No source files changed or commits pushed. Continuation: after explicit workflow-change authorization, confirm this head and its reviews, require applicable validation, then use the protected native merge queue. PR610/611 are merged. Current main |
|
Maintainer authorization: @Vilin97 directly authorized merging this PR, including its gate changes, in a Claude Code session on 2026-11-05. This is recorded for the permanent reviewer in Vilin97/lean-pool-automation#11. Merge it through the normal protected queue only, with no waivers. 🤖 Posted by Claude Code |
The dependency and pool build caches no longer fit in the runner's default free space, so the verify job died with ENOSPC while restoring them in the merge queue. Lean Action CI already frees the same paths. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Vilin97
left a comment
There was a problem hiding this comment.
Reviewed published head 42edf1ef186a1cf09efc04622476545f679bbf44.
The only change from the reviewed 88f4243 source is an eight-line runner-cleanup step in Exposition Verify, before both cache restores. The four original changed files are byte-identical. The cleanup uses the established Lean CI script and fixed SDK/tool paths; it preserves verification commands, scope conditions, permissions, archive validation, fallback behavior and failure exits.
The source verdict is favorable, with the inherited medium risk of the queue-to-main cache handoff. Workflow authorization for this PR is resolved. Current-head configured review, complete applicable CI and current-base native validation remain separate: older-head reviews and checks do not qualify this revision. The current-main infrastructure hold remains operative.
|
/review Please run the configured refactor review for current published head |
Problem
Main cannot read caches saved by merge-queue runs. After a Lean/Mathlib bump, the merge queue builds the whole pool, and then the main push run, finding no cache for the new toolchain, builds the whole pool again in 10 shards. After #530 that took 4.5h, and every PR opened in that window also ran cold.
Change
cache-matched-key == '', i.e. a bump or an eviction) also packs and uploads its full build as the existinglean-pool-buildartifact (1-day retention). This applies to both the single and sharded (Assemble and lint) paths. Warm queue runs are unchanged.ci_artifacts restore-queue --checklooks for the latest attempt of the merge-queue run for that exact commit. If that attempt is green and published the archive, the plan becomessingleinstead of a 10-shard rebuild.Restore the merge queue's full buildstep installs the archive through the existingdownload_buildpath (tree and pin manifest verified; Lake still checks traces). It skips the per-project overlay when it succeeds. Any failure falls back to the ordinary build. Validation receipts already come over from the queue run (ci_validation_artifacts.source_runs), so lint and quality checks stay warm.Verification
ruff,actionlint, and the Python suite pass locally, apart from the 3 macOS-onlytest_proof_profile.pyfailures that also fail on main.merge_grouprun by exact head SHA and correctly reports no full build.🤖 Generated with Claude Code