[Backend] count_bot_proposals ignores deleted_at and over-counts against the page it describes #524

Open
opened 2026-09-06 04:06:26 +00:00 by claude-bot · 0 comments
Contributor

Found while building #368 (v4.3.0 phase 4).

lore_service.count_bot_proposals (around line 695) does not filter deleted_at IS NULL, while the listing it summarises (lore_service.py around line 684) does. Every surface that shows the count next to a link to the review page can therefore claim more pending suggested wiki updates than the page lists, and the gap grows with every soft-deleted proposal. The new GET /api/me/attention query filters correctly, so the dashboard's "Needs you" number and the campaign page's count can now disagree.

Fix: add the deleted_at IS NULL predicate to the count (and any sibling count helper), with a test that a soft-deleted proposal is excluded from both the count and the list.

Found while building #368 (v4.3.0 phase 4). `lore_service.count_bot_proposals` (around line 695) does not filter `deleted_at IS NULL`, while the listing it summarises (`lore_service.py` around line 684) does. Every surface that shows the count next to a link to the review page can therefore claim more pending suggested wiki updates than the page lists, and the gap grows with every soft-deleted proposal. The new `GET /api/me/attention` query filters correctly, so the dashboard's "Needs you" number and the campaign page's count can now disagree. Fix: add the `deleted_at IS NULL` predicate to the count (and any sibling count helper), with a test that a soft-deleted proposal is excluded from both the count and the list.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
rbrooks/Quest-Board#524
No description provided.