flake: the two fixed clocks #1276 left standing — bare vi.waitFor (1 s) in the live seams, and the 5 s default in the 98 non-liveServer dashboard tests (ci run 19709) #1307
Labels
No labels
agent-blocked
agent-working
autopilot
bug
deferred
deploy-pending
enhancement
landing-pr
model-haiku
model-opus
model-sonnet
needs-design
needs-info
needs-triage
no-triage
out-of-scope
priority
ready-for-agent
ready-for-human
ready-for-session
rehearsal-183
snapshot-pending
standing-drive
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Matou/idss#1307
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Symptom
cirun 19709 (push,8910b1bf) reddened the TypeScript: build (tsc), test (vitest), lint (eslint) stage:Not a regression. Both files pass green on the same commit, on the same host, while the rehearsal drive was still running: 21/21 in 6.0 s —
provisionSetup16 tests in 397 ms,mountProvisioningUpdates5 tests in 604 ms. A test whose steady-state cost is 0.4 s does not fail an assertion at 5 s; the budget expired.Root cause — the two fixed clocks #1276 left standing
8654c88f(#1276) closed the 5 s-default class for the live seams by puttingvi.setConfig({ testTimeout: 30_000, hookTimeout: 30_000 })at the top ofdashboard/tests/support/liveServer.ts, so the budget rides in from the shared import. Two clocks survive it, and this run hit one of each:vi.waitFor's own 1 s default — independent oftestTimeout, so the 30 s outer budget does not cover it (this is exactly #1249's clock, back in a different file).mountProvisioningUpdates.test.tsdoes importliveServer, and has 9 barevi.waitFor(...)calls, none passing{ timeout }. Line 180 is one of them:On expiry
waitForrethrows the last assertion — henceexpected false to be truerather than a timeout message. The live aggregating read simply had not landed inside 1 s.The 5 s
testTimeoutin every file that does NOT importliveServer— 98 of the 122 dashboard unit files.provisionSetup.test.tsis one: pure happy-dom overFakeAssessSource, no socket at all, and it still blew 5 s. Vue SFC compile + collect is the cost (collect alone measured 6.23 s locally), so a fake-only file is just as load-sensitive as a live one. #1276's fix is scoped to the liveServer import by design, so it can never reach these.Why the host was slow (context, not the fix)
This host runs
DRIVE_EXCLUSIVE=slot(scripts/rehearsal-cycle.sh), which deliberately lets a rehearsal drive hold one pooled slot while another heavy consumer holds the other. At the failure window that was: the ci seam's ~15 forked vitest workers (pnpm -r run test) on/tmp/matou-swarm.lock(acquired 22:31:22) co-running with rehearsal drive20260907T221610Zon/tmp/matou-host-slot-2.lock— a qemu guest at ~98% CPU (3.7 GB RSS) plus Xvfb and three Playwright chrome-headless processes. Host at capture: load 9.70 / 18.69 / 11.15 on 8 CPUs, swap 4095 MB of 4095 MB used (0 free). This is the shape.forgejo/workflows/ci.ymlalready warns about (#1230 / matou-app#268). It is permitted by host policy, so the durable fix is the budgets, not the policy.Suggested fix (closes the class, both halves)
waitForclock from the same single source#1276used — e.g. export awaitForLive(fn)fromtests/support/liveServer.tsthat applies a 30 s{ timeout }, and convert the barevi.waitForcall sites in the 24*Live/*Entry/mount seams. SettingtestTimeoutalone provably does not coverwaitFor(this run is the proof).dashboard/vitest.config.ts(test.testTimeout/test.hookTimeout) so the 98 non-liveServer files stop riding vitest's 5 s.liveServer.ts'svi.setConfigstill wins where it is imported; one source of truth per scope.testTimeout/hookTimeoutdoes not boundvi.waitFor,vi.waitUntilorexpect.poll— each carries its own 1 s default and must be raised at its own call site.Prior art
#1249 (
vi.waitFor1 s,pendingLive) → closed. #1276 (5 stestTimeout,pendingLive) → closed by8654c88f. This is the third recurrence of the same class in the same suite; the previous two fixes were each scoped narrower than the class.Filed by the swarm healer for ci run 19709 (signature
41caf9190ae5). Evidence:/tmp/matou-heal-Matou-idss.dJcz0h.swarm-claim host=matou-dev-server-01 run=19738
(automated multi-host claim — lowest live claim id works this ticket)
close-report for #1307 — status
success✅ close-report gates passed — every claim verified against main; issue closed.
envelope