Skip to content

Move to SDK 0.1.0-beta.188 and its new API - #96

Merged
callumalpass merged 5 commits into
mainfrom
feat/sdk-polish-migration
Nov 12, 2026
Merged

callumalpass merged 5 commits into
mainfrom
feat/sdk-polish-migration

Conversation

@callumalpass

Copy link
Copy Markdown
Contributor

What

Moves Writer to @mdbase-dev/sdk@0.1.0-beta.188, whose API changed (mdbase-connect #1486). The first commit is the automation's production repin from #95, unchanged; the rest moves the code. #95 cannot pass by itself.

Changes

  • API move, behaviour unchanged: createMdbase is the only entry; reads take one options object; submit resolves one Write; record values are plain JSON; status comes from snapshot.sync.
  • Test stub deleted: the Writer root test uses the testing kit's describe.
  • "Reconnecting" notice: shows in the same moments as before, not while a replica is still connecting.
  • LAB and staging SDK originals → beta.188. They were at beta.157 and the migrated code does not build against that. Both archives are the sdk-v0.1.0-beta.188 release assets, unchanged. I verified their sigstore bundles with gh attestation verify: signed by publish-sdk-npm.yml at refs/tags/v0.1.0-beta.188, source e8ffb806. The beta.157 archives, pins and bundles are removed.

Checks

  • pnpm check: i18n, typecheck, 55 + 369 unit tests pass; node tests 159 pass. Two publisher tests need the sigstore module of CI's npm, which my machine's npm lacks; CI runs them.
  • pnpm build:production, build:staging and build:lab pass.
  • The browser suites passed on this code against the pre-release SDK build of the same source; CI runs them again here.

Not done

Writer keeps its own write settlement; the SDK's settle has different retry and outcome rules. The legacy @mdbase-dev/connect use is untouched.

Builds against the one-entry, plain-value SDK with no compatibility layer:

- reads take one trailing options object (include/signal inside it,
  watchChanges callback first, awaitReceipt timeoutMs in options)
- record, receipt, catalogue and contract values are plain JSON, so the
  toPlain/Object.fromEntries unwrapping goes, issue details are read as an
  object (a Map check would have silently stopped marking broken types)
- mdbase.application.reauthorize becomes mdbase.reauthorize
- the connection notice reads sync.writes and sync.connection in place of
  snapshot.writes and the removed StatusSummary kind
- tests connect through MemoryReplica.client() (connect left the root),
  use settle in place of save and plain catalogue/frontmatter shapes
The ready fixture already declares Writer's contracts on the test app's
collection, and the SDK testing kit now answers describe from them, so the
hand-written catalog stub is no longer needed.
The old offline status maps to connection "offline"; a replica that is still
connecting, or an auth failure, did not raise the notice.
The migrated code does not build against beta.157. Both archives are the
sdk-v0.1.0-beta.188 release assets, unchanged, with their sigstore bundles
(signed by publish-sdk-npm.yml at refs/tags/v0.1.0-beta.188, source e8ffb806).
@callumalpass
callumalpass merged commit c73d1cc into main Nov 12, 2026
1 check passed
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