feat(tavi): rebuild definition networks from cubes on read - #71
Conversation
The TAVI emitter writes the definition linkbase as cube objects, and the reader skipped them, so a TAVI-loaded filing's information blocks had no hypercubes: on JPM's FY2025 10-K, 0 against the holon's 140. _definition_networks walks each cube back into all, hypercube-dimension, dimension-domain, domain-member and dimension-default arcs, one definition network per role. A cube does not name its hypercube element, its primary items or an axis's default member, so the reader takes the table from the role's own presentation tree (a table no role presents keeps the cube's name rather than a guess), the primary items from that table's other children, and an optional axis's default from its domain. Measured against the holon: JPM 136/140 hypercubes, BAC 112/116, with every axis, domain and member set identical. What remains is exactly what the cube cannot carry: tables the filer presents under other names, tables with no axes, and defaults that are not the domain.
|
@claude please review this PR |
|
Claude finished @jfrench9's task in 1m 46s —— View job Reviewing PR #71
PR SummaryTitle: feat(tavi): rebuild definition networks from cubes on read Adds Existing Review FeedbackNo prior human or bot reviews, and no inline comments on this PR — this is the first pass. My ReviewI read the diff against Issues (should fix before merge)None found — I didn't find a correctness bug in the arc-building logic. The domain-member flattening correctly relies on the emitter having already resolved Suggestions (non-blocking improvements)
QuestionsNone — the PR description's inline comments on the three "not properties of our own" omissions (ecd roles, axis-less tables, non-domain defaults) already anticipate the natural follow-up questions. VerdictAPPROVE. The change is well-scoped (read-side only, no emitted-file impact as stated), the docstrings clearly justify each inference the reader makes, and the new tests cover the three new code paths (table presented, table not presented/name-collision fallback, optional-axis default). The two suggestions above are polish, not blockers. Note: I could not run |
|
@claude please review this PR — it now also carries the TAVI-first published load and the INF-precision fix (two new commits). |
|
Claude finished @jfrench9's task in 2m 57s —— View job Reviewing PR #71 (requested: review of the two new commits)
Finding: the two new commits aren't in this checkoutI can't find either of the changes described in your comment in the repository as checked out for this run (
The merge commit message ( I also can't independently confirm via Could you confirm the two commits were actually pushed to For reference, my review of the definition-networks rebuild (the code that is present here) stands from the earlier pass: no correctness issues found, two non-blocking suggestions ( |
|
Correction: the last two commits reached this branch after it merged, so the TAVI-first published load and the INF-precision fix are not in this merge. They are in #72. The description above now matches what merged. |
Summary
A TAVI-loaded filing now has its definition linkbase back. The TAVI emitter writes dimensional wiring as cube objects, and the reader skipped them, so
information_blockfound no hypercubes on a TAVI load: on JPM's FY2025 10-K, 0 against the holon's 140.Changes
deserialize/tavi.py:_definition_networkswalks each cube back intoall,hypercube-dimension,dimension-domain,domain-memberanddimension-defaultarcs, one definition network per role (cubes join roles throughgroupContents)._networks' group-to-role mapping is factored into_roles.is_hypercube_item.tests/test_deserialize.py: the test that asserted TAVI loses the definition networks now asserts it rebuilds them (following atargetRolehop); new tests cover a presented table and an optional axis's default.Output Impact
INTERNAL for every emitted file, broader coverage on read.
Every axis, domain and member set in the rebuilt cubes is identical to the holon's. The remainder is what a cube cannot carry (tables presented under another element, axis-less tables, non-domain defaults), raised as a comment on the TAVI draft.
Testing
just test-all: 547 passed, 2 skipped; ruff, format and basedpyright clean.