feat(serve): load published filings from the TAVI first; keep INF precision - #72
Conversation
A TAVI numeric fact with no decimals is infinitely precise (the fact value object leaves the property out for INF), but the reader read it as unknown, so an exact fact lost to a rounded duplicate of itself: JPM's shares issued at 2024-12-31 read 4,104,900,000 instead of 4,104,933,895. Domains and members are objects of their own in TAVI, not concepts, so no fact can report against one; they now read back abstract, as the parse has them.
The public catalog lists each filing's tavi.json beside its holon. PublishedFiling carries both (holon_url is now optional, and a filing published as a TAVI alone is still a published filing), and the load tries the TAVI first and falls back to the holon when it cannot be fetched or read. The TAVI carries its text blocks inline, so there is nothing to fetch after it, and it loads in about half the time: NVDA 1.0s against 1.7s, JPM 3.1s against 5.5s, from the live CDN. Its fact count matches the parse of the filing (NVDA 1,305), where the holon collapses repeated tags.
|
@claude please review this PR |
|
Claude finished @jfrench9's task in 2m 17s —— View job Reviewing PR #72
|

Summary
The follow-up to #71:
load_filingnow reads a published filing from its TAVI model first, and a TAVI-loaded fact keeps its precision. These two commits were meant for #71 but reached its branch after it merged.Changes
fix(tavi): read INF precision and abstract members back(deserialize/tavi.py)decimalsreads asINF. The draft leaves the property out for an infinitely precise value; read as unknown, an exact fact lost to its own rounded duplicate. JPM's shares issued at 2024-12-31 read 4,104,900,000 instead of 4,104,933,895.feat(serve): load a published filing from its TAVI model first(serve/session.py)PublishedFilingcarriestavi_urlbesideholon_url(now optional), andmodel_urlsorders them TAVI first. A manifest or catalog entry that lists only a TAVI is still a published filing._load_publishedtries each in order and falls back to the holon when the TAVI cannot be fetched or read. The TAVI carries its text blocks inline, so no fragments are fetched after it.Output Impact
INTERNAL for every emitted file; the writers are untouched. What
load_filinganswers from changes for a published filing: the TAVI instead of the holon. Measured against the holon load of the same filings from the live CDN:disclosuresinformation_blockon dimensional sections, identicaldescribe_filingdiffers only in counts, and there the TAVI is the faithful one: it carries every fact the filing tags (NVDA 1,305, which is what xbrlkit's own parse of the filing counts), where the holon collapses repeated tags to 1,219. The remaininginformation_blockdifferences are orderings, a suffixed duplicate role the holon lists as merged, and the default member ofus-gaap:FairValueByMeasurementBasisAxis, which a cube cannot carry.Testing
just test-all: 550 passed, 2 skipped; ruff, format and basedpyright clean.FilingSessionload frompublic.robosystems.ai, TAVI first against holon only.