List every earlier starter as a seed upgrade baseline - #59
Merged
Merged
Conversation
Pack beta.4 named only the beta.3 starters as `upgrade_from`, so a collection installed from an earlier pack was merged against the wrong document: upgrading an edited beta.1 seed treated beta.1's `match` rules, which beta.3 removed, as the collection's own edit and restored them. mdbase-spec 05A (mdbase-dev/mdbase-spec#59) lets a seed list every starter it supports and has engines choose the baseline from the lock's seed origin. Pack beta.5 ships the same version-2 starters and lists, newest first, each distinct starter Reader has shipped, with its `version`: - reader-source: beta.3 (82869c1), beta.2 (54f46e7), beta.1 (e8a3fca) - reader-annotation: beta.3 (1fb7e75), beta.1 (9b6b0fc) beta.2 changed only reader-source, and the beta.3 starters were also served as beta.1 between #20 and #26. The new baselines are the exact released bytes from 5c55c7d and fde2582; the released beta.2 pack is added as a fixture. An unedited starter from any of them is replaced with the exact version-2 bytes. An edited seed is merged against the starter it was installed from; for beta.1 and beta.2 that removes the top-level `match` rule, which 05A leaves to manual review, so the upgrade fails closed instead of restoring it. A seed whose lock predates recorded origins is kept with a reason. Verification installs packs with @callumalpass/mdbase 0.3.0-rc.9, which supports baseline lists. Until a Connect release includes mdbase-dev/mdbase-connect#567, @mdbase-dev/connect-dev rejects them, so connect-protocol 0.1.0-beta.124 is patched with that PR's schema change; drop the patch when moving to that release.
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.
Ready: Connect beta125, which includes mdbase-dev/mdbase-connect#567, is in production, and the SDK is published at 0.1.0-beta.125.
What changes
Pack
dev.mdbase.reader1.0.0-beta.5 ships the same version-2 starters as beta.4, but each seed'supgrade_fromnow lists every distinct starter Reader ever shipped (mdbase-spec 05A, mdbase-dev/mdbase-spec#59), newest first, each withversionfrom its frontmatter:_types/reader-source.md82869c12…mdbase/baselines/1.0.0-beta.3/types/reader-source.md54f46e7c…mdbase/baselines/1.0.0-beta.2/types/reader-source.md(new, from fde2582)e8a3fca6…mdbase/baselines/1.0.0-beta.1/types/reader-source.md(new, from 5c55c7d)_types/reader-annotation.md1fb7e758…mdbase/baselines/1.0.0-beta.3/types/reader-annotation.md9b6b0fc7…mdbase/baselines/1.0.0-beta.1/types/reader-annotation.md(new, from 5c55c7d)beta.2 changed only reader-source. The beta.3 starters were also served under pack version beta.1 between #20 and #26. The exact released beta.2 pack is added as
scripts/fixtures/reader-pack-beta2.json.Behaviour (JS engine rc.9 and the Rust CLI at mdbase-rs 056db73)
updatewith the exact v2 bytes;upgrade_baselineis the starter that was installed.matchrule, and 05A leaves top-level removals to manual review, so the upgrade fails closed (conflict) and leaves the file untouched. With beta.4, the same upgrade restoredmatch: path_globas if it were the collection's edit. If the collection had also droppedmatch, the merge goes through (upgrade_baseline= beta.1) andmatchstays gone.origin_digest(any lock written before 05A) →preservewith a reason, not merged.Dependencies
@callumalpass/mdbase→0.3.0-rc.9, which supports baseline lists.@mdbase-dev/connect*packages are pinned to 0.1.0-beta.125, whose manifest schema accepts the list form. The temporary connect-protocol patch that backported it is removed.Writer ships a byte-identical
reader-sourcestarter, and its PR lists the same baselines.