Repository navigation
Description
Part of #2033.
Scope
A worker with no warmPool config boots devices only for leases and learns nothing. A config that sets warmPool.targets without warmPool.enabled says so at start. The website says the pool is off by default and deprecated. A worker that sets warmPool.enabled: true keeps the pool as today.
If it goes wrong: a worker still boots spares nobody asked for, or an operator who used targets loses their spares with no word in the log.
Technical spec
Commit 62c7299.
Rows
- Behaviours: B6, B7, B8, B9
- Interfaces: I1, I2
- Existing code: X5, X6, X7, X8, X9, X11, X14, X18, X19
Facts
| # | Fact | Source |
|---|---|---|
| F1 | The daemon collects loadConfig's warnings at start and logs them; the CLI's own config loads drop them |
src/daemon/main.ts:251 |
| F2 | The release notes are GitHub's generated notes from PR titles, written into CHANGELOG.md at release |
.github/workflows/release.yml:245, :255 |
| F3 | withConfig deep-merges into the e2e defaults, so a file that turns the pool on keeps refillDelayMs: 0 |
e2e/helpers/env.ts:355 |
Modules touched
src/core/warm-pool/config.ts, src/core/config.ts, src/core/config-warm-pool.test.ts, the unit tests and harnesses in X11 that rely on the pool, the e2e files and helpers in B8 (e2e/helpers/agent-device-targets.ts included), e2e/release/07-baselines-warm-pool.md, e2e/release/09-memory-pressure.md, src/core/warm-pool/AGENTS.md, the website pages in B9. Searches: rg -n "warmPool" src --glob '*test*', rg -n "warmPool" e2e, rg -ln "spare|learned kind|warm" e2e, rg -il "warm pool|warmPool" website/src/content/docs.
Rules in play
- ADR 0101 §1: the default is off; the one runtime signal is I1 for a targets-only config.
- ADR 0101 §2: website pages say deprecated and removed in a later release;
warmPool.quarantine.*,memoryPressure.pauseWarming, thewarm/bootedsources andwarm-hitare not described as deprecated. - Documentation rule 9: the public config default changes, so the website pages in B9 change in this PR.
src/core/AGENTS.md: a part takes its config slice; the warning lives in the worker branch ofloadConfig.
Retired words
on by default(of the warm pool): the pool is off by default and deprecated;warmPool.enabled: trueturns it on
Tests
Seam: loadConfig (src/core/config-warm-pool.test.ts:24) with a warn spy, as src/core/config-platform-and-driver-settings.test.ts:40; createHarness({ startPool: true }) for the lease at the default.
- B6: An operator starts a worker with no
warmPoolconfig:warmPool.enabledisfalse, nothing is learned on a lease, and no device is booted after it ends: no key:false;enabled: true:true;enabled: false:false;testConfig():false; a lease granted and released at the default: no learned kind, no boot - B7: An operator starts a worker whose config sets
warmPool.targetsand nowarmPool.enabled: the load warns once with I1, and the pool stays off: one target, noenabled: one warning; targets in the overrides layer only: one warning; targets in the file andenabled: truein the overrides: none;enabled: true: none;enabled: false: none;targets: []: none; gateway role: only the gateway's own "Ignoring" warning (src/core/config-role-checks.ts:129) - B8: A maintainer runs the e2e suite and the release checks: every test that needs the pool turns it on in its own config (or no longer waits for a spare) and passes; the others pass at the new default: opt in:
e2e/warm-pool-learned.test.ts,e2e/warm-pool-reserve.test.ts,e2e/warm-targets.test.ts,e2e/slow-warm-pool.test.ts,e2e/lease-lifecycle.test.ts:174,e2e/doctor-drift.test.ts:58,e2e/daemon-lifecycle.test.ts:278and:325,e2e/daemon-restart.test.ts:24,e2e/physical-devices-core.test.ts:289,:317and:333,e2e/event-history.test.ts:101,e2e/capacity-cleanup-nuke.test.ts:141,e2e/gateway-smoke.test.ts:369,e2e/console/screen.spec.ts:70,e2e/slow-ios-window.test.ts:63,e2e/slow-ios-stream.test.ts:220;e2e/helpers/agent-device-targets.ts:156and:204(warmUp,waitForFreewait for spares the pool boots) and their callerse2e/helpers/agent-device-targets.test.ts:113,e2e/slow-agent-device.test.ts:195,e2e/slow-agent-device-gateway.test.ts:154and:179,e2e/slow-e2e-provider.test.ts:49: the pool on in their config, or the helpers stop waiting for a spare;e2e/slow-ios-slim.test.ts:384(a warm slim device rebooted); the release checkse2e/release/07-baselines-warm-pool.md:8ande2e/release/09-memory-pressure.md:7turn the pool on first;e2e/waiting-requests.test.ts:54expects the second waiter's own capacity reason instead of "behind an earlier request" (B3); the fast lane at the default; any further filerg -n "warmPool" e2eandrg -ln "spare|learned kind|warm" e2efind - B9: A reader opens the website: the warm pool pages and the configuration reference say the pool is off by default and deprecated, how to turn it on, and that targets need
enabled: true:concepts/warm-pool.mdx,worker/warm-pool.mdx,reference/configuration.mdx(thewarmPoolsection), and every other page found byrg -il "warm pool|warmPool" website/src/content/docsthat says the pool is on by default or that a lease finds a spare
Done when
- The PR title starts
feat!:and says the warm pool is off by default and deprecated. pnpm test:changedandpnpm typecheckpass.pnpm test:e2epasses on the fast-lane files B8 names.- The console lane passes on
e2e/console/screen.spec.ts(pnpm test:console --project=chromium e2e/console/screen.spec.ts). pnpm test:e2e e2e/helpers/agent-device-targets.test.tspasses.- Slow lane:
e2e/slow-warm-pool.test.ts,e2e/slow-ios-window.test.ts,e2e/slow-ios-stream.test.ts,e2e/slow-ios-slim.test.ts,e2e/slow-agent-device.test.ts,e2e/slow-agent-device-gateway.test.tsande2e/slow-e2e-provider.test.tspass. - The website build passes (
pnpm --dir website install && pnpm --dir website build && node website/scripts/check-openapi.mjs). rg -n -i "on by default" website/src/content/docsfinds no line about the warm pool.
Out of scope
- Removing any pool code, key, command, event, finding or tab (the follow-up feature).
- A warning for any other
warmPool.*key, a doctor finding or a console notice.
Depends on
- Waiting line: with the warm pool off, every waiting request starts its own device #2037, because: with the pool off by default, waiting requests would be served one at a time until leasing serves the whole line (
src/leasing/acquisition-workflow.ts:385).
Written by an agent.
Activity