Skip to content

fix(bdc): is_active checks a dropped BDC's own filings once its report row expires - #1396

Merged
dgunning merged 1 commit into
mainfrom
fix/bdc-is-active-stale-report-row
Oct 1, 2026
Merged

dgunning merged 1 commit into
mainfrom
fix/bdc-is-active-stale-report-row

Conversation

@dgunning

@dgunning dgunning commented Oct 1, 2026

Copy link
Copy Markdown
Owner

Bead edgartools-huul (salvaged from closed PR #1380).

Problem

Since #1146 the BDC register combines the last three SEC BDC reports and keeps each registrant's newest row. The 2026 report dropped 22 registrants, including Ares Capital, Gladstone Capital, Great Elm and Goldman Sachs Private Credit. Their 2025 rows are dated around 2025-05-29 and leave the 18-month window around 2026-11-29. After that, is_active would have returned False for BDCs that file every quarter.

Fix

Rows now carry in_latest_report, and is_active decides like this:

Report row Result
inside the 18-month window True, no request
from the newest report, outside the window False: SEC's own current snapshot (the 1995-dated dormant registrants)
from an older report, outside the window the company's newest filing date from its submissions JSON, cached per CIK

That means at most 22 requests per session today, not 52 (one per stale row). If SEC can't be reached, is_active falls back to the report row with a warning. Any other error propagates rather than quietly reading as "inactive". An explicit get_bdc_list(year=...) older than the newest report is treated as a snapshot of that time.

PR #1380's version exposed the window rule as a helper for callers but left is_active reading the stale row.

Verification

  • Offline (fast): the module clock is frozen at 2026-12-01. There are tests for each branch, the unreachable fallback, other errors propagating, the register flag including explicit years, and parsing the submissions JSON. Every new test fails against main.
  • Live, also on 2026-12-01: ARCC is in_latest_report=False with a row dated 2025-05-29, its own latest filing is on or after its 2026-07-29 10-Q, and is_active is True. MAIN is in the latest report and active.
  • The get_latest_bdc_report_year() treats a 200 as a complete report, and the 2026 one is missing ARES CAPITAL CORP #1146 regression tests pass.
  • test-fast: the only failure is the dt1f1 20-F test, which also fails on main.

🤖 Generated with Claude Code

…t row expires (huul)

Since #1146 the register unions the last three SEC BDC reports and keeps
each registrant's newest row. 22 registrants the 2026 report dropped
(Ares Capital, Gladstone Capital, Great Elm, Goldman Sachs Private Credit,
...) keep 2025 rows dated ~2025-05-29, which leave the 18-month window
around 2026-11-29: is_active would have flipped to False for BDCs that
file every quarter.

Rows now carry in_latest_report. is_active:
- report row inside the window -> True, no request;
- row from the newest report, outside the window -> False (the SEC's own
  current snapshot; these are the 1995-dated dormant registrants);
- row from an older report, outside the window -> the company's newest
  filing date from its submissions JSON, lru-cached per CIK, so at most
  22 requests per session today rather than one per stale row (52).
An unreachable SEC falls back to the report row with a warning; any other
error propagates rather than reading as "inactive". An explicit
get_bdc_list(year=...) older than the newest report marks every row
not-latest, since it is a snapshot of then.

PR #1380's version exposed the window rule as a helper for callers but
left is_active on the stale row.

Tests freeze the module clock at 2026-12-01: offline cases for each
branch, the register flag, the submissions parse, and a live ARCC/MAIN
check (ARCC's own latest filing >= its 2026-07-29 10-Q).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dgunning
dgunning enabled auto-merge (squash) October 1, 2026 21:20
@dgunning
dgunning merged commit 5087041 into main Oct 1, 2026
10 checks passed
@dgunning
dgunning deleted the fix/bdc-is-active-stale-report-row branch October 1, 2026 21:35
@dgunning dgunning mentioned this pull request Oct 2, 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

Development

Successfully merging this pull request may close these issues.

1 participant