Incremental SEC update via the EDGAR daily index #12
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#12
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?
Re-fetch only companies that filed (
/api/xbrl/companyfacts/CIK##########.json) instead of the ~1 GB bulk zip.Acceptance criteria
Accepted by Chris on 2026-11-12. Decisions: 30-day gap limit, state kept in SQLite, 5 requests/second.
bun cli.ts refreshreads SEC's daily index (Archives/edgar/daily-index/<year>/QTR<n>/form.<yyyymmdd>.idx) for every business day since the last successful refresh, and re-downloadsapi/xbrl/companyfacts/CIK##########.jsononly for CIKs that filed a10-K. Each file is written todata/in place.data/or no record of a refresh), withrefresh --full, and when the last successful refresh was more than 30 days ago.company_facts.db), in a table owned byensureSchema.SEC_HEADERS.analyze+rankafter it agree with a--fullrefresh on the same day, except for filings still pending, which are listed.Definition of Done
bun testpasses; new logic has testsbun checkis clean andbun fmt --checkpassesCloses #<this issue>🤖 Claude: Proposed acceptance criteria (backlog refinement; Chris to accept or change)
Today:
refreshdownloads the full companyfacts zip (~1 GB), andanalyzereads only10-Kfacts (src/extract.ts). So the only filings that can change our numbers are new 10-Ks.Acceptance criteria
bun cli.ts refreshreads SEC's daily index (Archives/edgar/daily-index/<year>/QTR<n>/form.<yyyymmdd>.idx) for every business day since the last successful refresh, and re-downloadsapi/xbrl/companyfacts/CIK##########.jsononly for CIKs that filed a10-K. Each file is written todata/in place.data/or no record of a refresh) uses the bulk zip, as today, and so doesrefresh --full.SEC_HEADERS.analyze+rankafter it agree with a--fullrefresh on the same day, except for filings still pending, which are listed.Questions
data/. Fine?Dependencies
None. Suggested order for M2: #14 → #13 → #12 → #15 (see #50).