Skip to content

Commit e324bac

Browse files
hotlongclaude
andauthored
docs(automation): flows.mdx 的 Scheduled flow 示例补 runAs: 'system' (#5692) (#6012)
`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。 Claude-Session: https://claude.ai/code/session_01BDmDsu2575gDxeMCxXhDE3 Co-authored-by: Claude <noreply@anthropic.com>
1 parent 705efeb commit e324bac

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

content/docs/automation/flows.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1244,6 +1244,7 @@ export const contractExpirationCheck: Flow = {
12441244
label: 'Contract Expiration Check',
12451245
type: 'schedule',
12461246
status: 'active',
1247+
runAs: 'system', // a schedule run has no trigger user — elevate explicitly
12471248
nodes: [
12481249
{
12491250
id: 'start',

0 commit comments

Comments
 (0)