Skip to content

A seed cache per target: warmed wheels-only by the tick, copied into every job - #330

Merged
renmengye merged 3 commits into
mainfrom
feat/eval-seed-cache
Sep 8, 2026
Merged

renmengye merged 3 commits into
mainfrom
feat/eval-seed-cache

Conversation

@renmengye

Copy link
Copy Markdown
Member

Step 1 of the eval-cache design note (#328): a seed cache per target, so a torch-sized dependency set is downloaded once per lockfile instead of once per job.

  • The tick warms it (evalcache.warm, run by service_eval_cache once per cycle): fetches pyproject.toml and uv.lock from the target's default branch through the GitHub client (never the sources), and runs uv sync --frozen --no-install-project --no-build --all-extras into a throwaway environment with <state root>/eval-cache/<target> as uv's cache. --no-build is the trust line: wheels are downloaded and unpacked, no build backend of the target's ever runs on the tick host; a lockfile that needs a build is reported and its jobs install as today. Re-warms only when the lockfile hash changes; a failure records nothing so the next tick retries.
  • Every job copies the seed into its own cache before uv runs: one line in the job script (cp -a seed/. "$SCRATCH/cache"/, best-effort, after the scratch dirs exist and before the venv is built). A copy, never a bind or hardlinks; the jail and the private environment are unchanged, and jobs still write nothing shared.
  • Plumbing: DispatchSettings.seed_cache (set from the attempt's --run-root and --target), DispatchedMeasurer.seed_cache, the launcher and the inline measurer pass it. Local mode is the same code.
  • Tests: the warmer's argv, env and temp dir; unchanged-lockfile no-op and re-warm on change; skip and failure paths record nothing; the job-script line and its position; the tick service.

Not in this PR: the in-image seed and the environment.container knob (step 2).

🤖 Generated with Claude Code

…ies it into its own cache

evalcache.warm fetches the target's pyproject.toml and uv.lock at its
default branch and runs uv sync --frozen --no-install-project --no-build
--all-extras into a throwaway environment with the seed as uv's cache,
once per lockfile hash; --no-build keeps every build backend of the
target's off the tick host. write_eval_job(seed_cache=) adds one line to
the job script that copies the seed's contents into the job's scratch
cache before uv runs — a copy, never a bind or a hardlink, best-effort.
DispatchSettings and DispatchedMeasurer carry the seed path; the launcher
and the inline measurer pass it; the tick warms once per cycle.
Step 1 of docs/design/eval-cache.md.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Round 1 — reviewed head 2e6f6f67 — reviewer summarizer:hermes/gpt-5.6-terra over coverage+credentials+deployment+general+lifecycle+prose.

terra
Advisory findings from outerloop — the code owner decides. Reply to disagree; the outerloop:no-review label opts this PR out.

Verdict: 3 blocking, 1 advisory.

4 findings attached to the lines below.

Merged verdict: two blocking defects and two advisory improvements. [credentials] the warmer leaks the tick environment to uv; [deployment+general+lifecycle+prose] resumed and follow-up dispatches lose the seed cache; [lifecycle+prose] obsolete package entries accumulate after lockfile changes; [coverage] tick wiring lacks an integration test. Rejected findings: none; the deployment, general, lifecycle, and prose observations about missing seed-cache propagation were merged as one finding, and the lifecycle and prose observations about stale cache entries were merged as one finding.

Comment thread src/outerloop/evalcache.py Outdated
Comment thread src/outerloop/attempt.py
Comment thread src/outerloop/evalcache.py Outdated
Comment thread tests/test_tick.py
…ile, the seed on wakes and follow-ups, tick integration test

- The warmer's uv runs with an allowlisted environment (PATH, HOME, locale,
  proxies, CA bundles, its own UV_*): no tick credential reaches the
  download process.
- Each warm builds a fresh directory beside the seed and swaps it in
  whole, so the seed holds exactly the current lockfile's wheels; a failed
  warm removes its half-built directory.
- with_seed fills the seed from the record's target where the CLI gave
  none: resume_run (wake jobs) and the follow-up's seal-and-measure; a
  settings object that knows no seed is left as it is.
- A tick-level test asserts the scheduled tick warms the target's seed.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@renmengye renmengye added the outerloop:review re-request the advisory review label Sep 8, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Round 1 — reviewed head f3469cb7 — reviewer hermes/gpt-5.6-terra.

terra
Advisory findings from outerloop — the code owner decides. Reply to disagree; the outerloop:no-review label opts this PR out.

Verdict: nothing blocking — 1 advisory note.

1 finding attached to the lines below.

Dry-run ticks can still populate the new seed cache.

Comment thread src/outerloop/tick.py Outdated
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@renmengye renmengye added outerloop:review re-request the advisory review and removed outerloop:review re-request the advisory review labels Sep 8, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Round 2 — reviewed head f97d7503 — reviewer hermes/gpt-5.6-terra.

terra
Advisory findings from outerloop — the code owner decides. Reply to disagree; the outerloop:no-review label opts this PR out.

Verdict: no defects found.

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

Labels

outerloop:review re-request the advisory review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant