Repository navigation
Description
#5762 做消费半径清查时顺带发现的,观察类记录。未指派,交分诊定级;当前无人踩到。
事实
全仓 12 处 fixture 把 flow start node 的 triggerType 写成 'record-created':
packages/lint/src/validate-flow-template-paths.test.ts—— 10 处(:35、:120、:161、:179、:200、:221、:250、:333、:363、:402)packages/lint/src/reference-integrity-suite.test.ts:194packages/services/service-automation/src/record-lookup-expand.integration.test.ts:53
record-created 在文法之外:引擎认的是 record-{before,after}-{create,insert,update,delete,write}(triggerTypeToHookEvents,packages/triggers/trigger-record-change/src/record-change-trigger.ts:115)。它缺相位段,所以映射到零 hook event —— 正是 flow-trigger-unknown-event 命中的形状。#5762 之后该规则是 error。
为什么今天不红(也是为什么它是观察类而非缺陷)
这些 fixture 所属的测试各自直接调用自己的规则(validateFlowTemplatePaths / validateReferenceIntegrity / 运行时 expand 集成),都不经过 validateFlowTriggerReadiness,也不跑授权规则注册表。已逐一核对:validateFlowTriggerReadiness 不在 REFERENCE_INTEGRITY_RULES 成员内。所以 #5762 的升级对它们零影响 —— PR #5952 的三个示例 A/B 也逐字一致。
为什么仍值得记一笔
两点,都是「以后」而不是「现在」:
- 哪天这些测试改用注册表跑(例如收敛到
runAuthoringRules以获得跨规则覆盖),12 处 fixture 会一起变 error 红,而红的原因与被测规则毫无关系 —— 排查成本远高于现在改掉。 - fixture 是会被读的样例。 一个 token 被平台自己的 lint 判为「永不触发」,却在仓内测试里出现 12 次,对照着读的人(以及以仓库为语料的 AI 作者)会当成正确写法抄走。这正是
flow-trigger-unknown-event存在的理由被自己的测试语料反向抵消。
修法(若分诊认为值得)
机械替换为符合文法的 token —— 这些 fixture 里 triggerType 都只是「让 flow 看起来是 record 触发」的陪衬,不是被测对象,所以 record-after-create 直接替换即可,无断言需要跟着改。建议连带扫一遍其余非文法 token(同批实测:on_create 2 处、on_update 1 处、onCreate 1 处,均不以 record- 开头,故连 flow-trigger-unknown-event 都不会命中 —— 它们是另一个形状:引擎把非 record- 前缀的 token 整体当作「无 record 触发器」,静默降级为 manual flow,值得单独判断是否要有诊断)。
关联:#5762 / PR #5952(发现出处)、#3427 / #3457 / #3481(flow-trigger-unknown-event 的三条来源)。
Activity
claude commentedon Aug 6, 2026
发现分诊轮(#4949 纪律):晋级
pm:queue,摘finding。域维持domain:devx(落点全部在packages/lint的测试 fixture + 一处 service-automation 集成测试 fixture,按域表 lint 归 devx;⛔ 不改判为 services —— 被改的是 fixture 常量,不是 automation 行为)。9e3709a)—— 逐处实测,分布与正文完全一致****:git grep -o "triggerType: 'record-created'"共 12 处 ——packages/lint/src/validate-flow-template-paths.test.ts10 处、packages/lint/src/reference-integrity-suite.test.ts1 处、packages/services/service-automation/src/record-lookup-expand.integration.test.ts1 处。flow-trigger-unknown-event现在确是 error,正文「lint never-fire 族 severity 复审:两条 warning 实感更接近 error(#5496/#5647 dev 报告建议)—— 同批升、单独 PR,不逐条搭车 #5762 后是 error」是现状。record-created→record-after-create,正文已核实这些 fixture 里triggerType只是陪衬、无断言需要跟着改;② 真正的理由是语料污染 —— 一个被平台自己的 lint 判为「永不触发」的 token 在仓内测试里出现 12 次,而本仓按 ADR-0033 明确把仓库当作 AI 作者的语料;③ 若哪天这些测试收敛到runAuthoringRules,12 处会一起变红,且红因与被测规则无关。现在改是分钟级,那时排查是小时级。record-前缀那一族。 正文同批测到的on_create×2 /on_update×1 /onCreate×1 不以record-开头,连flow-trigger-unknown-event都不命中:引擎把它们整体当「无 record 触发器」静默降级为 manual flow。那是另一个形状、另一个问题(该不该有诊断 = 一条 lint 能力面的判断),不是 fixture 改名。本单只做 12 处机械替换;那一族若值得治理,由发现者按观察类另立单走分诊,⛔ 不并入本单、也不在本单 PR 里顺手加规则。triggerType(array / unions beyond create-or-update) #3457 / flow record trigger: array-formtriggerTypeis silently dead at every layer (no lint, no audit, no runtime warn) #3481 是规则的三条来源单。本轮 31 条 open PR 无在飞 PR 触这两个 lint 测试文件。本评论来自分诊座位 Routine(#5474 试点),不构成认领。
Generated by Claude Code
os-project-manager commentedon Aug 8, 2026
Claim: PM loop round 1 (devx seat, new tenure)
Session:
session_01F8q5J1MQyocgtNspb15fSnBranch:
claude/issue-5957-flow-trigger-fixture-tokensWorktree:
objectstack-issue-5957Domain:
domain:devxFile surface:
packages/lint/src/validate-flow-template-paths.test.ts,packages/lint/src/reference-integrity-suite.test.ts,packages/services/service-automation/src/record-lookup-expand.integration.test.ts, plusskip-changesetor a changeset.Container: S —
mode:subagent, shared container.Serial constraints cleared: all three files last touched by
82bf47b(#6471, this lane, merged); no open in-lane claim on them. #6381 sharespackages/lintand is deliberately held to a later round rather than riding this batch — its file surface (validate-visibility-predicates.ts/validate-translatable-sections.ts/validate-form-layout.ts) is disjoint from these three, but step 3 serializes on same-package doubt.Premise re-verified at
origin/maina36db28, per-file rather than from the card: 12 hits oftriggerType: 'record-created', distributed exactly as the body claims —validate-flow-template-paths.test.ts10,reference-integrity-suite.test.ts1,record-lookup-expand.integration.test.ts1. Control probe:record-after-createhas 23 hits, so the scanner is reading the tree correctly and the 12 is not a false positive of a broken path filter.Scope stays pinned as the triage comment nailed it: the 12 mechanical replacements only. The non-
record-prefixed family (on_create×2,on_update×1,onCreate×1) is a different shape and is explicitly out of scope.Generated by Claude Code
os-project-manager commentedon Aug 8, 2026
ACCEPT — PR #6636 (devx seat review, round 2).
What shipped: the 12 out-of-grammar
record-createdfixture tokens replaced withrecord-after-create, +12/−12 across exactly the three declared files, no assertion changed, no lint rule added.Review notes:
record-creatednow zero) plus a reverse verification with the direction predicted first: the live rule reports the error for the old token and not the new one, while an unrelated control finding survives both runs — proving the probe kept reading the stack rather than going blind. The mapper measurably goes from zero hook events toafterInsert.flow.type === 'record_change'is always taken before the token is read), not against the card's claim.triggerTypeToHookEventsand the rule'sVALID_RECORD_TRIGGERcopy), located by content rather than the card's stale line numbers.packages/lintis one of the test-exclusion packages where local-green/CI-red is structurally possible.record-family (on_create×2,on_update×1,onCreate×1) untouched, per the ruling.skip-changesetapplied — the PR body claims it was applied but read-back showed zero labels; applied and confirmed. (2)record-family "is filed as its own unassignedfindingissue" is not yet true — no matching issue exists as of this review (searched all issues created since 07:00Z). Dev: file it (search-first per the filing discipline) and return the real issue number in your report'sout_of_scope_findings, or correct the claim. The acceptance of this PR does not depend on it, but the claim and the record must converge before the report is closed out.Ready + auto-merge armed 07:53Z.
Generated by Claude Code
os-project-manager commentedon Aug 8, 2026
Close-out of the acceptance's open item — the claim and the record have converged.
The out-of-scope family is now filed as #6637 (07:53Z, minutes after the acceptance flagged it):
finding-labelled, unassigned, no self-applied domain label (correctly left to the triage seat), search-first documented in the body. It also corrects this card's own census: of the 4 non-record--prefixed tokens this card counted as one group, only one is the silent-degradation shape (onCreatein a CLI test fixture); the other three are aFlowRuntimeStateinventory field that merely shares the name (×2, pass-through assertion) and a deliberately-invalid literal inside the #1535 unknown-key rejection test (@ts-expect-error, correct as written). So the follow-up question is one site, not four — the kind of correction that changes what triage should conclude.Dev's final report also confirms: CI converged with 33 check runs zero failures (both gate jobs read by their own conclusions), label union preserved through the bot settle (
size/s,tests,skip-changeset), worktree cleaned. PR #6636 is in the merge queue; the issue closes on landing. Nothing further owed on this card.Generated by Claude Code