chrysopedia/alembic/versions
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
..
001_initial.py fix: restore complete project tree from ub01 canonical state 2026-03-31 02:10:41 +00:00
002_technique_page_versions.py fix: restore complete project tree from ub01 canonical state 2026-03-31 02:10:41 +00:00
003_content_reports.py fix: restore complete project tree from ub01 canonical state 2026-03-31 02:10:41 +00:00
004_pipeline_events.py fix: restore complete project tree from ub01 canonical state 2026-03-31 02:10:41 +00:00
005_content_hash.py fix: restore complete project tree from ub01 canonical state 2026-03-31 02:10:41 +00:00
006_debug_columns.py fix: restore complete project tree from ub01 canonical state 2026-03-31 02:10:41 +00:00
007_drop_review_columns.py feat: remove review workflow — unused gate that blocked nothing 2026-03-31 02:34:12 +00:00
008_rename_processing_status.py fix: drop server_default before dropping enum type in migration 008 2026-03-31 02:46:30 +00:00
009_add_creator_hidden_flag.py feat: Added hidden boolean column to Creator model, migration marking T… 2026-03-31 05:13:17 +00:00
010_add_pipeline_runs.py feat: Pipeline runs — per-execution tracking with run-scoped events 2026-03-31 17:13:41 +00:00