Skip to content

docs: 清扫 bare workflows 残留族 —— 引擎里没有「重新评估 5 次」这个计数器,报价对象上也没有可调的计划 (#899) - #916

Merged
yinlianghui merged 1 commit into
mainfrom
claude/issue-899-bare-workflows
Aug 6, 2026
Merged

yinlianghui merged 1 commit into
mainfrom
claude/issue-899-bare-workflows

Conversation

@yinlianghui

@yinlianghui yinlianghui commented Aug 6, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #899

#850 / PR #894 清掉的是「工作流规则 / workflow rule」这个字串。本 PR 清的是另一个:把 workflows(不带 rule)当成独立于流程的一种东西来讲的散布 —— 7 个页族 ×3 语言,grep 命中面与上一轮不重叠。仅文档改动,src/** 零改动。

A 档 —— 引擎里没有 5 次这个计数器

PR #854 已在 content/docs/administration/automation.mdx:114 把这条说法改成实况,两份副本没跟上,文档因此自相矛盾:一个管理员照 faq 去数「我的级联是不是超过 5 次停了」,而引擎里根本没有这个计数器。

改写口径逐字对齐 automation 页现行文本(流程自身的写入是普通保存、会重新进入触发顺序;引擎用重入守卫打断自触发环;守卫是兜底而非停止条件):

  • reference/faq :75-83 ×3 —— 「我的工作流 / 流程没有触发」问答的一等主语从「工作流」收口到流程(标题、:76「该规则是否已激活」、:81「工作流触发前」、:82「先前的工作流」)。第 5 条从「最多重新评估 5 次、超过后级联停止」换成真实的失败模式:这条流程是否在上一次运行尚未结束时又因同一条记录被重入 —— 被重入守卫跳过并记一条警告日志,没有可对照的次数。
  • reference/performance-and-limits :101 ×3 —— 自动化限制表原本列着 Workflow re-evaluations per save = 5 (then halts),即一个可以据以做容量规划的硬上限。改为流程重新评估,并写明没有固定预算、引擎用重入守卫而不是计次。
    ⚠️ 同表 :20 的 Workflow rules per object 是 PR docs: 清扫 automation 页之外的「工作流规则」并写实 cases 两条虚构通知 (#850, #887) #894 写下的「该类型已退休」具名说明,保持不动。

B 档 —— 指向不存在的配置面

  • sales/quotes :141 ×3 —— 原文让管理员「调整报价对象工作流上的计划」。报价对象上没有这样的设置项;该计划是 src/flows/quote-expiration.flow.ts:25 中 quote_expiration 流程 start 节点上的 schedule cron(每日 01:00)。现在如实写明这是源码作者面而非 Setup 界面,改它是一次代码改动加重新部署。
  • sales/quotes :143 ×3 —— 建议性措辞降格:不再把 workflow 讲成可新建的类型,改为在 src/flows/ 下新写一条记录变更类流程,并写明这是源码改动而非 Setup 界面上的拼装。

C 档 —— 枚举里与流程并列成第三种东西

  • administration/index :33 ×3 —— 管理员心智模型的自动化一项,与同页 :17(PR docs: 清扫 automation 页之外的「工作流规则」并写实 cases 两条虚构通知 (#850, #887) #894 已改为「流程、对象钩子、计划作业」)对齐为流程 / 对象钩子 / 状态机。
  • administration/sandbox-and-releases :64 ×3(变更包内容枚举)、:90 ×3(可打包项表格,原本一行里 Workflows, flows 并列了两遍,现为单一「流程」)。
  • reference/security-and-compliance :78 ×3 —— 审计类目。
  • customization/index :8 —— 仅英文版:两个中文版本本就写的是「流程」,本次是英文对齐(已核实 index.zh-Hans / index.zh-Hant 零命中,无需改动)。

边界(未动,逐条复核过)

验证

门 结果
pnpm validate ✅ exit 0 —— ✓ Validation passed (1346ms)(5 条 author-time 警告为 main 既有)
pnpm typecheck ✅ exit 0
pnpm lint ✅ exit 0 —— 13 warning(s), 14 suggestion(s),均为 main 既有
pnpm hygiene ✅ exit 0 —— ✓ no raw control bytes in first-party files,扫描面含 content 与 .changeset 共 415 个文件
pnpm build ✅ exit 0 —— ✓ Build complete,dist/objectstack.json (1921.4 KB)
pnpm test -- --maxWorkers=2 ✅ exit 0 —— Test Files 66 passed (66),Tests 1587 passed | 1 skipped (1588)

控制字节:pnpm hygiene 之外另做自扫 —— 用 grep -naP 匹配除 tab、LF、CR 以外的全部 C0 控制字符(即 check:nul-bytes 一类只盯 NUL 的扫描漏掉的那些,如 0x01),改动文件与 changeset 均零命中;另用独立脚本逐字节复扫本 PR 的 20 个提交文件,同样零命中。

本 PR 正文自身踩过一次这个坑,如实记在这里。 初次提交的这一段试图把上面那个字符区间逐字写出来,编辑工具把转义序列实体化成了真的控制字节,PR 正文里因此落进 0x08 / 0x0b / 0x0e 一类字节 —— 与 #4890、PR #5140 完全同一个失效模式:正在写「不要有裸控制字节」这条规则的那一刻,字节就进来了。已改写为「描述区间而不粘贴区间」并复读校验(重读存档正文,逐码位扫描,零命中)。仓库文件从未受影响(pnpm hygiene 与自扫都是绿的),受影响的只有 GitHub 上的 PR 正文这一处。

反向验证 —— 实测方向是 GREEN(守卫盲区),不是 RED

本改动没有任何可执行守卫覆盖,如实报告而不是编一个红。实测而非断言:把整棵树 git stash 回退到改前,再跑四个面向文档的守卫 —— docs-drift、automation-docs-coverage、docs-object-coverage、docs-contact-email-uniqueness —— 结果 Test Files 4 passed (4),Tests 90 passed (90),全绿。

盲区成因是可解释的:docs-drift 的 cron / 阈值漂移守卫只读 src/docs/*.md(已确认那四个文件对 workflow 零命中,不存在第二份副本),它对 content/docs 的覆盖只有仪表盘磁贴名单与「译文 callout 块数与英文页相等」的结构对等;automation-docs-coverage 只读 automation 页。全仓 grep 也证实 test/ 与 scripts/ 中没有任何一处 pin 住本次改动的字串。所以这一族缺陷(散文声称一个引擎里不存在的计数器 / 一个不存在的配置面)与 #850、#894 处在同一个盲区里,只能靠 grep 复扫发现 —— 这正是 #899 的来源。

复扫

改后全仓重扫 grep -rniE "workflow|工作流" content/docs/:面内 22 处命中全部消失,面外命中逐条比对未动。

顺带发现同族 4 处落在 #899 枚举之外(whats-new 把真实存在的 contract_renewal 流程叫成 workflow、administration/state-machines:133 在 PR #894 扫过该文件后仍留着、service/cases:80 的小节标题、guides/integrations:130),已按 Prime Directive #10 另开 #912,未在本 PR 修。

…, no schedule to adjust on the quote object (#899)

#850 / PR #894 swept the string "workflow rule". This sweeps the other one:
`workflows` without "rule", written as a kind of thing distinct from flows.
Seven page families x 3 locales; the grep surfaces do not overlap.

A. The "re-evaluates up to 5 times, then the cascade stops" claim was ruled
   fictional in PR #854 and rewritten on the automation page; two copies were
   left behind, so the docs contradicted themselves. `reference/faq`'s "my flow
   didn't fire" checklist and `reference/performance-and-limits`' automation
   limits row now state the engine's behaviour: a flow's own writes are ordinary
   saves that re-enter the trigger order, and a re-entrancy guard breaks
   self-trigger loops — a backstop, not a counter to plan capacity against.

B. `sales/quotes` told admins to adjust the sweep schedule "on the quote
   object's workflow". No such setting exists; the schedule is the start node's
   `schedule: '0 1 * * *'` in `src/flows/quote-expiration.flow.ts`, which the
   page now says plainly — an authoring surface in source, not a Setup screen.
   The neighbouring suggestion to "add a workflow" becomes a record-change flow.

C. Four enumerations listed `workflows` alongside flows as a second deployable
   or auditable kind (`administration/index`, `administration/sandbox-and-
   releases` x2, `reference/security-and-compliance`, `customization/index`).

Everyday-sense uses of the word are untouched, as are PR #894's named-retirement
notes in `reference/glossary` and `performance-and-limits:20`.

Docs only, no `src/**` change.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VHrPAGEgFDoHjphqYG4BMa
@vercel

vercel Bot commented Aug 6, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
hotcrm Ignored Ignored Aug 6, 2026 8:00am

Request Review

@yinlianghui
yinlianghui marked this pull request as ready for review August 6, 2026 08:46
@yinlianghui
yinlianghui added this pull request to the merge queue Aug 6, 2026
Merged via the queue into main with commit fdf6055 Aug 6, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants