Skip to content

[finding] The metadata-layer arm of the visibility rules explains itself with *.form.ts, a file a Studio / MCP author of a schema-bound view does not have #8042

Description

@os-zhuang

Found while implementing #7815 (PR #8041), disclosed in that PR's scope rather than absorbed into it. Filed unassigned, observation class — nothing a user hits as a defect today, and the prescription itself is correct. ⛔ Grading is the triage seat's single channel.

What was measured

packages/lint/src/validate-visibility-predicates.ts carries two pieces of metadata-layer prose that explain the layer by naming a source file kind:

  • MISLAYER_BY_LAYER.metadata.message — "...not a metadata-editing form. A *.form.ts predicate that binds record. never matches..."
  • the visibility-bare-identifier hint's metadata arm — "(a *.form.ts metadata-editing form binds the row under edit as data)."

Before #7815 that wording was only reachable through opts.layer = 'metadata', which no production caller ever passed (layer: 'metadata' hit test files only — measured on origin/main at #7815's triage). So in practice it was written for a caller that did not exist.

#7815 makes it reachable: a form view declaring data: { provider: 'schema', schemaId } is now judged at the metadata layer, including at the runtime publish gate. That gate's audience is precisely the author who has no source file — Studio, REST /meta, MCP. The finding they now read is correct about the root (data, which is the fix) and explains it by pointing at a *.form.ts they never wrote and cannot open.

Why it is worth recording

Same family as #7815 itself, one notch quieter: a diagnostic whose prescription is right and whose explanation points somewhere the reader cannot go. It costs nothing today — the actionable half ("write data.status") is unambiguous — which is exactly why it will not surface on its own.

It also has a shape worth grading rather than assuming: the honest fix is probably not "delete the file reference" but "name the surface by what it is" (a schema-bound metadata-editing form — the row under edit), which would cover both the file-authored and the published-through-Studio spellings with one sentence.

What is NOT being claimed

Pointers

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions