Repository navigation
CI: hermetic spawns in the e2e_maven suite (#823) - #1519
Merged
Mikola Lysenko (mikolalysenko) merged 3 commits intoOct 14, 2026
Merged
Conversation
Assisted-by: Claude Code:claude-opus-5-5
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
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
Mikola Lysenko (mikolalysenko)
marked this pull request as ready for review
October 14, 2026 04:04
Collaborator
Author
|
BugBot review Generated by Claude Code |
5 tasks
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 be57c3d. Configure here.
Tanmay Singla (Tanmay182003)
approved these changes
Oct 14, 2026
Mikola Lysenko (mikolalysenko)
deleted the
agent/fix-ci-hermetic-maven
branch
October 14, 2026 04:56
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 18: the
e2e_mavensuite). This usesRefs, so #823 stays open for the remainingPENDING_RAW_SPAWNSfiles.Summary
e2e_maven.rsnow starts socket-patch throughtests/common/hermetic.rs(hermetic::binary_command()), scrubs any activated venv (Extra::Venv) and isolates the JVM env withjvm_env::isolate_cli, the same waye2e_cargo.rsdoes. After that call it pins its own fixture-local homes:MAVEN_REPO_LOCAL,HOME/USERPROFILE,XDG_CACHE_HOME,LOCALAPPDATA, and nowGRADLE_USER_HOME. It also removesM2_HOME. The file comes offPENDING_RAW_SPAWNS(9 → 8 on main). Once #1515 and #1518 also land, 3 files remain:e2e_hosted_production,e2e_redirect_cargo_shapesande2e_vendored_production. The change touches tests only: no product code and no workflows.This PR removes the
e2e_maven.rsentry, 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 bareCommand::newand removed only 6SOCKET_*names by hand. Every other ambientSOCKET_*reached the child: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=0fails 2 of the 22 tests:scan_discovers_maven_artifactsandscan_discovers_gradle_project_artifacts.SOCKET_NO_CONFIG=0let a developer's realsocket loginreach the child. The update check and telemetry were never forced off.GRADLE_USER_HOME,GRADLE_OPTS,GRADLE_RO_DEP_CACHEandVIRTUAL_ENVwere inherited by the unscoped scans.Test evidence
PENDING_RAW_SPAWNSremoval:spawn_env_hygienefailsno_new_bare_binary_spawns(15 passed, 1 failed).VIRTUAL_ENV=/nonexistent):e2e_mavenpasses 20 and fails 2.GRADLE_USER_HOME=/nonexistent M2_HOME=/nonexistent):e2e_maven22/22 andspawn_env_hygiene16/16. With a clean env,e2e_mavenis 22/22. The suite has no#[ignore]d tests.cargo fmt --all -- --checkandcargo clippy --locked --workspace --all-features -- -D warningsare clean, andclippy --test e2e_maven -- -D warningsis clean too.ci-okandclippy), 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:
GRADLE_USER_HOME(fromisolate_cli) outlives test runs.run()now pins it next to the fixture'sHOME, so a stray cache can't change the Gradle scan's count.isolate_cli, because the last write for a name wins.run()now callshermetic::binary_command()instead ofhermetic::command(&binary()).Not fixed here. These change the shared
commonharness, so they belong in a follow-up slice under #823:jvm_env::AMBIENTdoesn't scrubM2_HOME/MAVEN_REPO_LOCAL, andisolate_clidoesn't pinXDG_CACHE_HOME/LOCALAPPDATA. Other suites that only useisolate_cli(for examplee2e_cargoandcommon::run) can still see a developer's real~/.m2or Coursier cache.e2e_mavenpins all of these itself.run()helper is now repeated almost verbatim across e2e_maven, e2e_cargo, e2e_composer and others. A sharedcommon::run_proxiedwould 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