Skip to content

fix(discord): retire voice sessions after realtime provider closure - #131548

Merged
steipete merged 3 commits into
mainfrom
steipete/beautiful-sammet-506239
Aug 28, 2026
Merged

steipete merged 3 commits into
mainfrom
steipete/beautiful-sammet-506239

Conversation

@steipete

@steipete steipete commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor

Closes #131397 (Discord realtime lifecycle remains stale after provider closure or recovery).

Additional instructions

Maintainers can push to this same-repository branch.

What Problem This Solves

Fixes an issue where users in Discord realtime voice would retain an apparently connected but nonfunctional session after the realtime provider terminally closed. Closure during startup could also report a successful join, and pending consult delivery could outlive the voice session. Successful OpenAI provider reconnection could leave queued speech paused because Discord waited for a readiness callback that fires only once.

Why This Change Was Made

The realtime session now records terminal closure before notifying the existing exact voice-entry teardown owner. That single path releases receive streams, timers, playback and consult delivery, updates manager status, and cannot let an old provider callback remove a replacement. A bridge returned after a synchronous creation-time close is disposed before connection or playback attachment.

Recovered readiness uses the existing generation-fenced ready callback for both onReady and the provider's actual session.reconnect.ready event. Temporary reconnect diagnostics and continuity resets remain nonterminal. The former log-only close handler is removed; no status guard, retry loop, fallback, or second teardown path is introduced.

Transcript retirement uses the authoritative owner from the landed transcript lifecycle repair: the existing voice-entry stop clears the binding before its onStop callback, and the existing core finalizer retires the capture and persists its stop time. This PR adds no core notification or persistence policy. It does not import the independent capture-ownership repair, which remains separate; no integration with that open patch is claimed.

User Impact

Terminal realtime closure now disconnects the unusable Discord voice session and clears connected status. Operators get the existing terminal diagnostic and can retry /vc join. Temporary provider recovery preserves the session and resumes queued speech. Intentional local leave does not become a second terminal error.

No configuration, schema, dependency, permission, or protocol change. The Discord voice guide documents recovery. AI-assisted.

Evidence

  • Regression-first terminal proof: 8 failed / 89 passed before the repair, covering both realtime modes, both close reasons, startup/factory closure, and stale consult delivery. The test fixture now forwards the actual provider request.onClose through the real shared bridge/harness rather than bypassing it.
  • Actual reconnect-readiness sequence separately failed before repair: queued message count stayed at 1 instead of 2 when session.reconnect.ready arrived without a second onReady.
  • Combined behavior proof before the test-only file split: 253 passed across 14 files (the current layout has 15 files), including the real transcript tool/provider/manager/SQLite fixture. Terminal provider closure retires core active status and persists stoppedAt; historical stop does not call provider stop again, and old provider callbacks cannot retire or write to a replacement. The boundary regression also proves detachment before exactly one onStop notification under reentrant stop, while retaining stream/timer/player teardown coverage. Prior old-base proof was 248 tests, not the current combined count. A final test-only typing correction removed an unsupported argument from the reentrant entry.stop() call; the affected lifecycle and composed integration files were rerun afterward: 51 passed across 2 files. After moving the five terminal-close cases unchanged into their own suite, the final affected run passed 51 tests across 3 files, including the real transcript integration. Production remained unchanged.
  • Composed regression-first proof on main d2f13bc2702b2c9468b0e870fa40eac459440532, temporarily using its unchanged log-only realtime runtime: 2 failed / 1 passed. Both provider completed and error callbacks left the second capture in the real transcript tool's active list; the original STT destruction case passed. The repaired runtime was restored byte-for-byte.
  • Local production, extension-test, and root-test typechecks passed before the mechanical rebase, as did formatting and the early changed-file guards through plugin boundaries and dead-export scans. The first extension-test typecheck caught the unsupported test-only stop argument described above; the corrected typecheck and affected tests passed.
  • Local lint limitation: two unchanged pnpm lint:extensions attempts stopped before lint with plugin-sdk boundary dts timed out after 300000ms. Actual local extension lint remains incomplete. A later pnpm lint:scripts passed; the redundant local database scan was cancelled after the corresponding hosted guard passed. The later local media/runtime-sidecar/import-cycle commands were not reached. Hosted checks are separate evidence, not local passes. No timeout, heap budget, runtime, preparation, or lint check was bypassed or weakened.
  • Fresh independent Codex autoreview of the complete candidate, including the test-file relocation, found no P0 defects. The parent independently inspected the CI failure and verified all moved cases, assertions, and cleanup. The reviewed file hashes match, and the subsequent mechanical rebase preserved the entire repair diff byte-for-byte. This was static review, not a claim that the reviewer ran tests or live checks.
  • Prior old-base local full-build compilation, all nine unified units, 64 external plugins, CLI bootstrap/import checks, runtime postbuild, SDK declarations/export checks, and UI build/budgets passed. The final CLI metadata step hit its unchanged 120000 ms timeout while rendering source nodes --help, including one focused retry on the same Node runtime. The full local command was not green; exact-head CI artifact-build proof is required before merge.

