Skip to content

fix(voice-call): survive gateway in-process restart and stop CLI dead-ends - #125458

Merged
steipete merged 3 commits into
mainfrom
steipete/zen-aryabhata-e5226f
Aug 18, 2026
Merged

steipete merged 3 commits into
mainfrom
steipete/zen-aryabhata-e5226f

Conversation

@steipete

@steipete steipete commented Aug 17, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

On a gateway host with the voice-call plugin enabled, openclaw voicecall operational commands dead-ended after the Gateway went through an in-process restart (SIGUSR1, triggered by any restart-class config change such as editing gateway.auth.token):

  • every voicecall.* RPC permanently answered UNAVAILABLE "Voice call runtime generation is retired; use the current plugin registration", the runtime/webhook never restarted, and the failure was completely silent (no log line, no health signal);
  • the CLI surfaced that internal error verbatim as a dead end, and on transport-level failures (e.g. the restart's listener gap) voicecall call/smoke fell back to a standalone runtime that died with raw listen EADDRINUSE: address already in use 127.0.0.1:3334 when the Gateway still held the webhook port.

The reported "voicecall status --json hangs indefinitely" is the same fallback on builds before #125354 (status started the full telephony runtime and the one-shot CLI process never exited); that specific hang is already fixed on main, and the RPC transport itself always settles within its 5s wrapper timer.

Why This Change Was Made

Root cause: the in-process restart reuses the cached plugin registry and bypasses register() (src/plugins/loader-runtime-load.ts:97), so service.stop/service.start run on the same retained voice-call registration. The generation fencing from #120289 was designed to fence stale retained closures, but it treated this legitimate host stop→start sequence as a stale actor: stop retired the generation forever, and the next start swallowed the lifecycle error with a bare return — the worst bug class (silent failure). A plain plugin-config hot reload re-registers and was never affected.

Fixes, at their owners:

  • extensions/voice-call/index.ts — registrations now carry a replaceable generation: service start after stop mints a fresh generation; start takes over a running slot owned by a retired predecessor (covers the still-bound-webhook variant); start failures report to service health and log instead of silently returning. The fix(voice-call): prevent stale runtimes after gateway restart #120289 stale-closure fencing is preserved (all prior lifecycle tests unchanged and green). Net −1 line in the lifecycle owner.
  • extensions/voice-call/src/cli.ts — gateway failures are classified with typed guards instead of message substrings. Standalone/store fallback only when the gateway is genuinely absent (transport closed with no close code, or 1006). Reachable-but-failed (request errors incl. UNAVAILABLE, credentials, timeout) exits non-zero with actionable text pointing at openclaw gateway status. A standalone webhook port collision (EADDRINUSE, detected via code) explains that a running Gateway probably owns the port.
  • src/plugin-sdk/gateway-runtime.ts / src/gateway/call.ts — exports structural isGatewayTransportError / isGatewayClientRequestError guards (the request-error formatter is refactored around the new guard, behavior-preserving). +2 documented plugin-SDK surface budget.
  • Setup-incomplete provider config now reports degraded service health (error + serviceHealth.reportFailure) instead of a warn-only log; default installs (mock provider) are unaffected.

User Impact

Operational voicecall commands keep working across gateway config reloads/restarts. When something is genuinely wrong, operators get a next step instead of an internal lifecycle error, a hang, or a raw EADDRINUSE stack.

Evidence

Live repro + verification on an isolated dev gateway (OPENCLAW_STATE_DIR scratch, token auth, mock provider):

  • Pre-fix wedge (deterministic): edit gateway.auth.token → [reload] … restarting gateway now → [gateway] restart mode: in-process restart → no Webhook server listening/Runtime initialized afterwards, port unbound, and [ws] ⇄ res ✗ voicecall.status 0ms errorCode=UNAVAILABLE errorMessage=Voice call runtime generation is retired… on every call.
  • Post-fix, same sequence: 16:42:08 restarting gateway now → 16:42:10 Webhook server listening … / Runtime initialized; voicecall status --json and voicecall call route via WS (res ✓ voicecall.initiate 140ms).
  • Post-fix CLI dead-ends: wrong token → Gateway responded but voicecall failed: unauthorized: gateway token mismatch … check openclaw gateway status``; absent gateway + held webhook port → Voice-call webhook port 3435 is already in use. A running Gateway probably already serves it….
  • Tests: node scripts/run-vitest.mjs extensions/voice-call → 61 files / 654 tests green; new same-registration restart + retired-owner takeover lifecycle regressions fail pre-fix with the wedge error; src/gateway/gateway-cli-plugin-routing.test.ts (real gateway server, token auth, real callGatewayFromCli, wrong-token typed assertion) green; node scripts/check-changed.mjs -- <touched files> exit 0; pnpm plugin-sdk:surface:check green; pnpm build green.
  • Autoreview (Codex, gpt-5.6-sol high): clean — "No P0 defects are demonstrated" (0.96).
  • LOC: production +67 (+55 of it operator-facing diagnostic text in the CLI, +12 SDK guard; lifecycle owner −1), tests +204, docs +8, tooling +2.

Follow-up commit: CLI refactor (behavior-frozen)

4d9e84c collapses the four duplicated gateway-or-runtime command blocks into one generic runGatewayManagerCommand helper (the continue command owns its legacy-method fallback + operation polling via a gatewayCall closure; no per-command policy inside the helper), lets smoke reuse the shared initiateVoiceCall path, and splits the 988-line cli.ts into concept modules (cli-gateway-call.ts, cli-call-log.ts, cli-command-io.ts) — deleting the grandfathered max-lines suppression plus the now-stale max-lines/assertion-safety baseline entries (shrink-only ratchet maintenance). stdout/exit semantics unchanged; net −2 production LOC; 654 extension tests + check-changed + pnpm build (no INEFFECTIVE_DYNAMIC_IMPORT) green; fresh Codex autoreview clean (0.99).

ClawSweeper findings response (head bcb7035)

  • [P1] Redact gateway transport diagnostics — FIXED: gatewayOperationalError now redacts the composed operator-visible text once via the canonical redactSensitiveUrlLikeString (newly exported through openclaw/plugin-sdk/gateway-runtime, +1 documented surface budget). This covers the interpolated URL, URLs embedded in formatErrorMessage output, and remote-controlled close-reason text. Regression test asserts a wss://user:secret@host?token=... URL prints as wss://***:***@host with no secret or token in the message.
  • [P2] Fallback-behavior upgrade coverage: already locked by the typed-classification CLI tests (reachable request error / credentials error / timeout never enter the standalone runtime; transport-absent and 1006 still fall back).
  • [P1] Net production growth: +67 (now +~75 with redaction) is concentrated in operator-facing diagnostic text and the two SDK guards + redactor export; the lifecycle owner itself is net −1 and the follow-up refactor commit is net −2. Dead-end removal is product behavior per the Product Doctrine; no absorbing refactor eliminates the diagnostic text.
  • Stored data model note: false positive — cli-command-io.ts and cli-call-log.ts are CLI output/log-follow modules; no persisted data model changed.

@clawsweeper

clawsweeper Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@steipete
steipete marked this pull request as ready for review August 17, 2026 23:47
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation channel: voice-call Channel integration: voice-call gateway Gateway runtime scripts Repository scripts size: L maintainer Maintainer-authored PR labels Aug 17, 2026
@clawsweeper clawsweeper Bot added merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P1 High-priority user-facing bug, regression, or broken workflow. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 17, 2026
@clawsweeper

clawsweeper Bot commented Aug 17, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: found issues before merge. Reviewed August 17, 2026, 9:55 PM ET / August 18, 2026, 01:55 UTC.

ClawSweeper review

What this changes

The PR hardens Voice Call runtime ownership across Gateway restarts and replaces CLI Gateway-error string matching with typed error handling.

Regression provenance

Possible regression — probable (reproduction; reviewed change). No predecessor PR is attributed.

Merge readiness

⚠️ Needs maintainer review before merge - 4 items remain

Keep open: the lifecycle repair is coherent, but the new typed Gateway-error classifier drops Voice Call’s existing ECONNRESET local fallback.

Priority: P1
Reviewed head: 7e29c32da51756ce07a0bd3af7efb40b24223de9

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Strong after-fix lifecycle evidence is outweighed by one source-proven P1 regression in the new Gateway-fallback classifier.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): The PR body records an after-fix isolated Gateway-restart exercise with token-authenticated command routing, webhook reinitialization, and observed recovery.
Patch quality 🦐 gold shrimp (3/6) 1 actionable review finding remain.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): The PR body records an after-fix isolated Gateway-restart exercise with token-authenticated command routing, webhook reinitialization, and observed recovery.
Evidence reviewed 4 items Fallback regression: Current main explicitly treated connect-time ECONNRESET as an unavailable Gateway for Voice Call local fallback; the branch accepts only typed transport errors, but the shared producer does not normalize ECONNRESET.
Lifecycle owner boundary: The branch’s generation coordinator protects Voice Call runtime registration, start, and cleanup across reloads; focused lifecycle tests cover delayed generations and retired cleanup.
Related canonical repair: Open PR #125495 independently identifies the missing producer-side ECONNRESET classification and proposes the same shared repair.
Findings 1 actionable finding [P1] Preserve ECONNRESET local fallback
Security None None.

How this fits together

Voice Call CLI commands first contact the running Gateway, then may use a local telephony runtime when the Gateway is unavailable. Gateway error normalization drives that fallback, while the plugin generation coordinator owns runtimes during reloads.

flowchart LR
  A[Voice Call CLI command] --> B[Gateway client call]
  B --> C[Gateway error normalization]
  C --> D{Gateway unavailable?}
  D -->|yes| E[Local Voice Call runtime]
  D -->|no| F[Visible CLI diagnostic]
  G[Gateway reload] --> H[Plugin generation coordinator]
  H --> E
Loading

Before merge

  • Preserve ECONNRESET local fallback (P1) - Current main treats a connect-time ECONNRESET as an unavailable Gateway and uses the local Voice Call runtime. This classifier accepts only GatewayTransportError, but the shared producer does not wrap ECONNRESET, so it remains a raw Error and the command now exits instead of falling back. Classify ECONNRESET in src/gateway/call.ts and cover the Voice Call path.
  • Resolve merge risk (P2) - A connect-time ECONNRESET would no longer use the existing local Voice Call fallback, leaving mutating CLI operations unavailable despite a recoverable Gateway failure.
  • Resolve merge risk (P2) - Refresh exact-head checks after the fallback repair; supplied status data still showed checks in progress.
  • Complete next step (P2) - Port or rebase onto the shared ECONNRESET producer repair already represented by open PR fix(google-meet): classify gateway CLI fallback with typed guards instead of message matching #125495, then rerun focused and exact-head validation.

Findings

  • [P1] Preserve ECONNRESET local fallback — extensions/voice-call/src/cli-gateway-call.ts:40-45
Agent review details

Security

None.

PR surface

Source +67, Tests +237, Docs +8, Other +2. Total +314 across 15 files.

View PR surface stats
Area Files Added Removed Net
Source 7 746 679 +67
Tests 4 266 29 +237
Docs 1 9 1 +8
Config 0 0 0 0
Generated 0 0 0 0
Other 3 6 4 +2
Total 15 1027 713 +314

Review metrics

Metric Value Why it matters
Production and test delta production +67, tests +237, docs +8, tooling/baselines +2 The substantial lifecycle and error-handling addition has focused coverage, but the remaining fallback regression must be repaired before merge.

Stored data model

Persistent data-model change detected: serialized state: extensions/voice-call/src/cli-command-io.ts, vector/embedding metadata: extensions/voice-call/src/cli-call-log.ts. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Restore producer-side ECONNRESET classification (recommended)
    Add ECONNRESET to shared unreachable Gateway transport classification, cover the Voice Call fallback, and refresh exact-head validation.

Technical review

Best possible solution:

Normalize ECONNRESET at the shared Gateway error producer so typed CLI fallbacks retain their intended recovery behavior.

Do we have a high-confidence way to reproduce the issue?

Yes—source inspection shows current main falls back on connect-time ECONNRESET, while this branch accepts only typed errors that the shared producer does not create for ECONNRESET.

Is this the best way to solve the issue?

No—the generation-coordinator repair is coherent, but the new classifier is incomplete until shared producer normalization covers ECONNRESET.

Full review comments:

  • [P1] Preserve ECONNRESET local fallback — extensions/voice-call/src/cli-gateway-call.ts:40-45
    Current main treats a connect-time ECONNRESET as an unavailable Gateway and uses the local Voice Call runtime. This classifier accepts only GatewayTransportError, but the shared producer does not wrap ECONNRESET, so it remains a raw Error and the command now exits instead of falling back. Classify ECONNRESET in src/gateway/call.ts and cover the Voice Call path.
    Confidence: 0.98

Overall correctness: patch is incorrect
Overall confidence: 0.93

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against b5b17c654b2d.

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient. The PR body records an after-fix isolated Gateway-restart exercise with token-authenticated command routing, webhook reinitialization, and observed recovery.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦞 diamond lobster and patch quality is 🦐 gold shrimp.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Sufficient (live_output): The PR body records an after-fix isolated Gateway-restart exercise with token-authenticated command routing, webhook reinitialization, and observed recovery.
  • remove rating: 🐚 platinum hermit: Current PR rating is rating: 🦐 gold shrimp, so this older rating label is no longer current.
  • remove status: 👀 ready for maintainer look: Current PR status label is status: ⏳ waiting on author.

Label justifications:

  • P1: The new CLI classifier regresses an existing recovery path for real Voice Call operations after a network reset.
  • merge-risk: 🚨 compatibility: Existing Voice Call CLI behavior falls back locally on ECONNRESET, but the typed-only classifier no longer recognizes that raw error.
  • merge-risk: 🚨 availability: The dropped fallback can make Voice Call CLI operations fail when the Gateway connection resets before becoming usable.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦞 diamond lobster and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Sufficient (live_output): The PR body records an after-fix isolated Gateway-restart exercise with token-authenticated command routing, webhook reinitialization, and observed recovery.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body records an after-fix isolated Gateway-restart exercise with token-authenticated command routing, webhook reinitialization, and observed recovery.

Evidence

Acceptance criteria:

What I checked:

