Found during C2 review (PR #170, round 2). ~30-40% of FULL-suite bun x vitest run runs in workers/vault fail the voice-tier test with double-metered minutes (596 vs 598). Never reproduces running the file in isolation.
Bisected properly: reproduced at the identical rate at the pre-round-2 commit (4d4926f) AND traced to a TOCTOU window in transcribeOne's "is this attachment still pending" check — only reachable when the vitest pool interleaves two alarm() invocations under load. Real Cloudflare DOs serialize alarm invocations, so no production exposure is believed — but the C2 reviewer is delivering an independent judgment on that claim (will be appended here).
Impact: can occasionally flake an unrelated PR's CI. Options: (a) serialize alarm invocations in the test harness to match real DO semantics, (b) make transcribeOne's pending-check compare-and-set atomic (also hardens production against future workerd semantic changes), (c) both.
Related: the alarmRunning reentrancy guard added in #170 narrows but does not close this window under the pool's concurrency model.
Found during C2 review (PR #170, round 2). ~30-40% of FULL-suite
bun x vitest runruns in workers/vault fail the voice-tier test with double-metered minutes (596 vs 598). Never reproduces running the file in isolation.Bisected properly: reproduced at the identical rate at the pre-round-2 commit (4d4926f) AND traced to a TOCTOU window in
transcribeOne's "is this attachment still pending" check — only reachable when the vitest pool interleaves twoalarm()invocations under load. Real Cloudflare DOs serialize alarm invocations, so no production exposure is believed — but the C2 reviewer is delivering an independent judgment on that claim (will be appended here).Impact: can occasionally flake an unrelated PR's CI. Options: (a) serialize alarm invocations in the test harness to match real DO semantics, (b) make transcribeOne's pending-check compare-and-set atomic (also hardens production against future workerd semantic changes), (c) both.
Related: the
alarmRunningreentrancy guard added in #170 narrows but does not close this window under the pool's concurrency model.