Commit c9c5b2c
Root cause, confirmed via real CI history (6/6 shard-1 failures, all
after goal 0017 merged, zero before) and local reproduction (9/20
clean-canvas repeats failed with zero artificial load): goal 0017 gave
every direct-mutation service its own dataevent.Emit call, so a single
MCP update_workflow write now fires mill-data-changed TWICE
(SnapshotDraft + UpdateWorkflow) plus a third echo from the test's own
prior UI-driven CreateWorkflow. None carry payload content, so each
handler independently refetches — three fetches racing meant whichever
resolved last won unconditionally, letting a stale response beat an
already-applied newer one and wrongly show the external-change banner
on a clean canvas.
Fixed in useCanvasLiveSync.ts with a monotonic request-sequence guard
(the standard out-of-order-async-response fix): drop a fetch response
once a newer mill-data-changed event has arrived since it was
dispatched. Verified: 88 consecutive clean local repeats post-fix vs.
9/20 before it, same build.
Also: canvas-live-sync.spec.ts's cleanup hardened into an outer
try/finally (both tests) so a future assertion failure can't leave an
undeleted workflow / unattended-MCP-writes settings for later tests in
the same worker — defense-in-depth for the observed cascade,
independent of the root-cause fix. resizable-table.spec.ts's one
occurrence (PR #24, drag-handle bounding box) hardened with a
condition-based expect.poll wait at the point of use, additive to the
suite's existing retries: 1 (goal 0024 precedent, untouched).
BACKLOG.md Standing #1 checked off with the full root-cause writeup;
SPEC.md's realtime-lock section gets an Update note generalizing the
lesson for future mill-data-changed consumers.
Claude-Session: https://claude.ai/code/session_018pkViCNAuZp2vBv2K9AbUh
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
1 parent a54c27f commit c9c5b2c
3 files changed
Lines changed: 114 additions & 41 deletions
File tree
- frontend
- e2e
- src/composition
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
128 | 148 | | |
129 | 149 | | |
130 | 150 | | |
| |||
138 | 158 | | |
139 | 159 | | |
140 | 160 | | |
141 | | - | |
142 | 161 | | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
152 | 176 | | |
153 | | - | |
| 177 | + | |
154 | 178 | | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | 179 | | |
160 | 180 | | |
161 | 181 | | |
| |||
180 | 200 | | |
181 | 201 | | |
182 | 202 | | |
183 | | - | |
184 | 203 | | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
204 | 228 | | |
205 | | - | |
| 229 | + | |
206 | 230 | | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | 231 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
29 | 40 | | |
30 | 41 | | |
31 | 42 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
103 | 138 | | |
104 | 139 | | |
105 | 140 | | |
106 | 141 | | |
107 | 142 | | |
| 143 | + | |
108 | 144 | | |
109 | 145 | | |
110 | | - | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
111 | 153 | | |
112 | 154 | | |
113 | 155 | | |
| |||
0 commit comments