Skip to content

Console spec daemons read the host's real memory, so a loaded host can pause their warm pool #1928

Done

Description

@V3RON

e2e/console/fixtures.ts:246-261 builds the config for the console specs' worker daemons without memoryPressure, so each worker samples this machine's real memory (ADR 0068). At warming-paused (a warn reading or under 20 % available) the warm pool starts nothing, for a target or a learned kind. The same fixture pins warmPool.refillDelayMs: 0 because "the console specs wait for a refill right after a grant" (fixtures.ts:257); on a loaded host that refill never comes, and the spec fails for a reason that is not its own. Same class as #1867 (src/ rigs) and #1891 (e2e/helpers/env.ts); this rig builds its config separately, so neither fix reaches it.

Found while triaging #1891.

Written by an agent.

Activity

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

    @V3RON
    ContributorAuthor

    Reproduction

    Confirmed. Every worker the console fixture starts keeps memory pressure on, whether it runs alone or joins a gateway. The spec is e2e/console/daemon-memory-pressure.spec.ts on bug/1928-repro. Its two tests read memoryPressure.enabled with config get from the running worker:

    $ pnpm test:console --project=chromium e2e/console/daemon-memory-pressure.spec.ts
      × a standalone worker the console fixture starts has memory pressure turned off
        Error: memoryPressure.enabled on the worker
        Expected: false
        Received: true
      × a worker the console fixture joins to a gateway has memory pressure turned off
        Error: memoryPressure.enabled on the joined worker
        Expected: false
        Received: true
      2 failed
    

    Root cause

    Defect, in the test rig. daemonConfig in e2e/console/fixtures.ts:246 writes each worker's config.json. Its worker branch pins capabilities and warmPool.refillDelayMs: 0 (:258) but not memoryPressure. The worker therefore keeps the default pauseWarming: { level: "warn", minAvailablePercent: 20 } (src/core/config-defaults.ts:122) and samples this machine's real memory. At warming-paused the warm pool proposes no boot (ADR 0068), so the refill a spec waits for never comes. startFleet builds its workers through the same startDaemon("worker"), so joined workers have the same gap. #1891's fix (e2e/helpers/env.ts) does not reach this file.

    Simplest fix

    In the worker branch next to warmPool, add memoryPressure: { enabled: false, ...(extraConfig.memoryPressure as object | undefined) } with a why-comment. I applied it, ran the specs below, and then discarded it:

    $ pnpm test:console --project=chromium e2e/console/daemon-memory-pressure.spec.ts e2e/console/colours.spec.ts e2e/console/keyboard.spec.ts e2e/console/screens.spec.ts
      17 passed (28.2s)
    $ pnpm test:console --project=chromium e2e/console/journeys.spec.ts
      5 passed (22.0s)
    

    No console spec sets memoryPressure. The colours spec's memory ring reads load.memory, which the host load sampler still reports, and it passed.

    Alternatives rejected

    • Pass hostLoadProbe: null: the console daemons run as separate processes, so only the config reaches them.
    • Put it in FAKE_CAPACITY: that block is the capacity pin; this belongs with the other worker-branch pins.
    • Lower the thresholds: the specs would still depend on the host's memory.

    Risk

    • Not seen failing on a loaded host. The evidence is the config the worker loaded, not a timed-out spec.
    • A gateway must not get the key, because it logs Ignoring "memoryPressure". The fix stays in the worker-only branch.

    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 27, 2026
  5. added
    bug:ready
    fast-track
    and removed
    bug:new
    on Nov 27, 2026
  6. self-assigned this
    on Nov 27, 2026
  7. V3RON commented on Nov 27, 2026

    @V3RON
    ContributorAuthor

    Delivery run

    Merged: #1930 (#1928)
    Parked: none
    Waiting: none
    Decided: none

    Written by an agent.

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