Enrich always starts over instead of resuming #66

Open
opened 2026-11-13 16:54:14 +00:00 by chris-kreidl · 1 comment
chris-kreidl commented 2026-11-13 16:54:14 +00:00 (Migrated from github.com)

🤖 Claude: Story (from the question below, decided C): enrich always starts over, so a ranking never mixes old quotes with today's.

As the user, I want every enrich run to fetch fresh quotes, so that EY is computed from current market caps.

Acceptance criteria

  • An enrich run whose last run was interrupted fetches every quote again and reuses none from job_checkpoint.
  • Enrich is no longer in RESUMABLE (src/steps.ts). The CLI doesn't ask "Resume it / Start over" for it, and --restart affects only refresh.
  • The page's jobs panel offers Resume / Start over only for refresh.
  • Enrich no longer saves quotes to a checkpoint (src/enrich.ts), and tests that covered resuming enrich are removed or changed to cover this.
  • CLAUDE.md and the CLI usage text say only refresh resumes.

Original question:

Found while discussing #64.

When enrich resumes an interrupted run (#15), it reuses the Yahoo quotes that run saved (quote:<SYMBOL> in job_checkpoint, see src/enrich.ts) and fetches only the rest. Those quotes are prices from when the interrupted run happened. If the resume comes days later, one ranking mixes old prices (and the market caps behind EY) with today's, and nothing says which ones are old.

This happens with any enrich resume: the CLI prompt, bun cli.ts enrich, or the page's Resume it.

Question for Chris: how old can a reused quote be?

  • A. Any age (current behaviour).
  • B. Reuse saved quotes only up to a limit (e.g. same trading day, or 24 hours), and re-fetch older ones.
  • C. Enrich never resumes; it always starts over (a full run is one batched quote() call per 100 symbols).
🤖 **Claude:** Story (from the question below, decided **C**): enrich always starts over, so a ranking never mixes old quotes with today's. **As** the user, **I want** every enrich run to fetch fresh quotes, **so that** EY is computed from current market caps. ### Acceptance criteria - [ ] An enrich run whose last run was interrupted fetches every quote again and reuses none from `job_checkpoint`. - [ ] Enrich is no longer in `RESUMABLE` (`src/steps.ts`). The CLI doesn't ask "Resume it / Start over" for it, and `--restart` affects only refresh. - [ ] The page's jobs panel offers Resume / Start over only for refresh. - [ ] Enrich no longer saves quotes to a checkpoint (`src/enrich.ts`), and tests that covered resuming enrich are removed or changed to cover this. - [ ] CLAUDE.md and the CLI usage text say only refresh resumes. --- Original question: Found while discussing #64. When enrich resumes an interrupted run (#15), it reuses the Yahoo quotes that run saved (`quote:<SYMBOL>` in `job_checkpoint`, see `src/enrich.ts`) and fetches only the rest. Those quotes are prices from when the interrupted run happened. If the resume comes days later, one ranking mixes old prices (and the market caps behind EY) with today's, and nothing says which ones are old. This happens with any enrich resume: the CLI prompt, `bun cli.ts enrich`, or the page's **Resume it**. **Question for Chris:** how old can a reused quote be? - **A.** Any age (current behaviour). - **B.** Reuse saved quotes only up to a limit (e.g. same trading day, or 24 hours), and re-fetch older ones. - **C.** Enrich never resumes; it always starts over (a full run is one batched `quote()` call per 100 symbols).
chris-kreidl commented 2026-11-13 16:55:43 +00:00 (Migrated from github.com)

🤖 Claude: Decided with Chris: C. Enrich never resumes. It always starts over. I've turned this issue into the story for that change.

Starting over costs little. Quotes are one batched quote() call per 100 symbols, and sector lookups already come from sector_cache, so a resume saved only the quote calls.

🤖 **Claude:** Decided with Chris: **C. Enrich never resumes. It always starts over.** I've turned this issue into the story for that change. Starting over costs little. Quotes are one batched `quote()` call per 100 symbols, and sector lookups already come from `sector_cache`, so a resume saved only the quote calls.
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#66
No description provided.