Skip to content

Commit bbf2403

Browse files
committed
Merge origin/main (#4597 / PR #4606) into claude/issue-4580-one-schemanode-round2
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017Qqyix2QcnpUC9XeYVDzx3
2 parents 0353fa6 + 92876f0 commit bbf2403

4 files changed

Lines changed: 129 additions & 37 deletions

File tree

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
"@object-ui/types": patch
3+
"@object-ui/i18n": patch
4+
---
5+
6+
Doc comments no longer cite `@objectstack/spec` symbols the pinned spec has retired
7+
8+
Eight exported declarations carried a doc comment claiming alignment with a
9+
`@objectstack/spec` symbol that `17.0.0-rc.6` does not export — four locale
10+
formatting shapes in `@object-ui/i18n` (`SpecPluralRule`, `SpecDateFormat`,
11+
`SpecNumberFormat`, `SpecLocaleConfig`) and four activity-feed shapes in
12+
`@object-ui/types` (`FieldChangeEntry`, `Mention`, `Reaction`,
13+
`RecordSubscription`). A citation that points at nothing is worse than a stale
14+
one: the next reader cannot tell whether the protocol retired the symbol,
15+
renamed it, or never had it.
16+
17+
Measuring all eight against the published registry answered that question, and
18+
the answer was not "these names never existed". Every one was a real export the
19+
protocol retired on purpose, and every local key set was faithful to the schema
20+
it named. The feed four left `@objectstack/spec/data` in the `16.0.0` major,
21+
when the feed surface was replaced by the data API over `sys_comment` /
22+
`sys_activity`. The i18n four left `@objectstack/spec/ui` in `17.0.0-rc.6`
23+
itself — they were still present in `rc.5` — retired under ADR-0049
24+
enforce-or-remove because no authorable shape carried them and nothing ever
25+
parsed them.
26+
27+
Each comment now records that provenance, including the version the symbol left
28+
and what (if anything) replaced it, so the shapes read as declarations these
29+
packages own rather than as a view onto a protocol type. Type shapes, runtime
30+
behaviour and exports are unchanged — the published `.d.ts` files differ only in
31+
comment text, which is why this is graded `patch`.

‎packages/i18n/src/utils/spec-formatters.ts‎

Lines changed: 43 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,38 @@
77
*/
88

99
/**
10-
* @object-ui/i18n - Spec-aligned i18n utilities
10+
* @object-ui/i18n - locale formatting helpers
1111
*
12-
* Runtime consumers for @objectstack/spec v2.0.7 i18n types:
13-
* - PluralRuleSchema → resolvePlural()
14-
* - DateFormatSchema → formatDateSpec()
15-
* - NumberFormatSchema → formatNumberSpec()
16-
* - LocaleConfigSchema → applyLocaleConfig()
12+
* ## Provenance of the four shapes below (objectui#4597)
13+
*
14+
* They were authored against `@objectstack/spec/ui`, which exported
15+
* `PluralRuleSchema`, `DateFormatSchema`, `NumberFormatSchema` and
16+
* `LocaleConfigSchema` up to and including 17.0.0-rc.5. The pinned
17+
* 17.0.0-rc.6 removed all four under ADR-0049 enforce-or-remove
18+
* (objectstack#5055, maintainer ruling 2026-08-06): they carried no key on any
19+
* authorable shape and nothing ever parsed them, so the vocabulary was retired
20+
* rather than given a door. The key sets here were faithful to the retired
21+
* schemas — this is a retirement, not a drift.
22+
*
23+
* Nothing in the pinned protocol models locale formatting today, so the
24+
* interfaces below are declarations this package owns outright, not a view onto
25+
* a protocol type. The retirement note records that localisation returns as
26+
* authorable metadata through a new ADR — "the formatter that reads a
27+
* LocaleConfig first, the vocabulary second" — so re-derive these at that point
28+
* instead of assuming they still track anything upstream.
1729
*
1830
* @module spec-formatters
1931
*/
2032

2133
// ============================================================================
22-
// PluralRuleSchema Consumer
34+
// Plural rules
2335
// ============================================================================
2436

2537
/**
26-
* Spec-aligned PluralRule (mirrors @objectstack/spec PluralRuleSchema).
38+
* Plural forms for a single translation key, in CLDR categories.
39+
*
40+
* Local shape — authored against the protocol's `PluralRuleSchema`, retired in
41+
* 17.0.0-rc.6 (see the module doc), so there is nothing upstream to derive from.
2742
*/
2843
export interface SpecPluralRule {
2944
/** Translation key */
@@ -81,11 +96,14 @@ export function resolvePlural(
8196
}
8297

8398
// ============================================================================
84-
// DateFormatSchema Consumer
99+
// Date formatting
85100
// ============================================================================
86101

87102
/**
88-
* Spec-aligned DateFormat (mirrors @objectstack/spec DateFormatSchema).
103+
* Date/time formatting options passed through to `Intl.DateTimeFormat`.
104+
*
105+
* Local shape — authored against the protocol's `DateFormatSchema`, retired in
106+
* 17.0.0-rc.6 (see the module doc), so there is nothing upstream to derive from.
89107
*/
90108
export interface SpecDateFormat {
91109
dateStyle?: 'full' | 'long' | 'medium' | 'short';
@@ -95,7 +113,7 @@ export interface SpecDateFormat {
95113
}
96114

97115
/**
98-
* Format a date using @objectstack/spec DateFormatSchema configuration.
116+
* Format a date using a {@link SpecDateFormat} configuration.
99117
*
100118
* @example
101119
* ```ts
@@ -124,11 +142,15 @@ export function formatDateSpec(
124142
}
125143

126144
// ============================================================================
127-
// NumberFormatSchema Consumer
145+
// Number formatting
128146
// ============================================================================
129147

130148
/**
131-
* Spec-aligned NumberFormat (mirrors @objectstack/spec NumberFormatSchema).
149+
* Number formatting options passed through to `Intl.NumberFormat`.
150+
*
151+
* Local shape — authored against the protocol's `NumberFormatSchema`, retired
152+
* in 17.0.0-rc.6 (see the module doc), so there is nothing upstream to derive
153+
* from.
132154
*/
133155
export interface SpecNumberFormat {
134156
style?: 'currency' | 'percent' | 'decimal' | 'unit';
@@ -140,7 +162,7 @@ export interface SpecNumberFormat {
140162
}
141163

142164
/**
143-
* Format a number using @objectstack/spec NumberFormatSchema configuration.
165+
* Format a number using a {@link SpecNumberFormat} configuration.
144166
*
145167
* @example
146168
* ```ts
@@ -170,11 +192,15 @@ export function formatNumberSpec(
170192
}
171193

172194
// ============================================================================
173-
// LocaleConfigSchema Consumer
195+
// Locale configuration
174196
// ============================================================================
175197

176198
/**
177-
* Spec-aligned LocaleConfig (mirrors @objectstack/spec LocaleConfigSchema).
199+
* One locale's formatting defaults, resolved by `applyLocaleConfig()`.
200+
*
201+
* Local shape — authored against the protocol's `LocaleConfigSchema`, retired
202+
* in 17.0.0-rc.6 (see the module doc), so there is nothing upstream to derive
203+
* from.
178204
*/
179205
export interface SpecLocaleConfig {
180206
/** BCP 47 language code (e.g., 'en-US', 'zh-CN') */
@@ -190,7 +216,7 @@ export interface SpecLocaleConfig {
190216
}
191217

192218
/**
193-
* Apply a LocaleConfigSchema to configure i18n formatting defaults.
219+
* Apply a {@link SpecLocaleConfig} to configure i18n formatting defaults.
194220
* Returns resolved formatting functions bound to the locale config.
195221
*
196222
* @example

‎packages/types/src/views.ts‎

Lines changed: 36 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -328,9 +328,18 @@ export interface ActivityEntry {
328328
}
329329

330330
// ============================================================================
331-
// Feed / Chatter Protocol Types
332-
// Aligned with @objectstack/spec FeedItemSchema, MentionSchema, ReactionSchema,
333-
// FieldChangeEntrySchema, RecordSubscriptionSchema
331+
// Feed / Chatter timeline types
332+
//
333+
// Provenance (objectui#4597): `@objectstack/spec/data` exported `FeedItemSchema`,
334+
// `MentionSchema`, `ReactionSchema`, `FieldChangeEntrySchema` and
335+
// `RecordSubscriptionSchema` through 15.1.1. The 16.0.0 major removed the whole
336+
// feed surface, directing consumers to the data API over `sys_comment` /
337+
// `sys_activity` — reactions and threaded replies are fields on `sys_comment`.
338+
// `FeedItemType` and `FeedFilterMode` were deliberately KEPT as live activity-
339+
// timeline config, which is why the import below still resolves.
340+
//
341+
// So the interfaces in this section are shapes this package owns: the protocol
342+
// no longer models them, and there is nothing upstream left to derive from.
334343
// ============================================================================
335344

336345
/**
@@ -348,7 +357,10 @@ export type { FeedItemType };
348357

349358
/**
350359
* FeedItem — A single item in the unified activity feed.
351-
* Aligned with @objectstack/spec FeedItemSchema.
360+
*
361+
* Local shape; its cited `FeedItemSchema` went with the 16.0.0 feed removal
362+
* (see the section banner). Only `type` is still protocol-bound, through the
363+
* `FeedItemType` import above.
352364
*/
353365
export interface FeedItem {
354366
/** Unique identifier */
@@ -393,7 +405,13 @@ export interface FeedItem {
393405

394406
/**
395407
* FieldChangeEntry — A single field change within a feed item.
396-
* Aligned with @objectstack/spec FieldChangeEntrySchema.
408+
*
409+
* Local shape; its cited `FieldChangeEntrySchema` went with the 16.0.0 feed
410+
* removal (see the section banner). The pinned protocol's nearest surviving
411+
* shape is `FieldChangeSchema` in `@objectstack/spec/kernel`, but that is a
412+
* different thing — change tracking keyed `path` / `originalValue` /
413+
* `currentValue` / `changedBy` / `changedAt`, with none of the display keys a
414+
* timeline row needs. Do not re-point this at it.
397415
*/
398416
export interface FieldChangeEntry {
399417
/** Field API name */
@@ -412,7 +430,10 @@ export interface FieldChangeEntry {
412430

413431
/**
414432
* Mention — An @mention within a feed item.
415-
* Aligned with @objectstack/spec MentionSchema.
433+
*
434+
* Local shape; its cited `MentionSchema` went with the 16.0.0 feed removal (see
435+
* the section banner), and no shape of this meaning survives under any other
436+
* name in the pinned protocol.
416437
*/
417438
export interface Mention {
418439
/** Mention target type */
@@ -429,7 +450,10 @@ export interface Mention {
429450

430451
/**
431452
* Reaction — An emoji reaction on a feed item.
432-
* Aligned with @objectstack/spec ReactionSchema.
453+
*
454+
* Local shape; its cited `ReactionSchema` went with the 16.0.0 feed removal
455+
* (see the section banner). Reactions are now persisted as fields on
456+
* `sys_comment` rather than modelled as their own protocol shape.
433457
*/
434458
export interface Reaction {
435459
/** Emoji identifier (e.g. '👍', '❤️', '🎉') */
@@ -444,7 +468,11 @@ export interface Reaction {
444468

445469
/**
446470
* RecordSubscription — Notification subscription state for a record.
447-
* Aligned with @objectstack/spec RecordSubscriptionSchema.
471+
*
472+
* Local shape; its cited `RecordSubscriptionSchema` went with the 16.0.0 feed
473+
* removal (see the section banner). The `Subscription` shapes the pinned
474+
* protocol still exports are unrelated — realtime transport channels, event
475+
* subscriptions and app billing — so none of them is a replacement.
448476
*/
449477
export interface RecordSubscription {
450478
/** Record ID */

‎scripts/check-spec-symbol-derivation.mjs‎

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -466,35 +466,42 @@ export const CLAIM_ALLOW = {
466466
// - derive it (`z.infer< typeof SpecX >`, `SpecAuthoredInput< … >`, or an
467467
// import of the spec type) — the claim becomes structural and the entry goes;
468468
// - keep the copy and move it to CLAIM_ALLOW with the reason it exists;
469-
// - or delete the claim from the comment, because it was never true. Eight of
470-
// these name a spec symbol the installed spec does not export at all
471-
// (`DateFormatSchema`, `NumberFormatSchema`, `PluralRuleSchema`,
472-
// `LocaleConfigSchema`, `FieldChangeEntrySchema`, `MentionSchema`,
473-
// `ReactionSchema`, `RecordSubscriptionSchema`) — a canonical-sounding
474-
// pointer to nothing, which is the planted premise in its purest form. The
475-
// failure message names them, so the next reader does not have to re-measure.
469+
// - or delete the claim from the comment, because it is not true here.
470+
//
471+
// Eight entries left by that last route in objectui#4597 — the i18n formatters'
472+
// four and views.ts's four, which cited `DateFormatSchema`, `NumberFormatSchema`,
473+
// `PluralRuleSchema`, `LocaleConfigSchema`, `FieldChangeEntrySchema`,
474+
// `MentionSchema`, `ReactionSchema` and `RecordSubscriptionSchema`. Measuring
475+
// them answered the question #4597 left open, and the answer was NOT "these
476+
// names never existed": all eight were real exports the protocol RETIRED, and
477+
// each local key set was faithful to the schema it named. The feed four went
478+
// from `@objectstack/spec/data` in the 16.0.0 major (feed surface replaced by
479+
// the data API over `sys_comment` / `sys_activity`); the i18n four went from
480+
// `@objectstack/spec/ui` in 17.0.0-rc.6 itself — present through rc.5 — under
481+
// ADR-0049 enforce-or-remove (objectstack#5055). Their comments now record that
482+
// provenance instead of vouching for a symbol the pinned spec has dropped.
483+
//
484+
// Worth keeping for whoever measures the next batch: "the installed spec does
485+
// not export it" does not distinguish a name that never existed from one the
486+
// protocol retired on purpose, and the fix differs. Read the spec's CHANGELOG
487+
// and its own retirement notes before concluding a citation was always wrong.
476488
const CLAIM_DEBT_ISSUE = 4592;
477489
const CLAIM_DEBT = {
478490
"@object-ui/types": [
479-
"FieldChangeEntry",
480491
"ListViewExportOptions",
481492
"ManagedByBucket",
482-
"Mention",
483493
"ObjectFormSchema",
484494
"ObjectFormSection",
485495
"PageRegionWidth",
486-
"Reaction",
487496
"RecordActivityComponentProps",
488497
"RecordChatterComponentProps",
489498
"RecordComponentAriaProps",
490499
"RecordDetailsComponentProps",
491500
"RecordHighlightsComponentProps",
492501
"RecordPathComponentProps",
493502
"RecordRelatedListComponentProps",
494-
"RecordSubscription",
495503
"SubmitBehavior",
496504
],
497-
"@object-ui/i18n": ["SpecDateFormat", "SpecLocaleConfig", "SpecNumberFormat", "SpecPluralRule"],
498505
"@object-ui/core": ["ResultDialogFieldSpec", "ViewDataConfig"],
499506
"@object-ui/app-shell": ["RecordLookupBinding"],
500507
"@object-ui/plugin-view": ["ROW_HEIGHT_OPTIONS"],

0 commit comments

Comments
 (0)