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
src/agent-device/edge-release.test.ts fails 6 tests at base 4f6bb7dd (gateway pool never ready) #1863
Run pnpm exec vitest run --project unit src/agent-device/edge-release.test.ts on 4f6bb7d (detached worktree) and on task/1845: 6 of 14 fail with AssertionError: expected [] to deeply equal [ 'ready' ] (Matcher did not succeed in time). Same family also seen in src/agent-device/edge-lease-end.test.ts and a gateway sweep/adoption test in pnpm test:changed (13 failures). Found while auditing #1845; the diff touches none of them.
The failure depends on the host, not the code: edge-release.test.ts passes 14/14 at 4f6bb7dd and at main on a quiet host (74 % memory free), including six copies run at once. The agent-device rigs read the host's real memory. Simulating a host at warn pressure in the rig gives the reported failure exactly:
$ pnpm exec vitest run --project unit src/agent-device/edge-release.test.ts # rig given a probe reading pressure "warn"
AssertionError: expected [] to deeply equal [ 'ready' ] (x6)
Tests 6 failed | 8 passed (14)
On bug/1863-repro, one test per rig (one file cannot import both: Fallow reports a duplicate export):
$ pnpm exec vitest run --project unit src/agent-device/worker-rig-host-load.test.ts src/agent-device/gateway-rig-host-load.test.ts
worker rig > starts its daemon without building the host's real load probe
AssertionError: expected "vi.fn()" to be called +0 times, but got 1 times
gateway rig > starts its gateway and worker daemons without building the host's real load probe
AssertionError: expected "vi.fn()" to be called +0 times, but got 2 times
Root cause
src/agent-device/test-support.ts:164 and src/agent-device/test-gateway.ts:201,255 call startDaemon without hostLoadProbe, so src/daemon/worker-composition.ts:244-247 builds productionHostLoadProbe and the worker samples this machine's kern.memorystatus_level and kern.memorystatus_vm_pressure_level. When the host is at warn or has under 20 % available (busy agents, booted simulators), MemoryPressureTracker sets warming-paused (ADR 0068) and the warm pool starts nothing. liveStates then stays []. That is the symptom in edge-release, edge-lease-end and the gateway-rig tests. The other two daemon rigs pass hostLoadProbe: null (src/daemon/test-main.ts:51).
Simplest fix
Add hostLoadProbe: null to the three startDaemon calls (3 lines).
reproduction: 2 passed
pnpm exec vitest run --project unit src/agent-device/ -> 45 files, 538 passed | 1 skipped
Alternatives rejected
A FakeHostLoadProbe with normal readings: more code, and no test in these files reads load.
Longer poll timeouts: the pool never fills while the pressure lasts.
Activity
feat(cli): simlock lease --requires and MCP lease_simulator requires (#…
V3RON commentedon Nov 25, 2026
Reproduction
The failure depends on the host, not the code:
edge-release.test.tspasses 14/14 at4f6bb7ddand atmainon a quiet host (74 % memory free), including six copies run at once. The agent-device rigs read the host's real memory. Simulating a host atwarnpressure in the rig gives the reported failure exactly:On
bug/1863-repro, one test per rig (one file cannot import both: Fallow reports a duplicate export):Root cause
src/agent-device/test-support.ts:164andsrc/agent-device/test-gateway.ts:201,255callstartDaemonwithouthostLoadProbe, sosrc/daemon/worker-composition.ts:244-247buildsproductionHostLoadProbeand the worker samples this machine'skern.memorystatus_levelandkern.memorystatus_vm_pressure_level. When the host is atwarnor has under 20 % available (busy agents, booted simulators),MemoryPressureTrackersetswarming-paused(ADR 0068) and the warm pool starts nothing.liveStatesthen stays[]. That is the symptom inedge-release,edge-lease-endand the gateway-rig tests. The other two daemon rigs passhostLoadProbe: null(src/daemon/test-main.ts:51).Simplest fix
Add
hostLoadProbe: nullto the threestartDaemoncalls (3 lines).Alternatives rejected
FakeHostLoadProbewith normal readings: more code, and no test in these files readsload.Risk
loadormemoryPressurefrom a rig (grep finds none).portsbarrel. A fix that builds the probe some other way would pass the test but still read the host.Fast track
Side findings
Written by an agent.
V3RON commentedon Nov 25, 2026
Delivery run
Merged: #1868 (#1863)
Parked: none
Waiting: none
Decided: none
Written by an agent.
fix(agent-device): test rigs start their daemons without the host's r…