Repository navigation
CI: hermetic spawns in VEX tests (#823) - #1454
Conversation
Assisted-by: Claude Code:claude-opus-5-5
The VEX suites (e2e_vex_lockfile, e2e_vex_build, e2e_vex, e2e_vex_redirect, e2e_embedded_vex) and the shared run_vex helper built the socket-patch child with their own SOCKET_* sweeps. The sweeps differed by file: some kept an ambient SOCKET_NO_CONFIG, none forced the update check off, several left telemetry on, and two hatch revert spawns scrubbed nothing at all. A developer's shell could change what those tests exercised. They now go through tests/common/hermetic.rs, and 16 files leave the PENDING_RAW_SPAWNS ratchet. Test-only; no product change. Refs #823 Assisted-by: Claude Code:claude-opus-5-5
Drop the opt-out env sets that the hermetic builder already forces, route the remaining VIRTUAL_ENV removals through Extra::Venv, mark the extra hermetic.rs load in vex_e2e_common as an intended duplicate, and say what cli() really does in the doc comments. Refs #823 Assisted-by: Claude Code:claude-opus-5-5
|
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 68732af. Configure here.
|
Labeled Ready for review by the burn-down agent.
Generated by Claude Code |
Final review briefWhat it does: Moves 16 VEX test files ( Risk: low. Only test harness code changes, and the child env only gets stricter. Per-test env ( Look here:
Verified:
Changes I made: none. Open questions: none. Auto-merge (squash) is armed, so approving sends it straight to the merge queue. Generated by Claude Code |
* ci(release): publish npm from release.yml, not publish-npm.yml Every socket-patch npm package's trusted publisher is registered against release.yml, and npm allows only one publisher per package. The 5.0.0 release dispatched publish-npm.yml, whose OIDC token named that file, so npm rejected it with E401 before staging anything. Move the npm leg back inline as release.yml's npm-publish job (same steps as publish-npm.yml) and delete publish-npm.yml, so the existing registration keeps working. Add an `npm-retry-version` input that skips the version gate, build, tag, GitHub release and crates.io jobs and re-stages npm from an existing release's assets; this retries 5.0.0 now and replaces the manual Publish npm dispatch. crates.io stays dispatched through publish-cargo.yml, since crates.io allows several publishers per crate. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * chore(release): fold 22 more PRs into the 5.0.0 notes Cover the PRs merged to main after #1432's base (1779317..4cb3643): Cargo source replacement and registry = "crates-io" (#338/#455, #386), pnpm lockfile=false (#1074), berry removed descriptors (#1435), yarnrc ${VAR} reads (#1100), CRLF .npmrc append (#1196), Composer vendor-dir cascade and global home (#439/#686, #586), Go +incompatible vex (#484), gem moved BUNDLE_GEMFILE and commented Gemfile revert (#952, #988), Poetry source = "pypi" (#1282) and Hatch path characters (#547). No entries for #1411 (macOS fix to code #1393 added in this release; the #1393 entry already describes the intended behavior), #1426 (perf regression introduced and fixed within 5.0.0) or the CI/test/bench PRs. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * chore(release): cover #1419, #1434, #1440, #1442, #1444 in the 5.0.0 notes Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * chore(release): 5.0.1 Cut [Unreleased] into [5.0.1] — 2026-10-13 and stamp 5.0.1 with scripts/version-sync.sh. The 5.0.1 notes cover main through 501c6d9 (#1449), i.e. every PR after the v5.0.0 tag (6ad6add): the npm publish fix (5.0.0 never reached npm or crates.io, 5.0.1 is the first v5 there), #1465, #759, #1460, #1462, #1445, #869, #1447, #1450, #1467, and #1449 under Maintenance. CI/test-only PRs (#1448, #1452, #1454, #1457, #1459) have no entries. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * chore(release): 5.0.1 notes for PRs merged since the cut Covers #1469, #1470, #1474, #1475, #1478, #1479, #1480 and #1482; #1484 is CI-only. The notes now cover main through 285a5e8. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
LLM Description written by Claude Code:claude-opus-5-5
Refs #823 (slice 7 of the tracking issue; #823 stays open for the remaining files).
Problem
The VEX test suites spawned the built
socket-patchbinary with a bareCommand::newand their ownSOCKET_*sweep, and the sweeps differed from file to file:e2e_vex.rs,e2e_vex_redirect.rs,e2e_embedded_vex.rsand fivee2e_vex_lockfilecells kept an ambientSOCKET_NO_CONFIG(soSOCKET_NO_CONFIG=0in a dev shell reached the child), and the first three never forced telemetry off.bun.rsforcedSOCKET_NO_UPDATE_CHECK.e2e_vex_build/hatch.rs's twovendor --revertspawns scrubbed nothing at all.vex_e2e_common::run_vexhelper had its own copy of the sweep.Change (test-only)
e2e_vex_lockfile/{bun,cargo,golang,maven,npm,nuget,pnpm,poetry,uv,yarn}.rs,e2e_vex_build/{deno,hatch,poetry}.rs,e2e_vex.rs,e2e_vex_redirect.rsande2e_embedded_vex.rsnow spawn throughtests/common/hermetic.rs, and they leavePENDING_RAW_SPAWNS(92 → 76 on main).vex_e2e_common::run_vexuseshermetic::command(bin).vex_e2e_commonloadshermetic.rsaspub mod hermetic(with#[allow(clippy::duplicate_mod)], as the other shared modules do), soe2e_vex_build, which has nocommon, reaches it there.VIRTUAL_ENVremovals go throughhermetic::Extra::Venv. Opt-out env sets that the builder already forces are gone.SOCKET_NO_API_TOKEN=1stays where a file set it (caller env lands after the scrub).Not changed here, on purpose
POETRY_*sweeps (e2e_vex_lockfile/poetry.rs,e2e_vex_build/poetry.rs) and theUV_*sweep (e2e_vex_lockfile/uv.rs) stay for now. CI: hermetic spawns in in_process tests (#823) #1452 addsExtra::Poetry, and adding it here too would conflict. They can move ontoExtraonce CI: hermetic spawns in in_process tests (#823) #1452 lands.vex_e2e_common/uv.rsis still onPENDING_RAW_SPAWNS. Its list line is adjacent to lines CI: hermetic spawns in scan/vendor tests (#823) #1448 removes, so moving it now would cause a merge conflict. It goes in the next slice.CI cost
No workflow change. A lean PR run keeps the same ~28 Linux jobs and the same job-minutes, before and after.
Evidence
cargo test -p socket-patch-cli --all-features --no-run: every test target builds (allvex_e2e_commonusers included), with no rustc warnings.spawn_env_hygiene15/15, includingno_new_bare_binary_spawns.e2e_vex_lockfile345/345,e2e_vex40/40,e2e_vex_redirect52/52,e2e_embedded_vex34/34.e2e_vex_buildcompiles (its 16 tests are toolchain-gated#[ignore]).SOCKET_DRY_RUN=true SOCKET_JSON=true SOCKET_SILENT=true SOCKET_API_TOKEN=hostile SOCKET_API_URL/SOCKET_PROXY_URL=http://127.0.0.1:1 SOCKET_NO_CONFIG=0 SOCKET_NO_UPDATE_CHECK=0 SOCKET_ORG_SLUG=hostile SOCKET_ECOSYSTEMS=cargo SOCKET_OFFLINE=true SOCKET_VEX_PRODUCT=hostile SOCKET_VEX_NO_VERIFY=true VIRTUAL_ENV=/nonexistent) overe2e_vex_lockfile,e2e_vex,e2e_vex_redirectande2e_embedded_vex: all pass. I didn't run main under the same shell for comparison.cargo fmt --all -- --checkis clean.cargo clippyon these test targets reports only warnings that main already has (prebuilt_common,oracle.rsduplicate_mod,e2e_vex_build/poetry.rs:485). CI's clippy job doesn't lint test targets./code-review high
7 findings, no correctness bugs. Fixed in 68732af: the new
duplicate_modwarning, the dead opt-out sets ine2e_vex_redirect::vex_json_env, the inlineVIRTUAL_ENVremovals inhatch.rs, and the stalecli()doc comments. Not fixed: thePOETRY_*/UV_*sweeps andvex_e2e_common/uv.rs(reasons above), and a suggested sharedcli_command()helper. The four call sites set different extra env, so a helper wouldn't remove much code.🤖 Generated with Claude Code
https://claude.ai/code/session_01Wx5bWkf2EhmUyjqAXPj9fu
Generated by Claude Code