Likely related people:

  • steipete: Authored merged Voice Call lifecycle work and recent related Gateway-error changes. (role: recent area contributor; confidence: high; commits: 32361e749ae4; files: extensions/voice-call/index.ts, extensions/voice-call/src/cli-gateway-call.ts, src/gateway/call.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Normalize ECONNRESET in the shared Gateway error producer and add a Voice Call fallback regression.
  • Re-run focused tests and refresh exact-head checks after the repair.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
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.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (3 earlier review cycles)
  • reviewed 2026-08-17T23:54:58.657Z sha 7c375e5 :: found issues before merge. :: [P1] Redact Gateway URLs before formatting errors
  • reviewed 2026-08-18T00:54:11.932Z sha 4d9e84c08adc4d59f57d71ffb2154befaf885fa1 :: needs changes before merge. :: [P1] Redact Gateway transport diagnostics before rethrowing
  • reviewed 2026-08-18T01:29:39.858Z sha bcb70355dcd218e736d42c308f102d8266025867 :: needs maintainer review before merge. :: none

@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Aug 18, 2026
…-ends

The gateway's in-process restart (SIGUSR1 config reload) reuses the cached
plugin registry, so service stop/start run on the same retained voice-call
registration. Generation fencing from #120289 treated that restart as a stale
actor: stop retired the generation forever, the next start silently bailed,
and every voicecall.* RPC answered UNAVAILABLE "runtime generation is
retired" while the webhook never rebound.

- Registrations now hold a replaceable generation: service start after stop
  mints a fresh generation, takes over a running slot owned by a retired
  predecessor, and reports start failures to service health instead of
  silently returning.
- The voicecall CLI classifies gateway failures with typed guards instead of
  message substrings: standalone/store fallback only when the gateway is
  genuinely absent; reachable-but-failed (request errors, auth, timeout)
  exits with actionable text; a standalone webhook port collision explains
  that a running Gateway probably owns the port instead of raw EADDRINUSE.
- Plugin SDK gateway-runtime exports structural isGatewayTransportError /
  isGatewayClientRequestError guards (+2 documented surface budget).
- Regression coverage: same-registration stop/start restart, retired-owner
  takeover, typed CLI fallback classification, and a real token-auth gateway
  server routing voicecall.status through callGatewayFromCli.
Collapse the four duplicated gateway-or-runtime command blocks (speak, dtmf,
end, continue fallback) into one generic runGatewayManagerCommand helper —
the continue command owns its legacy-method fallback and operation polling
via a gatewayCall closure, so the helper carries no per-command policy.
Smoke reuses the shared initiateVoiceCall path instead of a bespoke
fallback.

Split the 988-line cli.ts into concept modules (cli-gateway-call,
cli-call-log, cli-command-io) and drop its grandfathered max-lines
suppression plus the now-stale max-lines and assertion-safety baseline
entries (shrink-only ratchet maintenance).

Behavior-frozen: stdout/exit semantics unchanged; net -2 production LOC.
ClawSweeper P1: the operational-error formatter interpolated the raw
connectionDetails.url, so a configured gateway URL with userinfo or query
tokens would print credentials into terminal output. Redact the composed
message once with the canonical net-policy redactor (also covers
remote-controlled close-reason text), exported through the plugin SDK
gateway-runtime subpath (+1 documented surface budget). Regression test
covers a credential-bearing URL in both the URL and message fields.
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 18, 2026
@openclaw-barnacle openclaw-barnacle Bot reopened this Aug 18, 2026
@steipete
steipete force-pushed the steipete/zen-aryabhata-e5226f branch from bcb7035 to 7e29c32 Compare August 18, 2026 01:46
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Aug 18, 2026
@steipete
steipete merged commit 75fcaba into main Aug 18, 2026
220 checks passed
@steipete
steipete deleted the steipete/zen-aryabhata-e5226f branch August 18, 2026 01:59
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

steipete added a commit that referenced this pull request Aug 18, 2026
…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.
steipete added a commit that referenced this pull request Aug 18, 2026
…tead of message matching (#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 #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
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 18, 2026
…-ends (openclaw#125458)

* fix(voice-call): survive gateway in-process restart and stop CLI dead-ends

The gateway's in-process restart (SIGUSR1 config reload) reuses the cached
plugin registry, so service stop/start run on the same retained voice-call
registration. Generation fencing from openclaw#120289 treated that restart as a stale
actor: stop retired the generation forever, the next start silently bailed,
and every voicecall.* RPC answered UNAVAILABLE "runtime generation is
retired" while the webhook never rebound.

- Registrations now hold a replaceable generation: service start after stop
  mints a fresh generation, takes over a running slot owned by a retired
  predecessor, and reports start failures to service health instead of
  silently returning.
- The voicecall CLI classifies gateway failures with typed guards instead of
  message substrings: standalone/store fallback only when the gateway is
  genuinely absent; reachable-but-failed (request errors, auth, timeout)
  exits with actionable text; a standalone webhook port collision explains
  that a running Gateway probably owns the port instead of raw EADDRINUSE.
- Plugin SDK gateway-runtime exports structural isGatewayTransportError /
  isGatewayClientRequestError guards (+2 documented surface budget).
- Regression coverage: same-registration stop/start restart, retired-owner
  takeover, typed CLI fallback classification, and a real token-auth gateway
  server routing voicecall.status through callGatewayFromCli.

* refactor(voice-call): split CLI modules and dedupe gateway fallbacks

Collapse the four duplicated gateway-or-runtime command blocks (speak, dtmf,
end, continue fallback) into one generic runGatewayManagerCommand helper —
the continue command owns its legacy-method fallback and operation polling
via a gatewayCall closure, so the helper carries no per-command policy.
Smoke reuses the shared initiateVoiceCall path instead of a bespoke
fallback.

Split the 988-line cli.ts into concept modules (cli-gateway-call,
cli-call-log, cli-command-io) and drop its grandfathered max-lines
suppression plus the now-stale max-lines and assertion-safety baseline
entries (shrink-only ratchet maintenance).

Behavior-frozen: stdout/exit semantics unchanged; net -2 production LOC.

* fix(voice-call): redact gateway URLs in CLI operational errors

ClawSweeper P1: the operational-error formatter interpolated the raw
connectionDetails.url, so a configured gateway URL with userinfo or query
tokens would print credentials into terminal output. Redact the composed
message once with the canonical net-policy redactor (also covers
remote-controlled close-reason text), exported through the plugin SDK
gateway-runtime subpath (+1 documented surface budget). Regression test
covers a credential-bearing URL in both the URL and message fields.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 18, 2026
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: voice-call Channel integration: voice-call docs Improvements or additions to documentation gateway Gateway runtime maintainer Maintainer-authored PR merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P1 High-priority user-facing bug, regression, or broken workflow. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. scripts Repository scripts size: XL status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant