Skip to content

chore(sec): xbrlkit 0.20.9 — aligned filing tables, shared 8-K assembly - #1678

Merged
jfrench9 merged 2 commits into
mainfrom
chore/xbrlkit-0-20-9-alignment
Oct 4, 2026
Merged

jfrench9 merged 2 commits into
mainfrom
chore/xbrlkit-0-20-9-alignment

Conversation

@jfrench9

@jfrench9 jfrench9 commented Oct 4, 2026

Copy link
Copy Markdown
Member

Summary

Picks up xbrlkit 0.20.9 (RoboFinSystems/xbrlkit#96), which fixes how financial tables render in filing text. $ cells and self-closing spacer cells used to push values into the wrong columns. The SEC search-text and read-text tools render through xbrlkit, so they now get aligned tables too. This PR also moves this server's 8-K text assembly onto xbrlkit's: an 8-K, its exhibits and all, now reads the same here as it does in xbrlkit, character for character.

Changes

Dependencies

  • xbrlkit floor raised to >=0.20.9,<0.21.0, and uv.lock updated. Only the xbrlkit entry changed.

adapters/sec/processors/current_reports.py

  • current_report_text now builds the 8-K text with xbrlkit's join_texts instead of its own copy of that loop. The layout is unchanged: the 8-K under ## Form 8-K, then each exhibit under its own heading, each a section with its offset. No inner sections are passed, so the section list is the same as before.

operations/roboledger/views/filing_text.py

  • TEXT_CACHE_VERSION goes from "2" to "3". The new table rendering changes the text and the offsets into it. Without the bump, text cached before the deploy could be served alongside text built after it for up to the 6-hour TTL, and an offset from one wouldn't land in the same place in the other.

For reviewers

  • The SEC full-text index (search-documents) also renders through xbrlkit. Filings already indexed keep the old table layout until they're reprocessed; new filings get the new one. That isn't changed here, and a reindex isn't needed, because matching is by words.

Breaking Changes

None. No API, GraphQL or operations-envelope shape changes. search-text and read-text return different text for tables, and different character offsets after them, but the response shapes are the same.

Testing

  • just test-all: 16,375 passed, 42 skipped, 4 xfailed; ruff, format and basedpyright clean.
  • The SEC adapter, MCP filing-text tool and roboledger view suites were run on their own against 0.20.9 before the full gate: 1,204 passed.
  • Parity check on Workiva's Q2 2026 earnings 8-K (0001445305-26-000059). current_report_text, run over the 8-K and EX-99.1 from the public CDN, matched xbrlkit 0.20.9 loading the same filing from EDGAR: identical text (32,917 chars) and identical section offsets (form_8k at 12, ex_99_1 at 3,689). The reconciliation table's free-cash-flow row now reads | Free cash flow | $77,976 | $49,316 | $103,724 | $41,195 |, one value per period column.

Certification

  • I have the right to submit this work under the Apache 2.0 license, and do so. Where any part of it is owned by my employer, I have their permission.

xbrlkit 0.20.9 reads an 8-K with its EX-99 exhibits in the layout this
server already used, and exports the assembly as join_texts; the local copy
gives way to it, so the two read an 8-K to the same character. The text
cache version moves with the release's table rendering, so text cached
before the deploy is not served beside text built after it.
@github-actions github-actions Bot added the change:normal Normal change: automated review documented on the pull request before merge label Oct 4, 2026
@github-actions

github-actions Bot commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

Change classification: normal — platform or application code changed.

A normal change carries a documented automated review on this pull request before merge, in place of a second human approver. The change-classification job requests that review and passes once it has been posted. Recorded by the change-classification job.

@jfrench9

jfrench9 commented Oct 4, 2026

Copy link
Copy Markdown
Member Author

@claude please review this PR

@claude

claude Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

Claude finished @jfrench9's task in 15s —— View job


Review of PR #1678

Verdict: looks good to merge. The diff is small and does what the description says.

  • Read the diff against origin/main
  • Checked the cache-version bump and the refactor for leftovers

current_reports.py

  • Swapping the hand-rolled loop for join_texts keeps the same layout: a ## label header, the body, then a blank line. Offsets and heading_chars are now xbrlkit's, so the two can't drift.
  • TextSection is still imported and still used by CurrentReportText.sections, so the import is not dead. build_text is still used at line 262.
  • The old loop skipped documents with an empty body. I couldn't read join_texts in this environment (the .venv isn't present on the runner), so I'm relying on your parity check for that behaviour. Your Workiva check covers the non-empty case. Please confirm join_texts also skips empty-text entries. It would help to add a small unit test with one empty document in the middle, since that case isn't covered by the Workiva run.
  • Passing [] as the inner sections preserves the old section list, as described.

filing_text.py

  • Bumping TEXT_CACHE_VERSION to "3" is correct. The key is ft:text:v{VERSION}:{graph_id}:{ref.key}, so old and new text can't be mixed within the 6-hour TTL. Rollout is clean. The only cost is a one-time cache miss.
  • Nothing else in robosystems/ references the version constant, so there are no other places to update.

Dependencies

  • The pyproject.toml floor is raised to >=0.20.9,<0.21.0. uv.lock has only the xbrlkit entry changed, which is the right scope.

Notes (non-blocking)

  • Old indexed filings keep the previous table layout in search-documents until reprocessed. The PR already states this. Since matching is by words, I agree no reindex is needed.
  • I didn't run the test suite. The PR reports just test-all green, and CI is the authority.

@jfrench9
jfrench9 merged commit 60c8d31 into main Oct 4, 2026
8 checks passed
@jfrench9
jfrench9 deleted the chore/xbrlkit-0-20-9-alignment branch October 4, 2026 23:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

change:normal Normal change: automated review documented on the pull request before merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant