S1-3 Fiscal-year fact extraction #8
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#8
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?
As a user, I want every metric to come from the same, latest fiscal year so that rankings don't mix 2014 and 2026 data.
Fixes #1.
Acceptance criteria
null. It never falls back to an older value.LongTermDebtfor the noncurrent portion onlytest/fixtures/expected.ts: HRB EBIT $934.5M; CPB debt $7,137M (commercial paper is insideDebtCurrent, not added on top); MU and DRI debt lines match FY26Definition of Done
bun testpasses; new logic has testsbun checkis clean andbun fmt --checkpassesCloses #<this issue>@claude implement this story
Claude finished @chris-kreidl's task in 1m 33s —— View job •
claude/issue-8-20261106-0219• Create PR ➔🤖 Claude: Implemented S1-3 on branch
claude/issue-8-20261106-0219.What changed
src/extract.ts:extractFiscalYearFacts(companyfacts).Assetsdate.null. There is no fallback to an older period.{ value, tags[] }, so derived values list every input tag.OperatingIncomeLoss, otherwise pretax income + interest expense. HRB gives $934.5M.DebtCurrentis treated as an aggregate, soCommercialPaperis never added. CPB total is $7,137M.LongTermDebtis treated as the noncurrent portion. If it equals the filer'sDebtLongtermAndShorttermCombinedAmount, it is recognised as a total and the current portion is subtracted.test/extract.test.ts: 24 new tests againstexpected.ts, plus synthetic cases for nulls, 10-Q exclusion, period windows and the combined-total check.CLAUDE.md: structure note forsrc/extract.ts.Definition of Done
bun test: 85 pass, 0 fail.bun checkis clean.bun fmt --checkpasses on the changed files.data/isn't available in this environment, so I tested against fixtures only.Decisions for Chris
null. It does not assume zero interest.DebtCurrent: I sumShortTermBorrowingsandLongTermDebtCurrent. I couldn't check this against a fixture.analyze.tsstill uses the old logic. The issue doesn't ask to replace it, and I think that belongs to S1-4 or the M1 CLI.LongTermDebtCurrent= 0, which is kept as a real value and not treated asnull.· Branch