Skip to content

fix(google-meet): handle stdout/stderr stream errors in node host#102105

Merged
steipete merged 1 commit into
openclaw:mainfrom
wangmiao0668000666:fix/google-meet-node-host-stream-errors
Jul 9, 2026
Merged

fix(google-meet): handle stdout/stderr stream errors in node host#102105
steipete merged 1 commit into
openclaw:mainfrom
wangmiao0668000666:fix/google-meet-node-host-stream-errors

Conversation

@wangmiao0668000666

@wangmiao0668000666 wangmiao0668000666 commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

What Problem This Solves

The Google Meet node-host command pair handled child-process failures but left the input stdout/stderr and output stderr streams without error listeners. A stream failure could therefore escape the bridge lifecycle as an unhandled EventEmitter error, while a burst of related process and stream failures could schedule child termination repeatedly.

Why This Change Was Made

The node-host now routes every piped stream failure through one idempotent session stop path. Output handlers share a current-process guard so a replaced playback process cannot close the active bridge; input and output children are terminated only on the first failure.

The original four-commit implementation and its test-only production exports were replaced with a smaller refactor and a regression in the existing public node-host command suite.

User Impact

Google Meet Chrome-node audio sessions now close cleanly when their local audio command pipes fail instead of risking a gateway crash or duplicated termination timers. Normal bridge start, output clearing, and stop behavior is unchanged.

Evidence

  • node scripts/run-vitest.mjs extensions/google-meet/node-host.test.ts --reporter=verbose on Linux Testbox: 1 file, 6 tests passed.
  • Touched-surface pnpm check:changed on Linux Testbox: extension production/test types, lint, import cycles, and repository guards passed.
  • Fresh structured autoreview: clean, no accepted or actionable findings.
  • git diff --check: passed.

Real behavior proof

The public handleGoogleMeetNodeHostCommand test starts the command-pair lifecycle, emits output-stderr and input-stdout/input-stderr errors in one teardown burst, then verifies the bridge is closed and each child receives exactly one SIGTERM. Removing any new listener makes the corresponding EventEmitter error unhandled; removing the idempotent stop guard makes the termination-count assertion fail.

Known proof gap

The regression uses the existing child-process mock to deterministically force all three stream errors. It does not join a live Google Meet call or depend on BlackHole/audio hardware.

@clawsweeper

clawsweeper Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed July 9, 2026, 12:54 AM ET / 04:54 UTC.

Summary
The PR adds Google Meet node-host stdout/stderr stream error listeners, makes session teardown run once, and adds a regression test for grouped stream failures.

PR surface: Source -1, Tests +42. Total +41 across 2 files.

Reproducibility: yes. at source level: current main leaves piped child streams without matching error listeners, and Node 24 throws on an unhandled error event. I did not run a live Google Meet chrome-node crash repro in this read-only review.

Review metrics: none identified.

Stored data model
Persistent data-model change detected: serialized state: extensions/google-meet/node-host.test.ts. Confirm migration or upgrade compatibility proof before merge.

Root-cause cluster
Relationship: canonical
Canonical: #102105
Summary: This PR is the canonical open Google Meet node-host stream-error fix; related items are sibling stream-error campaign work or adjacent Google Meet chrome-node work, not duplicates for this exact surface.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge readiness
Overall: 🦪 silver shellfish
Proof: 🦪 silver shellfish
Patch quality: 🐚 platinum hermit
Result: blocked until real behavior proof from a real setup is added.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • [P1] Add redacted terminal/log proof from a real spawned node-host command pair or a live chrome-node run on the current head; updating the PR body should trigger a fresh ClawSweeper review.

Proof guidance:

  • [P1] Needs real behavior proof before merge: The current PR body and test proof use a mocked child_process path rather than a real spawned command pair or live chrome-node run, so current-head proof is mock-only. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Risk before merge

  • [P1] Current-head proof is mock-only, so merging without real node-host or real child-process proof would bypass the external PR real-behavior gate unless a maintainer explicitly overrides it.
  • [P1] The branch is behind origin/main; exact merge-ref checks should remain the landing gate even though the inspected current-main drift does not touch the Google Meet files.

Maintainer options:

  1. Decide the mitigation before merge
    Keep the focused plugin-owned stream-error hardening, add current-head real child-process or live chrome-node proof, then land after exact merge-ref checks pass.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Next step before merge

  • [P1] No repair lane is needed because no narrow code defect remains; the blocker is current-head real behavior proof or maintainer proof override.

Security
Cleared: The diff only adds listeners and tests around existing Google Meet child-process streams; it adds no dependencies, workflows, permissions, package-resolution changes, or secrets handling.

Review details

Best possible solution:

Keep the focused plugin-owned stream-error hardening, add current-head real child-process or live chrome-node proof, then land after exact merge-ref checks pass.

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

Yes at source level: current main leaves piped child streams without matching error listeners, and Node 24 throws on an unhandled error event. I did not run a live Google Meet chrome-node crash repro in this read-only review.

Is this the best way to solve the issue?

Yes for the code shape: the PR fixes the issue at the Google Meet plugin child-process boundary and matches the merged realtime bridge pattern. It is not merge-ready until current-head real behavior proof is added or overridden.

AGENTS.md: found and applied where relevant.

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

Label changes

Label changes:

  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🐚 platinum hermit.
  • add status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The current PR body and test proof use a mocked child_process path rather than a real spawned command pair or live chrome-node run, so current-head proof is mock-only. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
  • remove proof: sufficient: Current real behavior proof status is mock_only, not sufficient.
  • remove rating: 🐚 platinum hermit: Current PR rating is rating: 🦪 silver shellfish, so this older rating label is no longer current.
  • remove status: 👀 ready for maintainer look: Current PR status label is status: 📣 needs proof.

Label justifications:

  • P2: This is a focused Google Meet plugin crash-hardening bug fix with limited blast radius.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🐚 platinum hermit.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The current PR body and test proof use a mocked child_process path rather than a real spawned command pair or live chrome-node run, so current-head proof is mock-only. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed

PR surface:

Source -1, Tests +42. Total +41 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 1 18 19 -1
Tests 1 44 2 +42
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 62 21 +41

What I checked:

  • Repository policy applied: Root AGENTS.md and extensions/AGENTS.md were read fully; the extension boundary and deep-review rules apply because this changes bundled plugin runtime code. (AGENTS.md:1, d6ec1c6ceab3)
  • Current main still has the gap: Current main starts output stderr and input stdout/stderr pipes but only handles child events and output stdin errors in the node-host bridge. (extensions/google-meet/src/node-host.ts:120, d6ec1c6ceab3)
  • PR head implements the focused fix: The PR head adds output stderr and input stdout/stderr error handlers and guards stopSession so grouped process/stream errors terminate children once. (extensions/google-meet/src/node-host.ts:109, 5903b9fb234a)
  • Current proof is mock-only: The added regression uses vi.mock for node:child_process and emits errors on mock EventEmitters, which is useful coverage but not real behavior proof for an external PR. (extensions/google-meet/node-host.test.ts:18, 5903b9fb234a)
  • Sibling pattern supports the fix boundary: The merged Google Meet realtime bridge handles the same input/output stream error class at the plugin-owned child-process boundary. (extensions/google-meet/src/realtime.ts:912, d6ec1c6ceab3)
  • Node error-event contract checked: A Node 24 EventEmitter with an emitted error and no listener exits with an unhandled error, matching the failure class this PR contains.

