Skip to content

Commit d261cef

Browse files
claude[bot]claude
andauthored
docs(spec): state the measured dependsOn spelling facts in the option-description docblock (#15055)
* docs(spec): state the measured dependsOn spelling facts in the option-description docblock The option-description docblock and the two prose sites in its pin file said the canonical spelling `depends_on` already exists at the field level. Measured against the schema it does not: `FieldSchema` declares the camelCase `dependsOn` and refuses `depends_on`, and neither spelling is declared on the option shape. Rewrite the three sites to state only what is measured, and leave the option-face question with objectui#6153 rather than substituting a new justification for the conclusion. Comment text only — no schema member moves. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0174WZTU6XcFcS7g2kykC53i * docs(spec): align the option-shape comments with the 2026-09-02 cascade-key ruling The maintainer amended the inherited reading on 2026-09-02: the contract's field-level cascade key is the camelCase `dependsOn`, objectui mirrors that spelling on its own metadata type, and objectui's snake_case twin retires on its own card. Re-word the three prose sites to that: the option shape declares `description` and no cascade key of its own (the pin file asserts the refusal), and the cascade key is `FieldSchema`'s `dependsOn`. `field.zod.ts` now carries no snake_case occurrence at all; the test file keeps one, naming the spelling `FieldSchema` refuses with a rename hint. No `expect()` changes, no schema member changes. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0174WZTU6XcFcS7g2kykC53i * docs(permissions): re-anchor the system-context census citation after the docblock reflow `check-system-context-census.mjs --fix` rewrote the one rotted line anchor (`field.zod.ts:1537` to `:1540`): the option-description docblock above the `readonly` declaration changed height, so the page cited a line the census no longer calls a read site while the ledger row it excuses went unused. Pure line rot, repaired by the fixer, not by hand. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0174WZTU6XcFcS7g2kykC53i --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 1c7adc7 commit d261cef

3 files changed

Lines changed: 17 additions & 10 deletions

File tree

content/docs/permissions/system-context.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ assuming `isSystem` covers it is a documented source of bugs.
196196
| "It suppresses triggers / record-change automation" | **No.** Only `skipTriggers` does. A bare `{ isSystem: true }` on a seed write re-fired automation on freshly seeded rows and wedged first boot | `metadata-protocol/src/seed-loader.ts:1971` (rationale at `:1881``1883`, #3760), `flow.zod.ts:702` |
197197
| "It skips the state machine" | **No.** That is `skipStateMachine`, carried by seed replay and by `treatAsHistorical` imports | `objectql/src/engine.ts` FSM gate; see [State Machine](/docs/protocol/objectql/state-machine) |
198198
| "It skips validation rules" | **No.** Field shape, `format`, `script` and the rest still run. The `readonly` strip runs *before* validation precisely so a discarded value is not judged | `objectql/src/engine.ts:10008``10025` |
199-
| "It preserves a supplied `updated_at` / `updated_by`" | **No.** That is `preserveAudit`, a separate opt-in — and an UPDATE-path exemption only | `field.zod.ts:1537` (#3493 / #6640) |
199+
| "It preserves a supplied `updated_at` / `updated_by`" | **No.** That is `preserveAudit`, a separate opt-in — and an UPDATE-path exemption only | `field.zod.ts:1540` (#3493 / #6640) |
200200
| "It stamps `created_by`" | **No.** Audit stamping reads `userId` from the context. A user-less system write stamps nothing — that is today's behaviour, not an error | `runtime-identity.ts:280``281` |
201201
| "It bypasses every guard" | **No.** The last-admin guard applies to **every** context, `isSystem` included — the deprovision path that actually locks an org out is the system one | `last-admin-guard.ts:299` |
202202
| "A client can request it" | **No.** Never settable from inbound HTTP or from an action body | `rest-server.ts:1520`, `:1549`; `domains/actions.ts:404` |

packages/spec/src/data/field-rows-option-description.test.ts

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,10 @@
2121
* `recordToOption` produces the same key for fetched options — while
2222
* `SelectOptionSchema` refused it. The object-definition authoring form has
2323
* offered a `description` input all along; the declaration makes the offer
24-
* honest. Per the same inherited ruling, `dependsOn` is deliberately NOT
25-
* declared (the canonical `depends_on` already exists at the field level).
24+
* honest. Per the same inherited ruling the option shape declares
25+
* `description` and no cascade key of its own; the cascade key lives on
26+
* `FieldSchema` as the camelCase `dependsOn`, which objectui mirrors
27+
* (maintainer ruling 2026-09-02 on objectui#6153).
2628
*
2729
* The ruling's capability expansion STOPS at these keys: the four inert
2830
* rich-text editor keys (`toolbar`/`preview`/`minHeight`/`maxHeight`) stay
@@ -200,10 +202,12 @@ describe('SelectOptionSchema accepts `description` (objectui#6153, inherited rul
200202
// this shape by #5016's option C, and #13671 re-measured that reading for
201203
// the FIELD-option surface and kept it (section 3). It stays an
202204
// unrecognized_keys refusal until someone rules otherwise — what #13671
203-
// changed is the OFFER, not this door. `dependsOn`: the inherited #6153
204-
// ruling resolves it objectui-side (the widget reads the canonical
205-
// field-level `depends_on`); declaring a camelCase twin here is
206-
// explicitly not licensed.
205+
// changed is the OFFER, not this door. `dependsOn`: this option shape
206+
// carries no cascade key of its own, per the inherited #6140 / #6153
207+
// ruling. The cascade key is `FieldSchema`'s camelCase `dependsOn`,
208+
// which refuses the snake_case `depends_on` with a rename hint, and
209+
// objectui mirrors that spelling (maintainer ruling 2026-09-02 on
210+
// objectui#6153).
207211
for (const [key, value] of [['icon', 'circle-dot'], ['dependsOn', 'country']] as const) {
208212
const result = SelectOptionSchema.safeParse({ label: 'Open', value: 'open', [key]: value });
209213
expect(result.success, `\`${key}\` unexpectedly parsed — an unruled accepted-set expansion`).toBe(false);

packages/spec/src/data/field.zod.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -279,9 +279,12 @@ export const SelectOptionSchema = lazySchema(() => strictObject({
279279
* author could legally write. The object-definition authoring form
280280
* (`object.form.ts` options repeater) has offered a `description` input all
281281
* along; this declaration is what makes that offer honest. Per the same
282-
* inherited ruling, `dependsOn` is NOT declared here — the canonical
283-
* spelling `depends_on` already exists at the field level, and a camelCase
284-
* twin would be a second spelling for a declared concept.
282+
* inherited ruling this option shape declares `description` and no cascade
283+
* key of its own — `field-rows-option-description.test.ts` pins that
284+
* refusal. The cascade key this package declares is the camelCase
285+
* `dependsOn`, the `FieldSchema` member below; objectui mirrors that
286+
* spelling on its own metadata type (maintainer ruling 2026-09-02 on
287+
* objectui#6153).
285288
*/
286289
description: z.string().optional().describe('Optional secondary/help text for this option. Lookup option search matches it in addition to the label; renderers may show it as supporting text.'),
287290
color: z.string().optional().describe('Color code for badges/charts'),

0 commit comments

Comments
 (0)