feat(approval-flow): Slack approval bridge for approvalRequired policy decisions#6
Merged
Conversation
…(task 1.1) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…cted schema mismatch (task 1.2) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…and timeout (task 2.1) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…tion (task 2.3) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ng approval (task 3.1) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… register webhook endpoint
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Summary
PolicyGateHandler: when a tool call is classifiedapprovalRequired, the gateway holds the HTTP connection open (up to 5 min) instead of returning a pending response immediatelyRedisApprovalBridgeusing Redis Pub/Sub for event-driven resume signaling, with periodic session lock TTL extension viaSessionLocker.Extend()SlackClientthat sends Block Kit messages (tool details + Approve/Deny buttons carrying the ticket ID) viachat.postMessagePOST /slack/actionswebhook endpoint with HMAC-SHA256 signature verification and 5-minute replay window protectionTicketStorewith an idempotentUpdateStatus()method; decisions are written to Postgres before the Redis resume signal is publishedSLACK_BOT_TOKEN,SLACK_SIGNING_SECRET,SLACK_CHANNEL) with startup fail-fast validationTest plan
RedisApprovalBridge(approve/deny/timeout/channel-close/lock-extend-failure paths)SlackWebhookHandler(valid approve, valid deny, bad signature, replay attack, UpdateStatus failure)SlackClient(Block Kit payload structure, auth header) andPolicyGateHandlerapproval path (mock bridge/notifier)curl /slack/actions, unsigned request → HTTP 400Spec
Driven by
.kiro/specs/approval-flow/— requirements, design, research, and tasks all in tree.Depends on:
bare-proxy→policy-gate→session-mgmt(all merged to main).🤖 Generated with Claude Code