The standalone-path SimCall: composes slice-4's Reflex<TapAudioPipe> + outer LocalVadReflex in tokio (mirrors slice-4 barge_in_integration.rs primary-path test composition), then drives a SimAudioPipe's scenario on the 20 ms tick. Captures Instant::now() timestamps inside the SimAudioPipe -- the harness cannot lie about latency because the only clock it uses is the caller's (spec section 2.2). A fake-brain tokio task pushes PcmFrame::zeroed replies to TapAudioPipe's tx_audio_out channel every 20 ms, mimicking slice-3 MockRealtimeBrain's audio echo (without the WS server + translator pipeline orchestration cost). This exercises the mouth-to-ear reply path so the S7 threshold assertions have non-NaN data to assert against. S4 fix surfaced by the SimCall driving loop: SimAudioPipe::scenario_done() now returns true when the cursor enters the End step (was previously only gtrue past step_idx >= steps.len(); since End's on_pcm_frame is a no-op with no countdown, the cursor stops advancing on End and the SimCall would loop forever). Patched in S2's sim_audio_pipe.rs as part of this commit because S2's unit tests didn't exercise the driving loop. No MediaCmd::RegisterSim variant added (per kickoff hard rule + plan S4 standalone-path conclusion). The seam files loop_driver.rs + rtc_session.rs remain byte-identical; media_thread.rs is untouched by slice 4½. Signed-off-by: Aaron D. Lee <himself@adlee.work>
32 lines
1.2 KiB
TOML
32 lines
1.2 KiB
TOML
# crates/rutster-sim/Cargo.toml — the self-hostable benchmark + simulation
|
|
# harness crate (ADR-0010 spearhead step 4½). Default-off `sim-bench`
|
|
# feature gates the CI-regressed threshold sweep so the routine
|
|
# `cargo test --all` gate stays fast.
|
|
[package]
|
|
name = "rutster-sim"
|
|
version = "0.0.0"
|
|
license.workspace = true
|
|
edition.workspace = true
|
|
repository.workspace = true
|
|
description = "Self-hostable benchmark + simulation harness (ADR-0010 spearhead step 4½)."
|
|
|
|
[dependencies]
|
|
rutster-media = { path = "../rutster-media" }
|
|
rutster = { path = "../rutster" }
|
|
rutster-tap = { path = "../rutster-tap" }
|
|
tokio = { workspace = true, features = ["macros", "rt-multi-thread", "sync", "time"] }
|
|
serde = { workspace = true, features = ["derive"] }
|
|
toml = { workspace = true }
|
|
thiserror = { workspace = true }
|
|
tracing = { workspace = true }
|
|
url = { workspace = true }
|
|
|
|
[features]
|
|
default = []
|
|
# The CI-regressed threshold sweep. Default OFF so `cargo test --all` (the
|
|
# routine gate) stays fast. A separate CI job runs
|
|
# `cargo test --all --features=sim-bench -- --test-threads=1` per spec §5.4 +
|
|
# §6.5. A latency regression fails the build the same way a broken test
|
|
# does (ADR-0010).
|
|
sim-bench = []
|