Repository navigation
docs(sales): name the real recipient of the two opportunity alerts (#875) - #882
Merged
Merged
Conversation
) `src/docs/crm_sales.md` still promised that a manager is notified by the stalled-deal sweep and by the large-deal-won alert. Neither flow sends anything to a manager: - `opportunity_stagnation` has one `notify` node, `recipients: ['{currentOpp.owner_id}']`, and no manager/position/team target anywhere in the flow. - `opportunity_won_alert` notifies `['{record.owner_id}']` only; its node header records why the manager was dropped — `{record.owner_id.manager}` cannot traverse a lookup on the raw trigger snapshot and interpolates to the literal `undefined`. This is the same claim #851 removed from the Automation page table and the flow `description`, and #869 removed from the node labels; it survived here because line 78 spells it "owner and manager" rather than "owner and their manager". The file is an ADR-0046 package doc collected whole into `dist/objectstack.json`, so both sentences shipped with the app. Both now read "the owner alone, not their manager", matching the wording already landed in the flow metadata. The thresholds and schedules in the same two paragraphs (07:30, 14 days, high-priority follow-up task, $100,000) are accurate and unchanged. 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 6, 2026 03:19
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 #875
src/docs/crm_sales.md第 73、78 行两句仍称通知「负责人及其经理」,而opportunity_stagnation与opportunity_won_alert两条 flow 的 notify 收件人都只有负责人一人。本 PR 只把这两句按 #851/#869 已落地的口径写实,不动任何 flow、不加守卫。一、前提复核
基线取最新
origin/main=716bd4d3(issue 记录的 6cd53d2 之后又落了 #877 / #878 / #879)。两行未被重定位、原文仍在,issue 前提成立:src/docs/crm_sales.md:73The owner and their manager are notified, and asrc/docs/crm_sales.md:78the owner and manager are/ 79 行notified automatically.逐节点重读两条 flow 源码,确认收件人:
src/flows/opportunity-stagnation.flow.ts— 全流程节点为start→query_stalled→loop_opps(循环体内find_existing_task→check_not_nudged→notify_owner→create_followup_task)→end。唯一 notify 节点是第 89-97 行的notify_owner,recipients: ['{currentOpp.owner_id}'],channels 为 inbox + email。全文件无任何 manager / position / team 收件目标;节点上方注释已写明原因:{currentOpp.owner_id.manager}在 flow 模板里无法穿透 lookup,会插值成字面量undefined。src/flows/opportunity-won-alert.flow.ts— 节点为start→notify_management→end。唯一 notify 节点第 76-88 行,recipients: ['{record.owner_id}'](id保留历史拼写notify_management是 两条 flow 的节点 label 与 JSDoc 仍写着未发生的行为(Notify Management / Assign to Senior Agent),#851 的边界只覆盖了 description 串 #869 的有意决定:edges[]按 id 引用节点,改名是行为变更)。该 flow 的description与文件头 JSDoc 已经是the owner alone, not their manager。即:第 78 行正是 #851 已从 Automation 页表行和 flow
description里删掉的那句话——因为它拼作owner and manager而非owner and their manager,当时按后者检索故漏网。二、两句改文对照
措辞沿用 #870 落地的
description与 #877 落地的label同一说法(the owner alone, not their manager),不造第三种说法;两段里其余承载信息的部分(07:30、14 天、高优先级跟进任务、$100,000)全部准确,原样保留。第 72-75 行(停滞商机提醒)
改前:
改后:
第 77-79 行(大额赢单提醒)
改前:
改后:
三、产物落位证据(ADR-0046)
该文件经 ADR-0046 整篇进
dist/objectstack.json(build 日志→ Collecting package docs (ADR-0046)...),所以这两句是随 app 发布的读者伤害,不是纯注释问题。反向验证——方向是事先预判的:先在本分支上把 md 改动 stash 掉重新 build(即基线态),断言产物里旧句应当存在;恢复改动再 build,断言旧句归零、新句落位。两次都按预判走:
dist/objectstack.json内计数)The owner and their manager are notifiedthe owner and manager areThe owner is notified — the owner aloneautomatically — the owner alone, not their manager全产物范围内
and their manager与owner and manager现均为 0 命中。产物中该 doc 的上下文确认整篇原样收录(### Stalled-deal nudge (automatic)段落连同 07:30 / 14 days / $100,000 一并在内)。四、docs-drift 守卫的敏感度(如实报告)
test/docs-drift.test.ts的docs: [...]里确实列着crm_sales.md,但每条RULES的extract只从 flow 源码抓数值与 cron:审批阈值record.amount > (\d+)、赢单阈值、STALE_THRESHOLD_DAYS = (\d+)、报价有效期defaultValue: (\d+)、热线索星级record.rating >= (\d+),以及各 sweep 的schedule: '(...)'。收件人不在任何一条规则的检查面内,因此该守卫对本次改动零敏感——它既没抓到这两句漂移,也不会因本次改写变红(被它钉住的14 days/07:30/$100,000我原样保留了)。按 issue「不必混进文案修复」的边界,本 PR 不新增收件人守卫;若认为该能力面值得做,应单独立单。五、验证输出
共享锁
flock -w 7200 /tmp/os-heavy-verify.lock+NODE_OPTIONS=--max-old-space-size=4096,依次:pnpm validatepnpm typecheckpnpm build✓ Build complete (1595ms)/Artifact: dist/objectstack.json (1921.4 KB)pnpm test -- --maxWorkers=2Test Files 66 passed (66)/Tests 1587 passed | 1 skipped (1588)/Duration 48.21spnpm lintnaming/namespace-prefixwarning,与本改动无关pnpm hygienetest 里出现的
✗ source hygiene failed: ...是 source-hygiene 元测试自身打印的预期 stderr(该套件全绿)。改动文件另做控制字节自扫grep -naP '[\x00-\x08\x0b\x0c\x0e-\x1f]':零命中,两文件均为 UTF-8 text。六、边界
src/**中仅改src/docs/crm_sales.md一个文件的两句;未动content/**、未动content/docs/releases/、未升级@objectstack/*、未改任何 flow 行为/节点/条件/收件人。.changeset/crm-sales-md-recipients.md('hotcrm': patch)。Generated by Claude Code