Skip to content

fix(metadata-protocol): expand a runtime-authored view container so its views are served (#7736) - #8257

Merged
huangyiirene merged 2 commits into
mainfrom
claude/issue-7736-view-container-served
Aug 13, 2026
Merged

fix(metadata-protocol): expand a runtime-authored view container so its views are served (#7736)#8257
huangyiirene merged 2 commits into
mainfrom
claude/issue-7736-view-container-served

Conversation

@huangyiirene

Copy link
Copy Markdown
Collaborator

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 defineView container shape succeeded at every step and produced nothing a user could see: PUT the container to the draft endpoint, POST to 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/−1
  • packages/metadata-protocol/src/view-container-runtime-expansion.test.ts — +251 (new)
  • changeset — +53

383 insertions, 1 deletion.

⚠️Hot-file note: touches packages/metadata-protocol/src/protocol.ts, which had several concurrent editors in this lane today. origin/main is 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

…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
@vercel

vercelBot commented Aug 13, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
ProjectDeploymentActionsUpdated (UTC)
objectstackIgnoredIgnoredAug 13, 2026 12:35am

Request Review

@github-actionsgithub-actionsBot added size/m documentation Improvements or additions to documentation tests tooling labels Aug 13, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 1 package(s): @objectstack/metadata-protocol.

3 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:

  • content/docs/concepts/metadata-lifecycle.mdx(via @objectstack/metadata-protocol)
  • content/docs/kernel/services-checklist.mdx(via @objectstack/metadata-protocol)
  • content/docs/protocol/kernel/http-protocol.mdx(via @objectstack/metadata-protocol)

1 release-owned page(s) also reference the affected code. These are read-only:

  • content/docs/releases/v9.mdx(via @objectstack/metadata-protocol)

content/docs/releases/ is RELEASE-OWNED (AGENTS.md "Documentation Guardrails"): release
notes are written centrally at release time, and a code PR that edits them is the exact PR
that guardrail exists to stop. They are still audited — read-only. If one of them is actually
wrong, file an issue or open a dedicated docs-only PR; do not edit it here.

Advisory only. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs origin/main → pass the list as args.docs.

@huangyiirene
huangyiirene marked this pull request as ready for review August 13, 2026 00:48
@huangyiirene
huangyiirene added this pull request to the merge queueAug 13, 2026
Merged via the queue into main with commit 0e1f667Aug 13, 2026
26 checks passed
@huangyiirene
huangyiirene deleted the claude/issue-7736-view-container-served branch August 13, 2026 01:05
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentationImprovements or additions to documentationsize/mteststooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

view-authoring-live: the documented view-container authoring path is inert at runtime — the container is stored but never served

2 participants

@huangyiirene@claude