Repository navigation
CI: hermetic env for production suites' tool spawns (#823) - #1532
Merged
Mikola Lysenko (mikolalysenko) merged 3 commits intoOct 14, 2026
Merged
Conversation
Assisted-by: Claude Code:claude-opus-5-5
This was referenced Oct 14, 2026
The live production suites spawned uv, pnpm, yarn, corepack and bundle with their own scrubs, which had drifted from the shared hermetic helpers: none removed ambient SOCKET_* vars, corepack() kept an ambient npm_config_node_linker, and the hosted tool() removed VIRTUAL_ENV after applying a leg's env, so the uv legs' own VIRTUAL_ENV pin never reached uv. Every package-manager child and its probe now goes through one pm_command builder per suite: tool_command, scrub_socket_vars and the hermetic::Extra scrubs, then cache_env::isolate, then the leg's env last. bundle() keeps its own GEM_*/RUBYOPT sweep. Refs #823 Assisted-by: Claude Code:claude-opus-5-5
The first version swept every YARN_*, npm_config_* and BUNDLE_* var from all package-manager children. That also removed the proxy and CA settings a developer behind a proxy needs to reach the live registries, so their install proofs would quietly soft-skip. pm_command now removes every ambient SOCKET_*, an activated venv and the two node-linker overrides, the scrubs these helpers already made, and spawns the program as before. bundle() keeps its own BUNDLE_*/GEM_*/RUBYOPT sweep unchanged. Refs #823 Assisted-by: Claude Code:claude-opus-5-5
Mikola Lysenko (mikolalysenko)
marked this pull request as ready for review
October 14, 2026 12:14
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 fe7b67d. Configure here.
Tanmay Singla (Tanmay182003)
approved these changes
Oct 14, 2026
Mikola Lysenko (mikolalysenko)
deleted the
agent/fix-ci-hermetic-pm-children
branch
October 14, 2026 13:00
This was referenced Oct 14, 2026
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 22: package-manager children in the production suites)
Problem
e2e_hosted_production.rsande2e_vendored_production.rsspawntheir package managers (
tool(),corepack(),bundle(), and thehas_command/has_corepack_pmprobes) with private scrubs that haddrifted from
tests/common/hermetic.rs:SOCKET_*scrub, so an ambientSOCKET_*reached every package-manager child (and anysocket-patchit might run)tool()VIRTUAL_ENVafter applying the leg's env, so the uv legs' ownVIRTUAL_ENVpin never reached uvcorepack()YARN_NODE_LINKERbut notnpm_config_node_linker, unliketool()Change (test-only, 2 files)
One
pm_command(program)per suite:hermetic::scrub_socket_vars,hermetic::Extra::Venv, and the two node-linker overrides, appliedbefore
cache_env::isolateand the leg's env, so a leg's own pinswin. Every package-manager child and probe in both suites now goes
through it.
bundle()keeps itsBUNDLE_*/GEM_*/RUBYOPTsweepunchanged.
Evidence
cargo fmt --all -- --checkandcargo clippy --workspace --all-features -- -D warningspass. Both suites compile. With--tests, clippy on these two test targets reports the same 13pre-existing errors on main and on this branch (duplicate-module
lints in the shared
common/includes).pnpm,yarn_berry,yarn_classic,gem_bundler,pypi_uv_lock,pypi_requirements_txt, hosted and vendored) wererun locally. Every package-manager fixture install succeeds through the new
builder. 5 of 6 legs then stop at
scan, because this sandbox'sproxy blocks
patches-api.socket.dev. The results are identical onorigin/main(1 passed, 5 failed with the same tunnel error), so thenetwork is the cause and this change isn't. CI's
hosted-e2ejob runs the hostedsuite live.
CI cost
Test-only. No workflow changes, so a lean PR run keeps the same job
count and minutes (about 28 Linux jobs, ~8 min wall), before and after.
Review notes (
/code-review high)Extra::Yarn/Pnpm/YarnClassic/Bundle/Composer/... sweeps on every child. Thosealso remove proxy and CA settings (
npm_config_https_proxy,YARN_HTTPS_PROXY,NPM_CONFIG_USERCONFIG) these live-registrysuites need, and the
YarnClassicsweep removesPREFIXfor everytool. It now scrubs only what the helpers already removed, plus
SOCKET_*.Command::new(program)rather thantool_command, so aprogram name still resolves against the child's PATH as before.
bundle()removesGEM_HOME/GEM_PATH, whichcache_env.rswarns breaks rvm/chrubyhosts. The same sweep lives in
e2e_vendor_gem_build.rsande2e_redirect_gem_build.rs. Changing it changes where gems install,so it gets its own slice.
socket-patchchild inrun()/run_socket()getsonly
Extra::Venvbeyondhermetic::command. Adding thecrawler-relevant extras (
Bundle,Composer) is a follow-up.pm_commandis duplicated across the two suites. Movingit into
common/hermetic.rswould collide with CI: hermetic env for the PTY test spawns (#823) #1530, which isediting that file now.
Remaining for #823
GEM_*sweep in the three bundle helpers (see above).🤖 Generated with Claude Code
https://claude.ai/code/session_01W9FQvgb6aG8vSapKuKMwKY
Generated by Claude Code