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: the simlock-kill test claims the lease ends, but ADR 0071 §4 says a standalone worker restart keeps it #1578
e2e/slow-agent-device.test.ts:517 ("after the simlock daemon is killed and started again, … the agent's next command fails with lease ended by simlock, and its old simlock lease is released") still claims ADR 0023 §3. ADR 0071 §4 and #1468 say a standalone worker's restart rebuilds the lease (adoptable, src/agent-device/front/host-link.ts:99) and the next heartbeat succeeds on the same device; agent-device.mdx:209 says the same. A SIGKILLed holder keeps its lease (src/leasing/AGENTS.md, Known gaps), so the adopt should apply.
Not run: it needs the slow lane. #1577's report says only the agent-device-kill test failed in three runs. If this one passes, the code contradicts the ADR; if it fails, its claim is stale like #1577's.
It fails: the test is stale, and the code follows ADR 0071 §4. The test is e2e/slow-agent-device.test.ts:517, unchanged on main. bug/1578-repro points at origin/main. I did not run the slow lane. I read a slow-lane run that was already going on this host (#1569's worktree at 2c6d716, with #1573's helper, Android). The old-pid wait passes and :535 fails:
# /var/folders/tb/j39z273s5kn7lb9tz1dhk8l00000gn/T/simlock-slow-e2e-20261115-180422.log
SLOW END failed 48s … (Android) > after the simlock daemon is killed and started again, …
SLOW ERROR expected +0 not to be +0 // Object.is equality # expect(next.code).not.toBe(0)
# passed 2026-11-03, before #1466: simlock-slow-e2e-20261103-223944.log
The right behaviour already passes at unit level:
pnpm exec vitest run --project unit src/agent-device/edge-restart.test.ts -t "after a standalone worker restarts, the agent's next heartbeat succeeds"
Tests 2 passed | 20 skipped (22)
Root cause
Defect, in the test. e2e/slow-agent-device.test.ts:534-541 still asserts ADR 0023 §3, which ADR 0071 replaced. The emulator outlives the SIGKILL, and the reconciler keeps a lease whose device is running (ADR 0019). The restarted front rebuilds the entry (adoptable, src/agent-device/front/host-link.ts:99), and the next heartbeat re-allocates the lease (agent-device.mdx:209). #1466 did not update this case, the twin of #1577.
Simplest fix
Use #1577's shape. Before the kill: install Appduct <app> and record listLeases. After the old pid is gone: ok(open <bundleId>) and ok(snapshot). Assert one lease, with the same id and deviceId. New title: "…pid is gone within 60 s; the agent opens the installed Appduct fixture app again and takes a snapshot, and its simlock lease stays, on the same device". The open also covers iOS (SESSION_NOT_FOUND comes before a new open).
Alternatives rejected
Flip not.toBe(0) to ok(next) only: fails on iOS.
Delete the case: it is the only real-device check of ADR 0071 §4.
Activity
V3RON commentedon Nov 15, 2026
Reproduction
It fails: the test is stale, and the code follows ADR 0071 §4. The test is
e2e/slow-agent-device.test.ts:517, unchanged onmain.bug/1578-repropoints atorigin/main. I did not run the slow lane. I read a slow-lane run that was already going on this host (#1569's worktree at 2c6d716, with #1573's helper, Android). The old-pid wait passes and:535fails:The right behaviour already passes at unit level:
Root cause
Defect, in the test.
e2e/slow-agent-device.test.ts:534-541still asserts ADR 0023 §3, which ADR 0071 replaced. The emulator outlives the SIGKILL, and the reconciler keeps a lease whose device isrunning(ADR 0019). The restarted front rebuilds the entry (adoptable,src/agent-device/front/host-link.ts:99), and the next heartbeat re-allocates the lease (agent-device.mdx:209). #1466 did not update this case, the twin of #1577.Simplest fix
Use #1577's shape. Before the kill:
install Appduct <app>and recordlistLeases. After the old pid is gone:ok(open <bundleId>)andok(snapshot). Assert one lease, with the sameidanddeviceId. New title: "…pid is gone within 60 s; the agent opens the installed Appduct fixture app again and takes a snapshot, and its simlock lease stays, on the same device". Theopenalso covers iOS (SESSION_NOT_FOUNDcomes before a newopen).Alternatives rejected
not.toBe(0)took(next)only: fails on iOS.Risk
verify-hardwarerun, with feat(ios): sources live in a folder as long as the device set #1573's helper.open <bundleId>works after the restart on Android is inferred frommdx:209, not watched.Fast track
Written by an agent.