Skip to content

Add TaskNotes rc.20: keep the task contracts earlier packs replaced - #22

Open
callumalpass wants to merge 1 commit into
mainfrom
fix/tasknotes-retain-superseded-contracts
Open

callumalpass wants to merge 1 commit into
mainfrom
fix/tasknotes-retain-superseded-contracts

Conversation

@callumalpass

Copy link
Copy Markdown
Contributor

Problem

rc.12 to rc.18 of the TaskNotes pack managed one contract at _contracts/tasknotes.task.md and replaced it in place: rc.3 (rc.12), rc.4 (rc.13, rc.14), then rc.5. rc.19 kept rc.5 there but not the two before it.

A type implements one exact contract version, and a type outside the pack's targets (a renamed or customised starter, or a type of the collection's own) is never upgraded by the pack. In a collection last set up by rc.12 to rc.14 with such a type, applying rc.19 left that type invalid (data_contract_version_mismatch), so Connect refused the whole atomic setup and TaskNotes showed "Collection setup conflicts" with no way forward.

Change

  • tasknotes.task@0.3.0-rc.20: rc.19 plus tasknotes.task rc.3 and rc.4 at _contracts/tasknotes.task/<version>.md, neither provided. Starter and upgrade_from baselines are unchanged.
  • rc.19 is hidden.
  • scripts/contract-retention.test.mjs: every offered pack must install every contract document any earlier version of that pack shipped. Against the catalog before this change it reports rc.19 missing rc.3 and rc.4.
  • scripts/tasknotes-upgrade.test.mjs: the other-reference scenario (another type implementing the contract rc.12 installed) used to assert the upgrade is refused. For rc.20 it asserts the upgrade applies, the other type is untouched and the rc.3 contract it implements is still there byte for byte.
  • README: "Retained contracts".

Verification

  • Replayed setup with rc.20's resources on the mdbase-connect runtime (origin/main) against a collection in this state: refused with rc.19, admitted with rc.20.
  • Locally the engine-backed tests only ran on an older engine build, where rc.20 fails the same scenarios rc.19 does and other-reference passes. CI on the pinned engine is the full check.

Not covered

TaskNotes reads rc.6 and rc.5 task types only, so a collection whose only task type implements rc.3 still needs that type moved to rc.6. It is no longer refused outright.

After merge: publish to mdbase.dev, then repin TaskNotes.

rc.12 to rc.18 managed one contract at _contracts/tasknotes.task.md and
replaced it in place: rc.3, then rc.4, then rc.5. rc.19 kept rc.5 but not the
two before it. A type implements one exact contract version, and a type
outside the pack's targets (a renamed or customised starter, or a type of the
collection's own) is never upgraded by the pack, so a collection last set up
by rc.12 to rc.14 with such a type was left with an invalid type and engines
refused the whole setup.

rc.20 is rc.19 plus tasknotes.task rc.3 and rc.4 at versioned targets, neither
provided. Its starter and baselines are unchanged and rc.19 is hidden.

scripts/contract-retention.test.mjs checks the rule for every offered pack:
it installs every contract document any earlier version of the pack shipped.
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