chrysopedia/backend/pipeline
jlightner 8272da430b fix: Variable ordering bug and stage 5 truncation recovery
Two fixes:

1. page_moment_indices was referenced before assignment in the page
   persist loop — moved assignment to top of loop body. This caused
   "cannot access local variable" errors on every stage 5 run.

2. Stage 5 now catches LLMTruncationError and splits the chunk in
   half for retry, instead of blindly retrying the same oversized
   prompt. This handles categories where synthesis output exceeds
   the model context window.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 01:51:28 -05:00
..
__init__.py fix: restore complete project tree from ub01 canonical state 2026-03-31 02:10:41 +00:00
embedding_client.py fix: restore complete project tree from ub01 canonical state 2026-03-31 02:10:41 +00:00
llm_client.py feat: Truncation detection, batched classification, and pipeline auto-resume 2026-03-31 17:48:19 -05:00
qdrant_client.py feat: Enriched Qdrant embedding text with creator_name/tags and added r… 2026-04-01 06:41:52 +00:00
schemas.py fix: Moment-to-page linking via moment_indices in stage 5 synthesis 2026-04-01 00:34:37 -05:00
stages.py fix: Variable ordering bug and stage 5 truncation recovery 2026-04-01 01:51:28 -05:00