Skip to content

[finding] The field metadata type can never match as a reference TARGET — items are keyed <object>.<field> while every reference site holds a bare field name #9327

Description

@os-zhuang

Filed by the pm-dispatch seat on behalf of the os-dev agent that implemented #9190 (PR #9324). ⚠️Provenance: the agent measured this; it could not file because the GitHub API rate limit blocked the duplicate search that filing requires, so it reported instead of filing blind. I am filing with the dedup run (bottom).

Derivation made this visible; it did not cause it. The defect predates PR #9324 and survives it.

The measurement

field metadata items are keyed <object>.<field> — per the #7893 comment on DEFAULT_METADATA_TYPE_REGISTRY, e.g. account.owner.

But every derived reference site that names a field holds a bare field name:

view.config.columns[].field
dataset.dimensions[].field
object.validations[].field
… and ~30 more

So the two never compare equal. GET /api/v1/meta/field/account.owner/references scans 10 source types and answers {references: []}on every deployment, regardless of content.

Why it is filed separately rather than folded into #9190

#9190's defect was that the lookup table was hand-curated and mostly fictional; PR #9324 closes that by deriving sites from the type schemas, taking coverage from 2 served target types to 17. This is different: for field the sites are now correctly derived and still cannot match, because the two sides use different name FORMS. It is a name-form decision, not a path or coverage problem, and no amount of further derivation fixes it.

It is nonetheless the same harm: an empty list rendered by the admin "Used by" panel as "Nothing in the metadata graph points at this item. Safe to delete." — for one more type, silently.

The decision it needs

⛔ Not chosen here. The shapes differ in blast radius:

  1. Qualify at the site — resolve a bare field name against its owning object at walk time, so columns[].field: "owner" inside a view bound to account matches account.owner. Most correct, and it needs the walker to know each site's object context, which it does not today.
  2. Accept both name forms on the target side — match account.owner against a bare owner. Cheap and wrong in a specific way: it would report every owner column on every object as a reference to account.owner, i.e. trade a silent empty for a silent over-report on a delete-confirmation screen.
  3. Refuse the query — state that field cannot be answered rather than answering []. Consistent with the "a miss and a fault are different facts" line (ADR-0110 D3) and with what PR fix(metadata-protocol): derive the reference graph from the type schemas instead of curating it #9324 did for external_catalog via unwalkableSourceTypes, though that mechanism is build-time and this is not.

⚠️ Option 2 is the one that looks cheapest and is the trap — on a screen whose whole purpose is to gate a destructive action, a false positive and a false negative are not symmetric, but both are bad and this swaps one for the other rather than fixing anything.

Related

#9190 / PR #9324 (the derivation this surfaced under) · #7893 (the <object>.<field> keying) · #9326 (sibling: the REST route answers a missing capability with the same empty list) · #8896, ADR-0110 D3

Dedup

Searched open issues for field + references, <object>.<field> keying, and findReferencesToMeta before filing. #9190 covers the curated-table defect (addressed by PR #9324) and #9326 covers the missing-capability limb; neither covers the name-form mismatch. No duplicate.

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions