Commit 0d5c6b0
committed
feat(orchestration): platform settles the comment + sub-issue on iteration done — 👀→✅/❌ + In Review (aws-samples#247 UX.21)
User-caught, three symptoms one cause: after a comment-iteration finishes,
(1) the trigger comment stayed on 👀 forever (never ✅), (2) the sub-issue
state flapped In Progress/In Review, and (3) the panel showed ✅ (correct,
reads child_status) while the sub-issue said In Progress — three views
disagreeing. Root cause: the reconciler posted the threaded ✅/❌ reply but
never settled the comment REACTION or the sub-issue STATE; state was
delegated to the AGENT via a prompt instruction (non-deterministic, raced,
got stuck).
Fix: the platform now owns settlement (as it already does for the parent
epic's reaction/state). In replyToIterationComment, after the reply:
- swap the TRIGGER comment 👀 → ✅ (success) / ❌ (failure) so the comment
reads done at a glance, not just the threaded reply.
- on success, advance the SUB-ISSUE to In Review (PR updated & open,
awaiting human merge — same convention the epic uses; user's choice).
On failure, leave the state (never demote). The reaction/state target
the actual trigger comment + the iterated sub-issue, so a parent-routed
comment settles the parent's comment + the footer sub-issue correctly.
Gated once-only by the existing ack_replied_at claim; both helpers are
idempotent (re-converge to one marker / skip if already in target state).
New helper swapCommentReaction (mirrors swapIssueReaction but on a COMMENT
— queries comment(id){reactions}, deletes stale bgagent markers, adds the
target; never touches a human reaction). Tests: helper (swap/idempotent/
human-safe/no-token) + reconciler success→✅+In Review, failure→❌+no
transition. 80 green across linear-feedback + reconciler suites.1 parent d817ab8 commit 0d5c6b0
4 files changed
Lines changed: 124 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| |||
682 | 682 | | |
683 | 683 | | |
684 | 684 | | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
685 | 700 | | |
686 | 701 | | |
687 | 702 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
129 | 136 | | |
130 | 137 | | |
131 | 138 | | |
| |||
434 | 441 | | |
435 | 442 | | |
436 | 443 | | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
437 | 479 | | |
438 | 480 | | |
439 | 481 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
| 47 | + | |
46 | 48 | | |
47 | 49 | | |
48 | 50 | | |
| |||
665 | 667 | | |
666 | 668 | | |
667 | 669 | | |
| 670 | + | |
668 | 671 | | |
669 | 672 | | |
670 | 673 | | |
| |||
695 | 698 | | |
696 | 699 | | |
697 | 700 | | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
698 | 705 | | |
699 | 706 | | |
700 | 707 | | |
| |||
734 | 741 | | |
735 | 742 | | |
736 | 743 | | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
737 | 748 | | |
738 | 749 | | |
739 | 750 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
| |||
339 | 340 | | |
340 | 341 | | |
341 | 342 | | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
342 | 397 | | |
343 | 398 | | |
344 | 399 | | |
| |||
0 commit comments