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
flaky: lease-files and relay-gateway-files tests answer 422 instead of 201 on a clean base #1613
src/daemon/lease-files.test.ts (3 tests) and src/daemon/relay-gateway-files.e2e.test.ts (4 tests) fail with expected 422 to be 201 on merge-base 9333028 (failed 2 of 2 runs of lease-files.test.ts there), found auditing #1595. Likely environment dependent (local macOS).
Confirmed. A defect in the two test rigs, not in the product: they upload through a worker on the real disk and keep the default 10 GiB disk-pressure threshold, so any host with less free disk gets 422 INSUFFICIENT_DISK_SPACE. This host has 20 GiB free (df -h $TMPDIR), so the tests pass here today. The reproduction fakes a 5 GiB host. Branch bug/1613-repro:
src/daemon/lease-files.test.ts: "the lease-files rig > stores an upload when the host has less free disk than the worker's default disk-pressure threshold"
src/daemon/relay-gateway-files.e2e.test.ts: "the file rig's worker stores an upload when the host has less free disk than the worker's default disk-pressure threshold"
pnpm exec vitest run --project unit src/daemon/lease-files.test.ts src/daemon/relay-gateway-files.e2e.test.ts
AssertionError: expected 422 to be 201 (lease-files.test.ts:83, relay-gateway-files.e2e.test.ts:239)
Root cause
src/daemon/lease-files.test.ts:36 (rig()) and src/daemon/test-relay-support.ts:392 (startFleet's worker configOverrides) start a worker with NodeFilesystem and leave diskPressure.freeBytesThreshold at its default, 10 GiB (src/core/config-defaults.ts:118). The failure shows at src/lease-files/store.ts:225, which refuses an upload while free disk is below the threshold. ADR 0067 §4 requires that refusal, so the product is right. The tests pass or fail depending on the host's free disk. src/http/app-leases-files.test.ts:32 already sets the threshold to 0.
Simplest fix
Add diskPressure: { freeBytesThreshold: 0 } to the configOverrides in rig() and in startFleet's worker. Tried it:
pnpm exec vitest run --project unit src/daemon/lease-files.test.ts src/daemon/relay-gateway-files.e2e.test.ts <12 more files that use test-relay-support>
Test Files 14 passed (14) Tests 173 passed (173)
Alternatives rejected
A fake diskFree in each rig: more code, and the same result.
Setting the threshold in test-main.ts's start(): it changes every daemon test, and only these rigs use the real disk.
Risk
startFleet replaces the configOverrides that startWorker sets, so the key goes in startFleet, not startWorker.
Activity
feat(leasing): an Android worker tries its default image tag first (#…
feat(android): network phones under android.networkDevices (#1627)
feat(gateway): a phones-only platform through a gateway (#1657)
feat(ios): slim worker include and exclude lists of single services (#…
V3RON commentedon Nov 24, 2026
Reproduction
Confirmed. A defect in the two test rigs, not in the product: they upload through a worker on the real disk and keep the default 10 GiB disk-pressure threshold, so any host with less free disk gets
422 INSUFFICIENT_DISK_SPACE. This host has 20 GiB free (df -h $TMPDIR), so the tests pass here today. The reproduction fakes a 5 GiB host. Branchbug/1613-repro:src/daemon/lease-files.test.ts: "the lease-files rig > stores an upload when the host has less free disk than the worker's default disk-pressure threshold"src/daemon/relay-gateway-files.e2e.test.ts: "the file rig's worker stores an upload when the host has less free disk than the worker's default disk-pressure threshold"Root cause
src/daemon/lease-files.test.ts:36(rig()) andsrc/daemon/test-relay-support.ts:392(startFleet's workerconfigOverrides) start a worker withNodeFilesystemand leavediskPressure.freeBytesThresholdat its default, 10 GiB (src/core/config-defaults.ts:118). The failure shows atsrc/lease-files/store.ts:225, which refuses an upload while free disk is below the threshold. ADR 0067 §4 requires that refusal, so the product is right. The tests pass or fail depending on the host's free disk.src/http/app-leases-files.test.ts:32already sets the threshold to 0.Simplest fix
Add
diskPressure: { freeBytesThreshold: 0 }to theconfigOverridesinrig()and instartFleet's worker. Tried it:Alternatives rejected
diskFreein each rig: more code, and the same result.test-main.ts'sstart(): it changes every daemon test, and only these rigs use the real disk.Risk
startFleetreplaces theconfigOverridesthatstartWorkersets, so the key goes instartFleet, notstartWorker.Fast track
Side findings
Written by an agent.
fix(test): the fake e2e lane sets the daemon's disk-pressure threshol…
V3RON commentedon Nov 24, 2026
Delivery run
Merged: #1826 (#1613)
Parked: none
Waiting: none
Decided: none
Written by an agent.
fix(test): the lease-files test rigs no longer depend on the host's f…