Repository navigation
Leave the type key to the collection in runtime records (pack 0.2.1) - #70
Merged
Merged
Conversation
The ten runtime record schemas required and pinned `type` and rejected other top-level fields. Engines write a record's type under the collection's configured explicit_type_keys, so every runtime record was invalid in a collection that declares types with `mdbase_type` (TaskNotes v5, Reader). Record contracts 1.1.0 and types v2 drop the pinned `type` and accept top-level fields outside the contract; nested structures stay closed and every 1.0.0-valid record stays valid. Pack 0.2.1 carries them; 0.2.0 stays as published. @callumalpass/mdbase-runtime 0.2.1 validates against 1.1.0 and validateRuntimeRecord accepts the record type for records declared under another key.
A collection type that still implements a 1.0.0 runtime record contract would be left invalid if the upgraded pack stopped installing it. Copy the 1.0.0 schemas and contracts byte-for-byte from the published 0.2.0 pack.
This was referenced Nov 17, 2026
Merged
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.
The ten runtime record schemas required and pinned
type(type: runtime_workflow…) and rejected other top-level fields. A conforming engine writes a record's type under the collection's configuredexplicit_type_keys(§12), so in any collection that declares types withmdbase_type(TaskNotes v5, Reader) every runtime record was invalid, and a record carrying both keys was invalid everywhere. Verified with the reference engine (mdbase validate) against the published type:mdbase_type: runtime_workflow→schema_required: type+schema_additional_properties: mdbase_type.This is the same bug mdbase-contracts#14 fixed for the Person/Comment/View starters.
typeand accept top-level fields outside the contract; nested structures stay closed. Strictly looser, so every 1.0.0-valid record stays valid. Types keep theirmatch: type: runtime_*rule for hand-written records.standard-packs/mdbase-runtime/0.2.1carries them; event/action artifacts are byte-identical to 0.2.0. 0.2.0 stays as published; the generator writes only the current pack.@callumalpass/mdbase-runtime0.2.1: validates against 1.1.0;validateRuntimeRecord(value, recordType?)takes the record type for records declared under another key;typeis optional onRuntimeWorkflow/RuntimePolicy.Local: runtime package 6/6 (new test for the configured-key case), reference executor 1/1,
check_v03_tests.pyand level guardrail pass, generator has no drift.