Skip to content

Commit 5d02911

Browse files
os-litantclaude
andauthored
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 `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 * docs(permissions): re-anchor the five rest-server system-context citations 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 --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent ad0b3e7 commit 5d02911

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

‎content/docs/permissions/system-context.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ The largest single consumer — **17 of the 106 sites**.
158158
|:--|:---|:---|:---|:---|
159159
| 48 | Object API-exposure gate bypassed (`apiEnabled` / `apiMethods`) | runtime | Get: internal self-writes ignore exposure declarations — these govern **external** exposure, not engine self-writes | `action-execution.ts:138` |
160160
| 49 | Action `requiredPermissions` bypassed | runtime | Get: engine self-invocation runs any action | `action-execution.ts:401` |
161-
| 50 | `manage_metadata` bypassed on metadata writes | runtime, rest | Get: schema writes without the capability | `domains/meta.ts:471`, `:874`, `rest-server.ts:5084`, `:6510`, `:6758`, `:7189`, `:7382` |
161+
| 50 | `manage_metadata` bypassed on metadata writes | runtime, rest | Get: schema writes without the capability | `domains/meta.ts:471`, `:874`, `rest-server.ts:5083`, `:6509`, `:6757`, `:7188`, `:7381` |
162162
| 51 | The shared metadata-write verdict itself returns `allowed` | metadata-core | Get: the one function all of row 50's doors consult answers yes before any capability is examined | `meta-write-capability.ts:134` |
163163
| 52 | Anonymous-deny seam satisfied on the domain dispatchers and the package/federation routes | runtime, rest | Get: passes with no `userId` | `domains/actions.ts:421`, `domains/ai.ts:60`, `domains/automation.ts:989`, `domains/meta.ts:232`, `domains/security.ts:78`, `domains/packages.ts:422`, `external-datasource-routes.ts:302`, `package-routes.ts:97` |
164164
| 53 | MCP principal check satisfied | runtime | Get: MCP surface reachable with no user | `domains/mcp.ts:61` |

‎packages/rest/src/rest-server.ts‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3250,9 +3250,8 @@ export class RestServer {
32503250
if (!item || typeof item !== 'object') return item;
32513251
// [#6349] Normalize HERE, not at the call sites. `isTranslatableMetaType`
32523252
// reads `TRANSLATABLE_METADATA_TYPES`, which is DERIVED from
3253-
// `METADATA_DOCUMENT_TRANSLATORS`' keys — and those are singular-only
3254-
// (`view`/`action`/`object`/`app`/`dashboard`/`page`), matching
3255-
// `translateMetadataDocument`'s "Canonical metadata type string". The
3253+
// `METADATA_DOCUMENT_TRANSLATORS`' keys — and those are singular-only,
3254+
// matching `translateMetadataDocument`'s "Canonical metadata type string". The
32563255
// `/meta` handlers hand this helper the RAW `:type` path segment, and
32573256
// Prime Directive #3 makes PLURAL the canonical REST spelling, so the
32583257
// documented spelling missed the set and the whole localization was

0 commit comments

Comments
 (0)