Commit d346922
Make only the first rebuild wait in the newest-change test
The test gated the slow rebuild on `written.length === 0`, but the first
rebuild is suspended at that await, so the second rebuild saw a length of 0
too and waited on the same promise. Both then resolved in call order and the
assertion held even with no serialization at all — the test could not fail.
Count rebuilds instead, and wait for the first one to have actually started
before submitting the second change. Verified both directions against a
non-serialized queue: the old shape passed, the new one produces
['newer-change', 'older-change'] and fails.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Lcj4iQ3fBxMwAu2rf4zLbC1 parent 2b9a5c4 commit d346922
1 file changed
Lines changed: 11 additions & 4 deletions
Lines changed: 11 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
86 | 89 | | |
87 | 90 | | |
88 | 91 | | |
89 | 92 | | |
90 | | - | |
91 | | - | |
92 | | - | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
93 | 100 | | |
94 | 101 | | |
95 | 102 | | |
| |||
105 | 112 | | |
106 | 113 | | |
107 | 114 | | |
108 | | - | |
| 115 | + | |
109 | 116 | | |
110 | 117 | | |
111 | 118 | | |
| |||
0 commit comments