Uh oh!
There was an error while loading. Please reload this page.
fix(types,i18n): doc comments stop citing retired @objectstack/spec symbols (#4597) - #4606
Merged
Merged
Conversation
…ymbols (#4597) Eight exported declarations claimed alignment with a `@objectstack/spec` symbol that the pinned 17.0.0-rc.6 does not export: four locale-formatting shapes in `@object-ui/i18n` and four activity-feed shapes in `@object-ui/types`. Measuring all eight against the published registry answered the question #4597 left open, and the answer was not "these names never existed". Every one was a real export the protocol retired deliberately, and every local key set was faithful to the schema it named: - the feed four left `@objectstack/spec/data` in the 16.0.0 major, when the feed surface was replaced by the data API over `sys_comment`/`sys_activity`; - the i18n four left `@objectstack/spec/ui` in 17.0.0-rc.6 itself (present through rc.5) under ADR-0049 enforce-or-remove, objectstack#5055 — no authorable shape carried them and nothing ever parsed them. Each comment now records that provenance instead of vouching for a symbol the pinned spec has dropped, and the CLAIM_DEBT ledger loses exactly those eight entries (26 unbacked claims in 6 packages -> 18 in 5). Comments only: the published .d.ts files differ solely in comment text, proven by re-printing both builds with comments stripped (identical sha256). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017Qqyix2QcnpUC9XeYVDzx3
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
yinlianghui
marked this pull request as ready for review
August 13, 2026 18:58
Uh oh!
There was an error while loading. Please reload this page.
yinlianghui pushed a commit
that referenced
this pull request
Aug 13, 2026
…anode-round2 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017Qqyix2QcnpUC9XeYVDzx3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes#4597
Eight exported declarations carried a doc comment claiming alignment with an
@objectstack/specsymbol that the pinned17.0.0-rc.6does not export. This PR measures each one, rewrites the eight comments to state the true relationship, and deletes exactly those eight entries from theCLAIM_DEBTledger.Comments and ledger only. No type shape, no runtime behaviour, no export changed.
The headline finding: these are retirements, not phantoms
#4597 explicitly left open "whether the spec ever exported these names", and flagged that the fix differs per case. Measured against the published registry, the answer is that all eight were real exports the protocol retired on purpose, and every local key set was faithful to the schema it named. None of them was ever a wrong citation — they are citations that expired.
That distinction changes the fix. A name that never existed wants the sentence deleted; a name the protocol retired wants the retirement recorded, so the next reader does not re-run this measurement to rediscover it.
Measurement
Arbiter for (a) is the hardened gate's own
specExportNamesenumeration, reused verbatim: 16 subpaths, 4834 export names in the installed@objectstack/spec@17.0.0-rc.6. All eight are absent from that set.(c) The registry was reachable.
npm view @objectstack/spec dist-tagsgiveslatest = 16.1.0,rc = 17.0.0-rc.6— so the installed pin is the newest published version. Nothing here is "premature, awaiting a pin bump"; there is no newer spec to bump to.PluralRuleSchemaPLURAL_TO_SINGULAR/singularToPlural, string inflection helpersspec/uithrough rc.5; also in 2.0.7 andlatest16.1.0DateFormatSchemadateStyle/timeStyleNumberFormatSchemaAutonumberFormat*(autonumber field format strings); zero files mentionminimumFractionDigits/useGroupingLocaleConfigSchemaTranslationConfigSchemais app-level (defaultLocale/supportedLocales/fallbackLocale); an internalResolveOptionscarrieslocale+fallbackChainonlyFieldChangeEntrySchemaFieldChangeSchemainspec/kernelkeyspath/originalValue/currentValue/changedBy/changedAt: zero key overlap with the local sixspec/datathrough 15.1.1; gone from 16.0.0-rc.0 onward, incl.latestMentionSchemaReactionSchema.d.tsfiles mentionemojiRecordSubscriptionSchemaSubscriptionSchema(realtime transport),EventSubscriptionSchema,AppSubscriptionSchema(billing) are unrelated meaningsCorroboration from the spec's own shipped files
Not inference — rc.6 states both retirements itself.
CHANGELOG.md, on the feed four:src/ui/i18n.zod.ts— still shipped in rc.6, no longer exported from any entrypoint — on the i18n four:The same note records the return path, which the reworded module doc now carries: localisation comes back through a new ADR, "the formatter that reads a
LocaleConfigfirst, the vocabulary second".Shape fidelity confirms these were honest mirrors while they lasted:
SpecPluralRulematches 16.1.0'sPluralRuleSchemakey-for-key (key/zero/one/two/few/many/other), and the same holds for the other three.Disposition
All eight land on the ruling's third branch — nothing under any name in the pinned spec — so each claim sentence was reworded to stop vouching for a dropped symbol while keeping what is true. No symbol could take the "bind to the real name" branch (none exists to bind to), and none takes the "await the pin bump" branch (rc.6 is already newest). 8 of 8 resolved, so this closes the card.
Two judgement calls worth review:
FieldChangeEntryexplicitly warns againstFieldChangeSchema. It is the one near-miss in the set — same words, adjacent meaning, and a plausible re-point for the next agent. Its keys are disjoint from the local shape, so re-pointing would be wrong; the comment now says so by name, since a silent absence is what invites the mistake.spec-formatters.ts's module header advertised "Runtime consumers for @objectstack/spec v2.0.7 i18n types" and four// XSchema Consumersection banners;views.tshad a section banner asserting the same alignment for four of the eight, plusFeedItem's own comment citingFeedItemSchema(also removed in 16.0.0). Fixing the eight declarations while leaving those in place would have left the files self-contradictory and the planted premise intact on the same symbols. All are inside the card's two files.FeedItemis worth calling out separately: it is not in the ledger and rule 2 cannot see it, because it referencesFeedItemType— a live spec import — while citingFeedItemSchema, which is gone. The tie test is symbol-agnostic, so any declaration with a tie to any spec symbol can cite a retired one and pass. Filed as an observation on the gate rather than fixed here, sincescripts/**rule logic is #4592's surface.Red-first, then green (ratchet #5)
Baseline on
origin/main— green:Comment fixes applied, ledger entries still present — red, verbatim:
After the surgical deletion — green, counts dropped as predicted:
26 → 18claims,6 → 5packages: the@object-ui/i18nkey is now empty and removed entirely. The deletion matches--claim-ledger's regenerated block exactly.On the reverse-verification direction — the template's before-green/after-red does not apply here, and reporting it as if it did would be false. This gate was green before (the debt was declared) and is green after (the debt shrank); the red is the intermediate state, which is precisely ratchet #5's job. Removing the fix with
git checkout origin/main -- …restores the original26 in 6 packagesgreen, and the fix was restored sha256-verified. Nogit stashat any point.Comment-only proof for the published .d.ts
Doc comments on exported declarations do land in the published
.d.ts, so this is a real published-artifact change and is graded accordingly. Both packages were rebuilt withdist/and tsbuildinfo cleared, on each side of the change:.d.tsdiffpackages/types/dist/views.d.ts48efa09249f6418912c5cafa69744358both sidespackages/i18n/dist/utils/spec-formatters.d.ts2f5a04ba995d63fec1026b40e52c7dffboth sidesStripping re-prints each
.d.tsthrough the TypeScript printer withremoveComments. Identical output on both sides is the proof that no declaration, member, modifier or export moved — the #4604 plugin-grid precedent.Grading:
patchfor@object-ui/typesand@object-ui/i18n. The presence gate demands an entry for both; the published artifact genuinely changes (comment text), so the empty-frontmatter exemption would be wrong here. Nevermajor.Verification
node scripts/check-spec-symbol-derivation.mjs— green, counts abovecheck-control-bytes,check-phantom-dependencies,check-changeset-presence,check-changeset-no-major,check-changeset-fixed,check-type-check-coverage,check-lint-coverage,check-spec-symbol-derivation,check-doc-links,check-i18n-call-site-keys,check-i18n-en-driftpnpm exec vitest run --maxWorkers=2 packages/i18n packages/typesplusscripts/__tests__/check-spec-symbol-derivation.test.ts(the ledger's own source of truth) — 79 files / 1236 tests passed; the gate's suite 20/20 on its own runturbo run type-check --filter='...@object-ui/types'— 77/77 tasks successful;--filter='...@object-ui/i18n'— 69/69. Prefix filter, i.e. each package and everything that depends on it (downstream consumers), 43 and 35 packages in scopeno-explicit-any/ unused-import inviews.ts)Generated by Claude Code