| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
Codex review: needs maintainer review before merge. Reviewed July 7, 2026, 6:23 AM ET / 10:23 UTC. Summary PR surface: Source +5, Tests +67. Total +72 across 2 files. Reproducibility: yes. at source level: current main casts params.arguments and passes it to the hook/tool path, while the PR exercises the raw loopback HTTP path for malformed, omitted, and object argument cases. I did not run tests because this review was required to keep the checkout read-only. Review metrics: 1 noteworthy metric.
Stored data model Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Maintainer decision needed
Security Best possible solution: Land the narrow handler validation and regression coverage once a Gateway/MCP owner explicitly accepts the stricter malformed-client boundary. Do we have a high-confidence way to reproduce the issue? Yes at source level: current main casts params.arguments and passes it to the hook/tool path, while the PR exercises the raw loopback HTTP path for malformed, omitted, and object argument cases. I did not run tests because this review was required to keep the checkout read-only. Is this the best way to solve the issue? Yes, conditional on maintainer acceptance of the compatibility break: validating at the raw HTTP MCP handler is narrower than changing stdio handling or adding broad per-tool schema validation for this boundary. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 9fb24032215a. Label changesLabel justifications:
PR surface: Source +5, Tests +67. Total +72 across 2 files. View PR surface stats
What I checked:
Likely related people:
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
Sorry, something went wrong.
|
Updated the PR body to remove the leading BOM and added the requested loopback behavior proof: malformed tools/call.params.arguments now returns JSON-RPC -32602, and the focused proof asserts no before-tool hook call and no tool execution. The Real behavior proof check is now passing. @clawsweeper re-review |
Sorry, something went wrong.
|
🦞🧹 I asked ClawSweeper to review this item again. |
Sorry, something went wrong.
|
🦞🧹 I asked ClawSweeper to review this item again. |
Sorry, something went wrong.
|
Strengthened the proof without expanding the production scope. The handler change is unchanged and remains limited to the Gateway HTTP tools/call boundary. I added test-only coverage for the full present-but-non-object matrix (bad, 42, true, null, []) and a positive compatibility case showing omitted arguments still reaches the hook/tool path as {}. Focused validation: $env:CI='true'; pnpm exec vitest run --config test/vitest/vitest.gateway.config.ts src/gateway/mcp-http.test.ts
Test Files 3 passed (3)
Tests 183 passed (183)
@clawsweeper re-review |
Sorry, something went wrong.
|
🦞🧹 I asked ClawSweeper to review this item again. |
Sorry, something went wrong.
|
Strengthened the PR proof without changing code: added the SDK argument-contract rationale, sibling stdio-surface comparison, accepted/rejected argument matrix, and current proof/check status. The PR body is now UTF-8 without BOM.\n\n@clawsweeper re-review |
Sorry, something went wrong.
|
Added a small test-only proof update on top of the latest PR head. What changed:
$env:CI='true'
pnpm exec vitest run --config test/vitest/vitest.gateway.config.ts src/gateway/mcp-http.test.ts
Test Files 3 passed (3)
Tests 186 passed (186)
This completes the proof triangle: present non-object values are rejected before side effects, omitted arguments remains {}, and valid object arguments still pass through unchanged. @clawsweeper re-review |
Sorry, something went wrong.
|
🦞🧹 I asked ClawSweeper to review this item again. |
Sorry, something went wrong.
|
All checks are green on the latest pushed head (8073af61a82a9c1415c9e37310d7699f32e01dda). The branch was synced with upstream/main; the current BEHIND state is from newer unrelated upstream churn in QA/GitHub Copilot files and does not touch this MCP gateway change. @clawsweeper re-review |
Sorry, something went wrong.
|
🦞🧹 I asked ClawSweeper to review this item again. |
Sorry, something went wrong.
Co-authored-by: VectorPeak <73048950+VectorPeak@users.noreply.github.com>
|
Land-ready maintainer verification:
No unresolved review threads or known proof gaps remain. |
Sorry, something went wrong.
|
Merged via squash.
|
Sorry, something went wrong.
Co-authored-by: Peter Steinberger <steipete@gmail.com>
| Back | FazBrowse Home | New Git URL |
What Problem This Solves
The raw Gateway MCP loopback handler accepted any JSON value in tools/call.params.arguments and cast it to an object record. Malformed null, array, or primitive arguments could therefore reach before-tool hooks and tool implementations even though MCP defines this field as an optional object map.
Why This Change Was Made
The loopback handler now rejects a present non-object arguments value with JSON-RPC -32602 before hooks, capture preparation, or tool execution. Omitted arguments still become {}, and valid object arguments pass through unchanged.
This is deliberately limited to the raw loopback HTTP boundary. The sibling stdio MCP server already registers CallToolRequestSchema from the SDK and receives the same validation there. Applying full per-tool schema validation or parsing every loopback request through the SDK would broaden behavior beyond this malformed envelope.
User Impact
Valid MCP clients are unchanged. Clients sending malformed primitive, null, or array tool arguments now receive Invalid params: tools/call arguments must be an object instead of passing the wrong runtime shape into OpenClaw tools.
Evidence