diff --git a/packages/agentenv-protocol/tests/test_computer_queue.py b/packages/agentenv-protocol/tests/test_computer_queue.py index fdf6e1f36..c7f81519c 100644 --- a/packages/agentenv-protocol/tests/test_computer_queue.py +++ b/packages/agentenv-protocol/tests/test_computer_queue.py @@ -407,11 +407,12 @@ async def test_a_screenshot_that_fails_after_the_input_reports_the_input_as_done @pytest.mark.asyncio async def test_the_automatic_release_waits_out_a_busy_queue(): - driver = FakeDriver(settings=ComputerSettings(max_hold_ms=50, queue_wait_s=0.05)) + # A hold longer than a loaded runner's round trip lets the drag take the queue first; the drag outlasts the hold. + driver = FakeDriver(settings=ComputerSettings(max_hold_ms=300, queue_wait_s=0.05)) async with mcp_session(driver) as session: await _shot(session) await session.call_tool("computer_keyboard_down", {"keys": ["Alt"]}) - driver.slow["drag"] = 0.4 + driver.slow["drag"] = 1.0 await session.call_tool("computer_drag", {"path": [[1, 1], [9, 9]]}) with anyio.fail_after(5): while driver.screen.held: diff --git a/src/agent_env/agents/agents/claude-code/install.sh b/src/agent_env/agents/agents/claude-code/install.sh index ec0ea30ce..fe35f29be 100755 --- a/src/agent_env/agents/agents/claude-code/install.sh +++ b/src/agent_env/agents/agents/claude-code/install.sh @@ -75,7 +75,8 @@ if ! on 'for shell in bash zsh; do command -v "$shell" >/dev/null && exit 0; don fi sha256() { if command -v sha256sum >/dev/null; then sha256sum "$1"; else shasum -a 256 "$1"; fi | cut -d' ' -f1; } -fetch() { curl -fsSL --retry 3 "$1" -o "$2"; } +# One more go when curl fails: --retry passes over some transient failures, such as a reset HTTP/2 stream (exit 92). +fetch() { curl -fsSL --retry 3 "$1" -o "$2" || { sleep 2; curl -fsSL --retry 3 "$1" -o "$2"; }; } checked() { # checked FILE SHA256: FILE is what was published, or the install stops [ "$(sha256 "$1")" = "$2" ] || { echo "$(basename "$1") doesn't match its published checksum" >&2; exit 1; } } diff --git a/src/agent_env/agents/agents/codex/install.sh b/src/agent_env/agents/agents/codex/install.sh index 7e43520ab..247328b84 100755 --- a/src/agent_env/agents/agents/codex/install.sh +++ b/src/agent_env/agents/agents/codex/install.sh @@ -78,7 +78,8 @@ if ! on 'command -v bash >/dev/null'; then fi sha256() { if command -v sha256sum >/dev/null; then sha256sum "$1"; else shasum -a 256 "$1"; fi | cut -d' ' -f1; } -fetch() { curl -fsSL --retry 3 "$1" -o "$2"; } +# One more go when curl fails: --retry passes over some transient failures, such as a reset HTTP/2 stream (exit 92). +fetch() { curl -fsSL --retry 3 "$1" -o "$2" || { sleep 2; curl -fsSL --retry 3 "$1" -o "$2"; }; } checked() { # checked FILE SHA256: FILE is what was published, or the install stops [ "$(sha256 "$1")" = "$2" ] || { echo "$(basename "$1") doesn't match its published checksum" >&2; exit 1; } } diff --git a/src/agent_env/agents/agents/gemini/install.sh b/src/agent_env/agents/agents/gemini/install.sh index 97c2e5c78..9f7b00d1a 100755 --- a/src/agent_env/agents/agents/gemini/install.sh +++ b/src/agent_env/agents/agents/gemini/install.sh @@ -78,7 +78,8 @@ if ! on 'command -v bash >/dev/null'; then fi sha256() { if command -v sha256sum >/dev/null; then sha256sum "$1"; else shasum -a 256 "$1"; fi | cut -d' ' -f1; } -fetch() { curl -fsSL --retry 3 "$1" -o "$2"; } +# One more go when curl fails: --retry passes over some transient failures, such as a reset HTTP/2 stream (exit 92). +fetch() { curl -fsSL --retry 3 "$1" -o "$2" || { sleep 2; curl -fsSL --retry 3 "$1" -o "$2"; }; } checked() { # checked FILE SHA256: FILE is what was published, or the install stops [ "$(sha256 "$1")" = "$2" ] || { echo "$(basename "$1") doesn't match its published checksum" >&2; exit 1; } } diff --git a/src/agent_env/agents/agents/letta-code/install.sh b/src/agent_env/agents/agents/letta-code/install.sh index 7197ad116..ee3fd9fd2 100644 --- a/src/agent_env/agents/agents/letta-code/install.sh +++ b/src/agent_env/agents/agents/letta-code/install.sh @@ -87,7 +87,8 @@ if ! on 'command -v git >/dev/null'; then fi sha256() { if command -v sha256sum >/dev/null; then sha256sum "$1"; else shasum -a 256 "$1"; fi | cut -d' ' -f1; } -fetch() { curl -fsSL --retry 3 "$1" -o "$2"; } +# One more go when curl fails: --retry passes over some transient failures, such as a reset HTTP/2 stream (exit 92). +fetch() { curl -fsSL --retry 3 "$1" -o "$2" || { sleep 2; curl -fsSL --retry 3 "$1" -o "$2"; }; } checked() { # checked FILE SHA256: FILE is what was published, or the install stops [ "$(sha256 "$1")" = "$2" ] || { echo "$(basename "$1") doesn't match its published checksum" >&2; exit 1; } } diff --git a/src/agent_env/agents/agents/opencode/install.sh b/src/agent_env/agents/agents/opencode/install.sh index 47b82ae29..678ff410f 100755 --- a/src/agent_env/agents/agents/opencode/install.sh +++ b/src/agent_env/agents/agents/opencode/install.sh @@ -78,7 +78,8 @@ if ! on 'command -v bash >/dev/null'; then fi sha256() { if command -v sha256sum >/dev/null; then sha256sum "$1"; else shasum -a 256 "$1"; fi | cut -d' ' -f1; } -fetch() { curl -fsSL --retry 3 "$1" -o "$2"; } +# One more go when curl fails: --retry passes over some transient failures, such as a reset HTTP/2 stream (exit 92). +fetch() { curl -fsSL --retry 3 "$1" -o "$2" || { sleep 2; curl -fsSL --retry 3 "$1" -o "$2"; }; } checked() { # checked FILE SHA256: FILE is what was published, or the install stops [ "$(sha256 "$1")" = "$2" ] || { echo "$(basename "$1") doesn't match its published checksum" >&2; exit 1; } } diff --git a/tst/integration/task_step/test_register_env_triggers_local.py b/tst/integration/task_step/test_register_env_triggers_local.py index eb32ad96c..69f7ad533 100644 --- a/tst/integration/task_step/test_register_env_triggers_local.py +++ b/tst/integration/task_step/test_register_env_triggers_local.py @@ -163,9 +163,11 @@ async def test_a_reply_waits_its_delay_and_hours_and_its_writes_name_the_fire(it paced = [e for e in state["events"] if e["kind"] in ("delayed", "deferred", "action_ok")] assert [e["kind"] for e in paced] == ["delayed", "deferred", "action_ok"] - delayed, deferred, _ = paced + _, deferred, _ = paced assert deferred["until"] == "2026-10-14T09:00:00Z" - assert (_virtual(deferred) - _virtual(delayed)).total_seconds() >= 120 + detected = next(e for e in state["events"] if e["kind"] == "detected" and e["trigger_id"] == "bob-hears-solver") + # The delay runs from the provoking call, read as it's detected, whose stamp can trail that reading a little at 60x. + assert (_virtual(deferred) - _virtual(detected)).total_seconds() >= 119 calls = [e for e in trajectory if e.get("event_type") == "tool_call"] cause = [{"trigger_id": "bob-hears-solver", "action_index": 0, "fire": 1}] assert ("list_items", "default", None) in [(e["tool_call"]["function_name"], e["role"], e.get("caused_by"))