Skip to content

Benchmark safe build-cache reuse across Run worktrees #733

Open

Description

@JacobStephens2

From the Oct 11–16 2026 Run retrospective, finding 13. Tracking issue: #721.

The evidence below is historical and attributed to the supplied report (repository snapshot 5504c97); it has not all been independently reproduced. Limited current-checkout checks were made at 53bb9c6. This is filed for maintainer triage, not automatic Pickup.

Requested outcome and validation

Measure cold dependency builds, warm rebuilds, concurrent cargo lock waits, and sandbox reproduction builds on a representative host. Compare a compiler cache such as sccache with seeding reusable build artifacts from the Launch directory; choose only after establishing hit rates, disk cost, and wall-time benefit.

Preserve separate worktree outputs and reproducible builds; do not share a writable target directory blindly. Account for toolchain/profile changes, worktree paths, concurrent sessions, cache invalidation, and the Security sandbox boundary. Sandbox execution must retain its isolation and must not gain write authority outside its allowed scratch area to obtain cache hits.

Deliver a measured recommendation and, if justified, the smallest documented configuration/implementation with clear setup and opt-out behavior. A benchmark showing little benefit is a valid research outcome before committing to a Factory default.

Confidence is low–medium in the report. The 2–3.5 minute cold-build estimate is historical evidence to remeasure; #174 already made earlier build/test changes and supplies useful prior measurements.

Original finding, including evidence, proposed fixes, and confidence

13. Every Run's worktree starts with a cold target/ (Host and Factory)

  • Evidence: 2–3.5 min of dependency compiling before the first test in every implement session; security sandboxes rebuild again. "Blocking waiting for file lock" appears when reviewers test concurrently.
  • Fix: set RUSTC_WRAPPER=sccache, or seed target/ from the Launch directory.
  • Confidence: low-medium.

Activity

  1. added
    enhancement
    needs-triage
    on Oct 17, 2026
  2. JacobStephens2 commented on Oct 25, 2026

    @JacobStephens2
    OwnerAuthor

    This was generated by AI during triage.

    Triage: ready for a human

    This needs measurements on a representative host, covering the bwrap Security sandbox boundary and concurrent cargo locks. Nothing exists yet (no sccache or shared CARGO_TARGET_DIR for Runs). Prior work: #174 and docs/ci-performance.md.

    Next step: run the benchmark. Any default change follows from the numbers.

  3. added
    ready-for-human
    and removed
    needs-triage
    on Oct 25, 2026
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

    enhancementready-for-human

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions