Classify posts on manual fetch paths #98

Manually merged
marvin8 merged 1 commit from feat/issue-96-classify-manual-fetch into feat/issue-80-collect 2026-08-14 21:09:31 +00:00
Collaborator

Extracts the scheduler's inline classification into a shared classify_posts() in services/ai_pipeline.py and calls it (plus reject_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)
  • the review page's liveview _fetch_all_active_streams

Every 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 asserting POST /hashtags/{id}/fetch classifies (test_api.py).

Refs #96

Extracts the scheduler's inline classification into a shared `classify_posts()` in `services/ai_pipeline.py` and calls it (plus `reject_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) - the review page's liveview `_fetch_all_active_streams` Every 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 asserting `POST /hashtags/{id}/fetch` classifies (`test_api.py`). Refs #96
classify posts on manual fetch paths too
All checks were successful
/ gitleaks (pull_request) Successful in 17s
/ pr-review (pull_request) Successful in 46s
/ checks (pull_request) Successful in 2m31s
/ publish (pull_request) Has been skipped
/ publish-container (pull_request) Has been skipped
/ deploy-docs (pull_request) Has been skipped
f2a8e141fe
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.
marvin8 approved these changes 2026-08-14 09:55:37 +00:00
marvin8 manually merged commit c592953b0e into feat/issue-80-collect 2026-08-14 21:09:31 +00:00
marvin8 deleted branch feat/issue-96-classify-manual-fetch 2026-08-14 21:09:44 +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!98
No description provided.