fix(serialization): emit the holon from xbrlkit through the bundle bridge - #1373
Conversation
…idge The platform's rdf/holon.py carried its own copy of the scene/boundary/ projection partition, forked from the kernel xbrlkit now owns. It seeded the scene from facts alone, so every element reached only by an arc — an empty statement line, an abstract header — left the holon without its rs:Element and rendered without a label: 56 of the SaaS demo's 98. The kernel had since fixed this (arc endpoints carried into projection, dimensions, the Report node) and the fork never inherited it. The holon flavor is now to_holon(bundle_to_xbrl_model(bundle)) — the same waist the Tavi flavor reads through — and the DataBook converter reads the flat JSON-LD back through xbrlkit's reader and calls the same writer. One partition, one repo; the platform copy is deleted. The flat JSON-LD encoder, the synchronous publish path, is untouched. The root IRI is unchanged (https://robosystems.ai/report/{id}), so the named graphs a DataBook declares keep their addresses. The regenerated demo sample loads in xbrlkit with 98 concepts and 93 labels (was 42/38), every arc endpoint declared. This is the holon half of the serialization-waist phase 3, pulled early by the defect. Claude-Session: https://claude.ai/code/session_01VQNt2hdNJqbJwfoSRshaXo
|
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 |
|
@claude please review this PR |
|
Claude finished @jfrench9's task in 3m 59s —— View job Reviewing PR #1373
PR SummaryTitle: fix(serialization): emit the holon from xbrlkit through the bundle bridge Deletes the platform's forked scene/boundary/projection partition ( Existing Review FeedbackNo human or bot reviews yet beyond the automated change-classification notice (this is a "normal" change, documented review required before merge). CI ( My ReviewIssues (should fix before merge)None found. Suggestions (non-blocking)
Verification performed
QuestionsNone — the description, diff, and regenerated fixture are internally consistent. VerdictAPPROVE — the fix is a clean deletion of forked logic in favor of the shared kernel path, backed by tests that actually pin the regression (arc-only elements) rather than just re-asserting old behavior. No correctness, security, or layering issues found. Suggest waiting for CI to go green before merge (it was still running at review time). |
#1373 replaced the platform's holon partition with xbrlkit's and regenerated the SaaS demo's sample; the other four tracked samples were still the old partition's output, each missing 52–59 element declarations for the rows its arcs reach. Regenerated offline from the flat JSON-LD beside each, through the DataBook converter — the same path the SaaS sample took. Every arc endpoint is now declared and each file reads back in xbrlkit with the report id as its accession. Claude-Session: https://claude.ai/code/session_01VQNt2hdNJqbJwfoSRshaXo
…refresh the demo samples #1373 moved the holon onto xbrlkit's writer and, with it, lost the identity the flat JSON-LD and the holon of one report had shared: the flat bundle names structures, associations, Information Blocks and fact sets by the platform's ids, xbrlkit slugged the role URI, and nothing on the bridge carried the ids across. Periods, units and facts were fine. The bridge now passes each network's structure_id and its fact set's id, and each fact's structure pin, and xbrlkit (#48) writes them verbatim. test_holon_alignment pins the invariant: every shared node class identical between the two projections, every fact on the same structure and fact set, IBs named by their structure; the only arcs the holon lacks are the definition arcs the bridge does not carry. All five demo sample sets are re-downloaded from one run each against the rebuilt stack with xbrlkit #48 installed — the four artifacts and the three reports per demo, from one report id — and pass a second round of checks: flat-vs-holon IRI identity on every class, every arc endpoint declared, the four representations agreeing on every shared value, the holon a fixed point of read-then-write, SHACL and Arelle clean. The old samples fail the same checks. Needs the xbrlkit release carrying #48 and its chore(deps) bump before CI can pass; opened as a draft until then. Claude-Session: https://claude.ai/code/session_01VQNt2hdNJqbJwfoSRshaXo
Summary
The platform's
rdf/holon.pycarried its own copy of the scene/boundary/projection partition, forked from the kernel xbrlkit now owns. It seeded the scene from facts alone, so every element reached only by an arc — an empty statement line, an abstract header — left the holon without itsrs:Elementand rendered without a label: 56 of the SaaS demo's 98 elements. xbrlkit's kernel had since fixed this (arc endpoints carried into#projection, dimensions, thers:Reportnode); the fork never inherited it.serialize_to_holon_jsonldis nowto_holon(bundle_to_xbrl_model(bundle))— the waist the Tavi flavor already reads through. The platform partition is deleted.examples/_common/databook.py) reads the flat JSON-LD back through xbrlkit's reader and calls the same writer, and stamps the report id as the accession so the derived holon reads back like the API's.saas-startup-demo.holon.jsonldis regenerated through the new path.Verification
rs:Elementdeclaredrs:Reportnode in#scenehttps://robosystems.ai/report/{id}Facts are identical before and after (86, 84 numeric, no value differences). New tests pin the regression — every arc endpoint declared, xbrlkit reads back every bundle concept, the named graphs hang off the report IRI.
tests/operations/serializationplus the download and publication-artifact tests: 230 passed.This is the holon half of
serialization-waistphase 3, pulled early by the defect; the JSON-LD half stays parked.🤖 Generated with Claude Code
https://claude.ai/code/session_01VQNt2hdNJqbJwfoSRshaXo