FiCl Dev Blog한국어

[PR #198·199·200] Three Tests That Failed Now and Then: The Cost the First Test Carries Alone, and the Cost of Building a Failure Message

Work completed 2026-11-08 15:05 KST · Published 2026-11-11 03:43 KST · AI model used for the work Claude Opus 5.5

[PR #198·199·200] Three Tests That Failed Now and Then: The Cost the First Test Carries Alone, and the Cost of Building a Failure MessageSummary figure. The causes and fixes of three tests that failed only now and then in full verification, and how step-by-step timing found the causesPR #198·199·200Three Tests That Failed Now and ThenNone of the three was a bug in the app codeI merge on verify resultsClaude measured and fixed1PR 198 date tableThe file's first test carriesthe first render aloneHit the 1 s waitFor default3 s on the first waitFor only2PR 199 bottom menuFirst test draws the appin 517 ms, others 52–58 msHit the 5 s per-test limit15 s for this test only3PR 200 home gaugeBuilding the failure messagetakes 0.45 s each timeHit the 5 s limitCheck "the count found is 0"How the causes were foundKeeping the CPU busy on purpose reproduces the occasional failure rightaway. In tests with a fake clock, time was measured with a real clock.KeyPasses alone but sometimes fails in full: lookat the first test and failure-message cost.FiCl Dev Blog · Post summary figure
[PR #198·199·200] Three Tests That Failed Now and Then: The Cost the First Test Carries Alone, and the Cost of Building a Failure MessageSummary figure. The causes and fixes of three tests that failed only now and then in full verification, and how step-by-step timing found the causesPR #198·199·200Three Tests That Failed Now and ThenNone of the three was a bug in the app codeI merge on verify resultsClaude measured and fixed1PR 198 date tableThe file's first test carriesthe first render aloneHit the 1 s waitFor default3 s on the first waitFor only2PR 199 bottom menuFirst test draws the appin 517 ms, others 52–58 msHit the 5 s per-test limit15 s for this test only3PR 200 home gaugeBuilding the failure messagetakes 0.45 s each timeHit the 5 s limitCheck "the count found is 0"How the causes were foundKeeping the CPU busy on purpose reproduces the occasional failure rightaway. In tests with a fake clock, time was measured with a real clock.KeyPasses alone but sometimes fails in full: lookat the first test and failure-message cost.FiCl Dev Blog · Post summary figure

I merge after running full verification (npm run verify) on my Windows computer. So even one test that fails now and then blocks merging. While another PR was being checked, three tests each failed once, and the sessions doing those checks handed each fix off separately. All three PRs were done by Claude Code (Claude Opus 5.5) on my Windows computer, and in none of the three cases was it a bug in the app code.

The three tests side by side:

Item PR 198 (admin web date table) PR 199 (customer app bottom menu) PR 200 (customer app home gauge)
Limit hit waitFor default 1 s 5 s per test 5 s per test
Cause The file’s first test carries the first-render cost alone The file’s first test carries the library’s first-render cost alone A failed check spends 0.45 s building its failure message
Fix 3 s limit on the first waitFor only 15 s time limit on this test only Check that “the count found is 0”

PR 198: Admin web date table

PR 199: Customer app bottom menu

PR 200: Customer app home gauge

Here is what each check style cost when made to fail on purpose.

Check style Time per failure
expect(queryByLabelText(..)).toBeNull() (before) 454 ms
expect(queryAllByLabelText(..)).toHaveLength(0) 136 ms
expect(queryAllByLabelText(..).length).toBe(0) (after) 9 ms
expect(..).not.toBeOnTheScreen() 9 ms

Lessons