Repository navigation
Commit ef28865
committed
fix(tools): defer the queued-message handoff until the patch checkpoint completes
The per-file handlers processed queued messages right after each
successful write, before execute() awaited the whole-patch checkpoint.
processQueuedMessages schedules submitUserMessage on a timer, so a
queued turn - and the writes it triggers - could start while the
patch checkpoint was still staging and committing, interleaving its
own checkpoint with this commit. The handoff is now deferred to after
the checkpoint attempt: one handoff per successful patch, independent
of the checkpoint setting or outcome, so no path strands queued
messages and no queued turn can race the commit. This matches the
semantics the journal-carrying unit of this series already settled on
and brings the remaining units in line.
Review feedback on PR 1404; ports carry the equivalent deferral and
ordering tests.1 parent af18969 commit ef28865
2 files changed
Lines changed: 39 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
239 | 239 | | |
240 | 240 | | |
241 | 241 | | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
242 | 251 | | |
243 | 252 | | |
244 | 253 | | |
| |||
349 | 358 | | |
350 | 359 | | |
351 | 360 | | |
352 | | - | |
353 | 361 | | |
354 | 362 | | |
355 | 363 | | |
| |||
421 | 429 | | |
422 | 430 | | |
423 | 431 | | |
424 | | - | |
425 | 432 | | |
426 | 433 | | |
427 | 434 | | |
| |||
616 | 623 | | |
617 | 624 | | |
618 | 625 | | |
619 | | - | |
620 | 626 | | |
621 | 627 | | |
622 | 628 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
195 | 195 | | |
196 | 196 | | |
197 | 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 | + | |
198 | 228 | | |
199 | 229 | | |
200 | 230 | | |
| |||
0 commit comments