feat(server, nodes): add json lane#1297
Conversation
🤖 Internal: Discord sync markerAuto-managed by the Discord notification workflow. Stores the linked Discord message ID. Do not edit or delete. |
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughThis PR adds a new ChangesJSON Lane Feature
Sequence Diagram(s)sequenceDiagram
participant PyNode as Python Node
participant cb_writeJson as cb_writeJson (TARGET)
participant Binder as Binder::writeJson
participant PyInstance as IPythonInstanceBase::writeJson
participant IInstancePy as IInstance.writeJson (Python)
PyNode->>cb_writeJson: writeJson(jsonData)
cb_writeJson->>cb_writeJson: enforce TARGET mode, unlock GIL
cb_writeJson->>Binder: binder.writeJson(jsonData)
Binder->>PyInstance: callMethods("json", jsonData) + trace
PyInstance->>PyInstance: check WriteJson flag, jsonToDict(jsonData)
PyInstance->>IInstancePy: instance.writeJson(dict)
IInstancePy->>IInstancePy: append to response["json"] list
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@nodes/src/nodes/response/README.md`:
- Around line 26-35: The README.md file in nodes/src/nodes/response/ has manual
documentation for the new response_json:// service variant (lines 26-35), but
the auto-generated schema block between the ROCKETRIDE:GENERATED:PARAMS START
and ROCKETRIDE:GENERATED:PARAMS END markers (lines 101-165) is missing the
corresponding Return JSON section. Run the nodes:docs-generate command to
regenerate the documentation schema block so it includes all nine service
variants including the new JSON one, then commit the updated README file with
the regenerated content.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 5d2d301e-7f75-43b0-bd68-4f0ea0bcb7fd
📒 Files selected for processing (17)
nodes/src/nodes/response/IInstance.pynodes/src/nodes/response/README.mdnodes/src/nodes/response/services.jsonnodes/src/nodes/response/services.json.jsonpackages/server/engine-lib/engLib/store/core/binder.cpppackages/server/engine-lib/engLib/store/core/filter/filter.callbacks.source.cpppackages/server/engine-lib/engLib/store/core/filter/filter.callbacks.target.cpppackages/server/engine-lib/engLib/store/core/filter/filter.source.cpppackages/server/engine-lib/engLib/store/filters/bottom/bottom.hpppackages/server/engine-lib/engLib/store/headers/binder.hpppackages/server/engine-lib/engLib/store/headers/filter.hpppackages/server/engine-lib/engLib/store/python/bindings.cpppackages/server/engine-lib/engLib/store/python/python-base.hpppackages/server/engine-lib/engLib/store/python/python-instance.cpppackages/server/engine-lib/engLib/store/python/python-instance.json.cpppackages/server/engine-lib/rocketlib-python/lib/rocketlib/filters.pypackages/server/engine-lib/test/store/tests/json.cpp
| The same implementation is registered as ten services. The generic **HTTP Results** service (`response://`) accepts all nine lane types and lets you map each lane to its own result key. Nine single-lane variants accept exactly one lane each and expose a single `laneName` field: | ||
|
|
||
| | Service title | Protocol | Lane | Default result key | | ||
| |------------------|---------------------------|-------------|--------------------| | ||
| | HTTP Results | `response://` | all eight | the lane type name | | ||
| | HTTP Results | `response://` | all nine | the lane type name | | ||
| | Return Answers | `response_answers://` | `answers` | `answers` | | ||
| | Return Audio | `response_audio://` | `audio` | `audio` | | ||
| | Return Documents | `response_documents://` | `documents` | `documents` | | ||
| | Return Image | `response_image://` | `image` | `image` | | ||
| | Return JSON | `response_json://` | `json` | `json` | |
There was a problem hiding this comment.
Regenerate node docs so the generated schema includes the new JSON variant.
Line 26/Line 35 documents response_json://, but the generated schema block (Line 101-165) does not list a Return JSON section. Please run nodes:docs-generate and commit the regenerated README content.
As per coding guidelines, documentation for node inputs/outputs/config must stay co-located and content between <!-- ROCKETRIDE:GENERATED:PARAMS START --> and <!-- ROCKETRIDE:GENERATED:PARAMS END --> is generator-managed.
Also applies to: 101-165
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@nodes/src/nodes/response/README.md` around lines 26 - 35, The README.md file
in nodes/src/nodes/response/ has manual documentation for the new
response_json:// service variant (lines 26-35), but the auto-generated schema
block between the ROCKETRIDE:GENERATED:PARAMS START and
ROCKETRIDE:GENERATED:PARAMS END markers (lines 101-165) is missing the
corresponding Return JSON section. Run the nodes:docs-generate command to
regenerate the documentation schema block so it includes all nine service
variants including the new JSON one, then commit the updated README file with
the regenerated content.
Source: Coding guidelines
There was a problem hiding this comment.
addressed, recheck
03fa152 to
ed71b44
Compare
b66886d to
c8c0f9d
Compare
a38d2a7 to
089b2e8
Compare
Adds a generic
jsonlane.sendJson/writeJson).application/jsonrequests to the json lane.🤖 Generated with Claude Code
Summary by CodeRabbit