Skip to content

fix(bdc): a company the filer tags as a member is not stripped as a prefix (#1373) - #1375

Merged
dgunning merged 1 commit into
dgunning:mainfrom
mmitc:fix/bdc-company-member-not-prefix
Sep 28, 2026
Merged

dgunning merged 1 commit into
dgunning:mainfrom
mmitc:fix/bdc-company-member-not-prefix

Conversation

@mmitc

@mmitc mmitc commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #1373.

On <Company> | <Industry> | <Instrument> identifiers, a filer that also tags the company as a member puts its label among the member candidates. _match_company_candidate's prefix loop then stripped it as a grouping, stripped the industry, and returned the residue before the instrument cut: First Lien, Ordinary Shares, 9.1%. The same parse with no candidates named the company. from_xbrl passes the filing's candidates, so company_name carried the instrument.

Fix. In the prefix loop, a candidate that fills the whole first pipe segment is returned as the company. The check stays out of the way when that segment holds an instrument or a portfolio category (_known_investment_type_matches, _PORTFOLIO_CATEGORY_RE), because SLRC tags its headings (Senior Secured Loans, Common Equity/Equity Interests/Warrants) as members too. On SLRC's latest 10-Q that exception applies to 85 identifiers, all heading-led, which #1374 handles.

Measured over the latest 10-Q/10-K schedule of 42 BDCs (18,949 identifiers). Each was parsed with its own filing's member candidates, as from_xbrl does, before and after. 401 names move, every one from an instrument to the company. No investment_type moves, and the other 34 filers are unchanged:

filer accession moves before → after (example)
CSWC 0000017313-26-000095 155 of 578 First Lien → AAC New Holdco Inc.
PSEC 0001287032-26-000269 142 of 248 First Lien → Abacus Dermatology Management, LLC
TPVG 0001580345-26-000025 58 of 311 Preferred Stock → Ao1 Holdings, Inc.
ARCC 0001628280-26-050307 24 of 1,478 Series G → Aerin Medical Inc.
BBDC 0001379785-26-000030 14 of 705 9.1% → Jocassee Partners LLC
OCSL 0001414932-26-000017 4 of 532 First Lien → Thrasio, LLC
NMFC 0001496099-26-000029 3 of 493 Class B-1 → TVG-Edmentum Holdings, LLC
OTF 0001747777-26-000028 1 of 497 Series D → HARNESS INC.

Every moved name equals the identifier's first pipe segment, with a trailing comma dropped in three ARCC rows (Vamos Bidco, Inc., → Vamos Bidco, Inc.).

Tests. tests/issues/regression/test_issue_1373.py, offline, covers the four identifiers from the issue, each with its own company as the one candidate, plus the issue's from_xbrl repro on a stub XBRL. tests/bdc and tests/issues/regression (not slow or network) show the same 13 failures on main in this Windows environment: filing-text baselines, legacy-parser lookups and #1325's import-ordering test. There are no new failures.

Composes with #1374 (the fix for #1372): merged together, the 42-filer run moves exactly the union of the two.

🤖 Generated with Claude Code

…refix (dgunning#1373)

On "<Company> | <Industry> | <Instrument>" identifiers, a filer that also
tags the company as a member puts its label in the candidate set, and
_match_company_candidate's prefix loop stripped it as a grouping, then the
industry, and returned the residue before the instrument cut: "First
Lien", "Ordinary Shares", "9.1%". The no-candidate parse named the company.

A candidate that fills the whole first pipe segment is now returned as the
company. A segment holding an instrument or a portfolio category is still
a prefix: SLRC tags its headings ("Senior Secured Loans") as members.

Measured over the latest schedule of 42 BDCs (18,949 identifiers, each
parsed with its filing's own member candidates, as from_xbrl does): 401
names move (CSWC 155, PSEC 142, TPVG 58, ARCC 24, BBDC 14, OCSL 4, NMFC 3,
OTF 1), every one from an instrument to the company; no investment_type
moves, and no other filer changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dgunning
dgunning enabled auto-merge (squash) September 28, 2026 15:05
@dgunning
dgunning merged commit 9a8a30f into dgunning:main Sep 28, 2026
10 of 11 checks passed
@dgunning dgunning mentioned this pull request Sep 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants