GPT-5 finding
Comment claims a partial index, but code defines a non-partial index on reviews_processing_lookup_idx
- apps/web/db/schema.ts
- apps/web/db/migrations/meta/0008_snapshot.json
The comment states a partial index is used, but both the schema and snapshot show a regular btree index without a WHERE predicate. This is a documentation mismatch that could mislead operators about performance characteristics.
Recommendation
Either implement a partial index (e.g., WHERE processing_status IN ('pending','pending_retry','in_progress') AND next_retry_at IS NOT NULL) via a migration, or update the comment to reflect the actual non-partial index.