Uh oh!
There was an error while loading. Please reload this page.
fix(metadata-protocol): expand a runtime-authored view container so its views are served (#7736) - #8257
Conversation
…ts views are served (#7736) Publishing views through the runtime metadata API using the documented `defineView` container shape succeeded at every step and produced nothing a user could see: query the object and the list came back empty, while reading the row by name returned the full body badged `_diagnostics.valid: true`. "Object has-many View" (ADR-0017 §2, §3.2) makes container ingestion dual-read — register the container under the bare `<object>` key, AND register every named view as an independent ViewItem under `<object>.<viewKey>`. Only the expanded items carry the `viewKind` + `object` pair the object-bound read paths filter on. Both source registrars do this (the ObjectQL boot loop and the metadata artifact/HMR loader); the runtime door did not, so `getMetaItems` dropped the container from enumeration — correctly, on its stated assumption that "the registrar expands it" — in favour of an expansion that never ran. Fixed at `hydrateOverlayIntoRegistry`, the one choke point all three runtime hydration callers already share (boot, read-side, write-through). There are two independent object-bound readers — the REST route reads through `getMetaItems`, `getViewsByObject()` reads `MetadataManager.list` — so expanding at either read exit would fix the literal repro and leave its sibling empty. One expansion at the shared seam serves every reader, survives a restart, and keeps read-your-writes. The canonical-shape filter is left alone: its invariant (a container's expanded items are also present) is what was false, and this restores it rather than loosening the filter. Nothing extra is persisted — the container remains one byte-identical row and the ViewItems are derived on hydration, so an edited container leaves no stale expanded rows. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CmkoMgyZoYRznuVifcXGmB
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
📓 Docs Drift CheckThis PR changes 1 package(s): 3 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:
⛔ 1 release-owned page(s) also reference the affected code. These are read-only:
|
Uh oh!
There was an error while loading. Please reload this page.
Fixes#7736
Opened by the PM on the dev agent's behalf. The cloud dev container cannot reach the GitHub API (403 on every call); it can only
git push. The branch, commits, tests and changeset are entirely the dev's work.What this is
Publishing views through the runtime metadata API using the documented
defineViewcontainer shape succeeded at every step and produced nothing a user could see:PUTthe container to the draft endpoint,POSTto publish, then query the object — an empty list. Reading the row directly by name returned the full body badged_diagnostics.valid: true, and a server restart changed nothing.That is this lane's recurring shape — a 200 that means nothing happened — and it is the fourth instance recorded today.
Full rationale is in the changeset (
.changeset/view-container-runtime-expansion.md), the dev's own text and the authoritative description.Shape
packages/metadata-protocol/src/protocol.ts— +80/−1packages/metadata-protocol/src/view-container-runtime-expansion.test.ts— +251 (new)383 insertions, 1 deletion.
packages/metadata-protocol/src/protocol.ts, which had several concurrent editors in this lane today.origin/mainis already merged into the branch (see the merge commit). Conflicts go to the merge queue — ⛔ do not hand-order.Review status
Draft pending my review of the source diff and CI convergence. Reviewed against this diff and
origin/main, ⛔ not against a self-reported summary — the dev's structured report is stranded in its container by the same 403.Generated by Claude Code