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 scan/policy/network suites (#823) by mikolalysenko · Pull Request #1515 · 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 16: scan, socket.yml policy and apply-network suites). Uses Refs, so #823 stays open for the remaining PENDING_RAW_SPAWNS files.

Summary

e2e_scan.rs, e2e_socket_yml_policy.rs and apply/apply_network.rs now spawn socket-patch through tests/common/hermetic.rs and leave PENDING_RAW_SPAWNS (12 → 9 on main; 6 once #1510 also lands, and the two edits don't touch adjacent lines). The ratchet in spawn_env_hygiene.rs keeps them hermetic. Test-only; no product code and no workflow changes.

Root cause

Each file started the CLI with a bare Command::new and its own SOCKET_* handling, which had drifted from the shared builder:

  • apply_network removed only SOCKET_API_TOKEN in 8 of its 9 spawns. On main, a shell that exports SOCKET_DRY_RUN=true SOCKET_ECOSYSTEMS=cargo fails 9 of its tests.
  • All three sweeps let an ambient SOCKET_NO_CONFIG=0 through, so a developer's real socket login could reach the child, and none of them forced the update check off.
  • The policy suite's fixture includes a gem but never scrubbed BUNDLE_*. It now uses Extra::Venv + Extra::Bundle.
  • e2e_scan's npm children now drop ambient SOCKET_* too.

Two coverage fixes so the move doesn't weaken guards (from /code-review):

  • offline_apply_with_token_makes_zero_network_requests: the builder forces telemetry off, which would hide a telemetry POST under --offline. The test sets SOCKET_TELEMETRY_DISABLED=0. Checked by removing is_offline_env() from is_telemetry_disabled: the test fails with mock server saw: ["POST /patch/telemetry"].
  • apply_uses_locally_cached_blob_without_fetching pinned only SOCKET_API_URL to a dead port, but with no token the child uses the public proxy. It now pins SOCKET_PROXY_URL as well.

Test evidence

  • Red, without the conversions (only the PENDING_RAW_SPAWNS removal) and with a hostile shell (SOCKET_DRY_RUN=true SOCKET_ECOSYSTEMS=cargo SOCKET_ORG_SLUG=hostile SOCKET_NO_CONFIG=0): spawn_env_hygiene fails no_new_bare_binary_spawns for all 3 files, and apply fails 9 apply_network tests.
  • Green under the same hostile shell (plus VIRTUAL_ENV=/nonexistent): apply 135/135, e2e_socket_yml_policy 26/26, spawn_env_hygiene 16/16, e2e_scan non-ignored 20/20.
  • e2e_scan's 11 #[ignore]d live-API tests need patches-api.socket.dev, which the agent sandbox can't reach, so they weren't run. CI doesn't run them on PRs either.
  • cargo fmt --all -- --check and cargo clippy --locked --workspace --all-features -- -D warnings are clean. The test-target clippy notes are all pre-existing in prebuilt_common.

/code-review high

Fixed: the telemetry guard, the proxy pin, Extra::Venv in the pypi test, and the e2e_scan comment. Not fixed:

  • Moving e2e_scan's private run / npm_run / assert_run_ok onto the common copies, and scrubbing SOCKET_* inside common::run_toolchain for every package-manager child: both are refactors of common beyond this slice. They're worth a follow-up slice under Spawn every CLI test child through one hermetic Command builder; 10 test files inherit ambient SOCKET_* today #823.
  • Empty start commit: the claim protocol requires it, and squash-merge drops it.

CI cost

No workflow changes. A lean PR run is the same before and after (~28 Linux jobs, ~8 min).

🤖 Generated with Claude Code

https://claude.ai/code/session_01NSWn8iEQppkpg6sqyjhEx6


Generated by Claude Code

Sorry, something went wrong.

Uh oh!

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

All reactions
@claude
Start hermetic slice for #823
5d5fbb2
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 02:01
@claude
Spawn scan, policy and network tests hermetically
d4d852a
e2e_scan, e2e_socket_yml_policy and apply/apply_network started
socket-patch with a bare Command::new and their own SOCKET_* sweeps.
apply_network only removed SOCKET_API_TOKEN in most tests, so a
developer shell exporting SOCKET_DRY_RUN or SOCKET_ECOSYSTEMS failed 9
of its tests. All three sweeps let an ambient SOCKET_NO_CONFIG=0
through, so a real `socket login` could reach the child, and none
forced the update check off.

All three now spawn through hermetic::command. The policy suite also
scrubs Bundler env, since its fixture includes a gem. The npm children
in e2e_scan drop ambient SOCKET_* too. The files leave
PENDING_RAW_SPAWNS, so the spawn_env_hygiene ratchet keeps them
hermetic.

Refs #823

Assisted-by: Claude Code:claude-opus-5-5
@claude
Keep network and telemetry guards in apply tests
88407b9
The shared builder forces telemetry off and removes the API token. The
offline airgap test then no longer showed that --offline alone keeps
telemetry away from the mock. It turns telemetry back on, so it fails
again if offline runs ever POST telemetry (checked by removing the
offline term from is_telemetry_disabled).

The cached-blob test only pointed SOCKET_API_URL at a dead port. With
no token the child uses the public proxy, so a regressed fetch could
reach the real proxy and still pass. Pin SOCKET_PROXY_URL too. The
pypi test uses Extra::Venv instead of a hand-written VIRTUAL_ENV
removal.

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 02:05
@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 88407b9. 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) mentioned this pull request Oct 14, 2026
CI: hermetic spawns in vex-vendor/rollback suites (#823) #1518
Merged
@mikolalysenko Mikola Lysenko (mikolalysenko) added the Ready for review Agent-verified: mergeable, CI green, Bugbot clean — awaiting human review label Oct 14, 2026
@mikolalysenko

Mikola Lysenko (mikolalysenko) commented Oct 14, 2026

Copy link
Copy Markdown
Collaborator Author

Ready for review at 88407b95577d5e9d19677bedd68fba060200dd58.

  • CI: 86/86 check runs green or skipped, no failures; mergeable (clean).
  • Bugbot: reviewed 88407b9, no findings.
  • Already approved by Tanmay Singla (@Tanmay182003) on this head. No CHANGELOG changes.
  • Scope: test-only (e2e_scan, e2e_socket_yml_policy, apply_network, spawn_env_hygiene). This moves those suites onto the shared hermetic spawn builder for Spawn every CLI test child through one hermetic Command builder; 10 test files inherit ambient SOCKET_* today #823. Reviewers should check that the network and telemetry guards in apply_network.rs still apply.

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) added this pull request to the merge queue Oct 14, 2026
Merged via the queue into main with commit a5ddcf7 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-scan-policy-network branch October 14, 2026 03:57
This was referenced Oct 14, 2026
CI: hermetic spawns in the e2e_maven suite (#823) #1519
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

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.