[BUG] Tax-related line items appearing as unmapped #22

Open
opened 2026-03-15 17:03:16 +00:00 by Francy51 · 1 comment
Owner

Description

Several tax-related XBRL concepts are appearing in the unmapped section rather than being properly categorized in the income statement or balance sheet.

Current Tax Mapping

From lib/server/financials/standard-template.ts:269-289:

income({
  key: 'income_tax_expense',
  label: 'Income Tax Expense',
  matchers: {
    exactLocalNames: ['IncomeTaxExpenseBenefit'],
    excludeLocalNames: [
      'CurrentIncomeTaxExpenseBenefit',
      'DeferredIncomeTaxExpenseBenefit',
      'DeferredFederalIncomeTaxExpenseBenefit',
      'DeferredForeignIncomeTaxExpenseBenefit',
      'DeferredStateAndLocalIncomeTaxExpenseBenefit'
    ],
    excludeLabelPhrases: ['current income tax', 'deferred income tax']
  }
})

Problem

The template excludes current/deferred tax breakdowns to avoid double-counting, but these items then appear as unmapped. This creates confusion because:

  1. Users see tax items in unmapped and think they're not being accounted for
  2. No visibility into the current vs deferred tax breakdown

Also check if these are properly mapped:

  • DeferredIncomeTaxAssetsNet - should map to deferred_income_taxes_asset
  • DeferredIncomeTaxLiabilitiesNet - should map to deferred_income_taxes_liability

Proposed Fix

  1. Create hidden detail rows for current/deferred tax that roll up to income_tax_expense
  2. Add componentKeys to income_tax_expense to show breakdown when expanded
  3. Ensure deferred tax assets/liabilities are properly excluded from unmapped

Files Affected

  • lib/server/financials/standard-template.ts
  • lib/server/financials/surface.ts
## Description Several tax-related XBRL concepts are appearing in the unmapped section rather than being properly categorized in the income statement or balance sheet. ## Current Tax Mapping From `lib/server/financials/standard-template.ts:269-289`: ```typescript income({ key: 'income_tax_expense', label: 'Income Tax Expense', matchers: { exactLocalNames: ['IncomeTaxExpenseBenefit'], excludeLocalNames: [ 'CurrentIncomeTaxExpenseBenefit', 'DeferredIncomeTaxExpenseBenefit', 'DeferredFederalIncomeTaxExpenseBenefit', 'DeferredForeignIncomeTaxExpenseBenefit', 'DeferredStateAndLocalIncomeTaxExpenseBenefit' ], excludeLabelPhrases: ['current income tax', 'deferred income tax'] } }) ``` ## Problem The template excludes current/deferred tax breakdowns to avoid double-counting, but these items then appear as unmapped. This creates confusion because: 1. Users see tax items in unmapped and think they're not being accounted for 2. No visibility into the current vs deferred tax breakdown ## Related Balance Sheet Items Also check if these are properly mapped: - `DeferredIncomeTaxAssetsNet` - should map to `deferred_income_taxes_asset` - `DeferredIncomeTaxLiabilitiesNet` - should map to `deferred_income_taxes_liability` ## Proposed Fix 1. Create hidden detail rows for current/deferred tax that roll up to `income_tax_expense` 2. Add `componentKeys` to `income_tax_expense` to show breakdown when expanded 3. Ensure deferred tax assets/liabilities are properly excluded from unmapped ## Files Affected - `lib/server/financials/standard-template.ts` - `lib/server/financials/surface.ts`
Author
Owner

Update: Root Cause Analysis

The Rust sidecar IS being used. Tax items are mapped via rust/taxonomy/fiscal/v1/core.income-bridge.json.

Current Tax Mapping:

From core.income-bridge.json (lines 221-254):

"income_tax_expense": {
  "direct_authoritative_concepts": [
    "us-gaap:IncomeTaxExpenseBenefit"
  ],
  "component_concept_groups": {
    "positive": [
      {
        "name": "pretax_income",
        "concepts": [...]
      }
    ]
  },
  "formula": "subtract"
}

Problem:

The income-bridge correctly maps IncomeTaxExpenseBenefit as the authoritative concept, but:

  1. Current/Deferred tax breakdowns (CurrentIncomeTaxExpenseBenefit, DeferredIncomeTaxExpenseBenefit) are NOT in the mapping
  2. These sub-components appear as unmapped because they have no surface definition
  3. The Rust surface_mapper.rs treats unmatched concepts as UnmappedResidual

Fix Required:

  1. Add a detail surface for tax breakdown that rolls up to income_tax_expense
  2. Add CurrentIncomeTaxExpenseBenefit and DeferredIncomeTaxExpenseBenefit to allowed_source_concepts with detail_grouping_policy: "group_all_children"
  3. Ensure balance sheet deferred tax assets/liabilities are properly mapped in core.surface.json

Files to Update:

  • rust/taxonomy/fiscal/v1/core.surface.json - Add tax detail surfaces
  • rust/taxonomy/fiscal/v1/core.income-bridge.json - Add tax component concepts
## Update: Root Cause Analysis **The Rust sidecar IS being used.** Tax items are mapped via `rust/taxonomy/fiscal/v1/core.income-bridge.json`. ### Current Tax Mapping: From `core.income-bridge.json` (lines 221-254): ```json "income_tax_expense": { "direct_authoritative_concepts": [ "us-gaap:IncomeTaxExpenseBenefit" ], "component_concept_groups": { "positive": [ { "name": "pretax_income", "concepts": [...] } ] }, "formula": "subtract" } ``` ### Problem: The income-bridge correctly maps `IncomeTaxExpenseBenefit` as the authoritative concept, but: 1. Current/Deferred tax breakdowns (`CurrentIncomeTaxExpenseBenefit`, `DeferredIncomeTaxExpenseBenefit`) are NOT in the mapping 2. These sub-components appear as unmapped because they have no surface definition 3. The Rust `surface_mapper.rs` treats unmatched concepts as `UnmappedResidual` ### Fix Required: 1. Add a detail surface for tax breakdown that rolls up to `income_tax_expense` 2. Add `CurrentIncomeTaxExpenseBenefit` and `DeferredIncomeTaxExpenseBenefit` to `allowed_source_concepts` with `detail_grouping_policy: "group_all_children"` 3. Ensure balance sheet deferred tax assets/liabilities are properly mapped in `core.surface.json` ### Files to Update: - `rust/taxonomy/fiscal/v1/core.surface.json` - Add tax detail surfaces - `rust/taxonomy/fiscal/v1/core.income-bridge.json` - Add tax component concepts
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Francy51/Neon-Desk#22