chrysopedia/backend
jlightner e80094dc05 feat: Truncation detection, batched classification, and pipeline auto-resume
Three resilience improvements to the pipeline:

1. LLMResponse(str) subclass carries finish_reason metadata from the LLM.
   _safe_parse_llm_response detects truncation (finish=length) and raises
   LLMTruncationError instead of wastefully retrying with a JSON nudge
   that makes the prompt even longer.

2. Stage 4 classification now batches moments (20 per call) instead of
   sending all moments in a single LLM call. Prevents context window
   overflow for videos with many moments. Batch results are merged with
   reindexed moment_index values.

3. run_pipeline auto-resumes from the last completed stage on error/retry
   instead of always restarting from stage 2. Queries pipeline_events for
   the most recent run to find completed stages. clean_reprocess trigger
   still forces a full restart.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 17:48:19 -05:00
..
pipeline feat: Truncation detection, batched classification, and pipeline auto-resume 2026-03-31 17:48:19 -05:00
routers feat: Pipeline runs — per-execution tracking with run-scoped events 2026-03-31 17:13:41 +00:00
tests test: Added GET /api/v1/search/suggestions endpoint returning popular t… 2026-03-31 06:35:37 +00:00
config.py feat: remove review workflow — unused gate that blocked nothing 2026-03-31 02:34:12 +00:00
database.py fix: restore complete project tree from ub01 canonical state 2026-03-31 02:10:41 +00:00
main.py feat: remove review workflow — unused gate that blocked nothing 2026-03-31 02:34:12 +00:00
models.py feat: Pipeline runs — per-execution tracking with run-scoped events 2026-03-31 17:13:41 +00:00
pytest.ini fix: restore complete project tree from ub01 canonical state 2026-03-31 02:10:41 +00:00
redis_client.py fix: restore complete project tree from ub01 canonical state 2026-03-31 02:10:41 +00:00
requirements.txt feat: Built backend/watcher.py with PollingObserver-based folder watchi… 2026-03-30 19:17:47 +00:00
schemas.py test: Added GET /api/v1/search/suggestions endpoint returning popular t… 2026-03-31 06:35:37 +00:00
search_service.py feat: Added technique_page_slug to search results across Qdrant payload… 2026-03-31 05:02:48 +00:00
watcher.py feat: Built backend/watcher.py with PollingObserver-based folder watchi… 2026-03-30 19:17:47 +00:00
worker.py fix: restore complete project tree from ub01 canonical state 2026-03-31 02:10:41 +00:00