Skip to content

src/docs/crm_sales.md 两处仍称「通知负责人及其经理」,两条 flow 都只发负责人 —— 且该文件随 ADR-0046 打进 dist/objectstack.json #875

Description

@yinlianghui

来源:#869(PR 待提)实施中在 dist/objectstack.json 做旧串残留扫描时的顺带发现。#851/PR #870 修的是 Automation 页表行 + flow 的 description,#869 修的是节点 label + 文件头 JSDoc;本条是同族说法在第三个载体上的残留,两次派单边界都没覆盖到。

基线 origin/main = 6cd53d2(已含 PR #870 与 #874)。

事实

src/docs/crm_sales.md 两处声称经理会收到通知,两条 flow 都只发负责人一人:

1. 第 73 行 —— 停滞商机提醒

A daily 07:30 sweep finds any open opportunity that has sat in its current
stage for more than 14 days. The owner and their manager are notified, and a
high-priority follow-up task is created.

src/flows/opportunity-stagnation.flow.ts:89-91:

id: 'notify_owner', type: 'notify', label: 'Nudge Owner',
config: { recipients: ['{currentOpp.owner_id}'], … }

只有负责人一个收件人。该 flow 里不存在任何 manager / position / team 收件目标。

2. 第 78 行 —— 大额赢单提醒

When a deal over $100,000 is marked Closed Won, the owner and manager are
notified automatically.

这正是 #851 已从 Automation 页表行和 opportunity_won_alert 的 description 里删掉的那句话。src/flows/opportunity-won-alert.flow.ts 的 notify 节点 recipients: ['{record.owner_id}'],节点上方注释写明了原因:{record.owner_id.manager} 无法在原始触发快照上穿透 lookup,会插值成字面量 undefined。

注意措辞差一个字:73 行是 owner and their manager,78 行是 owner and manager。#851 当时按 and their manager 检索,所以 78 行漏网。

为什么不是纯注释问题

src/docs/*.md 是 ADR-0046 的 package docs,objectstack build 会 → Collecting package docs (ADR-0046) 把它整篇收进产物。已实测确认:在 dist/objectstack.json 里能直接搜到第 73 行的原文。所以这两句和 #851 修的表行是同一类读者伤害,随 app 一起发布。

为什么现有守卫没抓到

test/docs-drift.test.ts 确实盯着 crm_sales.md,但它的 RULES[] 只抽取数值与 cron(审批阈值、赢单阈值、停滞天数、报价有效期、各 sweep 的 schedule),不涉及收件人。所以金额 $100,000 是被钉住的、准确的,紧挨着它的「and manager」不在任何规则的检查面内。

修复面(未做)

Refs #851 #869 #595

Activity

  1. added
    pm:queueReady for the PM dispatch loop
    pm:dispatchedDispatched to a dev agent by /pm-dispatch
    and removed
    pm:queueReady for the PM dispatch loop
    on Aug 6, 2026
  2. self-assigned this
    on Aug 6, 2026
  3. yinlianghui commented on Aug 6, 2026

    @yinlianghui
    CollaboratorAuthor

    [PM 认领 · R23] session_01VHrPAGEgFDoHjphqYG4BMa · 分支 claude/issue-875-crm-sales-md-recipients · 文件面:src/docs/crm_sales.md(第 73、78 行两句)+ changeset

    裁定与边界:

    1. 两处「负责人及其经理」按 docs(automation): 按 flow 源码写实内置流程表两行,并修 opportunity_won_alert 的 description (#851) #870/PR docs(flows): name what the flow nodes do, not what they were once meant to do #877 口径写实(the owner alone,not their manager):opportunity_stagnation 与 opportunity_won_alert 的 notify 都只发 {record.owner_id}——逐节点重读两条 flow 源码为据。措辞与 docs(automation): 按 flow 源码写实内置流程表两行,并修 opportunity_won_alert 的 description (#851) #870 的 description、docs(flows): name what the flow nodes do, not what they were once meant to do #877 的 label 一致,不造第三种说法。
    2. 该文件经 ADR-0046 整篇进 dist/objectstack.json——build 后确认产物内旧句归零、新句落位(issue 已实测第 73 行原文在产物中,你复测)。
    3. 只动这两句;同文件其它疑似漂移 → out_of_scope_findings 报回(先对 automation 内置 flow 表两行与 flow 实况不符:赢单提醒不发给经理、案例升级既不改派也不建任务(flow 自身 description 同错) #851/两条 flow 的节点 label 与 JSDoc 仍写着未发生的行为(Notify Management / Assign to Senior Agent),#851 的边界只覆盖了 description 串 #869/content/docs/service/sla-and-escalation 三语种把升级描述成「改派给经理 + 群发经理/support-team 邮件」,flow 既不改派也只发负责人一人 #876 去重);docs-drift.test.ts 盯此文件但只抽数值与 cron——如实报其对本改动零敏感。
    4. ⚠️ 基线取最新 main;⛔ src/** 中除此 md 文件外零改动;不加守卫;不动 releases/。

    ⛔ 不升级 @objectstack/*;changeset 站内路径反引号;控制字节自扫;JSON 报告按标准 schema。


    Generated by Claude Code

  4. yinlianghui commented on Aug 6, 2026

    @yinlianghui
    CollaboratorAuthor

    [PM 验收] PR #882 ACCEPT — 已转 ready 并挂 auto-merge(session_01VHrPAGEgFDoHjphqYG4BMa)

    复核结论:


    Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

pm:dispatchedDispatched to a dev agent by /pm-dispatch

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions