From 56924e860c21822c2e8bbce6e42515f048e34ac1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Kaan=20G=C3=BCm=C3=BC=C5=9F?= Date: Thu, 24 Sep 2026 15:28:20 +0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20docs(audio):=20the=20death=20wri?= =?UTF-8?q?ter=20is=20the=20wave=20branch's=20tick,=20not=20a=20missing=20?= =?UTF-8?q?half?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit E1 settled by the integrator: the engine writer exists on the wave branch -- `tick`'s dead branch sets `AUDIO_LOST` and `rearm_audio` clears it -- while this lane's base engine carries neither, so the earlier wording read as an engine defect that is not owed. The three documents now say what each side is: the engine writes the reason (wave branch), this lane reads it and spells none of its words, the flip is driven through the seam here and asserted end to end on the merged tree. Nothing in either test depends on when `tick` sets it. --- crates/app/src/notices.rs | 11 ++++++----- crates/app/src/player/transport.rs | 5 +++-- crates/app/src/tests/media.rs | 5 ++++- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/crates/app/src/notices.rs b/crates/app/src/notices.rs index d29702a..29e38a3 100644 --- a/crates/app/src/notices.rs +++ b/crates/app/src/notices.rs @@ -114,11 +114,12 @@ pub(crate) fn audio_step( /// the caching; this owns the queue, so a test can drive both directions without /// a window and without a device that dies on cue. /// -/// The reason itself is the engine's to write -/// ([`PlaybackSession::audio_disabled_reason`]): this side never spells its -/// words, so a lost-device reason the engine lane teaches the death path to set -/// needs nothing here -- and a death that sets nothing stays unsaid, which is -/// what the engine side of this defect is. +/// The reason is the engine's to write, and the engine's writer is the wave +/// branch's: `tick`'s dead branch sets the lost-device reason and `rearm_audio` +/// clears it (its own test observes both). This side is the reader and never +/// spells the engine's words, so the end-to-end flip is asserted on the merged +/// tree while this lane drives the same step through the seam below -- on this +/// lane's base engine no path flips the reason at all. pub(crate) fn audio_change_notice( notices: &mut std::collections::VecDeque, was: Option<&str>, diff --git a/crates/app/src/player/transport.rs b/crates/app/src/player/transport.rs index 7897952..1e51a14 100644 --- a/crates/app/src/player/transport.rs +++ b/crates/app/src/player/transport.rs @@ -36,8 +36,9 @@ impl Player { /// A file that *opens* silent says so in its own open line /// ([`audio_notice`], `library.rs`); what used to reach no consumer at all is /// a reason that changes *under* a session that is already up. This is the - /// reader of that state -- the writer of it is the engine's own - /// `PlaybackSession::audio_disabled_reason`, which this lane never spells. + /// reader of that state: the writer is the engine's (the wave branch's + /// `tick` dead branch sets the lost-device reason, `rearm_audio` clears it), + /// and this lane spells none of its words. /// /// Called from [`Player::pump`] because that is the one place every frame /// passes through, and written to cost an ordinary frame nothing: one read of diff --git a/crates/app/src/tests/media.rs b/crates/app/src/tests/media.rs index 8e8b810..e70b2b3 100644 --- a/crates/app/src/tests/media.rs +++ b/crates/app/src/tests/media.rs @@ -20,7 +20,10 @@ use crate::notices::{audio_change_notice, audio_lost_line, audio_tail}; /// saying so when it clears. This side is the *reader*: the writer of a reason is /// the engine's own `audio_disabled_reason`, and the app's two call sites were /// the *open* paths -- so a reason that arrived mid-session reached no consumer -/// at all and the window played on in silence with nothing said. +/// at all and the window played on in silence with nothing said. The engine's +/// writer is the wave branch's, so the flip is driven through the seam here and +/// asserted end to end on the merged tree; nothing below depends on when the +/// engine's `tick` sets it. /// /// Driven through the queue step itself -- [`audio_change_notice`] is the whole /// of what a reason change does to the strip -- because a test cannot make a