Repository navigation
fix(test): the nested CSS watch test tolerates a save that rebuilds twice - #496
Merged
Merged
Conversation
…wice A plain write truncates the file and then writes it, which can fire two watch events. The test took one queued result per write, so a second identical refusal could stand in for the fixed build and fail on CI. Saves are now renamed into place, and `next()` skips a result identical to the one it last returned, mirroring the dev server's watch test. Closes #487 Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
allisonmahmood
force-pushed
the
t3code/implement-issue-487
branch
from
October 3, 2026 19:37
7d67712 to
88101a5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
The nested CSS watch test in
pageImports.test.tsflaked on CI (test (22)on #485). It read one watcher result per file write. A plain write truncates and then writes, which can trigger two rebuilds, so a stale duplicate refusal could stand in for the fixed build.The test now saves by renaming a complete file into place, and its
next()skips a result identical to the one it last returned. These are the mitigations the dev server's watch test already uses (saveandinspectedChangesindevServerWatch.test.ts). Assertions stay outside the wait, so a new error or unexpected CSS still fails. No production code changes; triage found no production defect.Closes #487
How it was verified
pnpm testpasses locallyAdded or updated tests covering this change
Temporary checks (not shipped): pushing a duplicate refusal into the queue before and after the fix write fails the old test, and the new test reaches the blue build. The new test still fails on a differing refusal after the fix, or on a fix that writes green instead of blue.
isDeepStrictEqualtreats twoLocalErrorrefusals with the same code and message as equal, and different ones as unequal, on Node 22.22.0 and 24.20.0.Looped 50 times each on Node 22.22.0 and 24.20.0, run concurrently: 100/100 passed.
pnpm verify: format, lint, typecheck, test (1625/1625), postgres-concurrency, cli-smoke, tier2-smoke and browser pass.After rebasing onto
b320800(fix(analytics): a nested invocation's db_ms no longer exceeds its parent's #497), which adds an unrelatedit.eachbuild test to the same file: looped 25 times each on Node 22.22.0 and 24.20.0, 50/50 passed; format, lint and test typecheck pass.Release impact
Review
/code-reviewstandards and spec passes: no hard findings. The file's node-builtin waiver reason now covers the deep comparison.Made by Claude Opus 5.5 via Claude Code; reviewed by GPT 6.1 Sol via codex.