Skip to content

fix(discord): stop error replies after voice consult cancellation - #135380

Merged
steipete merged 4 commits into
mainfrom
steipete/musing-hawking-3bd632
Sep 1, 2026
Merged

steipete merged 4 commits into
mainfrom
steipete/musing-hawking-3bd632

Conversation

@steipete

@steipete steipete commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

Closes #135340

Related: #134924 (phone cancellation repair and the already-landed shared helper).

What Problem This Solves

Fixes an issue where Discord realtime voice users hear a generic failure after OpenClaw cancels a delegated consult while the voice provider remains connected. Joined and late matching provider tool calls can also report an error or already_delivered instead of terminal cancellation.

Why This Change Was Made

Discord now records one normalized host result, marks cancellation before completing the coordinator lifecycle, and uses that result for native, forced, joined, and cached consult delivery. Each outstanding native delivery owns its own settlement: one rejected attempt cannot return forced playback ownership while another attempt can still accept the answer.

The repair belongs to Discord's consult/delivery owner. It reuses the shared error projection already landed by #134924 without changing core, the SDK, or the phone/native Talk flows. It removes separate rejected-result reconstruction and the single overwritten delivery promise. No configuration, dependency, storage, schema, or protocol changes. Production +129/-151 (net -22); tests +380/-36 (net +344); docs +2.

User Impact

Cancelled consults do not trigger Discord's generic error fallback or restart through matching late calls. The voice session stays available for the next request. Real failures and timeouts retain error handling, and successful native delivery still owns speech without duplicate forced playback. Speaker authority, provider-epoch fencing, and bounded recent-result dedupe remain intact.

Evidence

  • Before the repair, six independent host-cancellation cases and two multi-native-delivery ordering cases failed in the joined-voice fixture. The implicated Discord owner is unchanged between reproduction base 2881127d3623ac1db43c91db12b5c5fbaf28fdb2 and reconciliation base 1e93009a9659ea88ca410c13ad11842afbd8770b.
  • On candidate 4d003c7a43d29345216df22a9550a60c745a289f, node scripts/run-vitest.mjs extensions/discord/src/voice/realtime-consults.test.ts extensions/discord/src/voice/realtime-consults.host-cancellation.test.ts passes all 35 cases. Coverage includes native/forced/joined/late cancellation, both suppression capabilities, rejected native delivery, success/error delivery ordering, reset/teardown, a subsequent guest request, and Error/TimeoutError controls.
  • The four Discord blobs remain byte-identical to the previously reviewed candidate; the fresh full-candidate review is recorded below.
  • Reconciled sibling proof passes 111 tests across 10 files, covering coordinator/control/talkback, Discord speaker turns, playback, ingress, and terminal-session cleanup (146 tests across 12 files including the consult fixtures). Both extension type lanes, formatting, doctor-contract tests, plugin/dependency boundaries, and code guards passed. The changed-file aggregate stopped before lint on unrelated protocol declaration error TS7056. After fix: restore protocol declaration builds #135360 merged, this branch was rebased onto 91067e340a1811f94a3f119fae329542c3f23872: all four changed files and the stable patch ID are unchanged. The normal extension lint wrapper, 35 consult cases, both extension type lanes, and formatting then passed on the new head. The four remaining storage/media/sidecar/import-cycle guards also passed separately. This is compositional evidence, not a claim that the original aggregate exited successfully. The original nine-file candidate had 197 focused/sibling tests and a full runtime/SDK/Control UI build pass; that build is historical evidence, not a build of this reconciled head.

Proof limitation: the operator explicitly prohibited live Discord/phone calls, credential retrieval, production-state copies, and service restarts. This is deterministic joined-voice boundary-fixture evidence with injected host/provider outcomes, not a live Discord call or a full ephemeral-Gateway harness. No screenshots or recordings of a live call were taken. Source inspection also confirms the old unconditional failure projection in stable tag v2026.8.2; no live stable-package call was made. Production frequency and the introducing commit are not established.

Bounded ACP landing-gate repair

The original hosted CI attempt hit a 30-second ACP CLI child timeout; an unchanged-head retry passed, but a later local source run still failed both cases after dependency installation (child ETIMEDOUT and initialize-response timeout). That local run took 283.30s overall, including 177.83s of Vitest imports. These failures are retained, not waived.

An isolated source diagnostic sent initialize plus EOF immediately and observed ACP server module evaluation at 22.995s, followed by clean exit at 23.266s. This supports substantial source-loading/transform cost inside the lifecycle deadline; it is not a pure CPU benchmark or proof excluding every lifecycle defect. The maintainer reviewed the entrypoint and preparation contracts and approved this bounded test-harness repair.

Both existing cases now launch the actual openclaw.mjs CLI. The canonical runtime-consumer registry prepares a fresh source-matching runtime before Vitest workers, as it already does for update dry-run coverage. No custom builder, ACP production change, dependency change, timeout increase, assertion weakening, import warmup, or resource override. Both 30-second deadlines, the Vitest deadline, exit/stderr/protocol assertions, initialize-before-hello and initialize-plus-EOF-before-startup orderings, environment isolation, and cleanup are unchanged.

Observed proof:

  • The added ACP prerequisite-selection case failed against the old registry: expected runtime, received undefined (5.87s wrapper). After repair, 35 selected prerequisite/routing cases passed (11.11s wrapper).
  • node scripts/run-vitest.mjs src/cli/acp-cli-exit.process.test.ts: 2/2 pass. Early initialize+EOF: 3.306s; buffered initialize before hello: 2.189s. Test time 5.53s; Vitest 23.65s; wrapper including normal fresh build and preparation 80.97s. These are observations, not cross-host performance guarantees.
  • Nine selected runner/admission/CI-plan cases passed, including failed-build and cancellation cleanup (19.69s wrapper).
  • node scripts/check-changed.mjs -- src/cli/acp-cli-exit.process.test.ts scripts/lib/vitest-build-prerequisites.mts test/scripts/test-projects.test.ts: exit 0; formatting, core-test/scripts/root-test types, all planned guards and targeted lint passed.
  • Fresh isolated Codex review of the complete nine-file candidate: scoped-clean at P0, no findings, confidence 0.95.

Admission-suite follow-up

The first ACP registry change missed a connected negative admission case: excluding only update dry-run still left ACP selected, so a build was correctly requested and the old no-build expectation exited 91 instead of 0. The existing case failed before repair (24 other CLI-admission cases passed; wrapper 7.56s). It now excludes both runtime consumers. A new row in the existing preparation table proves that excluding only update dry-run still requires preparation for ACP, covering successful build, failure and SIGTERM without new helpers or weaker assertions.

Targeted lint also exposed 15 existing diagnostics in the touched admission file. The approved cleanup adds braces and uses a block Promise executor without returning the setImmediate handle. The startCount unused-variable diagnostic was a false positive: its value supplies a fresh ESM query identity on each CLI replay. URL construction, counter increment and import are now separate, preserving case 0,1,2 progression, increment-before-import ordering, and retained planner dependencies. No cache-busting removal, suppression or dependency change.

Final proof: node scripts/run-vitest.mjs test/scripts/test-projects-build-admission.test.ts passed all 77 tests (8.79s tests, 11.59s Vitest, 14.14s wrapper). Matching root-test tsgo, targeted oxlint, formatting and git diff --check passed. The earlier 77-case pass before lint cleanup (10.45s) and the failing lint run remain history. Earlier ACP runtime proof remains valid and was not rebuilt for this test-only follow-up. The original four Discord blobs and the prior three-file ACP patch are unchanged.

Compact-plan expectation follow-up

The previous CI run also exposed an outdated single-runtime-job expectation in test/scripts/ci-node-test-plan.test.ts. Registering ACP correctly creates a second prepared-runtime job. The existing case failed locally before repair (15.07s wrapper). Its assertion now requires exactly two jobs and explicit ACP/update-dry-run membership at both job and group preparation levels, without depending on ordering. Runner assignments, workload/time budgets, job-count limits, concurrency and planner code are unchanged.

All 47 tests in the owning compact-plan file passed (40.70s tests, 44.28s Vitest, 48.95s wrapper), including Blacksmith, GitHub-hosted and hybrid profiles. Matching root-test types, targeted lint, formatting and diff checks passed. Fresh isolated review of the full nine-file candidate is scoped-clean at P0 with no findings, confidence 0.95.

ACP repair totals across five files: tooling +8/-6 (net +2), tests +75/-28 (net +47), total +49. Discord remains production -22, tests +344, docs +2. Entire PR: nine files, net +373. No changelog edit.

Verified merged result

PR #135380 merged via the native immediate squash route at 2026-09-01 19:27:42 UTC as bfe2884ceab69db1442044307f6ae81d65eb7221. The exact approved source head was b8522bdbaa1838e344f8414def13665b3e3cb631. Issue #135340 auto-closed at 19:27:43 UTC.

Fresh native/server gates passed immediately before dispatch: exact-head hosted CI, required openclaw/ci-gate, current ClawSweeper review, pinned head and mergeability admission. CI run 33545751321, attempt 1 succeeded with 128 successful jobs and 16 skipped. One ancillary ClawSweeper Dispatch was cancelled; it was not a required gate. Fresh isolated full-candidate Codex review was scoped-clean at P0, no findings, confidence 0.95. ClawSweeper's wait-for-CI Rank-up move was satisfied.

OPENCLAW_TESTBOX=1 scripts/pr prepare-run 135380 and OPENCLAW_TESTBOX=1 scripts/pr merge-run 135380 both completed successfully. The native provenance comment records prepared and landed SHAs. No admin bypass, auto-merge, queue request, rebase or candidate change was used. Native receipt and cleanup completed.

The landed tree was independently reconstructed from the actual landing parent aaa7dd39e6430e28eadb62c603ca28b831bf7848 and the approved head, and matched exactly. All eight non-documentation blobs match the approved candidate. Discord documentation retains intervening main edits plus the intended two-line cancellation addition. The landed delta remains nine files, +594/-221: runtime -22, tests +391, tooling +2, docs +2. The squash message preserves Closes #135340, user behavior and the related phone helper.

Historical failures remain recorded: the original ACP source-startup timeouts, the two connected obsolete sibling expectations in CI run 33543661288, and the first native preparation attempt's transient publication-policy fetch/validation error. Documented stale-lock recovery followed by one normal preparation retry succeeded; no gate or policy was bypassed. Merge itself succeeded on its first invocation.

The operator's no-live restriction remains: proof is synthetic joined-voice boundary/process fixtures, not a live Discord/phone/provider call or full ephemeral-Gateway demonstration. No release or package publication was performed.

Treat host-cancelled Discord realtime consults as terminal cancellation, preserve late-call dedupe, and wait for every native delivery before returning forced playback ownership. Timeouts and genuine errors retain their normal handling.

Closes #135340. Related phone cancellation helper: #134924.
@clawsweeper

clawsweeper Bot commented Sep 1, 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 Sep 1, 2026
@steipete
steipete marked this pull request as ready for review September 1, 2026 17:15
@steipete

steipete commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor Author

Merged and verified. ACP hold repaired; exact-head CI and native gates passed.

The four Discord blobs are unchanged: production -22, tests +344, docs +2. Existing proof remains 35 consult cases and 111 sibling cases on the identical repair.

Bounded ACP landing-gate repair

The original hosted CI attempt hit a 30-second ACP CLI child timeout; an unchanged-head retry passed, but a later local source run still failed both cases after dependency installation (child ETIMEDOUT and initialize-response timeout). That local run took 283.30s overall, including 177.83s of Vitest imports. These failures are retained, not waived.

An isolated source diagnostic sent initialize plus EOF immediately and observed ACP server module evaluation at 22.995s, followed by clean exit at 23.266s. This supports substantial source-loading/transform cost inside the lifecycle deadline; it is not a pure CPU benchmark or proof excluding every lifecycle defect. The maintainer reviewed the entrypoint and preparation contracts and approved this bounded test-harness repair.

Both existing cases now launch the actual openclaw.mjs CLI. The canonical runtime-consumer registry prepares a fresh source-matching runtime before Vitest workers, as it already does for update dry-run coverage. No custom builder, ACP production change, dependency change, timeout increase, assertion weakening, import warmup, or resource override. Both 30-second deadlines, the Vitest deadline, exit/stderr/protocol assertions, initialize-before-hello and initialize-plus-EOF-before-startup orderings, environment isolation, and cleanup are unchanged.

Observed proof:

  • The added ACP prerequisite-selection case failed against the old registry: expected runtime, received undefined (5.87s wrapper). After repair, 35 selected prerequisite/routing cases passed (11.11s wrapper).
  • node scripts/run-vitest.mjs src/cli/acp-cli-exit.process.test.ts: 2/2 pass. Early initialize+EOF: 3.306s; buffered initialize before hello: 2.189s. Test time 5.53s; Vitest 23.65s; wrapper including normal fresh build and preparation 80.97s. These are observations, not cross-host performance guarantees.
  • Nine selected runner/admission/CI-plan cases passed, including failed-build and cancellation cleanup (19.69s wrapper).
  • node scripts/check-changed.mjs -- src/cli/acp-cli-exit.process.test.ts scripts/lib/vitest-build-prerequisites.mts test/scripts/test-projects.test.ts: exit 0; formatting, core-test/scripts/root-test types, all planned guards and targeted lint passed.
  • Fresh isolated Codex review of the complete nine-file candidate: scoped-clean at P0, no findings, confidence 0.95.

