edgartools icon indicating copy to clipboard operation
edgartools copied to clipboard

10-Q Part II Item 1 replaced by an MD&A cross-reference; numbered-index rows fabricate item anchors (ICE/CSCO/CTSH 10-Qs, FMCC 10-Ks)

Open sf1tzp opened this issue 4 months ago • 3 comments

Issue Type

  • [x] Data Quality Issue (incorrect financial values, missing data)
  • [ ] XBRL Parsing Issue (statement rendering, concept mapping)
  • [ ] Filing Access Issue (download failures, attachment problems)
  • [ ] Performance Issue (slow operations, memory problems)
  • [ ] Compatibility Issue (platform/dependency conflicts)
  • [ ] Documentation Issue (unclear instructions, missing examples)

Environment

EdgarTools Version: 5.43.1 Python Version: 3.13.2 Operating System: Ubuntu (Linux 6.8.0)

Bug Description

What you expected to happen: obj['PART II, Item 1'] on Intercontinental Exchange's Q3 2024 10-Q returns the Legal Proceedings section — a legitimately short incorporation-by-reference stub opening with its own heading: "ITEM 1. LEGAL PROCEEDINGS — See Note 13 to the consolidated financial statements..." (~144 chars).

What actually happened: It returns 101,823 chars opening mid-sentence inside the MD&A's cross-reference to the 10-K: 'Item 1 "Business — Regulation" … included in our 2023 Form 10-K …' — mislabeled content from elsewhere in the filing, at confidence 0.95 with no warnings in the section map, so there is no signal to detect the defect without independently scanning the returned text.

Two distinct mechanisms produce this shape (both traced in 5.43.1):

  1. Cross-reference rescue (ICE, CSCO, CTSH 10-Qs). The TOC anchor for Part II Item 1 is correct; the real stub is <200 chars, which trips the undersized-section rescue in get_section_text. The rescue's _text_on_item_heading check demands the item-number → title mapping of a 10-K (_ITEM_TITLE_PATTERNS: 1 → BUSINESS) on a form where Item 1 is Legal Proceedings, so the correctly-anchored text is judged mis-anchored, and _find_actual_item_content then regex-hunts the raw HTML document-wide. The curly-quote entity &#8220; is composed entirely of separator-class characters, so the MD&A's Item 1 "Business — Regulation" cross-reference matches and silently replaces the section.
  2. Numbered-index bare numbers (FMCC 10-Ks). Freddie Mac's "List of Tables" index rows (11 | Other Investments Portfolio | 18) feed the generic TOC scan, and _extract_preceding_item_label reads the bare row-number cell as "Item 11" (the page-number range cap doesn't help — 11 is a valid 10-K item number). Every part_*_item_N anchors on an MD&A table caption: obj['Item 11'] returns 30K+ chars starting at "Table 11 - Other Investments Portfolio". Same fabrication feeds the phantom Part I/II items of GH #905.

Error message (if any):

None — the defect is silent: the mis-anchored part_ii_item_1 sits in the
section map at confidence 0.95 with no warnings.

Reproduction

Company/Ticker: ICE (also CSCO, CTSH; FMCC for mechanism 2) Time Period: Q3 2024 (reproduces on every ICE 10-Q, 2024–2026) Relevant Forms: 10-Q (FMCC: 10-K)

Minimal code to reproduce:

"""Reproduction: 10-Q Part II Item 1 mis-extracted (Intercontinental Exchange)

Filing: Intercontinental Exchange, Inc. 10-Q, accession 0001571949-24-000017
Standalone reproduction, edgartools 5.43.1.
"""
import os

os.environ.setdefault("EDGAR_IDENTITY", "you [email protected]")
from edgar import find

f = find("0001571949-24-000017")
obj = f.obj()

content = obj['PART II, Item 1'] or ""
print("PART II, Item 1:", len(content), "chars")   # 101,823 on 5.43.1
print("head:", repr(content[:200]))
# -> opens mid-sentence inside the MD&A's cross-reference to the 2023 10-K:
#    'Item 1 “Business — Regulation” and Part 1, Item 1(A) "Risk Factors"
#     included in our 2023 Form 10-K for a discussion of ...'

# Section map: the mis-anchored section carries full confidence, no warnings
for name, s in obj.document.sections.items():
    print(name, len(s.text() or ""), getattr(s, "confidence", None),
          getattr(s, "detection_method", None), getattr(s, "warnings", None))

Observed section map (5.43.1):

part_i_item_1: 98,303  0.95  toc  []
part_i_item_2: 116,169  0.95  toc  []
part_i_item_3: 635  0.95  toc  []
part_i_item_4: 927  0.95  toc  []
part_ii_item_1: 101,823  0.95  toc  []        <-- the MD&A cross-reference
part_ii_item_1a: 922  0.95  toc  []
part_ii_item_2: 477  0.5  toc  ['Item 2 content is 477 chars, below the
    expected minimum of 10,134 for a 10-Q — ...']
part_ii_item_3: 49  0.95  toc  []
part_ii_item_4: 51  0.95  toc  []
part_ii_item_5: 3,353  0.95  toc  []
part_ii_item_6: 2,531  0.95  toc  []

Additional Context

Affected filings (bulk scan of Fortune-500 filings, edgartools 5.43.1). The same shape reproduces on 12 documents across 12 filings:

  • ICE 10-Q PART II, Item 1 ×6 — accessions 0001571949-24-000014, -24-000017, -25-000007, -25-000013, -25-000018, -26-000007
  • CSCO 10-Q PART II, Item 1 ×2 — 0000858877-25-000007, -25-000033
  • CTSH 10-Q PART II, Item 1 ×2 — 0001058290-24-000242, -24-000327
  • FMCC 10-K Item 11 ×2 — 0001026214-22-000031, -23-000037 (mechanism 2)

Proposed fix. Branch sf1tzp/edgartools@fix-cross-reference-anchoring (based on 5.43.1):

  1. A text that opens with the item's own ITEM <n> heading (tolerating "1(A)" paren style and a leading PART header line) is on-heading whatever the form; the 10-K title match stays as a fallback. The rescue's search is bounded to [start anchor, end anchor) — its premise is an anchor that landed just before the body, so the real heading is never behind the anchor.
  2. A bare-number-derived index label is only trusted when the link's own target sits at that item's heading (_anchor_matches_heading); explicit "Item N." cells and keyword-vocabulary titles are unaffected. This also prevents the GH #905 FMCC phantom items at the source.

Unit tests (ICE-shaped 10-Q, FMCC-shaped list-of-tables index; no network) plus VCR-backed end-to-end tests pinned to both filings are on the branch.

Fix verification (2026-07-29). Re-extracting all 12 affected documents against the branch (chars are the raw obj[...] slice, 5.43.1 → fixed):

Filings Section 5.43.1 fixed
ICE 10-Q ×6 PART II, Item 1 75K–102K (MD&A cross-reference) 144–148, opens ITEM 1. LEGAL PROCEEDINGS
CSCO 10-Q ×2 PART II, Item 1 ~50K 195, opens Item 1. Legal Proceedings
CTSH 10-Q ×2 PART II, Item 1 106K–113K 90, opens Item 1. Legal Proceedings
FMCC 10-K ×2 Item 11 52K–57K (Table 11 - caption) 0

The FMCC result is honest under-capture rather than a regression: with the fabricated index anchors gone, the only line-anchored "Item 11" the parser can see in that filing is the index row itself, so the lookup returns nothing and the absence is detectable from the section map (the phantom previously sat there at full confidence).

Related but distinct (not addressed by the branch): FE 10-K Item 9A opens inside the auditor's report via the pattern detector (the TOC parse yields almost nothing there) — same "phrase instead of heading" family, different code path. Prior art: GH #904 / PR #906 (end-boundary overshoot), GH #915 (Workiva split-href TOC anchors), GH #905 (FMCC phantom part items).

sf1tzp avatar Jul 29 '26 06:07 sf1tzp

Status for 5.44.0: not included — this one is still open, and deliberately so.

The two defects you identified are both real and correctly diagnosed. PR #919's fix for the first (the short-section rescue rebuilding a section from a cross-reference) is sound and I want it. The fix for the second (bare-number corroboration against the link target) turned out to remove real items: measured across the 54 committed 10-K/10-Q fixtures, Morgan Stanley's 10-K dropped from 19 item sections to 6 — losing Items 1C, 3, 4, 7A, 9, 9A, 9B, 9C and all of Part III — and American Express lost 3. Full detail on the PR.

So the FMCC "Table N" caption bug is understood but unfixed, and the ICE/CSCO/CTSH cross-reference bug is fixed in a branch that isn't merged yet. Keeping this issue open until both halves land.

dgunning avatar Jul 29 '26 23:07 dgunning

PR #919 is merged and shipped in 5.44.1, now on PyPI. Thank you — the fix was sound as written and needed no changes from me.

ICE's obj['PART II, Item 1'] no longer gets rebuilt from the MD&A's cross-reference to the 2023 10-K, and the same shape on CSCO and CTSH is covered. Both halves of your diagnosis were correct: the on-heading check demanding the 10-K title for an item number on a form where that number names something else, and the rescue then searching the raw HTML document-wide instead of within the section's own anchor window.

Keeping this issue open for the second mechanism — Freddie Mac's "List of Tables" index rows feeding bare row numbers to _extract_preceding_item_label, so obj['Item 11'] anchors on the "Table 11 - Other Investments Portfolio" caption. That half is understood but unfixed: the corroboration approach in PR #926 removed real items when measured across the committed fixtures (Morgan Stanley's 10-K dropped from 19 item sections to 6, losing Items 1C, 3, 4, 7A, 9, 9A, 9B, 9C and all of Part III; American Express lost 3), so it is not something I can take as-is. Detail is on that PR.

If you want to keep going at it, the constraint to design against is that a bare number in a numbered index and a legitimate item number in a sparse TOC look identical locally — the signal probably has to come from the row's context (is this index monotonic from 1? do its targets land inside another item's span?) rather than from the number itself. Happy to look at an approach before you invest in building it.

One housekeeping note for anyone reading later: an earlier combined branch carrying both halves is floating around, and it includes the regressing numbered-index change. 5.44.1 contains only the cross-reference half (a6323adc).

dgunning avatar Jul 31 '26 14:07 dgunning

Fixed in 5.46.0. Numbered index rows no longer fabricate item anchors — bare numbers are ignored when the containing table's header names the numbering without an "Item" column (0b4c2ffe). Shipped alongside the related cross-reference-index fixes for Citigroup and the two-column TOC case; see the 5.46.0 changelog.

dgunning avatar Aug 07 '26 19:08 dgunning