Repository navigation
fix(google-meet): classify gateway CLI fallback with typed guards instead of message matching - #125495
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 17, 2026, 11:33 PM ET / August 18, 2026, 03:33 UTC. ClawSweeper reviewWhat this changesThe PR changes Google Meet CLI local fallback from error-text matching to typed Gateway errors, adds ECONNRESET classification at the Gateway producer, and makes a Linux process-supervisor test recognize zombie processes as terminated. Merge readinessNo blocking correctness or security defect was found. This protected maintainer PR remains open for the deliberate fallback-compatibility choice and completion of exact-head CI. Priority: P2 Review scores
Verification
How this fits togetherGoogle Meet CLI commands first call the Gateway-owned Meet runtime and start a local runtime only when the Gateway is genuinely unavailable. The PR also adjusts a supervisor test helper that determines whether child processes have exited. flowchart LR
A[Google Meet CLI command] --> B[Gateway RPC client]
B --> C[Typed Gateway result]
C --> D{Gateway unavailable?}
D -->|yes| E[Local Meet runtime]
D -->|no| F[Gateway result or actionable error]
Decision needed
Why: The fallback determines whether an existing Gateway-owned browser session is preserved or a separate local runtime starts, which is an operator-compatibility choice beyond mechanical review. Before merge
Agent review detailsSecurityNone. PR surfaceSource +8, Tests +107. Total +115 across 6 files. View PR surface stats
Review metrics
Merge-risk options
Maintainer options:
Technical reviewBest possible solution: Keep one typed fallback policy: use a local Meet runtime only when the Gateway is unambiguously absent, while retaining the Linux zombie-aware lifecycle assertion as test-only reliability coverage. Do we have a high-confidence way to reproduce the issue? No live Google Meet reproduction was run in this read-only review; yes, the owner-boundary behavior is source-reproducible through the focused typed-error cases in Is this the best way to solve the issue? Yes. The producer now records connection absence as a typed Gateway transport error and the Google Meet owner consumes that fact, avoiding the old arbitrary-message fallback while preserving its intentional coded-close policy. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against de41c7de8c6c. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (3 earlier review cycles) |
|
Addressing the rank-up moves before landing:
Proceeding to land. |
…tead of message matching Replaces the message-substring classifier in the Meet CLI's gateway-unavailable local fallback with the structural isGatewayTransportError/isGatewayClientRequestError guards (seam shared verbatim with #125458). Decision surface chosen per Meet semantics: uncoded transport closes (unreachable sockets, now incl. ETIMEDOUT/ ENETUNREACH) fall back; coded closes incl. 1006 deliberately do not, since a live gateway may still own Meet browser sessions; unknown-method fallback stays but requires a structural gateway request error. Adds ECONNRESET to GATEWAY_UNREACHABLE_SOCKET_CODES so connect-time resets wrap into the typed unreachable error instead of escaping raw.
ddf8a26 to
8bb262d
Compare
CI fix included in this PRLanding this PR uncovered an unrelated but real, CI-blocking bug: Root cause, confirmed via Docker repro of the CI environment: the production kill-tree logic is correct ( Fix (commit 27932a8, test-only, +11/-1 LOC, zero production change): on Linux, Proof:
|
|
Addressing this review's rank-up moves before landing:
Proceeding to land. |
|
Merged via squash.
|
…tead of message matching (openclaw#125495) * fix(google-meet): classify gateway CLI fallback with typed guards instead of message matching Replaces the message-substring classifier in the Meet CLI's gateway-unavailable local fallback with the structural isGatewayTransportError/isGatewayClientRequestError guards (seam shared verbatim with openclaw#125458). Decision surface chosen per Meet semantics: uncoded transport closes (unreachable sockets, now incl. ETIMEDOUT/ ENETUNREACH) fall back; coded closes incl. 1006 deliberately do not, since a live gateway may still own Meet browser sessions; unknown-method fallback stays but requires a structural gateway request error. Adds ECONNRESET to GATEWAY_UNREACHABLE_SOCKET_CODES so connect-time resets wrap into the typed unreachable error instead of escaping raw. * test(process): treat Linux zombies as terminated
What Problem This Solves
extensions/google-meet/src/cli-shared.tsclassified gateway failures for its local-runtime fallback by message substrings (ECONNREFUSED,ECONNRESET,EHOSTUNREACH,ENOTFOUND,"gateway not connected","unknown method: X") — the same fragile pattern #125458 replaces in the voice-call CLI. String matching breaks silently when error wording changes and classifies arbitrary error text that merely embeds an errno.Why This Change Was Made
The classifier now uses the typed structural guards
isGatewayTransportError/isGatewayClientRequestError, with google-meet's decision surface chosen deliberately per arm:GatewayTransportErrorkind"closed"with no WS close code. This also coversETIMEDOUT/ENETUNREACH, which the old string list missed.ECONNRESET→ fixed at the producer. It was missing fromGATEWAY_UNREACHABLE_SOCKET_CODESinsrc/gateway/call.ts, so it escaped as a raw Node error no typed guard could see. Added to the set: it now wraps into the same actionable unreachable transport error, preserving google-meet's historicalECONNRESETfallback (and restoring voice-call's once fix(voice-call): survive gateway in-process restart and stop CLI dead-ends #125458 lands).unknown method: <exact method>→ fallback kept, tightened. Must now be a structuralGatewayClientRequestError(the server replies with the sharedINVALID_REQUESTcode, so the message check itself must stay), no longer arbitrary error text."gateway not connected"race arm dropped (plain-Error race between hello and request; same accepted tradeoff as fix(voice-call): survive gateway in-process restart and stop CLI dead-ends #125458).Deliberately not migrated (different purpose, not provably behavior-preserving):
extensions/qa-lab/src/suite-runtime-gateway.ts,gateway-child-readiness.ts): retry classifiers partly consume pre-formatted strings and child-gateway log text across a process boundary, where typed guards cannot reach.src/commands/doctor-gateway-health.ts,doctor-gateway-daemon-flow.ts): the outer"gateway closed"gate deliberately tolerates wrapped/stringified errors; the innerformatGatewayClosedDiagnosticalready uses the typed guard.Overlap note: three hunks (the
isGatewayClientRequestErrorextraction insrc/gateway/call.ts, theplugin-sdk/gateway-runtimebarrel export, the +2 SDK surface-budget bumps) are intentionally verbatim-identical to open #125458 so whichever PR lands second rebases trivially.User Impact
openclaw googlemeet ...CLI fallback to the local runtime now keys off typed error structure instead of error prose. Behavior changes: unreachable-host timeouts (ETIMEDOUT/ENETUNREACH) now correctly fall back to local; connect-timeECONNRESETgets an actionable "Gateway not reachable" message everywhere instead of a raw Node error.Evidence
extensions/google-meet/src/cli-shared.gateway-fallback.test.tscovers the full decision surface through the exportedcallGoogleMeetGateway(10 cases incl. the deliberate 1006-no-fallback and the dropped string arms; the uncoded-close and dropped-arm cases fail on pre-migration code).node scripts/run-vitest.mjs extensions/google-meet— 345/345 passed.node scripts/run-vitest.mjs src/gateway/call.test.ts— passed, incl. newECONNRESETcase in the unreachable-renderingit.each.pnpm plugin-sdk:surface:check— passed at 4330/2574.node scripts/check-changed.mjs— passed.--mode uncommitted) — clean.Production LOC delta: core +~30 (guard extraction is restructuring; ECONNRESET +2), google-meet classifier net −2; the SDK surface growth (+2 exports) is the named seam shared with #125458.