Repository navigation
docs(automation): 内置 flow 表补齐到 24 条,并把行集/触发面/数词从编译后 stack 派生(#827) - #839
Merged
Merged
Conversation
…om the stack (#827) The built-in flow table on the automation admin page listed 11 flows on the English page and 10 on each Chinese one, while the compiled stack ships 24. It is the only route an admin has from a symptom to the automation behind it, so a short table does not read as incomplete — it reads as "nothing automates this", which is exactly what happened when the contracts page sent readers here to find the expiration sweep. One row was wrong rather than missing: campaign_enrollment became a screen flow (a cron seeds no input variables), but all three pages still billed it as Schedule (Mon 9 AM), and the prose below counted it among the scheduled sweeps. - All 24 flows listed, grouped by trigger surface, each row carrying the flow's own label — the name Setup's process monitor shows. - Trigger cells state the real surface, including the insert/update half of a record-change flow and the real cron for the nine scheduled ones. - Counted sentences follow: (24) in the header, and "the nine Schedule rows above" replacing the hand-written five-item roster that expired. - Short prose on the (on create) twins and on why Demo Bootstrap is listed. test/automation-docs-coverage.test.ts derives the row set, each trigger cell and both numerals from the compiled stack; the Chinese row labels stay authored per locale, because flows carry no locale-pack entry and no zh-Hant pack ships. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VHrPAGEgFDoHjphqYG4BMa
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
yinlianghui
marked this pull request as ready for review
August 5, 2026 23:02
This was referenced Aug 5, 2026
yinlianghui
added a commit
to yinlianghui/hotcrm
that referenced
this pull request
Aug 10, 2026
…les (objectstack-ai#833) (objectstack-ai#854) The automation admin page taught workflow rules as one of five kinds of automation — action types, three "built-in examples", a step in the save order, and a Setup -> Workflow Queue to monitor them. The type does not exist, and not only in this app: measured on @objectstack/* 17.0.0-rc.2, there are zero WorkflowRule symbols across all 50 installed platform packages, spec declares the metadata type, the stack collection, the authoring paradigm, the REST mount and the core-service slot all retired (ADR-0019 / ADR-0020 / #4451), the Setup Automation nav ships Flows and nothing else, and a running server's /api/v1 discovery lists no workflow route or service slot while its automation service returns flows alone. The three "built-in examples" were flows all along — the New Lead Routing & SLA, Large Deal Won Alert and Case Escalation Process rows of the flow table on the same page — so one behaviour was credited to two mechanisms, only one of which an admin can find in Setup. They also described things the flows never did (the #wins Slack post comes from a flow whose only node is a notify), so they are dropped rather than reworded. "The five kinds" is now four; the Flows section opens with a note for readers arriving with "workflow rule" in mind; the save order loses its workflow step and states the engine's real cascade behaviour (a re-entrancy guard, not "up to 5 times"); the Workflow Queue monitoring entry is gone. objectstack-ai#839's flow table and prose are untouched. Claude-Session: https://claude.ai/code/session_01VHrPAGEgFDoHjphqYG4BMa Co-authored-by: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #827
零行为变更:
src/**、releases/一行没碰,flow 元数据逐字节未动。本次只改content/docs/administration/automation.mdx×3、一个新测试文件、一个 changeset。前提复核(在最新 main 上)
git fetch origin main@ 4c12791(issue 写的基线 6f6ed9a 之后 main 已前进)。以 编译后 stack 为准,不数源码文件:issue 的前提成立,而且比它写的更糟 —— 三语各错一处,且不是同一个数:
automation.mdx(11)automation.zh-Hans.mdx(10 个)automation.zh-Hant.mdx(10 個)两个中文页比英文页还少一行(缺
forecast_snapshot,#615 只改了英文页)。issue 没写、实施中查出来的第二个缺陷:一行的触发面是错的,不是缺失。
campaign_enrollment原本是周一 9 点的 schedule flow,后来被改写成 screen flow —— 理由写在src/flows/campaign-enrollment.flow.ts的文件头:cron 触发不喂任何输入变量(只有 console 的 flow-action 触发器喂),所以每次运行要么匹配不到 campaign,要么把全部开放线索灌进一个 null campaign 然后死在「Campaign required」校验上。三语的表却都还写着Schedule (Mon 9 AM)/计划(周一 9 点),而且表下那句数词句把它算进了定时清扫里。管理员照着表去找一个不存在的周一清扫,是能找到「文档依据」的。git log佐证:content/docs/administration/automation.mdx最后一次实质改动是66fa27f5(#615 加 forecast_snapshot 行),此后 12 条 flow 落地无一进表。改了什么
表本身(三语)
24 行,按触发面分组(Screen 6 / Record change 9 / Schedule 9),每行的标签用 flow 自己的
label(英文页逐字用,中文页翻译)。这不只是测试便利:label正是 Setup → 流程监控器 / 计划作业 里显示的名字,所以管理员盯着一次运行记录,可以逐字回到这张表里查。表头因此加了一句说明这件事。| Campaign Enrollment | Schedule (Mon 9 AM) |一行改为| Enroll Leads in Campaign | Screen |。数词句
(11)/(10 个)/(10 個)→(24)/(24 个)/(24 個)。Schedulerows above (campaign enrollment, contract renewal, SLA monitor, stalled-deal alert, forecast snapshot)」→「The nineSchedulerows above are the complete set; there is no separate scheduled-job metadata to look for」。手写的括号清单删掉了 —— 它正是过期的那半(一个 screen flow 在里面),而且是第二张需要同步维护的花名册。数词保留但被守卫钉住,不再是散文里的裸数字。新增两段散文
(on create)孪生流程:case_escalation/opportunity_approval各有一条 insert-time 孪生。记录变更类 flow 每条只订阅一种触发类型,所以「新建与后续修改都要管」写成条件相同的一对。它们在流程监控器里就是两次独立运行,所以在表里各占一行而不是合并。demo_bootstrap为什么在表里:issue 把这条留给实施时判断。裁定是列进去,并在散文里注明它是脚手架而非业务自动化。理由是它不是个边界情况:该 flow ship 在 artifact 里,在客户组织里也每十分钟跑一次并写owner_id(它自己的文件头就是这么说的,test/demo-staffing.test.ts管着它能写什么)。管理员看到归属按十分钟节拍变动时,需要有一行可查。中文用词的一处修正
新的营销活动两行用 营销活动 / 行銷活動,不用旧表的「活动」。「活动」是语言包给
crm_event的标签,而crm_campaign是「营销活动」—— 与 #810/#828 对crm_campaign_member做的判断同源。旧行「活动登记」正好落在这个撞车上。守卫(PM 裁定项 2:可行,已做)
新文件
test/automation-docs-coverage.test.ts,20 条。照 #795/#811 的派生-authored 分界。派生自编译后 stack(
stack.flows,不数src/flows/*文件 —— 有几个文件各导出两条 flow,这正是 21 个文件 ship 24 条 flow 的原因,也是数文件的读者会得到第三个错误数字的原因):record-after-createvsrecord-after-update半边、定时类的 cron;(24)与下方的「九个 Schedule 行」。两者都从 stack 算,永远不从解析出来的行数算,所以表与散文无法「互相迁就着一起错」。(11)就活在这条通道里:它和底下那 11 行完全自洽。authored(因为派生不出来):
ROW_LABEL)。flow 在语言包里没有条目 ——src/translations/zh-CN.ts翻的是对象、字段、视图、action,不含 flow —— 而 zh-Hant 语言包根本不存在。与sharing-coverage.test.ts的ROW_LABEL同一分界、同一理由。label,因此直接对着 stack 校验,比 ledger 强。这也是 docs(sharing): OWD 表对齐注册对象全集,zh 两页带到 #699 的实测口径(#790, #791) #811 的做法(英文页用 stack 派生的pluralLabel,中文页才退回 ledger)。CRON_LABEL)与数词字(COUNT_WORD)。未登记的 cron 或数字直接抛错,不静默通过 ——docs-drift.test.ts给它自己的CRON_LABEL定的惯例。不设 status 过滤,理由写在文件头:行集是 artifact 里的全部 flow。今天 24 条全是
status: 'active',所以一个 status 过滤会是没人走过的分支。将来真有draftflow ship,这条守卫会红到有人决定这张表的含义是「本仓 ship 的 flow」还是「会跑的 flow」为止 —— 那才是做这个决定的时候,好过现在凭猜写一个过滤。过度锁死的评估:一次普通的 flow 改动(改条件、改节点、改文案)不触发任何一条规则。会触发的是三类:新增/删除/重命名一条 flow、改一条 flow 的触发面、改一条定时 flow 的 cron 时刻。这三类都是「不改文档就会让管理员页面变成假话」的改动,正是本次真实发生的两种缺陷。所以是钉住,不是锁死。
反向验证(四个方向,都是先声明方向再跑)
四个方向的预测都写进了测试文件头,与 #795/#811 的体例一致。
(11)1 failed | 19 passed:automation.mdx (en) says 11 built-in flows; the stack ships 24聯絡人歡迎行1 failed | 19 passed:contact_welcome: …automation.zh-Hant.mdx (zh-Hant) has no "聯絡人歡迎" row计划(周一 9 点)触发格放回 zh-Hans 的营销活动行,标签不动计划的行1 failed | 19 passed:campaign_enrollment: … row "将线索登记进营销活动" trigger cell "计划(周一 9 点)" is missing "屏幕"1 failed | 19 passed:automation.mdx (en): row "Territory Rebalance" names no flow this app ships方向 2 与方向 3 是这套守卫真正买到的东西。方向 3 尤其直白:把过期触发格放回去之后,zh-Hans 表里有 十 行写着
计划,而它下方的散文写「九个」,数词规则依然是绿的 —— 因为它读的是 stack,那是这两个数字唯一真正成立过的地方。方向 2 从另一侧证明同一件事:删掉一整行也不会让数词跟着一起变错。这两条合起来说明行集、触发格与两个数词各自独立钉在同一个派生集上,无法两两迁就。验证
新增 20 条测试(本 PR 之前 1560 条)。改动文件的控制字符自扫(
grep -naP '[\x00-\x08\x0b\x0c\x0e-\x1f]',含 changeset 与测试文件)零命中。changeset:.changeset/automation-docs-built-in-flow-table.md(patch,docs + test),站内路径一律反引号、无 markdown 链接语法。与 #729 的边界
按派单要求未并单:#729 说的是 README 与 marketplace 文档里的数量(15 objects / 23 flows)过期,本 PR 只动
content/docs/administration/automation.mdx三语 + 测试 + changeset,文件面不重叠。#749(该页缺#case-escalation锚点)同样未碰 —— 本 PR 没有新增或改动任何小节标题。越界发现(均已先搜重、后单独立 issue,未 assign)
@objectstack/spec17.0.0-rc.2 里WorkflowRule零命中,defineStack没有workflows字段,编译产物里也没有这一类;那三条「内置示例」其实分别是lead_assignment/opportunity_won_alert/case_escalation三条 flow(#wins 频道那半更是凭空的 —— 该 flow 只有notify节点)。本 PR 补全 flow 表之后,同一页把这三种行为同时归给了两套机制。未在本 PR 修:改这一节要先在「保留平台能力只删示例」与「整节退休」之间定调,而本仓的证据只覆盖「本仓能否 author」,不覆盖平台运行时是否还提供 —— [观察] PR #762 落地的 integrations 页写「没有 Setup → 集成 菜单」,说法过宽:该分组在平台 Setup 应用里真实存在,plugin-webhooks 等会往里挂条目 #800 就是这句话写宽了的现成教训。notify节点发的(同页下方那句话说的就是这件事,两句在一页上互相矛盾)。docs-drift.test.ts的 callout 平价规则只数>块,普通段落在它量程之外。crm_case在中文文档里有三种叫法:语言包「服务案例」、25 个页面「工单」、14 个页面「案例」(两页同页混用) #837 —[观察]crm_case在中文文档里三种叫法:语言包「服务案例」、25 个页面「工单」、14 个页面「案例」,两页同页混用。本 PR 重写 24 行标签本是统一口径的机会,但选哪个词是产品用词决策,且只改一页会当场造出新的页间漂移。已打finding,未打pm:queue。Generated by Claude Code