Skip to content

Wire contract evolution through mdbase Connect - #163

Merged
callumalpass merged 5 commits into
mainfrom
agent/contract-evolution
Aug 3, 2026
Merged

Wire contract evolution through mdbase Connect#163
callumalpass merged 5 commits into
mainfrom
agent/contract-evolution

Conversation

@callumalpass

@callumalpass callumalpass commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

What changed

  • Carries exact contract id/version/digest requirements through manifests, grants, notification criteria, scopes, and runtime events.
  • Replaces install-only operations with assess/apply type-pack evolution across browser SDK, protocol, daemon, hosted provider, MCP, portal, editor, desktop, and Pickle packages.
  • Derives a pack's provided contracts in the devkit and rejects non-managed contract resources.
  • Surfaces structured compatibility, planned resource actions, setup choices, warnings, conflicts, and stale-plan failures to applications.
  • Makes mdbase.lock.yaml portable authority data across hosted snapshots and Rust/TypeScript mirrors while keeping scoped application projections private.
  • Adds hosted schema migrations for exact notification digests and lock resources, including durable provider-side grant copies.
  • Fences authority promotion from concurrent background mirror sync without timing sleeps.
  • Exempts connector-generated provenance locks from user document-size quotas while retaining all user/setup resource checks.
  • Adds revision-stamped, SHA-512-recorded consumer artifacts for unpublished coordinated SDK builds.
  • Keeps the new editor, protocol, and hosted-provider logic in focused modules without increasing architecture budgets.
  • Bumps the coordinated prerelease packages to beta.25.

Why

When a contract changed, Connect could authorize an application against the new declaration while an existing collection silently retained older resources. The application then failed later with little explanation. The control plane, providers, mirrors, and clients also lacked one exact portable provenance record.

This moves compatibility into the SDK/backend boundary: callers can inspect a deterministic migration outcome before writing, and application is exact, transactional, interruption-safe, and conflict-preserving.

Impact

This is intentionally breaking prerelease work. The obsolete install operation and partial contract references are removed. Consumers must use beta.25 assess/apply APIs and exact digests.

Depends on:

Validation

  • full JS/TS workspace build, typecheck, test, package audit, and architecture gate
  • full Rust workspace with explicit test secret backend; only credential/environment-gated cases ignored
  • exact runtime.application-execution interoperability scenario
  • 247 internal editor tests, including digest-pinned adoption review
  • production hosted-provider Docker image built from the pinned Rust revision and Docker lock
  • main compiled daemon/direct/relay E2E
  • complete disposable PostgreSQL 18/S3 hosted-provider E2E before the upstream rebase, covering migrations, quotas, notifications, browser authorization, Rust/TS mirrors, files/conflicts, authority transfers, restart, backup restore, and key rotation
  • full hosted migration chain through 0024, plus a focused PostgreSQL 18 fixture proving that known Connect contracts receive exact digests while unknown application contracts and criterion order are preserved
  • previous-release notification recovery canary asserts the migrated timer event's exact id, version, and semantic digest
  • internal editor remote-authority and reauthorization browser scenarios

@callumalpass
callumalpass marked this pull request as ready for review August 3, 2026 09:17
# Conflicts:
#	.github/workflows/server-ci.yml
#	Cargo.lock
#	Cargo.toml
#	apps/desktop/package.json
#	apps/portal/package.json
#	crates/connect-protocol/src/tests.rs
#	deploy/docker/Cargo.lock.hosted-provider
#	docs/releasing.md
#	package.json
#	packages/client/package.json
#	packages/devkit/package.json
#	packages/management/package.json
#	packages/pickle/package.json
#	packages/protocol/package.json
#	packages/protocol/test/schema.test.mjs
#	packages/sync/package.json
#	packages/ui/package.json
#	packages/webhooks/package.json
#	services/mcp/package.json
#	services/mcp/src/mcp.ts
#	services/server/package.json
@callumalpass
callumalpass merged commit 5aba94f into main Aug 3, 2026
19 checks passed
@callumalpass
callumalpass deleted the agent/contract-evolution branch August 3, 2026 09:42
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