Stabilize daemon reconnect and Rosetta package startup tests (#55274)

## Why

A replacement daemon PID can appear before the TUI observes the disconnect, allowing stale UI content to make the startup test advance too early. Cold Rosetta translation can also consume the startup deadlines for freshly extracted Intel macOS packages on Apple Silicon.

## What changed

- Wait for the reconnect transcript clear before sending `/status` in the daemon startup test.
- Warm both packaged CLI and app-server entrypoints with `--help` when testing `x86_64-apple-darwin` packages on `arm64` hosts. Give each warmup 180 seconds and fail fixture setup if either entrypoint cannot run.

GitOrigin-RevId: ce75201a7773ebb55cc060ca04b09ec2d0ccf303
This commit is contained in:
jif
2026-10-19 12:57:15 +00:00
committed by copyberry
parent d28be12577
commit 4635d48925
2 changed files with 23 additions and 1 deletions
+17 -1
View File
@@ -1,6 +1,7 @@
import gzip
import json
import os
import platform
import subprocess
import tarfile
from collections.abc import Iterator
@@ -150,13 +151,28 @@ def package(
capture_output=True,
text=True,
)
return SmokePackage.from_archives(
package = SmokePackage.from_archives(
directory,
target,
request.config.getoption("cli_archive"),
request.config.getoption("app_server_archive"),
compression,
)
if target == "x86_64-apple-darwin" and platform.machine() == "arm64":
# Freshly extracted Intel binaries need cold Rosetta translation before
# the command and SDK startup deadlines begin. Keep startup bounded and
# fail setup if either packaged entrypoint cannot run.
for executable in (package.cli, package.app_server):
subprocess.run(
[str(executable), "--help"],
cwd=package.directory,
env=package.environment,
check=True,
text=True,
capture_output=True,
timeout=180,
)
return package
@pytest.fixture