Repository navigation
refactor(mcp): observe probes without replacing SDK callbacks - #177150
Merged
Merged
Conversation
Remove the six lint suppressions introduced by acb98db (#176864). Publish transport exit/error notifications before the unchanged SDK callbacks and detach probe listeners explicitly. Preserve exact send/close method identities with explicit receiver types and retain existing legacy restart, failure and process-cleanup policy. Shrink the two suppression inventory entries added in ab76239 rather than expanding the allowlist. Cover spontaneous exit, I/O failure, failed send, requested close and detach through the transport owner. Proof: 57 focused tests with --maxWorkers=1, including real negotiation peers, process-group cleanup and retained relay cleanup; targeted types, typed and boundary lint, formatting, and independent P2 review all pass.
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review endedClawSweeper stopped reviewing this revision because the pull request closed. |
steipete
marked this pull request as ready for review
October 19, 2026 08:37
Contributor
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Oct 20, 2026
…aw#177150) Remove the six lint suppressions introduced by dc1ccbd (openclaw#176864). Publish transport exit/error notifications before the unchanged SDK callbacks and detach probe listeners explicitly. Preserve exact send/close method identities with explicit receiver types and retain existing legacy restart, failure and process-cleanup policy. Shrink the two suppression inventory entries added in accd494 rather than expanding the allowlist. Cover spontaneous exit, I/O failure, failed send, requested close and detach through the transport owner. Proof: 57 focused tests with --maxWorkers=1, including real negotiation peers, process-group cleanup and retained relay cleanup; targeted types, typed and boundary lint, formatting, and independent P2 review all pass.
This was referenced Nov 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related: #176864
What Problem This Solves
Removes the six production lint suppressions introduced by the native MCP negotiation probe in acb98db (#176864), without expanding the suppression allowance.
User Impact
There is no intended user-visible change. Legacy MCP fallback still requires a spontaneous probe exit, and remains forbidden after I/O failure or requested cleanup. SDK callbacks and owned-process cleanup retain their existing behavior.
Why This Change Was Made
The stdio transport now publishes exit/error notifications before its existing SDK callbacks. The probe attaches and removes event listeners instead of replacing the SDK callback slots. An explicit receiver type preserves the exact saved send/close methods and their restoration without unbound-method suppressions.
This preserves #176864's stated contract: “Existing callers retain explicit legacy negotiation and the existing v1-shaped result boundary.” Main subsequently added these suppressions to the inventory in ab76239; this change removes both entries along with the actual suppressions. No dependency, timeout, assertion or lint rule changes.
Evidence
Focused local proof uses
--maxWorkers=1: the suppression inventory and native MCP real-connect, stdio transport, process-group cleanup and stderr tests all pass (46 tests; 46.39 s wrapper). The real peers prove successful legacy fallback, no restart after an oversized frame, and complete child-process cleanup. Five owner-fixture modes preserve exit/error/send/close/detached decisions and SDK callback delivery.Targeted agents-root tsgo, typed core lint, boundary lint, formatting and whitespace checks pass. Independent P2 autoreview is scoped-clean. The strict stdio client and real retained-relay cleanup suites also pass (11 tests; 48.60 s wrapper), covering callback-driven fatal errors, forced cleanup, uncertain cleanup, reaping, and fresh connection after disposal. PR CI supplies broad proof; no CI reruns were requested.