Commit d5cbb44
fix(metadata-protocol): gate
* fix(metadata-protocol): gate `getMetaItem`'s overlay read on the metadata registry
The singular `/meta` read verb applied no organization gate of its own: whatever
`organizationId` arrived was spent on whatever `type` arrived. Its two overlay
reads combine with `??` — precedence, not the plural verb's union — so an
ungated organization could SUBSTITUTE rather than merely add: on a type the
registry declares `allowOrgOverride: false`, a pre-#6190 phantom org-scoped row
was served instead of the live env-wide document.
Resolve the scope through `organizationIdForMetaRead` once, after the canonical
type fold, for both the active-overlay read and the ADR-0033 `previewDrafts`
read. ADR-0005's overlay-wins precedence is deliberately unchanged.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0112hMx9hjJ9BgB28X97DS68
* test(objectql): move the two singular-verb overlay fixtures onto an overridable type
`getMetaItem` now resolves its own read scope through
`organizationIdForMetaRead`, so on `app` — `allowOrgOverride: false` since
#6483 — the org partition is never queried. The two `per-organization overlay
isolation` fixtures that exercised the singular verb on `app` were therefore
measuring the phantom read this branch removes: one went red, and its sibling
stayed green while asserting a fall-through that could no longer fail. Both move
to `view`, the whitelisted specimen, matching the re-spellings #6190 and #14683
already made in the same block, and each gains the call assertion that makes its
claim non-vacuous.
Prose corrections in the same edit, from the contract review:
- the changeset no longer says the plural gate shipped "in the previous
release" — both changesets are unconsumed, so both land in the same one;
- the phantom row is never deleted, so a restart does not clear the
substitution; what a restart drops is the row's registry presence;
- the "what moves" enumeration names four raw-org callers across two files,
with the method that establishes the population;
- the write-side read/write-scope identity is qualified under the
`OS_METADATA_WRITABLE` operator hatch, and the ADR-0005 / ADR-0029 citations
are narrowed to what those documents actually decide.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0112hMx9hjJ9BgB28X97DS68
---------
Co-authored-by: Claude <noreply@anthropic.com>getMetaItem's overlay read on the metadata registry (#14908)1 parent f8e8f03 commit d5cbb44
4 files changed
Lines changed: 638 additions & 14 deletions
File tree
- .changeset
- packages
- metadata-protocol/src
- objectql/src
| 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 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
0 commit comments