Observation from objectui#6519, filed rather than folded in — it is outside that PR's file face.
packages/app-shell/src/views/metadata-admin/inspectors/useDatasetFields.ts:
exportfunctionresolveReferenceTo(def: Record<string,unknown>): string|undefined{constraw=def.reference??def.reference_to??(defasany).referenceTo??(defasany).reference_to_object;Its only production caller is normalizeObject in the same file, which builds every def through readFields. Since objectui#6519 that door strips referenceTo, so the third branch of the chain can no longer receive a value there — it is reachable only from the unit test that calls the helper directly.
Two things worth judging together rather than deleting on sight:
- The dead branch itself.
- The shape: a four-spelling tolerant fallback for a relationship target the spec spells
reference and refuses in one of the other three spellings by name. A lenient consumer is where a wrong producer hides; reference_to / reference_to_object have not been checked against any current producer, so the honest fix may be to establish which spellings a served document can actually carry and keep only those.
packages/core/src/utils/chart-series.ts carries a sibling canonicalization ("Same canonicalization as the dataset designer's resolveReferenceTo"), so whatever is decided here should be applied there in the same pass.
Generated by Claude Code
Generated by Claude Code
Observation from objectui#6519, filed rather than folded in — it is outside that PR's file face.
packages/app-shell/src/views/metadata-admin/inspectors/useDatasetFields.ts:Its only production caller is
normalizeObjectin the same file, which builds every def throughreadFields. Since objectui#6519 that door stripsreferenceTo, so the third branch of the chain can no longer receive a value there — it is reachable only from the unit test that calls the helper directly.Two things worth judging together rather than deleting on sight:
referenceand refuses in one of the other three spellings by name. A lenient consumer is where a wrong producer hides;reference_to/reference_to_objecthave not been checked against any current producer, so the honest fix may be to establish which spellings a served document can actually carry and keep only those.packages/core/src/utils/chart-series.tscarries a sibling canonicalization ("Same canonicalization as the dataset designer'sresolveReferenceTo"), so whatever is decided here should be applied there in the same pass.Generated by Claude Code
Generated by Claude Code