Skip to content

Commit b849d9e

Browse files
docs(deployment): put widget-binding integrity on the runtime publish door (#8903) (#9005)
#7529 flipped `validateWidgetBindings` from `CLI_ONLY` to `CLI_AND_RUNTIME` with `runtimeTypes: ['dashboard']`, so a dangling widget dataset binding is now refused at the runtime publish door (Studio, `PUT /api/v1/meta/*`, MCP), not only by `os validate` / `os build` / `os lint`. The page still described it as a CLI-only concern, which is the belief #7529 existed to end. Three corrections, all sourced from `packages/lint/src/authoring-rules.ts`: - §2 gains the publish-door paragraph — the located `422 invalid_metadata` envelope, all six error-tier findings gating as one class, and the ruled draft-may-hold-a-forward-reference carve-out. - The "one gate, four doors" table's widget-binding row was `—` in the runtime publish column, which is now flatly false: it becomes `✓ᵈ`. - The footnote asserting "the two metadata types rules declare there today" and "an object, page or dashboard save is checked by the schema parse and by nothing else" is falsified by that row. It loses the hard count rather than gaining a wrong one — measured against the registry, "three" would also be false, since `validatePresetComparands` and `validateSecurityPosture` already declare object/page/seed/permission/book there. Claude-Session: https://claude.ai/code/session_011RB4waLuNbdruCo6X9oobm Co-authored-by: Claude <noreply@anthropic.com>
1 parent 192213f commit b849d9e

1 file changed

Lines changed: 20 additions & 6 deletions

File tree

‎content/docs/deployment/validating-metadata.mdx‎

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,18 @@ dashboard, widget, filter, field, and object. Opt a widget out with
5858
`filterBindings: { <name>: false }`, or re-target the filter to one of that
5959
object's own fields.
6060

61+
This is no longer only a CLI verdict. Since #7529 the same rule also runs at the
62+
**runtime publish door** for `dashboard` writes, so a board published from
63+
Studio, `PUT /api/v1/meta/*` or an MCP/AI author is refused there too — the same
64+
located `422 invalid_metadata` envelope, naming the dashboard, the widget and the
65+
key path. All six of the rule's error-tier findings gate that door as one "this
66+
board cannot render" class, the filter-field arm above included, while its
67+
warnings still ride the advisory channel and never block. So an author working
68+
entirely in Studio, who never runs `os validate`, no longer ships a silently
69+
empty chart. A **draft** save may still hold a forward reference — the refusal
70+
lands on the draft→active promotion, per
71+
[The one gate, four doors](#the-one-gate-four-doors) below.
72+
6173
### 3. Dead action/route references
6274

6375
A dashboard `header.actions[]` button names a target: a `script`/`modal` action,
@@ -371,7 +383,7 @@ one. `sys_metadata` overlay rows are not in any config file, so there is no
371383
| CEL / predicate validation (ADR-0032) | ✓ | ✓ | ✓ | ✓ᶠ |
372384
| List-view navigation modes (ADR-0053) | ✓ | ✓ | ✓ | — |
373385
| View container shape | ✓ | ✓ | ✓ | — |
374-
| Widget-binding integrity (ADR-0021) | ✓ | ✓ | ✓ | — |
386+
| Widget-binding integrity (ADR-0021) | ✓ | ✓ | ✓ | ✓ᵈ |
375387
| Dashboard action/route references (ADR-0049) | ✓ | ✓ | ✓ | — |
376388
| Filter placeholder resolvability (#3574) | ✓ | ✓ | ✓ | — |
377389
| Empty filter combinators — `$and: []`, `$or: []`, `$not: {}` (#5330) | ✓ | ✓ | ✓ | ✓ᶠ |
@@ -399,11 +411,13 @@ one. `sys_metadata` overlay rows are not in any config file, so there is no
399411
| Emits `dist/objectstack.json` | — | ✓ | — | — |
400412

401413
**`✓ᶠ` means the rule runs at that door for `flow` writes; `✓ᵛ` for `view`
402-
writes.** Those are the two metadata types rules declare there today — #4463
403-
shipped P1 as one type and four rule families, and #7220 added the second type
404-
by moving the whole `views[]` visibility-predicate family across in one edit. So
405-
an object, page or dashboard save is still checked by the schema parse and by
406-
nothing else, and the `—` cells above are `—` for two different reasons: some
414+
writes; `✓ᵈ` for `dashboard` writes.** Each marker names the metadata types that
415+
rule's own `runtimeTypes` declares, and that entry in `AUTHORING_RULES` is the
416+
authority — the set has grown a type at a time (#4463 shipped P1 as `flow` and
417+
four rule families, #7220 moved the whole `views[]` visibility-predicate family
418+
across in one edit, #7529 put widget-binding integrity on `dashboard`), so read
419+
the rule rather than assuming a save of some other type reaches storage
420+
unjudged. The `—` cells above are `—` for two different reasons: some
407421
rules read a stack-wide collection a one-item write does not carry (pages,
408422
dashboards, navigation, permission sets), and some parse authored source through
409423
`typescript`, which the kernel boot path must never load.

0 commit comments

Comments
 (0)