slice-4 (dev-a): Task 9 Step 1 — primary-path barge-in e2e (wedge #1) #10
Reference in New Issue
Block a user
Delete Branch "slice-4-dev-a-reflex"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What lands
What it proves
A
LocalVadReflex<Reflex<TapAudioPipe>>stack kills brain playout within one 20ms tick afterVAD_DEBOUNCE_FRAMES(=3) loud caller frames, with zero brain advisory in the path. This is the property ARCHITECTURE.md:79-81 + README:98-100 mandate: an in-core local reflex that is faster than the brain round-trip.Test harness
Composes the real
TapAudioPipe(slice-2 seam object) +Reflex<P>(Task 2) +LocalVadReflex<P>(Task 2b). Caller audio (samples = 1000, RMS >VAD_RMS_THRESHOLD= 500.0) is driven throughon_pcm_frame; the local VAD tripsSpeechStartedinto the sameadvisory_txmpsc that dev-b's chain will later also write to.Assertions
stack.next_pcm_frame()returnsNoneafter the debounce (playout killed).ReflexMetrics.barge_in_count == 1.audio_outframe resumes playout on the next tick.AdvisoryEventis sent by the test — the kill came from local VAD alone.Out of scope / deferred
MediaThread) held on dev-b Task 5.session_map.rsrewire) held on Task 6.Merge instructions
Test evidence
cargo test -p rutster --test barge_in_integration: 1 passingcargo fmt --all --check: passcargo clippy --all --all-targets -- -D warnings: passcargo test --all: 109 passing across all test bins