Skip to content

fix(meta): /meta/object/:name reports the __search companion, agreeing with the list read (#8038) - #8255

Merged
huangyiirene merged 2 commits into
mainfrom
claude/issue-8038-search-companion-route-divergence
Aug 13, 2026
Merged

fix(meta): /meta/object/:name reports the __search companion, agreeing with the list read (#8038)#8255
huangyiirene merged 2 commits into
mainfrom
claude/issue-8038-search-companion-route-divergence

Conversation

@huangyiirene

Copy link
Copy Markdown
Collaborator

Fixes#8038

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

The two /meta reads of an object answered "does this object have a __search column?" two different ways, split cleanly by provenance — measured end-to-end on the showcase, booted from a compiled artifact with OS_SEARCH_PINYIN_ENABLED=true (69 objects served).

Full rationale is in the changeset (.changeset/meta-object-search-companion-agreement.md), which is the dev's own text and the authoritative description.

Shape

  • packages/metadata-protocol/src/protocol.ts — +106/−?
  • packages/objectql/src/registry.ts — +92
  • packages/rest/src/meta-object-search-companion-agreement.test.ts — +366 (new)
  • packages/runtime/src/…/meta-object-search-companion-roundtrip.test.ts — +196 (new)
  • changeset — +67 (two packages, both patch)

820 insertions, 7 deletions, across objectql and metadata-protocol.

⚠️Hot-file note for reviewers: this touches packages/metadata-protocol/src/protocol.ts and packages/objectql/src/registry.ts, both of which had concurrent editors in this lane today. origin/main is already merged into the branch (see the merge commit). Any conflict goes 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

…g with the list read (#8038)
The two `/meta` reads of an object answered "does this object have a
`__search` column?" two different ways, split cleanly by PROVENANCE. Measured
end-to-end on the showcase, booted from a compiled artifact with
`OS_SEARCH_PINYIN_ENABLED=true` (69 objects served): all 22 companion-bearing
package objects carried it on `GET /meta/object` and were served WITHOUT it by
`GET /meta/object/:name` and by `?layers=true`'s `effective`; all 45
companion-bearing platform objects carried it on both.
Nothing about an object caused this; where its by-name read was ANSWERED FROM
did. The companion is provisioned at the SchemaRegistry's
object-materialization seam, so the list read — composed from
`listItems('object')` — serves a materialized body, while the by-name read
consults the `metadata` SERVICE first and on an artifact-booted deployment that
service holds the author's declaration, captured before materialization.
Fixed the way #6562 ruled this same seam (Option B: the read serves the
effective runtime schema and the minority converges on the registry-backed
majority) — at the read exits, from the registry that made the deployment-gated
provisioning decision, so the pass and the decision cannot disagree. The
`?layers=true` `code` and `overlay` layers stay byte-verbatim.
The read adds a real field declaration, so the write path takes it back off
again, as #6562's strip does for the injected columns: a runtime-created
object's stored row went from `fields: [name]` to `fields: [__search, name]` on
a single GET -> PUT before this. The strip is exact — only an entry
byte-identical to what the provisioning seam would stamp is removed, recomputed
from that function rather than transcribed.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013bJJCxvDx9Z8uJQG5CikMj
@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/l 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 2 package(s): @objectstack/metadata-protocol, @objectstack/objectql.

16 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, @objectstack/objectql)
  • content/docs/data-modeling/formulas.mdx(via packages/objectql)
  • content/docs/deployment/migration-from-objectql.mdx(via @objectstack/objectql)
  • content/docs/deployment/vercel.mdx(via @objectstack/objectql)
  • content/docs/kernel/contracts/data-engine.mdx(via @objectstack/objectql)
  • content/docs/kernel/runtime-services/examples.mdx(via packages/objectql)
  • content/docs/kernel/services-checklist.mdx(via @objectstack/metadata-protocol, @objectstack/objectql)
  • content/docs/kernel/services.mdx(via @objectstack/objectql)
  • content/docs/permissions/authentication.mdx(via @objectstack/objectql)
  • content/docs/permissions/system-context.mdx(via packages/objectql)
  • content/docs/plugins/index.mdx(via @objectstack/objectql)
  • content/docs/plugins/packages.mdx(via @objectstack/objectql)
  • content/docs/protocol/kernel/http-protocol.mdx(via @objectstack/metadata-protocol)
  • content/docs/protocol/kernel/index.mdx(via @objectstack/objectql)
  • content/docs/protocol/objectql/query-syntax.mdx(via packages/objectql)
  • content/docs/protocol/objectql/state-machine.mdx(via @objectstack/objectql)

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

  • content/docs/releases/implementation-status.mdx(via @objectstack/objectql)
  • 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:49
@huangyiirene
huangyiirene added this pull request to the merge queueAug 13, 2026
Merged via the queue into main with commit a6cd2c1Aug 13, 2026
26 checks passed
@huangyiirene
huangyiirene deleted the claude/issue-8038-search-companion-route-divergence branch August 13, 2026 01:07
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentationImprovements or additions to documentationsize/lteststooling

Projects

None yet

2 participants

@huangyiirene@claude