Full focused command for the current file layout; the 253-test run preceded the file-only split, while the final affected command below was rerun afterward:

node scripts/run-vitest.mjs src/talk/session-runtime.test.ts src/talk/realtime-session-harness.test.ts extensions/discord/src/voice/voice-session.startup.test.ts extensions/discord/src/voice/voice-session.lifecycle.test.ts extensions/discord/src/voice/voice-session.terminal.test.ts extensions/discord/src/voice/realtime-turns.test.ts extensions/discord/src/voice/realtime-consults.test.ts extensions/discord/src/voice/realtime-playback.test.ts extensions/discord/src/voice/realtime-playback.integration.test.ts extensions/discord/src/voice/voice-receive.test.ts extensions/discord/src/voice/capture-state.test.ts extensions/discord/src/voice/transcripts-source.test.ts extensions/discord/src/voice/receive-recovery.test.ts extensions/openai/realtime-voice-bridge-reconnect.test.ts test/transcripts-tool.discord-lifecycle.integration.test.ts
node scripts/run-vitest.mjs extensions/discord/src/voice/voice-session.lifecycle.test.ts extensions/discord/src/voice/voice-session.terminal.test.ts test/transcripts-tool.discord-lifecycle.integration.test.ts
node scripts/run-tsgo.mjs -p test/tsconfig/tsconfig.extensions.test.json --incremental --tsBuildInfoFile .artifacts/tsgo-cache/extensions-test.tsbuildinfo
node scripts/run-tsgo.mjs -p test/tsconfig/tsconfig.test.root.json --incremental --tsBuildInfoFile .artifacts/tsgo-cache/test-root.tsbuildinfo

Proof limitation

No live Discord/provider conversation or mock-Gateway verdict is claimed. The maintained Crabline server omits voice and interaction dispatch and ignores voice-state opcode 4; the live voice QA route requires Discord credentials. The maintainer explicitly approved this bounded repair using failing/passing real-owner callback regressions, direct provider/session contracts, fresh independent review, and, before merge, green exact-head CI instead of additional live Discord proof. No operator Gateway, production configuration, or live credentials were used.

Scope and provenance

Production: +24/-7 (net +17). Tests/support: +457/-184 (net +273); the parameterized integration fixture includes indentation movement (ignoring whitespace, its delta is +71/-8). Moving the five terminal cases into a dedicated test file adds 22 net test wrapper/import lines without changing their bodies. Docs: +1. Production growth supplies the missing terminal-owner notification, creation-time disposal fence, and recovered-readiness transition while sharing the existing ready and teardown paths.

The log-only close handler dates to the realtime voice introduction, authored by @steipete on 2026-05-08 and reachable in stable v2026.5.12. The capture-ownership refactor did not introduce it. The patch was rebased onto main d2f13bc2702b2c9468b0e870fa40eac459440532 to compose with the new transcript retirement owner. The realtime production repair remains byte-identical to the pre-integration reviewed implementation. A later mechanical rebase onto b70945a58e69d5c48d27835239cc4cb02f1db2d7 brings in the trusted native wrapper update from #131535; no task file changed during that rebase.

Review and hosted CI follow-up

The latest ClawSweeper review, reviewed at 05:49 UTC on 2026-08-28 against 85c5a2ed60c1b522ef51f3181178b5ffa6600f19, found no actionable correctness or security defect and affirmed the owner-level fix. Its probe of node scripts/run-vitest.mjs extensions/discord/src/voice/voice-session.terminal.test.ts timed out after 30 seconds waiting for filename output; captured output showed Vitest startup, with no failed assertion. No eventual pass of that bot command is claimed. The separately completed local proof remains 253 combined tests before relocation and 51 affected tests across 3 files afterward, including all five unchanged moved cases; fresh independent review was clean.

The review's pending-CI statement is now superseded by the green exact-head run below. Its +17 production-growth note is accepted with the owner-boundary justification above: terminal notification, synchronous-factory disposal, and recovered readiness reuse existing teardown and ready paths; no simpler net-neutral alternative was identified. A status-only guard, consumer-only retirement, or retry loop would leave the owning lifecycle defect unresolved. The docs check passed on the exact current head, alongside local pnpm docs:list.

