Skip to content

fix(tests): Parallels snapshot checks unexpectedly contact npm - #130638

Merged
steipete merged 1 commit into
mainfrom
codex/parallels-snapshot-offline-20260826
Aug 27, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/parallels-snapshot-offline-20260826

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Resolves a problem where the Parallels macOS snapshot restoration checks fail before reaching the VM when npm is installed through Homebrew. Both powered-on and powered-off snapshot cases attempted a real lookup of the fixture package [email protected], which returns E404.

Related: #129788 (snapshot session preservation) and #129861 (network-free macOS upgrade preparation).

Why This Change Was Made

The fixture selected a registry target and intercepted npm only when its entrypoint ended in npm-cli.js. The supported bare-npm runner can instead launch a Homebrew entrypoint named npm, so that interception was incomplete. The default upgrade path already needs no host package lookup; use that canonical path and delete the obsolete npm preload/package override. An explicit assertion now confirms that the test reaches the intended guest-command failure after restoration.

User Impact

No product runtime changes. Developers can run the snapshot checks without an external npm dependency, while retaining coverage that powered-on snapshots resume their saved session and powered-off snapshots start normally.

Evidence

On main commit 4b287caac326dd3a8b081754b61421cdb7120b98, both snapshot cases reproduced npm E404 before restoration. After this change, both pass and the original five-suite execution order passes all 155 tests:

node scripts/run-vitest.mjs test/scripts/parallels-phase-runner.test.ts test/scripts/parallels-smoke-model.test.ts test/scripts/parallels-update-job-timeout.test.ts test/scripts/parallels-npm-update-smoke.test.ts test/scripts/parallels-windows-git.test.ts
node scripts/check-changed.mjs -- test/scripts/parallels-smoke-model.test.ts
git diff --check

The changed gate passed test-root typechecking and script linting. Independent Codex autoreview reported no actionable findings. A live npm invocation probe confirmed the Homebrew entrypoint naming that caused the original fixture to miss interception. Separate real Parallels product smoke runs are in progress and are not claimed as completed evidence for this test-only change.

Production LOC: +0/-0. Tests: +2/-14 (net -12). No configuration, dependency, persistence, or protocol changes. AI-assisted.

@clawsweeper

clawsweeper Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@openclaw-barnacle openclaw-barnacle Bot added size: XS maintainer Maintainer-authored PR labels Aug 27, 2026
@steipete
steipete marked this pull request as ready for review August 27, 2026 03:05
@steipete

Copy link
Copy Markdown
Contributor Author

The snapshot-test repair is ready to land at e894d744ecb33031ebc812ba08d1a43f700208a2.

Both snapshot cases failed before the change with a real npm E404; afterward the same five-suite order passes all 155 tests. node scripts/check-changed.mjs -- test/scripts/parallels-smoke-model.test.ts and git diff --check passed, and independent Codex autoreview found no actionable issues. Production LOC is unchanged; tests are +2/-14. The clean fix removes obsolete npm setup from the snapshot boundary rather than changing npm resolution or weakening restoration assertions.

Exact-head CI run 33035280497 completed successfully, including openclaw/ci-gate. Native review artifacts validate. The latest ClawSweeper comment is still its review-in-progress placeholder and contains no findings or rank-up moves yet; its eventual review is not being represented as completed proof.

Separate live Parallels product runs found candidate companion-package and Windows Node-baseline issues; those are being repaired separately and are not hidden by this test-only PR. No live VM product pass is claimed here.

@steipete
steipete merged commit 4041937 into main Aug 27, 2026
157 checks passed
@steipete
steipete deleted the codex/parallels-snapshot-offline-20260826 branch August 27, 2026 03:19
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant