docs: clarify on_error logic in pipeline protocol#1251
Merged
MistEO merged 9 commits intoMaaXYZ:mainfrom Apr 18, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Hey - 我发现了 1 个问题,并给出了一些整体性的反馈:
- 新的流程图只建模了从下一个节点识别超时进入
on_error的路径,但没有展示在on_error描述中提到的“动作执行失败”分支;建议扩展该图,将这条路径也包含进去,从而让文字说明与流程图保持一致。 - diff 中将文件路径从
"a/docs/zh_cn/..."改成了"b/docs/zh_cn/..."(带有字面量引号),看起来像是无意为之,可能会导致文件路径问题;请再次确认是否确实需要这次重命名。
给 AI Agent 的提示词
Please address the comments from this code review:
## Overall Comments
- The new flowchart only models the `on_error` path from next-node recognition timeout but doesn’t show the action-failure branch mentioned in the `on_error` description; consider extending the diagram to include that path so the text and diagram stay aligned.
- The file path change from `"a/docs/zh_cn/..."` to `"b/docs/zh_cn/..."` with literal quotes in the diff looks unintentional and may cause issues with file locations; double-check whether this rename is actually desired.
## Individual Comments
### Comment 1
<location path="docs/en_us/3.1-PipelineProtocol.md" line_range="221" />
<code_context>
- `on_error` : *string* | *NodeAttr* | *list<string | NodeAttr, >*
- When recognition timeout or the action fails to execute, the nodes in this list will be executed next. Optional, empty by default.
+ When **this node's** next list has no nodes matched and the loop recognition times out, or the action fails to execute, the nodes in this list will be executed next (see [flowchart](#node-flow)). Optional, empty by default.
💡 Since v5.1, nodes with attributes, NodeAttr objects, or heterogeneous arrays combining both are supported. See [Node Attributes](#node-attributes) for details.
</code_context>
<issue_to_address>
**suggestion (typo):** Consider rephrasing "has no nodes matched" to more natural English, e.g. "has no matching nodes".
Consider rewording to something like "has no matching nodes" or "has no nodes matching the condition" for smoother, clearer English.
```suggestion
When **this node's** next list has no matching nodes and the loop recognition times out, or when the action fails to execute, the nodes in this list will be executed next (see [flowchart](#node-flow)). Optional, empty by default.
```
</issue_to_address>帮我变得更有用!请对每条评论点选 👍 或 👎,我会根据你的反馈改进后续的 Review。
Original comment in English
Hey - I've found 1 issue, and left some high level feedback:
- The new flowchart only models the
on_errorpath from next-node recognition timeout but doesn’t show the action-failure branch mentioned in theon_errordescription; consider extending the diagram to include that path so the text and diagram stay aligned. - The file path change from
"a/docs/zh_cn/..."to"b/docs/zh_cn/..."with literal quotes in the diff looks unintentional and may cause issues with file locations; double-check whether this rename is actually desired.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The new flowchart only models the `on_error` path from next-node recognition timeout but doesn’t show the action-failure branch mentioned in the `on_error` description; consider extending the diagram to include that path so the text and diagram stay aligned.
- The file path change from `"a/docs/zh_cn/..."` to `"b/docs/zh_cn/..."` with literal quotes in the diff looks unintentional and may cause issues with file locations; double-check whether this rename is actually desired.
## Individual Comments
### Comment 1
<location path="docs/en_us/3.1-PipelineProtocol.md" line_range="221" />
<code_context>
- `on_error` : *string* | *NodeAttr* | *list<string | NodeAttr, >*
- When recognition timeout or the action fails to execute, the nodes in this list will be executed next. Optional, empty by default.
+ When **this node's** next list has no nodes matched and the loop recognition times out, or the action fails to execute, the nodes in this list will be executed next (see [flowchart](#node-flow)). Optional, empty by default.
💡 Since v5.1, nodes with attributes, NodeAttr objects, or heterogeneous arrays combining both are supported. See [Node Attributes](#node-attributes) for details.
</code_context>
<issue_to_address>
**suggestion (typo):** Consider rephrasing "has no nodes matched" to more natural English, e.g. "has no matching nodes".
Consider rewording to something like "has no matching nodes" or "has no nodes matching the condition" for smoother, clearer English.
```suggestion
When **this node's** next list has no matching nodes and the loop recognition times out, or when the action fails to execute, the nodes in this list will be executed next (see [flowchart](#node-flow)). Optional, empty by default.
```
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
MistEO
approved these changes
Apr 17, 2026
Member
MistEO
left a comment
There was a problem hiding this comment.
文档改进很赞,on_error 的触发逻辑描述得更清晰了,新增的 Node Flow 流程图也很直观。Thanks for the detailed docs contribution!
Member
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.

Summary by Sourcery
澄清并重构关于流水线节点生命周期和
on_error行为的文档,并整理代理(agent)文档中的相关表格。Enhancements:
Documentation:
on_error节点在何时执行,明确将该行为与下一个节点的识别超时关联起来,并链接到新的流程图。AGENTS.md中的 Markdown 表格格式,以确保间距一致并提升可读性。Original summary in English
Summary by Sourcery
Clarify and restructure documentation of the pipeline node lifecycle and on_error behavior, and tidy related tables in agent docs.
Enhancements:
Documentation: