fix: handle 'skipped' status in job_detail_status updates

- Add 'skipped' to terminal states in update_job_detail_status()
- Ensures skipped dates properly:
  - Update status and completed_at timestamp
  - Store skip reason in error field
  - Trigger job completion checks
- Add comprehensive test suite (11 tests) covering:
  - Database schema validation
  - Job completion with skipped dates
  - Progress tracking with skip counts
  - Multi-model skip handling
  - Skip reason storage

Bug was discovered via TDD - created tests first, which revealed
that skipped status wasn't being handled in the terminal state
block at line 397.

All 11 tests passing.
This commit is contained in:
2025-11-02 09:49:50 -05:00
parent 1f41e9d7ca
commit 68aaa013b0
2 changed files with 350 additions and 1 deletions

View File

@@ -394,7 +394,7 @@ class JobManager:
WHERE job_id = ? AND status = 'pending'
""", (updated_at, updated_at, job_id))
elif status in ("completed", "failed"):
elif status in ("completed", "failed", "skipped"):
# Calculate duration for detail
cursor.execute("""
SELECT started_at FROM job_details