Repository navigation
fix(xbrl): securities need section evidence; cash plus short-term investments gets its own concept - #2072
Open
dgunning wants to merge 1 commit into
Open
fix(xbrl): securities need section evidence; cash plus short-term investments gets its own concept#2072dgunning wants to merge 1 commit into
dgunning wants to merge 1 commit into
Conversation
…estments gets its own concept AvailableForSaleSecurities and HeldToMaturitySecurities map to one long-term and one short-term investment concept, and get_standard_concept() took the first, LongtermInvestments, when no section gave a side. Pathfinder Bancorp's held-to-maturity securities ($158,683,000, FY2024 10-K 0000950170-25-047820) on its unclassified bank balance sheet came back long-term on candidate order alone. Both tags join the require-evidence rule from GH #1438. CashCashEquivalentsAndShortTermInvestments shared CashAndMarketableSecurities with the plain cash tags, so Microsoft's $75,543M total and its $18,315M cash line (FY2024 10-K 0000950170-24-087843) had one concept. It now has its own, "Cash, Cash Equivalents and Short-Term Investments". It stays in the stitcher's cash equivalence group so IESC's switch between the two tags for one line (GH #610) still merges, under the common-period agreement guard (GH #1685). 25 of 98,326 committed fixture rows change, all on the three target tags. Refs #1436 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #1436
This implements the first PR from the scope I posted on #1436, based on synfonia-llc's design. It doesn't close the issue.
CashAndMarketableSecuritiesandCashAndCashEquivalentsstill share the label "Cash and Cash Equivalents"; that relabel, with theifrs-full_CashAndCashEquivalentsmove, is the separate conditional PR described there.What changes
AvailableForSaleSecuritiesandHeldToMaturitySecuritiesjoin the require-evidence rule from [DATA] 135 balance-sheet elements bypass their dedicated concept, land in the wrong class, or standardize as a total #1438 (fix(xbrl): require section evidence for three current/noncurrent entries (#1438) #2071). With a current or noncurrent section, on the row or from a classified calculation parent, they resolve as before:ShortTermInvestmentsorLongtermInvestments. Without one,get_standard_concept()andget_display_name()returnNonewhere they used to returnLongtermInvestmentsby candidate order.lookup()still lists both candidates. The change is two entries in theREQUIRE_SECTION_EVIDENCEfrozenset.CashCashEquivalentsAndShortTermInvestmentsmaps to a concept of the same name, displayed as "Cash, Cash Equivalents and Short-Term Investments", instead ofCashAndMarketableSecurities("Cash and Cash Equivalents"). This PR touches onegaap_mappings.jsonentry, a newdisplay_names.jsonentry and asection_membership.jsonCurrent Assets entry. No other open PR touchesgaap_mappings.json._EQUIVALENT_STANDARD_CONCEPTSalongsideCashAndCashEquivalentsandCashAndMarketableSecurities. Without that, separating it broke issue with cash and cash equivalents for multiyear data IESC #610. IESC tagged its one cash lineCashCashEquivalentsAndShortTermInvestmentsin its FY2023 10-K (0001048268-23-000097) andCashAndCashEquivalentsAtCarryingValuein its FY2024 10-K (0001048268-24-000134), and both report $75,770,000 at 2023-09-30. The [DATA] Stitched balance sheet merges any two cash-bucket lines from different filings, so cash plus short-term investments can show as cash and cash equivalents #1685 guard still applies: lines in the group merge only when the filings share a period and every shared period agrees. Microsoft's cash line and its total disagree in every period, so they stay two rows.Verification
Ground truth, offline from committed fixtures:
0000950170-24-087843(tests/fixtures/xbrl/msft/10k_2024): "Cash and cash equivalents" is $18,315,000,000 at 2024-06-30 and staysCashAndMarketableSecurities. "Total cash, cash equivalents, and short-term investments" is $75,543,000,000 and moves toCashCashEquivalentsAndShortTermInvestments. On main both wereCashAndMarketableSecurities.0000950170-25-047820(tests/fixtures/xbrl_gz/pbhc/10k_2024): "Held-to-maturity securities, at amortized cost" is $158,683,000 at 2024-12-31 and $179,286,000 at 2023-12-31, on an unclassified bank balance sheet whose calculation parent isAssets. Its concept wasLongtermInvestmentson main and is none here; the label and values are unchanged.test_issue_1685.pyandtest_issue_610_iesc_cash.pypass, both network tests included, run one file at a time.The new regression file is
tests/issues/regression/test_issue_1436_section_evidence.py(21 tests). On origin/main 11 fail: Microsoft, the label, Pathfinder, the no-side cases and theAssets-parent case. The 10 that pass are controls: classified sections, current and noncurrent parents, both stitching cases and the bad-context error. On this branch the fast suite (pytest -m fast -n 8) gives 52,725 passed, 9 skipped, 1 xfailed.check-regression-provenancepasses. Lint on the touched files matches main; the three existing warnings institching/core.pyare unchanged.One existing test changed on purpose. In
test_issue_1436_securities_not_cash.py, two parametrized tests now expect no concept for the two require-evidence tags when no section is given. The count of entries that lead with the cash concept goes from 22 to 21, and the test asserts that the combined tag isn't among them. The expected-candidates JSON is unchanged, becauselookup()is unchanged.Every changed fixture row
I took
standard_conceptfor every non-abstract row of every statement role in the 67 committed XBRL fixture sets, standardized throughxbrl.standardization.standardize_statement_data(), on origin/main and on this branch. 25 of 98,326 rows change, and every changed row uses one of the three target tags:CashAndMarketableSecuritiesto its own concept. Five are balance-sheet totals (Coca-Cola, Microsoft) and four are note lines (Netflix, SLB).LongtermInvestments. Pathfinder's balance-sheet line is row 23; the other 15 are in notes. Row 14 is Costco's "Short-term Investments" note line, which main called long-term.CashCashEquivalentsAndShortTermInvestmentsCashAndMarketableSecuritiesCashCashEquivalentsAndShortTermInvestmentsCashCashEquivalentsAndShortTermInvestmentsCashAndMarketableSecuritiesCashCashEquivalentsAndShortTermInvestmentsCashCashEquivalentsAndShortTermInvestmentsCashAndMarketableSecuritiesCashCashEquivalentsAndShortTermInvestmentsCashCashEquivalentsAndShortTermInvestmentsCashAndMarketableSecuritiesCashCashEquivalentsAndShortTermInvestmentsCashCashEquivalentsAndShortTermInvestmentsCashAndMarketableSecuritiesCashCashEquivalentsAndShortTermInvestmentsCashCashEquivalentsAndShortTermInvestmentsCashAndMarketableSecuritiesCashCashEquivalentsAndShortTermInvestmentsCashCashEquivalentsAndShortTermInvestmentsCashAndMarketableSecuritiesCashCashEquivalentsAndShortTermInvestmentsCashCashEquivalentsAndShortTermInvestmentsCashAndMarketableSecuritiesCashCashEquivalentsAndShortTermInvestmentsCashCashEquivalentsAndShortTermInvestmentsCashAndMarketableSecuritiesCashCashEquivalentsAndShortTermInvestmentsAvailableForSaleSecuritiesLongtermInvestmentsHeldToMaturitySecuritiesLongtermInvestmentsAvailableForSaleSecuritiesLongtermInvestmentsHeldToMaturitySecuritiesLongtermInvestmentsAvailableForSaleSecuritiesLongtermInvestmentsAvailableForSaleSecuritiesLongtermInvestmentsAvailableForSaleSecuritiesLongtermInvestmentsAvailableForSaleSecuritiesLongtermInvestmentsHeldToMaturitySecuritiesLongtermInvestmentsAvailableForSaleSecuritiesLongtermInvestmentsAvailableForSaleSecuritiesLongtermInvestmentsHeldToMaturitySecuritiesLongtermInvestmentsAvailableForSaleSecuritiesLongtermInvestmentsHeldToMaturitySecuritiesLongtermInvestmentsHeldToMaturitySecuritiesLongtermInvestmentsHeldToMaturitySecuritiesLongtermInvestments25 of 98326 rows across 67 fixture directories.
Not in this PR
ifrs-full_CashAndCashEquivalentsmove (the second PR on [DATA] Debt and equity securities standardize as "Cash and Cash Equivalents" (32 rows), and two concepts share that label #1436), and with them the shared "Cash and Cash Equivalents" label.concept_mappings.jsonstill lists the combined tag under "Cash and Cash Equivalents". Its only reader is the 8-K earnings label matcher, which uses the first tag in each list (CashEquivalentsAtCarryingValue), so the combined tag never reaches it.MarketableSecurities($4,076,000), which still readsLongtermInvestmentson its unclassified balance sheet.ReverseIndexorgaap_mappings.jsonfor these tags, so it has no change.AI tool: Claude Code, Claude Opus 5.5.
🤖 Generated with Claude Code