Repository navigation
CI: hermetic spawns in VEX test commons (#823) - #1491
Merged
Mikola Lysenko (mikolalysenko) merged 3 commits intoOct 13, 2026
Merged
Conversation
The uv, PDM/Hatch and Pipenv/pip VEX test helpers started the socket-patch child with a bare Command::new and their own SOCKET_* sweep. Those sweeps had drifted from tests/common/hermetic.rs: none forced the update notifier off, none removed the flag-bound vars by name, and none had the hostile seeds that catch a dropped scrub. The three helpers now start from hermetic::command and keep only their tool scrubs (python/uv/pip config, VIRTUAL_ENV, PIPENV_*). The uv helper's python scrub no longer sweeps SOCKET_*, so it can run after the builder without removing the opt-outs it forces on; its uv/python children get the SOCKET_* sweep through scrub_tool_env. The files leave PENDING_RAW_SPAWNS (32 -> 29) so the ratchet keeps them hermetic. Refs #823 Assisted-by: Claude Code:claude-opus-5-5
5 tasks
The PDM/Hatch VEX helper now also applies hermetic Extra::Pdm, so an ambient PDM_* or UV_PROJECT_ENVIRONMENT can't move the venv the CLI's python crawler reads (found by /code-review high). Refs #823 Assisted-by: Claude Code:claude-opus-5-5
Mikola Lysenko (mikolalysenko)
marked this pull request as ready for review
October 13, 2026 16:12
Collaborator
Author
|
BugBot review Generated by Claude Code |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 9078ed4. Configure here.
…-vex-commons # Conflicts: # crates/socket-patch-cli/tests/spawn_env_hygiene.rs
Tanmay Singla (Tanmay182003)
approved these changes
Oct 13, 2026
Mikola Lysenko (mikolalysenko)
deleted the
agent/fix-ci-hermetic-vex-commons
branch
October 13, 2026 16:59
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
LLM Description written by Claude Code:claude-opus-5-5
Refs #823 (slice 11 of the hermetic-spawn migration). The issue stays open for the remaining
PENDING_RAW_SPAWNSentries (26 after this PR; #1488 has landed and main is merged in).Root cause
The three VEX test commons each started the
socket-patchchild with a bareCommand::newand a privateSOCKET_*sweep that had drifted fromtests/common/hermetic.rs:SOCKET_NO_UPDATE_CHECK=1, andvex_pdm_hatch_common::cli/vex_pipenv_pip_common::cliactively removed an ambient one, so a child could fetch release metadata from real GitHub.vex_e2e_common/uv.rsfoldedSOCKET_*into its python scrub, so the same function served both the binary and the uv / python / pip children.Change
uv.rs::socket_patch,vex_pdm_hatch_common::cliandvex_pipenv_pip_common::clinow start fromhermetic::command(reached throughcrate::vex_e2e_common::hermetic, which every includer already loads) and keep only their own scrubs: python / uv / pip config for the uv helper,VIRTUAL_ENVviaExtra::Venvfor all three, plusPDM_*/UV_PROJECT_ENVIRONMENTviaExtra::Pdmfor the PDM/Hatch helper andPIPENV_*/WORKON_HOMEfor the Pipenv helper.uv.rs,scrub_python_envno longer sweepsSOCKET_*(it runs after the builder and would otherwise remove the opt-outs it forces on). The uv / python / pip children call the newscrub_tool_env(hermetic::scrub_socket_vars+scrub_python_env), so they lose nothing.PENDING_RAW_SPAWNS(29 -> 26 on main), so the ratchet inspawn_env_hygiene.rskeeps them hermetic. CI: hermetic spawns in vlt test commons (#823) #1488 removed the adjacentvlt_*lines; the merge of main resolves that list conflict by dropping all six.CI cost
Test code only, no workflow edits. A lean PR run keeps the same job count (~29 Linux jobs) and job-minutes (~31 job-min, ~8 min wall) before and after.
Test evidence (local)
spawn_env_hygiene::no_new_bare_binary_spawnsfails, naming exactly these three files. Green with the change.cargo fmt --all -- --check: clean.cargo clippy --locked --workspace --all-features -- -D warnings(the CI command): clean.e2e_vex_lockfile346 passed (drives the PDM / Hatch / Pipenv / pipcli()),e2e_hosted_production49,e2e_vendored_production49,e2e_vendor_pypi_build47,e2e_redirect_uv_build13,spawn_env_hygiene15. 0 failed.SOCKET_PATCH_UV_E2E_REQUIRED=1so a skip is a failure):e2e_redirect_uv_build manifestless_vex9/9 passed ande2e_vendor_pypi_build manifestless_vex7/7 passed. These driveuv.rs::socket_patchand everyscrub_tool_envchild./code-review high
cli()now also appliesExtra::Pdm, so an ambientPDM_*orUV_PROJECT_ENVIRONMENTcan't move the venv the crawler reads (e2e_vex_lockfile346/346 again after the change).cli()still letsUV_PROJECT_ENVIRONMENT,PDM_*,PYTHONUSERBASE,CONDA_PREFIXthrough, andHATCH_*reaches the PDM/Hatch one. Both old sweeps had the same gap.uv.rs::scrub_python_envand the PipenvPIPENV_*sweep could become sharedExtra::Python/Extra::Pipenvvariants inhermetic.rs.uv --version,help_has,pip lock --help) spawn unscrubbed, as before.scrub_tool_envwalks the environment twice per spawn. That's negligible next to a uv run.🤖 Generated with Claude Code
https://claude.ai/code/session_015HUYJe1zS1wZnLys72fnxx
Generated by Claude Code