Skip to content

List every earlier starter as a seed upgrade baseline - #59

Merged
callumalpass merged 3 commits into
mainfrom
chore/starter-baseline-lists
Oct 3, 2026
Merged

callumalpass merged 3 commits into
mainfrom
chore/starter-baseline-lists

Conversation

@callumalpass

@callumalpass callumalpass commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

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.reader 1.0.0-beta.5 ships the same version-2 starters as beta.4, but each seed's upgrade_from now lists every distinct starter Reader ever shipped (mdbase-spec 05A, mdbase-dev/mdbase-spec#59), newest first, each with version from its frontmatter:

Target Baselines (pack that first shipped it → sha256) Path
_types/reader-source.md beta.3 → 82869c12… mdbase/baselines/1.0.0-beta.3/types/reader-source.md
beta.2 → 54f46e7c… mdbase/baselines/1.0.0-beta.2/types/reader-source.md (new, from fde2582)
beta.1 → e8a3fca6… mdbase/baselines/1.0.0-beta.1/types/reader-source.md (new, from 5c55c7d)
_types/reader-annotation.md beta.3 → 1fb7e758… mdbase/baselines/1.0.0-beta.3/types/reader-annotation.md
beta.1 → 9b6b0fc7… 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)

  • Unedited beta.1, beta.2 and beta.3 starters → update with the exact v2 bytes; upgrade_baseline is the starter that was installed.
  • An edited beta.3 seed → three-way merge against beta.3. The edit is kept.
  • An edited beta.1 seed → merged against beta.1, not beta.3. The publisher removed the top-level match rule, 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 restored match: path_glob as if it were the collection's edit. If the collection had also dropped match, the merge goes through (upgrade_baseline = beta.1) and match stays gone.
  • An edited seed whose lock has no origin_digest (any lock written before 05A) → preserve with a reason, not merged.

Dependencies

  • @callumalpass/mdbase → 0.3.0-rc.9, which supports baseline lists.
  • The @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-source starter, and its PR lists the same baselines.

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.
@callumalpass
callumalpass merged commit 6e88144 into main Oct 3, 2026
2 checks passed
@callumalpass
callumalpass deleted the chore/starter-baseline-lists branch October 3, 2026 08:17
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