ActionTier === 'write') or read/propose actions configured with requireNamedApproval: true never execute autonomously without explicit sign-off from a named individual human approver.
Why Named Individual IDs Matter
Insrc/registry.ts, isIndividualHumanId(id) explicitly rejects shared handles (team-*, group-*, ops-*, finance-*, security-*, channel-*, dl-*, @here, @channel, @everyone, and email lists). Registering a ToolPolicy with a group handle throws immediately at startup.
This guarantees every production mutation carries single-person accountability in audit_ledger.approver_id.
Ticket Binding & Replay Protection
When a write request arrives without a signedapprovalTicketId:
GovernanceGatewayvalidates thatrequest.idempotencyKeyis non-empty (blocking fail-closed otherwise).ApprovalGate.createOrGetPending()mints a short-lived ticket (30-minute default TTL) pinned to{ agentId, toolName, inputSha256, idempotencyKey, assignedApprovers }.buildSlackApprovalCard(ticket)(src/slack-bot.ts) renders the exact agent, ticket ID, truncatedinputSha256digest, summary JSON, and named approvers withApprove & Execute(ta_approve) andReject(ta_reject) actions.GovernanceGatewaylogs anapproval_transitionentry (decision: 'require_approval') and returnsstatus: 'pending_approval'.
HMAC Verification & Webhook Handler
src/slack-bot.ts verifies Slack interactivity payloads before passing decisions to ApprovalGate:
verifySlackSignature()validatesX-Slack-Request-Timestampwithin a strict 300-second (5-minute) replay window.- Computes
v0=${HMAC_SHA256(signingSecret, "v0:" + timestamp + ":" + rawBody)}and compares viacrypto.timingSafeEqual. createSlackWebhookHandler()maps Slack user IDs to internal individual approver IDs (slackUserToApproverId) and rejects unauthorized clickers (403 Forbidden).
Duplicate-Click & Parameter-Drift Protection
- Payload tampering after approval: If arguments change between sign-off and execution retry,
inputSha256mismatches the approved ticket and execution blocks (ASI02,ASI03). - Duplicate click / retry replay: Calling
gateway.execute()again with the sameidempotencyKeyand identicalinputSha256returns{ status: 'executed', idempotentReplay: true, output }without re-runningexecutor(request). Reusing anidempotencyKeywith a modified payload is blocked as anidempotencyconflict.