The optional Rank-up request for a real-setup after-fix capture is explicitly skipped under the maintainer's already approved bounded-live-proof waiver. Vitest fixtures are not live Discord/provider evidence. The maintainer independently verified the exact-head gates and review, accepted this disposition, and authorized native prepare/merge; no new code change or rule bypass is involved.

On published head b721e250983dd521da3fde12fb7e0c9568c14ccb, hosted artifact build passed, including write-cli-startup-metadata in 20 seconds. The CI run finished with 99 successful jobs, 17 skipped, and two failures: extension lint found 1,044 counted lines in the lifecycle test, and the aggregate gate correctly failed. The reviewed test-only split is committed: the files now have 919 and 147 nonblank lines, below the unchanged 1,000-line limit; all five cases retain their original bodies. No lint limit or assertion changed. Exact-head CI run 33145495041 for 85c5a2ed60c1b522ef51f3181178b5ffa6600f19 is now green: 101 successful jobs and 17 skipped. Artifact build passed in 1m52.5s, including metadata generation in 13.4s; typed extension lint and the aggregate gate passed. These hosted results do not turn the documented local timeouts into local passes. Native review artifacts validate as READY FOR /prepare-pr; final independent gate verification and native prepare/merge authorization are complete. This evidence update does not claim that the PR has merged.

@clawsweeper

clawsweeper Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation channel: discord Channel integration: discord size: L maintainer Maintainer-authored PR labels Aug 28, 2026
@steipete
steipete marked this pull request as ready for review August 28, 2026 05:01
@clawsweeper clawsweeper Bot added P1 High-priority user-facing bug, regression, or broken workflow. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Aug 28, 2026
@clawsweeper

clawsweeper Bot commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed August 28, 2026, 1:49 AM ET / 05:49 UTC.

ClawSweeper review

What this changes

The PR makes Discord realtime voice sessions disconnect and release their resources after a terminal provider closure, while keeping temporary provider recovery connected and resuming queued speech.

Regression provenance

Possible regression — suspected (reviewed change). No predecessor PR is attributed.

Merge readiness

⛔ Blocked until stronger real behavior proof is added - 4 items remain

Keep open for normal maintainer review: current main still has the log-only terminal-close handler, while this patch routes the terminal callback to the existing exact-entry teardown path and adds the missing reconnect-ready transition. No actionable correctness or security finding was identified; exact-head CI is still pending.

Priority: P1
Reviewed head: 85c5a2ed60c1b522ef51f3181178b5ffa6600f19

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) PR readiness rating was derived from proof quality, review findings, security review, and reviewer confidence.
Proof confidence 🦪 silver shellfish (2/6) Needs stronger real behavior proof before merge: ClawSweeper live verification failed on the reviewed terminal surface. 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.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Needs proof Needs stronger real behavior proof before merge: ClawSweeper live verification failed on the reviewed terminal surface. 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 6 items Current main still exhibits the reported gap: Current main retains an onClose handler that only flushes/logs, so it does not invoke the voice-entry terminal teardown owner.
Patch uses the owning teardown path: The introduced onClose handler marks the realtime session stopped before calling onTerminalError; the caller logs the failure and calls entry.stop, whose teardown removes only that exact entry and closes its realtime instance.
Bridge contract distinguishes terminal close from recovery: The shared bridge reports only completed/error through onClose and fences admission after provider terminal state; the OpenAI bridge emits session.reconnect.ready after a successful reconnect while its once-only onReady callback is not repeated.
Findings None None.
Security None None.

Live Verification

Command: node scripts/run-vitest.mjs extensions/discord/src/voice/voice-session.terminal.test.ts

Result: FAIL (failed) — step 1 expect_output voice-session.terminal.test.ts: expected terminal output was not visible within 30 seconds: "voice-session.terminal.test.ts"

[failure]
expected terminal output was not visible within 30 seconds: "voice-session.terminal.test.ts"

[command 1 combined output]
[test] starting test/vitest/vitest.extension-discord.config.ts

 RUN  v4.1.11 /tmp/clawsweeper-live-proof-131548-9QAjcD/target

Assertions:

  • FAIL expect_output: voice-session.terminal.test.ts

How this fits together

The Discord voice plugin connects a realtime provider bridge to a managed Discord voice entry. Provider callbacks feed session lifecycle state, playback, transcript capture, and the manager’s connected-status output.

