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 the e2e_maven suite (#823) by mikolalysenko · Pull Request #1519 · 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 18: the e2e_maven suite). This uses Refs, so #823 stays open for the remaining PENDING_RAW_SPAWNS files.

Summary

e2e_maven.rs now starts socket-patch through tests/common/hermetic.rs (hermetic::binary_command()), scrubs any activated venv (Extra::Venv) and isolates the JVM env with jvm_env::isolate_cli, the same way e2e_cargo.rs does. After that call it pins its own fixture-local homes: MAVEN_REPO_LOCAL, HOME/USERPROFILE, XDG_CACHE_HOME, LOCALAPPDATA, and now GRADLE_USER_HOME. It also removes M2_HOME. The file comes off PENDING_RAW_SPAWNS (9 → 8 on main). Once #1515 and #1518 also land, 3 files remain: e2e_hosted_production, e2e_redirect_cargo_shapes and e2e_vendored_production. The change touches tests only: no product code and no workflows.

This PR removes the e2e_maven.rs entry, which is the only remaining entry whose neighbours #1515 and #1518 don't remove. The three PRs merge cleanly in any order.

Root cause

run() spawned the CLI with a bare Command::new and removed only 6 SOCKET_* names by hand. Every other ambient SOCKET_* reached the child:

  • On main, a shell that exports SOCKET_DRY_RUN=true SOCKET_ECOSYSTEMS=cargo SOCKET_ORG_SLUG=hostile SOCKET_NO_CONFIG=0 SOCKET_JSON=false SOCKET_SILENT=true SOCKET_NO_UPDATE_CHECK=0 fails 2 of the 22 tests: scan_discovers_maven_artifacts and scan_discovers_gradle_project_artifacts.
  • SOCKET_NO_CONFIG=0 let a developer's real socket login reach the child. The update check and telemetry were never forced off.
  • GRADLE_USER_HOME, GRADLE_OPTS, GRADLE_RO_DEP_CACHE and VIRTUAL_ENV were inherited by the unscoped scans.

Test evidence

  • Red with only the PENDING_RAW_SPAWNS removal: spawn_env_hygiene fails no_new_bare_binary_spawns (15 passed, 1 failed).
  • Red on main under the hostile shell above (plus VIRTUAL_ENV=/nonexistent): e2e_maven passes 20 and fails 2.
  • Green at be57c3d under the same hostile shell (plus GRADLE_USER_HOME=/nonexistent M2_HOME=/nonexistent): e2e_maven 22/22 and spawn_env_hygiene 16/16. With a clean env, e2e_maven is 22/22. The suite has no #[ignore]d tests.
  • cargo fmt --all -- --check and cargo clippy --locked --workspace --all-features -- -D warnings are clean, and clippy --test e2e_maven -- -D warnings is clean too.
  • CI at be57c3d: all 86 check runs completed. 35 passed (including ci-ok and clippy), 50 were skipped (the full tier), 1 was neutral (Bugbot) and none failed. Bugbot found no issues.

/code-review high

No correctness findings in this diff. Fixed in be57c3d:

  • The shared stand-in GRADLE_USER_HOME (from isolate_cli) outlives test runs. run() now pins it next to the fixture's HOME, so a stray cache can't change the Gradle scan's count.
  • Added a comment saying the home pins must stay after isolate_cli, because the last write for a name wins.
  • run() now calls hermetic::binary_command() instead of hermetic::command(&binary()).

Not fixed here. These change the shared common harness, so they belong in a follow-up slice under #823:

  • jvm_env::AMBIENT doesn't scrub M2_HOME / MAVEN_REPO_LOCAL, and isolate_cli doesn't pin XDG_CACHE_HOME / LOCALAPPDATA. Other suites that only use isolate_cli (for example e2e_cargo and common::run) can still see a developer's real ~/.m2 or Coursier cache. e2e_maven pins all of these itself.
  • The proxied async run() helper is now repeated almost verbatim across e2e_maven, e2e_cargo, e2e_composer and others. A shared common::run_proxied would remove the copies.

CI cost

No workflow changes. A lean PR run costs the same before and after: about 28 Linux jobs and about 8 minutes.

🤖 Generated with Claude Code

https://claude.ai/code/session_015ra9QiqqVWRsp6FEqw8BXb

Sorry, something went wrong.

Uh oh!

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

All reactions
Claude (claude) added 3 commits October 14, 2026 03:59
@claude
Start fix for #823 (e2e_maven slice)
20bb513
Assisted-by: Claude Code:claude-opus-5-5
@claude
Spawn e2e_maven children hermetically
34d64f0
e2e_maven started the CLI with a bare Command::new and a private
sweep of a handful of SOCKET_* names. Any other ambient value reached
the child: on main, a shell exporting SOCKET_ECOSYSTEMS=cargo fails
two of its scans, and SOCKET_NO_CONFIG=0 lets a developer's real
socket login authenticate the test child.

Its run() helper now builds the child with hermetic::command, scrubs
an activated venv and isolates the JVM env the way e2e_cargo does,
and keeps its own fixture HOME and cache pins. The file leaves
PENDING_RAW_SPAWNS so the spawn_env_hygiene ratchet keeps it there.

Refs #823

Assisted-by: Claude Code:claude-opus-5-5
@claude
Pin e2e_maven's Gradle home per fixture
be57c3d
The shared stand-in GRADLE_USER_HOME outlives test runs, so a cache
left there would change the Gradle scan's package count on that
machine only. Pin it next to the fixture's own HOME, note why the home
pins must follow isolate_cli, and use hermetic::binary_command.

Assisted-by: Claude Code:claude-opus-5-5
@mikolalysenko
Mikola Lysenko (mikolalysenko) marked this pull request as ready for review October 14, 2026 04:04
@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.

@mikolalysenko Mikola Lysenko (mikolalysenko) mentioned this pull request Oct 14, 2026
Spawn every CLI test child through one hermetic Command builder; 10 test files inherit ambient SOCKET_* today #823
Closed
5 tasks
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 be57c3d. 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 c28402a 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-maven branch October 14, 2026 04:56
This was referenced Oct 14, 2026
Swarm health manager log #1382
Open
CI: hermetic spawns in e2e_redirect_cargo_shapes (#823) #1522
Merged
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
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.