Admission-suite follow-up

The first ACP registry change missed a connected negative admission case: excluding only update dry-run still left ACP selected, so a build was correctly requested and the old no-build expectation exited 91 instead of 0. The existing case failed before repair (24 other CLI-admission cases passed; wrapper 7.56s). It now excludes both runtime consumers. A new row in the existing preparation table proves that excluding only update dry-run still requires preparation for ACP, covering successful build, failure and SIGTERM without new helpers or weaker assertions.

Targeted lint also exposed 15 existing diagnostics in the touched admission file. The approved cleanup adds braces and uses a block Promise executor without returning the setImmediate handle. The startCount unused-variable diagnostic was a false positive: its value supplies a fresh ESM query identity on each CLI replay. URL construction, counter increment and import are now separate, preserving case 0,1,2 progression, increment-before-import ordering, and retained planner dependencies. No cache-busting removal, suppression or dependency change.

Final proof: node scripts/run-vitest.mjs test/scripts/test-projects-build-admission.test.ts passed all 77 tests (8.79s tests, 11.59s Vitest, 14.14s wrapper). Matching root-test tsgo, targeted oxlint, formatting and git diff --check passed. The earlier 77-case pass before lint cleanup (10.45s) and the failing lint run remain history. Earlier ACP runtime proof remains valid and was not rebuilt for this test-only follow-up. The original four Discord blobs and the prior three-file ACP patch are unchanged.

Compact-plan expectation follow-up

The previous CI run also exposed an outdated single-runtime-job expectation in test/scripts/ci-node-test-plan.test.ts. Registering ACP correctly creates a second prepared-runtime job. The existing case failed locally before repair (15.07s wrapper). Its assertion now requires exactly two jobs and explicit ACP/update-dry-run membership at both job and group preparation levels, without depending on ordering. Runner assignments, workload/time budgets, job-count limits, concurrency and planner code are unchanged.

All 47 tests in the owning compact-plan file passed (40.70s tests, 44.28s Vitest, 48.95s wrapper), including Blacksmith, GitHub-hosted and hybrid profiles. Matching root-test types, targeted lint, formatting and diff checks passed. Fresh isolated review of the full nine-file candidate is scoped-clean at P0 with no findings, confidence 0.95.

ACP repair totals across five files: tooling +8/-6 (net +2), tests +75/-28 (net +47), total +49. Discord remains production -22, tests +344, docs +2. Entire PR: nine files, net +373. No changelog edit.

Verified merged result

PR #135380 merged via the native immediate squash route at 2026-09-01 19:27:42 UTC as bfe2884ceab69db1442044307f6ae81d65eb7221. The exact approved source head was b8522bdbaa1838e344f8414def13665b3e3cb631. Issue #135340 auto-closed at 19:27:43 UTC.

Fresh native/server gates passed immediately before dispatch: exact-head hosted CI, required openclaw/ci-gate, current ClawSweeper review, pinned head and mergeability admission. CI run 33545751321, attempt 1 succeeded with 128 successful jobs and 16 skipped. One ancillary ClawSweeper Dispatch was cancelled; it was not a required gate. Fresh isolated full-candidate Codex review was scoped-clean at P0, no findings, confidence 0.95. ClawSweeper's wait-for-CI Rank-up move was satisfied.

OPENCLAW_TESTBOX=1 scripts/pr prepare-run 135380 and OPENCLAW_TESTBOX=1 scripts/pr merge-run 135380 both completed successfully. The native provenance comment records prepared and landed SHAs. No admin bypass, auto-merge, queue request, rebase or candidate change was used. Native receipt and cleanup completed.

The landed tree was independently reconstructed from the actual landing parent aaa7dd39e6430e28eadb62c603ca28b831bf7848 and the approved head, and matched exactly. All eight non-documentation blobs match the approved candidate. Discord documentation retains intervening main edits plus the intended two-line cancellation addition. The landed delta remains nine files, +594/-221: runtime -22, tests +391, tooling +2, docs +2. The squash message preserves Closes #135340, user behavior and the related phone helper.

Historical failures remain recorded: the original ACP source-startup timeouts, the two connected obsolete sibling expectations in CI run 33543661288, and the first native preparation attempt's transient publication-policy fetch/validation error. Documented stale-lock recovery followed by one normal preparation retry succeeded; no gate or policy was bypassed. Merge itself succeeded on its first invocation.

The operator's no-live restriction remains: proof is synthetic joined-voice boundary/process fixtures, not a live Discord/phone/provider call or full ephemeral-Gateway demonstration. No release or package publication was performed.

@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. 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 Sep 1, 2026
@clawsweeper

clawsweeper Bot commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 1, 2026, 2:56 PM ET / 18:56 UTC.

ClawSweeper review

What this changes

The branch returns a terminal cancellation for aborted Discord realtime voice consults, prevents forced-playback races across native deliveries, and prepares the built runtime for ACP CLI process tests.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

Keep open: this maintainer-authored, maintainer-labeled PR has a source-backed Discord repair with no discrete correctness finding, but its exact-head CI is still incomplete.

Priority: P2
Reviewed head: b8522bdbaa1838e344f8414def13665b3e3cb631

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The patch follows the existing Discord and SDK ownership boundaries with substantial focused coverage; exact-head CI remains the final merge gate.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer-authored PR is exempt from the external-contributor proof gate; its supplied deterministic Discord manager/session fixture evidence is valuable regression coverage but is not a live Discord call.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-authored PR is exempt from the external-contributor proof gate; its supplied deterministic Discord manager/session fixture evidence is valuable regression coverage but is not a live Discord call.
Evidence reviewed 7 items Shipped behavior: The latest stable release still formats a rejected consult as an error and submits it to the provider, establishing the reported pre-fix behavior.
Current main remains unfixed: The fetched current-main snapshot retains the same direct rejected-promise error delivery path, so this unmerged PR remains necessary.
Repair boundary: The introduced coordinator normalizes agent outcomes, records cancellation before coordinator delivery state, and uses a per-attempt delivery set before forced playback resumes.
Findings None None.
Security None None.

How this fits together

Discord realtime voice sends a transcript to a delegated OpenClaw agent and returns its terminal result to the voice provider. The consult coordinator maps success, ordinary failure, and cancellation into provider tool results and optional spoken playback.

flowchart LR
  A[Discord voice transcript] --> B[Consult coordinator]
  B --> C[Delegated agent run]
  C --> D[Terminal outcome classification]
  D --> E[Provider tool result]
  E --> F[Voice playback or next request]
Loading

Before merge

  • Resolve merge risk (P1) - The branch changes test-runner preparation and CI planning; exact-head CI is still in progress, so its final automation behavior is not yet confirmed.
  • Complete next step (P2) - No repair lane is needed; the remaining action is completion of exact-head CI for this protected maintainer PR.
Agent review details

Security

None.

PR surface

Source -22, Tests +391, Docs +2, Other +2. Total +373 across 9 files.

View PR surface stats
Area Files Added Removed Net
Source 1 129 151 -22
Tests 6 455 64 +391
Docs 1 2 0 +2
Config 0 0 0 0
Generated 0 0 0 0
Other 1 8 6 +2
Total 9 594 221 +373

Review metrics

Metric Value Why it matters
Production and test delta production runtime -22; tooling +2; tests +391; docs +2 The bug repair is net-negative in runtime code; the added test and automation coverage documents the changed delivery and prepared-runtime contracts.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #135340
Summary: This PR is the unmerged candidate fix for the canonical Discord realtime cancellation report.

Members:

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

Merge-risk options

Maintainer options:

  1. Wait for exact-head automation (recommended)
    Pause merge readiness until the current head’s remaining CI checks confirm the changed runtime-preparation and planner behavior.

Technical review

Best possible solution:

Land the plugin-local cancellation normalization after the exact head passes its required CI gates, retaining the focused delivery-order and terminal-outcome coverage.

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

Yes—current stable and current-main source both expose the rejected-consult error path, and the added deterministic voice fixture targets its cancellation and delivery-order cases; this read-only review did not execute it.

Is this the best way to solve the issue?

Yes—the implementation fixes the Discord consult/delivery owner and reuses the existing shared outcome projection instead of adding a parallel core or SDK path.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P2: This repairs misleading cancellation feedback in a bounded Discord realtime voice path without evidence of data loss, security exposure, or core-runtime unavailability.
  • merge-risk: 🚨 automation: The branch changes the runtime-preparation registry and CI planner behavior for ACP process tests, pending exact-head confirmation.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-authored PR is exempt from the external-contributor proof gate; its supplied deterministic Discord manager/session fixture evidence is valuable regression coverage but is not a live Discord call.

Evidence

What I checked:

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rank-up moves

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

  • Wait for the remaining exact-head CI checks before declaring the branch merge-ready.

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 (2 earlier review cycles)
  • reviewed 2026-09-01T17:52:51.395Z sha 4d003c7 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-01T18:36:06.873Z sha 0a26fa0 :: needs maintainer review before merge. :: none

