Commit 45013a4
committed
fix(chat): hand off a chatless send when the probe is superseded
The previous commit made a superseded probe leave the entry queued rather than
re-send it. That is the right retry for a chat-bound key, which is the stable
chat id, but wrong for a chatless one: a `pending::` key is regenerated every
mount, so anything left under it is unreachable and the message is stranded —
the same loss this PR exists to prevent, just reached by a different route.
A superseded probe on a pending key now goes through the same recovery lanes as
the cleanup-abort path (live replacement surface, else a one-shot stored
handoff), still carrying the stream id so the next surface probes before it
sends. Skipped when the entry is no longer under that key, since adoption
migrating it to a live chat already leaves it recoverable there. The lane is
extracted so both call sites share one implementation.
The existing superseded test only asserted that nothing sent, which this bug
satisfied trivially; it now also asserts the message survives. Confirmed red
without the fix.1 parent 39e2a84 commit 45013a4
2 files changed
Lines changed: 52 additions & 16 deletions
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
519 | 519 | | |
520 | 520 | | |
521 | 521 | | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
522 | 529 | | |
523 | 530 | | |
524 | 531 | | |
| |||
Lines changed: 45 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4586 | 4586 | | |
4587 | 4587 | | |
4588 | 4588 | | |
| 4589 | + | |
| 4590 | + | |
| 4591 | + | |
| 4592 | + | |
| 4593 | + | |
| 4594 | + | |
| 4595 | + | |
| 4596 | + | |
| 4597 | + | |
| 4598 | + | |
| 4599 | + | |
| 4600 | + | |
| 4601 | + | |
| 4602 | + | |
| 4603 | + | |
| 4604 | + | |
| 4605 | + | |
| 4606 | + | |
| 4607 | + | |
| 4608 | + | |
| 4609 | + | |
| 4610 | + | |
| 4611 | + | |
| 4612 | + | |
4589 | 4613 | | |
4590 | 4614 | | |
4591 | 4615 | | |
| |||
4613 | 4637 | | |
4614 | 4638 | | |
4615 | 4639 | | |
4616 | | - | |
4617 | | - | |
4618 | | - | |
4619 | | - | |
4620 | | - | |
4621 | | - | |
4622 | | - | |
4623 | | - | |
4624 | | - | |
4625 | | - | |
4626 | | - | |
4627 | | - | |
4628 | | - | |
| 4640 | + | |
4629 | 4641 | | |
4630 | 4642 | | |
4631 | 4643 | | |
| |||
4658 | 4670 | | |
4659 | 4671 | | |
4660 | 4672 | | |
4661 | | - | |
4662 | | - | |
4663 | | - | |
| 4673 | + | |
| 4674 | + | |
| 4675 | + | |
| 4676 | + | |
| 4677 | + | |
| 4678 | + | |
| 4679 | + | |
| 4680 | + | |
| 4681 | + | |
| 4682 | + | |
| 4683 | + | |
| 4684 | + | |
| 4685 | + | |
| 4686 | + | |
| 4687 | + | |
| 4688 | + | |
| 4689 | + | |
| 4690 | + | |
| 4691 | + | |
| 4692 | + | |
4664 | 4693 | | |
4665 | 4694 | | |
4666 | 4695 | | |
| |||
0 commit comments