Skip to content

Conversation

@dtsong
Copy link
Owner

@dtsong dtsong commented Jan 23, 2026

Summary

  • Store approval decisions in Supabase with full audit trail
  • Track who approved/overrode/dismissed and when, with optional reason
  • Query helpers for pending reviews and audit history
  • Database schema with approval_decisions table

Changes

  • src/pr_review_agent/escalation/approval.py — ApprovalManager + ApprovalDecision dataclass
  • database/schema.sql — approval_decisions table with indexes
  • tests/test_approval.py — 10 tests covering all methods

Test plan

  • 10 unit tests passing
  • Lint clean
  • Schema matches existing Supabase patterns

Closes #15

🤖 Generated with Claude Code

dtsong and others added 3 commits January 23, 2026 09:51
- Add EscalationConfig with webhook_url, trigger threshold, slack_format
- Create escalation/webhook.py with Slack and generic JSON formatters
- Integrate into review pipeline: fires webhook when confidence < threshold
- 14 tests covering escalation logic, payload formatting, webhook delivery

Implements #8

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Queue page at /queue showing pending escalated reviews
- Filter by repo, confidence level, and age
- Actions: Approve AI review, Override (human), Dismiss
- Navigation link from main dashboard
- EscalatedReview interface in supabase lib

Implements #13

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- ApprovalManager for recording decisions in Supabase
- approval_decisions table with audit trail (who, when, reason)
- Updates review_events outcome on decision
- Queries for pending reviews and audit trail with repo filtering
- 10 tests covering all manager methods

Implements #15

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@dtsong dtsong merged commit 2d4c9a7 into main Jan 23, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Phase 4.3] Approval Workflow

2 participants