@openclaw-barnacle openclaw-barnacle Bot added cli CLI command changes scripts Repository scripts labels Sep 1, 2026
@clawsweeper clawsweeper Bot added the merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. label Sep 1, 2026
@steipete
steipete merged commit bfe2884 into main Sep 1, 2026
209 of 211 checks passed
@steipete
steipete deleted the steipete/musing-hawking-3bd632 branch September 1, 2026 19:27
@steipete

steipete commented Sep 1, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 2, 2026
…enclaw#135380)

* fix(discord): stop error replies after voice consult cancellation

Treat host-cancelled Discord realtime consults as terminal cancellation, preserve late-call dedupe, and wait for every native delivery before returning forced playback ownership. Timeouts and genuine errors retain their normal handling.

Closes openclaw#135340. Related phone cancellation helper: openclaw#134924.

* test(acp): run CLI lifecycle checks against prepared runtime

* test(cli): cover selective runtime build admission

* test(ci): account for ACP runtime preparation
RomneyDa pushed a commit that referenced this pull request Sep 18, 2026
…35380)

* fix(discord): stop error replies after voice consult cancellation

Treat host-cancelled Discord realtime consults as terminal cancellation, preserve late-call dedupe, and wait for every native delivery before returning forced playback ownership. Timeouts and genuine errors retain their normal handling.

Closes #135340. Related phone cancellation helper: #134924.

* test(acp): run CLI lifecycle checks against prepared runtime

* test(cli): cover selective runtime build admission

