Repository navigation
fix(lint): flow trigger rule counts the objects of a manifest's declared dependencies - #34663
Conversation
…red dependencies The CLI's per-package authoring pass hands each package's stack the artifact's packages[] as resolution context, but validateFlowTriggerReadiness read only stack.objects. A flow in package B on an object its declared dependency A owns warned flow-trigger-unknown-object, and os lint --strict failed a flow the runtime publish gate accepts. With no closure stated, the rule now adds the objects of B's dependency closure, walked by resolvePackageClosure (the publish gate's own walk) over the packages[] entries the artifact carries. An undeclared sibling and a name no closure package provides still warn; a stated closure is unchanged. flow-input-unknown-object reads the same name set and gets the same answer. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ADHkmRfW5u1LRmhWwaYHRp
📓 Docs Drift Check2 anchor(s) derived from 1 changed package(s); no hand-written page names any of them, so this run has nothing to list — not a clean bill of health. This check sees only pages that NAME a derived anchor: one that documents this change in prose, or enumerates it in an authoring dialect, names none and stays invisible to it on every run. What this run could not see
Coarse fallback — 4 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin fbae18854f28359b7c5b1c8ec05fcf714218afdd && git checkout fbae18854f28359b7c5b1c8ec05fcf714218afdd
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin e61af97294e85b99ad5a75c22693a500067f2c1f 3e1e5d215c920e50c025f2ccef671e6c288d4058 && git checkout -B drift-repro e61af97294e85b99ad5a75c22693a500067f2c1f && git merge --no-ff 3e1e5d215c920e50c025f2ccef671e6c288d4058
node scripts/docs-audit/affected-docs.mjs --json e61af97294e85b99ad5a75c22693a500067f2c1f |
…ect through the declared dependency closure Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ADHkmRfW5u1LRmhWwaYHRp
|
repo:objectstack#2 · os-steve · session_01ADHkmRfW5u1LRmhWwaYHRp
Why I judge it not this PR's: the diff touches no file under I am re-running the run's failed jobs once through the relay. A second failure on this test is real and I will root-cause it rather than re-run again. |
…nt-dependency-closure
|
repo:objectstack#2 · os-steve · session_01ADHkmRfW5u1LRmhWwaYHRp Final head for review: |
|
repo:objectstack#2 · os-steve · session_01ADHkmTPcB6fZEwhd2hNQwC 席位核对L1 verdict: ACCEPT · PR #34663 · card #34616 (Fixes) · first review · L1-c2 of seat repo:objectstack#2 · read 2026-11-17T09:42Z Head-sha: Read from GitHub and the diff at this head (merge base Shape. The PR is a draft against Code
Pins
Prose, checked against the code above:
All of these match. Gates: 68 check-runs on this head, all L2 owed: no. None of the four contract faces is touched: no Landing tier: NOT governed (0 governed paths), +221/−13 = 234 lines, no spec face and no narrowing. The area lands it (ordinary queue landing). |
|
repo:objectstack#2 · os-steve · session_01ADHkmRfW5u1LRmhWwaYHRp Landing · Head-sha: 3e1e5d2 · L1 ACCEPT 6944405397 at this head · L2 not owed (no contract face touched)
Ordinary queue landing by the area. |
⛔ merge queue 构建失败 — 先分诊,再决定要不要重排队列构建 44058468444 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集), 分类: 失败的 job(日志抽取,best effort):
跨 PR 相同签名(24h,按失败测试文件聚合):
历史信号:
分诊清单:
Generated by Claude Code · merge-queue-triage workflow (#4859) |
|
repo:objectstack#2 · os-steve · session_01ADHkmRfW5u1LRmhWwaYHRp Re-queue · Head-sha: 3e1e5d2 · L1 ACCEPT 6944405397 unchanged Queue build 44058468444 ejected this PR on two tests in packages it does not touch, and the triage anchors read this PR as an inherited bystander in both stacks, not a root:
This PR changes |
⛔ merge queue 构建失败 — 先分诊,再决定要不要重排队列构建 44062179504 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集), 分类: 失败的 job(日志抽取,best effort):
跨 PR 相同签名(24h,按失败测试文件聚合):
历史信号:
分诊清单:
Generated by Claude Code · merge-queue-triage workflow (#4859) |
|
repo:objectstack#2 · os-steve · session_01ADHkmRfW5u1LRmhWwaYHRp Re-queue 2 · Head-sha: 3e1e5d2 · L1 ACCEPT 6944405397 unchanged Queue build 44062179504 was created at 10:09Z, before re-queue 6945101868, on the queue branch |
Requested by Steve · project thread
Fixes #34616
Clause-②: no
Metadata-protocol: none
维护者速读
flow-trigger-unknown-object(和共用同一份对象名单的flow-input-unknown-object)在 CLI 的按包检查里,现在也把本包 manifestdependencies声明的依赖包(传递)里的对象算作已定义。对象从多包制品自带的packages[]读取,依赖闭包用发布门同一个resolvePackageClosure走。os lint --strict把这条告警当失败,而运行时发布门按 B 的依赖闭包判同一个流程是放行的。hotcrm#2556(费用模块)被这个卡住。packages/lint/src/validate-flow-trigger-readiness.ts新增的dependencyClosureObjectNames和validateFlowTriggerReadiness里加名字的那一行。pnpm --filter @objectstack/lint exec vitest run src/validate-flow-trigger-readiness.test.ts,预期 148 个全过。What changes
packages/lint/src/validate-flow-trigger-readiness.ts: with no package closure stated (the three CLI doors), the rule's set of defined object names now also holds the objects of the packages the stack's manifest declares independencies, walked transitively byresolvePackageClosure(@objectstack/metadata-core, the publish gate's own walk, ruling runtime gate: full runtime-safe rule snapshot for the publish door — the expensive half split out of the object-gating card #9612) over the artifact'spackages[]entries. That is the resolution contextrunPerPackageAuthoringRulesalready hands every package's stack (packageBodyAsStack, ADR-0130 D4); the rule simply never read it. Both positions that read the set get the same answer: the start node's trigger object (flow-trigger-unknown-object) and a start input declared a record (flow-input-unknown-object, spec(automation): a flow start input may declare that it is a record id of a named object (#29425 ruling A) #29442). Under a stated closure nothing is added, sincestack.objectsalready is the closure. The Severity section and thevalidateFlowTriggerReadinessdocblock say so.packages[]entry: a sibling package B did not declare is outside what the publish gate lets B bind a flow to, so its object keeps the advisory, whose remedy (declare the dependency) is the gate's. This is the card's re-check: drop the dependency andos lint --strictfails again.packages/lint/src/rule-explanations.ts: theos explaintext of both ids says the rule counts a declared dependency's objects when the artifact carries them.content/docs/deployment/validating-metadata.mdx: the per-package walk paragraph says a flow's trigger object and a start input's record object resolve only through the declared dependency closure.packageScope.Tests
validate-flow-trigger-readiness.test.ts, new group[#34616] a declared dependency carried in packages[] provides the object(7 cases): the declared dependency's object is not flagged; without the dependency the same flow warns (warning, at the trigger path); the closure is transitive; a declared dependency the artifact does not carry provides nothing; a misspelt name keeps its finding; a start input on the dependency's object is not flagged, and is flagged without the dependency; under a stated closure the stack is the closure and the finding stays anerror.packages/cli/src/utils/artifact-packages.test.ts, the card's two-package fixture throughrunPerPackageAuthoringRuleswith thelintcommand: CONTROL, without the dependency the pass advises atpackage 'com.example.psa' — flow "report_submitted" › start node; with it declared, noflow-trigger-unknown-object.Reading (the card's re-check, a real
os lint --strict)examples/app-multi-package(theorderspackage declaresdependencies: { 'com.example.multi.core': '^1.0.0' }) with a probe flow added toorders, record-after-create on core'scrm_account, andrequires: ['automation', 'triggers']; not committed:flow-trigger-unknown-objectorigin/mainpackage 'com.example.multi.orders'The 3 that remain are
field-no-consumerson the example's own fields, unrelated to this card, so the example itself still exits 1 under--strict; the reading is about the one id.Verification
At head 87e47ab (the docs commit added after f2f2a84):
dispatch-gates --commandsnow derives 100 families; the 29 the docs path added were run, all exit 0, and--ranon the combined record reads100 derived famil(ies) accounted for — 100 run, 0 NOT-MEASURED. No code changed after f2f2a84.At head f2f2a84:
pnpm --filter @objectstack/lint exec vitest run --maxWorkers=2: exit 0,Test Files 214 passed (214),Tests 9098 passed (9098).pnpm --filter @objectstack/lint typecheck,pnpm --filter @objectstack/cli typecheck: exit 0.pnpm --filter @objectstack/cli exec vitest run src/utils/artifact-packages.test.ts src/utils/author-time-rules.test.ts: exit 0, 10 passed.node scripts/pm/dispatch-gates.mjs --commandsderived 71 families, all run with< /dev/null, exit codes captured before any pipe.check:dual-build-cjs-loadsandcheck:i18n-coveragefirst exited 3 (unbuilt packages); after building the 35 packages withoutdist/both exited 0.--ranon the final record:71 derived famil(ies) accounted for — 71 run, 0 NOT-MEASURED.🤖 Generated with Claude Code
https://claude.ai/code/session_01ADHkmRfW5u1LRmhWwaYHRp