mirror of
https://github.com/moltbot/moltbot.git
synced 2026-04-21 13:44:03 +00:00
fix: pin parallels version checks to packed build commit
This commit is contained in:
@@ -16,6 +16,7 @@ Use this skill for Parallels guest workflows and smoke interpretation. Do not lo
|
||||
- Pass `--json` for machine-readable summaries.
|
||||
- Per-phase logs land under `/tmp/openclaw-parallels-*`.
|
||||
- Do not run local and gateway agent turns in parallel on the same fresh workspace or session.
|
||||
- If `main` is moving under active multi-agent work, prefer a detached worktree pinned to one commit for long Parallels suites. The smoke scripts now verify the packed tgz commit instead of live `git rev-parse HEAD`, but a pinned worktree still avoids noisy rebuild/version drift during reruns.
|
||||
- For `prlctl exec`, pass the VM name before `--current-user` (`prlctl exec "$VM" --current-user ...`), not the other way around.
|
||||
- If the workflow installs OpenClaw from a repo checkout instead of the site installer/npm release, finish by installing a real guest CLI shim and verifying it in a fresh guest shell. `pnpm openclaw ...` inside the repo is not enough for handoff parity.
|
||||
- On macOS guests, prefer a user-global install plus a stable PATH-visible shim:
|
||||
|
||||
@@ -22,6 +22,7 @@ KEEP_SERVER=0
|
||||
SNAPSHOT_ID=""
|
||||
SNAPSHOT_STATE=""
|
||||
SNAPSHOT_NAME=""
|
||||
PACKED_MAIN_COMMIT_SHORT=""
|
||||
|
||||
MAIN_TGZ_DIR="$(mktemp -d)"
|
||||
MAIN_TGZ_PATH=""
|
||||
@@ -59,6 +60,10 @@ artifact_label() {
|
||||
printf 'current main tgz'
|
||||
}
|
||||
|
||||
extract_package_build_commit_from_tgz() {
|
||||
tar -xOf "$1" package/dist/build-info.json | python3 -c 'import json, sys; print(json.load(sys.stdin).get("commit", ""))'
|
||||
}
|
||||
|
||||
warn() {
|
||||
printf 'warn: %s\n' "$*" >&2
|
||||
}
|
||||
@@ -465,7 +470,7 @@ extract_package_version_from_tgz() {
|
||||
}
|
||||
|
||||
pack_main_tgz() {
|
||||
local short_head pkg
|
||||
local short_head pkg packed_commit
|
||||
if [[ -n "$TARGET_PACKAGE_SPEC" ]]; then
|
||||
say "Pack target package tgz: $TARGET_PACKAGE_SPEC"
|
||||
pkg="$(
|
||||
@@ -487,6 +492,9 @@ pack_main_tgz() {
|
||||
)"
|
||||
MAIN_TGZ_PATH="$MAIN_TGZ_DIR/openclaw-main-$short_head.tgz"
|
||||
cp "$MAIN_TGZ_DIR/$pkg" "$MAIN_TGZ_PATH"
|
||||
packed_commit="$(extract_package_build_commit_from_tgz "$MAIN_TGZ_PATH")"
|
||||
[[ -n "$packed_commit" ]] || die "failed to read packed build commit from $MAIN_TGZ_PATH"
|
||||
PACKED_MAIN_COMMIT_SHORT="${packed_commit:0:7}"
|
||||
say "Packed $MAIN_TGZ_PATH"
|
||||
tar -xOf "$MAIN_TGZ_PATH" package/dist/build-info.json
|
||||
}
|
||||
@@ -496,7 +504,8 @@ verify_target_version() {
|
||||
verify_version_contains "$TARGET_EXPECT_VERSION"
|
||||
return
|
||||
fi
|
||||
verify_version_contains "$(git rev-parse --short=7 HEAD)"
|
||||
[[ -n "$PACKED_MAIN_COMMIT_SHORT" ]] || die "packed main commit not captured"
|
||||
verify_version_contains "$PACKED_MAIN_COMMIT_SHORT"
|
||||
}
|
||||
|
||||
start_server() {
|
||||
@@ -787,7 +796,7 @@ SUMMARY_JSON_PATH="$(
|
||||
SUMMARY_LATEST_VERSION="$LATEST_VERSION" \
|
||||
SUMMARY_INSTALL_VERSION="$INSTALL_VERSION" \
|
||||
SUMMARY_TARGET_PACKAGE_SPEC="$TARGET_PACKAGE_SPEC" \
|
||||
SUMMARY_CURRENT_HEAD="$(git rev-parse --short HEAD)" \
|
||||
SUMMARY_CURRENT_HEAD="${PACKED_MAIN_COMMIT_SHORT:-$(git rev-parse --short HEAD)}" \
|
||||
SUMMARY_RUN_DIR="$RUN_DIR" \
|
||||
SUMMARY_DAEMON_STATUS="$DAEMON_STATUS" \
|
||||
SUMMARY_FRESH_MAIN_STATUS="$FRESH_MAIN_STATUS" \
|
||||
|
||||
@@ -1290,7 +1290,7 @@ SUMMARY_JSON_PATH="$(
|
||||
SUMMARY_LATEST_VERSION="$LATEST_VERSION" \
|
||||
SUMMARY_INSTALL_VERSION="$INSTALL_VERSION" \
|
||||
SUMMARY_TARGET_PACKAGE_SPEC="$TARGET_PACKAGE_SPEC" \
|
||||
SUMMARY_CURRENT_HEAD="$(git rev-parse --short HEAD)" \
|
||||
SUMMARY_CURRENT_HEAD="${PACKED_MAIN_COMMIT_SHORT:-$(git rev-parse --short HEAD)}" \
|
||||
SUMMARY_RUN_DIR="$RUN_DIR" \
|
||||
SUMMARY_FRESH_MAIN_STATUS="$FRESH_MAIN_STATUS" \
|
||||
SUMMARY_FRESH_MAIN_VERSION="$FRESH_MAIN_VERSION" \
|
||||
|
||||
@@ -22,6 +22,7 @@ CHECK_LATEST_REF=1
|
||||
SNAPSHOT_ID=""
|
||||
SNAPSHOT_STATE=""
|
||||
SNAPSHOT_NAME=""
|
||||
PACKED_MAIN_COMMIT_SHORT=""
|
||||
|
||||
MAIN_TGZ_DIR="$(mktemp -d)"
|
||||
MAIN_TGZ_PATH=""
|
||||
@@ -62,6 +63,10 @@ artifact_label() {
|
||||
printf 'current main tgz'
|
||||
}
|
||||
|
||||
extract_package_build_commit_from_tgz() {
|
||||
tar -xOf "$1" package/dist/build-info.json | python3 -c 'import json, sys; print(json.load(sys.stdin).get("commit", ""))'
|
||||
}
|
||||
|
||||
warn() {
|
||||
printf 'warn: %s\n' "$*" >&2
|
||||
}
|
||||
@@ -736,7 +741,7 @@ ensure_guest_git() {
|
||||
}
|
||||
|
||||
pack_main_tgz() {
|
||||
local mingit_name mingit_url short_head pkg
|
||||
local mingit_name mingit_url short_head pkg packed_commit
|
||||
if [[ -n "$TARGET_PACKAGE_SPEC" ]]; then
|
||||
say "Pack target package tgz: $TARGET_PACKAGE_SPEC"
|
||||
mapfile -t mingit_meta < <(resolve_mingit_download)
|
||||
@@ -776,6 +781,9 @@ pack_main_tgz() {
|
||||
)"
|
||||
MAIN_TGZ_PATH="$MAIN_TGZ_DIR/openclaw-main-$short_head.tgz"
|
||||
cp "$MAIN_TGZ_DIR/$pkg" "$MAIN_TGZ_PATH"
|
||||
packed_commit="$(extract_package_build_commit_from_tgz "$MAIN_TGZ_PATH")"
|
||||
[[ -n "$packed_commit" ]] || die "failed to read packed build commit from $MAIN_TGZ_PATH"
|
||||
PACKED_MAIN_COMMIT_SHORT="${packed_commit:0:7}"
|
||||
say "Packed $MAIN_TGZ_PATH"
|
||||
tar -xOf "$MAIN_TGZ_PATH" package/dist/build-info.json
|
||||
}
|
||||
@@ -785,7 +793,8 @@ verify_target_version() {
|
||||
verify_version_contains "$TARGET_EXPECT_VERSION"
|
||||
return
|
||||
fi
|
||||
verify_version_contains "$(git rev-parse --short=7 HEAD)"
|
||||
[[ -n "$PACKED_MAIN_COMMIT_SHORT" ]] || die "packed main commit not captured"
|
||||
verify_version_contains "$PACKED_MAIN_COMMIT_SHORT"
|
||||
}
|
||||
|
||||
start_server() {
|
||||
@@ -1199,7 +1208,7 @@ SUMMARY_JSON_PATH="$(
|
||||
SUMMARY_LATEST_VERSION="$LATEST_VERSION" \
|
||||
SUMMARY_INSTALL_VERSION="$INSTALL_VERSION" \
|
||||
SUMMARY_TARGET_PACKAGE_SPEC="$TARGET_PACKAGE_SPEC" \
|
||||
SUMMARY_CURRENT_HEAD="$(git rev-parse --short HEAD)" \
|
||||
SUMMARY_CURRENT_HEAD="${PACKED_MAIN_COMMIT_SHORT:-$(git rev-parse --short HEAD)}" \
|
||||
SUMMARY_RUN_DIR="$RUN_DIR" \
|
||||
SUMMARY_FRESH_MAIN_STATUS="$FRESH_MAIN_STATUS" \
|
||||
SUMMARY_FRESH_MAIN_VERSION="$FRESH_MAIN_VERSION" \
|
||||
|
||||
Reference in New Issue
Block a user