Skip to content

Export drops custom array @context term mappings; full replacement resets stored context #3

Description

@St4NNi

Round-trip fidelity bug in RO-Crate export, observed from the aruna workspace (noted there in .claude/OPEN_ISSUES.md).

Two related behaviors:

  1. 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_viewsplice_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.
  2. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions