Skip to content

The agent that grows with you

test(install-e2e): collect install-side logs before the post-update smoke

ethernet3ccebf210414
diff --git a/tests/install/macos-desktop-e2e.sh b/tests/install/macos-desktop-e2e.sh
index 3467b0b8114..613ce8a80fa 100755
--- a/tests/install/macos-desktop-e2e.sh
+++ b/tests/install/macos-desktop-e2e.sh
@@ -405,6 +405,24 @@ PYEOF
got="$(git -C "$INSTALL_DIR" rev-parse HEAD)"
[ "$got" = "$HEAD_SHA" ] || fail "checkout is $got, expected HEAD ($HEAD_SHA)"
ok "checkout landed on HEAD ($HEAD_SHA)"
+
+ # Install-side state BEFORE the post-update smoke: on app-update legs the
+ # updater's own transcript is streamed into the app UI and otherwise lost,
+ # so snapshot every place it also lands (product logs, update hand-off
+ # files, the venv's entry-point dir) while the install is still there to
+ # inspect — the smoke assertion below can `fail` out of the driver, and the
+ # evidence must already be on disk when it does.
+ local ildest="$LOG_DIR/install-logs"
+ mkdir -p "$ildest"
+ cp -R "$HOME_SANDBOX/.hermes/logs" "$ildest/hermes-logs" 2>/dev/null || true
+ local ud="$HOME_SANDBOX/Library/Application Support/Hermes"
+ [ -d "$ud" ] && cp -R "$ud" "$ildest/desktop-userdata" 2>/dev/null || true
+ cp "$HERMES_HOME/.hermes-update-result.json" "$ildest" 2>/dev/null || true
+ ls -la "$HERMES_HOME" > "$ildest/hermes-home-ls.txt" 2>/dev/null || true
+ ls -la "$INSTALL_DIR/venv/bin" > "$ildest/venv-bin-ls.txt" 2>/dev/null || true
+ ls -la "$INSTALL_DIR/venv" > "$ildest/venv-ls.txt" 2>/dev/null || true
+ ok "collected install-side logs to $ildest"
+
"$INSTALL_DIR/venv/bin/hermes" --version 2>&1 | ts_prefix > "$LOG_DIR/version-head.log" \
|| fail "hermes --version failed after update"
ok "hermes --version works post-update"