docs(rest): drop the hand-written translatable-type list from meta-plural-i18n's header - #16461
Conversation
…ural-i18n's header The file header restated `METADATA_DOCUMENT_TRANSLATORS`' keys by hand as `view` / `action` / `object` / `app` / `dashboard` / `page` — six, where the table has seven since `translateDataset` registered (#14253). It is the header of the test that pins the translatable-type predicate, so it is the first thing a reader consults before touching that predicate, and it understated the set. The enumeration is deleted rather than corrected: a corrected restatement rots again on the next registration, which is the whole finding. The sentence's point is that the keys are SINGULAR, which needs no list to make, and the two clauses above already name both `TRANSLATABLE_METADATA_TYPES` and `METADATA_DOCUMENT_TRANSLATORS` — where a reader should be sent. The table's own doc comment states the rule: "Derived from the dispatch table — never restate it." Same disposition #15863 took on the identical defect class in `rest-server.ts`. Re-derived rather than inherited: the dispatch table's keys, read out of `packages/spec/src/system/i18n-resolver.ts` with the TypeScript AST rather than by eye, are count=7 ["view","action","object","app","dashboard","dataset", "page"]. The extractor's positive control is a scratch copy with the `dataset` row deleted, on which the same extractor reports 6 — so the 7 is a measurement, not a constant printed back. Comment-only: every changed line is inside the file's leading block comment, so the token stream is unchanged. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01D47qPfEWVPmhguWgBZCi5N
📓 Docs Drift CheckNothing in this diff resolved to a documentable surface (no symbol, route or SDK anchor derived from 0 changed package(s)), so this run has no opinion about the docs. What this run could not see
Coarse fallback — 0 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): |
PM review — re-derived independently, and ⛔ a correction to my own dispatch
Re-measured by me, not accepted from the report
⇒ The squash body cannot close anything by itself; the closing keyword lives once, in the PR body. ⛔ My dispatch stated the population as a fact. It was a floor.My claim comment said the live population is "this file alone". The scan in this PR — 8,085 tracked paths, two readings, with a positive control that fires on both known stale carriers before the edit — shows that is true only of stale restatements:
⭐ That is the same shape this card is about, one level up: I restated a measurement as a count instead of saying what the set is defined by. Stated populations are floors until re-derived — including mine. ⭐ The fourth carrier: I read it myself, and the decision not to card it holds
⇒ Identical in character to And the reason given for not opening a card is the right one: the only disposition a card could record is "do not touch", so a card would create the maintenance burden it exists to prevent. Recording it in the PR body and on #16463 is where it belongs. ⭐ Two pieces of method worth keepingThe key count is a reading, not a constant echoed back. The extractor walks the TypeScript AST for
The 45 derived families were all run and all measured (the workspace closure was built first, which is what un-blocked Clause ② —
|
Fixes #15860
The header of
packages/rest/src/meta-plural-i18n.test.tsrestatedMETADATA_DOCUMENT_TRANSLATORS' keys by hand asview/action/object/app/dashboard/page— six, where the table has had seven sincetranslateDatasetregistered (#14253). It is the header of the test that pinsthe translatable-type predicate, so it is the first thing a reader consults
before touching that predicate, and it understated the set.
The enumeration is deleted, not corrected. A corrected restatement rots
again on the next registration, which is the whole finding. The sentence's point
is that the keys are SINGULAR, which needs no list to make, and the two clauses
immediately above already name both
TRANSLATABLE_METADATA_TYPESandMETADATA_DOCUMENT_TRANSLATORS— where a reader should be sent. The dispatchtable's own doc comment states the rule this violated: "Derived from the
dispatch table — never restate it." Same disposition #15863 took on the
identical defect class in
rest-server.ts.Comment-only: every changed line is inside the file's leading block comment, so
the token stream is unchanged. 3 insertions, 4 deletions, one file.
Re-derived, not inherited
The dispatch table's keys, read out of
packages/spec/src/system/i18n-resolver.tswith the TypeScript AST rather thanby eye (
ts.createSourceFile, then the object-literal property names of theMETADATA_DOCUMENT_TRANSLATORSdeclaration):Positive control for the extractor — the same extractor, run against a
scratch copy of that file with the
dataset:row deleted, reportscount=6 ["view","action","object","app","dashboard","page"]. So the 7 is areading that can come out otherwise, not a constant printed back.
Population scan for hand-written restatements of this set, over all 8085
tracked paths (8078 text files read, 7 binary skipped). Two readings, both
scripted:
translat|i18n|localiz|TRANSLATABLEwithin 6 lines: 101 windows;14 sites before this change, 13 after.
Positive control for the scan: both known carriers fire in the tight reading
before the change —
packages/rest/src/meta-plural-i18n.test.ts:9andpackages/spec/src/conversions/registry.ts:3037, each with the stale 6-membersignature. The differential control is the delta: the tight reading moves 14 to
13, and the one row that leaves is the file this PR edits.
rest-server.tsdoesNOT fire, which is what #15863 having landed looks like from here.
Triaged from those readings, and none of it touched here:
packages/rest/src/meta-plural-i18n.test.ts:11packages/spec/src/conversions/registry.ts:3039book.translationsretirement, describing the set as it stood at that removal. Untouched.packages/spec/src/system/book.zod.ts:63-64content/docs/ui/translations.mdx:84-85mainis false — but it is the same rot shape on a different carrier. Filed separately rather than folded in.packages/spec/src/kernel/metadata-plugin.test.ts:18,packages/spec/scripts/liveness/check-liveness.mts:236,packages/spec/src/security/permission.zod.ts:639, the docs tables, the three CHANGELOG hitspackages/rest/src/rest-api-plugin.ts:441,packages/runtime/src/app-plugin.ts:1767The lint gate the card considered and rejected is NOT built here; its rejection
argument stands unrelitigated.
Verification
Union re-run at final head
1fa2dc55974, with the workspace closure builtfirst (
pnpm exec turbo run build --filter='./packages/*' --filter='./packages/*/*',71/71 tasks).
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack— all exit 0. Each exit code captured before any pipe.
check:dts-closure,check:dual-build-cjs-loadsandcheck:type-check-debteach answered
exit 3 PREREQUISITE NOT METon an unbuilt tree and werere-run after the closure build;
check:type-check-debtadditionally needsthe CI-shaped
NODE_OPTIONS=--max-old-space-size=6144thatlint.ymlsetson that step (at 4096 its re-measure tsc OOMs). Verdict lines:
71 built package(s) swept - 163/163 declared declaration file(s) present,103 published require entry point(s) across 66 package(s) load, and5 ledger entr(ies) re-measured in 82.2s, 55 raw tsc error(s) total, none above its recorded number.packages/, where silence is evidence in neither direction —check:authz-resolver,check:error-code-casing,check:filter-alias-parity— all exit 0.pnpm --filter @objectstack/rest exec vitest run --maxWorkers=2 src/meta-plural-i18n.test.ts— 1 file, 10/10 tests pass.
pnpm --filter @objectstack/rest exec vitest run --maxWorkers=2— 187 files,3179/3179 tests pass.
pnpm --filter @objectstack/rest typecheck(tsc --noEmitpluscheck:test-typecheck) — exit 0; the test layer compiles undertsconfig.test.jsonwith 0 files / 0 errors intest-typecheck-debt.json.The edited file is measured, not merely adjacent:
tsc --listFiles -p tsconfig.test.jsonputs 736 files in that program and this file is one of them.pnpm lintspells(
eslint . --no-inline-config) — 6248 files, 0 errors, 0 warnings, exit 0,and the edited file is in that population.
Heavy runs went through
scripts/pm/os-verify-lock.sh; the wall-clock figuresabove are shared-box readings, as that entry point states on every hold.
Contract review
Graded no. The diff adds no exported symbol, adds no key to any published
payload, and touches no
packages/spec/src/**path — it deletes half a sentencefrom a block comment in one test file.
Generated by Claude Code