test: harden macos release-to-dev smoke verification

This commit is contained in:
Peter Steinberger
2026-04-06 02:02:56 +01:00
parent 26c9885832
commit 9dfa4db76b
2 changed files with 20 additions and 5 deletions

View File

@@ -50,6 +50,7 @@ Use this skill for Parallels guest workflows and smoke interpretation. Do not lo
- Because the default upgrade lane no longer needs a host tgz, skip `npm pack` + host HTTP server startup for `--mode upgrade` unless `--target-package-spec` is set. Keep the pack/server path for `fresh` and `both`.
- If that release-to-dev lane fails with `reason=preflight-no-good-commit` and repeated `sh: pnpm: command not found` tails from `preflight build`, treat it as an updater regression first. The fix belongs in the git/dev updater bootstrap path, not in Parallels retry logic.
- Until the public stable train includes that updater bootstrap fix, the macOS release-to-dev lane may seed a temporary guest-local `pnpm` shim immediately before `openclaw update --channel dev`. Keep that workaround scoped to the smoke harness and remove it once the latest stable no longer needs it.
- After the package -> git switch, prefer post-update verification through explicit `node ~/openclaw/openclaw.mjs ...` calls. In Tahoe `prlctl exec --current-user` runs, the shebanged global `openclaw` wrapper can fail with `env: node: No such file or directory` even though the dev switch already succeeded.
- Default to the snapshot closest to `macOS 26.3.1 latest`.
- On Peter's Tahoe VM, `fresh-latest-march-2026` can hang in `prlctl snapshot-switch`; if restore times out there, rerun with `--snapshot-hint 'macOS 26.3.1 latest'` before blaming auth or the harness.
- `parallels-macos-smoke.sh` now retries `snapshot-switch` once after force-stopping a stuck running/suspended guest. If Tahoe still times out after that recovery path, then treat it as a real Parallels/host issue and rerun manually.

View File

@@ -561,12 +561,22 @@ guest_current_user_exec() {
guest_current_user_exec_path "$GUEST_EXEC_PATH" "$@"
}
guest_current_user_node_cli() {
guest_current_user_exec "$GUEST_NODE_BIN" "$@"
}
resolve_guest_current_user_home() {
local user_name
user_name="$(guest_current_user_exec /usr/bin/id -un | tr -d '\r')"
printf '/Users/%s\n' "$user_name"
}
resolve_guest_git_openclaw_entry() {
local guest_home
guest_home="$(resolve_guest_current_user_home)"
printf '%s/openclaw/openclaw.mjs\n' "$guest_home"
}
guest_current_user_cli() {
local parts=() arg joined=""
for arg in "$@"; do
@@ -691,22 +701,26 @@ ensure_guest_pnpm_for_dev_update() {
}
run_dev_channel_update() {
local bootstrap_bin guest_home update_root
local bootstrap_bin guest_home update_root update_entry
bootstrap_bin="/tmp/openclaw-smoke-pnpm-bootstrap/node_modules/.bin"
guest_home="$(resolve_guest_current_user_home)"
update_root="$guest_home/openclaw"
update_entry="$update_root/openclaw.mjs"
ensure_guest_pnpm_for_dev_update
printf 'update-dev: run\n'
guest_current_user_exec /bin/rm -rf "$update_root"
guest_current_user_exec_path "$bootstrap_bin:$GUEST_EXEC_PATH" \
"$GUEST_OPENCLAW_BIN" update --channel dev --yes --json
guest_current_user_exec "$GUEST_OPENCLAW_BIN" --version
guest_current_user_exec "$GUEST_OPENCLAW_BIN" update status --json
printf 'update-dev: git-version\n'
guest_current_user_node_cli "$update_entry" --version
printf 'update-dev: git-status\n'
guest_current_user_node_cli "$update_entry" update status --json
}
verify_dev_channel_update() {
local status_json
status_json="$(guest_current_user_exec "$GUEST_OPENCLAW_BIN" update status --json)"
local status_json update_entry
update_entry="$(resolve_guest_git_openclaw_entry)"
status_json="$(guest_current_user_node_cli "$update_entry" update status --json)"
printf '%s\n' "$status_json"
printf '%s\n' "$status_json" | grep -F '"installKind": "git"'
printf '%s\n' "$status_json" | grep -F '"value": "dev"'