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 lane: a failing run deletes its daemon logs, so the reason a device failed is lost #1158
A shared daemon's teardown removes its whole home, daemon.log included (e2e/helpers/env.ts:502, rm(home, ...); the log path is set at env.ts:249). The slow-lane log only has the test output. So when a slow-lane test fails because a device would not come up, nothing records why.
Example: in two runs from #1102 (/var/folders/tb/j39z273s5kn7lb9tz1dhk8l00000gn/T/simlock-slow-e2e-20261030-222307.log and -225042.log), warmUp waited 330 s with one Android device stuck in shutdown (last observed: shutdown,ready). The driver's reason (device-provisioner.ts:126 logs it, then raises a plain BootTimeoutError) was only in the deleted daemon.log.
Expected: a run whose test failed keeps each daemon's log, or copies it next to the lane log, before it removes the home.
Gap: nothing promises the logs survive. The expectation (a copy in SIMLOCK_E2E_LOG_DIR) is a proposal.
e2e/helpers/env.test.ts on bug/1158-repro, "after a run whose flows fail, leaves the log of each daemon it started in SIMLOCK_E2E_LOG_DIR". It starts its own vitest run with fake-driver flows that fail like #1102 did: a withSharedDaemon suite that throws in beforeAll (as warmUp does) and a withDaemon test that fails.
It passes once a 5-line copy is added to teardown().
Root cause
e2e/helpers/env.ts:502: teardown() deletes the home (rm(home, …)), and the log is inside it (env.ts:249). Both withDaemon (env.ts:57) and withSharedDaemon (env.ts:444) do this whether the run passed or failed. The lane has nowhere to keep a log: scripts/slow-e2e.sh writes only vitest's output, and the next run's clean deletes /tmp/simlock-slow (slow-e2e.sh:97). I read simlock-slow-e2e-20261030-222307.log: it ends at last observed: shutdown,ready and has no daemon lines. The driver's reason is logged only in daemon.log (src/core/device-provisioner.ts:125).
Simplest fix
In teardown(), when SIMLOCK_E2E_LOG_DIR is set, copy <dataDirectory>/daemon.log* to $SIMLOCK_E2E_LOG_DIR/<basename(home)>/ before the rm. slow-e2e.sh sets the variable to ${log%.log}-daemons, and toolchain.md names that path. The shape this pins is the variable name and copying every time it is set.
Alternatives rejected
Keep the home after a failure: the next clean deletes it.
Activity
V3RON commentedon Oct 31, 2026
Reproduction
Gap: nothing promises the logs survive. The expectation (a copy in
SIMLOCK_E2E_LOG_DIR) is a proposal.e2e/helpers/env.test.tsonbug/1158-repro, "after a run whose flows fail, leaves the log of each daemon it started in SIMLOCK_E2E_LOG_DIR". It starts its own vitest run with fake-driver flows that fail like #1102 did: awithSharedDaemonsuite that throws inbeforeAll(aswarmUpdoes) and awithDaemontest that fails.It passes once a 5-line copy is added to
teardown().Root cause
e2e/helpers/env.ts:502:teardown()deletes the home (rm(home, …)), and the log is inside it (env.ts:249). BothwithDaemon(env.ts:57) andwithSharedDaemon(env.ts:444) do this whether the run passed or failed. The lane has nowhere to keep a log:scripts/slow-e2e.shwrites only vitest's output, and the next run'scleandeletes/tmp/simlock-slow(slow-e2e.sh:97). I readsimlock-slow-e2e-20261030-222307.log: it ends atlast observed: shutdown,readyand has no daemon lines. The driver's reason is logged only indaemon.log(src/core/device-provisioner.ts:125).Simplest fix
In
teardown(), whenSIMLOCK_E2E_LOG_DIRis set, copy<dataDirectory>/daemon.log*to$SIMLOCK_E2E_LOG_DIR/<basename(home)>/before therm.slow-e2e.shsets the variable to${log%.log}-daemons, andtoolchain.mdnames that path. The shape this pins is the variable name and copying every time it is set.Alternatives rejected
cleandeletes it.beforeAll(slow lane: gateway Android suite times out booting under load and leaves orphaned emulators #1102) does not show up inafterEach, and a copy is a few KB.Risk
daemon.log.1; the gateway's directory is<home>/gateway.$TMPDIR, as lane logs already do.Written by an agent.
V3RON commentedon Oct 31, 2026
Delivery run
Merged: #1161 (#1158)
Parked: none
Waiting: none
Written by an agent.
fix(e2e): keep each daemon's log when teardown deletes its home (call…