Repository navigation
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 18, 2026, 12:40 AM ET / 04:40 UTC. Summary PR surface: Source +24, Tests +231. Total +255 across 3 files. Reproducibility: no. independently executed current-main reproduction was available in this read-only review, but the described failure is concretely exercised by the added real-child test: an ngrok-named child ignores SIGTERM and remains alive until forced cleanup. Review metrics: none identified. Stored data model Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Maintainer decision needed
Security Review detailsBest possible solution: Adopt one canonical ngrok lifecycle implementation that unrefs the startup watchdog, waits for actual child closure, and uses the bounded escalation helper for both normal stop and startup failure; then rebase, close, or narrow the overlapping PR accordingly. Do we have a high-confidence way to reproduce the issue? No independently executed current-main reproduction was available in this read-only review, but the described failure is concretely exercised by the added real-child test: an ngrok-named child ignores SIGTERM and remains alive until forced cleanup. Is this the best way to solve the issue? Unclear until maintainers choose one canonical timeout lifecycle: the bounded helper is a maintainable solution for the reported orphan-process behavior, but it overlaps an active implementation at #109416. AGENTS.md: unclear because the file could not be read completely. Codex review notes: model internal, reasoning high; reviewed against 4e0cc187a21c. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +24, Tests +231. Total +255 across 3 files. View PR surface stats
What 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
|
|
Merged via squash.
|
…0122) * fix(voice-call): ngrok tunnels no longer survive cleanup * fix(voice-call): document bounded ngrok shutdown * fix(voice-call): reap ngrok after startup timeout * fix(voice-call): type ngrok process with ignored stdin * fix(voice-call): compose ngrok timeout lifecycle
…0122) * fix(voice-call): ngrok tunnels no longer survive cleanup * fix(voice-call): document bounded ngrok shutdown * fix(voice-call): reap ngrok after startup timeout * fix(voice-call): type ngrok process with ignored stdin * fix(voice-call): compose ngrok timeout lifecycle
What Problem This Solves
Related: #109416
Fixes an issue where voice-call could release ngrok process ownership while the process was still running when it ignored
SIGTERM. This affected both normal runtime cleanup and the 30-second startup-timeout path, where a surviving process could keep an external tunnel active after stop completed or startup failed.Why This Change Was Made
A module-local ngrok termination helper now waits two seconds for graceful termination, escalates to
SIGKILL, and waits for the childcloseevent. A final one-second fallback keeps ownership release bounded even if close is never observable. Both successful stop and startup timeout use the helper. To compose with #109416, the startup watchdog is also unref'ed, while startup settlement remains distinct from actual child closure so a timed-out live process is still reaped. The change adds no configuration or API surface.User Impact
Voice-call no longer leaves a SIGTERM-resistant ngrok tunnel behind after either runtime shutdown or startup failure. Both paths retain finite upper bounds, so an unresponsive child cannot make cleanup wait forever.
Evidence
ngrokignoredSIGTERM; the oldstop()returned with its PID still alive, and the old startup-timeout path rejected with its PID still alive one second later.startTunnelspawned a real ngrok-named child; the child was alive before cleanup, recordedSIGTERM, and was dead whenstop()returned after about 2.0 seconds.SIGTERM, and was dead beforestartTunnelrejected after about 32.0 seconds.pnpm exec vitest run --config test/vitest/vitest.extension-voice-call.config.ts extensions/voice-call/src/tunnel.test.ts extensions/voice-call/src/tunnel.process.test.ts— 2 files passed, 22 tests passed.pnpm exec oxlint extensions/voice-call/src/tunnel.ts extensions/voice-call/src/tunnel.test.ts extensions/voice-call/src/tunnel.process.test.ts— passed.pnpm exec oxfmt --check extensions/voice-call/src/tunnel.ts extensions/voice-call/src/tunnel.test.ts extensions/voice-call/src/tunnel.process.test.ts— passed.SIGTERM, escalates toSIGKILL, and waits for process closure before rejecting.