Repository navigation
fix(discord): recover encrypted voice when DAVE transition is zero - #117381
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed August 1, 2026, 11:01 AM ET / 15:01 UTC. ClawSweeper reviewWhat this changesThis PR treats DAVE transition ID Merge readiness⛔ Blocked until stronger real behavior proof is added - 4 items remain Keep this PR open for maintainer review. The recovery is narrowly scoped to the Discord voice owner and the updated tests cover the stated zero-transition and reconnect-loop cases, but this read-only checkout does not contain the pinned Priority: P1 Review scores
Verification
How this fits togetherDiscord voice receive errors enter the Discord plugin’s voice manager, which decides whether to enable temporary passthrough, repair an encrypted DAVE session, or rejoin the voice channel. The new branch targets a poisoned DAVE transition before audio receive can resume. flowchart LR
A[Discord voice gateway] --> B[DAVE session state]
B --> C[Discord voice manager]
C --> D{Receive error recovery}
D --> E[Invalidate transition and send key package]
D --> F[Bounded leave and rejoin]
E --> G[Voice receive pipeline]
F --> G
Before merge
Agent review detailsSecurityNone. PR surfaceSource +108, Tests +922. Total +1030 across 4 files. View PR surface stats
Review metricsNone. Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Retain the owner-local recovery design, but inspect the exact Do we have a high-confidence way to reproduce the issue? Yes, at source level: the proposed tests construct a real DAVE session with Is this the best way to solve the issue? Unclear: keeping the repair in the Discord voice owner is the right architectural boundary, but its exact dependency-owned recovery contract still needs direct inspection before this can be confirmed as the best safe fix. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 7cc2e6d83003. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
e886313 to
f3e9d1b
Compare
|
Maintainer rank-up proof for exact reviewed head f3e9d1b: the dependency is pinned to @discordjs/voice 0.19.2. We inspected the actual installed CommonJS distribution: dist/index.js lines 855-861 set the reinitializing state synchronously during recoverFromInvalidTransition; lines 953-964 contain the falsy lastTransitionId=0 bug; lines 1663-1676 define the Ready-state networking/gateway event ordering. Public dist/index.d.mts exposes lastTransitionId, reinitializing and recoverFromInvalidTransition at lines 615, 635 and 685; the voice send signatures are at lines 898 and 905. The actual Blacksmith owner run exercised the exported real DAVESession with native opcode 31 followed by binary opcode 26, reproduced the zero-transition failure before the repair, and passed both owner suites, production/test type checks, scoped guards and the full packaged production build. All current required checks have now passed; the sole unrelated intermittent SQLite session-flip job passed on its one ordinary rerun, consistent with passing runs on two current main commits. No dependency internals or production owner bytes changed in the rebase. |
Co-authored-by: Peter Steinberger <[email protected]>
Summary
0and otherwise surfacesUnencryptedWhenPassthroughDisabled.Fixes #81518.
Dependency and runtime evidence
@discordjs/[email protected]DAVE declarations and implementation. A real installedDAVESessionwithlastTransitionId = 0reproducesUnencryptedWhenPassthroughDisabledbefore the fix.f19e5e1ab5eb675aebc517f1900e342b0109ed7fab327e386c407c6bb1771025: both complete owner suites; full extension production and extension-test typechecks; changed-file formatting and lint; plugin, security, dependency, database, dead-code, and import-cycle guards; and a full production package/Control UI build. Total remote command time: 5m11s.