Repository navigation
Add connection diagnostics MCP commands - #961
Conversation
Expose read-only local MCP diagnostics for connection state and saved gateways. Add snapshot-derived projection, command docs, and regression coverage for credential-safe URL display and degenerate gateway records. Co-authored-by: Copilot App <[email protected]>
|
Codex review: needs maintainer review before merge. Reviewed July 10, 2026, 1:33 PM ET / 17:33 UTC. Summary Reproducibility: not applicable. This PR introduces a new read-only local MCP troubleshooting capability rather than reporting broken existing behavior. Review metrics: 3 noteworthy metrics.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Next step before merge
Security Review detailsBest possible solution: Merge the versioned, local-only diagnostics projection after routine owner review, retaining its snapshot-derived design and redaction tests as the supported agent troubleshooting contract. Do we have a high-confidence way to reproduce the issue? Not applicable; this PR introduces a new read-only local MCP troubleshooting capability rather than reporting broken existing behavior. Is this the best way to solve the issue? Yes; a pure projection from the connection manager, registry, settings, and existing sanitized diagnostics fills the gap beyond AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 8a9e35142d49. Label changesLabel justifications:
Evidence reviewedWhat 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
Review history (1 earlier review cycle)
|
|
Addressed ClawSweeper feedback: redacted the local Windows username/session-state proof path in the PR body while keeping the live winnode output intact. The branch is now ready for maintainer review. |
Summary
app.connection.statusandapp.connection.gateways.ConnectionDiagnosticsProjectionso agents can inspect active gateway, operator/node credential state, MCP runtime state, browser proxy caveats, pending approval actions, retry hints, and recent diagnostics without adding a competing connection truth model.AppState.Status/ConnectionStatususage as derived compatibility debt.winnodeskill docs, with drift and projection tests.Validation
.\build.ps1✅ all builds succeeded.dotnet test .\tests\OpenClaw.Shared.Tests\OpenClaw.Shared.Tests.csproj --no-restore✅ 2732 passed, 31 skipped, 0 failed.dotnet test .\tests\OpenClaw.Tray.Tests\OpenClaw.Tray.Tests.csproj --no-restore✅ 1669 passed, 0 failed.dotnet test .\tests\OpenClaw.Connection.Tests\OpenClaw.Connection.Tests.csproj --no-restore✅ 422 passed, 0 failed.dotnet test .\tests\OpenClaw.WinNode.Cli.Tests\OpenClaw.WinNode.Cli.Tests.csproj --no-restore✅ 126 passed, 0 failed.git diff --check✅ no whitespace errors.Real behavior proof
Started an isolated tray with
EnableMcpServer=true,EnableNodeMode=falseusing an isolated tray data directory:winnode --list-toolsshowed:winnode --command app.connection.status --params '{}'returned current-head diagnostics including:{ "schemaVersion": 1, "connectionState": "Idle", "effectiveMode": "LocalMcpOnly", "legacyConnectionStatus": "Disconnected", "mcp": { "enabled": true, "running": true, "error": null }, "pendingActions": [], "diagnostics": { "eventCount": 0, "recentEvents": [] } }winnode --command app.connection.gateways --params '{}'returned:{ "activeGatewayId": null, "count": 0, "gateways": [] }The isolated tray process was stopped after proof collection.
Review notes
Follow-up risks
AppState.Status/ConnectionStatusremain documented as derived compatibility paths for older UI/protocol surfaces.