Round-trip fidelity bug in RO-Crate export, observed from the aruna workspace (noted there in .claude/OPEN_ISSUES.md).
Two related behaviors:
- Array-context term mappings are dropped on export. A dataset crate imported with a custom
@context in array form (base context plus an object of custom term mappings) exports with those term mappings missing: render_export_view → splice_context_json splices the stored raw context back, but the custom array entries do not survive for dataset crates. The exported JSON-LD uses terms that no longer resolve, so the crate is non-conformant.
- Full replacement resets the stored context.
reset_context_after_replacement clears the stored custom context when a document is replaced wholesale, so even a subsequent correct export cannot restore the original terms.
Impact: any crate using profile-specific vocabulary via custom context terms cannot round-trip through import → export. Downstream this blocks attached RO-Crate export in aruna (arunaengine/aruna#326), and the OAI-PMH provider work inherits whatever export produces.
Expected: the exported @context is semantically equivalent to the imported one — custom term mappings preserved across export and across full-document replacement.
Round-trip fidelity bug in RO-Crate export, observed from the aruna workspace (noted there in
.claude/OPEN_ISSUES.md).Two related behaviors:
@contextin array form (base context plus an object of custom term mappings) exports with those term mappings missing:render_export_view→splice_context_jsonsplices the stored raw context back, but the custom array entries do not survive for dataset crates. The exported JSON-LD uses terms that no longer resolve, so the crate is non-conformant.reset_context_after_replacementclears the stored custom context when a document is replaced wholesale, so even a subsequent correct export cannot restore the original terms.Impact: any crate using profile-specific vocabulary via custom context terms cannot round-trip through import → export. Downstream this blocks attached RO-Crate export in aruna (arunaengine/aruna#326), and the OAI-PMH provider work inherits whatever export produces.
Expected: the exported
@contextis semantically equivalent to the imported one — custom term mappings preserved across export and across full-document replacement.