Resume a failed refresh, not only an interrupted one #56

Open
opened 2026-11-13 13:37:50 +00:00 by chris-kreidl · 0 comments
chris-kreidl commented 2026-11-13 13:37:50 +00:00 (Migrated from github.com)

🤖 Claude: A failed refresh resumes from its checkpoint, the same way an interrupted one does, instead of starting over.

Decided in the M2 retro (#50), following up on the open question in #55. Today a network error at 900 MB of the bulk zip means downloading the whole ~1 GB again. The checkpoint and the partial zip are already kept after a failure, but the next run deletes the checkpoint (startJob, src/jobs.ts).

Acceptance criteria

Proposed. To be agreed in backlog refinement.

  • Re-running a refresh whose last run is failed resumes from that run's checkpoint, exactly as it does after interrupted:
    • the bulk download continues with a Range request (or restarts, saying so, if SEC sends the whole file);
    • an incremental refresh skips companies it already downloaded.
  • --restart and the menu's "Start over" choice also start a failed run over.
  • The resume prompt and the menu hint say whether the run being resumed failed or was interrupted, and show a failed run's error.
  • analyze, enrich and rank still start over after a failure (enrich no longer resumes at all, per #57).
  • Demonstrated on real data: make the bulk download fail partway (for example, by dropping the network), re-run refresh, and it resumes at the byte it reached.

Definition of Done

  • Acceptance criteria met and demonstrated
  • bun test passes; new logic has tests
  • bun check is clean and bun fmt --check passes
  • Runs end to end on real data (not just fixtures)
  • Committed with Closes #<this issue>
🤖 **Claude:** A failed refresh resumes from its checkpoint, the same way an interrupted one does, instead of starting over. Decided in the M2 retro (#50), following up on the open question in #55. Today a network error at 900 MB of the bulk zip means downloading the whole ~1 GB again. The checkpoint and the partial zip are already kept after a failure, but the next run deletes the checkpoint (`startJob`, `src/jobs.ts`). ### Acceptance criteria *Proposed. To be agreed in backlog refinement.* - [ ] Re-running a refresh whose last run is `failed` resumes from that run's checkpoint, exactly as it does after `interrupted`: - the bulk download continues with a Range request (or restarts, saying so, if SEC sends the whole file); - an incremental refresh skips companies it already downloaded. - [ ] `--restart` and the menu's "Start over" choice also start a failed run over. - [ ] The resume prompt and the menu hint say whether the run being resumed failed or was interrupted, and show a failed run's error. - [ ] `analyze`, `enrich` and `rank` still start over after a failure (enrich no longer resumes at all, per #57). - [ ] Demonstrated on real data: make the bulk download fail partway (for example, by dropping the network), re-run refresh, and it resumes at the byte it reached. ### Definition of Done - [ ] Acceptance criteria met and demonstrated - [ ] `bun test` passes; new logic has tests - [ ] `bun check` is clean and `bun fmt --check` passes - [ ] Runs end to end on real data (not just fixtures) - [ ] Committed with `Closes #<this issue>`
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
ckreidl/screener#56
No description provided.