You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
slow-agent-device: two same-named sessions test times out on first snapshot in a full lane run #1581
e2e/slow-agent-device.test.ts > agent-device through simlock (iOS) > with the device limit raised to 2 > "keeps two same-named sessions apart: a runner's lease boots, survives closes, serves a new session and ends on release" timed out in 2 of 3 full lane runs on 2026-11-15. The error is agent-device COMMAND_FAILED "Daemon request timed out" (daemon_transport_timeout, 90000 ms), on the first snapshot after boot, at e2e/slow-agent-device.test.ts:788 (e2e/helpers/agent-device-targets.ts:128).
Run alone, it passes: in 191 s on main 6dcbd34, and in 178 s and 165 s on #1573's branch. It fails only inside the full lane, right after the two-device test's load. That points to a time limit too tight under load, or to ordering between tests. It has not been shown to fail on main in a full lane run.
Logs: /var/folders/tb/j39z273s5kn7lb9tz1dhk8l00000gn/T//simlock-slow-e2e-20261115-170630.log, /var/folders/tb/j39z273s5kn7lb9tz1dhk8l00000gn/T//simlock-slow-e2e-20261115-180422.log. The agent-device ndjson log is deleted when the lane home is cleaned, so what the daemon was waiting on is unknown. Keeping that log when a test fails would show it next time.
164529 task-1569 full pass 188 s
170630 task-1569 full FAIL 178 s
172336 task-1569 -t pass 165 s
173004 task-1569 full pass 182 s
180422 task-1569 full FAIL 175 s
190007 base -t pass 191 s
The 90 s limit is agent-device's, not the e2e's. Raising FIRST_SNAPSHOT changes nothing:
Unproven: the previous test's afterEach replaces both devices just before this test, so the runner may start on new copies under load.
Blocked on: a slow-lane run of e2e/slow-agent-device.test.ts e2e/slow-ios-window.test.ts e2e/slow-baseline.test.ts on main, 2–3 times. If it fails, keep ~/.sls/simlock-ad-* for the ndjson log.
scripts/slow-e2e.sh e2e/slow-agent-device.test.ts e2e/slow-ios-window.test.ts e2e/slow-baseline.test.ts on main 06ff865, 3 times, agent-device 0.21.36 (= the pin):
115027 pass 215 s
123643 FAIL 182 s COMMAND_FAILED daemon_transport_timeout 90000 ms, first snapshot (agent-device-targets.ts:128)
132431 pass 215 s
So it fails on main too, about 1 run in 3. In the failing run a second iOS test hit the same 90 s timeout on a snapshot: "after an accepted upload install and snapshot, install from a remote: path, ... are refused ..." (149 s).
The ndjson log was lost again: the lane's temp dir is /tmp/simlock-slow/, not ~/.sls/, and the agent's home is deleted right after the failure.
Other failures in these runs, not this bug: the Android simlock-kill test (all 3 runs, #1578) and the iOS window test's "front app changed" (runs 1 and 3, someone was using the Mac).
The cause is narrower than "too tight under load": the e2e never gives agent-device more than 90 s. FIRST_SNAPSHOT only sets the CLI process timeout. When this test passes, its first snapshot takes 85–88 s, so a 91 s one fails.
e2e/helpers/agent-device-targets.test.ts > FIRST_SNAPSHOT > "an agent's snapshot run with FIRST_SNAPSHOT reaches agent-device's daemon with a 150000 ms budget". The pinned CLI talks to a stand-in daemon that records the call. It skips without SIMLOCK_E2E_AGENT_DEVICE.
SIMLOCK_E2E_AGENT_DEVICE=<pinned agent-device.mjs> pnpm test:e2e e2e/helpers/agent-device-targets.test.ts
AssertionError: expected undefined to be 150000 (agent-device-targets.test.ts:92)
This test's first snapshot, read from the lane's simlock daemon.log (POST /v1/agent-device/rpc):
115027 84654 ms 200
132431 87778 ms 200
123643 90061 ms 500 (same run, "after an accepted upload": 90016 ms 500)
17 Nov: 2 more at 90037 / 90042 ms 500, many at 60-88 s 200
Root cause
Defect in the test helper. e2e/helpers/agent-device-targets.ts:78 sets FIRST_SNAPSHOT = { timeout: 180_000 }, which is only the process timeout (e2e/helpers/agent-device.ts:159). The snapshot is sent with no --timeout, so agent-device 0.21.36 keeps its default 90 s request limit (packages/command-registry/src/timeout-policy.ts:7). Only --timeout raises it (registry.ts:451). At 90 s the client gives up and simlock relays agent-device's 500. It shows at slow-agent-device.test.ts:788 and :337, but every FIRST_SNAPSHOT call has it. The helper's comment is out of date.
Simplest fix
FIRST_SNAPSHOT = { timeout: 180_000, flags: ["--timeout", "150000"] }. Add AgentDeviceRunOptions.flags and append it after the args in both Agent.runs (agent-device.ts:159, :254). Call sites stay as they are.
Merged: none
Parked: #1581 — fast track held: "One fix: no — agent-device could raise its own first-snapshot default"; needs the maintainer to pick the fix (e2e --timeout on the first snapshot, or an agent-device default change) and set bug:ready.
Waiting: none
Decided: #1581 — blocker met by 3 lane runs on main (1 failed) → moved bug:blocked to bug:new and triaged; flaky-test kept.
Activity
V3RON commentedon Nov 15, 2026
Handoff
Done: read the lane logs that ran this test. Only the slow lane reproduces it, so there is no test and no branch.
Not done: reproduction, root cause, fix.
Findings
Every full-lane run used feat(ios): sources live in a folder as long as the device set #1573's open branch. No full lane has run on main (testing rule 5):
The 90 s limit is agent-device's, not the e2e's. Raising
FIRST_SNAPSHOTchanges nothing:Unproven: the previous test's
afterEachreplaces both devices just before this test, so the runner may start on new copies under load.Blocked on: a slow-lane run of
e2e/slow-agent-device.test.ts e2e/slow-ios-window.test.ts e2e/slow-baseline.test.tson main, 2–3 times. If it fails, keep~/.sls/simlock-ad-*for the ndjson log.Written by an agent.
V3RON commentedon Nov 18, 2026
Lane runs on main
scripts/slow-e2e.sh e2e/slow-agent-device.test.ts e2e/slow-ios-window.test.ts e2e/slow-baseline.test.tson main 06ff865, 3 times, agent-device 0.21.36 (= the pin):So it fails on main too, about 1 run in 3. In the failing run a second iOS test hit the same 90 s timeout on a snapshot: "after an accepted upload install and snapshot, install from a remote: path, ... are refused ..." (149 s).
The ndjson log was lost again: the lane's temp dir is
/tmp/simlock-slow/, not~/.sls/, and the agent's home is deleted right after the failure.Other failures in these runs, not this bug: the Android simlock-kill test (all 3 runs, #1578) and the iOS window test's "front app changed" (runs 1 and 3, someone was using the Mac).
Logs:
/var/folders/tb/j39z273s5kn7lb9tz1dhk8l00000gn/T//simlock-slow-e2e-20261118-123643.log(+-daemons/).Written by an agent.
V3RON commentedon Nov 18, 2026
Reproduction
The cause is narrower than "too tight under load": the e2e never gives agent-device more than 90 s.
FIRST_SNAPSHOTonly sets the CLI process timeout. When this test passes, its first snapshot takes 85–88 s, so a 91 s one fails.e2e/helpers/agent-device-targets.test.ts> FIRST_SNAPSHOT > "an agent's snapshot run with FIRST_SNAPSHOT reaches agent-device's daemon with a 150000 ms budget". The pinned CLI talks to a stand-in daemon that records the call. It skips withoutSIMLOCK_E2E_AGENT_DEVICE.This test's first snapshot, read from the lane's simlock
daemon.log(POST /v1/agent-device/rpc):Root cause
Defect in the test helper.
e2e/helpers/agent-device-targets.ts:78setsFIRST_SNAPSHOT = { timeout: 180_000 }, which is only the process timeout (e2e/helpers/agent-device.ts:159). The snapshot is sent with no--timeout, so agent-device 0.21.36 keeps its default 90 s request limit (packages/command-registry/src/timeout-policy.ts:7). Only--timeoutraises it (registry.ts:451). At 90 s the client gives up and simlock relays agent-device's 500. It shows atslow-agent-device.test.ts:788and:337, but everyFIRST_SNAPSHOTcall has it. The helper's comment is out of date.Simplest fix
FIRST_SNAPSHOT = { timeout: 180_000, flags: ["--timeout", "150000"] }. AddAgentDeviceRunOptions.flagsand append it after the args in bothAgent.runs (agent-device.ts:159,:254). Call sites stay as they are.Alternatives rejected
FIRST_SNAPSHOT.timeoutonly: the 90 s limit stays (handoff above).preparebefore each first snapshot: adds a step to every test.Risk
e2e/slow-agent-device.test.ts -t 'simlock \(iOS\)', 2–3 times.SIMLOCK_E2E_AGENT_DEVICEis unset (CI).Fast track
Written by an agent.
V3RON commentedon Nov 18, 2026
Delivery run
Merged: none
Parked: #1581 — fast track held: "One fix: no — agent-device could raise its own first-snapshot default"; needs the maintainer to pick the fix (e2e
--timeouton the first snapshot, or an agent-device default change) and setbug:ready.Waiting: none
Decided: #1581 — blocker met by 3 lane runs on main (1 failed) → moved
bug:blockedtobug:newand triaged;flaky-testkept.Written by an agent.
V3RON commentedon Nov 19, 2026
Delivery run
Merged: #1783 (#1581)
Parked: none
Waiting: none
Decided: none
Written by an agent.
fix(e2e): the first snapshot gets a 150 s agent-device request budget (…