flowchart LR
  Provider[Realtime provider] --> Bridge[Shared voice bridge]
  Bridge --> Session[Discord realtime session]
  Session --> Decision{Terminal close or reconnect ready?}
  Decision -->|Reconnect ready| Playback[Resume queued speech]
  Decision -->|Terminal close| Teardown[Voice-entry teardown]
  Teardown --> Status[Release resources and clear status]
Loading

Before merge

  • Add real behavior proof - Needs stronger real behavior proof before merge: ClawSweeper live verification failed on the reviewed terminal surface. 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.
  • Resolve merge risk (P1) - Exact-head CI is still in progress, so merge readiness remains unproven despite the focused source and regression coverage.
  • Resolve merge risk (P1) - The bug fix has a net +17 production-line delta; the callback propagation, synchronous-factory disposal fence, and reused recovery-ready transition have no evident net-neutral owner-boundary alternative.
  • Complete next step (P2) - No repair job is warranted because no actionable patch defect was found; this maintainer-authored PR needs ordinary exact-head CI and merge review.
Agent review details

Security

None.

PR surface

Source +27, Tests +263, Docs +1. Total +291 across 9 files.

View PR surface stats
Area Files Added Removed Net
Source 4 34 7 +27
Tests 4 447 184 +263
Docs 1 1 0 +1
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 9 482 191 +291

Review metrics

Metric Value Why it matters
Production versus regression coverage production +24/-7 (net +17); tests/support +457/-184 (net +273); docs +1 The small production increase implements the missing lifecycle transition; the remainder is focused coverage for terminal teardown, reconnect readiness, and replacement fencing.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #131397
Summary: This PR is the focused candidate repair for the canonical Discord realtime terminal-close and recovery-readiness bug.

Members:

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

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Retain the direct lifecycle-owner repair and merge only after the exact-head required checks complete successfully.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Retain the direct lifecycle-owner repair and merge only after the exact-head required checks complete successfully.

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

Yes, source-reproducible: current main’s terminal callback only logs, while the existing terminal-error callback invokes the exact voice-entry stop owner; the PR supplies focused manager-boundary regressions for that path.

Is this the best way to solve the issue?

Yes. Routing the terminal callback through the existing voice-entry teardown owner preserves replacement fencing and resource cleanup; putting teardown in the shared bridge or treating reconnect as terminal would cross ownership boundaries or break recovery.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🦞 diamond lobster. Replaced prior rating: 🦞 diamond lobster.
  • add status: needs maintainer proof decision: A ClawSweeper-authored PR needs a maintainer proof capture or override decision. Needs stronger real behavior proof before merge: ClawSweeper live verification failed on the reviewed terminal surface. 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 insufficient, not sufficient.
  • remove rating: 🦞 diamond lobster: 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 maintainer proof decision.

Label justifications:

  • P1: Terminal provider closure can leave a Discord voice session visibly connected but unable to continue, and recovery can strand queued speech.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🦞 diamond lobster. Replaced prior rating: 🦞 diamond lobster.
  • status: needs maintainer proof decision: A ClawSweeper-authored PR needs a maintainer proof capture or override decision. Needs stronger real behavior proof before merge: ClawSweeper live verification failed on the reviewed terminal surface. 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

What I checked:

  • Current main still exhibits the reported gap: Current main retains an onClose handler that only flushes/logs, so it does not invoke the voice-entry terminal teardown owner. (extensions/discord/src/voice/realtime-session.runtime.ts:391, a33c8a5c0ec6)
  • Patch uses the owning teardown path: The introduced onClose handler marks the realtime session stopped before calling onTerminalError; the caller logs the failure and calls entry.stop, whose teardown removes only that exact entry and closes its realtime instance. (extensions/discord/src/voice/realtime-session.runtime.ts:398, 85c5a2ed60c1)
  • Bridge contract distinguishes terminal close from recovery: The shared bridge reports only completed/error through onClose and fences admission after provider terminal state; the OpenAI bridge emits session.reconnect.ready after a successful reconnect while its once-only onReady callback is not repeated. (src/talk/session-runtime.ts:228, c1c6e97ca89c)
  • Sibling provider behavior matches the reconnect event: The XAI realtime bridge also emits session.reconnect.ready only after reconnect, so reusing the Discord ready transition is provider-family-consistent rather than OpenAI-only branching. (extensions/xai/realtime-voice-bridge.ts:408, c1c6e97ca89c)
  • Regression coverage reaches the manager boundary: The new terminal suite covers both realtime modes and close reasons, startup-time closure, stale callbacks after a replacement, capture cleanup, playback shutdown, and local-close reentrancy; the transcript integration additionally verifies durable capture retirement. (extensions/discord/src/voice/voice-session.terminal.test.ts:31, 85c5a2ed60c1)
  • Provenance and release status: The prior log-only implementation was carried into the current runtime file by the realtime-session refactor; the fix commit is only on this PR head and no v-tag contains it, so no shipped release already resolves this PR. (extensions/discord/src/voice/realtime-session.runtime.ts:391, e14fbd7bc35f)

