test_snorkel_valve_stops_charging_and_battery_gas_halves_it failed 5 of 40
runs: start_new_game() draws a fresh seed, so the random incident timer could
start another gas or valve incident at the gas's end time. The test now
counts only its explicit incidents.
The audio soak failed on 'mixer channel idle events: 1' after a 3 s first
frame on CI: the worker was starved, the gap was the host's. A dry channel
after a late iteration is now counted as channel_idle_late beside pump_late.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011ZwzQCC9YZ8AnWpA84yWwf
pygame's endsound_callback reads the channel queue without the GIL; a
Channel.queue() landing in that window leaves the channel idle with a
sound queued forever, and the buffered sonar pump waited for that queue
slot for good (silence until audio was toggled off and on). The pump now
replays such a stranded sound after seeing it on two iterations, and
play_sonar restarts a dead sonar worker. audio_debug.log reports both.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JnHejbUDyia6RJESsBKnhm
Browsers went silent after any host key press: every input-owner change bumped
the world epoch, the server cleared the audio ring and restarted numbering at
1, and the AudioWorklet dropped every "old" block until the count passed its
last sequence. Numbering is now monotonic per role for the server lifetime; a
cleared ring and a retuned receiver skip one number so browsers crossfade,
reconnects resume with ?after=<sequence>, duplicates are counted, and the audio
socket tolerates a six-second send stall.
Buffers sized for the 16 GB device: local lead 1.5 s with a 5 s queue, browser
lead 2 s with a 6 s maximum, refill 1 s, stale 3 s, SIM_CATCHUP_MAX_S 2.5 s
(queue >= lead + catch-up + block, pinned by a test), SDL mixer buffer 2048
samples. Remote Crew publication no longer spikes the main thread: sonar history
rows are cached per station with identical results, role states are shallow
copies, the compact sonar state is built from the dict, the roster is read at
4 Hz. New counters (mixer channel idle, late pump iterations, input gaps,
per-phase frame times, server stream stats) and tools/audio_soak.py, which runs
the game headless with simulated browsers or as a Wi-Fi client and reports
stream continuity. Docs, manual and install guide updated.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Sonar echo:
- Every active return is audible when it arrives, after the two-way travel
time the simulation already models (ship sonar, dipping sonar, wrecks).
CW returns are a smeared carrier tone, LFM returns a short 100 Hz sweep;
the pulse is the one the ping was sent with (audio-only memory, never
saved), loudness follows the measured echo SNR and faint returns sit in
reverberation hiss. The ping bus queues an echo behind a busy sound.
- Browser cues sonar_echo_cw/_lfm (+ _faint) with matching synthesis.
HQ intelligence:
- New start-report setting: coarse (bearing/range, as before) or exact
(every hostile unit type with count and expected air-raid waves, analyser
names). Patrol is exact, Double hunt and Nuclear intercept coarse, the
free hunt chooses on its difficulty screen. Kept out of the saved
difficulty set, so saves stay exact v14.
Remote Crew behind an HTTPS proxy:
- The local game accepts --public-origin https://... (crew and solo): the
F9 listener then answers on its LAN URL and on exactly that proxy host
(passed through, rewritten to the upstream, or with :443) and origin;
cookies are Secure only on the HTTPS path. Without the option nothing
changes; a proxy with its own host name still gets 403. F9 and the solo
screen show both addresses. Header values may contain HTAB.
- Checked end to end with Chromium through a TLS proxy: crew and solo,
direct and proxied, pair and reach the live station view.
- docs/web-host.de.md: local proxy section; no pause and saves v14 (the
page still claimed a host-absence pause and v10).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Weather & sonar analysis (key 0, uConsole full screen and every Remote
Crew station): own-ship atmosphere derived from the weather system
(barometer leading the sea with WMO tendency and storm warning, air
temperature with cold outbreaks, snow and icing, gusts, Beaufort, cloud
ceiling, twilight from sun elevation, moon phase), weather effects, and a
helicopter flight decision (CLEAR/LIMITED/NO-GO; gusts, ceiling and icing
now limit launch and dipping, light icing costs fuel). The ocean profile
(layer, sound-speed curve, SOFAR axis, rays and shadow zone) appears only
after a sonar bathythermograph measurement and is always that
measurement. Rain freshens a surface lens in the Mackenzie sound speed;
ray profiles and the BT continue to the seabed (to 1500 m) so a deep
sound channel can form. New common v2 block `weather_station`, browser
validator and dialog, protocol docs, manual EN/DE.
Also included from the parallel session: selectable 30/60 FPS frame-rate
preference with bounded catch-up of slow frames, elastic sonar audio
buffering (local mixer and AudioWorklet), and a German presentation of
the simulation under docs/presentation.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>