Repository navigation
Commit ebd6a64
feat(cursor-review): link every auto-approve review to the cursor-approve card (BE-20246) (#412)
* feat(cursor-review): link every auto-approve review to the cursor-approve card (BE-20246)
Every review the approver posts (decide's APPROVE, REQUEST_CHANGES and
standing block, and approve-external's standing block) now carries a link
to the status card. approve-external's approval already linked it.
The link has to be in the review when it is posted. Editing a review
afterwards would break it: an edited approval reads as stale, and the bot
never withdraws an edited request for changes. So on a PR's first round,
before any card exists, decide creates a pending card (no_decision/none)
just before the review. The round's card replaces it in the same step, by
comment id rather than a re-list, so a lagging listing cannot produce a
second card. Rounds that post no review create no pending card, and
neither does a PR the approver authored. A card that cannot be found or
created only costs the review its link.
* fix(cursor-approve): give the pending card the start phase's pass/none pair (BE-20246)
The pending card a first round creates before its review carried
no_decision/none. Agent lane readers escalate that pair to a human: one
applies needs-human-review, which withdraws the bot's approvals. A card
read in the few seconds before the round's own card replaced it could
therefore hand a PR that was being approved to a human. pass/none is the
pair render_start already writes while the axes are pending, a round in
progress with nothing to do, and every current consumer reads it that way.
The text stays "Deciding this round". A test pins the pending card's
markers to render_start's non-capped pair.
* fix(cursor-review): never strand the pending card a first round creates (BE-20246)
Review round on #412:
- decide renders the review body before it looks up or creates the card,
so a body that fails to render creates no pending card.
- A review GitHub refuses as the approver's own PR deletes the pending card
it created. An empty or stale --pr-author gets past the up-front check.
- A review that could not be withdrawn after the head/base moved, or after
a hand-off, now writes a no_decision/human card. The pending card would
otherwise keep pointing readers at that review as the decision.
- card.ensure looks again after a create that failed ambiguously, so the
caller edits a card that did land instead of posting a second one.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>1 parent 095550c commit ebd6a64
8 files changed
Lines changed: 542 additions & 23 deletions
File tree
- .github
- cursor-approve
- tests
- cursor-review
- tests
- docs/callers
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
36 | 43 | | |
37 | 44 | | |
38 | 45 | | |
| |||
496 | 503 | | |
497 | 504 | | |
498 | 505 | | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
499 | 528 | | |
500 | 529 | | |
501 | 530 | | |
| |||
722 | 751 | | |
723 | 752 | | |
724 | 753 | | |
725 | | - | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
726 | 786 | | |
727 | 787 | | |
728 | 788 | | |
729 | 789 | | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
730 | 793 | | |
731 | | - | |
| 794 | + | |
| 795 | + | |
732 | 796 | | |
733 | 797 | | |
734 | 798 | | |
| |||
795 | 859 | | |
796 | 860 | | |
797 | 861 | | |
798 | | - | |
799 | | - | |
800 | | - | |
801 | | - | |
| 862 | + | |
| 863 | + | |
802 | 864 | | |
803 | 865 | | |
804 | 866 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
132 | 146 | | |
133 | 147 | | |
134 | 148 | | |
| |||
393 | 407 | | |
394 | 408 | | |
395 | 409 | | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 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 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
396 | 522 | | |
397 | 523 | | |
398 | 524 | | |
| |||
0 commit comments