chrysopedia/backend
jlightner c2db9aa011 feat: Pipeline runs — per-execution tracking with run-scoped events
Data model:
- New pipeline_runs table (id, video_id, run_number, trigger, status,
  started_at, finished_at, error_stage, total_tokens)
- pipeline_events gains run_id FK (nullable for backward compat)
- Alembic migration 010_add_pipeline_runs

Backend:
- run_pipeline() creates a PipelineRun, threads run_id through all stages
- _emit_event() and _make_llm_callback() accept and store run_id
- Stage 6 (final) calls _finish_run() to mark complete with token totals
- mark_pipeline_error marks run as error
- Revoke marks running runs as cancelled
- Trigger endpoints pass trigger type (manual, clean_reprocess)
- New GET /admin/pipeline/runs/{video_id} — lists runs with event counts
- GET /admin/pipeline/events supports ?run_id= filter

Frontend:
- Expanded video detail now shows RunList instead of flat EventLog
- Each run is a collapsible card showing: run number, trigger type,
  status badge, timestamps, token count, event count
- Latest run auto-expands, older runs collapsed
- Legacy events (pre-run-tracking) shown as separate collapsible section
- Run cards color-coded: cyan border for running, red for error,
  gray for cancelled
- EventLog accepts optional runId prop to scope events to a single run
2026-03-31 17:13:41 +00:00
..
pipeline feat: Pipeline runs — per-execution tracking with run-scoped events 2026-03-31 17:13:41 +00: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