@@ -2428,18 +2428,15 @@ def test_own_runner_script_cache_wiring_honours_settings_overrides(monkeypatch):
24282428 assert "--digest-manifest /custom/golden/digest.json" in script
24292429
24302430
2431- def test_own_runner_script_pip_installs_are_offline_and_hang_proofed ():
2432- """Runner jobs run on an egress-free network, so the agent install must
2433- resolve entirely from packages pre-baked into the runner image and must fail
2434- fast rather than hang on unreachable pypi.
2435-
2436- Regression (score-0.0 bug): every terminal-bench task scored 0.0 because the
2437- agent install reached out to pypi and failed/hung. The fix installs with
2438- ``--no-build-isolation`` (reuse the pre-baked PEP 517 build backends instead
2439- of fetching setuptools>=61 into a fresh isolated build env) and ``--no-index``
2440- (a missing/exotic dep fails immediately instead of retrying pypi for ~150s).
2441- Both installs stay wrapped in a hard ``timeout -k 10 -s KILL`` safety net and
2442- keep ``|| true`` so a partially-satisfiable agent still attempts to run.
2431+ def test_own_runner_script_pip_installs_use_pypi_with_sane_retries ():
2432+ """Agent install resolves from PyPI with network-sane pip flags.
2433+
2434+ Host-local evaluation has egress to PyPI; ``--no-index`` was blocking real
2435+ agent deps (e.g. litellm>=1.55.0) with an instant empty-index failure.
2436+ The install keeps ``--no-input`` / ``--disable-pip-version-check``, uses
2437+ retries/timeouts suitable for network installs, stays wrapped in a hard
2438+ ``timeout -k 10 -s KILL`` safety net, and keeps ``|| true`` so a
2439+ partially-satisfiable agent still attempts to run.
24432440 """
24442441
24452442 job = EvaluationJob (job_id = "job-hangproof" , selected_tasks_json = "[]" )
@@ -2454,16 +2451,18 @@ def test_own_runner_script_pip_installs_are_offline_and_hang_proofed():
24542451
24552452 assert 'TMO="timeout -k 10 -s KILL 600"' in script
24562453 assert "python -m pip install --no-input --disable-pip-version-check" in script
2457- # Offline-first : no isolated build env, no pypi index, fail fast .
2458- assert "--no-build-isolation" in script
2459- assert "--no-index" in script
2460- assert "--retries 0 --default-timeout 15 " in script
2461- # Both install paths carry the offline flags and stay best-effort.
2454+ # PyPI-reachable install : no offline-only flags; network-sane retries .
2455+ assert "--no-index" not in script
2456+ assert "--no-build-isolation" not in script
2457+ assert "--retries 3 --default-timeout 30 " in script
2458+ # Both install paths stay best-effort under the hard timeout .
24622459 assert "$TMO $PIP -r requirements.txt || true" in script
24632460 assert "$TMO $PIP -e . || true" in script
24642461 pip_flag_line = next (line for line in script .splitlines () if line .startswith ('PIP="$PIP' ))
2465- assert "--no-index" in pip_flag_line
2466- assert "--no-build-isolation" in pip_flag_line
2462+ assert "--no-index" not in pip_flag_line
2463+ assert "--no-build-isolation" not in pip_flag_line
2464+ assert "--retries 3" in pip_flag_line
2465+ assert "--default-timeout 30" in pip_flag_line
24672466
24682467
24692468def test_own_runner_command_args_wires_cache_root_and_digest_manifest ():
0 commit comments