Observation found while implementing #14492 (PR #15017); not fixed there because it is outside that card's ruling and the right disposition (delete vs wire) is a maintainer's call.
Measured on origin/main
git grep -n inferFromObject origin/main -- packages apps examples returns exactly two hits:
packages/services/service-analytics/src/cube-registry.ts line 73 — the definition (CubeRegistry.inferFromObject(objectName, fields)).
packages/services/service-analytics/src/__tests__/analytics-service.test.ts line 89 — a unit test calling it directly.
No runtime path calls it: the AnalyticsService ad-hoc path mints cubes through its own inferCubeFromQuery / inferMeasure, and datasets compile through dataset-compiler.ts. The class docblock still advertises it as the second of two cube sources ("Object schema inference — auto-generated cubes from ObjectQL object schemas"), which is declared-not-delivered.
Why it matters for #14492
The ruling on #14492 listed cube-registry.ts:80 (label: 'Count') as one of five hardcoded English default-label sites. Being unreachable, that site never contributes to any response, so it was left untouched by #15017 — and the same method's composite defaults LABEL (Sum) / LABEL (Avg) (lines ~106 / ~112) are English literals that an aggregate-only discriminator could not localize anyway, because they embed the field label.
Disposition options
- Delete
inferFromObject and its test, and correct the CubeRegistry docblock (dead code; smallest change; matches the enforce-or-remove precedent).
- Wire it as a real cube source (needs a caller,
getMeta() exposure, and a decision on how composite default labels are localized — probably a field-plus-aggregate discriminator rather than a string).
Recommendation: option 1 unless a consumer is planned; nothing on the wire reads what it produces today.
Generated by Claude Code
Observation found while implementing #14492 (PR #15017); not fixed there because it is outside that card's ruling and the right disposition (delete vs wire) is a maintainer's call.
Measured on
origin/maingit grep -n inferFromObject origin/main -- packages apps examplesreturns exactly two hits:packages/services/service-analytics/src/cube-registry.tsline 73 — the definition (CubeRegistry.inferFromObject(objectName, fields)).packages/services/service-analytics/src/__tests__/analytics-service.test.tsline 89 — a unit test calling it directly.No runtime path calls it: the
AnalyticsServicead-hoc path mints cubes through its owninferCubeFromQuery/inferMeasure, and datasets compile throughdataset-compiler.ts. The class docblock still advertises it as the second of two cube sources ("Object schema inference — auto-generated cubes from ObjectQL object schemas"), which is declared-not-delivered.Why it matters for #14492
The ruling on #14492 listed
cube-registry.ts:80(label: 'Count') as one of five hardcoded English default-label sites. Being unreachable, that site never contributes to any response, so it was left untouched by #15017 — and the same method's composite defaultsLABEL (Sum)/LABEL (Avg)(lines ~106 / ~112) are English literals that an aggregate-only discriminator could not localize anyway, because they embed the field label.Disposition options
inferFromObjectand its test, and correct theCubeRegistrydocblock (dead code; smallest change; matches the enforce-or-remove precedent).getMeta()exposure, and a decision on how composite default labels are localized — probably a field-plus-aggregate discriminator rather than a string).Recommendation: option 1 unless a consumer is planned; nothing on the wire reads what it produces today.
Generated by Claude Code