fix(mcp): always log channel-bridge notification failures#92032
Conversation
MCP channel-bridge notification failures were only logged when verbose, otherwise swallowed. Emit one low-noise diagnostic always; gate only the error detail behind verbose.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7f2b3217df
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| process.stderr.write(`openclaw mcp: notification ${notification.method} failed\n`); | ||
| if (this.verbose) { | ||
| process.stderr.write( | ||
| `openclaw mcp: notification ${notification.method} failed: ${String(error)}\n`, | ||
| `openclaw mcp: notification ${notification.method} error: ${String(error)}\n`, |
There was a problem hiding this comment.
Keep verbose failures in one diagnostic record
When openclaw mcp serve --verbose encounters a notification rejection, this unconditional write is followed by the verbose write below, so one failure now produces two records instead of the previous single detailed record. This also contradicts the commit's stated one-record behavior and can double failure counts in line-oriented log collectors; construct one message whose error suffix is conditional, and cover the verbose path in the test.
Useful? React with 👍 / 👎.
|
Maintainer verification complete.
|
…2032) MCP channel-bridge notification failures were only logged when verbose, otherwise swallowed. Emit one low-noise diagnostic always; gate only the error detail behind verbose.
…2032) MCP channel-bridge notification failures were only logged when verbose, otherwise swallowed. Emit one low-noise diagnostic always; gate only the error detail behind verbose.
Summary
MCP channel-bridge notification delivery failures were only logged when verbose, otherwise fully swallowed. Emit one low-noise diagnostic on a non-closed failure always; gate only the error detail behind verbose.
CHANGELOG.mdedit (release-only perAGENTS.md).Why core (not ClawHub)
Core correctness fix touching
src/mcp/channel-bridge.ts— perAGENTS.mdthese stay in core (security/core hardening, bundled regressions, missing core APIs), not optional skill bundles routed to ClawHub.Verification
node scripts/run-vitest.mjs run src/mcp/channel-bridge.test.ts=> 10 passedpnpm tsgo:core(tsconfig.core.json) => cleanoxfmt --check+oxlinton touched files => cleanReal behavior proof
node scripts/run-vitest.mjs run src/mcp/channel-bridge.test.ts🤖 Generated with Claude Code