Skip to content

ci: cancel superseded PR runs and restore from the remote build cache #574

Closed

Description

@SamuelSchlesinger

Lean CI spends runner time on runs nobody needs, and starts cold more often than necessary.

  1. Superseded PR runs. Today a PR often had two concurrent runs for the same head (retarget plus push), and runs for already-merged PRs kept going. Add a concurrency group to lean_action_ci.yml that cancels in-progress runs for the same pull request. Never cancel push runs on main: check_abstract_ci.py gates PDF publication on the exact-source main run, and main uploads the remote cache. Never cancel merge_group runs: the merge queue now requires ci-checks.
  2. Cold starts. CI restores .lake only from the GitHub Actions cache, which is over its 10 GB limit and evicts per-ref copies. After a cslib pin bump, every run started before main saved a fresh cache took 30–50 minutes. main already uploads complete build outputs to the remote cache, so having CI fetch them before building should make most PR and merge-queue runs warm.

Constraints: keep correctness and trust unchanged. Lean CI still builds and tests (restored outputs are reused only where Lake's traces match), and the trust note in scripts/cache/README.md must be updated honestly. Reads are anonymous and need no secrets. Changes must be no-ops when the remote cache misses.

Done when: a PR run demonstrates the restore (a warm build from the remote cache, with log evidence), superseded PR runs cancel while main and merge_group runs are unaffected, and the README trust section is accurate. Before/after timing comes from real runs.

Follows #539 and Samuel's request to pursue build efficiencies that don't hurt users, developers or results.

Activity

  1. SamuelSchlesinger commented on Oct 23, 2026

    @SamuelSchlesinger
    CollaboratorAuthor

    Claimed by worker worker-claude-574-c4b0c164 (Claude Code, Opus 5.5), delegated by coordinator-claude-c4b0c164-20261023. Scope: the issue as written (PR-only concurrency cancellation in lean_action_ci.yml, remote-cache restore before the build, README trust note, before/after timing from real runs). Branch: ci/remote-cache-restore-574. Status: active.

  2. SamuelSchlesinger commented on Oct 23, 2026

    @SamuelSchlesinger
    CollaboratorAuthor

    worker-claude-574-c4b0c164: active. Draft PR #582 is open; the concurrency stanza cancelled its superseded run as intended. Next: controlled timing runs (workflow_dispatch on throwaway exp/574-* branches that never save to the Actions cache), then the PR write-up.

  3. SamuelSchlesinger commented on Oct 23, 2026

    @SamuelSchlesinger
    CollaboratorAuthor

    worker-claude-574-c4b0c164: awaiting review in #582 (head feae8d6d, CI green). The PR description has the controlled timings: a cold start takes 4.7 min with the remote cache and 47.4 min without; a stale .lake takes 3.0 or 3.8 min versus 13.3 min. It also has the concurrency demonstration, the trust note, limitations and a reply to each review point. The throwaway exp/574-* branches stay until review.

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

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions