Uh oh!
There was an error while loading. Please reload this page.
fix(app-shell): flow 设计器不再给 wait 种子写入 spec 17 已退役的 waitEventConfig.onTimeout (#3316) - #3371
Merged
Merged
Conversation
…node seeds (#3316) `waitEventConfig.onTimeout` was retired in @objectstack/spec 17 (framework#4158) as a `retiredKey()` tombstone — `z.never().optional()`, a hard `FlowNodeSchema.parse()` error rather than a silently-stripped extra. Two designer seed sites kept writing it, so every wait node dragged from the palette, inserted on an edge, or created by the one-click revision loop carried a key the loader rejects and published as a 422. - `defaultNodeExtras('wait')` seeds `{ eventType: 'timer' }`. - `FlowCanvas.addReviseLoop` seeds `{ eventType: 'signal', signalName: 'revision' }`. - New `flow-canvas-seeds.spec-parse.test.tsx` runs every seeded node shape through the spec's own `FlowNodeSchema` (full-parse verdict + a `[REMOVED]`-tombstone check for the strict sibling blocks; key-level checks against the published node-config Zods for the deliberately-partial `config`-rooted seeds), so the next retirement lands red at the seed. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GTRjn8xBqp75dk7kFupVRt
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
yinlianghui
marked this pull request as ready for review
August 5, 2026 10:16
Uh oh!
There was an error while loading. Please reload this page.
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 freeto 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#3316
前提核验(origin/main @ 68b6a28)
议题正文的两处快照已随 #3294 漂移,故一律以
origin/main为准复核,前提成立:previews/flow-canvas-parts.tsx:385defaultNodeExtras('wait')仍返回{ eventType: 'timer', onTimeout: 'fail' };previews/FlowCanvas.tsx:367(一键退回修订环)现为{ eventType: 'signal', signalName: 'revision', onTimeout: 'fail' }—— 与正文快照不同,但同样带着onTimeout。对本仓 pin 的
@objectstack/spec@17.0.0-rc.2实测,waitEventConfig.onTimeout确为retiredKey()墓碑(即z.never().optional()),不是被静默剥离而是FlowNodeSchema.parse()的硬错误:即:设计器自己产出的形状过不了 spec 的加载校验 —— 作者只是从面板拖出一个 wait 节点、或点一次「添加退回修订环」,尚未编辑任何字段,保存/发布即 422。
改动
defaultNodeExtras('wait')改为{ waitEventConfig: { eventType: 'timer' } }(timerDuration由作者填,表单里已是 text 字段)。FlowCanvas.addReviseLoop的 wait 节点改为{ eventType: 'signal', signalName: 'revision' }。previews/flow-canvas-seeds.spec-parse.test.tsx。同一次退役的另外两个消费点在本仓早已跟上(
i18n.ts:3519删了标签覆盖、inspectors/flow-node-config.ts:766删了表单字段),漏的正是产出这个键的那一块 —— 本 PR 补齐的就是这一半。防回归测试的两条判据(刻意不同)
waitEventConfig/connectorConfig/boundaryConfig):种子形状完整,判据是整节点FlowNodeSchema.safeParse全绿(值判定);另加一条按名点名的[REMOVED]墓碑断言,让下一次退役直接报出是哪个种子写了哪个键,而不是抛一个invalid_type: never。config根的种子(approval/notify/http):FlowNodeSchema.config是宽松的z.record(),根本看不见它们;且这些种子故意是残缺的(notify 的title、http 的url留给作者填),要求整解析全绿等于断言一件种子从未承诺的事。故判据下沉到键级 —— 每个种子键必须是 spec 已发布的ApprovalNodeConfigSchema/NotifyConfigSchema/HttpConfigSchema的在生键(非墓碑)。覆盖面按生产者而非文件划:
NODE_PALETTE全部类型 +start/end/http_request/boundary_event,加上从真实按钮点击捕获的退回修订环节点(该节点写在 React 回调里,没有可直接调用的导出;两个生产者放同一文件正是因为 #3316 的失效形状就是「只改了看得见的那个」)。议题建议第 3 点的核验结论:无第二例
defaultNodeExtras其余分支逐一对 spec 跑过,均通过,没有第二个退役键,因此无 out-of-scope finding:顺带核实:议题建议第 1 点括注「
timerDuration接受裸数字作为毫秒」在本仓 pin 的 spec 下,该字段类型是z.string(),裸数字60000被拒、字符串'60000'通过 —— 与flow-node-config.ts注释里「timeoutMs: 60000与timerDuration: '60000'是同一个 wait」一致。本 PR 不种timerDuration,不受影响,记录于此以免下一位读者踩空。验证
反向验证(先定方向再跑)。 预判:把
onTimeout: 'fail'原样塞回两个种子点,应是标准红向 —— 墓碑键按「是否存在」直接判定,不经??链,故既非计数翻转也非反转。实跑与预判一致,4 条红,每条都点名了 offender:恢复修复后复绿(输出里可见文件名,确认新测试真的跑了,规避 #3288 的静默路径过滤):
消费半径扫描:全仓(含 e2e / examples / apps)grep
onTimeout,除注释与 CHANGELOG 外无任何 fixture 仍拼写该键 ——apps/console/src/preview-samples.ts早已删除它,并有preview-samples-spec-valid.test.ts按任意深度封禁退役键。无陈旧 fixture 需要改口。已含 changeset(
@object-ui/app-shellpatch)。未触碰content/docs/releases/。文件面严格限于议题划定范围。🤖 Generated with Claude Code
https://claude.ai/code/session_01GTRjn8xBqp75dk7kFupVRt
Generated by Claude Code