From c662422dbada2b56c24711a398b60f19b6471289 Mon Sep 17 00:00:00 2001 From: Edgar Arakelyan Date: Tue, 17 Nov 2026 09:27:47 -0800 Subject: [PATCH] fix(release): the browser base's smoke starts it with init, as its image does #708 gave start-computer the subcommands init and xvfb, and the image's CMD runs start-computer init. The release's smoke of agentenv-ubuntu-24.04-browser still ran start-computer with no argument, which printed its usage and exited, so v0.9.1552's agent-build failed and agentenv-framework stayed off PyPI. A unit test now ties each base's smoke to its image's CMD. Co-Authored-By: Claude Opus 5.5 --- .github/scripts/infra_build.py | 2 +- tst/unit/test_infra_build_script.py | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/scripts/infra_build.py b/.github/scripts/infra_build.py index 33bd0377c..0201208cd 100644 --- a/.github/scripts/infra_build.py +++ b/.github/scripts/infra_build.py @@ -141,7 +141,7 @@ " done; supervisorctl -c /etc/supervisor/supervisord.conf status; exit 1"], "agentenv-ubuntu-24.04-browser": [ "docker", "run", "--rm", "--entrypoint", "sh", "{image}", "-c", - "start-computer & for _ in $(seq 60); do sleep 1;" + "start-computer init & for _ in $(seq 60); do sleep 1;" " s=$(supervisorctl -c /etc/supervisor/supervisord.conf status);" " echo \"$s\" | grep -q ' RUNNING ' && ! echo \"$s\" | grep -qv ' RUNNING ' && exit 0;" " done; supervisorctl -c /etc/supervisor/supervisord.conf status; exit 1"], diff --git a/tst/unit/test_infra_build_script.py b/tst/unit/test_infra_build_script.py index 3524662b1..9b61486e9 100644 --- a/tst/unit/test_infra_build_script.py +++ b/tst/unit/test_infra_build_script.py @@ -8,6 +8,7 @@ import configparser import hashlib import json +import re import subprocess import sys from pathlib import Path @@ -65,6 +66,17 @@ def test_its_images_are_the_ones_agent_env_ships(script): assert script.DISK_ARGS == {image.name: {arg: built.name for arg, built in image.args} for image in DISK_IMAGES} + +@pytest.mark.parametrize("name", ["agentenv-ubuntu-24.04", "agentenv-ubuntu-24.04-browser"]) +def test_a_base_computers_smoke_starts_it_as_its_image_does(script, name): + """A base's smoke starts it with its image's own CMD, so a change to that start can't leave the release's smoke, + which no pull request runs, starting it another way.""" + dockerfile = (REPO / script.IMAGES[name]).read_text() + command = json.loads(re.search(r"^CMD (\[.*\])$", dockerfile, re.MULTILINE).group(1)) + start = " ".join([Path(command[0]).name, *command[1:]]) + + assert script._SMOKES[name][-1].startswith(f"{start} & "), script._SMOKES[name][-1] + def test_check_accepts_every_image_the_plan_lists(script, monkeypatch, capsys): plan = load_script("infra_images.py")