Skip to content

docs(mdbase): mark the standalone schemas as type-pack resources - #27

Merged
callumalpass merged 1 commit into
mainfrom
fix/pack-only-schema-documents
Nov 14, 2026
Merged

callumalpass merged 1 commit into
mainfrom
fix/pack-only-schema-documents

Conversation

@callumalpass

Copy link
Copy Markdown
Owner

Why

buildTaskNotesMdbaseResources returns taskSchemaDocument, bindingSchemaDocument and their paths, next to documents that hosts do write (config, contract, type). The TaskNotes plugin wrote the two schemas as plain files at _schemas/tasknotes/…. Those paths are managed resources of the tasknotes.task type pack, so the TaskNotes app's mdbase setup refused with collection_setup_namespace_conflict (callumalpass/tasknotes-app#436).

The model itself does no IO, so this PR changes the API contract rather than any write.

Change

  • Doc comments on taskSchemaDocument, bindingSchemaDocument, paths.taskSchema, paths.bindingSchema and buildTaskNotesMdbaseResources: these are type-pack resources, and a host never writes them as plain files. The contract already carries both schemas inline.
  • New test: the pack manages both schema paths with exactly these documents, and the contract's record_schema / binding_schema equal the schemas. A collection is therefore complete without the files.
  • CHANGELOG.md: Unreleased entry.

No API or output changes. npm test passes (136) and npm run typecheck is clean.

Related

taskSchemaDocument and bindingSchemaDocument (and their paths) are managed
resources of the tasknotes.task type pack. A host that writes them as plain
files blocks mdbase setup with collection_setup_namespace_conflict unless
the bytes match exactly (tasknotes-app #436). Say so on the type, and test
that the pack manages both paths and the contract carries both schemas
inline, so a collection is complete without the files.
@callumalpass
callumalpass merged commit e86a5af into main Nov 14, 2026
3 checks passed
@callumalpass
callumalpass deleted the fix/pack-only-schema-documents branch November 14, 2026 11:12
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