fix(app-shell): a published configSchema can no longer delete a node's sibling-block editors (objectstack#4045) - #3082
Merged
Merged
Conversation
…s sibling-block editors (framework#4045) The inspector resolved its fields as `serverFields ?? fieldsForNodeType(type)` — an engine-published configSchema REPLACED the hand-written group wholesale. But a configSchema describes `node.config` and nothing else (ADR-0018), and `jsonSchemaToFlowFields` roots every field it emits at `['config', key]`, so the replacement silently deleted every editor rooted anywhere else. 18 fields are exposed to that: connectorConfig.* (3), waitEventConfig.* (5), boundaryConfig.* (6) and the top-level timeoutMs (4). For `wait` and `boundary_event` that is their ENTIRE contract. Not hypothetical — connector_action already lost this way. Its descriptor published a schema declaring connectorId/actionId/input as CONFIG keys, so against a live backend the generated form replaced the connectorConfig group, pickers included, and an author configuring a connector node in Studio wrote the trio where the executor never reads. The node then refused to dispatch with "connectorConfig.connectorId and .actionId are required". framework#4210 retired that schema; this stops the next mis-rooted one from doing the same. mergeServerFlowFields() splits the resolution by root: the server owns the config-rooted fields (it is the authority on what the executor reads, so a stale client key must not linger), and the hand-written non-config fields are always preserved in declared order. A server field duplicating a preserved sibling key is dropped rather than rendered twice — two editors for one value, one writing where nothing reads, is the same bug in a different hat. Verified by mutation: reverting to the old replacement turns all three new assertions red, including a replay of the connector_action incident.
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
os-zhuang
marked this pull request as ready for review
July 31, 2026 01:12
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.
objectstack#4045 的跨仓库收尾 —— 堵掉 connector_action 事故的根因,而不只是那一个实例。
问题
FlowNodeInspector这样解析表单字段:发布了
configSchema就整表替换手写字段组。但一份configSchema按契约只描述node.config(ADR-0018),而jsonSchemaToFlowFields产出的每个字段都根在['config', key]—— 所以这个替换会把根在别处的编辑器全部静默删除。清点下来共 18 个字段在爆炸半径内:
connectorConfig.*waitEventConfig.*boundaryConfig.*timeoutMs对
wait和boundary_event而言,那个兄弟块就是它们的全部契约 —— 一旦有人给它们发布 schema,属性面板会整个空掉。这不是假设 —— connector_action 已经这样丢过一次
它的描述符发布了一份把
connectorId/actionId/input声明成 config 键的 schema。连着真实后端时,生成的表单替换掉connectorConfig那组(连 connector / action 选择器一起),于是在 Studio 里配置 connector 节点的作者把三元组写进了node.config—— 执行器永远不读那里,节点必然以connectorConfig.connectorId and .actionId are required拒绝执行。objectstack#4210 已在服务端撤掉那份 schema。本 PR 是防止下一份错位的 schema 对
wait或boundary_event做同样的事。改法
新增
mergeServerFlowFields(),按「根」拆分归属:没有发布 schema 时,手写组照旧整组使用,行为不变。
验证
做了变异验证,因为「通过」本身不算证据:把实现退回旧的
return serverFields整表替换后,3 条新断言全部转红(其中一条是 connector_action 事故的原样复现);恢复实现后 71 通过。pnpm test:8677 通过 / 0 失败(749 文件)pnpm type-check:通过pnpm --filter @object-ui/app-shell test -- flow-node-config,报 107 通过 —— 那是假绿。vitest 配置是仓库根作用域的(include: packages/**),从包目录跑包相对路径匹配不到任何文件。正确姿势是在仓库根用仓库相对路径。🤖 Generated with Claude Code
https://claude.ai/code/session_01UDhMtxPLLoFaGtdpNA7xTU
Generated by Claude Code