Skip to content

flaky: e2e/device-exec.test.ts uploads answer 422 when the host has under 10 GiB free #1823

Done

Description

@V3RON

Two tests in e2e/device-exec.test.ts PUT lease files (lines 187 and 258, expect(uploaded.status).toBe(201)) through a spawned daemon whose config (fleet(), line 60) leaves diskPressure.freeBytesThreshold at its 10 GiB default (src/core/config-defaults.ts:118). On a host with less free disk the worker answers 422 INSUFFICIENT_DISK_SPACE (src/lease-files/store.ts:225). Not reproduced: this host has 20 GiB free. Same cause as #1613; adding diskPressure: { freeBytesThreshold: 0 } to that configOverrides removes it. Found while triaging #1613.

Written by an agent.

Activity

  1. added
    bug:new
    on Nov 24, 2026
  2. self-assigned this
    on Nov 24, 2026
  3. V3RON commented on Nov 24, 2026

    @V3RON
    ContributorAuthor

    Reproduction

    Confirmed. This is a defect in the test rig, not in the product. fleet() starts a daemon that keeps the default 10 GiB disk-pressure threshold, so the two upload tests fail on any host with less free disk than that. This host has 20 GiB free (df -h $TMPDIR), so the tests pass here today. The daemon is a separate process and reads the real disk, so the reproduction checks the threshold it runs with. Branch bug/1823-repro, e2e/device-exec.test.ts: "the device.exec fleet > keeps a disk-pressure threshold of 0 bytes, not the 10 GiB default".

    pnpm test:e2e e2e/device-exec.test.ts
    AssertionError: expected 10737418240 to be +0   (e2e/device-exec.test.ts:147)
    Tests  1 failed | 5 passed (6)
    

    Root cause

    e2e/device-exec.test.ts:61 (fleet()'s configOverrides) sets only http. diskPressure.freeBytesThreshold keeps its default, 10 GiB (src/core/config-defaults.ts:118). The failure shows at lines 192 and 263 (expect(uploaded.status).toBe(201)): src/lease-files/store.ts:225 refuses an upload with 422 INSUFFICIENT_DISK_SPACE while free disk is below the threshold. ADR 0067 §4 requires that refusal, so the product is right. This is the same cause as #1613, in a rig that report did not cover.

    Simplest fix

    Add diskPressure: { freeBytesThreshold: 0 } to fleet()'s configOverrides. Tried it:

    pnpm test:e2e e2e/device-exec.test.ts
    Test Files  1 passed (1)   Tests  6 passed (6)
    

    Alternatives rejected

    • Set the threshold in FAKE_LANE_BASE_CONFIG (e2e/helpers/env.ts:99): it changes every fake-lane daemon, and the threshold also drives idle destroy (src/core/cleanup/idle-destroy.ts:53). Only this file uploads.
    • Leave the threshold and fake diskFree in the daemon: no e2e seam exists, and a spawned daemon cannot take an injected port.

    Risk

    • The new test reads the threshold rather than uploading on a low-disk host. If the fix moves the key into a shared helper, the test must still go red when the key is removed.

    Fast track

    • Defect: yes
    • Fix tried: yes
    • Nothing public added or broken: yes
    • No ADR or rule changed: yes
    • One fix: yes

    Written by an agent.

  4. removed their assignment
    on Nov 24, 2026
  5. added
    bug:ready
    fast-track
    and removed
    bug:new
    on Nov 24, 2026
  6. self-assigned this
    on Nov 24, 2026
  7. V3RON commented on Nov 24, 2026

    @V3RON
    ContributorAuthor

    Delivery run

    Merged: #1825 (#1823)
    Parked: none
    Waiting: none
    Decided: none

    Written by an agent.

  8. added a commit that references this issue on Nov 25, 2026
    b87c8f4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug:readyfast-track

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions