feat(tavi): name the entity from its label when no registrant fact exists - #51
Merged
Merged
Conversation
…ists A filing names its registrant in a dei fact; a model with no dei facts — a RoboLedger report projected through xbrlkit — carries the name as an `xbrl:label` on the entity object. The adapter now reads that label before falling back to humanizing the SQName, and uses it for `legalName` too. A filing's registrant-name fact still wins. Claude-Session: https://claude.ai/code/session_01TBKj1VsfBpKsFY7PPcrCFu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The Tavi adapter names the entity from an
xbrl:labelon the entity object when the model carries nodei:EntityRegistrantNamefact. A filing always has that fact; a RoboLedger report projected through xbrlkit (robosystems#1361, xbrlkit#25) has no dei facts and carries the name as the label instead, which xbrlkit now writes for every model. Without this the app would title a ledger report's pageEnt 01k….Changes
src/adapters/tavi.ts— entitynameisregistrantName ?? labelOf(entityName) ?? humanize(entityName);legalNamefalls back to the label the same way. Nothing else changes: the registrant fact still wins when present.test/tavi.test.ts— a model with an entity label and no registrant fact names the entity from the label; the SEC-shaped document still names it from the fact.Consumer Impact
Additive. SEC-shaped documents render identically (the dei fact takes precedence). A document with an entity label and no dei facts — the RoboLedger Tavi — now gets its entity name instead of a humanized identifier. Ships as 0.5.1; roboledger-app picks it up with the client minor.
Testing
just test-allgreen locally: format, lint, typecheck, 130 tests across 15 files.🤖 Generated with Claude Code
https://claude.ai/code/session_01TBKj1VsfBpKsFY7PPcrCFu