Enrich always starts over instead of resuming #66
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
epic:E1-foundation
epic:E2-correct-metrics
epic:E3-fast-jobs
epic:E4-cli
epic:E5-web-ui
epic:E6-history
good first issue
help wanted
invalid
question
sprint-tracking
story
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
ckreidl/screener#66
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
🤖 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
job_checkpoint.RESUMABLE(src/steps.ts). The CLI doesn't ask "Resume it / Start over" for it, and--restartaffects only refresh.src/enrich.ts), and tests that covered resuming enrich are removed or changed to cover this.Original question:
Found while discussing #64.
When enrich resumes an interrupted run (#15), it reuses the Yahoo quotes that run saved (
quote:<SYMBOL>injob_checkpoint, seesrc/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?
quote()call per 100 symbols).🤖 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 fromsector_cache, so a resume saved only the quote calls.