docs(rest): drop the hand-written translatable-type list from translateMetaItem's comment - #15863
docs(rest): drop the hand-written translatable-type list from translateMetaItem's comment#15863os-litant wants to merge 5 commits into
translateMetaItem's comment#15863Conversation
…teMetaItem `isTranslatableMetaType` reads `TRANSLATABLE_METADATA_TYPES`, which is derived from `METADATA_DOCUMENT_TRANSLATORS`' keys. The comment restated those keys by hand as a six-item parenthetical, so it went stale the moment the table grew: `translateDataset` registered a seventh key and the parenthetical still named six. The sentence's actual point is that the keys are SINGULAR, which needs no list to make. The enumeration is deleted rather than corrected -- a corrected restatement rots again on the next registration, and the two lines above already name both the derived set and the table, which is where a reader should go. The table's own doc comment states the rule: "Derived from the dispatch table -- never restate it." Comment-only: every changed line is a `//` line comment, so the token stream is unchanged. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01D47qPfEWVPmhguWgBZCi5N
…anslate-meta-item-comment
📓 Docs Drift CheckThis PR changes 1 package(s): 5 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
⛔ 2 release-owned page(s) also name something this change touched. These are read-only:
What this run could not see
Coarse fallback — 13 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 226e46ed355905bb28b31bd97c9246f23b7ca106 && git checkout 226e46ed355905bb28b31bd97c9246f23b7ca106
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin b398ad258b9e477b5ef92b12c0e2ff6414eb4ec0 028071cc16f7bfcd802ed264ef1d2e88dcf9ae35 && git checkout -B drift-repro b398ad258b9e477b5ef92b12c0e2ff6414eb4ec0 && git merge --no-ff 028071cc16f7bfcd802ed264ef1d2e88dcf9ae35
node scripts/docs-audit/affected-docs.mjs --json b398ad258b9e477b5ef92b12c0e2ff6414eb4ec0
|
…tions The previous commit deleted one comment line from `rest-server.ts`, so the five absolute line anchors that `content/docs/permissions/system-context.mdx` row 51 carries into that file were each one line high. A pure positional shift: `check-system-context-census` reported five `site-without-a-row` and five `anchor-is-not-a-read-site` findings, each pair differing by exactly one. Re-anchored by `node scripts/check-system-context-census.mjs --fix`, which rewrites a pure shift and refuses a population change. Not hand-edited. Verified structurally rather than by comparing line content (several anchored lines in that file are the same string, so content proves nothing): the census was re-derived on both sides of the diff and the population held — sites 107 = 107, identifierAppearances 873 = 873, classified 463 = 463, roleCounts.read 113 = 113, staleLedgerRows 0 = 0, and on the position-blind multiset of (file, receiver, package, text) ARRIVED = 0 and VANISHED = 0. Control `scannedFiles` = 291 on both sides, non-zero and re-validated in the same run. The only movement was positional: per-site delta 0 -1 -1 -1 -1 -1, the one site above the edit unmoved and the five below it shifted by one. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01D47qPfEWVPmhguWgBZCi5N
…anslate-meta-item-comment
…anslate-meta-item-comment
Conflict: content/docs/permissions/system-context.mdx.
main renumbered the elevation table (rows 49..61 became 48..60) and rewrote the
cross-reference prose with it ("row 51's doors" became "row 50's doors"), while
this branch had rewritten five absolute line anchors in the row that moved. The
`os-regen` merge driver declined to defer -- the file is MIXED, a generated half
plus hand-written prose -- and text-merged, which conflicted.
Resolved by taking main's side of the file whole (byte-identical to
origin/main), which keeps its renumbering and its prose intact and discards
only the five anchor numbers, then re-deriving those from the merged tree with
`node scripts/check-system-context-census.mjs --fix`. No line number was
hand-edited and no prose was hand-merged.
The conflicting path was identified with a driver-free instrument -- a
`--bare --shared` clone with no `merge.os-regen.driver` configured, which is
GitHub's condition -- because setting the driver to empty in the real checkout
makes git fail to execute it and report a conflict on every path routed to it.
The probe named exactly one conflicting path, and its control (the same probe
against the branch's own merge base) returned clean, so the instrument
discriminates.
Structurally re-verified at this head rather than reusing the previous
reading, because main's own numbers moved (107 sites became 106, 141 anchors
became 140, and that is main's change, not this branch's). Comparing the
merged tree against the merged tree carrying main's `rest-server.ts`:
sites 106 = 106, identifierAppearances 885 = 885, classified 462 = 462,
roleCounts.read 112 = 112, staleLedgerRows 0 = 0, and ARRIVED = 0 with
VANISHED = 0 on the position-blind multiset of (file, receiver, package,
text). Control `scannedFiles` = 293 on both sides, non-zero and re-validated
in the same run. Only movement positional: per-site delta 0 -1 -1 -1 -1 -1.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01D47qPfEWVPmhguWgBZCi5N
Fixes #14378
The comment above
translateMetaItemrestated the translatable-type set by hand. The enumeration is deleted; the sentence keeps its actual point, which is that the spellings are SINGULAR.Two commits: the comment deletion, and the re-anchoring the deletion forced in
content/docs/permissions/system-context.mdx(see Census repair below).Premise re-derived on today's tree — and it changed since triage
The card was filed as drift risk. Its triage verified on 2026-09-02 that the six were still accurate, because
translateDatasethad not landed yet. It has landed since, so as of this branch the comment and the table disagree.Dispatch table, read mechanically out of
packages/spec/src/system/i18n-resolver.tsrather than by eye:The comment,
packages/rest/src/rest-server.ts:3254, before this change:Seven against six —
datasetis the one the parenthetical never grew. The card predicted exactly this and it happened within three days of the card being graded, which is the finding demonstrating itself rather than an argument for it.The repair, and why it is deletion rather than a pin
Deletion, per the card's disposition. The two lines immediately above already name
TRANSLATABLE_METADATA_TYPESandMETADATA_DOCUMENT_TRANSLATORS, so nothing is lost by not restating them, and the table's own doc comment states the rule this violated: "Derived from the dispatch table — never restate it."A gate or pin asserting comment-vs-table agreement was measured and rejected, with numbers rather than taste:
packages/spec/src/conversions/registry.ts:3039) must be left exactly as it is — it is the recorded rationale for the 17.0.0book.translationsretirement and describes the set as it stood at that removal. So a gate would need a permanent by-name exemption list, i.e. a hand-maintained list of "places allowed to restate the set": the same defect class, one level up, bought for a live population of 1 after this PR.packages/spec/src/system/i18n-resolver.test.ts:3382assertsTRANSLATABLE_METADATA_TYPES.has('dataset')under the title "is registered in the dispatch table, so the REST boundary follows". The behaviour — registering a translator reaches the REST boundary in one edit — has a test. What had no test was prose, and prose that has been deleted cannot rot.Against the four axes: ① the measured need is one stale sentence, not a class needing machinery; ② (weight ≥50%) deletion leaves zero maintained artifacts behind, whereas a gate leaves an exemption list that itself goes stale; ③ a stale comment that reads authoritatively is exactly the input that makes an agent write wrong code, and deletion removes the input entirely rather than making it correct-for-now; ④ a new gate plus its self-tests is disproportionate to a one-line prose defect.
Census repair — and the narrowing it falsified
The first push was RED on
Lint & Repo Gates:check-system-context-censusreported ten problems inpackages/rest/src/rest-server.ts, fivesite-without-a-rowand fiveanchor-is-not-a-read-site, each pair differing by exactly one.content/docs/permissions/system-context.mdxrow 51 cites that file by absolute line number, and deleting one comment line moved every anchor below it up by one.Two things this falsified, and the second is the one worth carrying forward.
scripts/pm/dispatch-gates.mjsdid namenode scripts/check-system-context-census.mjsfor the original one-file change set, matched viapackages/rest/src/rest-server.ts ⇢ gate source 'packages/**'. It was lost downstream: the derived list was summarised with apnpm check:*pattern, and this repo invokes a large share of its gates as barenode scripts/...(lint.yml even carries a "GATE INVOCATION IDIOM" note about it). Measured: the first derivation carried 121 gate entries, of which thepnpm check:summary kept 49. The stated "49 derived" was never the family — it was one filtered view of it, and the gate that went red was in the 72 it dropped.Repair.
node scripts/check-system-context-census.mjs --fixrewrote the five anchors onsystem-context.mdx:162(5084 -> 5083,6510 -> 6509,6758 -> 6757,7189 -> 7188,7382 -> 7381). Nothing was hand-edited.Verified structurally, not by comparing line content — several anchored lines in that file are the same string, so content comparison proves nothing. The census was re-derived on both sides of the diff (
node scripts/isystem-census.mjs --json) by restoring the target file to its merge-base blob under anEXIT INT TERMtrap: the mutation was proven on disk by blob-hash equality with the base blob and a second observation (the deleted enumeration back, count 1), and the restore by blob-hash equality with the HEAD blob and an emptygit diff HEAD. Prediction was written before the run and held exactly:sitestext.identifierAppearancestext.classifiedroleCounts.readnonElevationReadsstaleLedgerRowsscannedFiles(control)The only movement was positional: per-site delta in
rest-server.tswas0 -1 -1 -1 -1 -1— the one site above the edit unmoved, the five below it shifted by one. A pure shift, which is the precondition--fixis allowed to act on.Verification
All verified at
09a50122f2d, the final head after the lastorigin/mainmerge. Exit codes captured by redirecting to a file before any pipe, and each row quotes the gate's own verdict line rather than a bare status.check:system-context-censusOK — 107 elevation read sites in 20 packages across 45 files, all anchored; 141 anchors resolve, 27 declared non-readcheck:doc-anchors310 internal fragment link(s) across 410 source file(s) all resolve to a real headingcheck:nul-bytesOK (scanned 7653 text file(s); no raw ASCII control bytes)check:corpus-claim-driftScanned: 236 .md/.mdx file(s) across 2 root(s)check:role-wordScanned: 236 .md/.mdx file(s); ledger 44 baselined file(s)check:docs-single-h1405 page(s) under content/docs/ carry no body-level headingcheck:docs-redirects92 entries -- 89 page destination(s) resolved, 98 chain probe(s) matchedcheck:docs-audit-scope190 hand-written doc(s) in synccheck:docs-transcript-drift@objectstack/lintwas built (it exits 3 unbuilt — NOT MEASURED, not a pass)check:merge-drivercheck-regen-pending self-test passedcheck:published-readme-links·check:react-page-adapter-contract·check:skill-identifier-liveness·check:vendor-version-stampscheck-doc-frontmatter·check-docs-section-name·check-section-landing-index·check-doc-route-spellinglint check:doc-formula-expressions·lint check:doc-security-posturespec check:docs·check:yaml-examples·check:empty-state·check:liveness·check:strictness-ledger·check:variant-docsspec check:skill-examples257 prose examples type-check across 3 surface(s)— first run exited 1 refusing to measure against an unbuiltclient-react; green after building itcheck:doc-authoring·check:meta-type-normalized·check:pm-governed-prosepnpm --filter @objectstack/rest typechecktsc --noEmitclean;check:test-typecheck: OK — 0 file(s) / 0 error(s)vitest run src/meta-plural-i18n.test.ts src/import-prepare.test.tsTest Files 2 passed (2) / Tests 18 passed (18)Heavy runs went through
scripts/pm/os-verify-lock.sh; everyVERDICTline readcommand-exit 0.Re-derived gate union. With the
.mdxin the change set the derivation grows from 121 entries to 149 — the.mdxadds 33 entries, of which the census gate is one. Two gates in that set were NOT MEASURED on their first attempt and are reported as such rather than as passes:check:docs-transcript-drift(exit 3,PREREQUISITE NOT MET,@objectstack/lintunbuilt) andspec check:skill-examples(exit 1, refusing to read an unbuiltclient-reactdist). Both were built and re-run to a real verdict.No ablation of shipped behaviour. No test is shipped. The one mutation performed was the base-side census restore described above, which is measurement, not a shipped assertion — its direction was predicted in writing first and is recorded in the table.
Clause ② — contract review, re-judged from the delivered diff
The diff grew from one file to two, so this is re-judged rather than reused:
packages/spec/src/**and no key is added to any published payload.packages/rest/src/rest-server.tschanges only comment lines inside a method body;content/docs/permissions/system-context.mdxchanges five line-number citations in one documentation table row.isTranslatableMetaType,TRANSLATABLE_METADATA_TYPESandMETADATA_DOCUMENT_TRANSLATORSare all untouched; the census population is measured identical on both sides of the diff, so not even the documented elevation surface moved — only where it is cited.No
needs:contract-reviewlabel on either carrier.Changeset
skip-changeset, ruled A by the dispatching seat on the card. Neither delivered path publishes anything: comments inside a method body reach neither the emitted JS nor the.d.ts, andcontent/docs/**ships no package.Deliberately not touched
packages/spec/src/conversions/registry.ts:3039carries a similar sentence and is left alone, per the card's fence: it is the recorded rationale for the 17.0.0book.translationsretirement and describes the set as it stood at that removal. Rewriting it to match today's set would falsify a historical record.Out-of-scope finding, measured and filed
The population scan found a third restatement —
packages/rest/src/meta-plural-i18n.test.ts:11, the header of the very test that pins this behaviour, stale by the same one entry. It is a different carrier and the card's triage scoped this PR to "genuinely one line" inrest-server.ts, so it was filed rather than folded in: #15860 (no assignee,finding). Dedup search was run first and its control returned the expected known hit, so the empty duplicate result is a reading rather than a silence.