[codex] fix discord missing voice state handling - #90969
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed July 5, 2026, 5:04 PM ET / 21:04 UTC. Summary PR surface: Source +30, Tests +84. Total +114 across 5 files. Reproducibility: yes. source-reproducible: current main returns getGuildVoiceState directly from voiceStatus and DiscordError preserves numeric API codes, so live code 10065 would propagate today. I did not inspect a redacted live run for the PR head. Review metrics: 1 noteworthy metric.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Mantis proof suggestion Risk before merge
Maintainer options:
Next step before merge
Maintainer decision needed
Security Review detailsBest possible solution: Merge the narrowed code-10065 predicate after inspectable Discord proof is attached or a maintainer explicitly records a proof override for the exact head. Do we have a high-confidence way to reproduce the issue? Yes, source-reproducible: current main returns getGuildVoiceState directly from voiceStatus and DiscordError preserves numeric API codes, so live code 10065 would propagate today. I did not inspect a redacted live run for the PR head. Is this the best way to solve the issue? Yes for the code shape: a shared Discord REST-error predicate keyed to code 10065 is narrower than status-only 404 handling and fits the plugin boundary. The remaining issue is proof sufficiency, not an alternate implementation. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 51771c3a1485. Label changesLabel justifications:
Evidence reviewedPR surface: Source +30, Tests +84. Total +114 across 5 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
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
Review history (5 earlier review cycles)
|
10a76a9 to
f03cd49
Compare
90f6040 to
bc6faf9
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bc6faf91f3
ℹ️ 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".
| @@ -21,6 +21,7 @@ Docs: https://docs.openclaw.ai | |||
| - **IRC Unicode messages:** split outbound PRIVMSG payloads on UTF-16 code-point boundaries so emoji cannot be cut into lone surrogates. (#96572) Thanks @llagy009. | |||
| - **OpenAI realtime voice greetings:** prevent server VAD from creating a second outbound greeting while an explicit greeting response owns the turn, without disabling caller interruption. (#86285) Thanks @giodl73-repo. | |||
| - **iOS Voice Wake cleanup:** avoid initializing the microphone audio pipeline while disabling inactive Voice Wake, preventing simulator launch aborts and unnecessary audio setup. | |||
| - **Discord voice status:** return an explicit absent state for Discord error 10065 while preserving unrelated 404 failures. (#90969) Thanks @asock. | |||
There was a problem hiding this comment.
Remove the manual changelog entry
For this normal Discord fix, the root AGENTS.md says CHANGELOG.md is release-only and normal fixes should carry release-note context in the PR body, squash message, or direct commit instead. Keeping this hand-written entry means release generation no longer owns the changelog content and can leave duplicate or stale release notes for this fix, so remove the CHANGELOG.md edit from this commit.
Useful? React with 👍 / 👎.
bc6faf9 to
c8ab668
Compare
|
Exact-head land-ready proof for
Known proof gaps: none for the changed surface. |
c8ab668 to
7bc8b18
Compare
|
Merged via squash.
|
* fix(discord): treat missing voice state as absent * fix(discord): narrow absent voice state handling * chore: defer Discord voice changelog --------- Co-authored-by: Peter Steinberger <steipete@gmail.com>
What Problem This Solves
Discord returns REST error code 10065 when a guild member has no current voice state. OpenClaw treated that normal disconnected state as a command/gateway failure. The original patch also treated every HTTP 404 as absent, which could hide unrelated unknown-guild, unknown-channel, permission, or transport failures.
Why This Change Was Made
The Discord plugin now recognizes only the provider's semantic
Unknown Voice Statecode, with a narrow explicit-message fallback for legacy error shapes. Guild status and voice manager lookup share that predicate; generic 404 handling is removed.User Impact
Voice status for a disconnected Discord user returns an explicit absent/disconnected result. Other Discord REST errors continue to surface for diagnosis. No configuration or command changes are required.
Evidence
discord-api-typesdistinguish those error codes.7bc8b18ef69c638c2f49375bf808a99ba2e9548e: https://github.com/openclaw/openclaw/actions/runs/28754711389Implementation