Fix Google Meet realtime interruption playback#72524
Conversation
Greptile SummaryThis PR fixes Google Meet realtime interruption playback by implementing Confidence Score: 4/5Safe to merge; one inconsistency in the error-handler guard that is unlikely to trigger in practice. One P2/P1 finding: the extensions/google-meet/src/realtime.ts — specifically the Prompt To Fix All With AIThis is a comment left during a code review.
Path: extensions/google-meet/src/realtime.ts
Line: 133-134
Comment:
**`error` handler missing stale-process guard**
The `exit` handler correctly skips teardown when `proc !== outputProcess` (i.e. the process is a previously-cleared one), but the `error` handler calls `fail()` unconditionally. If a just-killed `previousOutput` ever emits an `error` event after `clearOutputPlayback` replaces it, the whole session would be torn down. The parallel implementation in `node-host.ts` applies the same identity check to both `exit` and `error`.
```suggestion
const attachOutputProcessHandlers = (proc: BridgeProcess) => {
proc.on("error", (error) => {
if (proc !== outputProcess) {
return;
}
fail("audio output command")(error);
});
```
How can I resolve this? If you propose a fix, please make it concise.Reviews (1): Last reviewed commit: "Fix Google Meet realtime interruption pl..." | Re-trigger Greptile |
| proc.on("error", fail("audio output command")); | ||
| proc.on("exit", (code, signal) => { |
There was a problem hiding this comment.
error handler missing stale-process guard
The exit handler correctly skips teardown when proc !== outputProcess (i.e. the process is a previously-cleared one), but the error handler calls fail() unconditionally. If a just-killed previousOutput ever emits an error event after clearOutputPlayback replaces it, the whole session would be torn down. The parallel implementation in node-host.ts applies the same identity check to both exit and error.
| proc.on("error", fail("audio output command")); | |
| proc.on("exit", (code, signal) => { | |
| const attachOutputProcessHandlers = (proc: BridgeProcess) => { | |
| proc.on("error", (error) => { | |
| if (proc !== outputProcess) { | |
| return; | |
| } | |
| fail("audio output command")(error); | |
| }); |
Prompt To Fix With AI
This is a comment left during a code review.
Path: extensions/google-meet/src/realtime.ts
Line: 133-134
Comment:
**`error` handler missing stale-process guard**
The `exit` handler correctly skips teardown when `proc !== outputProcess` (i.e. the process is a previously-cleared one), but the `error` handler calls `fail()` unconditionally. If a just-killed `previousOutput` ever emits an `error` event after `clearOutputPlayback` replaces it, the whole session would be torn down. The parallel implementation in `node-host.ts` applies the same identity check to both `exit` and `error`.
```suggestion
const attachOutputProcessHandlers = (proc: BridgeProcess) => {
proc.on("error", (error) => {
if (proc !== outputProcess) {
return;
}
fail("audio output command")(error);
});
```
How can I resolve this? If you propose a fix, please make it concise.b013b29 to
29f825b
Compare
|
Landed in What changed after maintainer review:
Remote proof, no local test lanes:
Thanks @BsnizND. |
Fixes openclaw#72523. Remote proof: - CI run 24980529154 passed on 29f825b. - Blacksmith Testbox tbx_01kq6tsgbaxgstxmtearwy9n4w passed focused formatting, Google Meet tests, Google realtime provider tests, and extension test typecheck. Thanks @BsnizND. Co-authored-by: BSnizND <[email protected]>
Fixes openclaw#72523. Remote proof: - CI run 24980529154 passed on 29f825b. - Blacksmith Testbox tbx_01kq6tsgbaxgstxmtearwy9n4w passed focused formatting, Google Meet tests, Google realtime provider tests, and extension test typecheck. Thanks @BsnizND. Co-authored-by: BSnizND <[email protected]>
Fixes openclaw#72523. Remote proof: - CI run 24980529154 passed on 29f825b. - Blacksmith Testbox tbx_01kq6tsgbaxgstxmtearwy9n4w passed focused formatting, Google Meet tests, Google realtime provider tests, and extension test typecheck. Thanks @BsnizND. Co-authored-by: BSnizND <[email protected]>
Fixes openclaw#72523. Remote proof: - CI run 24980529154 passed on 29f825b. - Blacksmith Testbox tbx_01kq6tsgbaxgstxmtearwy9n4w passed focused formatting, Google Meet tests, Google realtime provider tests, and extension test typecheck. Thanks @BsnizND. Co-authored-by: BSnizND <[email protected]>
Fixes openclaw#72523. Remote proof: - CI run 24980529154 passed on 29f825b. - Blacksmith Testbox tbx_01kq6tsgbaxgstxmtearwy9n4w passed focused formatting, Google Meet tests, Google realtime provider tests, and extension test typecheck. Thanks @BsnizND. Co-authored-by: BSnizND <[email protected]>
Fixes openclaw#72523. Remote proof: - CI run 24980529154 passed on 29f825b. - Blacksmith Testbox tbx_01kq6tsgbaxgstxmtearwy9n4w passed focused formatting, Google Meet tests, Google realtime provider tests, and extension test typecheck. Thanks @BsnizND. Co-authored-by: BSnizND <[email protected]>
Summary
audioSink.clearAudiofor Google Meet Chrome command-pair and chrome-node bridgesFixes #72523.
Validation
node scripts/test-projects.mjs extensions/google/realtime-voice-provider.test.ts extensions/google-meet/index.test.tspnpm tsgo:extensions:testpnpm exec oxfmt --check extensions/google/realtime-voice-provider.ts extensions/google/realtime-voice-provider.test.ts extensions/google-meet/src/realtime.ts extensions/google-meet/src/realtime-node.ts extensions/google-meet/src/node-host.ts extensions/google-meet/src/transports/types.ts extensions/google-meet/index.test.tsgit diff --checkNotes
This does not change the Google Meet command-pair audio format. The current documented path remains 8 kHz G.711 mu-law, so HD-quality audio likely needs a separate bridge-format follow-up.