Likely related people:

  • steipete: Peter Steinberger authored the current shared bridge/runtime refactor and all three commits on this focused Discord lifecycle PR. (role: feature owner and recent area contributor; confidence: high; commits: c1c6e97ca89c, e14fbd7bc35f, 85c5a2ed60c1; files: extensions/discord/src/voice/realtime-session.runtime.ts, src/talk/session-runtime.ts, extensions/discord/src/voice/voice-session.ts)

Rank-up moves

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

  • Add after-fix proof from a real setup, such as a short recording, terminal output, linked artifact, or redacted logs.

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 (1 earlier review cycle)
  • reviewed 2026-08-28T05:09:19.552Z sha b721e250983dd521da3fde12fb7e0c9568c14ccb :: needs maintainer review before merge. :: none

Route terminal provider closure through the existing voice entry teardown owner and resume queued speech after reconnect readiness. Closes #131397.
@steipete
steipete force-pushed the steipete/beautiful-sammet-506239 branch from b721e25 to 85c5a2e Compare August 28, 2026 05:40
@steipete

steipete commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor Author

Exact-head land-ready evidence for 85c5a2ed60c1b522ef51f3181178b5ffa6600f19:

CI run 33145495041 is green: 101 successful jobs, 17 skipped. Artifact build, typed extension lint, and openclaw/ci-gate all passed. Metadata generation completed in 13.4s.

Accepted focused proof: 51 tests / 3 files, with the five relocated cases unchanged; the subsequent mechanical rebase preserved all task bytes and the full repair diff. Fresh independent review found no P0 defect.

node scripts/run-vitest.mjs extensions/discord/src/voice/voice-session.lifecycle.test.ts extensions/discord/src/voice/voice-session.terminal.test.ts test/transcripts-tool.discord-lifecycle.integration.test.ts
node scripts/watch-pr-ci.mjs 131548 85c5a2ed60c1b522ef51f3181178b5ffa6600f19
scripts/pr review-validate-artifacts 131548

The watcher returned GREEN; native artifacts validated as READY FOR /prepare-pr. The latest ClawSweeper disposition is recorded below and in the body.

The maintainer's explicit bounded-proof waiver remains: no live Discord/provider conversation or mock-Gateway verdict is claimed. Hosted build/lint success is not a claim that the documented full local commands passed.

ClawSweeper's exact-head review, updated 2026-08-28 at 06:00 UTC, found no actionable correctness/security defect. Its terminal-test probe timed out after 30 seconds waiting for filename output, showing only Vitest startup and no failed assertion; no eventual pass of that bot command is claimed. Separately completed proof is 253 combined tests before relocation and the final 51 tests above. Its pending-CI statement is superseded by the green run linked above.

The net +17 production lines supply terminal-owner notification, factory disposal, and recovered readiness while sharing existing teardown/ready paths; no simpler net-neutral alternative was identified. The optional Rank-up request for a real-setup after-fix capture is explicitly skipped under the existing user-approved bounded-live-proof waiver; fixtures are not live Discord. Exact-head docs CI also passed.

This comment records the independently verified pre-merge gate decision. Native prepare reused the exact-head green evidence, and native merge completed as 533319b6753f4367581a59dc26b9c6d2fd19d66d, without a bypass.

@steipete
steipete merged commit 533319b into main Aug 28, 2026
179 checks passed
@steipete
steipete deleted the steipete/beautiful-sammet-506239 branch August 28, 2026 06:14
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 28, 2026
…penclaw#131548)

* fix(discord): retire voice sessions after realtime provider closure

Route terminal provider closure through the existing voice entry teardown owner and resume queued speech after reconnect readiness. Closes openclaw#131397.

* test(discord): prove terminal closure retires transcript captures

* test(discord): split terminal lifecycle coverage
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: discord Channel integration: discord docs Improvements or additions to documentation maintainer Maintainer-authored PR P1 High-priority user-facing bug, regression, or broken workflow. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. size: L status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Discord realtime lifecycle stays stale after provider closure or recovery

1 participant