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 spawns in Cargo/Composer suites (#823) by mikolalysenko · Pull Request #1502 · SocketDev/socket-patch

Conversation

@mikolalysenko

@mikolalysenko Mikola Lysenko (mikolalysenko) commented Oct 13, 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 13; the issue stays open for the remaining PENDING_RAW_SPAWNS files)

What

Three Cargo / Composer suites still on PENDING_RAW_SPAWNS started socket-patch with a bare Command::new and their own partial SOCKET_* handling, which had drifted from tests/common/hermetic.rs:

  • e2e_cargo.rs and e2e_composer.rs removed six named vars, so any other ambient SOCKET_* reached the child. With SOCKET_ECOSYSTEMS=npm in the shell, 5 e2e_cargo tests and 2 e2e_composer tests fail on main. Neither forced the config layer or the update notifier off.
  • e2e_composer_version_identity.rs had a private sweep that let an ambient SOCKET_NO_CONFIG through and didn't force the update check off.
  • No Composer suite guarded the Composer environment. An ambient COMPOSER_VENDOR_DIR, or a user-level config.json with vendor-dir reached through COMPOSER_HOME or XDG_CONFIG_HOME, moves the crawl off the fixture's vendor/. That fails agent_sync_applies_and_keeps_a_padded_composer_patch on main.

All three now spawn through hermetic::command / hermetic::binary_command, scrub an activated venv (Extra::Venv) and use the stand-in HOME from jvm_env::isolate_cli, because their scans crawl every ecosystem. A new hermetic::Extra::Composer removes every ambient COMPOSER_* var and pins COMPOSER_HOME to a missing directory, which outranks XDG_CONFIG_HOME in the crawler's home lookup. Both Composer suites use it, and spawn_env_hygiene gets a self-test for it. The three files leave PENDING_RAW_SPAWNS (22 -> 19), so the ratchet keeps them hermetic.

e2e_redirect_cargo_shapes.rs stays on the list for a later slice because #1429 edits it. #1498 trims other lines of the same PENDING_RAW_SPAWNS list, so whichever PR lands second needs a trivial rebase of that list.

Test-only change; no product code touched.

CI cost

No workflow change. A lean PR run has the same job count (~28 Linux jobs) and job-minutes before and after, because these suites already run in the same jobs.

Test evidence

  • cargo fmt --all -- --check: clean. cargo clippy --workspace --all-features -- -D warnings: clean. cargo check -p socket-patch-cli --all-features --tests: every test target builds. Clippy on the touched test targets reports only the existing lints in prebuilt_common/mod.rs, which this PR doesn't touch.

  • Red on main:

    • SOCKET_ECOSYSTEMS=npm cargo test -p socket-patch-cli --all-features --no-fail-fast --test e2e_cargo --test e2e_composer: e2e_cargo 20 passed, 5 failed; e2e_composer 20 passed, 2 failed.
    • COMPOSER_VENDOR_DIR=elsewhere cargo test ... --test e2e_composer_version_identity: 6 passed, 1 failed.
  • Green on this branch with -- --include-ignored under each of these hostile environments:

    1. SOCKET_ECOSYSTEMS=npm SOCKET_DRY_RUN=true SOCKET_NO_CONFIG=0 SOCKET_CLI_API_TOKEN=x SOCKET_SAVE_ONLY=true COMPOSER_VENDOR_DIR=x
    2. XDG_CONFIG_HOME=<dir with composer/config.json vendor-dir=deps>
    3. COMPOSER_HOME=<same>

    Under every one: e2e_cargo 25/25, e2e_composer 22/22, e2e_composer_version_identity 7/7, spawn_env_hygiene 16/16.

  • CI on cdb3669: all checks green (run 38461229984, ci-ok success); Cursor Bugbot passed with no findings; mergeable state clean.

/code-review high

  • Fixed: the user-level Composer config leak through COMPOSER_HOME / XDG_CONFIG_HOME (two findings, reproduced as above). The one-off env_remove("COMPOSER_VENDOR_DIR") copies are now Extra::Composer. The doc comments no longer overstate the isolation.
  • Not fixed: folding hermetic::command + Extra::Venv + isolate_cli into one shared builder. e2e_composer_version_identity builds on prebuilt_common, not common, so a common helper wouldn't reach it, and changing common::run_bin_with_env to scrub the venv would affect every caller. That belongs in its own change.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Er9RqgedbBok557p98HiKT


Note

Low Risk
Test harness and environment isolation only; no production CLI or crawler behavior changes.

Overview
Cargo and Composer CLI e2e suites now spawn socket-patch through the shared hermetic helpers instead of bare Command::new with hand-rolled SOCKET_* scrubbing, so ambient env (e.g. SOCKET_ECOSYSTEMS, stray SOCKET_* tokens) cannot skew discovery or proxy routing.

