From 10171e7055f0a849866bc0de59fee0ab04d1bf1b Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 6 Aug 2026 14:51:33 +0000 Subject: [PATCH] =?UTF-8?q?docs(automation):=20flows.mdx=20=E7=9A=84=20Sch?= =?UTF-8?q?eduled=20flow=20=E7=A4=BA=E4=BE=8B=E8=A1=A5=20runAs:=20'system'?= =?UTF-8?q?=20(#5692)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `contract_expiration_check` 是 `type: 'schedule'` 且 nodes 含 top-level `get_record` 的流程,却没有声明 `runAs`。schedule run 解析不到 trigger user, 生效的是 spec 默认 `runAs: 'user'`,`get_record` 没有身份可 scope —— `flow-runas-unscoped` 按 `severity: 'error'` 判红:照抄这段的作者会得到一次 失败的构建,硬闯过去则运行时被引擎拒绝(#3760)。 同文件 ~35 行之下的 time-relative 邻例 `renewal_reminder` 已经写对,并把理由 带成一行注释;同文档的 `runAs` 属性表散文也写明了同一条规则。文档把约束讲了 两遍,然后在最可能被整段复制的示例里违反了它 —— 本次只补上那一行。 注释理由照抄邻例,只把主语换成本例真实的触发类型:邻例是 `timeRelative` 描述符的 sweep(本文档对该形态的术语),本例是普通 cron schedule。 Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01BDmDsu2575gDxeMCxXhDE3 --- content/docs/automation/flows.mdx | 1 + 1 file changed, 1 insertion(+) diff --git a/content/docs/automation/flows.mdx b/content/docs/automation/flows.mdx index abe181219c..db5c3f4b66 100644 --- a/content/docs/automation/flows.mdx +++ b/content/docs/automation/flows.mdx @@ -1244,6 +1244,7 @@ export const contractExpirationCheck: Flow = { label: 'Contract Expiration Check', type: 'schedule', status: 'active', + runAs: 'system', // a schedule run has no trigger user — elevate explicitly nodes: [ { id: 'start',