Repository navigation
fix(doctor): ignore disabled MCP servers in warnings - #131352
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 28, 2026, 7:33 PM ET / 23:33 UTC. ClawSweeper reviewWhat this changesThe PR makes Doctor ignore MCP server entries explicitly marked disabled when producing sandbox allowlist warnings, with a regression test. Merge readinessNo blocking findings. This PR is still necessary because current main retains the false-positive Doctor path; the one-line owner-boundary repair matches the active runtime behavior and has focused coverage plus a supplied real CLI trace. Priority: P2 Review scores
Verification
How this fits togetherDoctor reads MCP configuration and sandbox tool policies to warn when active MCP tools would be hidden. Runtime MCP projections separately exclude disabled server definitions, so Doctor should use the same active-server meaning. flowchart LR
A[OpenClaw configuration] --> B[Doctor command]
B --> C[Active MCP server collection]
C --> D[Sandbox allowlist check]
D --> E[Operator warning]
A --> F[Runtime MCP projection]
F --> G[Active MCP tools]
Before merge
Agent review detailsSecurityNone. PR surfaceSource 0, Tests +20. Total +20 across 2 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Technical reviewBest possible solution: Merge this focused Doctor-side alignment so disabled MCP definitions no longer produce sandbox advice for tools that runtime will not expose. Do we have a high-confidence way to reproduce the issue? Yes. Current-main source includes explicitly disabled records in the Doctor warning list, and the supplied exact-head CLI trace exercises disabled and enabled controls through the production command. Is this the best way to solve the issue? Yes. Filtering at Doctor's active-server collection matches the documented enabled contract and runtime projections; sharing their larger specialized resolvers would couple an operator diagnostic to unrelated runtime policy behavior. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 6f6b6491fd49. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Patrick-Erichsen
left a comment
There was a problem hiding this comment.
Approved at exact head ee6b744190938f917f0f249749d6414928938d0c: the net-neutral Doctor collector fix aligns warnings with the runtime enabled: false contract; exact-head CI and the 28-test focused regression are green, fresh ClawSweeper has no findings, and independent verification found zero open threads or relevant main drift.
|
Merged via squash.
|
Closes #131103
What Problem This Solves
Fixes an issue where
openclaw doctorreports an MCP sandbox allowlist warning for a server that is explicitly disabled in configuration.Why This Change Was Made
The doctor-side MCP server projection now applies the same
enabled: falseexclusion as the runtime resolver. Active configured servers remain eligible for the warning, so this only removes the false positive for disabled definitions.User Impact
Operators can keep disabled MCP server definitions in their configuration without receiving a misleading sandbox allowlist warning. Enabled MCP servers continue to receive the existing warning when their tools are not allowed in the sandbox.
Evidence
pnpm openclaw doctor --no-workspace-suggestionswith an isolated config fixture and state directory; the command reachessrc/commands/doctor-config-flow.tsand the changed MCP warning collector.src/agents/tool-policy-declared-context.tsalready excludes records whereenabled === false.Proof script
env -u NODE_OPTIONS pnpm test src/commands/doctor/shared/plugin-tool-allowlist-warnings.test.ts— 28 tests passed.git diff --check— passed.AI-assisted: built with Codex