Skip to content

fix(warm-pool): protect devices serving queued requests - #804

Merged
V3RON merged 5 commits into
mainfrom
bug/802
Oct 21, 2026
Merged

V3RON merged 5 commits into
mainfrom
bug/802

Conversation

@V3RON

@V3RON V3RON commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Closes #802

Status

Implement: done (3/3 green) Review: round 1, 0 findings Hardware: n/a Gate: running
Next: gate

  • A device serving a requester behind the blocked queue head stays ready across repeated reaper passes: src/leasing/create-leasing.test.ts, “keeps an old released device ready across reaper passes while its requester waits behind the queue head”; targetedDevices in src/core/warm-pool/policy.ts includes current queue demand.
  • Cancelling the waiting request restores ordinary idle cleanup: the same regression asserts immediate protection removal and a cleanup-reaper shutdown after cancellation; WarmPool.targeted() reads demand on each call.
  • Queue protection preserves requirement, mode, fresh-identity, lease and claim checks: the table “protects queued demand only for ready idle grantable devices matching its requirement and mode” in src/core/warm-pool/policy.test.ts. Existing policy and converger tests preserve configured/learned targets and pool-disabled behavior.
  • Affected manuals and configuration documentation describe queue protection: src/core/AGENTS.md, src/core/warm-pool/AGENTS.md, docs/CONFIGURATION.md.

Audit: stale sweep clean; 4/4 changed functions covered; 21 mutation probes across 7 tests all fail on assertions. The one local failure is the known download-limit test, flaky-test #807. No Done when line needs real devices.

Assumptions

  • Assumption: the bug has no formal Tests or Done when section — use the triage reproduction as the build cycle and its Simplest fix and Risk sections as the completion criteria.

Review

Spec review: 0 blocking, 0 fixed, 0 notes. Code review: 0 blocking, 0 fixed, 0 notes. Claims review: 0 blocking, 0 fixed, 0 notes.
Rounds: 1. Tokens: 0.9M.
Runs: 4. Cost USD: 1.2983. Agent seconds: 584.
Assessment: complete

Written by an agent.

@V3RON

V3RON commented Oct 21, 2026

Copy link
Copy Markdown
Contributor Author

Review ledger

Round 1: ddf2da8

Runs: 4. Cost USD: 1.2983. Agent seconds: 584.
Tokens input 88, output 24048, cache read 1711210, cache write 183832.
- review 1 reviewer: claude-sonnet-5-5 309 s $0.2292
- review 1 reviewer code: claude-opus-5-5 216 s $0.8539
- review 1 reviewer spec: claude-sonnet-5-5 26 s $0.1015
- review 1 reviewer claims: claude-sonnet-5-5 33 s $0.1137
Finding outcomes: {}. Classes: {}.
{"findings": []}

Written by an agent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The reaper shuts down a device the warm pool booted for a queued request, and the pool boots it again

1 participant