Likely related people:

  • shakkernerd: Current-main blame for the node-host session lifecycle points at Shakker's 43bcd9a commit in this checkout. (role: current-main node-host surface contributor; confidence: medium; commits: 43bcd9ab3eee; files: extensions/google-meet/src/node-host.ts, extensions/google-meet/node-host.test.ts)
  • vincentkoc: Local history shows Vincent Koc carrying the Google Meet node-host files in the latest release-tagged history available in this checkout, and the live PR is assigned to vincentkoc. (role: recent area contributor; confidence: medium; commits: e085fa1a3ffd; files: extensions/google-meet/src/node-host.ts, extensions/google-meet/node-host.test.ts)
  • Alix-007: Alix-007 authored the merged Google Meet realtime stream-error fix that provides the closest same-plugin pattern for this node-host repair. (role: sibling stream-error contributor; confidence: high; commits: 5fd5bf2aee1b; files: extensions/google-meet/src/realtime.ts, extensions/google-meet/index.test.ts)
  • joshavant: Josh Avant authored the merged chrome-node launch configuration PR that recently touched node-host code and tests, though for a different concern. (role: adjacent chrome-node contributor; confidence: medium; commits: 448b7c75b669; files: extensions/google-meet/src/node-host.ts, extensions/google-meet/node-host.test.ts)
  • steipete: The live PR is assigned to steipete, and the current reviewed head commit is authored by Peter Steinberger with the contributor co-authored. (role: assigned reviewer and current branch committer; confidence: medium; commits: 5903b9fb234a; files: extensions/google-meet/src/node-host.ts, extensions/google-meet/node-host.test.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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
  • 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.
Review history (9 earlier review cycles; latest 8 shown)
  • reviewed 2026-07-08T07:56:59.884Z sha 3771b25 :: needs real behavior proof before merge. :: [P1] Guard the real output stderr pipe
  • reviewed 2026-07-08T08:17:48.699Z sha 63be154 :: needs maintainer review before merge. :: none
  • reviewed 2026-07-08T08:23:48.943Z sha 63be154 :: needs maintainer review before merge. :: none
  • reviewed 2026-07-09T01:40:31.814Z sha e866bca :: needs maintainer review before merge. :: none
  • reviewed 2026-07-09T01:51:19.811Z sha e866bca :: needs changes before merge. :: [P1] Remove the nonexistent input stdin guard
  • reviewed 2026-07-09T02:16:18.417Z sha 8de7545 :: needs maintainer review before merge. :: none
  • reviewed 2026-07-09T02:22:42.243Z sha 8de7545 :: needs maintainer review before merge. :: none
  • reviewed 2026-07-09T03:15:58.913Z sha 8de7545 :: needs maintainer review before merge. :: none

@vincentkoc vincentkoc self-assigned this Jul 8, 2026
@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal backlog priority with limited blast radius. labels Jul 8, 2026
@wangmiao0668000666

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. 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: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Jul 8, 2026
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. 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 Jul 9, 2026
@wangmiao0668000666

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Fixed the round-2 P1: removed the nonexistent inputProcess.stdin listener. 8de7545.

  • node-host.ts:196 deleted (was )
  • inputProcess is spawned with , so stdin is typed
  • input stdout/stderr pipes remain guarded via the adjacent listeners + attachOutputProcessHandlers

Verified locally on the PR head:

  • pnpm tsgo:extensions → exit 0
  • node scripts/run-vitest.mjs extensions/google-meet/src/node-host.test.ts → 4/4 pass

🤖 Generated with Claude Code

@clawsweeper

clawsweeper Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

@wangmiao0668000666

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Fixed the round-2 P1: removed the nonexistent inputProcess.stdin listener. 8de7545.

  • node-host.ts:196 deleted (was the inputProcess.stdin optional listener)
  • inputProcess is spawned with stdio ignore/pipe/pipe, so stdin is typed never
  • input stdout/stderr pipes remain guarded via the adjacent listeners + attachOutputProcessHandlers

Verified locally on the PR head:

  • pnpm tsgo:extensions → exit 0
  • node scripts/run-vitest.mjs extensions/google-meet/src/node-host.test.ts → 4/4 pass

🤖 Generated with Claude Code

@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. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Jul 9, 2026
@steipete steipete self-assigned this Jul 9, 2026
@steipete
steipete force-pushed the fix/google-meet-node-host-stream-errors branch from 8de7545 to 5903b9f Compare July 9, 2026 04:49
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed proof: sufficient ClawSweeper judged the real behavior proof convincing. 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 Jul 9, 2026
@steipete

steipete commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Land-ready maintainer pass complete on exact head 5903b9fb234a9fb44f569794b7c92e74ecbce9a7.

What changed:

  • rewrote the four-commit patch as one focused commit with contributor co-author credit;
  • made node-host session teardown idempotent so a process/stream error burst schedules one termination sequence;
  • covered input stdout/stderr and output stderr errors while retaining the current-output guard used by clearAudio;
  • removed the test-only production export and 198-line duplicate test harness; regression now uses the existing public node-host command suite.

Proof:

Known gap: the failure burst is forced through deterministic child-process mocks; this does not join a live Google Meet call or require BlackHole/audio hardware.

@steipete
steipete merged commit 624dfa6 into openclaw:main Jul 9, 2026
131 of 143 checks passed
@steipete

steipete commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Merged via squash.

@wangmiao0668000666

Copy link
Copy Markdown
Contributor Author

Thanks @steipete for the fast merge — and for catching the missing stdin error listener path in the r2 review.

The stream-error campaign in extensions/google-meet/ now has full coverage across the three audio-bridge sites in this extension (the realtime audio bridge from #101596, the node-host command pair from this PR, plus the QA gateway child stream-error handler in #102104 and the codex CLI resume stream error in #102127). Happy to keep extending the campaign wherever you point me next.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 9, 2026
wheakerd pushed a commit to wheakerd/clawdbot that referenced this pull request Jul 15, 2026
Co-authored-by: Peter Steinberger <[email protected]>
(cherry picked from commit 624dfa6)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Normal backlog priority with limited blast radius. plugin: google-meet rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. size: S status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants