[claude] Fix moderation infinite re-review loop (#27) #71

Merged
claude merged 1 commits from claude/issue-27 into main 2026-03-23 00:44:58 +00:00

1 Commits

Author SHA1 Message Date
Alexander Whitestone
ce3d6ffb4d fix: break moderation infinite re-review loop by adding 'flagged' status
Some checks failed
CI / Typecheck & Lint (pull_request) Failing after 1s
When AI flags an event, transition status to 'flagged' instead of
leaving it as 'pending'. This prevents processPending() from picking
up the same flagged events every 30-second poll cycle and burning
AI tokens indefinitely.

- Add 'flagged' to QUEUE_STATUSES enum in schema
- Set status='flagged' in autoReview() when AI flags an event
- Include flagged count in admin stats endpoint
- Add index on relay_event_queue.status for efficient queries

Fixes #27

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 20:42:13 -04:00