Repository navigation
Commit eaa9c82
committed
[Fix] Keep the queued-feedback row record consistent when say rejects
What: `persistQueuedFeedbackAndAcknowledge` now records the message id in
`queuedFeedbackRowWritten` before awaiting `say`, and removes that record in
the catch when `clineMessages` did not grow, so the record tracks whether the
`user_feedback` row actually landed. The same catch releases the claim through
`releaseUnconsumedQueuedMessage`, matching the exhausted-retry path, and
rethrows.
Why: `say` can reject after `addToClineMessages` pushed the row, because that
method pushes synchronously and then emits `RooCodeMessage` event, which a
consumer listener can throw from. The previous record-after-return shape left
the id unrecorded on that path, so a later reclaim appended a duplicate row;
recording before the await alone would instead drop the row when `say` rejects
before appending. The array-length delta discriminates the two sub-branches
exactly, since the append is synchronous and precedes every await in
`addToClineMessages`.
Impact: a reclaimed queued message appends exactly one `user_feedback` row in
both throw orderings, and the claim stays reclaimable instead of leaking as
claimed. No public API change; committed non-test budget stays at 500/500 and
the changed-executable-line gate is 230/500. Two regression tests cover the
throw-before-append and throw-after-append branches; each naive ordering is
killed by the branch it breaks.1 parent bd2769f commit eaa9c82
3 files changed
Lines changed: 114 additions & 48 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
520 | 520 | | |
521 | 521 | | |
522 | 522 | | |
523 | | - | |
524 | | - | |
| 523 | + | |
| 524 | + | |
525 | 525 | | |
526 | 526 | | |
527 | 527 | | |
| |||
1119 | 1119 | | |
1120 | 1120 | | |
1121 | 1121 | | |
1122 | | - | |
| 1122 | + | |
| 1123 | + | |
| 1124 | + | |
1123 | 1125 | | |
1124 | | - | |
| 1126 | + | |
1125 | 1127 | | |
| 1128 | + | |
| 1129 | + | |
| 1130 | + | |
| 1131 | + | |
| 1132 | + | |
| 1133 | + | |
| 1134 | + | |
| 1135 | + | |
| 1136 | + | |
| 1137 | + | |
| 1138 | + | |
1126 | 1139 | | |
1127 | 1140 | | |
1128 | 1141 | | |
| |||
1266 | 1279 | | |
1267 | 1280 | | |
1268 | 1281 | | |
1269 | | - | |
1270 | | - | |
1271 | | - | |
| 1282 | + | |
| 1283 | + | |
1272 | 1284 | | |
1273 | 1285 | | |
1274 | 1286 | | |
| |||
1427 | 1439 | | |
1428 | 1440 | | |
1429 | 1441 | | |
1430 | | - | |
1431 | | - | |
1432 | | - | |
1433 | | - | |
| 1442 | + | |
| 1443 | + | |
| 1444 | + | |
1434 | 1445 | | |
1435 | 1446 | | |
1436 | 1447 | | |
| |||
2499 | 2510 | | |
2500 | 2511 | | |
2501 | 2512 | | |
2502 | | - | |
2503 | | - | |
| 2513 | + | |
| 2514 | + | |
2504 | 2515 | | |
2505 | 2516 | | |
2506 | 2517 | | |
| |||
2640 | 2651 | | |
2641 | 2652 | | |
2642 | 2653 | | |
2643 | | - | |
| 2654 | + | |
2644 | 2655 | | |
2645 | 2656 | | |
2646 | 2657 | | |
| |||
6555 | 6566 | | |
6556 | 6567 | | |
6557 | 6568 | | |
6558 | | - | |
6559 | | - | |
6560 | | - | |
| 6569 | + | |
| 6570 | + | |
6561 | 6571 | | |
6562 | 6572 | | |
6563 | 6573 | | |
| |||
6591 | 6601 | | |
6592 | 6602 | | |
6593 | 6603 | | |
6594 | | - | |
| 6604 | + | |
6595 | 6605 | | |
6596 | 6606 | | |
6597 | 6607 | | |
| |||
6601 | 6611 | | |
6602 | 6612 | | |
6603 | 6613 | | |
6604 | | - | |
6605 | | - | |
| 6614 | + | |
6606 | 6615 | | |
6607 | 6616 | | |
6608 | 6617 | | |
| |||
6621 | 6630 | | |
6622 | 6631 | | |
6623 | 6632 | | |
6624 | | - | |
6625 | | - | |
| 6633 | + | |
6626 | 6634 | | |
6627 | 6635 | | |
6628 | 6636 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
31 | 35 | | |
32 | 36 | | |
33 | 37 | | |
| |||
496 | 500 | | |
497 | 501 | | |
498 | 502 | | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
499 | 565 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
332 | 332 | | |
333 | 333 | | |
334 | 334 | | |
335 | | - | |
336 | | - | |
| 335 | + | |
337 | 336 | | |
338 | 337 | | |
339 | 338 | | |
| |||
368 | 367 | | |
369 | 368 | | |
370 | 369 | | |
371 | | - | |
372 | | - | |
373 | | - | |
| 370 | + | |
| 371 | + | |
374 | 372 | | |
375 | 373 | | |
376 | 374 | | |
| |||
406 | 404 | | |
407 | 405 | | |
408 | 406 | | |
409 | | - | |
410 | 407 | | |
411 | 408 | | |
412 | 409 | | |
413 | | - | |
414 | | - | |
415 | | - | |
| 410 | + | |
| 411 | + | |
416 | 412 | | |
417 | 413 | | |
418 | 414 | | |
| |||
455 | 451 | | |
456 | 452 | | |
457 | 453 | | |
458 | | - | |
| 454 | + | |
459 | 455 | | |
460 | | - | |
| 456 | + | |
461 | 457 | | |
462 | 458 | | |
463 | 459 | | |
| |||
653 | 649 | | |
654 | 650 | | |
655 | 651 | | |
656 | | - | |
657 | | - | |
658 | | - | |
659 | | - | |
| 652 | + | |
| 653 | + | |
660 | 654 | | |
661 | 655 | | |
662 | 656 | | |
663 | 657 | | |
664 | | - | |
665 | | - | |
666 | | - | |
667 | | - | |
668 | | - | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
669 | 662 | | |
670 | 663 | | |
671 | 664 | | |
672 | 665 | | |
673 | | - | |
674 | | - | |
675 | | - | |
676 | | - | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
677 | 669 | | |
678 | 670 | | |
679 | 671 | | |
| |||
0 commit comments