Zeal Ranked Voice v2 -- integration QA, 2026-10-12
==================================================

Follow-up: ../voice-windows-20261012/REPORT.txt records the later native Windows
capture/device and final mixed Windows/Wine 4v4 pass, plus the v3.7 build hashes.
The results and deployment descriptions below are the earlier v3.6 snapshot.

Scope
-----
User requested the previously isolated Opus prototype be connected to Ranked's
network, lobbies and settings, with voice activation by default. The goal is
natural, clear all-in-one party/team voice. This report distinguishes verified
software behavior from remaining hardware/listening qualification.

Implementation
--------------
Windows x86 IW4x at upstream d1b175da1a25d31043246de103a702b206269e5a, with the
existing Ranked extension. WASAPI/miniaudio capture and playback, Opus 1.6.1 at
48 kHz mono, 96 kbit/s constrained VBR and 10 ms frames. libSRTP 2.8.0 provides
AES128_CM_SHA1_80/SRTCP authentication/replay protection. Separate media and
control workers keep rendering stalls out of the codec/network schedule.
SpeexDSP adaptive jitter and Opus PLC are used; this is not a NetEq integration.
RNNoise is optional, natural processing is default, and no AEC is claimed.

The HTTPS control proof is separate from the rk_session game userinfo token.
It is registered once, required on control requests, never exposed in responses
or dvars and never written into server presence. The game GUID/token binding
and fresh server presence determine allowed teammates. The trusted relay
re-encrypts compressed packets per listener without decoding or recording.

The stock party and search menus have VOICE SETTINGS; F7 works in a match.
Controls cover microphone mute, optional PTT, devices, sensitivity, gain,
volume, deafen, a private time-limited mic test and per-player mute/volume.
Scoreboard mute uses the same participant identity. Party rank panel positions
were retained. The old hover hint was hidden where it overlapped the new row.

Verified checks
---------------
- 51 Python tests passed, including the full communication policy matrix,
  eight-sender team isolation, game identity binding, replay/tampering/NAT,
  stale leases/authority, bounded packets/budgets, private proof enforcement,
  and actual HTTPS trust/rejected-certificate/plaintext-opt-in requests.
- Three CTest groups passed on native Windows 11 Win32 and on Linux: codec/
  activation/mixer, hardened legacy parser, and authenticated media/jitter.
- 66,000 encrypted packets crossed the RTP sequence rollover; replay, altered
  packets, wrong keys and 10,000 random malformed payloads were rejected.
- Eight independent encoders/receivers ran 0/1/3/5% synthetic loss, 20/50/100 ms
  bursts and up to 25 ms delivery variation. RTP timestamp wrap was exercised.
- Ten simulated minutes at each of +200 and -200 ppm clock mismatch, with eight
  speakers, 1% loss and delivery variation, passed on Windows and Linux. Each
  run had exactly eight initial receive resets, no further resynchronization
  and zero late discards. Energy/bounds tests do not prove speech transparency.
- Real game clients used independent Wine prefixes and isolated virtual input/
  output devices; generated fixtures traveled through WASAPI, the game DLL,
  authenticated UDP on MS-02, the receiver and its output device.
- Actual popup clicks passed microphone mute/unmute, per-player mute, VAD,
  PTT press/release and local microphone test privacy. Muted/test/PTT-release
  states transmitted zero media packets. UDP relay removal/recreation caused
  voice to stop transmitting and then reconnect automatically.
- Native Windows installer 1.19 installed the exact DLL/IWD and both license
  files, preserved old-file backups and passed an idempotent repeat install.

Issues found and corrected
--------------------------
The first two-client test had recurring output underruns. Wine's WASAPI backend
requested batches of three 10 ms frames despite a 10 ms configured period.
A bounded three-frame output queue eliminated these recurring underruns in the
retest. We retained separate worker/device timing counters to expose the issue.
The worker uses Windows' 1 ms timer resolution while alive; no codec or locks
run in its device callback.

Game voice settings alone did not stop Miles' legacy capture path. Its WinMM
start/reset/close imports are intercepted using named PE imports; Ranked pauses
legacy capture and restores it on leave. No guessed game function offsets or
Ghidra edits were needed. These hooks do not touch game playback or WASAPI.

The final compatibility pass stopped changing the archived cl_voice setting.
Legacy TX/RX and WinMM capture are suppressed directly while Ranked owns audio;
queued legacy packets are discarded rather than released on leave. A duo exit
test then caught a late lobby response scheduling a party reopen. Leave now
clears that timer and ignores late state transitions while leaving, preventing
the menu and microphone from reopening after exit. The actual two-client
party -> normal-server warmup -> leave sequence passed after this correction.

Menu toggle actions needed to invoke the console command through exec. Device
restarts also reset device-local sample counters; transport timestamps now
remain monotonic across mute/unmute and device restarts. Settings now work
without reconnecting. Per-player +/- hit rectangles no longer overlap mute.

A later recording crossed the automatic return to warmup while test clients
had not selected classes in time. Warmup correctly carried all warmup players;
that recording was unsuitable for a match-only routing assertion. The final
harness waits for the real eight-player start gate, checks phase before/after
recording, and compares each recording with the actual server roster.

