Wire AI auto-reject into the fetch flow #95

Manually merged
marvin8 merged 2 commits from feat/issue-94-wire-ai-auto-reject into feat/issue-80-collect 2026-08-14 07:19:04 +00:00
Collaborator

The ai_auto_reject setting was stored but never consumed — enabling it did nothing. This wires it up: reject_ai_flagged_posts() rejects unreviewed posts where ai_would_reject is True (marking them reviewed/approved=False with the AI's reason and a review_feedback row), and the scheduler calls it right after inline classification.

Note: classification currently runs only in the scheduler's fetch job, so AI auto-reject applies there (not the manual POST /hashtags/{id}/fetch, which does not classify).

Refs #94

The `ai_auto_reject` setting was stored but never consumed — enabling it did nothing. This wires it up: `reject_ai_flagged_posts()` rejects unreviewed posts where `ai_would_reject is True` (marking them reviewed/approved=False with the AI's reason and a `review_feedback` row), and the scheduler calls it right after inline classification. Note: classification currently runs only in the scheduler's fetch job, so AI auto-reject applies there (not the manual `POST /hashtags/{id}/fetch`, which does not classify). Refs #94
wire AI auto-reject into the fetch flow
All checks were successful
/ gitleaks (pull_request) Successful in 19s
/ pr-review (pull_request) Successful in 43s
/ checks (pull_request) Successful in 2m30s
/ publish (pull_request) Has been skipped
/ publish-container (pull_request) Has been skipped
/ deploy-docs (pull_request) Has been skipped
723a3e0e7e
The ai_auto_reject setting was stored but never consumed. Add
reject_ai_flagged_posts() to reject unreviewed posts the AI would reject
(ai_would_reject=True) when the setting is enabled, and call it in the
scheduler after inline classification.
marvin8 approved these changes 2026-08-14 07:18:26 +00:00
marvin8 manually merged commit dca551f552 into feat/issue-80-collect 2026-08-14 07:19:04 +00:00
marvin8 deleted branch feat/issue-94-wire-ai-auto-reject 2026-08-14 07:19:19 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
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
marvin8/dujiangyan!95
No description provided.