Offer migration of workflow schema 1 to schema 2 #9

Closed
opened 2026-10-04 10:54:20 -07:00 by root-at-skic · 0 comments
Owner

Detect workflow diagrams that use schema_version: 1 and offer to migrate them to schema version 2.

Why: the workflow schema accepts both versions, and the bundled CLI has a migration:

archify migrate workflow <old.json> <new.json> --to-schema 2 [--json]

Today nothing in the extension tells the user that v2 exists or how to get there.

How:

  • Show an information-level diagnostic on schema_version: 1 in workflow .archify / *.workflow.json files, with a quick fix, Migrate to schema 2.
  • Convert to temp JSON, run migrate, and write the result back in the source format (YAML for .archify, via scripts/to-yaml.mjs logic). Apply it as a single WorkspaceEdit so undo works.
  • If migration fails, show its diagnostics instead of editing.

Done when: a test migrates a v1 workflow fixture and the result validates.

Detect workflow diagrams that use `schema_version: 1` and offer to migrate them to schema version 2. **Why:** the workflow schema accepts both versions, and the bundled CLI has a migration: ``` archify migrate workflow <old.json> <new.json> --to-schema 2 [--json] ``` Today nothing in the extension tells the user that v2 exists or how to get there. **How:** - Show an information-level diagnostic on `schema_version: 1` in workflow `.archify` / `*.workflow.json` files, with a quick fix, **Migrate to schema 2**. - Convert to temp JSON, run `migrate`, and write the result back in the source format (YAML for `.archify`, via `scripts/to-yaml.mjs` logic). Apply it as a single `WorkspaceEdit` so undo works. - If migration fails, show its diagnostics instead of editing. **Done when:** a test migrates a v1 workflow fixture and the result validates.
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: vscode-extensions/archify-vscode-ext#9