Commit 618f70d
fix(metadata-protocol): the authoring gate resolves references against runtime-authored metadata, not the boot-time registry (#16223)
* fix(metadata-protocol): the authoring gate resolves references against runtime-authored metadata, not the boot-time registry
`RuntimeStackContext` declares its collections as the LIVE declarations, and
live metadata has two homes: the SchemaRegistry that code packages fill at
boot, and `sys_metadata` that every runtime author writes to. The per-write
gather read only the first, so a `PUT /meta/dataset` that answered 200 was
invisible to the very next `PUT /meta/dashboard`, which refused each widget
bound to it with a phantom `widget-dataset-unknown` until the process restarted.
Measured on the card's shape in one process, no restart: the row is in
`sys_metadata`, `GET /meta/dataset` returns six datasets, the registry returns
the five code-package ones, and the board collects three phantom refusals.
The store half is now folded onto the registry half for every context
collection, additively (a stored row contributes a name the registry lacks and
never displaces a registry entry, whose `object` bodies are the resolved
base-plus-extenders shape a raw row is not), active rows only, in the write's
own organization partition, with a failed read reported rather than degraded
silently into a smaller universe.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ARYe3yQTQCUFm5qPYNgKaJ
* test(metadata-protocol): the new engine double honours the caller's `limit`, and the ledger records its seams
`check:objectql-double-limit` graded the harness's `find` double BLIND: it
answered every row it matched however small a bound the caller passed, which
reads exactly like a query that worked. The bound is now applied after the
filter and by presence.
`check:engine-double-contract` asked for the three seams this file pins
(`delete`, `findOne`, `update`) to be recorded, so the ledger protects it:
regenerated with `--write`, 3 rows added, 0 lost.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ARYe3yQTQCUFm5qPYNgKaJ
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 7bdb163 commit 618f70d
4 files changed
Lines changed: 608 additions & 20 deletions
File tree
- .changeset
- packages/metadata-protocol/src
- scripts
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
0 commit comments