Test environment and limits
---------------------------
Eight Windows game binaries ran through Wine on one Linux workstation, with
separate prefixes/X displays and VirtualGL. Audio used a separate PipeWire/Pulse
instance containing only virtual sinks; ALSA/OSS fallback was disabled. No human
microphone was opened or recorded by this QA. MS-02 used an isolated game,
lobby, bridges and rating database for match tests. The QA match override was
Rust/Domination; it does not alter the normal competitive pool.

Win32 binaries and native codec/crypto/jitter tests were built/run in the
Windows 11 VM with MSVC 14.44 and SDK 10.0.26100. That VM has no audio endpoint.
An attempted live virtual sound-device attach was unsupported and changed no
VM configuration. Actual Windows headset capture/playback, USB/onboard hotplug,
44.1 kHz devices, speaker echo, WAN measurements and human listening comparison
remain unqualified. Synthetic waveform/energy results do not certify Discord
parity, physical mouth-to-ear delay or transparent 5% loss. No automatic regional
relay selection or relay failover is claimed; see ../../VOICE.txt.

Eight-client match result
-------------------------
Two real duos plus four solos entered the isolated pool. Seven clients did not
start a match; the eighth allowed the normal ready gate to begin actual 4v4.
The harness selected classes and verified elo_play_started=1, eight eligible
players and the actual server team slots before recording. Both duos stayed
together. The final 30-second run had eight simultaneous, distinct generated
tones passing through each game's WASAPI capture and output.

All eight output recordings contained exactly the correct three teammates.
There were 24,280 transmitted media packets and 72,840 recipient deliveries:
3,035 sent and 9,105 received per client. During this recording every client
had zero rejected packets, zero capture-ring drops and zero output underruns.
Roster, before/after counters and spectral checks are in eight-voice-results.json,
eight-snapshot.txt, final-match-start.txt and eight-game-clients.txt.

That eight-client test used DLL SHA256:
  765eff257d6646436dcdd0bb470541f5f5a4aea109e6d469d4489e6706ab28dc
The final DLL adds the cl_voice preference/queue fix and late-exit-response
fix described above. Its media codec, network engine and routing are unchanged.
The final DLL SHA256 is:
  d22d2b6ba735d58d5e9ad99ab6097c1277269f6e3e7d2333ed779b3c9a933122
The final menu IWD SHA256 is:
  7405baa98bea5da2cd042abe4eefd7809d87dd92538bd36187bb7bcd0121ad24
Installer 1.19 SHA256 is:
  ced4a617a1530f78dad1de8a8c3a387f960b85f821a7ef33cf11697a8aa09bb4

Final normal-pool compatibility test
------------------------------------
Two final-build clients connected through the regular MS-02 lobby (TCP 8791)
and game (UDP 29860), using the new voice relay (UDP 29901). Each of the party
and warmup checks sent/received exactly 335 generated-tone packets, with 48 kHz
input/output and no new rejections, capture drops or output underruns. cl_voice
stayed enabled before, during and after Ranked; legacy packet counters stayed
at zero while Ranked owned audio. After both clients left, capture suppression
released and voice stayed disconnected. See normal-final-results.json.

Generated speech also traversed the final DLL's actual WASAPI -> MS-02 relay ->
WASAPI route. Quiet speech with natural processing delivered 1,148/1,148 packets;
speech plus deterministic background noise with RNNoise enabled delivered
1,214/1,214. Neither run added rejections, capture drops or output underruns.
The recorded output was finite, unclipped and correlated with the input's
10 ms RMS envelope (0.8530 and 0.9624 respectively). These are transport/output
checks, not perceptual quality scores. Game sound was muted with snd_volume=0
for the final recordings; a preceding capture containing menu sound was excluded.
Fixtures were generated by the earlier espeak-ng QA, never human recordings.
See integrated-speech-results.json for fixture hashes, levels and counters.

Deployment and cleanup
----------------------
The final DLL and matching menu are installed in the local game at:
  /home/bryan/iw4x-eight-client-qa
The visible client's configuration was not changed. Background QA profiles
were restored and their DLL/menu pairs updated. Test clients and the private
virtual-audio processes were stopped.

MS-02's normal iw4x-qa game, lobby, both bridges and rating service are active
with the final DLL, updated scripts/backend, pylibsrtp dependency and UDP 29901
voice forwarding. Normal player ratings exactly match the pre-voice snapshot.
See normal-deployment.json. The isolated voiceqa services and temporary game/API/
media proxy devices were stopped/removed; normal Ranked services stay active.

Rollback copies are preserved at:
  Local: /home/bryan/iw4x-eight-client-qa/evidence/voice-before-20261012
  MS-02 container: /root/qa-state/voice-rollout-20261012/before
The lobby service's venv override is:
  /etc/systemd/system/iw4x-qa-lobby.service.d/voice.conf
For a full pre-voice rollback, stop the normal game/lobby/bridges, restore the
saved DLL/scripts/menu/lobby code/config, remove that override, reload systemd,
remove only the ranked-voice UDP proxy and restart the normal services. Preserve
the rating database. See ../../VOICE.txt for matching client/server deployment.

The local v3.6 test bundle includes final DLL/menu, installer 1.19, third-party
licenses, project source, complete corresponding native source and a SHA256
manifest. The source archive contains the pinned dependencies and build steps.

The previous v3.5 bundle and original Cordite backup are preserved. No public
release, GitHub push or VPS provisioning is performed.
