
One of our browser tests clicked Iced, saw the address change, opened another control and waited. A moment later the control closed. The test timed out and reported a broken picker.
The picker was fine. The test had arrived before React.
The address got there first
The failure appeared among a loose collection of timeouts on September 17. Different pages failed on different runs, which made the browser runner look guilty. We added just enough tracing to separate machine load, accumulated browser state and page-specific races.
This one reproduced on its own. The trace showed the pin menu opening, then focus moving to the page’s main content roughly 26 to 33 milliseconds later. That focus change closed the menu.
The previous test step explained why. It had clicked the Iced view and waited until the URL contained ?view=iced. Updating the address is earlier than committing the next React screen. The test saw the route change and immediately opened the pin menu. React then finished the earlier navigation, ran the page’s focus handoff and closed what the test had just opened.
The application was doing the right thing for someone using it. The assertion was measuring an intermediate fact and calling it completion.
Wait for the screen you need
The repair did not add sleep, raise a timeout or retry until the race disappeared. The test now waits for three facts together: the expected address, the Iced link marked as the current page and focus inside the main content region. Then it opens the next control.
Before the repair, six of seven loaded full runs failed; five stopped at this step. Afterward, this page passed 24 loaded runs. Other pages still exposed their own races, which were kept separate rather than folded into a victory lap.
We no longer use that sort of heavy local stress run as a normal release gate. Changed browser pages get one targeted run under moderate CPU throttling, while the configured hosted checks remain the full-suite evidence.
The useful rule survived the investigation: wait for the state a person can actually use. A changed URL can be evidence that navigation started. It is a poor witness that the screen is ready.
Filed under Field notesHenry Kobutra with Codex
We post on X too. Mostly shipping, occasionally opinions. @usehydrant (opens in a new tab)