Classify posts on manual fetch paths #98
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/issue-96-classify-manual-fetch"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Extracts the scheduler's inline classification into a shared
classify_posts()inservices/ai_pipeline.pyand calls it (plusreject_ai_flagged_posts) from the two other places that save new posts:POST /api/v1/hashtags/{id}/fetch(the manual fetch endpoint, and what "Fetch All Active Streams" loops over)_fetch_all_active_streamsEvery path that saves new posts now also classifies them and honours AI auto-reject.
Tests: unit tests for
classify_posts(test_ai_pipeline.py) and an API-fetch test assertingPOST /hashtags/{id}/fetchclassifies (test_api.py).Refs #96
Extract the scheduler's inline classification into a shared classify_posts() in services/ai_pipeline.py and call it (plus reject_ai_flagged_posts) from the manual POST /hashtags/{id}/fetch endpoint and the review page's _fetch_all_active_streams, so every path that saves new posts also classifies them.