feat: approval reassignment — escalate to next admin or specific admin#1
Draft
Copilot wants to merge 1 commit into
Draft
feat: approval reassignment — escalate to next admin or specific admin#1Copilot wants to merge 1 commit into
Copilot wants to merge 1 commit into
Conversation
…ign_approval MCP tool
Copilot created this pull request from a session on behalf of
sirpy
June 25, 2026 13:01
View session
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Approval requests were delivered to a single admin with no fallback. If that admin was unavailable, the request stalled indefinitely with no recourse.
Changes
DB
notified_approver_ids TEXT(JSON array) topending_approvals— tracks which admins have already received a card for a given approval.Core approval logic (
primitive.ts)pickApprovalDelivery()gains an optionalexclude: string[]param; skips already-notified user IDs when picking the next target.requestApproval()now stamps the chosen recipient intonotified_approver_idson every new row.reassignApproval({ approvalId, toUserId? })function: re-delivers the card to the next eligible admin (skipping notified ones), or to an explicit--totarget (validated to have admin privilege). Updatesapprover_user_idand extendsnotified_approver_idsatomically.CLI —
ncl approvals reassignAuto-picks the next un-notified admin in priority order (scoped admins → global admins → owners), or force-routes to a specific user. Errors clearly when all admins are exhausted or the explicit target lacks privilege.
Container MCP tool —
reassign_approval{ "action": "reassign_approval", "approval_id": "appr-...", "to_user_id": "telegram:123" }Agent writes this to
messages_out; the host picks it up via a registered delivery action. Cross-group attempts (approval belongs to a different agent group's session) are blocked at the host before callingreassignApproval.