Repository navigation
[2.0] Fixes 38699: Never give an approval back to its requester (#38708) - #38829
Conversation
Backport of #38708, ported by hand: 2.0 has no "wait" empty-assignee strategy and gave the requester back under every strategy, so the assignAdmins fallback never ran for an event-driven approval. The requester is now never an assignee of an approval their own edit started. An emptied list goes to the node's empty-assignee strategy: none approves automatically, assignAdmins assigns the other admins and, as on main since #35740, keeps the task open when the requester is the only admin instead of approving it.
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically. Maintainers can bypass this check by adding the |
Code Review ✅ Approved 🔴 High riskShared approval logic now auto-approves under none when the requester is the sole approver, potentially allowing changes without independent review. Backport of the approval fix so an approval is never assigned back to its requester: an emptied assignee list now follows the configured strategy, with VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Not enabledFor more verification details, comment OptionsDisplay: compact → Showing compact verification results. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
Describe your changes:
Fixes #38699
Backport of #38708 to
2.0, ported by hand (the cherry-pick conflicted):SetApprovalAssigneesImplno longer gives an approval back to its requester. On 2.0 the give-back ran under every empty-assignee strategy, so withassignAdminsthe admin fallback never ran either. An emptied list now goes to the strategy:noneapproves automatically,assignAdminsassigns the other admins.assignAdmins, when the requester is the only admin, the task stays open instead of auto-approving (hasAssigneesholds forassignAdmins). Without it, that edit would approve itself.waitstrategy, so the IT matrix coversnone/assignAdmins× owners / reviewers / owners+reviewers. The 2026-10-22 decision record isn't on 2.0, so its amendment is dropped.untouchedTableinWorkflowDefinitionResourceITmade admin the only owner and the editor, so three tests only got a task through the bug. It now usesUSER2as owner, as main already does (fix(workflows): stop approvals firing on updates with no change to judge, and show the edit that opened an approval #37010).Type of change:
Tests:
SetApprovalAssigneesImplTest:Tests run: 17, Failures: 0, Errors: 0. New cases:WorkflowDefinitionResourceIT, mysql-elasticsearch, global-state lane:untouchedTablesetup above.Tests run: 15, Failures: 0, Errors: 0;test_editorWhoIsTheOnlyApproverIsNeverAskedToApproveandtest_editorIsLeftOffTheApprovalWhenSomeoneElseCanApprovepassed 6/6 each.2.0before the fix: the task went to the editor only, filed by the editor, and their resolve returned403 TaskAuthorPolicy-FilerCannotResolveOwnTask.Checklist:
Fixes #<issue-number>above.docs/decisions/2026-11-25-an-approval-never-goes-to-its-requester.md, adapted to 2.0.🤖 Generated with Claude Code