Skip to content

Migration: v0.19.0 → v0.20.0

Status: Applies when upgrading from v0.19.0 to tagged v0.20.0.

Summary

v0.20.0 hardens Turtle/OBO patch matching for common Protégé/ROBOT styles and delivers the workspace runtime (EPIC-003): multi-ontology registry, dirty/save orchestration, workspace-aware transactions, selection/navigation persistence, session restore, and external-change recovery.

Patch operation names and legacy patch JSON arrays are unchanged.

Workspace runtime (new)

Ontology registry

  • Open ontologies are tracked in a host-owned registry (extension/src/workspace/) with id, path, format, role (root | import | scratch), editable, dirty, version, and active.
  • Set Active Ontology (ontocode.setActiveOntology) updates both the registry and LSP active_ontology_id.
  • Create entity and patch apply paths prefer the active editable ontology instead of ad-hoc QuickPick when possible.
  • Imported ontologies and read-only formats (OWL/XML, RDF/XML) are non-editable.

Dirty state and save

  • Dirty when the VS Code buffer is dirty or a successful semantic patch was applied.
  • Save / Save All (ontocode.save, ontocode.saveAll) orchestrate per-ontology saves, reindex, and OntologySaved events.
  • ontocode:isDirty reflects registry dirty count.

Transactions and undo

  • Semantic edits route through WorkspaceTransactionManager, wrapping ontocore-edit::Transaction.
  • LSP applyAxiomPatch returns optional undo_patches for invertible transactions.
  • Undo / Redo try semantic undo first, then fall back to VS Code text undo.

Selection, navigation, session

  • Selection and navigation stacks are host-owned (survive panel remount).
  • Commands: ontocode.navigateBack, ontocode.navigateForward.
  • Session persists open ontology URIs, active id, focus, navigation stack, and panel restore commands with semantic args.
  • On activate, ontologies reopen and panels restore with live context where possible.

External changes

  • File watcher prompts when a dirty buffer diverges from disk: Reload from disk, Keep buffer, or Compare.
  • Clean buffers auto-reload and reindex.

Turtle / OBO patch matching (unchanged wire format)

  • Language-tagged and typed literals match for remove operations
  • Primary-type and characteristic checks ignore a / type substrings inside comments and strings
  • IRI-object removes match both CURIE and <IRI> surface forms
  • SetOntologyIri rewrites rdf:type owl:Ontology declarations in place

What did not change in v0.20

  • Semantic transaction apply path introduced in v0.19 (ontocore-edit)
  • RDF/XML and OWL/XML write-back remained read-only in v0.20 (write-back shipped later in v0.21)

Upgrade steps (v0.19 → v0.20.0)

  1. Bump OntoCode extension and ontocore CLI to 0.20.0 (or continue to 0.21.0 if adopting current)
  2. No migration of saved patch payloads required
  3. Optional: .ontocode/session.json appears under workspace roots when session persistence runs