Skip to content

Combine uv script publication and setup#1999

Merged
xeophon merged 1 commit into
PrimeIntellect-ai:mainfrom
xeophon:agent/combine-uv-publication
Jul 14, 2026
Merged

Combine uv script publication and setup#1999
xeophon merged 1 commit into
PrimeIntellect-ai:mainfrom
xeophon:agent/combine-uv-publication

Conversation

@xeophon

@xeophon xeophon commented Jul 14, 2026

Copy link
Copy Markdown
Member

Overview

Reduce remote command roundtrips when preparing content-addressed PEP 723 scripts.

Change

The temporary script is still uploaded and atomically renamed into place, but the rename now runs in the same runtime command as uv bootstrap, dependency synchronization, and interpreter lookup.

The shell chain short-circuits on rename, bootstrap, sync, or interpreter lookup failure, preserving the existing failure behavior.

Impact

  • Saves approximately 0.5–0.6 seconds for every distinct script prepared in a Prime runtime.
  • Saves the roundtrip once during default harness setup and again when GSM8K prepares its verifier during scoring.
  • Preserves atomic publication for subprocess runtimes that share /tmp/vf-scripts.

Note

Low Risk
Single-method refactor that preserves atomic rename and existing error handling; only reduces remote exec count.

Overview
prepare_uv_script in base.py now runs the atomic mv of the temp script into /tmp/vf-scripts/{digest}.py in the same sh -c invocation as _ENSURE_UV, uv sync --script, and uv python find --script, instead of a separate runtime.run for the rename first.

The shell chain still fails fast on rename, bootstrap, sync, or interpreter lookup errors and keeps the same content-addressed path and lock behavior. The goal is to drop one remote roundtrip per distinct script on Prime (and similar) runtimes during harness setup and verifier preparation.

Reviewed by Cursor Bugbot for commit b68fd33. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Fix uv script preparation to check exit status of each setup step

Combines the temporary script move and uv setup into a single chained shell command in base.py, using && to gate each step on the success of the previous one.

  • The mv -f step now runs under the caller-provided environment instead of an empty one.
  • Failure of mv, _ENSURE_UV, uv sync, or uv python find now causes the preparation to raise RuntimeError; previously only the final self.run call was checked.

Macroscope summarized b68fd33.

@xeophon xeophon requested a review from mikasenghaas July 14, 2026 12:15
@xeophon xeophon merged commit d30146e into PrimeIntellect-ai:main Jul 14, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants