edgartools icon indicating copy to clipboard operation
edgartools copied to clipboard

Context-aware resolution for mappings that are right for some filings and wrong for others (114 rows, seven kinds)

Open synfonia-llc opened this issue 1 month ago • 1 comments

Feature Category

  • [x] New API functionality
  • [ ] Performance improvement
  • [x] Developer experience improvement
  • [ ] Documentation enhancement
  • [ ] Tool/utility addition

Problem Statement

Is your feature request related to a problem? Please describe. The GAAP check behind #1417 found 114 mappings that are neither right nor wrong everywhere: the element means the concept in some filings and something else in others. An unclassified receivable is current for one filer and noncurrent for another; a litigation loss is operating for one and below operating income for another; ProfitLoss is net income only when there is no noncontrolling interest. A single global default is wrong for part of the filers in every case, and today several defaults sit on the less common side (for example DividendsReceivable resolves to a noncurrent asset with no context, although dividends declared are normally collected within the operating cycle, ASC 210-10-45-1 and 45-3).

EdgarTools already builds most of the context needed to decide: the balance-sheet section, the statement type, the filing's own calculation parent, the industry (once #1419 lands) and the value's sign. What is missing is using it consistently. The 114 rows fall into seven kinds, each with a mechanism:

Kind Rows Mechanism
Current vs noncurrent presentation 46 Keep a candidate pair [current, noncurrent] and let the balance-sheet section decide
Placement by function varies by filer 15 Map to the nature concept (or FASB's default placement) and take the function from the filing's own calculation parent, which standardize_statement already derives
Same element used on two statements 5 Choose the candidate by the statement the row is on (statement_type is already in the context): for example ImpairmentChargesCF on the cash flow and AssetImpairmentChargesIS on the income statement; PreferredDividendExpense on the income statement and DividendsEquity on the equity statement
Equals the concept only when the filing has no other component 37 Require evidence: map the element to the total only when the filing shows no other component (no discontinued operations, no noncontrolling interest, no separately tagged cash, no itemized working-capital changes)
Depends on the industry 3 An industry override (lenders, insurers, investment companies), which applies once #1419 passes the industry; until then, the safest default
Depends on the sign of a two-sided net amount 4 Resolve two-sided net elements by the sign of the value, as the docs already describe; the balance context is accepted but never read today
Meaning changed between taxonomy years 4 Key the mapping to the filing's taxonomy year where FASB changed the definition (capitalized software in 2026; EquitySecuritiesFvNi in 2021)

Who would benefit from this feature?

  • [ ] Beginner Python users working with SEC filings
  • [x] Financial analysts and researchers
  • [x] Advanced developers building financial applications
  • [x] Data scientists working with financial datasets

Proposed Solution

Describe the solution you'd like

  • Unmap when no reading of the element is the concept in any filing; those rows are not here (they are in the data issues linked from #1417).
  • Keep a candidate list when the only question is placement (current vs noncurrent, function, statement, taxonomy year): the context EdgarTools already builds decides, and the default sits on the usual side.
  • Require evidence when the element equals the concept only in some filings (no other component, industry, sign): keep the mapping, but let the consumer confirm it from the filing's own calculation tree, industry or sign before using it as a total.

Data-only fixes possible now. DividendsReceivable (39 companies), AccruedFeesAndOtherRevenueReceivable (18) and InsuranceSettlementsReceivable (5) have names with no current/noncurrent hint, so a [current, noncurrent] pair already resolves by section correctly on 5.60.0 (as GrantsReceivable and AdvancesOnInventoryPurchases do). Adding the current candidate as their primary can ride the balance-sheet data PR rather than wait for this feature.

Describe alternatives you've considered Picking one global default per element (today's behavior), which is wrong for part of the filers in every row below; or unmapping these elements, which drops correct answers for the filers they fit.

Use Case Example

How would you use this feature?

from edgar.xbrl.standardization.reverse_index import get_reverse_index

ri = get_reverse_index()
# Current vs noncurrent: the section decides (needs the _disambiguate_by_context fix)
ri.get_standard_concept("DividendsReceivable", context={"section": "Current Assets"})      # proposed: OtherNonOperatingCurrentAssets
ri.get_standard_concept("DividendsReceivable", context={"section": "Non-Current Assets"})  # proposed: OtherNonOperatingNonCurrentAssets
# Same element on two statements: the statement decides
ri.get_standard_concept("DividendsPreferredStock", context={"statement_type": "StatementOfEquity"})  # proposed: DividendsEquity

Implementation Considerations

Complexity Level:

  • [ ] Simple (minor API addition)
  • [x] Moderate (new functionality with existing patterns)
  • [ ] Complex (significant architectural changes)

Backwards Compatibility:

  • [ ] This feature maintains backwards compatibility
  • [x] This feature might break existing code (please explain below)
  • [ ] Unsure about compatibility impact

A row that resolves to one concept today could resolve to another when context is passed. Callers that pass no context keep a single default, moved to the usual side where today's default is the rare one.

Additional Context

Every row below was ruled against its FASB definition, balance, period type and calculation parents with ASC or Reg S-X citations, and 107 of the 114 went through a second check, which upheld all of them (the other 7 share a tag with a wrong mapping filed in a data issue and were checked under that row). Where two rows share an element, each is one candidate of the same entry.

Current vs noncurrent presentation (46)

How to handle it: Keep a candidate pair [current, noncurrent] and let the balance-sheet section decide. This needs the _disambiguate_by_context fix (#1434), plus the noncurrent candidate as the no-context default for unclassified totals whose S-X caption is noncurrent ("Other assets" 5-02.17, "Other liabilities" 5-02.24, deferred credits 5-02.26, pension totals).

Element Maps to now When it is right, and the alternative
OtherAssets OtherNonOperatingCurrentAssets OtherNonOperatingNonCurrentAssets as the no-context fallback; current only when presented in current assets
OtherAssets OtherNonOperatingNonCurrentAssets OtherNonOperatingNonCurrentAssets in a noncurrent section; OtherNonOperatingCurrentAssets otherwise
OtherLiabilities OtherNonOperatingCurrentLiabilities OtherNonOperatingNonCurrentLiabilities as the no-context fallback; current only within current liabilities
OtherLiabilities OtherNonOperatingNonCurrentLiabilities OtherNonOperatingNonCurrentLiabilities in a noncurrent section; OtherNonOperatingCurrentLiabilities otherwise
RestrictedCash RestrictedCashCurrent RestrictedCashCurrent when presented in current assets or an unclassified balance sheet; RestrictedCashNonCurrent when presented noncurrent
InterestReceivable OtherNonOperatingNonCurrentAssets OtherNonOperatingNonCurrentAssets in a noncurrent section; OtherNonOperatingCurrentAssets otherwise
RestrictedCashAndCashEquivalents (industry overrides) RestrictedCashCurrent RestrictedCashCurrent when presented current; RestrictedCashNonCurrent when presented noncurrent
OtherReceivables OtherNonOperatingNonCurrentAssets OtherNonOperatingNonCurrentAssets in a noncurrent section; OtherNonOperatingCurrentAssets otherwise
AllowanceForDoubtfulAccountsReceivable OtherOperatingNonCurrentAssets OtherOperatingNonCurrentAssets for the allowance on noncurrent receivables; AllowanceForDoubtfulAccounts (or TradeReceivables as the net line) when current
DueFromRelatedParties OtherNonOperatingNonCurrentAssets OtherNonOperatingNonCurrentAssets when noncurrent; OtherNonOperatingCurrentAssets (existing primary) when current
EquitySecuritiesFvNiCurrentAndNoncurrent LongtermInvestments LongtermInvestments if presented noncurrent or in an unclassified investments block; ShortTermInvestments if current; never CashAndMarketableSecurities (its primary, CashAndMarketableSecurities, is wrong in every filing and is fixed with the _disambiguate_by_context bug, #1434)
PrepaidExpenseCurrentAndNoncurrent OtherNonOperatingNonCurrentAssets OtherNonOperatingNonCurrentAssets when noncurrent (as PrepaidExpenseNoncurrent maps); PrepaidExpenses (not the current residual) when current
AccruedIncomeTaxes TaxesPayable AccruedIncomeTaxes when presented current or unclassified (TaxesPayable is acceptable as the broader all-taxes concept); OtherOperatingNonCurrentLiabilities when presented noncurrent; never DeferredTaxNonCurrentLiabilities
AdvancesOnInventoryPurchases OtherOperatingNonCurrentAssets OtherOperatingCurrentAssets (by definition); OtherOperatingNonCurrentAssets only when a filer classifies it noncurrent
TaxesPayableCurrentAndNoncurrent TaxesPayable TaxesPayable when presented current or unclassified; OtherOperatingNonCurrentLiabilities when presented noncurrent; never DeferredTaxNonCurrentLiabilities
AccountsPayableOtherCurrentAndNoncurrent OtherNonOperatingNonCurrentLiabilities A noncurrent residual when presented noncurrent (OtherOperatingNonCurrentLiabilities matches its FASB parent's noncurrent candidate); the existing current candidate otherwise
TradingSecurities LongtermInvestments ShortTermInvestments by default; LongtermInvestments only for a noncurrent or unclassified-investments presentation; never CashAndMarketableSecurities
DividendsReceivable OtherNonOperatingNonCurrentAssets OtherNonOperatingCurrentAssets (should be the primary) / OtherNonOperatingNonCurrentAssets when noncurrent (data-only fix possible now; see below)
AccountsReceivableRelatedParties OtherNonOperatingNonCurrentAssets OtherNonOperatingNonCurrentAssets when presented noncurrent; OtherNonOperatingCurrentAssets (the existing primary) when current
NotesReceivableRelatedParties OtherNonOperatingNonCurrentAssets OtherNonOperatingNonCurrentAssets when noncurrent; OtherNonOperatingCurrentAssets when current (as NotesReceivableRelatedPartiesCurrent maps)
AccruedFeesAndOtherRevenueReceivable OtherNonOperatingNonCurrentAssets OtherNonOperatingCurrentAssets (should be the primary) / OtherNonOperatingNonCurrentAssets when presented noncurrent (data-only fix possible now; see below)
OtherDeferredCostsNet OtherOperatingCurrentAssets OtherOperatingCurrentAssets when current (FASB placement); OtherOperatingNonCurrentAssets when noncurrent
OtherDeferredCostsNet OtherOperatingNonCurrentAssets OtherOperatingCurrentAssets when current; OtherOperatingNonCurrentAssets when long-term
PensionAndOtherPostretirementDefinedBenefitPlansLiabilitiesCurrentAndNoncurrent RetirementRelatedCurrentLiabilities RetirementRelatedCurrentLiabilities when presented current; RetirementRelatedNonCurrentLiabilities (or PensionObligations) when noncurrent or unclassified
PensionAndOtherPostretirementDefinedBenefitPlansLiabilitiesCurrentAndNoncurrent RetirementRelatedNonCurrentLiabilities RetirementRelatedNonCurrentLiabilities (or PensionObligations) when noncurrent or unclassified; RetirementRelatedCurrentLiabilities when current
MarginDepositAssets OtherNonOperatingCurrentAssets OtherNonOperatingCurrentAssets when the margin backs open short-term positions (usual); add OtherNonOperatingNonCurrentAssets as a second candidate
AccruedSalesCommissionCurrentAndNoncurrent OtherOperatingCurrentLiabilities OtherOperatingCurrentLiabilities when presented current; OtherOperatingNonCurrentLiabilities when noncurrent
AccountsReceivableGross OtherOperatingNonCurrentAssets OtherOperatingNonCurrentAssets when presented noncurrent; AccountsReceivableGross (or TradeReceivables) when current
NontradeReceivables OtherNonOperatingNonCurrentAssets OtherNonOperatingNonCurrentAssets in a noncurrent section; OtherNonOperatingCurrentAssets otherwise
DeferredGainOnSaleOfProperty OtherNonOperatingCurrentLiabilities OtherNonOperatingNonCurrentLiabilities as the no-context fallback; current only for a current portion
PensionAndOtherPostretirementAndPostemploymentBenefitPlansLiabilitiesCurrentAndNoncurrent RetirementRelatedCurrentLiabilities RetirementRelatedCurrentLiabilities when presented current; RetirementRelatedNonCurrentLiabilities (or PensionObligations) when noncurrent or unclassified
PensionAndOtherPostretirementAndPostemploymentBenefitPlansLiabilitiesCurrentAndNoncurrent RetirementRelatedNonCurrentLiabilities RetirementRelatedNonCurrentLiabilities (or PensionObligations) when noncurrent or unclassified; RetirementRelatedCurrentLiabilities when current
ConstructionLoan LongTermDebt ShortTermDebt by definition; LongTermDebt only where the filer itself classifies the loan noncurrent (ASC 470-10-45-14 refinancing)
AccruedCappingClosurePostClosureAndEnvironmentalCosts DefiniteLivedOperatingProvisions(DecommissioningEtc) OtherNonOperatingCurrentLiabilities (where EdgarTools puts AssetRetirementObligationCurrent); the ARO concept only when a filer presents it as noncurrent
GrantsReceivable OtherNonOperatingNonCurrentAssets OtherNonOperatingNonCurrentAssets in a noncurrent section; OtherNonOperatingCurrentAssets otherwise
InsuranceSettlementsReceivable OtherNonOperatingNonCurrentAssets OtherNonOperatingCurrentAssets / OtherNonOperatingNonCurrentAssets by presentation (as its Current and Noncurrent counterparts already map) (data-only fix possible now; see below)
CostsInExcessOfBillingsOnUncompletedContractsOrPrograms OtherOperatingNonCurrentAssets OtherOperatingNonCurrentAssets when collectible beyond the operating cycle; when current, ContractAssets (post-ASC 606) or TradeReceivables (unbilled receivable)
DefinedBenefitPensionPlanCurrentAndNoncurrentLiabilities RetirementRelatedCurrentLiabilities RetirementRelatedCurrentLiabilities when presented current; RetirementRelatedNonCurrentLiabilities (or PensionObligations) when noncurrent or unclassified
DefinedBenefitPensionPlanCurrentAndNoncurrentLiabilities RetirementRelatedNonCurrentLiabilities RetirementRelatedNonCurrentLiabilities (or PensionObligations) when noncurrent or unclassified; RetirementRelatedCurrentLiabilities when current
ValueAddedTaxReceivable OtherNonOperatingNonCurrentAssets OtherNonOperatingNonCurrentAssets in a noncurrent section; OtherNonOperatingCurrentAssets otherwise
AccruedPayrollTaxesCurrentAndNoncurrent OtherOperatingCurrentLiabilities OtherOperatingCurrentLiabilities when presented current; OtherOperatingNonCurrentLiabilities when noncurrent
CreditCardReceivables OtherNonOperatingNonCurrentAssets OtherNonOperatingCurrentAssets (usual, current) / OtherNonOperatingNonCurrentAssets when noncurrent; NetLoansAndLeases for card-issuing lenders
AccruedAdvertisingCurrentAndNoncurrent OtherOperatingCurrentLiabilities OtherOperatingCurrentLiabilities when presented current; OtherOperatingNonCurrentLiabilities when noncurrent
DerivativeLiabilityFairValueGrossAsset OtherNonOperatingNonCurrentLiabilities The derivative-liability family as a negative offset (current or noncurrent by context), or excluded as a disclosure-only amount. The entry's asset candidate, its primary, is the real defect (its asset primary is wrong in every filing and is filed in the balance-sheet issue, #1438)
ReceivableForRecoveryOfImportDutiesNet OtherNonOperatingNonCurrentAssets OtherNonOperatingCurrentAssets / OtherNonOperatingNonCurrentAssets by presentation (like ValueAddedTaxReceivable)
ReceivableWithImputedInterestNetAmount TradeReceivables TradeReceivables when presented current; NotesReceivableNonCurrent when presented noncurrent

Placement by function varies by filer (15)

How to handle it: Map to the nature concept (or FASB's default placement) and take the function from the filing's own calculation parent, which standardize_statement already derives. A function should not be encoded in the global table.

Element Maps to now When it is right, and the alternative
BusinessCombinationAcquisitionRelatedCosts RestructuringExpenseBenefit RestructuringExpenseBenefit when presented inside a restructuring or special-charges caption; OtherOperatingExpense for a stand-alone 'acquisition-related costs' line
GainLossRelatedToLitigationSettlement NonoperatingIncomeExpense OtherOperatingExpense by default (FASB placement); NonoperatingIncomeExpense when the filer presents it below operating income
RealEstateTaxExpense OtherOperatingExpense OtherOperatingExpense for a commercial filer's separate line; CostOfGoodsAndServicesSold for real-estate filers (property operating cost); SellingGeneralAndAdminExpenses when allocated into G&A
CostOfGoodsAndServicesSoldDepreciationAndAmortization DepreciationExpense DepreciationExpense by nature, or when shown as its own caption outside cost of revenue; CostOfGoodsAndServicesSold when it sits inside the cost-of-revenue subtotal
ProductionTaxExpense SellingGeneralAndAdminExpenses CostOfGoodsAndServicesSold when presented with production (lease operating) costs, the usual oil and gas presentation; SellingGeneralAndAdminExpenses only when reported within general and administrative or 'taxes other than income'
CostDepreciationAmortizationAndDepletion DepreciationExpense DepreciationExpense by nature, or when shown as its own caption outside cost of revenue; CostOfGoodsAndServicesSold when it sits inside the cost-of-revenue subtotal
CostOfGoodsAndServicesSoldDepreciation DepreciationExpense Keep DepreciationExpense (the nature); the filing's calculation parent supplies the cost-of-revenue placement. The suggested is_total and section edits would change nothing at runtime.
FranchisorCosts OtherOperatingExpense CostOfGoodsAndServicesSold when presented as the direct cost of franchise/outlet revenue; SellingGeneralAndAdminExpenses when within selling and marketing; OtherOperatingExpense only for a stand-alone operating line
GainOnBusinessInterruptionInsuranceRecovery NonoperatingIncomeExpense Filer's own placement: OtherOperatingExpense as a reduction (FASB default), NonInterestIncome at banks, NonoperatingIncomeExpense only when presented below operating income
RealEstateTaxesAndInsurance SellingGeneralAndAdminExpenses CostOfGoodsAndServicesSold for real-estate filers (property operating expense); OtherOperatingExpense for a stand-alone line (as its child RealEstateTaxExpense); SellingGeneralAndAdminExpenses only when included in G&A
AdditionalPaidInCapitalPreferredStock PreferredStock PreferredStock when preferred is carried including its paid-in capital; AdditionalPaidInCapital when presented within the APIC caption
TreasuryStockPreferredValue PreferredStock TreasuryShares when shown as a separate treasury-stock deduction (cost method); PreferredStock when deducted within the preferred caption
LitigationSettlementLoss NonoperatingIncomeExpense OtherOperatingExpense by default (FASB placement); NonoperatingIncomeExpense when presented below operating income
InventoryLandHeldForSale OtherOperatingNonCurrentAssets Inventories when reported within an operative builder's inventories; OtherOperatingNonCurrentAssets when classified noncurrent
LitigationSettlementAmount NonoperatingIncomeExpense As GainLossRelatedToLitigationSettlement: OtherOperatingExpense by default (FASB placement); NonoperatingIncomeExpense when presented below operating income. Deprecated in 2017 with 0 companies, so dropping it is also fine

Same element used on two statements (5)

How to handle it: Choose the candidate by the statement the row is on (statement_type is already in the context): for example ImpairmentChargesCF on the cash flow and AssetImpairmentChargesIS on the income statement; PreferredDividendExpense on the income statement and DividendsEquity on the equity statement.

Element Maps to now When it is right, and the alternative
DividendsPreferredStock PreferredDividendExpense PreferredDividendExpense on the income statement; DividendsEquity on the statement of equity
DividendsPreferredStockCash PreferredDividendExpense PreferredDividendExpense on the income statement; DividendsEquity on the statement of equity
ImpairmentOfInvestments ImpairmentChargesCF ImpairmentChargesCF when it is a cash-flow add-back (keep); AssetImpairmentChargesIS when the filer tags an income-statement line
DividendsPreferredStockStock PreferredDividendExpense PreferredDividendExpense on the income statement; DividendsEquity on the statement of equity
UnamortizedDebtIssuanceExpense LongTermDebt OtherNonOperatingNonCurrentAssets when presented as an asset (the FASB definition, which should be the primary); LongTermDebt only for a deduction line inside debt

Equals the concept only when the filing has no other component (37)

How to handle it: Require evidence: map the element to the total only when the filing shows no other component (no discontinued operations, no noncontrolling interest, no separately tagged cash, no itemized working-capital changes). In the synonym groups, rank such members after the exact element and never let a part answer for the whole.

Element Maps to now When it is right, and the alternative
IncomeLossFromContinuingOperationsAttributableToNoncontrollingEntity MinorityInterestIncomeExpense MinorityInterestIncomeExpense when no discontinued operations are attributable to NCI; otherwise no exact concept (continuing-operations part only)
IncreaseDecreaseInOperatingCapital ChangeInOtherWorkingCapital ChangeInOtherWorkingCapital only when it is the filer's single working-capital line; None when it subtotals itemized changes
NetIncomeLossFromContinuingOperationsAvailableToCommonShareholdersBasic NetIncomeToCommonShareholders NetIncomeToCommonShareholders (only when the filing has no discontinued operations); otherwise none
CashCashEquivalentsAndShortTermInvestments CashAndMarketableSecurities CashAndMarketableSecurities only when it is the filer's sole cash line; None when it subtotals separately tagged cash and short-term investments
AmortizationOfIntangibleAssets (synonym group depreciation_and_amortization) depreciation_and_amortization depreciation_and_amortization only for a filer with no depreciation; otherwise a part (the reverse index maps it to AmortizationOfIntangibles)
AvailableForSaleSecuritiesDebtSecuritiesCurrent (synonym group short_term_investments) short_term_investments short_term_investments when available-for-sale debt is the filer's only current investment
AvailableForSaleSecuritiesDebtSecuritiesNoncurrent (synonym group long_term_investments) long_term_investments long_term_investments when available-for-sale debt is the filer's only noncurrent investment
CashCashEquivalentsAndShortTermInvestments (legacy label "Cash and Cash Equivalents") Cash and Cash Equivalents CashAndMarketableSecurities only when it is the filer's sole cash line; None when it subtotals separately tagged cash and short-term investments
ContractWithCustomerLiabilityCurrent (synonym group deferred_revenue) deferred_revenue deferred_revenue when the filer has no noncurrent contract liability; otherwise a part (add ContractWithCustomerLiabilityNoncurrent and sum the parts)
DeferredRevenueCurrent (synonym group deferred_revenue) deferred_revenue deferred_revenue when the filer has no noncurrent portion; otherwise a part
DeferredRevenueNoncurrent (synonym group deferred_revenue) deferred_revenue deferred_revenue only when the filer has no current portion; otherwise a part
Depreciation (synonym group depreciation_and_amortization) depreciation_and_amortization depreciation_and_amortization only for a filer with no amortization; otherwise a part (the reverse index maps it to DepreciationExpense)
EmployeeRelatedLiabilitiesCurrent (synonym group accrued_liabilities) accrued_liabilities accrued_liabilities only when it is the filer's only accrued line; otherwise a part (the reverse index maps it to AccruedCompensation)
FinanceLeaseLiabilityCurrent (synonym group finance_lease_liability) finance_lease_liability finance_lease_liability only when the filer has no noncurrent portion or also tags the total; otherwise a part
FinanceLeaseLiabilityNoncurrent (synonym group finance_lease_liability) finance_lease_liability finance_lease_liability only when the filer has no current portion or also tags the total; otherwise a part
FiniteLivedIntangibleAssetsNet (synonym group intangible_assets) intangible_assets intangible_assets when the filer has no indefinite-lived intangibles or also tags the total; otherwise a part
GeneralAndAdministrativeExpense (synonym group sga_expense) sga_expense sga_expense only when the filer has no separately reported selling or marketing expense; otherwise SG&A is G&A plus selling and marketing, which needs a sum
IncomeLossFromContinuingOperations (synonym group net_income) net_income net_income only when the filer has no discontinued operations; otherwise EdgarTools' main-index IncomeLossContinuingOperations
InterestAndDebtExpense (synonym group interest_expense) interest_expense interest_expense (keep it after InterestExpense); it is not interest expense when the filer rolls debt-extinguishment gains or losses or induced-conversion expense into the line
InventoryGross (synonym group inventory) inventory inventory, as a fallback only; it overstates the carrying amount by any LIFO or valuation reserve
LongTermDebtAndCapitalLeaseObligations (synonym group long_term_debt) long_term_debt long_term_debt (S-X basis, which can include noncurrent finance lease liabilities)
LongTermDebtCurrent (synonym group short_term_debt) short_term_debt short_term_debt when the filer has no short-term borrowings or current finance lease liabilities; otherwise short-term debt is the sum
LongTermNotesAndLoans (synonym group long_term_debt) long_term_debt long_term_debt when notes and loans are the filer's only long-term debt line
MarketableSecuritiesCurrent (synonym group short_term_investments) short_term_investments short_term_investments when marketable securities are the filer's only current investment line
MarketableSecuritiesNoncurrent (synonym group long_term_investments) long_term_investments long_term_investments when marketable securities are the filer's only noncurrent investment
NetCashProvidedByUsedInFinancingActivitiesContinuingOperations (legacy label "Net Cash from Financing Activities") Net Cash from Financing Activities Net Cash from Financing Activities when no discontinued-operation cash flows are presented separately; otherwise a component (no exact concept)
NetCashProvidedByUsedInFinancingActivitiesContinuingOperations (synonym group financing_cash_flow) financing_cash_flow financing_cash_flow when the filer has no discontinued operations or also tags the total; otherwise a part
NetCashProvidedByUsedInInvestingActivitiesContinuingOperations (legacy label "Net Cash from Investing Activities") Net Cash from Investing Activities Net Cash from Investing Activities when no discontinued-operation cash flows are presented separately; otherwise a component
NetCashProvidedByUsedInInvestingActivitiesContinuingOperations (synonym group investing_cash_flow) investing_cash_flow investing_cash_flow (it excludes discontinued-operation investing cash flows when there are any)
NetCashProvidedByUsedInOperatingActivitiesContinuingOperations (legacy label "Net Cash from Operating Activities") Net Cash from Operating Activities Net Cash from Operating Activities when no discontinued-operation cash flows are presented separately; otherwise a component
NetCashProvidedByUsedInOperatingActivitiesContinuingOperations (synonym group operating_cash_flow) operating_cash_flow operating_cash_flow (it excludes discontinued-operation operating cash flows when there are any)
NotesPayableCurrent (synonym group short_term_debt) short_term_debt short_term_debt when it is the filer's only current debt line
OperatingCostsAndExpenses (synonym group operating_expenses) operating_expenses operating_expenses only when the filer uses it for its operating-expense total excluding cost of revenue
OtherAccruedLiabilitiesCurrent (synonym group accrued_liabilities) accrued_liabilities accrued_liabilities only when it is the filer's only accrued line; otherwise a part
ProfitLoss (synonym group net_income) net_income net_income only when the filer has no noncontrolling interest; otherwise EdgarTools' main-index ProfitLoss
SalesRevenueGoodsNet (synonym group revenue) revenue revenue for sellers of goods only; otherwise it is product revenue (EdgarTools' main-index ProductRevenue)
StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest (synonym group stockholders_equity) stockholders_equity stockholders_equity only for filers without a noncontrolling interest; otherwise EdgarTools' main-index AllEquityBalanceIncludingMinorityInterest

Depends on the industry (3)

How to handle it: An industry override (lenders, insurers, investment companies), which applies once #1419 passes the industry; until then, the safest default.

Element Maps to now When it is right, and the alternative
NotesReceivableGross OtherNonOperatingCurrentAssets Non-lenders: the 'other' pair as now (as NotesReceivableNet); lenders (Banks/Fin overrides): NetLoansAndLeases, as FinancingReceivableExcludingAccruedInterestBeforeAllowanceForCreditLoss
FinancingReceivableExcludingAccruedInterestAfterAllowanceForCreditLossCurrent TradeReceivables TradeReceivables for incidental current notes and loans (as EdgarTools maps NotesAndLoansReceivableNetCurrent); NetLoansAndLeases when the receivables are a lending or captive-finance loan book
InterestExpenseOperating (synonym group interest_expense) interest_expense interest_expense when all of the filer's interest is operating (banks, finance companies); a filer with both operating and nonoperating interest needs the sum

Depends on the sign of a two-sided net amount (4)

How to handle it: Resolve two-sided net elements by the sign of the value, as the docs already describe; the balance context is accepted but never read today.

Element Maps to now When it is right, and the alternative
DeferredTaxAssetsLiabilitiesNetNoncurrent DeferredTaxNonCurrentLiabilities DeferredTaxNoncurrentAssets; the liability only when the value is negative
DeferredTaxAssetsLiabilitiesNet DeferredTaxNonCurrentLiabilities DeferredTaxNoncurrentAssets; the liability only when the value is negative (sign flipped)
DefinedBenefitPlanAmountsRecognizedInBalanceSheet RetirementRelatedNonCurrentAssets RetirementRelatedNonCurrentAssets when the net amount is an asset; RetirementRelatedNonCurrentLiabilities (sign reversed) when it is a net liability
DeferredTaxAssetsLiabilitiesNetCurrent DeferredTaxCurrentLiabilities DeferredTaxCurrentAssets; the liability concept only for a negative (net-liability) value, with the sign flipped

Meaning changed between taxonomy years (4)

How to handle it: Key the mapping to the filing's taxonomy year where FASB changed the definition (capitalized software in 2026; EquitySecuritiesFvNi in 2021).

Element Maps to now When it is right, and the alternative
EquitySecuritiesFvNi LongtermInvestments ShortTermInvestments for 2021+ filings (element is 'classified as current'); LongtermInvestments only for a 2018-2020 filing presenting it noncurrent
CapitalizedComputerSoftwareNet OtherOperatingNonCurrentAssets OtherOperatingNonCurrentAssets (or PlantPropertyEquipmentNet) for 2011-2025 filings; IntangibleAssets for 2026+ filings
CapitalizedComputerSoftwareGross PlantPropertyEquipmentNet PlantPropertyEquipmentNet (a PP&E component, like BuildingsAndImprovementsGross) for 2011-2025 filings; IntangibleAssetsGross for 2026+ filings
CapitalizedComputerSoftwareAccumulatedAmortization PlantPropertyEquipmentNet PlantPropertyEquipmentNet for 2011-2025 filings (software within PP&E); AccumulatedAmortizationIntangibles for 2026+ filings

Related Issues/Features: #1417 (the audit), the _disambiguate_by_context bug (#1434), #1419 (industry), the balance-sheet data issue (#1438).

synfonia-llc avatar Oct 06 '26 10:10 synfonia-llc

@dgunning, here is our current thinking on the root cause, proposed behavior, and coordination with other issues.

Root Cause:

Contextual lookup can accept a lone mapping before considering statement evidence or choose the first candidate when evidence is missing. The operating-cash getter also bypasses contextual resolution and can return a continuing-operations component as the whole; the demonstrated getter case is synthetic.

Proposed Behavior:

Separate candidate lookup from contextual resolution, retaining unresolved or conflicting interpretations and their source evidence. Apply the named current/noncurrent and statement-use corrections without inferring maturity, recognition or taxonomy version from a tag or missing sibling. Preserve the working section controls and source observations.

For operating cash, recommend selecting a supported reported total or returning unavailable, without promoting a continuing component or silently deriving a total. This deliberately narrows PR #1808’s operating “equivalent” membership while retaining the closed-membership guard; the component keeps its source data and an unresolved standard identity pending an agreed precise identity. Previously answered continuing-only getters may become unavailable, even when their amount equalled the whole, so reported-only versus a source-evidenced exception remains your decision. Investing and financing equivalents remain explicit follow-up work in this operating-first increment.

Coordination:

Keep a separate resolver/getter PR, coordinating #1438’s classification contract, #1451’s component definitions, #1446’s fallback migration and #1449’s qualified result. Order shared edits and update #1444/#1808 membership and regression pins to reflect the deliberate narrowing.

Below, please find the full design document. Please let me know your thoughts.

Brian

Attachment: design-public.md, Proposal for #1452: resolve mappings from source evidence and select reported totals honestly.

AI assistance: Codex; GPT-6.1 Sol (High) for current-main scouting, focused offline probes, and final writing; GPT-6 Astra (Max) for architecture, taxonomy-source checks, and drafting, with a separate agent providing independent financial statement review of contextual resolution, reported-total selection, and fallback behavior. Claude Opus 5.5 (High) performed adversarial review and independent resolver review; GPT-6.1 Sol (High) revised the proposal against those findings. A separate GPT-6.1 Sol (High) reviewed the revised financial/source meaning and public readiness.

synfonia-llc avatar Oct 27 '26 11:10 synfonia-llc