chrysopedia/backend
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
..
pipeline fix: Variable ordering bug and stage 5 truncation recovery 2026-04-01 01:51:28 -05:00
routers feat: Added sort query parameter (relevance/newest/oldest/alpha/creator… 2026-04-01 06:41:52 +00:00
tests feat: Refactored keyword_search to multi-token AND with cross-field mat… 2026-04-01 06:41:52 +00:00
config.py fix: Moment-to-page linking via moment_indices in stage 5 synthesis 2026-04-01 00:34:37 -05: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 feat: Refactored keyword_search to multi-token AND with cross-field mat… 2026-04-01 06:41:52 +00:00
search_service.py feat: Added sort query parameter (relevance/newest/oldest/alpha/creator… 2026-04-01 06:41:52 +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