Extra::Composer strips all COMPOSER_* variables and pins COMPOSER_HOME to a nonexistent path so COMPOSER_VENDOR_DIR and user-level Composer config via XDG_CONFIG_HOME cannot redirect the crawler away from fixture vendor/. Composer suites use it; spawn_env_hygiene adds a contract test and drops e2e_cargo, e2e_composer, and e2e_composer_version_identity from PENDING_RAW_SPAWNS.

Unscoped scans also scrub VIRTUAL_ENV and isolate HOME via jvm_env::isolate_cli so developer venvs and user caches do not inflate package counts.

Reviewed by Cursor Bugbot for commit cdb3669. Configure here.


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 13
a5bb504
Assisted-by: Claude Code:claude-opus-5-5
This was referenced Oct 13, 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
Spawn Cargo/Composer test CLIs hermetically
dce11cc
The Cargo and Composer suites started socket-patch with a bare
Command::new and their own partial SOCKET_* handling, which had
drifted from tests/common/hermetic.rs. e2e_cargo and e2e_composer
removed six named vars, so any other ambient SOCKET_* reached the
child: with SOCKET_ECOSYSTEMS=npm in the shell, 5 e2e_cargo and 2
e2e_composer tests fail on main. None forced the config layer or the
update notifier off.

All three now start from hermetic::command, scrub an activated venv
(Extra::Venv) and use the stand-in HOME from jvm_env::isolate_cli,
since their scans are unscoped. The Composer suites also drop an
ambient COMPOSER_VENDOR_DIR: it moves the vendor directory the
crawler reads off the fixture's, and fails the agent-mode sync test
in e2e_composer_version_identity on main. The files leave
PENDING_RAW_SPAWNS (22 -> 19), so the ratchet keeps them hermetic.

Refs #823

Assisted-by: Claude Code:claude-opus-5-5
@mikolalysenko
Mikola Lysenko (mikolalysenko) force-pushed the agent/fix-ci-hermetic-cargo-composer branch from f32f8f0 to dce11cc Compare October 13, 2026 20:00
@claude
Keep user Composer config out of test CLIs
cdb3669
From /code-review high: the Composer suites only dropped an ambient
COMPOSER_VENDOR_DIR. The crawler also reads vendor-dir from the
user-level config.json, which it finds through COMPOSER_HOME or an
absolute XDG_CONFIG_HOME, so a developer whose Composer config sets
vendor-dir still failed 2 e2e_composer tests and 1
e2e_composer_version_identity test.

hermetic::Extra::Composer now removes every ambient COMPOSER_* var
and pins COMPOSER_HOME to a missing directory, which outranks
XDG_CONFIG_HOME and holds no config. Both Composer suites use it, and
spawn_env_hygiene checks the scrub.

Refs #823

Assisted-by: Claude Code:claude-opus-5-5
@mikolalysenko
Mikola Lysenko (mikolalysenko) marked this pull request as ready for review October 13, 2026 20:14
@mikolalysenko

Mikola Lysenko (mikolalysenko) commented Oct 13, 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 13, 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 cdb3669. 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 13, 2026
View reviewed changes
@mikolalysenko Mikola Lysenko (mikolalysenko) added the Ready for review Agent-verified: mergeable, CI green, Bugbot clean — awaiting human review label Oct 13, 2026
@mikolalysenko

Mikola Lysenko (mikolalysenko) commented Oct 13, 2026

Copy link
Copy Markdown
Collaborator Author

Ready for review (burn-down agent)

  • Head: cdb3669594937f01ebf666f364eae6de422be214
  • CI: 86/86 settled green on this head (36 success, 50 path-skipped); no main-wide failures
  • Bugbot: reviewed cdb3669 and found no issues; no open review threads
  • Mergeable: clean, already one human approval on this head
  • What to look at: test-only change moving the Cargo/Composer e2e suites onto the shared hermetic spawn helper (Spawn every CLI test child through one hermetic Command builder; 10 test files inherit ambient SOCKET_* today #823)

Generated by Claude Code

All reactions

Sorry, something went wrong.

Uh oh!

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

@mikolalysenko Mikola Lysenko (mikolalysenko) mentioned this pull request Oct 13, 2026
CI: hermetic spawns in gem/vendor suites (#823) #1505
Merged
@mikolalysenko
Mikola Lysenko (mikolalysenko) added this pull request to the merge queue Oct 13, 2026
Merged via the queue into main with commit 51ba2f3 Oct 13, 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-cargo-composer branch October 13, 2026 22:59
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

Ready for review Agent-verified: mergeable, CI green, Bugbot clean — awaiting human review

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.