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
Console e2e: a worker is drained from Fleet with no dialog, and Undo undrains it fails on the row's drained text #886
e2e/console/actions.spec.ts:166 ('a worker is drained from Fleet with no dialog, and Undo undrains it') fails at await expect(row).toContainText("drained") (line 183): the toast shows 'drain-a drained' but the Fleet row never reads 'drained' within 5 s.
Reproduced on a machine run twice in a row on branch task/836, and on the base commit origin/task/835 (built apart, same machine): pnpm exec playwright test --project=chromium e2e/console/actions.spec.ts -g 'drained from Fleet'. So it is not caused by #836.
Defect in the test, not the console: the drain test reads the real host's load, and on a host whose data volume is 95% or more full the Fleet row's state says disk 98% instead of drained. That is why it fails on one machine and passes on CI. It still fails on origin/main after #903, and #903 is not the cause: this test does not use act and has no toast timer.
bug/886-repro (9bd3260) adds one line to e2e/console/actions.spec.ts 'a worker is drained from Fleet with no dialog, and Undo undrains it': answerWithLoad(page, { cpu: 12, disk: 98, memory: 54 }), the reading of the machine #886 was seen on. Now it fails on every machine. With disk: 40 it passes.
On origin/main with no pin, this host fails 3 of 3 runs on the same line (received …disk 98%0 / 16—54%98%). df -h /System/Volumes/Data shows 99% used.
Root cause
ui/src/model/fleet.ts:18workerHealth shows only the worst finding. A disk at 95% or more (load-thresholds.ts:7, errorPercent: 95) is error and ranks above drained (warn, fleet.ts:37), as DESIGN.md says at line 99. The console is right. The bug is at e2e/console/actions.spec.ts:166: unlike the six Fleet state tests in workers.spec.ts, it does not call answerWithoutLoad. The doc comment on that helper (e2e/console/workers-answers.ts:68) names this exact case: a drain hidden by the host's disk.
Simplest fix
Replace the repro's answerWithLoad(...) line with await answerWithoutLoad(page);. I checked this on this 98%-full host: 5 of 5 passed (--repeat-each=5).
Alternatives rejected
Rank drained above load findings: this changes the documented worst-first rule (DESIGN.md:99) to fix a test.
Assert the drain through the menu's "Undrain" label: the row's word stops being checked end to end, and the precedent is answerWithoutLoad.
Pin host load in the daemon via an env seam: production code for a problem the page-level helper already solves.
Risk
After the fix, CI cannot show the regression, since its disks are not full. Only a run on a full host proves it.
The Undo step's not.toContainText("drained") passes on a row that shows a load word. Stripping the load also makes that step meaningful.
Root cause, found during the #906 delivery run: the test reads the real host disk. On a Mac with a 99% full data volume, the Fleet row shows "disk 99%" in place of "drained", because a disk at 85% or more outranks drained in the row's status (ui/src/model/fleet.test.ts:84). So the test is not flaky. It fails on any machine whose disk is at 85% or more, and passes on CI.
Fix: pin the fake worker's disk numbers in the test fleet (or in startFleet) so no console e2e test depends on the host's free space. Other console tests that read a row's status text have the same exposure.
Activity
fix(e2e): move the mouse off the menu so a new toast is not hovered (#…
V3RON commentedon Oct 23, 2026
Reproduction
Defect in the test, not the console: the drain test reads the real host's load, and on a host whose data volume is 95% or more full the Fleet row's state says
disk 98%instead ofdrained. That is why it fails on one machine and passes on CI. It still fails onorigin/mainafter #903, and #903 is not the cause: this test does not useactand has no toast timer.bug/886-repro(9bd3260) adds one line toe2e/console/actions.spec.ts'a worker is drained from Fleet with no dialog, and Undo undrains it':answerWithLoad(page, { cpu: 12, disk: 98, memory: 54 }), the reading of the machine #886 was seen on. Now it fails on every machine. Withdisk: 40it passes.On
origin/mainwith no pin, this host fails 3 of 3 runs on the same line (received…disk 98%0 / 16—54%98%).df -h /System/Volumes/Datashows 99% used.Root cause
ui/src/model/fleet.ts:18workerHealthshows only the worst finding. A disk at 95% or more (load-thresholds.ts:7,errorPercent: 95) iserrorand ranks abovedrained(warn,fleet.ts:37), as DESIGN.md says at line 99. The console is right. The bug is ate2e/console/actions.spec.ts:166: unlike the six Fleet state tests inworkers.spec.ts, it does not callanswerWithoutLoad. The doc comment on that helper (e2e/console/workers-answers.ts:68) names this exact case: a drain hidden by the host's disk.Simplest fix
Replace the repro's
answerWithLoad(...)line withawait answerWithoutLoad(page);. I checked this on this 98%-full host: 5 of 5 passed (--repeat-each=5).Alternatives rejected
drainedabove load findings: this changes the documented worst-first rule (DESIGN.md:99) to fix a test.answerWithoutLoad.Risk
not.toContainText("drained")passes on a row that shows a load word. Stripping the load also makes that step meaningful.Written by an agent.
V3RON commentedon Oct 23, 2026
Root cause, found during the #906 delivery run: the test reads the real host disk. On a Mac with a 99% full data volume, the Fleet row shows "disk 99%" in place of "drained", because a disk at 85% or more outranks drained in the row's status (
ui/src/model/fleet.test.ts:84). So the test is not flaky. It fails on any machine whose disk is at 85% or more, and passes on CI.Fix: pin the fake worker's disk numbers in the test fleet (or in
startFleet) so no console e2e test depends on the host's free space. Other console tests that read a row's status text have the same exposure.Written by an agent.
feat(inbox): the daemon says what needs the operator: GET /v1/inbox (#…