feat(tavi): carry an authored report's own fields as rs: properties - #73
Conversation
An authored report (a RoboLedger tenant's) carries content TAVI has no object for: the reporting style, the entity's legal name, and for each network its structure, block type, fact set and order, and each fact's structure. The holon kept them; the TAVI dropped them. They now ride as model-defined properties under the RoboSystems vocabulary (sections 5.13 / 11.6), each declared by a property type, on the model, entity, network and fact objects, and the reader reads them back, matched on the IRI whatever prefix a document binds. A filing carries none of them, so its document is unchanged: NVDA's and JPM's TAVI are byte-identical to 0.18.0's, with no `rs` binding. The legal name is written only when it differs from the name (the parse sets it to the name), and the report IRI is left out: the report namespace already names the report, and a filing's report_uri is its EDGAR document URL.
|
@claude please review this PR |
|
Claude finished @jfrench9's task in 4m 25s —— View job Claude's review of this PRTodo list
SummaryThis is a clean, well-scoped change. A few minor things worth a look, none blocking:
Design choices I checked and found sound:
Environment note: I could not run |
Summary
An authored report's own fields now survive the TAVI. A RoboLedger tenant report carries content TAVI has no object for (its reporting style, the entity's legal name, each network's structure, block type, fact set and order, each fact's structure). The holon kept them and the TAVI dropped them, which is one of the things standing between the TAVI and replacing the holon for tenant reports.
Changes
serialize/tavi.py:REPORT_PROPERTIESdeclares sevenrs:model-defined properties under the RoboSystems vocabulary (https://robosystems.ai/vocab/, the holon's), each with a property type (§11.6,definitional: false) naming the objects it may sit on:rs:reportingStyle;rs:legalName;rs:blockType,rs:structureId,rs:factSetId,rs:structureOrder;rs:structureId.Each property and its type is written only when something carries a value, and
rsis bound only then.deserialize/tavi.py: reads them back ontoFilingMeta,EntityIdentity,NetworkandXbrlFact, matched on the expanded IRI whatever prefix a document binds (as provenance is). A fact'srs:structureIdis not counted as an unmapped property.Two deliberate omissions keep a filing's document spec-shaped:
report_uriis its EDGAR document URL.Tests: the fields round-trip through TAVI; a filing's TAVI (with a legal name equal to its name and an EDGAR
report_uri) carries norsbinding and no property types.Output Impact
CHANGED OUTPUT for authored reports only. A tenant report's TAVI gains the
rsbinding, the property types and the properties above. A filing's output is unchanged: NVDA's and JPM's FY2025 10-K TAVI, parsed from EDGAR, are byte-identical to 0.18.0's (sha2568059a98c…andfe5d9160…), with norsbinding.On two RoboLedger demo reports (bundle → TAVI → model, compared field by field), the round trip no longer loses
block_type,structure_id,fact_set_idorreporting_style. What it still differs on is outside this change: the report IRI and a legal name equal to the name (by design, above); per-fact entity identifiers; derived period fields; anddecimals, which the platform's bundle sends as unknown and TAVI can only write as exact.Testing
just test-all: 552 passed, 2 skipped; ruff, format and basedpyright clean.to_tavi_reportover a fresh EDGAR parse of NVDA and JPM, sha256 against the 0.18.0 release.bundle_to_xbrl_modeland this branch's writer and reader.