GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — CI: hermetic env for production suites' tool spawns (#823) by mikolalysenko · Pull Request #1532 · SocketDev/socket-patch

Conversation

@mikolalysenko

@mikolalysenko Mikola Lysenko (mikolalysenko) commented Oct 14, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Collaborator

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.rs and e2e_vendored_production.rs spawn
their package managers (tool(), corepack(), bundle(), and the
has_command / has_corepack_pm probes) with private scrubs that had
drifted from tests/common/hermetic.rs:

helper drift
all of them no SOCKET_* scrub, so an ambient SOCKET_* reached every package-manager child (and any socket-patch it might run)
hosted tool() removed VIRTUAL_ENV after applying the leg's env, so the uv legs' own VIRTUAL_ENV pin never reached uv
vendored corepack() removed YARN_NODE_LINKER but not npm_config_node_linker, unlike tool()
probes ran with no scrub at all, so they didn't answer for the environment the legs run in

Change (test-only, 2 files)

One pm_command(program) per suite: hermetic::scrub_socket_vars,
hermetic::Extra::Venv, and the two node-linker overrides, applied
before cache_env::isolate and the leg's env, so a leg's own pins
win. Every package-manager child and probe in both suites now goes
through it. bundle() keeps its BUNDLE_*/GEM_*/RUBYOPT sweep
unchanged.

Evidence

  • cargo fmt --all -- --check and cargo clippy --workspace --all-features -- -D warnings pass. Both suites compile. With
    --tests, clippy on these two test targets reports the same 13
    pre-existing errors on main and on this branch (duplicate-module
    lints in the shared common/ includes).
  • Live legs (pnpm, yarn_berry, yarn_classic, gem_bundler,
    pypi_uv_lock, pypi_requirements_txt, hosted and vendored) were
    run locally. Every package-manager fixture install succeeds through the new
    builder. 5 of 6 legs then stop at scan, because this sandbox's
    proxy blocks patches-api.socket.dev. The results are identical on
    origin/main (1 passed, 5 failed with the same tunnel error), so the
    network is the cause and this change isn't. CI's hosted-e2e job runs the hosted
    suite 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)

  • Fixed: the first version used the full Extra::Yarn/Pnpm/
    YarnClassic/Bundle/Composer/... sweeps on every child. Those
    also remove proxy and CA settings (npm_config_https_proxy,
    YARN_HTTPS_PROXY, NPM_CONFIG_USERCONFIG) these live-registry
    suites need, and the YarnClassic sweep removes PREFIX for every
    tool. It now scrubs only what the helpers already removed, plus
    SOCKET_*.
  • Fixed: kept Command::new(program) rather than tool_command, so a
    program name still resolves against the child's PATH as before.
  • Not fixed (pre-existing, out of scope): vendored bundle() removes
    GEM_HOME/GEM_PATH, which cache_env.rs warns breaks rvm/chruby
    hosts. The same sweep lives in e2e_vendor_gem_build.rs and
    e2e_redirect_gem_build.rs. Changing it changes where gems install,
    so it gets its own slice.
  • Not fixed: the socket-patch child in run()/run_socket() gets
    only Extra::Venv beyond hermetic::command. Adding the
    crawler-relevant extras (Bundle, Composer) is a follow-up.
  • Not fixed: pm_command is duplicated across the two suites. Moving
    it into common/hermetic.rs would collide with CI: hermetic env for the PTY test spawns (#823) #1530, which is
    editing that file now.

Remaining for #823

  • The GEM_* sweep in the three bundle helpers (see above).
  • The crawler extras on the production suites' CLI child.

🤖 Generated with Claude Code

https://claude.ai/code/session_01W9FQvgb6aG8vSapKuKMwKY


Generated by Claude Code

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@claude
Start fix for #823 (slice 22)
17dbd25
Assisted-by: Claude Code:claude-opus-5-5
This was referenced Oct 14, 2026
Spawn every CLI test child through one hermetic Command builder; 10 test files inherit ambient SOCKET_* today #823
Closed
Swarm health manager log #1382
Open
Claude (claude) added 2 commits October 14, 2026 12:08
@claude
Hermetic env for production suites' tool spawns
a1237dc
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
@claude
Keep proxy config in production tool spawns
fe7b67d
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
@mikolalysenko
Mikola Lysenko (mikolalysenko) marked this pull request as ready for review October 14, 2026 12:14
@mikolalysenko

Mikola Lysenko (mikolalysenko) commented Oct 14, 2026

Copy link
Copy Markdown
Collaborator Author

BugBot review


Generated by Claude Code

cursor[bot] reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

cursor[bot]
cursor Bot reviewed Oct 14, 2026
View reviewed changes

@cursor cursor Bot left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

✅ 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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Tanmay182003
Tanmay Singla (Tanmay182003) approved these changes Oct 14, 2026
View reviewed changes
@mikolalysenko
Mikola Lysenko (mikolalysenko) added this pull request to the merge queue Oct 14, 2026
Merged via the queue into main with commit 80b45c8 Oct 14, 2026
86 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@mikolalysenko
Mikola Lysenko (mikolalysenko) deleted the agent/fix-ci-hermetic-pm-children branch October 14, 2026 13:00
This was referenced Oct 14, 2026
CI perf (settings): slow Depot 16-core hosts since 10-13 15:20 add ~1.5–2.5 min to the merge-queue critical path (~0.6k Linux job-min/day) #1512
Open
CI performance dashboard #1182
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@cursor cursor[bot] cursor[bot] left review comments
@Tanmay182003 Tanmay Singla (Tanmay182003) Tanmay182003 approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@mikolalysenko @Tanmay182003 @claude
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.