S1-2: Test fixtures from known-bad companies #26
No reviewers
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!26
Loading…
Reference in a new issue
No description provided.
Delete branch "s1-2-test-fixtures"
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: Closes #7
Trimmed SEC companyfacts fixtures for the five companies that broke the old pipeline, plus expected values checked against each company's filed 10-K.
What's here
scripts/make-fixtures.ts: regenerates fixtures fromdata/(all forms and periods, allowlisted tags only; ~23 MB → 2.1 MB)test/fixtures/companyfacts/*.json: the fixtures (compact; excluded frombun fmtviabunfig.toml)test/fixtures/expected.ts: exact line items per company, the accession number, the statement page verified, and notes on quirkstest/fixtures.test.ts: 65 tests: values match the filings, the trimming keeps what's needed, and the stale-tag cases behind #1 are presentFound while verifying (affects later stories)
LongTermDebtholds only the noncurrent portionDebtCurrentAlso
tsconfig.jsongets"types": ["bun"], which takesbun checkfrom 65 errors to 0 across the repo, covering part of #11's criterion.Definition of Done
bun testpasses; new logic has tests (65 pass)bun checkis clean (whole repo) andbun fmt --checkpasses on all files in this PR. The only failures are the 4 old scripts andCLAUDE.md, tracked in #11data/refresh🤖 Generated with Claude Code
Summary by CodeRabbit
Walkthrough
The change adds a script to generate trimmed company-facts fixtures for five tickers. It adds five fixture datasets, expected filing values, and tests for fixture metadata, facts, and tag filtering.
Changes: Company facts fixtures
scripts/make-fixtures.ts,bunfig.toml,tsconfig.jsontest/fixtures/expected.ts,test/fixtures/companyfacts/*,test/fixtures.test.tsEstimated code review effort: 3 (Moderate) | ~20 minutes
A rabbit checks each fact in line
Five ticker files arrive on time
Tags stay within the listed gate
Filing dates confirm each state
The burrow stores the data fine
91c97138-3d69-49ca-ab44-1bd753eac01cReviewing files that changed from the base of the PR and between
6576d5f66eandffb977ea22.bunfig.tomlscripts/make-fixtures.tstest/fixtures.test.tstest/fixtures/companyfacts/CPB.jsontest/fixtures/companyfacts/DRI.jsontest/fixtures/companyfacts/HRB.jsontest/fixtures/companyfacts/MU.jsontest/fixtures/companyfacts/OTEX.jsontest/fixtures/expected.tstsconfig.jsonIncluded review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.