Skip to content

refactor(meeting-bot): extract browser meeting-bot core behind MeetingPlatformAdapter - #109755

Merged
steipete merged 6 commits into
mainfrom
refactor/meeting-bot-core
Jul 17, 2026
Merged

steipete merged 6 commits into
mainfrom
refactor/meeting-bot-core

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

extensions/google-meet (~15k production LOC) was ~60% generic "join a WebRTC meeting site as a Chrome bot" machinery — session lifecycle, browser-tab control, virtual-audio bridging, node relay, realtime engines, setup checks, dial-in delegation — all locked inside one plugin. Adding Microsoft Teams (next PR in this track) would have meant duplicating all of it.

Why This Change Was Made

Phase 5 of the voice-stack consolidation (follows #109413, #109466, #109497, #109640). The platform-agnostic runtime moves to core src/meeting-bot/** behind a new openclaw/plugin-sdk/meeting-runtime barrel (same pattern as src/talk → realtime-voice): session runtime with per-meeting join locks and transcript retention, browser controller (tab lifecycle, polling, recovery), node-host audio bridge (SoX, bounded queue) with injected command names, realtime agent/bidi engines, audio transports, setup-check aggregation, voicecall.* dial-in delegation, and the MeetingPlatformAdapter contract (platform owns URL semantics, in-page DOM scripts, manual-action classification, create/dial-in flows; core owns mechanism).

google-meet becomes the first adapter. Frozen ownership stays in the plugin: config keys, googlemeet.* gateway methods, googlemeet CLI, google_meet tool, googlemeet.chrome node command, health field names, [google-meet] log scope, Meet URL/authuser/locale handling, DOM selectors and scripts, Meet REST/Calendar/Drive/OAuth, Twilio dial-plan mapping.

Wire compatibility: GoogleMeetSession/GoogleMeetChromeHealth keep their exact JSON shapes (generic types aliased/intersected; the manual-action category model stays internal while adapters supply today's reason/message strings), proven by the existing exact-value test suite (274 tests green).

Three review-hardening cycles ran on the extraction (Codex gpt-5.6-sol xhigh, chunked): 13 accepted findings fixed — including per-meeting locking for dial-in joins, incompatible shared-tab reconciliation, partial-join rollback (stop transports, release tabs), one unified failed-init cleanup path for the STT engine, rejection-handled async cleanup (no unhandled rejections from fire-and-forget stops), turn/output lifecycle completion on TTS failure, manual-action propagation in browser recovery, node pull-waiter cleanup, initial-transcript trimming, and excluding Meet's /new creation route from reusable meeting identity. Two findings rejected as shipped-behavior contracts (echo-check ordering — documented inline; micMuted !== true readiness semantics).

User Impact

None intended for Google Meet users — same config, commands, health output, and behavior, now with the hardening fixes above. Enables new meeting platforms as thin adapter plugins.

Evidence

  • node scripts/run-vitest.mjs extensions/google-meet src/meeting-bot: 21 files, 274 tests pass (includes new coverage: concurrent dial-in joins, ended-session speech rejection, STT init cleanup, output-lifecycle failure, waiter timeout cleanup, join rollback, initial-snapshot trim, /new identity).
  • pnpm plugin-sdk:surface:check (+1 entrypoint, +81 exports, +32 callables, annotated), plugin-sdk:api:check, check-deadcode-exports (0 across all scans), tsgo:extensions + tsgo:core, targeted oxlint: all green.
  • Final autoreview: two chunks, zero findings.
  • LOC: tracked diff −3,158; new core files +4,817; net +~1.6k — deliberate: extraction contracts/seams that make a Teams plugin a thin adapter instead of an 8k-LOC fork. Deletions dominate inside the plugin.
  • Not verified live: real Meet browser join / paired-node audio / dial-in (automated coverage only; behavior-neutral extraction).

Follow-ups (tracked): transcript cursor gap semantics on dropped-line jumps (pre-existing, moved); recovery tab ranking preference; micMuted unknown-state policy decision.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation scripts Repository scripts plugin: google-meet size: XL maintainer Maintainer-authored PR labels Jul 17, 2026
@steipete
steipete force-pushed the refactor/meeting-bot-core branch from 8779057 to 8b9c9a1 Compare July 17, 2026 07:20

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 87790578ec

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

this.options.isTalkBackMode(resolved.mode) && speechInstructions
? await this.speakWhenReady(reusable, speechInstructions)
: false;
return { session: reusable, spoken };

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Settle retained tabs before returning a reused session

When Chrome/Chrome-node has a reusable session plus an incompatible same-Meet-code session on a different tab, this return skips the retained-tab settlement that only runs for newly launched replacements. The scenario is reachable because extensions/google-meet/src/transports/google-meet-urls.ts:24-28 normalizes away query params while src/meeting-bot/browser-controller.ts:120-125 can keep distinct account-hinted tabs; the loop above then ends the incompatible session with keepBrowserTab, but this branch returns the reusable session without releasing the other tab or clearing its ownership, leaving that browser participant in the meeting with no active session to clean it up.

Useful? React with 👍 / 👎.

@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. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. labels Jul 17, 2026
@clawsweeper

clawsweeper Bot commented Jul 17, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed July 17, 2026, 5:23 AM ET / 09:23 UTC.

Summary
Extracts Google Meet browser-meeting lifecycle, browser control, audio, realtime, node-host, setup, and voice-call machinery into shared core modules and exposes them through a new openclaw/plugin-sdk/meeting-runtime adapter API.

PR surface: Source +1886, Tests +1086, Docs +5, Config +4, Generated 0, Other +1. Total +2982 across 58 files.

Reproducibility: not applicable. as a bug reproduction: this is an architectural extraction and new public SDK capability. Regression safety instead depends on live Google Meet proof for local Chrome, paired-node audio, and dial-in paths, which is currently absent.

Review metrics: 1 noteworthy metric.

  • Public SDK surface: 1 entrypoint added; 81 exports and 32 callables added. This is a large compatibility commitment that should be validated against more than one platform before becoming a supported plugin API.

Stored data model
Persistent data-model change detected: serialized state: extensions/google-meet/src/transports/chrome-browser-proxy.test.ts, serialized state: extensions/google-meet/src/transports/google-meet-page-scripts.ts, serialized state: src/meeting-bot/session-cleanup-tracker.ts, serialized state: src/meeting-bot/session-join-lock.ts, serialized state: src/meeting-bot/session-runtime.test.ts, serialized state: src/meeting-bot/session-runtime.ts, and 8 more. Confirm migration or upgrade compatibility proof before merge.

Merge readiness
Overall: 🧂 unranked krab
Proof: 🧂 unranked krab
Patch quality: 🦐 gold shrimp
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:

  • Resolve whether the meeting runtime remains internal or becomes an explicitly approved public SDK contract.
  • [P1] Add redacted live proof for a real local Chrome join and leave, paired-node audio, and dial-in lifecycle.

Proof guidance:

  • [P1] Needs real behavior proof before merge: The PR provides extensive tests and static checks but explicitly no live Meet join, paired-node audio, or dial-in evidence; add redacted terminal output, logs, or a recording of the changed paths, update the PR body to trigger review, and ask a maintainer for @clawsweeper re-review if it does not rerun automatically.

Risk before merge

  • [P1] Merging now establishes a supported plugin API with 81 exports and 32 callables before a second meeting platform demonstrates which abstractions are genuinely shared; later corrections would become plugin compatibility work.
  • [P1] The extraction rewires Google Meet browser joins, session cleanup, paired-node audio, realtime engines, and dial-in delegation without live proof, so existing users could encounter failed joins, leaked meeting participants, stalled audio, or incomplete teardown despite green unit tests.

Maintainer options:

  1. Internalize before merge (recommended)
    Remove the public package export and SDK documentation while keeping the shared core implementation available to the bundled Google Meet plugin until another adapter validates it.
  2. Accept the SDK commitment
    Merge only after an owner explicitly accepts the full public compatibility obligation and records how future changes will be versioned or deprecated.
  3. Pause for cross-adapter proof
    Delay this landing until the Teams follow-up and live Google Meet evidence demonstrate that the abstraction and runtime behavior are stable.

Next step before merge

  • [P1] An owner must decide the permanent public plugin-SDK boundary, and the contributor must supply live behavior proof; neither blocker is a safe narrow automated repair.

Maintainer decision needed

  • Question: Should openclaw/plugin-sdk/meeting-runtime become a supported public plugin contract now, before a second meeting-platform adapter validates its 81 exported symbols and 32 callables?
  • Rationale: Repository policy treats plugin API additions as compatibility-sensitive, and code inspection cannot determine whether maintainers intentionally accept this broad permanent contract based on one implementation.
  • Likely owner: steipete — The adjacent merged consolidation history and current ownership make steipete the best available person to confirm the intended public boundary.
  • Options:
    • Keep it private first (recommended): Land the extraction through an internal or bundled-only facade and defer the public SDK subpath until a second adapter validates and narrows the contract.
    • Approve the public contract: Explicitly accept the current broad API as supported and own future compatibility, documentation, and deprecation obligations for external plugins.
    • Review with the second adapter: Hold or split this PR so the proposed Teams adapter can demonstrate the shared requirements in the same design review.

Security
Cleared: The diff moves existing process, browser, node, and gateway mechanisms behind generic contracts, but the cleared dependency guard and reviewed changes reveal no concrete new security or supply-chain regression.

Review findings

  • [P1] Keep the meeting runtime private until a second adapter validates it — src/plugin-sdk/meeting-runtime.ts:5
Review details

Best possible solution:

Land the shared implementation behind an internal or bundled-only boundary, prove existing Google Meet local-browser, paired-node, and dial-in behavior, validate the adapter against a second platform, and then publish only the minimal shared SDK contract that both adapters require.

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

Not applicable as a bug reproduction: this is an architectural extraction and new public SDK capability. Regression safety instead depends on live Google Meet proof for local Chrome, paired-node audio, and dial-in paths, which is currently absent.

Is this the best way to solve the issue?

No. Sharing the implementation is reasonable, but publishing the entire first-platform abstraction as a supported SDK before a second adapter validates it is not the safest or narrowest long-term solution.

Full review comments:

  • [P1] Keep the meeting runtime private until a second adapter validates it — src/plugin-sdk/meeting-runtime.ts:5
    This still publishes a new 81-export, 32-callable SDK entrypoint while only Google Meet exercises the contract; the promised Teams adapter is not in this PR. Once released, this plugin API becomes compatibility-sensitive, so keep the barrel internal or bundled-only until a second adapter validates the abstractions and permits a smaller stable public surface.
    Confidence: 0.95

Overall correctness: patch is incorrect
Overall confidence: 0.92

AGENTS.md: found and applied where relevant.

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

Label changes

Label justifications:

  • P2: This is a normal-priority architectural improvement with broad but bounded Google Meet and plugin-SDK impact rather than an active emergency.
  • merge-risk: 🚨 compatibility: The PR creates a large supported plugin API and moves existing Google Meet behavior across ownership boundaries, making later corrections and upgrades compatibility-sensitive.
  • merge-risk: 🚨 availability: The unproven runtime paths control browser joining, audio subprocesses, node relays, session cleanup, and dial-in teardown, where regressions can stall or strand live meetings.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🦐 gold shrimp.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The PR provides extensive tests and static checks but explicitly no live Meet join, paired-node audio, or dial-in evidence; add redacted terminal output, logs, or a recording of the changed paths, update the PR body to trigger review, and ask a maintainer for @clawsweeper re-review if it does not rerun automatically.
Evidence reviewed

PR surface:

Source +1886, Tests +1086, Docs +5, Config +4, Generated 0, Other +1. Total +2982 across 58 files.

View PR surface stats
Area Files Added Removed Net
Source 43 6706 4820 +1886
Tests 8 1157 71 +1086
Docs 2 7 2 +5
Config 1 4 0 +4
Generated 1 2 2 0
Other 3 7 6 +1
Total 58 7883 4901 +2982

What I checked:

  • Public SDK entrypoint: The current head adds the public meeting-runtime barrel and exports session, browser, audio, node, setup, consult, and voice-call implementation surfaces. (src/plugin-sdk/meeting-runtime.ts:5, a05a9dc9d32d)
  • Measured API expansion: The SDK budget records one new public entrypoint, 81 exports, and 32 callable exports, making this a substantial permanent compatibility surface rather than an internal-only refactor. (scripts/plugin-sdk-surface-report.mjs:216, a05a9dc9d32d)
  • Package contract: The package export map makes openclaw/plugin-sdk/meeting-runtime an installable public subpath. (package.json:1125, a05a9dc9d32d)
  • Single adapter validation: The changed files contain the Google Meet adapter, but the proposed Microsoft Teams adapter described as the next phase is not part of this review, so a second implementation has not validated the abstraction. (extensions/google-meet/src/transports/google-meet-platform-adapter.ts:1, a05a9dc9d32d)
  • Prior finding remains: The previous review raised the same public-boundary blocker at SHA 203cb85; the current head continues to publish the entrypoint and broad export set, so the finding is not resolved. (src/plugin-sdk/meeting-runtime.ts:5, 203cb85fc6e5)
  • Real behavior proof absent: The PR body explicitly says that real browser joining, paired-node audio, and dial-in were not verified; automated tests and static checks do not prove these runtime paths. (a05a9dc9d32d)

Likely related people:

  • steipete: Authored the four immediately preceding merged voice/meeting consolidation phases and the current Google Meet extraction, giving the strongest history-backed context for the intended SDK boundary. (role: feature owner; confidence: high; commits: edd052989b5d, 92146f9f803b, e3618454f245; files: extensions/google-meet/src/runtime.ts, src/talk/realtime-session-harness.ts, src/talk/audio-energy.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 (5 earlier review cycles)
  • reviewed 2026-07-17T07:32:31.529Z sha 17bf3ea :: needs real behavior proof before merge. :: none
  • reviewed 2026-07-17T07:58:23.024Z sha 8190165 :: needs real behavior proof before merge. :: none
  • reviewed 2026-07-17T08:08:18.191Z sha 1ce7c05 :: needs real behavior proof before merge. :: [P1] Keep the meeting runtime private until a second adapter validates it
  • reviewed 2026-07-17T08:50:49.631Z sha 1ce7c05 :: needs real behavior proof before merge. :: [P1] Keep the meeting runtime private until a second adapter validates it
  • reviewed 2026-07-17T09:11:36.017Z sha 203cb85 :: needs real behavior proof before merge. :: [P1] Keep the meeting runtime private until a second adapter validates it

@steipete steipete self-assigned this Jul 17, 2026
@steipete
steipete force-pushed the refactor/meeting-bot-core branch from 1ce7c05 to 203cb85 Compare July 17, 2026 09:06
@github-actions github-actions Bot added the dependencies-changed PR changes dependency-related files label Jul 17, 2026
@github-actions

github-actions Bot commented Jul 17, 2026 •

Copy link
Copy Markdown
Contributor

Dependency graph guard cleared

This PR no longer has blocked dependency graph changes. A future dependency graph change requires a fresh /allow-dependencies-change comment after the guard blocks that new head SHA.

  • Current SHA: a05a9dc9d32ddc27c9d85eb9be33b594558340bb

@steipete
steipete force-pushed the refactor/meeting-bot-core branch from 203cb85 to a05a9dc Compare July 17, 2026 09:18
@github-actions github-actions Bot removed the dependencies-changed PR changes dependency-related files label Jul 17, 2026
@steipete
steipete merged commit 1a2d9e5 into main Jul 17, 2026
182 of 184 checks passed
@steipete
steipete deleted the refactor/meeting-bot-core branch July 17, 2026 09:35
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 18, 2026
…gPlatformAdapter (openclaw#109755)

* refactor(meeting-bot): extract browser meeting-bot core behind MeetingPlatformAdapter

* chore(google-meet): prune max-lines baseline entries shrunk by extraction

* fix(meeting-bot): drop orphaned extension realtime files and refresh lint/test types after extraction

* chore(google-meet): prune deleted realtime max-lines baseline

* chore(meeting-bot): remove release-owned changelog entry

* fix(meeting-bot): harden session leave, cleanup retry, and engine teardown paths
zooqueen pushed a commit to zooqueen/openclaw that referenced this pull request Sep 11, 2026
…gPlatformAdapter (openclaw#109755)

* refactor(meeting-bot): extract browser meeting-bot core behind MeetingPlatformAdapter

* chore(google-meet): prune max-lines baseline entries shrunk by extraction

* fix(meeting-bot): drop orphaned extension realtime files and refresh lint/test types after extraction

* chore(google-meet): prune deleted realtime max-lines baseline

* chore(meeting-bot): remove release-owned changelog entry

* fix(meeting-bot): harden session leave, cleanup retry, and engine teardown paths
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation 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. P2 Normal backlog priority with limited blast radius. plugin: google-meet rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. scripts Repository scripts size: XL 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.

1 participant