Commit graph

2 commits

Author SHA1 Message Date
Brandon Walter
28d046f42e fix: SMART overlay shows terminal states + reconciles orphans (1.0.0-49)
Some checks are pending
Security scan / pip-audit (push) Waiting to run
Security scan / bandit (push) Waiting to run
Security scan / gitleaks (push) Waiting to run
Security scan / mypy (push) Waiting to run
The Long SMART column showed "—" while the Burn-In column showed
"FAILED (LONG SMART)" — clear contradiction. Two reasons:

1. The overlay query in _drives_helpers only fetched SMART stage
   data for burn-ins in ('running','queued') state. Failed/passed/
   cancelled jobs got their stage data filtered out, so the SMART
   columns went blank when you most wanted to see them. Removed
   the state filter so all burn-ins overlay.

2. A pre-busy-timeout `database is locked` failure mode (sdj job 5
   from Mar 2026) left long_smart stage rows recorded as state=
   'running' even though the parent job ended in state='failed'.
   The overlay now translates that orphan state at render time:
   if the parent job is failed/cancelled/unknown but the stage is
   still 'running', display the stage as failed (or the parent's
   terminal state) so the column matches the Burn-In column.

The translation is purely display-time; no DB writes. error_text
falls back to the parent job's error_text when the stage's own is
NULL, so the operator sees what actually broke.
2026-05-09 11:46:45 -07:00
Brandon Walter
40dac9090d refactor: extract drives + burnin routes (1.0.0-37)
Largest routes/ slice yet — drives.py (8 endpoints) and burnin.py
(4 endpoints). Drives helpers live in _drives_helpers.py so the
dashboard SSE handler in routes/__init__.py and mailer.py can both
keep using them via re-export.

routes/__init__.py shrinks from 815 → 163 LoC; only the dashboard /
and /sse/drives stream remain there. Routes split is now functionally
complete: 12 files, ~1800 LoC distributed by feature.
2026-05-03 09:59:15 -04:00