Skip to content

Adopt saved views identified through the mdbase.view contract - #498

Merged
callumalpass merged 4 commits into
mainfrom
feature/view-contract
Sep 28, 2026
Merged

callumalpass merged 4 commits into
mainfrom
feature/view-contract

Conversation

@callumalpass

Copy link
Copy Markdown
Contributor

Pins callumalpass/mdbase-rs#94, which identifies saved views through the mdbase.view record contract (mdbase-dev/mdbase-spec#56) and fixes single-record mutations after installing packs whose schemas live outside _schemas/.

  • Fixtures that list or execute canonical views install the contract and an implementing view type: the hosted e2e through type-pack review plus create_type, the hosted lifecycle test through type-pack review followed by a projection rebuild, and the workspace and registry tests as definition files. The registry test now writes definitions before the collection opens; it had passed only because type-name discovery ignored the runtime's stale definition catalog.
  • New e2e scenario: an application that saves views declares mdbase.view and provisions its published pack (Add the mdbase.view saved-view contract pack mdbase-contracts#11), portal approval installs it during collection setup, and the application creates, lists, executes, replaces, and deletes a view record with record grants only, without views.manage. This is the flow Reader adopts in Save library views as mdbase.view records mdbase-reader#24.

The mdbase-rs pin must reach mdbase-rs main before this merges (check:mdbase-rs-pin).

Verification: pnpm ci:local, pnpm e2e, pnpm e2e:provider, and the Postgres lifecycle test all pass locally.

🤖 Generated with Claude Code

mdbase-rs now identifies saved views through the mdbase.view record contract
instead of `type: view` frontmatter. Fixtures that list or execute canonical
views install the contract and an implementing `view` type first: the hosted
lifecycle test and the hosted e2e through the type-pack review path an
application uses, the workspace and registry tests as definition files.

The registry test now writes definitions before the collection opens; it had
passed only because type-name discovery ignored the runtime's stale
definition catalog.
…ests

The provider e2e installs only the contract through type-pack review and
creates the implementing view type with create_type, keeping every
canonical mutation exercised. The lifecycle test rebuilds its projection
after the definition change, as the recovery worker would, before running
views, since canonical-view cursors require a current generation.
An application that saves views declares the mdbase.view contract and
provisions its published pack, embedded as a test fixture. Portal approval
installs it during collection setup; the application then creates, lists,
executes, replaces, and deletes a view record under ordinary record grants,
without views.manage.
@callumalpass
callumalpass added this pull request to the merge queue Sep 28, 2026
Merged via the queue into main with commit 98736a3 Sep 28, 2026
25 checks passed
@callumalpass
callumalpass deleted the feature/view-contract branch September 28, 2026 12:25
@callumalpass callumalpass mentioned this pull request Sep 28, 2026
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