docs(deployment): give the "gate" table its fourth column — the runtime publish surface (#7442) - #7458
Conversation
…me publish surface (#7442) The table documented three CLI commands. Since #4463 P1 there is a fourth door: `saveMetaItem` runs the same `AUTHORING_RULES` table on a `state: 'active'` write, and `publishMetaItem` runs it on the draft→active promotion. A reader of the old table concluded a Studio save passes no gate — false, and exactly the mental model that leads someone to add a redundant check or skip a real one. Each cell measured against the code rather than assumed. `runtimeGatedTypes()` returns `['flow']` and six registry rules declare `surfaces: ['cli', 'runtime-publish']`, so the column is `✓ᶠ` (runs, flow writes only) on those rows and `—` everywhere else; the Zod row is a plain `✓` because the per-type `safeParse` runs on every write. Findings measured live through the real dispatch path: `expression-invalid`, `approval-expression-invalid`, `flow-trigger-unknown-event`, `flow-runas-unscoped`, `filter-empty-combinator`, `flow-node-write-unknown-field` refuse; `flow-template-unknown-field`, `flow-draft-status-ambiguous`, `approval-expression-no-empty-policy` ride back as advisories. An `object` / `view` / `dashboard` write runs zero rules. Four rows added so the column can be honest: two runtime-gated rules had no row at all (empty filter combinators #5330, the flow half of the reference-integrity suite), flow trigger readiness moved out of the "Advisory:" row it had outgrown (#5762 promoted it to gating), and the runtime-only platform-schedule organization refusal (#6285) shows the column is not a pure subset in the other direction either. Dropped `visibility aliases` from the advisory row — `visibility-alias-deprecated` was retired by #6318. Also documents what #7435 landed: advisories reach the author on the save response, not only a server log. Closing prose now says what the fourth door does and does not guarantee — the wiring test requires every runtime-publish rule to run on `os build` too, so the door narrows types, never verdicts. Adjacent citation drift fixed in the same pass: `AUTHORING_RULES` lives in `packages/lint/src/authoring-rules.ts`, not `packages/cli/src/lint/`. Fixes #7442 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XAdrnFmbvpLodAR88aoagw
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
|
The failure is exactly what it says — this PR adds no changeset:
That leaves two routes, and the dispatch ruling for #7442 closes both to me:
So the fix is one label on this PR: Not pushing anything for this one — a commit cannot clear it, and the label the gate is asking for is the PM's to place. Generated by Claude Code |
Fixes #7442
The "the gate" table in
content/docs/deployment/validating-metadata.mdxdocumented three CLI commands. Since #4463 P1 there is a fourth door —saveMetaItemruns the sameAUTHORING_RULEStable on astate: 'active'write, andpublishMetaItemruns it on the draft→active promotion — and the table said nothing about it. A reader of that table (human or AI) concluded a Studio save passes no gate. That is false, and it is exactly the mental model that leads someone to add a redundant check or to skip a real one.Docs-only. One file:
content/docs/deployment/validating-metadata.mdx.Every cell measured, not assumed
The column was derived from the code, not from the issue body. Measured live through the real dispatch path (
runRuntimeAuthoringRules) with a throwaway probe against the built workspace:runtimeGatedTypes()→['flow'].flowis the only metadata type any rule declares at that door. Anobject,view,pageordashboardwrite runs zero rules — measured, all three returnedrulesRun: [].surfaces: ['cli', 'runtime-publish'], all withruntimeTypes: ['flow']:validateStackExpressions,validateEmptyCombinators,validateReferenceIntegrity,validateFlowTriggerReadiness,validateApprovalApprovers,lintFlowPatterns.expression-invalid,approval-expression-invalid,flow-trigger-unknown-event,flow-runas-unscoped,filter-empty-combinator,flow-node-write-unknown-field.flow-template-unknown-field,flow-draft-status-ambiguous,approval-expression-no-empty-policy.validateObjectReferencesreadsstack.objects/actions/dashboards/appsand neverflows, so the "Object & action name references" row is—, not✓.So the new column is
✓ᶠ(runs,flowwrites only) on six rows, a plain✓on the Zod row (the per-typesafeParseruns on every write, before the gate), and—everywhere else.Four rows added, so the column can be honest
gating, so describing it as advisory while the new column says it refuses a publish would contradict itself.create_recordorganization ([转移] 发布期护栏:多组织下「平台级 + schedule + create_record + 未显式 organization_id」拒绝——#6155 Q3=A 裁决的 lint 半边 #6285) is— — — ✓ᶠ: runtime-only by ruling, because both its inputs are facts about the deployment. It shows the column is not a pure subset in the other direction either.Also dropped
visibility aliasesfrom the advisory row —visibility-alias-deprecatedwas retired by #6318 (confirmed invalidate-visibility-predicates.ts,authoring-rules.tsandauthoring-rule-input-tier.test.ts).The closing prose
The sentence at the end of the section ("a stack cannot be published through the one command that happens to skip a check") was written before the fourth surface and reads as a guarantee about publishing in general. It is kept — it is still true of the three commands — and followed by what the fourth door does and does not guarantee:
authoring-rule-wiring.test.tsfails if a rule runs at the runtime gate but not onos build("the two publish verbs must not disagree"), so the door narrows types, never verdicts, with #6285 as the one stated exception.The section also now documents what #7435 (
89d7b35a7) landed: advisories ride back on the save response underadvisories, which is a channel a Studio / MCP / AI author can actually read, rather than only a dedupedconsole.warn.Adjacent drift fixed
The
AUTHORING_RULEScitation saidpackages/cli/src/lint/authoring-rules.ts. The file is atpackages/lint/src/authoring-rules.ts(packages/cli/src/lint/contains onlycorpus.ts,metadata-eval.ts,score.ts). Fixed in the same pass, as triage asked.Deliberately not done
## The one gate, three entry points.content/docs/deployment/cli.mdx:458links#the-one-gate-three-entry-points; renaming it would break that link andcli.mdxis outside this card's file surface. The body reconciles the heading with the fourth column instead.Running author-time rules (26); the registry now holds 38 entries. Out of this card's scope — reported on the issue.Gates run locally
check:nul-bytes,check:doc-authoring,check:docs-audit-scope,check:role-word,check:quick-reference-counts,check:adr-anchors,check:adr-links— all green. MDX compiles (fumadocs-mdx). Note:check:doc-formula-expressions(named at dispatch) does not exist at this HEAD;check:doc-authoringis the doc gate that does.No changeset — docs-only,
skip-changeset.🤖 Generated with Claude Code
https://claude.ai/code/session_01XAdrnFmbvpLodAR88aoagw
Generated by Claude Code