slice-4 (dev-a): Task 9 Step 1 — primary-path barge-in e2e (wedge #1) #10

Merged
alee merged 1 commits from slice-4-dev-a-reflex into main 2026-07-04 01:54:01 +00:00
Owner

What lands

  • Task 9 Step 1: the PRIMARY-path barge-in e2e integration test — wedge-#1 proof.

What it proves

A LocalVadReflex<Reflex<TapAudioPipe>> stack kills brain playout within one 20ms tick after VAD_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 through on_pcm_frame; the local VAD trips SpeechStarted into the same advisory_tx mpsc that dev-b's chain will later also write to.

Assertions

  1. stack.next_pcm_frame() returns None after the debounce (playout killed).
  2. ReflexMetrics.barge_in_count == 1.
  3. Fresh audio_out frame resumes playout on the next tick.
  4. No AdvisoryEvent is sent by the test — the kill came from local VAD alone.

Out of scope / deferred

  • Task 9 Step 2 (SECONDARY path — brain advisory kill) needs dev-b Task 5+6+8, still held per PM directive.
  • Task 6 (MediaThread) held on dev-b Task 5.
  • Task 7 (session_map.rs rewire) held on Task 6.
  • Task 10 (CI seam gate) PM-assigned.

Merge instructions

  • squash-merge
  • DCO signoff on commit (AGENTS.md)

Test evidence

  • cargo test -p rutster --test barge_in_integration: 1 passing
  • cargo fmt --all --check: pass
  • cargo clippy --all --all-targets -- -D warnings: pass
  • cargo test --all: 109 passing across all test bins
## What lands - Task 9 Step 1: the PRIMARY-path barge-in e2e integration test — wedge-#1 proof. ## What it proves A `LocalVadReflex<Reflex<TapAudioPipe>>` stack kills brain playout within one 20ms tick after `VAD_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 through `on_pcm_frame`; the local VAD trips `SpeechStarted` into the same `advisory_tx` mpsc that dev-b's chain will later also write to. ## Assertions 1. `stack.next_pcm_frame()` returns `None` after the debounce (playout killed). 2. `ReflexMetrics.barge_in_count == 1`. 3. Fresh `audio_out` frame resumes playout on the next tick. 4. No `AdvisoryEvent` is sent by the test — the kill came from local VAD alone. ## Out of scope / deferred - Task 9 Step 2 (SECONDARY path — brain advisory kill) needs dev-b Task 5+6+8, still held per PM directive. - Task 6 (`MediaThread`) held on dev-b Task 5. - Task 7 (`session_map.rs` rewire) held on Task 6. - Task 10 (CI seam gate) PM-assigned. ## Merge instructions - squash-merge - DCO signoff on commit (AGENTS.md) ## Test evidence - `cargo test -p rutster --test barge_in_integration`: 1 passing - `cargo fmt --all --check`: pass - `cargo clippy --all --all-targets -- -D warnings`: pass - `cargo test --all`: 109 passing across all test bins
alee added 1 commit 2026-07-03 13:52:48 +00:00
test(slice-4): primary-path barge-in e2e — local VAD kills playout without brain
All checks were successful
CI / fmt (pull_request) Successful in 1m1s
CI / clippy (pull_request) Successful in 1m24s
CI / test (1.85) (pull_request) Successful in 4m10s
CI / test (stable) (pull_request) Successful in 4m17s
CI / deny (pull_request) Successful in 1m16s
6aac5b148b
This integration test proves wedge #1: loud synthetic caller audio
(samples = 1000, well above VAD_RMS_THRESHOLD = 500.0) sent through
LocalVadReflex<Reflex<TapAudioPipe>> trips the local VAD and kills
playout within one tick, without any brain advisory.

Cites README:98-100 and ARCHITECTURE.md:79-81 ("local reflexes that
don't need the brain"); see slice-4 spec §3.4, §6.1, and §7
done-criteria #8.

Signed-off-by: Aaron D. Lee <himself@adlee.work>
alee merged commit 78435f7145 into main 2026-07-04 01:54:01 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: alee/rutster#10