fix: avoid gateway daemon repair on protocol mismatch#87205
Conversation
This comment has been minimized.
This comment has been minimized.
|
ClawSweeper PR egg ✨ Hatched: 🥚 common Brave Clawlet Hatch commandComment Hatchability rules:
Rarity: 🥚 common. What is this egg doing here?
|
7c67bdd to
9874d45
Compare
Real behavior proof updateAfter-fix evidence from a native Windows source-checkout environment: $ openclaw gateway status
Runtime: running (pid 23208, Startup-folder login item installed; listener detected on port 18789.)
Connectivity probe: failed
Probe target: ws://127.0.0.1:18789
protocol mismatch
Capability: unknown
$ npm run openclaw -- doctor --deep
OpenClaw 2026.5.26 (7c67bdd)
...
— Doctor complete.Observed result:
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
9874d45 to
06c698b
Compare
|
No description provided. |
|
Closing as superseded by #101213. That merged repair fixes the actual Windows update/doctor failure reported in #87156: it captures the running Startup-folder fallback, preserves auth, installs and verifies the replacement Scheduled Task, restarts repaired gateways, and rolls back if takeover cannot be proven. The issue is now closed by that landed fix with native Windows evidence. This PR instead adds a broader policy that treats any typed protocol mismatch as a reason to skip daemon repair mutations. We do not want to retain that separate behavior after fixing the owning update/fallback path, because protocol mismatch can occur outside the reported Windows scenario and should not globally suppress otherwise-valid recovery. Thanks for the focused reproduction and tests; they helped isolate the failure while the canonical repair was being built. |
Summary
Related #87156
Real behavior proof
Behavior addressed:
healthOk=false, causingopenclaw doctorto treat a running gateway as dead/stale and enter daemon repair flow.Real environment tested:
Exact steps or command run after this patch:
Evidence after fix:
gateway statusstill reported:Connectivity probe: failedprotocol mismatchbut
doctor --deep:Gateway not runningObserved result:
Not tested:
Tests
npm test -- src/commands/doctor-gateway-health.test.ts src/commands/doctor-gateway-daemon-flow.test.ts npm run typecheck npm run lintRegression coverage added:
Validation result:
/tmp/hardcoded handoff env expectation)