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: capacity-cleanup-nuke dry-run preview finds no warm device #574
e2e/capacity-cleanup-nuke.test.ts > capacity, warm pool, cleanup, and nuke > demotes an idle device, previews cleanup without executing on --dry-run, and nuke touches only registry devices
Failed in CI run 38583525243 (PR #567, 7c91b91) at line 190: expected a ready (warm) device for the dry-run preview: expected undefined to be defined. The test sets idle.shutdownAfterMs to 200, so the warm device can be demoted before deviceRows runs. Not reproduced: 10 runs on the feature branch and 10 on main, all green. The feature under review (host load) does not touch capacity or warm-pool paths.
Read the report and claimed the issue. Created bug/574-repro from origin/main; no files changed and no reproduction committed.
Not done
Reproduce the failure, identify its root cause, and post the triage report.
Findings
Delivery preflight found the active checkout at 83534614 and origin/main at 2781a4e4, with differing .claude and .agents workflows. The delivery skill requires a fresh session using the current workflow.
The reported assertion reproduces when reclaim is slow. The unchanged file passes both tests; the reproduction adds only a 5,000 ms fake reclaim latency before dryrun-z.
Branch: bug/574-repro
File: e2e/capacity-cleanup-nuke.test.ts
Title: demotes an idle device, previews cleanup without executing on --dry-run, and nuke touches only registry devices
Command: pnpm test:e2e e2e/capacity-cleanup-nuke.test.ts
AssertionError: expected a ready (warm) device for the dry-run preview: expected undefined to be defined
e2e/capacity-cleanup-nuke.test.ts:191
Tests: 1 failed | 1 passed
Root cause
Defect in the test setup.releaseAndForget waits for the release reply and holder exit, but neither proves reclaim finished. Its caller immediately searches for a ready device. Release deliberately returns while the device is still reclaiming; ADR 0024 requires that behavior. The 200 ms idle threshold is not needed to explain this reproduction.
Carry the granted device ID through the helper and wait for that device to become ready before inspecting it and previewing cleanup. Keep the scripted slow reclaim as the regression fixture. Correct nearby claims that release waits for reclaim.
Alternatives rejected
Increase the idle threshold: does not wait for background reclaim.
Add a fixed delay: leaves another machine-speed race.
Make release await reclaim: changes the intended API behavior.
Risk
Preserve the idle demotion, dry-run proposals and absence of destructive calls, and nuke safety assertions.
Wait for the granted device, so another ready device cannot satisfy setup.
Activity
V3RON commentedon Oct 16, 2026
Handoff
Done
Read the report and claimed the issue. Created
bug/574-reprofromorigin/main; no files changed and no reproduction committed.Not done
Reproduce the failure, identify its root cause, and post the triage report.
Findings
Delivery preflight found the active checkout at
83534614andorigin/mainat2781a4e4, with differing.claudeand.agentsworkflows. The delivery skill requires a fresh session using the current workflow.Blocked on
A fresh session on current
main.Written by an agent.
V3RON commentedon Oct 16, 2026
Reproduction
The reported assertion reproduces when reclaim is slow. The unchanged file passes both tests; the reproduction adds only a 5,000 ms fake reclaim latency before
dryrun-z.Root cause
Defect in the test setup.
releaseAndForgetwaits for the release reply and holder exit, but neither proves reclaim finished. Its caller immediately searches for a ready device. Release deliberately returns while the device is still reclaiming; ADR 0024 requires that behavior. The 200 ms idle threshold is not needed to explain this reproduction.Simplest fix
Carry the granted device ID through the helper and wait for that device to become ready before inspecting it and previewing cleanup. Keep the scripted slow reclaim as the regression fixture. Correct nearby claims that release waits for reclaim.
Alternatives rejected
Risk
Written by an agent.
test: reproduce #574 — preview before reclaim finishes
V3RON commentedon Oct 16, 2026
Delivery run
Merged: #628 (#574)
Written by an agent.