Repository navigation
Commit 3396f4d
AronSwan
fix(chat): surface silent contract failures in session store and delivery
Three contract gaps from #5462, Python-only, each mapped to a direction the
maintainer named; conflict detection lives in the delivery layer per that
direction, not in the store's generic replay path.
- message identity conflicts merged silently on explicit message_id replay
during return delivery, so retries that changed content left no account;
the delivery loops now compare the six semantic payload fields
(role/text/turn_id/origin/attachments/goal_draft, with per-field
normalization: a missing column folds into the canonical empty value)
against the transcript row before delivering, and a divergence records
the existing explicit_unverified status with the typed
manager_return_payload_conflict error code instead of folding into
transport retry — a retry can never fix a payload mismatch. The store's
own replay path keeps its intended idempotent semantics (replay returns
the existing row).
- an invalid external sender raised TypeError mid-loop and was folded
into the broad except with an unreadable error code; the two delivery
loops now resolve the sender shape before invoking
(_resolve_delivery_sender: attempt-aware callable or bare callable) and
record return_transport_unavailable (registered in DELIVERY_ERRORS)
with the existing retry semantics.
- omitting channel_id pins the exact goal.<goal_id> channel; that
namespace rule is now documented on the three session-resolution
methods and anchored by a test.
The checked-in project registry I/O manifest is regenerated via
scripts/generate_project_registry_io_manifest.py for the final call-site
shape (0 unclassified direct sites). No new status words: the conflict
terminal reuses the existing explicit_unverified status, so dashboard and
polling semantics of downstream readers stay unchanged; no TS changes.
Blast radius: append_message behavior is unchanged (same replay returns
the existing row); callers of the two drain loops see the same retry
semantics for transport faults; session-resolution behavior is unchanged
(docstrings only).
Regression coverage: five families (positive retry without fake receipt;
attempt-only transport; channel-scoped transcript-only completion with the
explicit channel pin asserted; payload conflict terminal state without
retry, both loops covered separately; transport-unavailable retry state),
plus replay-idempotence anchoring, normalization boundaries, and
constructor-recovery after a divergent replay.
Refs #5462
Signed-off-by: AronSwan <10492180@users.noreply.github.com>1 parent 4e820bb commit 3396f4d
5 files changed
Lines changed: 628 additions & 9 deletions
File tree
- loopx
- capabilities/manager_context
- semantics
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| 66 | + | |
| 67 | + | |
66 | 68 | | |
67 | 69 | | |
68 | 70 | | |
| |||
602 | 604 | | |
603 | 605 | | |
604 | 606 | | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
605 | 693 | | |
606 | 694 | | |
607 | 695 | | |
| |||
655 | 743 | | |
656 | 744 | | |
657 | 745 | | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
658 | 776 | | |
659 | 777 | | |
660 | 778 | | |
| |||
791 | 909 | | |
792 | 910 | | |
793 | 911 | | |
794 | | - | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
795 | 926 | | |
796 | 927 | | |
797 | | - | |
798 | | - | |
| 928 | + | |
| 929 | + | |
799 | 930 | | |
800 | 931 | | |
801 | 932 | | |
| |||
967 | 1098 | | |
968 | 1099 | | |
969 | 1100 | | |
| 1101 | + | |
| 1102 | + | |
| 1103 | + | |
| 1104 | + | |
| 1105 | + | |
| 1106 | + | |
| 1107 | + | |
| 1108 | + | |
| 1109 | + | |
| 1110 | + | |
| 1111 | + | |
| 1112 | + | |
| 1113 | + | |
| 1114 | + | |
| 1115 | + | |
| 1116 | + | |
| 1117 | + | |
| 1118 | + | |
| 1119 | + | |
| 1120 | + | |
| 1121 | + | |
| 1122 | + | |
| 1123 | + | |
| 1124 | + | |
| 1125 | + | |
| 1126 | + | |
| 1127 | + | |
| 1128 | + | |
970 | 1129 | | |
971 | 1130 | | |
972 | 1131 | | |
| |||
1121 | 1280 | | |
1122 | 1281 | | |
1123 | 1282 | | |
1124 | | - | |
| 1283 | + | |
| 1284 | + | |
| 1285 | + | |
| 1286 | + | |
| 1287 | + | |
| 1288 | + | |
| 1289 | + | |
| 1290 | + | |
| 1291 | + | |
| 1292 | + | |
| 1293 | + | |
| 1294 | + | |
| 1295 | + | |
| 1296 | + | |
| 1297 | + | |
| 1298 | + | |
| 1299 | + | |
| 1300 | + | |
| 1301 | + | |
1125 | 1302 | | |
1126 | 1303 | | |
1127 | | - | |
1128 | | - | |
| 1304 | + | |
| 1305 | + | |
1129 | 1306 | | |
1130 | 1307 | | |
1131 | 1308 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
586 | 586 | | |
587 | 587 | | |
588 | 588 | | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
589 | 595 | | |
590 | 596 | | |
591 | 597 | | |
| |||
600 | 606 | | |
601 | 607 | | |
602 | 608 | | |
603 | | - | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
604 | 615 | | |
605 | 616 | | |
606 | 617 | | |
| |||
619 | 630 | | |
620 | 631 | | |
621 | 632 | | |
622 | | - | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
623 | 641 | | |
624 | 642 | | |
625 | 643 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
263 | 263 | | |
264 | 264 | | |
265 | 265 | | |
266 | | - | |
| 266 | + | |
267 | 267 | | |
268 | 268 | | |
269 | 269 | | |
| |||
0 commit comments