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
Daemon test rigs outside src/agent-device build the host's real load probe, so the host's memory can pause their warm pool #1867
Unit and fast-e2e files under `src/daemon/` call `startDaemon` without `hostLoadProbe`, so `main.ts:531` / `worker-composition.ts:246` build `productionHostLoadProbe` and the daemon samples this machine's real memory (`sysctl kern.memorystatus_level kern.memorystatus_vm_pressure_level` on macOS). A reading at `warn` or under 20 % available sets `warming-paused` (ADR 0068) and the warm pool starts nothing, so any assertion that waits for a warm `ready` device fails when the machine running the suite is short of memory. `src/daemon/test-main.ts:51` and `src/daemon/test-optional-modules.ts:126` already pass `hostLoadProbe: null`; these do not:
Not every one waits on the warm pool; each that does is exposed. Found while triaging #1863, which reproduces this for the two agent-device rigs (`test-support.ts`, `test-gateway.ts`).
Confirmed, corrected: 46 starts in 20 files. src/cli/index-daemon-service.test.ts starts no daemon/main.ts daemon (its startDaemon wraps startInMemoryDaemon). Missed by the issue: test-main.ts:199 (startGateway, used by main-worker-lock.test.ts:228) and test-relay-support.ts:191.
src/daemon/test-daemons-host-load.test.ts on bug/1867-repro, "daemons started by tests under src/ pass a hostLoadProbe, so none builds the production probe and reads this host's memory", scans every startDaemon call under src/ and packages/, following an options builder to its declaration. main-host-load.test.ts is exempt: it picks probes on purpose.
$ pnpm exec vitest run --project unit src/daemon/test-daemons-host-load.test.ts
AssertionError: expected [ …(46) ] to deeply equal []
+ "src/agent-device/local-profile.test.ts:100",
+ "src/daemon/device-rotate.e2e.test.ts:70", ...
+ "src/daemon/test-main.ts:199",
+ "src/daemon/test-relay-support.ts:191", ...
Defect. src/daemon/worker-composition.ts:244-247 (worker) and src/daemon/main.ts:529-532 (gateway) build productionHostLoadProbe when hostLoadProbe is undefined; the 46 starts omit it, so their workers read real memory and a warn reading sets warming-paused (ADR 0068). The symptom is any assertion waiting for a warm ready device. The existing test "a gateway started with no hostLoadProbe builds the production probe" proves the default.
Simplest fix
hostLoadProbe: null in each start's options literal or builder (options() in main-leasing, main-stop, optional-modules-start; test-relay-support.ts:168), before any ...rest spread. main-host-load.test.ts:292 then starts its gateway with startDaemon directly, since startGateway now passes null.
Done: PR #1887 adds hostLoadProbe: null to every test daemon start under src/ and packages/ (same shape as #1868), plus a guard test src/daemon/test-daemons-host-load.test.ts that lists any start leaving it out. Build, audit and review round 1 passed with 0 blocking findings; one wording note posted on the PR. The PR is ready.
Not done: merge.
Findings: none blocking.
Blocked on:fast-track: #1867 held: PR #1887 changes 20 files, over 8. The maintainer merges the PR, or removes fast-track from #1867.
Activity
V3RON commentedon Nov 26, 2026
Reproduction
Confirmed, corrected: 46 starts in 20 files.
src/cli/index-daemon-service.test.tsstarts nodaemon/main.tsdaemon (itsstartDaemonwrapsstartInMemoryDaemon). Missed by the issue:test-main.ts:199(startGateway, used bymain-worker-lock.test.ts:228) andtest-relay-support.ts:191.src/daemon/test-daemons-host-load.test.tsonbug/1867-repro, "daemons started by tests under src/ pass a hostLoadProbe, so none builds the production probe and reads this host's memory", scans everystartDaemoncall undersrc/andpackages/, following an options builder to its declaration.main-host-load.test.tsis exempt: it picks probes on purpose.This host was at
warnduring triage:Root cause
Defect.
src/daemon/worker-composition.ts:244-247(worker) andsrc/daemon/main.ts:529-532(gateway) buildproductionHostLoadProbewhenhostLoadProbeisundefined; the 46 starts omit it, so their workers read real memory and awarnreading setswarming-paused(ADR 0068). The symptom is any assertion waiting for a warmreadydevice. The existing test "a gateway started with no hostLoadProbe builds the production probe" proves the default.Simplest fix
hostLoadProbe: nullin each start's options literal or builder (options()inmain-leasing,main-stop,optional-modules-start;test-relay-support.ts:168), before any...restspread.main-host-load.test.ts:292then starts its gateway withstartDaemondirectly, sincestartGatewaynow passesnull.Alternatives rejected
setupFilesmock ofproductionHostLoadProbe: hidden, and breaksmain-host-load.test.ts.nullas default, production passing the probe: a missed production caller silently loses memory pressure.Risk
main-host-load.test.ts, or the production default goes untested.Fast track
Written by an agent.
V3RON commentedon Nov 26, 2026
Handoff
Done: PR #1887 adds
hostLoadProbe: nullto every test daemon start undersrc/andpackages/(same shape as #1868), plus a guard testsrc/daemon/test-daemons-host-load.test.tsthat lists any start leaving it out. Build, audit and review round 1 passed with 0 blocking findings; one wording note posted on the PR. The PR is ready.Not done: merge.
Findings: none blocking.
Blocked on:
fast-track: #1867 held: PR #1887 changes 20 files, over 8.The maintainer merges the PR, or removesfast-trackfrom #1867.Written by an agent.
V3RON commentedon Nov 26, 2026
Delivery run
Merged: none
Parked: #1867 — PR #1887 held by the fast track (20 files, over 8); ready to merge by hand
Waiting: none
Decided: none
Written by an agent.
V3RON commentedon Nov 26, 2026
Delivery run
Merged: #1887 (#1867), after the maintainer removed
fast-trackParked: none
Waiting: none
Decided: none
Written by an agent.
fix(daemon): test daemons start without the host's real load probe (c…