* test(ci): account for ACP runtime preparation
RomneyDa added a commit that referenced this pull request Sep 19, 2026
* feat(meta): add Muse Spark 1.3 models (#136553)

* feat(meta): add Muse Spark 1.3 models

* docs(meta): cite Muse Spark 1.3 recommendation

Co-authored-by: Tharun Tej Tammineni <[email protected]>

---------

Co-authored-by: Dallin Romney <[email protected]>
(cherry picked from commit 194b7f2)

* feat(anthropic): support Fable 5.1 from shared model metadata (#135638)

* feat(anthropic): support Fable 5.1 from shared model metadata

* test(anthropic): keep alias coverage within the file limit

* fix(media): decouple image limits from catalog augmentation

(cherry picked from commit 0a9b08c)

* feat(openai): support GPT Image 2.5 variants (#143068)

* feat(openai): support GPT Image 2.5 variants

* docs(openai): correct GPT Image 2.5 section link

(cherry picked from commit f93881f)

* feat(fal): support GPT Image 2.5 variants (#143069)

* feat(fal): support GPT Image 2.5 variants

* test(agents): restore Windows media fixture isolation

(cherry picked from commit a57c799)

* fix(bedrock): preserve images returned by tools (#149336)

## What Problem This Solves
Tool-returned images make the next request fail with `ValidationException` on affected Bedrock routes. Fixes #149332.

## Why This Change Was Made
The serializer generates image labels from each tool-call ID; input images need no labels. All consecutive tool results come first, followed by image groups in the same tool order. Request state has one writer. `stream.runtime.ts`: +28/−1 for this conversion.

Growth accepted under the owner's standing acceptance (2026-09-15).

## User Impact
Image-reading turns can finish without losing image bytes, tool associations, or error status.

## Evidence
Authenticated `chat.send` → registered `read` on a synthetic PNG: main sent a nested image and failed; candidate sent a sibling image and completed with the scripted “Red square; blue circle.” Our run used a recording HTTP transport.

The [contributor's real two-tool run](#149336 (comment)) confirms image interpretation and association.

## Compatibility
Concrete route identities select the conversion. Opaque aliases keep their layout. The general schema permits nested images for some routes; this repair addresses the affected route’s observed rejection. No config or public interface changes.

## Consumers
All clients use the existing Bedrock serializer.

## Invalidation
Conversion is request-local. Stored transcript rows and original image bytes remain unchanged.

## Tests
`node scripts/run-vitest.mjs run --config test/vitest/vitest.extension-providers.config.ts extensions/amazon-bedrock`: 289 tests across 12 files passed on a fresh merge with main. Types, lint, formatting, file-size and assertion limits, and unused-export checks passed.

Co-authored-by: Ayaan Zaidi <[email protected]>
(cherry picked from commit 115522a)

* fix: preserve Ultra across model runtime boundaries (#135397)

* fix: preserve Ultra across model runtime boundaries

Keep native Codex Ultra as a runtime mode instead of clamping it against
physical Responses effort tiers. Share the selected collaboration effort
between turn fields and remove the redundant forwarding wrapper.

Carry the active parent thinking level through existing spawn context so
one-shot overrides reach native subagents without changing saved preferences.
Keep explicit child overrides and configured child defaults authoritative.

Scope Control UI thinking catalog fallback to the selected runtime, sharing
one prepared entry for picker options and the inherited default. Document
the native orchestration/budget boundary and active-turn inheritance.

* refactor: simplify Ultra reasoning fixtures

* fix: preserve active thinking across shared tool contexts

* docs: clarify Off thinking for side questions

(cherry picked from commit ee9e22b)

* fix(anthropic): Fable 5.1 sessions lose reasoning after model switches and runtime events (#136782)

* fix(anthropic): keep Fable 5.1 thinking valid across model switches and runtime context

Claude Fable 5.1 binds each thinking block to the producing model and to the
exact request prefix that preceded it. Three harness behaviors conflicted with
that contract on Anthropic-family routes:

- Moving a session onto Fable 5.1 (from Opus 5, Sonnet 5, Opus 4.8, Fable 5)
  dropped readable reasoning client-side; the replay contract now preserves it
  while leaving Fable 5.1 still drops.
- The per-turn runtime-context carrier was injected transiently after the
  active user turn, stripped on the next request, relocated inside tool loops,
  and removed by the context-engine assembly. It is now persisted right after
  its user turn and replayed in place; inline inbound metadata stays in place
  too, and consecutive user turns are no longer merged at load for the
  Messages API because the merged form lost the second turn's timestamp stamp.
- Direct API-key requests with adaptive thinking send the
  thinking-binding-controls beta with prefix_mismatch_behavior=drop_block, so
  a residual mismatch degrades to a server-side unbilled drop with a warning
  listing the dropped paths instead of a 400, a duplicate request, and a
  transcript-wide thinking wipe. OAuth, proxies, Bedrock, Vertex, and Foundry
  keep the existing strip-and-retry recovery.

Live-verified against api.anthropic.com: nine-request Fable/Opus/Fable session
with tool loops and carriers reports input_transformations: [] on every
request with four retained thinking blocks; a /think change on the direct API
yields a logged server-side drop and no retry.

* fix(anthropic): limit the preserved-thinking replay target to Fable 5.1

Mythos 5.1 is not registered in the bundled catalog and has no cross-model
replay proof, so unregistered Mythos targets keep the existing drop path.

(cherry picked from commit 30837ae)

* feat(openai): support GPT-6 Astra (#137550)

* feat(openai): support GPT-6 Astra

* fix(models): preserve declared pricing tiers during catalog refresh

(cherry picked from commit eb72093)

* fix(openai): require discovery before offering Astra for OAuth (#137561)

(cherry picked from commit 8b1add5)

* fix(diagnostics-prometheus): reject unauthorized metric scrapes (#140903)

* fix(diagnostics-prometheus): require operator.read for metric scrapes

The Prometheus scrape route registers under the trusted-operator runtime
scope surface, so the Gateway authenticates the caller and applies its
named-role scope ceiling before dispatch. The handler never consulted
those scopes, so an authenticated identity whose role grants no operator
scopes still received the full diagnostics document with 200, while the
same caller was correctly refused on equivalent read operations.

Check the runtime request scopes inside the handler and fail closed with
403 "missing scope: operator.read" unless the caller holds operator.read,
operator.write, or operator.admin, mirroring the Gateway read implication
set. The guard runs before rendering so HEAD probes cannot disclose the
document size either.

* test(diagnostics-prometheus): prove role-limited scrape denial

(cherry picked from commit 0c9330b)

* fix(discord): enforce sender media policy on guild asset uploads (#140334)

The Discord emoji-upload, sticker-upload, and event-create branches dropped
the sender-scoped media access options before dispatching the action, so the
guild runtime loaded the requested host-local path with only a byte limit. A
sender permitted to run those actions could therefore place bytes from a file
outside their allowed media roots into an outbound Discord emoji, sticker, or
event-cover request.

Forward the resolved action options from all three branches, carry
mediaAccess/mediaLocalRoots/mediaReadFile through the guild runtime, and load
upload sources through buildOutboundMediaLoadOptions like every other outbound
Discord media path. Adds regression coverage that a source outside the sender
roots is rejected before any request is issued, with an in-roots control.

(cherry picked from commit e5e7764)

* fix(discord): preserve realtime speaker and playback ownership (#137433)

* fix(discord): preserve realtime speaker and playback ownership

Bind provider connections to one Discord principal so delayed transcripts
and native consultations cannot inherit another speaker's authority.
Keep the shared agent route and serialize response-owned audio on one
room player, preserving continuations and recovery after playback gaps.

Admit host-requested responses before dispatch and map Google Live turn
completion to canonical terminal outcomes so queued speech can finish.

Closes #137349
Related: #136982, #123243
Follow-up: #137417

* test(discord): preserve room capture across speaker recovery

(cherry picked from commit 85d510c)

* fix(doctor): preserve enabled skills during automatic updates (#138730)

Use runtime-repair approval for optional skill disabling. Keep standalone explicit repair and required config migrations unchanged.

(cherry picked from commit acc9a65)

* fix: generated images disappear after failed tool calls (#131226)

## What Problem This Solves

WebChat drops generated media when a later tool failure is the turn's only reply payload.

## Root cause

The embedded-run terminal projection assigned successful tool media to the first non-reasoning payload. A later error warning could become that owner. Gateway error projection then discarded the attached media.

## Fix

- Attach tool media only to a successful, non-reasoning reply.
- Emit a separate media-only payload when the turn has no successful reply.
- Preserve the newer host-owned and automatic-delivery media paths from current `main`.
- Keep regression coverage at the payload owner and physical-delivery boundaries.
- Remove the mocked browser test that manually inserted its expected result.

## Evidence

- Baseline: current `main` at `8544aed05a5dbffb871483be781f71351203319e`.
- Real path: branch-built Control UI → real Gateway → mock OpenAI Responses provider → successful image tool → later failing tool → terminal WebChat event.
- Red: current `main` rendered zero generated images.
- Green: `d2a10d40c633bfe796ad4ab19222aa831184a327` rendered one generated image.
- Anti-cheat: the proof recorded `image-success` before `later-failure` and verified that Chromium loaded the exact Gateway-served asset from the branch build.

## Validation

- Focused unit and integration tests: 19 passed across 2 Vitest shards.
- Real Gateway and built Control UI proof: passed on current `main` and the candidate head with opposite image assertions.
- Targeted format, Oxlint, conflict-marker, max-lines, assertion-safety, and diff checks passed.
- Type checks run in continuous integration because repository policy forbids them on this host.

Production change: `+3/-3`, net zero. Test change: `+23/-1`, net `+22`.

Co-authored-by: A28Hui <[email protected]>
Co-authored-by: Ayaan Zaidi <[email protected]>
(cherry picked from commit 88be1b8)

* fix(matrix): refresh verification status before reporting device trust (#136226)

* fix(matrix): refresh verification status before reporting device trust

Refresh own-device keys after crypto preparation and before the authoritative trust read. Keep the missing-device preflight and use the Matrix SDK’s existing query contract.

* test(slack): remove core-coupled threading duplicate

---------

Co-authored-by: Dallin Romney <[email protected]>
(cherry picked from commit a812054)

* chore(release): prepare extended-stable 2026.8.33

* fix(release): integrate model and Discord security backports

* docs(release): clarify extended-stable workflow baseline

* fix(release): complete stable-line backport integration

* fix(ios): restore dependency resolution with WebRTC 152 (#134942)

* fix(release): repair frozen validation inputs

* fix(discord): stop error replies after voice consult cancellation (#135380)

* fix(discord): stop error replies after voice consult cancellation

Treat host-cancelled Discord realtime consults as terminal cancellation, preserve late-call dedupe, and wait for every native delivery before returning forced playback ownership. Timeouts and genuine errors retain their normal handling.

Closes #135340. Related phone cancellation helper: #134924.

* test(acp): run CLI lifecycle checks against prepared runtime

* test(cli): cover selective runtime build admission

* test(ci): account for ACP runtime preparation

* fix(release): complete Discord cancellation backport

* test(release): keep candidate fixtures current

* test(update): isolate frozen release version

---------

Co-authored-by: tharuntejmeta <[email protected]>
Co-authored-by: Peter Steinberger <[email protected]>
Co-authored-by: Vincent Koc <[email protected]>
Co-authored-by: dclosefuturex <[email protected]>
Co-authored-by: Ayaan Zaidi <[email protected]>
Co-authored-by: Pavan Kumar Gondhi <[email protected]>
Co-authored-by: Jason (Json) <[email protected]>
Co-authored-by: CGlashu <[email protected]>
Co-authored-by: A28Hui <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: discord Channel integration: discord cli CLI command changes docs Improvements or additions to documentation maintainer Maintainer-authored PR merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts 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 voice reports cancelled consults as errors

1 participant