Repository navigation
Prevent plain text tool call leaks - #86222
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed May 25, 2026, 3:08 AM ET / 07:08 UTC. Summary PR surface: Source +25, Tests +158, Docs +1. Total +184 across 14 files. Reproducibility: no. high-confidence live reproduction is included. Source inspection shows current main lacks xAI handling for Review metrics: 2 noteworthy metrics.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance: Mantis proof suggestion Risk before merge
Maintainer options:
Next step before merge Security Review detailsBest possible solution: Land the parser, promotion, and delivery guard after redacted Discord/log proof shows raw Do we have a high-confidence way to reproduce the issue? No high-confidence live reproduction is included. Source inspection shows current main lacks xAI handling for Is this the best way to solve the issue? Unclear as merge-ready. The shared parser and promotion approach matches existing LM Studio handling, but delivery proof and a maintainer decision on the SDK-visible helper are still needed. AGENTS.md: found and applied where relevant. Codex review notes: model gpt-5.5, reasoning high; reviewed against 73189e3ecb0c. Label changesLabel justifications:
Evidence reviewedPR surface: Source +25, Tests +158, Docs +1. Total +184 across 14 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
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
|
|
ClawSweeper PR egg 🎁 Pass real behavior proof to wake the egg and unlock a hatchable treat. Where did the egg go?
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
bae88ff to
f78d7b2
Compare
|
Landed, thank you @fuller-stack-dev. Merged as cd62780. I added the maintainer changelog entry on the PR branch before merge: f78d7b2. Proof:
The first |
Prevent plain text tool call leaks from xAI/LM Studio fallback streams. - Promotes plain-text tool-call fallback chunks into structured tool calls. - Strips leaked internal tool syntax before user-facing/outbound text. - Adds regression coverage across provider stream wrappers, tool payload parsing, user-facing sanitization, and outbound send validation. Co-authored-by: fuller-stack-dev <[email protected]>
Prevent plain text tool call leaks from xAI/LM Studio fallback streams. - Promotes plain-text tool-call fallback chunks into structured tool calls. - Strips leaked internal tool syntax before user-facing/outbound text. - Adds regression coverage across provider stream wrappers, tool payload parsing, user-facing sanitization, and outbound send validation. Co-authored-by: fuller-stack-dev <[email protected]>
Prevent plain text tool call leaks from xAI/LM Studio fallback streams. - Promotes plain-text tool-call fallback chunks into structured tool calls. - Strips leaked internal tool syntax before user-facing/outbound text. - Adds regression coverage across provider stream wrappers, tool payload parsing, user-facing sanitization, and outbound send validation. Co-authored-by: fuller-stack-dev <[email protected]>
Summary
[tool:read] { ... }into structured tool calls before the xAI tool stream wrapper runs.[tool:name]pseudo-tool syntax, then strip/reject leaked tool-call-only sends before Discord can echo raw internal tool syntax back into chat.Testing
node scripts/run-vitest.mjs extensions/lmstudio/src/stream.test.ts extensions/xai/stream.test.ts src/plugin-sdk/tool-payload.test.ts src/plugin-sdk/provider-stream-shared.test.tsnode scripts/run-vitest.mjs src/agents/model-fallback.probe.test.ts src/agents/pi-embedded-runner-extraparams.test.ts src/agents/pi-embedded-runner.openai-tool-id-preservation.test.ts src/agents/pi-embedded-runner.sanitize-session-history.policy.test.ts src/agents/pi-embedded-runner.sanitize-session-history.test.ts(CI agentic-lane error files: 10 files, 424 tests passed locally; the failed GitHub job is outside this PR diff, and latestmainhaschecks-node-agentic-agentsgreen.)node scripts/run-tsgo.mjs -p tsconfig.core.json --incremental --tsBuildInfoFile .artifacts/tsgo-cache/core.tsbuildinfonode scripts/run-tsgo.mjs -p tsconfig.extensions.json --incremental --tsBuildInfoFile .artifacts/tsgo-cache/extensions.tsbuildinfonode scripts/run-tsgo.mjs -p test/tsconfig/tsconfig.test.src.json --incremental --tsBuildInfoFile .artifacts/tsgo-cache/test-src.tsbuildinfonode scripts/run-tsgo.mjs -p test/tsconfig/tsconfig.extensions.test.json --incremental --tsBuildInfoFile .artifacts/tsgo-cache/extensions-test.tsbuildinfonode scripts/sync-plugin-sdk-exports.mjs --checknode scripts/check-plugin-sdk-subpath-exports.mjsgit diff --checkAUTOREVIEW_AUTO_TESTS=0 .agents/skills/autoreview/scripts/autoreview --mode localReal behavior proof
[tool:message] { ... }are promoted into structured tool calls or stripped from channel-visible output before Discord delivery; LM Studio now uses the same shared promotion wrapper instead of a duplicate provider-local implementation.xai/grok-4.3on theopenclaw:spartacus-latest-main-hotfiximage with host ports18889/18890; current branch commitbae88ff4d9was also tested locally through the xAI, LM Studio, Plugin SDK parser/export, outbound sanitizer, and send-validation code paths.curl -fsS http://127.0.0.1:18889/healthzdocker logs --tail 80 openclaw-orbstack-bot-openclaw-gateway-1node scripts/run-vitest.mjs extensions/lmstudio/src/stream.test.ts extensions/xai/stream.test.ts src/plugin-sdk/tool-payload.test.ts src/plugin-sdk/provider-stream-shared.test.tsnode scripts/run-vitest.mjs src/agents/model-fallback.probe.test.ts src/agents/pi-embedded-runner-extraparams.test.ts src/agents/pi-embedded-runner.openai-tool-id-preservation.test.ts src/agents/pi-embedded-runner.sanitize-session-history.policy.test.ts src/agents/pi-embedded-runner.sanitize-session-history.test.tstoolcall_start,toolcall_delta, anddone(reason="toolUse")events instead of forwarding raw[tool:...]text, while the outbound sanitizer/send-validation coverage rejects tool-call-only message bodies.