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/) withid,path,format,role(root|import|scratch),editable,dirty,version, andactive. - Set Active Ontology (
ontocode.setActiveOntology) updates both the registry and LSPactive_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, andOntologySavedevents. ontocode:isDirtyreflects registry dirty count.
Transactions and undo¶
- Semantic edits route through
WorkspaceTransactionManager, wrappingontocore-edit::Transaction. - LSP
applyAxiomPatchreturns optionalundo_patchesfor 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 SetOntologyIrirewritesrdf:type owl:Ontologydeclarations 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)¶
- Bump OntoCode extension and
ontocoreCLI to 0.20.0 (or continue to 0.21.0 if adopting current) - No migration of saved patch payloads required
- Optional:
.ontocode/session.jsonappears under workspace roots when session persistence runs
Related¶
- Changelog: 0.20.0
- Next: Migration v0.20 → v0.21
- Spec: BLOCKER_03_WORKSPACE.md
- EPIC: #249