Repository navigation
Publish runtime pack 0.2.1: leave the type key to the collection - #24
Merged
Merged
Conversation
The runtime record contracts 1.0.0 and their types required and pinned `type: runtime_*` and rejected other top-level fields, so every runtime record was invalid in collections that declare types with `mdbase_type` (TaskNotes v5, Reader). This is the bug #14 fixed for the starters. mdbase.runtime.standard 0.2.1 (from mdbase-spec) carries record contracts 1.1.0 and types v2 that neither require nor declare `type` and accept top-level fields outside the contract, keeps installing the 1.0.0 contracts, and gives every resource an explicit managed mode. 0.2.0 is hidden with its provision byte-identical. The importer now adds a version beside earlier ones instead of deleting them, and the type-key test covers runtime types.
Pack 0.2.1 installs both 1.0.0 and 1.1.0 of each record contract, and the importer recorded whichever it read last, so the pack claimed to provide 1.0.0. Take the provided versions from the types' implements instead.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #14 for the runtime pack, which #14 didn't cover.
The
mdbase.runtime.*1.0.0 record contracts and their types required and pinnedtype: runtime_*and rejected other top-level fields. Engines write a record's type under the collection'sexplicit_type_keys, so in collections that usemdbase_type(TaskNotes v5, Reader) every runtime record was invalid (schema_required: type,schema_additional_properties: mdbase_type), and a record with both keys was invalid everywhere.mdbase.runtime.standard0.2.1, imported from Leave the type key to the collection in runtime records (pack 0.2.1) mdbase-spec#70: record contracts 1.1.0 and types v2 neither require nor declaretypeand accept top-level fields outside the contract; nested structures stay closed. Every 1.0.0-valid record stays valid. Types keep theirmatchrule.managedmode, which 0.2.0 omitted (the current engine rejects resources without a mode).dist/packs/mdbase.runtime.standard/0.2.0.jsonand all 1.0.0 artifacts are byte-identical.sync-runtime-pack.mjsadds the current version beside earlier ones (types undertypes/mdbase-runtime/v2/) and refuses to overwrite a differing artifact, instead of deleting earlier versions.starter-type-keys.test.mjsnow covers the ten runtime types.Checked with the reference engine (
mdbase validate): withexplicit_type_keys: [mdbase_type],mdbase_type: runtime_workflow,type: runtime_workflowand both keys all validate against workflow v2; the default collection is clean too.Local: node tests 42/42 + seed-baselines/contract-retention pass, build has no drift beyond the new artifacts. Engine-backed verify and install tests run in CI.
sources.jsonis bumped to the spec merge commit once #70 merges.