Repository navigation
fix(nodes): stop four nodes passing raw input downstream (#2304 to stage) - #2352
Conversation
After a Python lane handler returns normally, the engine also forwards the handler's input on the same lane. Only `preventDefault()` stops that. Four nodes returned normally, so downstream received the raw input next to the node's own output. - `context_optimizer`: both exits of `writeQuestions` now end in `return self.preventDefault()`. Downstream no longer gets the untrimmed original next to the trimmed question. - `summarization`: `writeText` and `writeTable` collect the text, then suppress the forward. Only the summary from `closing()` goes on. - `tool_guild`: `writeText`, `writeQuestions` and `writeDocuments` collect, then suppress. The docstring claiming "overriding suppresses raw passthrough" is corrected. - `tool_n8n`: the same for `writeText`, `writeQuestions`, `writeDocuments`, and every `writeImage` / `writeAudio` / `writeVideo` chunk. - Missing docstrings added in the four node files. Tests: - `test_lane_forward_once_nodes.py`: delivery-count cases for every changed handler. - New `summarization/test_summarization.py`: the node had no unit tests. - `context_optimizer/test_all.py` and `test_tool_n8n.py`: direct handler calls now require the `PreventDefault` exception.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. 🗂️ Base branches to auto review (2)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🤖 Internal: Discord sync markerAuto-managed by the Discord notification workflow. Stores the linked Discord message ID and forum thread ID. Do not edit or delete. |
Summary (stage port)
context_optimizer,summarization,tool_guildandtool_n8nreturned normally from lane handlers whose input lane is also an output lane. So the engine also forwarded the raw input: the untrimmed question next to the trimmed one, the full text next to the summary, and the raw input next to the Guild / n8n result.return self.preventDefault(), after its own work. The false "overriding suppresses raw passthrough" docstrings intool_guildandtool_n8nare corrected.summarization. Existing tests that call these handlers directly now require thePreventDefaultexception.Type
fix
Testing
test_lane_forward_once_nodes.py,test_tool_guild.py,test_tool_n8n.py,context_optimizer/,summarization/,test_sys_modules_guard.py,test_contracts.py), and 104 pass under plain Python. With the node changes reverted, 36 of those tests fail.ruff formatandruff checkare clean../builder testpasses: not run (it needs the full build and a server). The nodes were not run on a live engine.Checklist
examples/guild-agent.pipe,examples/n8n-roundtrip.pipe,examples/n8n/*.pipe,packages/server/test/pipelines/advrag-ingest.json)Linked Issue
Fixes #2303
Related: #1638 (
memory_persistent, PR #1682), #1985 (prompt, PR #1992), #2041🤖 Generated with Claude Code