Skip to content

Keep workflow notes valid under the collection's type key - #26

Merged
callumalpass merged 1 commit into
mainfrom
fix/collection-type-key
Nov 17, 2026
Merged

callumalpass merged 1 commit into
mainfrom
fix/collection-type-key

Conversation

@callumalpass

Copy link
Copy Markdown
Owner

Follow-up to #25. In TaskNotes v5 collections (explicit_type_keys: [mdbase_type]) Workflows writes mdbase_type: runtime_workflow, which the runtime standard pack 0.2.0 type rejected (schema_required: type, schema_additional_properties: mdbase_type). Fixed upstream in mdbase-dev/mdbase-spec#70 (published as @callumalpass/mdbase-runtime 0.2.1) and mdbase-dev/mdbase-contracts#24 (pack 0.2.1, contract 1.1.0).

  • Bump @callumalpass/mdbase-runtime to 0.2.1; validateRuntimeWorkflowRecord passes runtime_workflow explicitly.
  • Note cards recognise workflow notes by the collection's configured type keys (they only checked type, so v5 notes relied on the loaded-workflow fallback and loadWorkflow returned null for unloaded ones).
  • The runtime-type hint also fires when only the version 1 type (pack 0.2.0) is installed; message says 0.2.1 or later.
  • Docs and changelog.

Tests: 110 pass, including a check that the note written under mdbase_type, custom_type and type validates as a 1.1.0 record, and the v1/v2 hint check. Lint and build clean.

Runtime standard pack 0.2.0's runtime_workflow type pinned `type` and
rejected other top-level keys, so the `mdbase_type: runtime_workflow` notes
written in TaskNotes v5 collections were invalid mdbase records. Pack 0.2.1
(contract 1.1.0) fixes that upstream.

- Use @callumalpass/mdbase-runtime 0.2.1 and pass the record type when
  validating, instead of relying on a `type` field.
- Recognise workflow notes for note cards by the collection's type keys.
- Show the runtime-type hint when only the version 1 type is installed.
- Document the type key and the 0.2.1 requirement.
@callumalpass
callumalpass merged commit 8acbd0f into main Nov 17, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant