From 2b5feea9768b56958ab348c1c8108c03f176dd5a Mon Sep 17 00:00:00 2001 From: BL Date: Tue, 20 Oct 2026 01:41:34 +0000 Subject: [PATCH 01/10] Close five TA4 mutant survivors with four small tests - gate-expander: a subnormal gain word in a restored state is refused (normal_or_zero). - session-validator: the report prints each stage label and every message line. - realtime-policy: a count in an expression macro is refused (Facts::tokens), and a bare array::from_fn after a field named std is refused (is_array_from_fn colons). Co-Authored-By: Claude Opus 5.5 --- crates/gate-expander/tests/state.rs | 21 ++++++++ .../tests/policy/drain/forms.rs | 8 ++- .../tests/policy/drain/outer.rs | 4 ++ tools/session-validator/tests/validate.rs | 51 +++++++++++++++++++ 4 files changed, 83 insertions(+), 1 deletion(-) diff --git a/crates/gate-expander/tests/state.rs b/crates/gate-expander/tests/state.rs index 4f345eb68..28eb6f86f 100644 --- a/crates/gate-expander/tests/state.rs +++ b/crates/gate-expander/tests/state.rs @@ -868,3 +868,24 @@ fn a_moving_ramp_word_past_its_domain_is_refused() { } } } + +/// A gain word that the render's flush never leaves, a subnormal inside the gain range, is +/// refused with `effect.state.gain`, and the refused restore changes nothing. +#[test] +fn a_subnormal_gain_word_is_refused() { + let mut effect = prepare(request(&active_values())); + let saved = snapshot(&effect); + let mut left = saved.1.clone(); + left[..4].copy_from_slice(&(-f32::from_bits(1)).to_le_bytes()); + let sizes = effect.metadata.state_sizes; + let input = StatePayloadInput::new(&saved.0, &left, &saved.2, sizes).expect("sizes"); + assert_eq!( + effect + .processor + .restore_state_payload(STATE_LAYOUT_VERSION, input) + .expect_err("a subnormal gain word") + .code, + "effect.state.gain" + ); + assert_eq!(snapshot(&effect), saved); +} diff --git a/tools/realtime-policy/tests/policy/drain/forms.rs b/tools/realtime-policy/tests/policy/drain/forms.rs index 3a68cc1d6..5476730d5 100644 --- a/tools/realtime-policy/tests/policy/drain/forms.rs +++ b/tools/realtime-policy/tests/policy/drain/forms.rs @@ -83,7 +83,13 @@ fn the_forms_that_d6_and_d8_state_pass() { #[test] fn a_count_that_the_rule_cannot_prove_is_refused() { - let rows: [(&str, String); 10] = [ + let rows: [(&str, String); 11] = [ + ( + "count-in-an-expression-macro", + counted( + "let available = control.available_at_entry();\n let _ = touch!(available);", + ), + ), ( "count-on-the-right-of-a-comparison", counted( diff --git a/tools/realtime-policy/tests/policy/drain/outer.rs b/tools/realtime-policy/tests/policy/drain/outer.rs index 9812781a8..77e51fab4 100644 --- a/tools/realtime-policy/tests/policy/drain/outer.rs +++ b/tools/realtime-policy/tests/policy/drain/outer.rs @@ -529,6 +529,10 @@ fn a_constructor_that_loops_is_refused_anywhere_in_a_region() { "array-from-fn-after-a-use", "fn build() {\n let _: [u8; 2] = array::from_fn(|_| 0);\n}", ), + ( + "array-from-fn-after-a-field-named-std", + "fn build() {\n let _ = S { std: &array::from_fn(|_| 0) };\n}", + ), ( "a-longer-path-ending-in-array-from-fn", "fn build() {\n let _: [u8; 2] = other::core::array::from_fn(|_| 0);\n}", diff --git a/tools/session-validator/tests/validate.rs b/tools/session-validator/tests/validate.rs index a33d6e767..ca70308b7 100644 --- a/tools/session-validator/tests/validate.rs +++ b/tools/session-validator/tests/validate.rs @@ -466,6 +466,57 @@ fn the_report_is_deterministic() { assert_eq!(first, second); } +/// The rendered report labels each stage with its own status and prints every line of a +/// diagnostic message: a one-line message after its code and path, a multi-line one indented. +#[test] +fn the_report_labels_each_stage_and_prints_every_message_line() { + let source = fixture("canonical-minimal.json").replacen( + "\"sample_rate_hz\": 48000", + "\"sample_rate_hz\": 22050", + 1, + ); + let report = validate_session_document(&source); + let rendered = report.render("session.json"); + for (index, stage) in report.stages().iter().enumerate() { + let label = match stage.status { + StageStatus::Pass => "PASS", + StageStatus::Fail => "FAIL", + StageStatus::Skipped => "SKIP", + }; + let line = format!(" {label} stage {} {}", index + 1, stage.name); + assert!(rendered.contains(&line), "{line:?} in\n{rendered}"); + } + let diagnostic = &report.stages()[1].diagnostics[0]; + assert!(!diagnostic.message.is_empty() && !diagnostic.message.contains('\n')); + let start = format!(" {} {} ", diagnostic.code, diagnostic.path); + let end = format!(" {}", diagnostic.message); + assert!( + rendered + .lines() + .any(|line| line.starts_with(&start) && line.ends_with(&end)), + "{end:?} after {start:?} in\n{rendered}" + ); + // A raw newline in a string makes a multi-line `json.syntax` message: each of its nonblank + // lines is printed, indented. + let source = fixture("canonical-minimal.json").replacen( + "\"minimal.session\"", + "\"minimal\n.session\"", + 1, + ); + let report = validate_session_document(&source); + let rendered = report.render("session.json"); + let message = &report.stages()[0].diagnostics[0].message; + assert!(message.contains('\n'), "{message:?}"); + for part in message + .lines() + .map(str::trim_end) + .filter(|part| !part.is_empty()) + { + let line = format!("\n {part}\n"); + assert!(rendered.contains(&line), "{line:?} in\n{rendered}"); + } +} + #[test] fn effect_preparation_matches_engine_and_cli_refuses_without_canonical_output() { use effect_compiler::{ From 130b222435542a19f41781845d079ba389d71bee Mon Sep 17 00:00:00 2001 From: BL Date: Tue, 20 Oct 2026 01:41:34 +0000 Subject: [PATCH 02/10] Draft TBD-TA4 gap 1 and gap 2 successor specs Gap 1: a pure seam so the fp-environment refusal can be tested. Gap 2: public functions that only tests call. Co-Authored-By: Claude Opus 5.5 --- ...4-gap-1-test-the-fp-environment-refusal.md | 17 ++++++++++++++ ...gap-2-remove-test-only-public-functions.md | 22 +++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 .github/ISSUE_SPECS/TBD-TA4-gap-1-test-the-fp-environment-refusal.md create mode 100644 .github/ISSUE_SPECS/TBD-TA4-gap-2-remove-test-only-public-functions.md diff --git a/.github/ISSUE_SPECS/TBD-TA4-gap-1-test-the-fp-environment-refusal.md b/.github/ISSUE_SPECS/TBD-TA4-gap-1-test-the-fp-environment-refusal.md new file mode 100644 index 000000000..d930ba2e9 --- /dev/null +++ b/.github/ISSUE_SPECS/TBD-TA4-gap-1-test-the-fp-environment-refusal.md @@ -0,0 +1,17 @@ +# Test that the fp-environment attestation refuses a bad readback + +Found by the TA4 survivor audit: the mutant `lane::fpenv::attest_fp_environment -> Ok(())` survives every test. + +## Problem + +`attest_fp_environment` (`crates/lane/src/fpenv.rs`) refuses a render thread when the canonical control word does not read back after it is installed (`CanonicalWordRefused`), or when the caller's word is not restored (`RestoreRefused`). On conforming x86-64 and AArch64 hardware both writes always take, so no test can reach either refusal: every test calls the function on a thread where it passes. A change that makes the function always return `Ok(())` stays green, and `host-core`'s mapping of the refusal (`crates/host-core/src/render_session.rs`) is never exercised. + +## Smallest closable slice + +Split the decision out of the hardware access: a pure function that takes the three observed words (`observed`, `readback`, `restored`) and returns the same `Result`. `attest_fp_environment` reads the words and calls it. No behaviour change on any target. + +## Gates + +1. A unit test in `crates/lane` calls the pure function with a readback whose control bits differ from the canonical word and gets `CanonicalWordRefused`; with a `restored` word that differs from `observed` it gets `RestoreRefused`; with matching words it gets `Ok`. +2. The mutant `attest_fp_environment -> Ok(())` is red, measured once (PR evidence, not a committed test). +3. No rendered bit moves; `cargo test -p lane -p host-core` is green. diff --git a/.github/ISSUE_SPECS/TBD-TA4-gap-2-remove-test-only-public-functions.md b/.github/ISSUE_SPECS/TBD-TA4-gap-2-remove-test-only-public-functions.md new file mode 100644 index 000000000..de820aaf6 --- /dev/null +++ b/.github/ISSUE_SPECS/TBD-TA4-gap-2-remove-test-only-public-functions.md @@ -0,0 +1,22 @@ +# Remove or use the public functions that only tests call + +Found by the TA4 survivor audit: mutants in these functions survive because no product path calls them. + +## Problem + +These public functions have no caller outside tests (checked at `b9135008d` with a workspace grep): + +- `conformance::PlanarBlock` and `conformance::compare_f32_to_f64` (`crates/conformance/src/block.rs`, `compare.rs`): only `crates/conformance`'s own tests use them. +- `source::PcmSourceConsumer::read_block` and its `validate_output_shape` (`crates/source/src/lib.rs`): only `crates/source`'s unit tests and `tests/` call them; the render path reads a source through `begin_block_at` and its played planes (`crates/graph/src/runtime.rs`, `crates/host-core/src/source.rs`). +- `effect_contract::map_stepped_normalized` (`crates/effect-contract/src/lib.rs`): only `crates/conformance/tests/effect_contract.rs` calls it. + +Dead public code carries tests and review cost and hides real gaps from mutation testing. + +## Smallest closable slice + +For each item, either delete it with the tests that only test it, or name the product caller that should use it and open an issue for that. Delete nothing a fuzz target, an ABI pin or a wire format uses. + +## Gates + +1. A workspace grep shows no remaining test-only public function from the list above, or the issue names the product caller for each that is kept. +2. `cargo test --workspace --all-features` and `scripts/check-workspace-policy.sh` are green. From de650299bdb3c2d41ef5240860bc66d6b2a76c9d Mon Sep 17 00:00:00 2001 From: BL Date: Tue, 20 Oct 2026 01:48:14 +0000 Subject: [PATCH 03/10] Delete measured-redundant foundation tests and the test-only code they guarded (TA4) Batch 1 (base 81a3074fc) measured these tests redundant, or UNIQUE only on code that no product path calls: conformance PlanarBlock, compare_f32_to_f64 and verify_bit_exact_repeat; effect-contract and effect-runtime normalized mapping pairs; lane CanonicalFpEnv::saved_word. Helpers the compiler then reported unused are deleted too. Co-Authored-By: Claude Opus 5.5 --- crates/conformance/src/block.rs | 68 --- crates/conformance/src/compare.rs | 235 -------- crates/conformance/src/determinism.rs | 34 -- crates/conformance/src/lib.rs | 40 +- crates/conformance/tests/api_metrics.rs | 100 ---- crates/conformance/tests/effect_contract.rs | 50 +- crates/conformance/tests/fixtures.rs | 11 +- crates/effect-contract/src/lib.rs | 64 --- crates/effect-contract/tests/lattice.rs | 60 +- crates/effect-contract/tests/live_control.rs | 9 - crates/effect-contract/tests/paired_spans.rs | 58 -- crates/effect-runtime/src/params.rs | 55 +- crates/effect-runtime/tests/MUTATIONS.md | 14 +- crates/effect-runtime/tests/bank.rs | 8 - .../tests/contract_ramp_identity.rs | 29 - crates/effect-runtime/tests/dynamics.rs | 136 ----- crates/effect-runtime/tests/lane_identity.rs | 22 - crates/effect-runtime/tests/params.rs | 66 +-- crates/effect-runtime/tests/ramp.rs | 45 -- crates/lane/src/fpenv.rs | 12 - crates/lane/tests/MUTATIONS.md | 8 +- crates/lane/tests/fader_matrix.rs | 165 ------ crates/lane/tests/fp_env.rs | 32 +- crates/lane/tests/g4_flush.rs | 95 ---- crates/lane/tests/meter_peak.rs | 91 --- crates/lane/tests/sanitise_counter.rs | 63 --- crates/math/tests/f1_fast_db_bounds.rs | 112 ---- .../soft-clip/tests/partition_invariance.rs | 118 ---- crates/source/tests/seek_schedule_model.rs | 533 ------------------ hosts/host-web/tests/retained_ceilings.rs | 294 ---------- scripts/check-effect-runtime-policy.sh | 6 +- tools/session-validator/tests/skill.rs | 111 ---- 32 files changed, 37 insertions(+), 2707 deletions(-) delete mode 100644 crates/conformance/src/block.rs delete mode 100644 crates/conformance/src/compare.rs delete mode 100644 crates/conformance/src/determinism.rs delete mode 100644 crates/conformance/tests/api_metrics.rs delete mode 100644 crates/soft-clip/tests/partition_invariance.rs delete mode 100644 crates/source/tests/seek_schedule_model.rs delete mode 100644 hosts/host-web/tests/retained_ceilings.rs delete mode 100644 tools/session-validator/tests/skill.rs diff --git a/crates/conformance/src/block.rs b/crates/conformance/src/block.rs deleted file mode 100644 index 9932895c0..000000000 --- a/crates/conformance/src/block.rs +++ /dev/null @@ -1,68 +0,0 @@ -//! Validated borrowed planar blocks. - -use engine::{SampleRateHz, is_launch_sample_rate}; - -/// `PlanarBlock` construction errors. -#[derive(Clone, Debug, Eq, PartialEq)] -pub enum BlockError { - /// Rate is not a launch rate. - InvalidRate, - /// Channels or frames is zero. - Empty, - /// Channel/frame multiplication overflowed. - Overflow, - /// Samples do not match the shape. - WrongLength, -} - -/// Borrowed channel-major planar samples with a validated shape. -#[derive(Clone, Copy, Debug)] -pub struct PlanarBlock<'a, T> { - rate: SampleRateHz, - channels: usize, - frames: usize, - samples: &'a [T], -} - -impl<'a, T> PlanarBlock<'a, T> { - /// Validates and constructs a planar block. - pub fn try_new( - rate: SampleRateHz, - channels: usize, - frames: usize, - samples: &'a [T], - ) -> Result { - if !is_launch_sample_rate(rate) { - return Err(BlockError::InvalidRate); - } - if channels == 0 || frames == 0 { - return Err(BlockError::Empty); - } - let length = channels.checked_mul(frames).ok_or(BlockError::Overflow)?; - if length != samples.len() { - return Err(BlockError::WrongLength); - } - Ok(Self { - rate, - channels, - frames, - samples, - }) - } - /// Returns the validated sample rate. - pub const fn rate(&self) -> SampleRateHz { - self.rate - } - /// Returns channels. - pub const fn channels(&self) -> usize { - self.channels - } - /// Returns frames per channel. - pub const fn frames(&self) -> usize { - self.frames - } - /// Returns channel-major samples. - pub const fn samples(&self) -> &'a [T] { - self.samples - } -} diff --git a/crates/conformance/src/compare.rs b/crates/conformance/src/compare.rs deleted file mode 100644 index dad2ba2fb..000000000 --- a/crates/conformance/src/compare.rs +++ /dev/null @@ -1,235 +0,0 @@ -//! Stable numerical metrics for `f32` implementation output versus an `f64` oracle. - -use crate::PlanarBlock; - -/// Error conditions for comparison. -#[derive(Clone, Debug, Eq, PartialEq)] -pub enum ComparisonError { - /// Sample rates differ. - RateMismatch, - /// Shapes differ. - ShapeMismatch, - /// A tolerance is negative or non-finite. - InvalidTolerance, - /// Input contains a non-finite value. - NonFiniteInput, - /// A finite input/tolerance combination overflowed a derived metric. - NonFiniteComputation, -} - -/// Absolute plus reference-scaled tolerance. -#[derive(Clone, Copy, Debug, PartialEq)] -pub struct ComparisonTolerance { - /// Constant permitted absolute error. - pub absolute: f64, - /// Permitted error proportional to absolute reference sample. - pub relative: f64, - /// Minimum denominator for relative-error reporting. - pub relative_floor: f64, -} - -/// The location of a reported sample in a planar block. -#[derive(Clone, Copy, Debug, Eq, PartialEq)] -pub struct SampleLocation { - /// Channel index. - pub channel: usize, - /// Frame index. - pub frame: usize, -} - -/// Complete deterministic comparison measurements. -#[derive(Clone, Debug, PartialEq)] -pub struct ComparisonReport { - /// Samples compared. - pub sample_count: usize, - /// Actual peak absolute sample. - pub actual_peak: f64, - /// Reference peak absolute sample. - pub reference_peak: f64, - /// Actual stable RMS. - pub actual_rms: f64, - /// Reference stable RMS. - pub reference_rms: f64, - /// Peak absolute error. - pub peak_error: f64, - /// RMS error. - pub rms_error: f64, - /// Largest relative error using `relative_floor`. - pub max_relative_error: f64, - /// Signal-to-noise ratio with explicit exact/silent boundary cases. - pub snr_db: SnrDb, - /// Location of greatest normalized tolerance error. - pub worst_sample: SampleLocation, - /// Largest error divided by sample tolerance. - pub worst_normalized_error: f64, - /// Whether every sample passed tolerance. - pub within_tolerance: bool, -} - -/// Explicit signal-to-noise result; no sentinel dB values are used. -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum SnrDb { - /// A finite dB result. - Finite(f64), - /// Reference is nonzero and error is exactly zero. - PositiveInfinity, - /// Reference is zero and error is nonzero. - NegativeInfinity, - /// Both reference and error are exactly zero. - Undefined, -} - -/// Compares an implementation block with an independent `f64` planar reference. -pub fn compare_f32_to_f64( - actual: PlanarBlock<'_, f32>, - reference: PlanarBlock<'_, f64>, - tolerance: ComparisonTolerance, -) -> Result { - if !tolerance.absolute.is_finite() - || !tolerance.relative.is_finite() - || !tolerance.relative_floor.is_finite() - || tolerance.absolute < 0.0 - || tolerance.relative < 0.0 - || tolerance.relative_floor <= 0.0 - { - return Err(ComparisonError::InvalidTolerance); - } - if actual.rate() != reference.rate() { - return Err(ComparisonError::RateMismatch); - } - if actual.channels() != reference.channels() || actual.frames() != reference.frames() { - return Err(ComparisonError::ShapeMismatch); - } - let mut actual_peak = 0.0_f64; - let mut reference_peak = 0.0_f64; - let mut peak_error = 0.0_f64; - let mut max_relative_error = 0.0_f64; - let mut worst = SampleLocation { - channel: 0, - frame: 0, - }; - let mut worst_normalized = 0.0_f64; - let mut within = true; - let mut actual_squares = ScaledSumSquares::default(); - let mut reference_squares = ScaledSumSquares::default(); - let mut error_squares = ScaledSumSquares::default(); - for (index, (actual_value, reference_value)) in - actual.samples().iter().zip(reference.samples()).enumerate() - { - if !actual_value.is_finite() || !reference_value.is_finite() { - return Err(ComparisonError::NonFiniteInput); - } - let actual_value = f64::from(*actual_value); - let error = (actual_value - reference_value).abs(); - let limit = tolerance.absolute + tolerance.relative * reference_value.abs(); - let relative_error = error / reference_value.abs().max(tolerance.relative_floor); - if !error.is_finite() || !limit.is_finite() || !relative_error.is_finite() { - return Err(ComparisonError::NonFiniteComputation); - } - let normalized = if limit == 0.0 { - if error == 0.0 { 0.0 } else { f64::INFINITY } - } else { - error / limit - }; - actual_peak = actual_peak.max(actual_value.abs()); - reference_peak = reference_peak.max(reference_value.abs()); - peak_error = peak_error.max(error); - max_relative_error = max_relative_error.max(relative_error); - if normalized > worst_normalized { - worst_normalized = normalized; - worst = SampleLocation { - channel: index / actual.frames(), - frame: index % actual.frames(), - }; - } - if error > limit { - within = false; - } - actual_squares.add(actual_value); - reference_squares.add(*reference_value); - error_squares.add(error); - } - let sample_count = actual.samples().len(); - let actual_rms = actual_squares.rms(sample_count); - let reference_rms = reference_squares.rms(sample_count); - let rms_error = error_squares.rms(sample_count); - let snr_db = if rms_error == 0.0 && reference_rms == 0.0 { - SnrDb::Undefined - } else if rms_error == 0.0 { - SnrDb::PositiveInfinity - } else if reference_rms == 0.0 { - SnrDb::NegativeInfinity - } else { - // Issue #105: the allowlist entry this `#[expect]` replaces - // (`scripts/check-math-policy.sh`, retired in favour of `clippy.toml`'s - // `disallowed-methods`). This SNR figure is offline comparison-report output, not a - // render-path value. - #[expect( - clippy::disallowed_methods, - reason = "issue #105: offline SNR report conversion, not a render-path value" - )] - let value = 20.0 * (reference_rms / rms_error).log10(); - if !value.is_finite() { - return Err(ComparisonError::NonFiniteComputation); - } - SnrDb::Finite(value) - }; - Ok(ComparisonReport { - sample_count, - actual_peak, - reference_peak, - actual_rms, - reference_rms, - peak_error, - rms_error, - max_relative_error, - snr_db, - worst_sample: worst, - worst_normalized_error: worst_normalized, - within_tolerance: within, - }) -} - -#[derive(Default)] -struct ScaledSumSquares { - scale: f64, - scaled_sum: f64, -} - -impl ScaledSumSquares { - fn add(&mut self, value: f64) { - let absolute = value.abs(); - if absolute == 0.0 { - return; - } - if self.scale < absolute { - let ratio = self.scale / absolute; - self.scaled_sum = 1.0 + self.scaled_sum * ratio * ratio; - self.scale = absolute; - } else { - let ratio = absolute / self.scale; - self.scaled_sum += ratio * ratio; - } - } - - fn rms(&self, count: usize) -> f64 { - if self.scale == 0.0 { - 0.0 - } else { - self.scale * (self.scaled_sum / count as f64).sqrt() - } - } -} - -#[cfg(test)] -mod tests { - use super::ScaledSumSquares; - - #[test] - fn scaled_sum_squares_handles_extreme_finite_values() { - let mut sum = ScaledSumSquares::default(); - sum.add(f64::MAX / 2.0); - sum.add(f64::MAX / 2.0); - assert_eq!(sum.rms(2), f64::MAX / 2.0); - } -} diff --git a/crates/conformance/src/determinism.rs b/crates/conformance/src/determinism.rs deleted file mode 100644 index d9cf0c007..000000000 --- a/crates/conformance/src/determinism.rs +++ /dev/null @@ -1,34 +0,0 @@ -//! Bit-level repeatability helpers. - -/// Repeat-render validation failures. -#[derive(Clone, Debug, Eq, PartialEq)] -pub enum DeterminismError { - /// The two outputs have different sizes. - LengthMismatch, - /// A specific f32 bit pattern differs. - BitMismatch { - /// Sample index. - index: usize, - /// First output bits. - first: u32, - /// Second output bits. - second: u32, - }, -} - -/// Verifies exact `f32::to_bits` equality, preserving signed zero and NaN payloads. -pub fn verify_bit_exact_repeat(first: &[f32], second: &[f32]) -> Result<(), DeterminismError> { - if first.len() != second.len() { - return Err(DeterminismError::LengthMismatch); - } - for (index, (left, right)) in first.iter().zip(second).enumerate() { - if left.to_bits() != right.to_bits() { - return Err(DeterminismError::BitMismatch { - index, - first: left.to_bits(), - second: right.to_bits(), - }); - } - } - Ok(()) -} diff --git a/crates/conformance/src/lib.rs b/crates/conformance/src/lib.rs index 14b52e5cb..df856557a 100644 --- a/crates/conformance/src/lib.rs +++ b/crates/conformance/src/lib.rs @@ -1,8 +1,5 @@ -//! Deterministic fixture, numerical comparison, and repeatability harnesses. +//! Deterministic fixture, effect-conformance, and protocol-corpus harnesses. -mod block; -mod compare; -mod determinism; mod effect; mod fixture; mod manifest; @@ -11,12 +8,6 @@ mod protocol_corpus; pub mod ramp_endpoint; mod randomized; -pub use block::{BlockError, PlanarBlock}; -pub use compare::{ - ComparisonError, ComparisonReport, ComparisonTolerance, SampleLocation, SnrDb, - compare_f32_to_f64, -}; -pub use determinism::{DeterminismError, verify_bit_exact_repeat}; pub use dsp_reference::{F64PlanarBuffer, IdentityProcessor, render_planar_f64}; pub use effect::{ ConformanceConfig, DUAL_ACCUMULATOR_DELAY_DESCRIPTOR, DualAccumulatorDelayFactory, @@ -90,33 +81,4 @@ mod tests { assert!((-1.0..1.0).contains(&value)); } } - - #[test] - fn block_metrics_and_repeat_bits_cover_boundaries() { - let actual = [1.0_f32, -0.0]; - let block = PlanarBlock::try_new(SampleRateHz(48_000), 1, 2, &actual).expect("block"); - let expected = [1.0_f64, 0.0]; - let reference = - PlanarBlock::try_new(SampleRateHz(48_000), 1, 2, &expected).expect("reference"); - let report = compare_f32_to_f64( - block, - reference, - ComparisonTolerance { - absolute: 1e-6, - relative: 2e-5, - relative_floor: 1e-12, - }, - ) - .expect("compare"); - assert!(report.within_tolerance); - assert_eq!(report.peak_error, 0.0); - assert!( - verify_bit_exact_repeat( - &[f32::from_bits(0x8000_0000), f32::from_bits(0x7fc0_0042)], - &[f32::from_bits(0x8000_0000), f32::from_bits(0x7fc0_0042)] - ) - .is_ok() - ); - assert!(verify_bit_exact_repeat(&[0.0], &[-0.0]).is_err()); - } } diff --git a/crates/conformance/tests/api_metrics.rs b/crates/conformance/tests/api_metrics.rs deleted file mode 100644 index 365966d7d..000000000 --- a/crates/conformance/tests/api_metrics.rs +++ /dev/null @@ -1,100 +0,0 @@ -//! Adversarial public metric and block semantics. - -use conformance::{ - BlockError, ComparisonError, ComparisonTolerance, PlanarBlock, SampleLocation, SampleRateHz, - SnrDb, compare_f32_to_f64, -}; - -const TOLERANCE: ComparisonTolerance = ComparisonTolerance { - absolute: 0.25, - relative: 0.0, - relative_floor: 1e-12, -}; - -#[test] -fn tolerance_boundary_tie_and_snr_cases_are_explicit() { - let actual_samples = [0.0_f32, 0.0]; - let reference_samples = [0.25_f64, -0.25]; - let actual = PlanarBlock::try_new(SampleRateHz(48_000), 1, 2, &actual_samples).unwrap(); - let reference = PlanarBlock::try_new(SampleRateHz(48_000), 1, 2, &reference_samples).unwrap(); - let report = compare_f32_to_f64(actual, reference, TOLERANCE).unwrap(); - assert!(report.within_tolerance); - assert_eq!( - report.worst_sample, - SampleLocation { - channel: 0, - frame: 0 - } - ); - assert!(matches!(report.snr_db, SnrDb::Finite(value) if value.abs() < 1e-12)); - - let zeros_f32 = [0.0_f32]; - let zeros_f64 = [0.0_f64]; - let actual = PlanarBlock::try_new(SampleRateHz(48_000), 1, 1, &zeros_f32).unwrap(); - let reference = PlanarBlock::try_new(SampleRateHz(48_000), 1, 1, &zeros_f64).unwrap(); - assert!(matches!( - compare_f32_to_f64(actual, reference, TOLERANCE) - .unwrap() - .snr_db, - SnrDb::Undefined - )); - - let nonzero_f32 = [0.25_f32]; - let actual = PlanarBlock::try_new(SampleRateHz(48_000), 1, 1, &nonzero_f32).unwrap(); - let reference = PlanarBlock::try_new(SampleRateHz(48_000), 1, 1, &zeros_f64).unwrap(); - assert!(matches!( - compare_f32_to_f64(actual, reference, TOLERANCE) - .unwrap() - .snr_db, - SnrDb::NegativeInfinity - )); - - let one_f32 = [1.0_f32]; - let one_f64 = [1.0_f64]; - let actual = PlanarBlock::try_new(SampleRateHz(48_000), 1, 1, &one_f32).unwrap(); - let reference = PlanarBlock::try_new(SampleRateHz(48_000), 1, 1, &one_f64).unwrap(); - assert!(matches!( - compare_f32_to_f64(actual, reference, TOLERANCE) - .unwrap() - .snr_db, - SnrDb::PositiveInfinity - )); -} - -#[test] -fn invalid_rates_shapes_tolerances_and_nonfinite_values_are_typed() { - assert!(matches!( - PlanarBlock::try_new(SampleRateHz(1), 1, 1, &[0.0_f32]), - Err(BlockError::InvalidRate) - )); - let actual_samples = [0.0_f32]; - let reference_samples = [0.0_f64]; - let actual = PlanarBlock::try_new(SampleRateHz(48_000), 1, 1, &actual_samples).unwrap(); - let reference = PlanarBlock::try_new(SampleRateHz(96_000), 1, 1, &reference_samples).unwrap(); - assert_eq!( - compare_f32_to_f64(actual, reference, TOLERANCE), - Err(ComparisonError::RateMismatch) - ); - - let actual = PlanarBlock::try_new(SampleRateHz(48_000), 1, 1, &actual_samples).unwrap(); - let reference = PlanarBlock::try_new(SampleRateHz(48_000), 1, 1, &reference_samples).unwrap(); - assert_eq!( - compare_f32_to_f64( - actual, - reference, - ComparisonTolerance { - absolute: f64::NAN, - ..TOLERANCE - } - ), - Err(ComparisonError::InvalidTolerance) - ); - - let bad = [f32::INFINITY]; - let actual = PlanarBlock::try_new(SampleRateHz(48_000), 1, 1, &bad).unwrap(); - let reference = PlanarBlock::try_new(SampleRateHz(48_000), 1, 1, &reference_samples).unwrap(); - assert_eq!( - compare_f32_to_f64(actual, reference, TOLERANCE), - Err(ComparisonError::NonFiniteInput) - ); -} diff --git a/crates/conformance/tests/effect_contract.rs b/crates/conformance/tests/effect_contract.rs index d7cb8371b..0616e7d42 100644 --- a/crates/conformance/tests/effect_contract.rs +++ b/crates/conformance/tests/effect_contract.rs @@ -20,11 +20,9 @@ use conformance::{ use effect_contract::{ BankWidth, DescriptorDiagnosticCode, DescriptorError, EffectDescriptor, EffectQuality, InitialParameterValue, LinkMode, NativeEffectFactory, ParameterChannel, ParameterId, - ParameterMapping, ParameterSmoother, PrepareEffectBankRequest, PrepareEffectLimits, - PrepareEffectRequest, PreparedAutomationSpan, PreparedPorts, PreparedSidechainPort, - QualityDescriptor, RegisteredTailBound, SmoothingRule, expected_prepared_metadata, - inverse_map_normalized, inverse_map_stepped_normalized, map_normalized, map_stepped_normalized, - validate_automation_block, validate_descriptor, + PrepareEffectBankRequest, PrepareEffectLimits, PrepareEffectRequest, PreparedAutomationSpan, + PreparedPorts, PreparedSidechainPort, QualityDescriptor, RegisteredTailBound, + expected_prepared_metadata, validate_automation_block, validate_descriptor, }; /// The mock's 48 kHz `Normal` entry, read from a registry that admitted it (issue #1462). @@ -120,48 +118,6 @@ fn correct_factory_binds_distinguishable_four_lane_bank() { } } -#[test] -fn normalized_mapping_endpoints_ties_and_round_trips_are_stable() { - for mapping in [ - ParameterMapping::Linear, - ParameterMapping::Logarithmic, - ParameterMapping::Exponential, - ] { - assert_eq!(map_normalized(mapping, 2.0, 8.0, 0.0), Some(2.0)); - assert_eq!(map_normalized(mapping, 2.0, 8.0, 1.0), Some(8.0)); - let value = map_normalized(mapping, 2.0, 8.0, 0.375).unwrap(); - assert!((inverse_map_normalized(mapping, 2.0, 8.0, value).unwrap() - 0.375).abs() < 2e-6); - } - assert_eq!(map_stepped_normalized(&[0.0, 1.0], 0.5), Some(0.0)); - assert_eq!(map_stepped_normalized(&[0.0, 1.0, 4.0], 0.75), Some(1.0)); - assert_eq!( - inverse_map_stepped_normalized(&[0.0, 1.0, 4.0], 4.0), - Some(1.0) - ); - assert!(map_normalized(ParameterMapping::Linear, 0.0, 1.0, f32::NAN).is_none()); -} - -#[test] -fn smoothers_finish_on_the_exact_update() { - let mut linear = ParameterSmoother::new(0.0, SmoothingRule::Linear, 4).unwrap(); - assert!(linear.set_target(1.0)); - assert_eq!( - [ - linear.next_value(), - linear.next_value(), - linear.next_value(), - linear.next_value() - ], - [0.25, 0.5, 0.75, 1.0] - ); - let mut pole = ParameterSmoother::new(0.0, SmoothingRule::OnePole99, 4).unwrap(); - assert!(pole.set_target(1.0)); - for _ in 0..3 { - assert!(pole.next_value() < 1.0); - } - assert_eq!(pole.next_value(), 1.0); -} - #[test] fn correct_mock_passes_every_enabled_conformance_gate() { armed(); diff --git a/crates/conformance/tests/fixtures.rs b/crates/conformance/tests/fixtures.rs index c50825dbb..debafd32d 100644 --- a/crates/conformance/tests/fixtures.rs +++ b/crates/conformance/tests/fixtures.rs @@ -1,6 +1,6 @@ //! Public API integration coverage for checked-in fixtures. -use conformance::{FixtureError, FixtureLimits, PcmFixture, PlanarBlock, parse_manifest}; +use conformance::{FixtureError, FixtureLimits, PcmFixture, parse_manifest}; use engine::{LAUNCH_SAMPLE_RATES, SampleRateHz}; #[test] @@ -18,13 +18,12 @@ fn checked_in_manifest_lists_only_valid_exact_fixtures() { } } -/// Owner ruling R5 (#1036): blocks and fixtures exist at the launch rates only. The former +/// Owner ruling R5 (#1036): fixtures exist at the launch rates only. The former /// extended research rates (176.4-384 kHz) refuse exactly like any other rate. #[test] -fn planar_blocks_and_fixtures_accept_only_launch_rates() { +fn fixtures_accept_only_launch_rates() { let samples = [0.0_f32]; for rate in LAUNCH_SAMPLE_RATES { - assert!(PlanarBlock::try_new(rate, 1, 1, &samples).is_ok()); let bytes = PcmFixture::encode(rate, 1, 1, &samples).expect("launch-rate fixture"); assert_eq!( PcmFixture::parse(&bytes, FixtureLimits::default()) @@ -35,10 +34,6 @@ fn planar_blocks_and_fixtures_accept_only_launch_rates() { } let launch = PcmFixture::encode(SampleRateHz(48_000), 1, 1, &samples).expect("launch"); for rate in [176_400, 192_000, 352_800, 384_000, 0, 32_000, 192_001].map(SampleRateHz) { - assert!( - PlanarBlock::try_new(rate, 1, 1, &samples).is_err(), - "{rate:?}" - ); assert_eq!( PcmFixture::encode(rate, 1, 1, &samples), Err(FixtureError::InvalidField), diff --git a/crates/effect-contract/src/lib.rs b/crates/effect-contract/src/lib.rs index b9d4d248f..8060b9e9d 100644 --- a/crates/effect-contract/src/lib.rs +++ b/crates/effect-contract/src/lib.rs @@ -1217,71 +1217,7 @@ pub fn validate_descriptor(d: &'static EffectDescriptor) -> Result<(), Descripto Err(DescriptorErrorSet(e)) } } -pub fn map_normalized(m: ParameterMapping, a: f32, b: f32, x: f32) -> Option { - if !(a.is_finite() && b.is_finite() && a < b && x.is_finite() && (0.0..=1.0).contains(&x)) { - return None; - } - if x == 0.0 { - return Some(a); - } - if x == 1.0 { - return Some(b); - } - match m { - ParameterMapping::Linear => Some(a + x * (b - a)), - ParameterMapping::Logarithmic if a > 0.0 => Some(a * math::powf(b / a, x)), - ParameterMapping::Exponential => Some(a + (b - a) * x * x), - _ => None, - } -} -pub fn inverse_map_normalized(m: ParameterMapping, a: f32, b: f32, v: f32) -> Option { - if !(a.is_finite() && b.is_finite() && a < b && v.is_finite() && v >= a && v <= b) { - return None; - } - if canonical_bits(v) == canonical_bits(a) { - return Some(0.0); - } - if canonical_bits(v) == canonical_bits(b) { - return Some(1.0); - } - match m { - ParameterMapping::Linear => Some((v - a) / (b - a)), - ParameterMapping::Logarithmic if a > 0.0 => Some(math::logf(v / a) / math::logf(b / a)), - ParameterMapping::Exponential => Some(((v - a) / (b - a)).sqrt()), - _ => None, - } -} -/// Select a legal stepped-domain value, with exact ties resolved toward the lower value. -pub fn map_stepped_normalized(choices: &[f32], x: f32) -> Option { - if choices.len() < 2 - || !x.is_finite() - || !(0.0..=1.0).contains(&x) - || choices.iter().any(|v| !v.is_finite()) - || choices.windows(2).any(|pair| pair[0] >= pair[1]) - { - return None; - } - let position = x * (choices.len() - 1) as f32; - let lower = position.floor() as usize; - let upper = position.ceil() as usize; - if position - lower as f32 <= upper as f32 - position { - Some(choices[lower]) - } else { - Some(choices[upper]) - } -} - -/// Return the normalized zero-based index of an exact legal stepped-domain value. -pub fn inverse_map_stepped_normalized(choices: &[f32], value: f32) -> Option { - if choices.len() < 2 || !value.is_finite() { - return None; - } - choices - .iter() - .position(|choice| canonical_bits(*choice) == canonical_bits(value)) - .map(|index| index as f32 / (choices.len() - 1) as f32) -} #[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] pub struct PreparedPorts { pub sidechain: PreparedSidechainPort, diff --git a/crates/effect-contract/tests/lattice.rs b/crates/effect-contract/tests/lattice.rs index 1d6597377..9dfa90242 100644 --- a/crates/effect-contract/tests/lattice.rs +++ b/crates/effect-contract/tests/lattice.rs @@ -6,9 +6,9 @@ //! `effect-compiler`, which is the crate that can see every launch effect at once. use effect_contract::{ - AutomationRate, EnumChoice, LatticePoint, ParameterChannelPolicy, ParameterDescriptor, - ParameterDomain, ParameterId, ParameterLattice, ParameterMapping, ParameterUnit, SmoothingRule, - StepSize, canonical_descriptor_decimal, decimal_to_f32, lattice_index_for_decimal, + AutomationRate, LatticePoint, ParameterChannelPolicy, ParameterDescriptor, ParameterDomain, + ParameterId, ParameterLattice, ParameterMapping, ParameterUnit, SmoothingRule, StepSize, + canonical_descriptor_decimal, decimal_to_f32, lattice_index_for_decimal, parameter_lattice_points, resolve_parameter_step, }; @@ -308,60 +308,6 @@ fn refusal_names_the_two_nearest_legal_values() { // Enumerations and booleans. // --------------------------------------------------------------------------- -#[test] -fn an_enumeration_lattice_is_spelled_in_choice_values_and_indexed_by_ordinal() { - static CHOICES: [EnumChoice; 6] = [ - EnumChoice { - value: 1.0, - label: "bell", - }, - EnumChoice { - value: 2.0, - label: "low-shelf", - }, - EnumChoice { - value: 3.0, - label: "high-shelf", - }, - EnumChoice { - value: 4.0, - label: "low-pass", - }, - EnumChoice { - value: 5.0, - label: "high-pass", - }, - EnumChoice { - value: 6.0, - label: "notch", - }, - ]; - let mut parameter = descriptor( - ParameterUnit::Linear, - ParameterDomain::Enumeration, - ParameterMapping::Stepped, - None, - None, - 1.0, - ParameterLattice::indices(), - ); - parameter.enum_choices = &CHOICES; - let points = parameter_lattice_points(¶meter).expect("index lattice"); - // The document spells the CHOICE VALUE; the persist plane carries the ORDINAL. Conflating - // the two would refuse the last choice and silently relabel every other one. - assert_eq!( - points - .iter() - .map(|p| p.canonical.as_str()) - .collect::>(), - ["1", "2", "3", "4", "5", "6"] - ); - assert_eq!(lattice_index_for_decimal(&points, "6.0"), Ok(5)); - assert_eq!(lattice_index_for_decimal(&points, "1"), Ok(0)); - assert!(lattice_index_for_decimal(&points, "7").is_err()); - assert!(lattice_index_for_decimal(&points, "1.5").is_err()); -} - #[test] fn a_boolean_lattice_admits_exactly_its_two_encodings() { let points = parameter_lattice_points(&descriptor( diff --git a/crates/effect-contract/tests/live_control.rs b/crates/effect-contract/tests/live_control.rs index 63cef0fb2..1c1fc5bd7 100644 --- a/crates/effect-contract/tests/live_control.rs +++ b/crates/effect-contract/tests/live_control.rs @@ -215,15 +215,6 @@ fn a_repeated_write_collapses_last_wins_and_is_counted() { assert_eq!(rig.superseded.get(), 1); } -/// A drain leaves the cells read: the next block stages nothing. -#[test] -fn a_drained_cell_stages_nothing_on_the_next_block() { - let mut rig = Rig::new(shape(&[1], &[], 0), 0); - rig.commit(&[left(1, 0.5)]).expect("a cell"); - assert_eq!(rig.stage().staged, 1); - assert_eq!(rig.stage().staged, 0); -} - /// A lane holds no carried slots until a successor swap installs them (#1633 D1), refuses to be /// carried into before that (D2), and its retained bytes grow by exactly the charge the install /// is admitted against. diff --git a/crates/effect-contract/tests/paired_spans.rs b/crates/effect-contract/tests/paired_spans.rs index 249d3ad79..34c3f7013 100644 --- a/crates/effect-contract/tests/paired_spans.rs +++ b/crates/effect-contract/tests/paired_spans.rs @@ -106,14 +106,6 @@ fn a_twin_pair_keeps_live_in_either_write_order() { ); } -#[test] -fn a_lone_one_channel_write_clears_live() { - assert!(!keeps(&[left(0, -12.0)])); - assert!(!keeps(&[right(0, -12.0)])); - assert!(!keeps(&[left(0, -12.0), right(0, -12.0), left(1, 4.0)])); - assert!(!keeps(&[left(0, -12.0), right(0, -12.0), right(1, 4.0)])); -} - #[test] fn near_pairs_clear_live() { let value = -12.0_f32; @@ -142,56 +134,6 @@ fn near_pairs_clear_live() { ); } -#[test] -fn last_wins_decides_the_pair() { - // [L v1, L v2, R v2]: the cells end at L v2, R v2. - assert!(keeps(&[left(0, -6.0), left(0, -9.0), right(0, -9.0)])); - // [L v1, R v2, L v2]: L is replaced by v2, which R already holds. - assert!(keeps(&[left(0, -6.0), right(0, -9.0), left(0, -9.0)])); - // [L v1, R v1, L v2]: the pair came apart again before the block. - assert!(!keeps(&[left(0, -6.0), right(0, -6.0), left(0, -9.0)])); - // One channel written twice, the other once to the *first* value. - assert!(!keeps(&[left(0, -6.0), left(0, -9.0), right(0, -6.0)])); - // A restatement of the held value is an ordinary pair. - assert!(keeps(&[ - left(0, -6.0), - right(0, -6.0), - left(0, -6.0), - right(0, -6.0) - ])); -} - -#[test] -fn a_shared_parameters_both_cell_needs_no_twin_and_does_not_break_a_pair() { - assert!(keeps(&[both(2, 1.0)])); - assert!(keeps(&[both(2, 1.0), left(0, -6.0), right(0, -6.0)])); - assert!(!keeps(&[both(2, 1.0), left(0, -6.0)])); -} - -#[test] -fn a_pair_split_across_two_blocks_clears_live() { - for (first, second) in [ - (left(0, -6.0), right(0, -6.0)), - (right(0, -6.0), left(0, -6.0)), - ] { - let mut rig = Rig::new(shape(0), 0); - rig.commit_each(&[first]); - rig.stage(); - assert!(!rig.live(), "the first half alone is a one-channel write"); - rig.commit_each(&[second]); - rig.stage(); - assert!(!rig.live(), "and nothing re-earns the term"); - } - // The other way round: a kept pair, then a lone write in the next block. - let mut rig = Rig::new(shape(0), 0); - rig.commit_each(&[left(0, -6.0), right(0, -6.0)]); - rig.stage(); - assert!(rig.live()); - rig.commit_each(&[left(0, -9.0)]); - rig.stage(); - assert!(!rig.live()); -} - #[test] fn a_pair_whose_second_half_never_arrives_clears_live() { let mut rig = Rig::new(shape(0), 0); diff --git a/crates/effect-runtime/src/params.rs b/crates/effect-runtime/src/params.rs index 438f56c28..1d523fe6a 100644 --- a/crates/effect-runtime/src/params.rs +++ b/crates/effect-runtime/src/params.rs @@ -17,11 +17,8 @@ //! # Mapping //! //! The mapping describes how a normalised `[0, 1]` control position becomes a value, which is a -//! control-plane concern: a fader is linear in its own travel and logarithmic in frequency. The -//! logarithmic mapping is exact at both ends by construction (`t = 0` returns `minimum` and -//! `t = 1` returns `maximum`) and uses `math`, never the platform libm (D6). - -use math::{exp2f, log2f}; +//! control-plane concern: a fader is linear in its own travel and logarithmic in frequency. This +//! module only records the mapping; no render or prepare path maps a position. /// How a normalised `[0, 1]` position maps onto a parameter's range. #[derive(Clone, Copy, Debug, PartialEq, Eq)] @@ -179,54 +176,6 @@ pub fn clamp_to_domain(spec: &ParameterSpec, value: f32) -> f32 { normalize_zero(clamped) } -/// Maps a normalised position `t` in `[0, 1]` onto the parameter's range. -/// -/// `t` is clamped to `[0, 1]` first, so a control surface that overshoots cannot leave the domain. -/// The result is always a valid value for the spec. -/// -/// Frozen operation order, logarithmic: `lo = log2(minimum)`, `hi = log2(maximum)`, -/// `exp2(lo + t * (hi - lo))`, with `t == 0` and `t == 1` short-circuited to the exact endpoints -/// so a mapping round-trip is exact where it is observable. -#[must_use] -pub fn map_normalized(spec: &ParameterSpec, t: f32) -> f32 { - let t = if t.is_nan() { 0.0 } else { t.clamp(0.0, 1.0) }; - if t == 0.0 { - return clamp_to_domain(spec, spec.minimum); - } - if t == 1.0 { - return clamp_to_domain(spec, spec.maximum); - } - let value = match spec.mapping { - ParameterMapping::Logarithmic if spec.minimum > 0.0 && spec.maximum > 0.0 => { - let lo = log2f(spec.minimum); - let hi = log2f(spec.maximum); - exp2f(lo + t * (hi - lo)) - } - _ => spec.minimum + t * (spec.maximum - spec.minimum), - }; - clamp_to_domain(spec, value) -} - -/// The normalised position of `value`: the inverse of [`map_normalized`]. -/// -/// Returns `0.0` for a degenerate range (`maximum <= minimum`), where no position is meaningful. -#[must_use] -pub fn inverse_map_normalized(spec: &ParameterSpec, value: f32) -> f32 { - let value = clamp_to_domain(spec, value); - if spec.minimum.is_nan() || spec.maximum.is_nan() || spec.maximum <= spec.minimum { - return 0.0; - } - let t = match spec.mapping { - ParameterMapping::Logarithmic if spec.minimum > 0.0 && spec.maximum > 0.0 => { - let lo = log2f(spec.minimum); - let hi = log2f(spec.maximum); - (log2f(value) - lo) / (hi - lo) - } - _ => (value - spec.minimum) / (spec.maximum - spec.minimum), - }; - if t.is_nan() { 0.0 } else { t.clamp(0.0, 1.0) } -} - /// Fills `out` with each spec's default, clamped into its own domain. /// /// Returns the number of values written, which is `min(specs.len(), out.len())`. A default that diff --git a/crates/effect-runtime/tests/MUTATIONS.md b/crates/effect-runtime/tests/MUTATIONS.md index 05081b2aa..af2edabc2 100644 --- a/crates/effect-runtime/tests/MUTATIONS.md +++ b/crates/effect-runtime/tests/MUTATIONS.md @@ -234,8 +234,8 @@ byte from a saved copy in the same session. | # | mutation | test binary | result | |---|---|---|---| -| 994-R1 | the `is_finite` test dropped (`if true`), which is the pre-#994 design | `dynamics` | RED, 3 of 13: `the_overflow_bound_is_exact_and_only_it_moves`, `a_knee_whose_reciprocal_overflows_is_a_hard_knee`, `a_randomized_sweep_never_leaves_the_finite_curve` | -| 994-R2 | the test replaced by a constant bound one ulp too high: `knee_db >= f32::from_bits(0x0010_0002)` | `dynamics` | RED, 2 of 13: `the_overflow_bound_is_exact_and_only_it_moves`, `the_narrowest_soft_knees_are_finite_at_the_threshold` | +| 994-R1 | the `is_finite` test dropped (`if true`), which is the pre-#994 design | `dynamics` | RED, 3 of 13: `the_overflow_bound_is_exact_and_only_it_moves`, `a_knee_whose_reciprocal_overflows_is_a_hard_knee` (deleted by TA4; KEEP catcher effect-runtime `dynamics::knee_words_follow_the_finite_reciprocal_rule`), `a_randomized_sweep_never_leaves_the_finite_curve` | +| 994-R2 | the test replaced by a constant bound one ulp too high: `knee_db >= f32::from_bits(0x0010_0002)` | `dynamics` | RED, 2 of 13: `the_overflow_bound_is_exact_and_only_it_moves`, `the_narrowest_soft_knees_are_finite_at_the_threshold` (deleted by TA4; KEEP catcher effect-runtime `dynamics::knee_words_follow_the_finite_reciprocal_rule`) | | 994-R3 | the test replaced by a constant bound one ulp too low: `knee_db >= f32::from_bits(0x0010_0000)` | `dynamics` | RED, 3 of 13: the three tests of 994-R1 | Under 994-R1 the whole of `effect-runtime`, `compressor` and `multiband-compressor` was also run @@ -247,3 +247,13 @@ The smallest width, `0x0000_0001`, is not by itself a witness: `0.5 * 2^-149` ro its half-width is zero and the knee interval `(-W/2, W/2]` is empty even without the rule. Every list of overflowing widths in these tests therefore also carries `0x0000_0002` (the verification's 2.8e-45), `0x000F_FFFF` and `0x0010_0000`, where the half-width is positive. + +## TA4 deletions + +The 2026-10 test audit (TA4, batch 1 mutation measurement at `81a3074fc`) deleted the tests named below. Each one's caught mutants were also red in the KEEP test named beside it. That is the recorded catcher of the deleted test's sampled mutants; the mutation of each row above was not re-run. + +- `the_step_is_computed_once`: effect-runtime `contract_ramp_identity::linear_smoother_is_bit_identical_to_the_linear_ramp` +- `the_curve_matches_the_paper`: effect-runtime `dynamics::knee_words_follow_the_finite_reciprocal_rule` +- `the_corpus_is_width_independent`: lane `sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` +- `a_knee_whose_reciprocal_overflows_is_a_hard_knee`: effect-runtime `dynamics::knee_words_follow_the_finite_reciprocal_rule` +- `the_narrowest_soft_knees_are_finite_at_the_threshold`: effect-runtime `dynamics::knee_words_follow_the_finite_reciprocal_rule` diff --git a/crates/effect-runtime/tests/bank.rs b/crates/effect-runtime/tests/bank.rs index 20b92c1d7..fd57b23da 100644 --- a/crates/effect-runtime/tests/bank.rs +++ b/crates/effect-runtime/tests/bank.rs @@ -6,14 +6,6 @@ use effect_runtime::bank::{ }; use lane::{Lane, Simd4}; -/// A finite block is accepted and left alone. -#[test] -fn a_finite_block_is_accepted() { - let block: Vec = (0..512).map(|i| (i as f32) * 0.001 - 0.25).collect(); - lane::each_lane!(|L| assert!(check_block::(&block))); - assert_eq!(nonfinite_lane_mask::(&block), 0); -} - /// Every value the check must reject, and the threshold it must reject them at. /// /// Red mutations, both recorded: diff --git a/crates/effect-runtime/tests/contract_ramp_identity.rs b/crates/effect-runtime/tests/contract_ramp_identity.rs index 8717a70b3..aeb03439c 100644 --- a/crates/effect-runtime/tests/contract_ramp_identity.rs +++ b/crates/effect-runtime/tests/contract_ramp_identity.rs @@ -64,35 +64,6 @@ fn linear_smoother_is_bit_identical_to_the_linear_ramp() { } } -#[test] -fn the_precomputed_increment_is_the_declared_one_and_the_last_update_assigns() { - // The observable signature of D11: every update adds the *same* precomputed increment, so the - // trajectory is the iterated addition of one constant. The audited form recomputed - // `(target - current) / remaining` each update, whose increment grows as the rounding error - // accumulates, so it leaves this trajectory at the second update for a length of 5. - const SAMPLES: u32 = 7; - const FROM: f32 = 0.1; - const TO: f32 = 0.3; - let mut smoother = - ParameterSmoother::new(FROM, SmoothingRule::Linear, SAMPLES).expect("nonzero length"); - assert!(smoother.set_target(TO)); - - // Derived here, not read back from the smoother: an independent statement of the law. - let step = (TO - FROM) / SAMPLES as f32; - assert_eq!(smoother.step().to_bits(), step.to_bits()); - let mut expected = FROM; - for update in 1..SAMPLES { - expected += step; - assert_eq!( - smoother.next_value().to_bits(), - expected.to_bits(), - "update {update} must be the iterated addition of one constant increment" - ); - } - // The last update is the exact assignment, not an addition. - assert_eq!(smoother.next_value().to_bits(), TO.to_bits()); -} - #[test] fn no_smoothing_snaps_and_one_pole_uses_a_precomputed_coefficient() { let mut none = ParameterSmoother::new(2.0, SmoothingRule::None, 0).expect("length zero"); diff --git a/crates/effect-runtime/tests/dynamics.rs b/crates/effect-runtime/tests/dynamics.rs index 797d9a298..1bc770b36 100644 --- a/crates/effect-runtime/tests/dynamics.rs +++ b/crates/effect-runtime/tests/dynamics.rs @@ -36,45 +36,6 @@ const THRESHOLDS: [f32; 5] = [0.0, -6.0, -18.0, -40.0, -80.0]; const RATIOS: [f32; 6] = [1.0, 1.5, 2.0, 4.0, 10.0, 20.0]; const KNEES: [f32; 5] = [0.0, 1.0, 6.0, 12.0, 24.0]; -/// The lane curve matches the paper to better than 0.01 dB across the frozen grid. -/// -/// Red mutation: `half_knee_db = knee_db` instead of `0.5 * knee_db` (the knee-width halving). -/// A 6 dB knee then spans 12 dB and the error at the old knee edges is several tenths of a dB. -#[test] -fn the_curve_matches_the_paper() { - let mut worst = 0.0f64; - let mut worst_case = String::new(); - for threshold in THRESHOLDS { - for ratio in RATIOS { - for knee in KNEES { - let coefficients = GainComputerCoef::::new(threshold, ratio, knee); - let mut level = -160.0f32; - while level <= 24.0 { - let actual = f64::from(gain_computer_db::(level, &coefficients)); - let expected = oracle( - f64::from(level), - f64::from(threshold), - f64::from(ratio), - f64::from(knee), - ); - let error = (actual - expected).abs(); - if error > worst { - worst = error; - worst_case = format!( - "T {threshold} R {ratio} W {knee} x {level}: {actual} vs {expected}" - ); - } - level += 0.25; - } - } - } - } - assert!( - worst <= 0.01, - "worst deviation {worst} dB exceeds 0.01 dB at {worst_case}" - ); -} - /// The knee joins the two straight arms without a step, at both edges. /// /// At `x = T - W/2` the curve must be `x` itself, exactly; at `x = T + W/2` it must agree with the @@ -234,26 +195,6 @@ fn a_nan_level_stays_a_nan() { /// `2^-129`: the widest knee whose `f32` reciprocal `1 / (2 W)` overflows. const WIDEST_OVERFLOWING_KNEE: f32 = f32::from_bits(0x0010_0000); -/// Positive knee widths whose reciprocal overflows: the smallest subnormals, the verification's -/// 2.8e-45 (`0x0000_0002`), and the two widths just under and exactly at the bound. -const OVERFLOWING_KNEES: [u32; 6] = [ - 0x0000_0001, - 0x0000_0002, - 0x0000_0003, - 0x0008_0000, - 0x000F_FFFF, - 0x0010_0000, -]; - -/// The narrowest soft knees: the bound itself, the next widths, and a few decades above it. -const NARROWEST_SOFT_KNEES: [u32; 5] = [ - 0x0010_0001, - 0x0010_0002, - 0x0020_0000, - 0x0080_0000, - 1.0e-30_f32.to_bits(), -]; - fn bits(words: (f32, f32)) -> (u32, u32) { (words.0.to_bits(), words.1.to_bits()) } @@ -318,83 +259,6 @@ fn knee_words_follow_the_finite_reciprocal_rule() { } } -/// At the verification's failing knee (2.8e-45) and at every width up to the bound, a level -/// exactly at the threshold — and every level around it — gets the hard knee's value, bit for -/// bit, and never a NaN. -/// -/// Before #994 each of these widths designed `inv_two_knee = +inf`, and every level inside the -/// knee computed `(v * v = 0) * inf = NaN`. The thresholds include `0 dB` (where a full-scale -/// sample lands exactly on it) and a subnormal threshold, so that levels inside the tiny knee -/// exist at all. -/// -/// Red mutations (MUTATIONS.md rows 994-R1 and 994-R3): drop the `is_finite` test in -/// `knee_coefficients`, or replace it with the constant bound one ulp too low. -#[test] -fn a_knee_whose_reciprocal_overflows_is_a_hard_knee() { - for knee_bits in OVERFLOWING_KNEES { - let knee = f32::from_bits(knee_bits); - for threshold in [0.0_f32, -0.0, -1.0e-45, -18.0, -80.0] { - for ratio in RATIOS { - let hard = GainComputerCoef::::new(threshold, ratio, 0.0); - let narrow = GainComputerCoef::::new(threshold, ratio, knee); - assert_eq!(narrow.half_knee_db.to_bits(), 0); - assert_eq!(narrow.inv_two_knee.to_bits(), 0); - for level in levels_around(threshold, knee) { - let delta = gain_delta_db::(level, &narrow); - assert!( - delta.is_finite(), - "W {knee:e} T {threshold} R {ratio} x {level:e}: {delta}" - ); - assert_eq!( - delta.to_bits(), - gain_delta_db::(level, &hard).to_bits(), - "W {knee:e} T {threshold} R {ratio} x {level:e}" - ); - } - let at = gain_delta_db::(threshold, &narrow); - assert_eq!( - at.to_bits(), - 0.0_f32.to_bits(), - "W {knee:e} T {threshold} R {ratio}: exactly at the threshold the hard knee \ - changes nothing" - ); - } - } - } -} - -/// The narrowest soft knees keep their soft design and are finite everywhere around the -/// threshold, and at the threshold itself they differ from the hard knee by at most -/// `|1/R - 1| W / 8` — which, this close to the bound, is zero after rounding. -/// -/// Red mutation (MUTATIONS.md row 994-R2): the constant bound one ulp too high, which designs -/// `2^-129 + 2^-149` as a hard knee although its reciprocal is finite. -#[test] -fn the_narrowest_soft_knees_are_finite_at_the_threshold() { - for knee_bits in NARROWEST_SOFT_KNEES { - let knee = f32::from_bits(knee_bits); - for threshold in [0.0_f32, -0.0, -1.0e-45, -18.0, -80.0] { - for ratio in RATIOS { - let soft = GainComputerCoef::::new(threshold, ratio, knee); - assert!(soft.inv_two_knee.is_finite() && soft.inv_two_knee > 0.0); - for level in levels_around(threshold, knee) { - let delta = gain_delta_db::(level, &soft); - assert!( - delta.is_finite(), - "W {knee:e} T {threshold} R {ratio} x {level:e}: {delta}" - ); - } - let at = gain_delta_db::(threshold, &soft); - let bound = f64::from((1.0 / ratio - 1.0).abs()) * f64::from(knee) / 8.0; - assert!( - f64::from(at).abs() <= bound + f64::from(f32::from_bits(1)), - "W {knee:e} T {threshold} R {ratio}: {at:e} at the threshold, bound {bound:e}" - ); - } - } - } -} - /// A randomized sweep over admissible knees, thresholds, ratios and levels: the gain computer /// never produces a NaN or an infinity, the scalar and both SIMD widths agree bit for bit, and the /// result stays within `1e-4` dB of the paper's curve in `f64` (where the hard-knee substitution diff --git a/crates/effect-runtime/tests/lane_identity.rs b/crates/effect-runtime/tests/lane_identity.rs index 7c9d73e80..2f04ae2c7 100644 --- a/crates/effect-runtime/tests/lane_identity.rs +++ b/crates/effect-runtime/tests/lane_identity.rs @@ -12,7 +12,6 @@ //! stride by something other than the width. use effect_runtime::bank::{check_block, nonfinite_lane_mask}; -use effect_runtime::corpus::{CASE_NAMES, POINTS, run_case}; use effect_runtime::ramp::LinearRamp; use lane::kernels::RampSegment; use lane::{Lane, Simd4}; @@ -23,27 +22,6 @@ fn lane_words(value: L) -> Vec { words } -/// The whole corpus — the gain computer at three ratios, both dB conversions, both followers and -/// the hysteresis — is width-independent, word for word. -#[test] -fn the_corpus_is_width_independent() { - let mut scalar = vec![0u32; POINTS]; - let mut vector = vec![0u32; POINTS]; - for (case, name) in CASE_NAMES.iter().enumerate() { - run_case::(case, &mut scalar); - lane::each_vector_lane!(|L, N| { - run_case::(case, &mut vector); - for point in 0..POINTS { - assert_eq!( - scalar[point], vector[point], - "{name} point {point}: W=1 {:#010x} vs W={N} {:#010x}", - scalar[point], vector[point] - ); - } - }); - } -} - /// `advance_block` produces the same segment words at every width, and the same state. #[test] fn ramp_segments_are_width_independent() { diff --git a/crates/effect-runtime/tests/params.rs b/crates/effect-runtime/tests/params.rs index d7d28a81a..93551f901 100644 --- a/crates/effect-runtime/tests/params.rs +++ b/crates/effect-runtime/tests/params.rs @@ -1,9 +1,8 @@ -//! Parameter domain validation, clamping, mapping and defaults. +//! Parameter domain validation, clamping and defaults. use effect_runtime::params::{ ParameterKind, ParameterMapping, ParameterSpec, clamp_to_domain, initial_defaults, - inverse_map_normalized, is_negative_zero, map_normalized, normalize_zero, - parameter_value_valid, + is_negative_zero, normalize_zero, parameter_value_valid, }; const THRESHOLD: ParameterSpec = ParameterSpec::continuous(-80.0, 0.0, -18.0); @@ -97,67 +96,6 @@ fn clamping_always_lands_in_the_domain() { assert_eq!(clamp_to_domain(&SLOPE, 24.0), 24.0); } -/// The mapping is exact at both ends and monotone in between. -#[test] -fn mapping_is_exact_at_the_ends_and_monotone() { - for spec in [&THRESHOLD, &FREQUENCY] { - assert_eq!(map_normalized(spec, 0.0).to_bits(), spec.minimum.to_bits()); - assert_eq!(map_normalized(spec, 1.0).to_bits(), spec.maximum.to_bits()); - assert_eq!(map_normalized(spec, -5.0).to_bits(), spec.minimum.to_bits()); - assert_eq!(map_normalized(spec, 7.0).to_bits(), spec.maximum.to_bits()); - assert_eq!( - map_normalized(spec, f32::NAN).to_bits(), - spec.minimum.to_bits() - ); - let mut previous = map_normalized(spec, 0.0); - for step in 1..=100 { - let value = map_normalized(spec, step as f32 / 100.0); - assert!( - value >= previous, - "not monotone at {step}: {previous} -> {value}" - ); - assert!(parameter_value_valid(spec, value)); - previous = value; - } - } -} - -/// A logarithmic mapping is constant-ratio: the midpoint is the geometric mean. -#[test] -fn a_logarithmic_mapping_is_constant_ratio() { - let middle = map_normalized(&FREQUENCY, 0.5); - let geometric = (10.0f64 * 20_000.0).sqrt(); - assert!( - (f64::from(middle) - geometric).abs() <= geometric * 1e-4, - "{middle} vs {geometric}" - ); - let linear_middle = map_normalized(&THRESHOLD, 0.5); - assert!((linear_middle - (-40.0)).abs() <= 1e-4, "{linear_middle}"); -} - -/// The mapping round-trips through its inverse. -#[test] -fn the_mapping_inverse_round_trips() { - for spec in [&THRESHOLD, &FREQUENCY] { - for step in 0..=20 { - let t = step as f32 / 20.0; - let value = map_normalized(spec, t); - let back = inverse_map_normalized(spec, value); - assert!((back - t).abs() <= 1e-4, "{t} -> {value} -> {back}"); - } - assert_eq!(inverse_map_normalized(spec, spec.minimum), 0.0); - assert!((inverse_map_normalized(spec, spec.maximum) - 1.0).abs() <= 1e-6); - } -} - -/// A degenerate range has no meaningful position and reports `0.0` rather than a NaN. -#[test] -fn a_degenerate_range_has_no_position() { - let point = ParameterSpec::continuous(5.0, 5.0, 5.0); - assert_eq!(inverse_map_normalized(&point, 5.0), 0.0); - assert_eq!(map_normalized(&point, 0.5).to_bits(), 5.0f32.to_bits()); -} - /// Defaults are written in order, clamped, and the write count is reported. #[test] fn defaults_are_clamped_and_counted() { diff --git a/crates/effect-runtime/tests/ramp.rs b/crates/effect-runtime/tests/ramp.rs index c1c171d68..e3aaffb23 100644 --- a/crates/effect-runtime/tests/ramp.rs +++ b/crates/effect-runtime/tests/ramp.rs @@ -44,51 +44,6 @@ fn assert_bit_equal(left: &[f32], right: &[f32], what: &str) { } } -/// The published D11 example: three samples from `0.0` to `1.0` are `1/3`, `1/3 + 1/3`, `1.0`. -/// -/// The old law — re-deriving the step from the remaining distance every sample — gives `0.5` at -/// the second sample. That is the discriminating value. -/// -/// Red mutation: `next_value()` recomputes `(target - current) / remaining as f32` per call. -#[test] -fn the_step_is_computed_once() { - let mut ramp = LinearRamp::fixed(0.0); - ramp.set_target(1.0, 3); - let third = 1.0f32 / 3.0; - assert_eq!(ramp.next_value().to_bits(), third.to_bits()); - assert_eq!(ramp.next_value().to_bits(), (third + third).to_bits()); - assert_ne!( - (third + third).to_bits(), - 0.5f32.to_bits(), - "must discriminate" - ); - assert_eq!(ramp.next_value().to_bits(), 1.0f32.to_bits()); - assert_eq!( - ramp.next_value().to_bits(), - 1.0f32.to_bits(), - "at rest afterwards" - ); - assert!(!ramp.is_ramping()); -} - -/// The final sample is an exact assignment, not an accumulation. -/// -/// Red mutation: drop the `remaining == 1` arm of `next_value()`, so the last sample is -/// `current + step`. The target here is chosen so that the accumulated value misses it. -#[test] -fn the_last_sample_is_exactly_the_target() { - let mut ramp = LinearRamp::fixed(0.0); - ramp.set_target(0.1, 5); - let sequence = scalar_sequence(ramp, 5); - assert_eq!(sequence[4].to_bits(), 0.1f32.to_bits()); - let accumulated: f32 = (0..5).fold(0.0f32, |acc, _| acc + 0.1f32 / 5.0); - assert_ne!( - accumulated.to_bits(), - 0.1f32.to_bits(), - "accumulation must miss, or the test proves nothing" - ); -} - /// `advance_block` plus the lane kernel reproduce `next_value()` exactly, at every block size. /// /// This is the D11 partition property and the reason `ramp_frames` is `remaining - 1`: the snap diff --git a/crates/lane/src/fpenv.rs b/crates/lane/src/fpenv.rs index efda37306..a89fb1837 100644 --- a/crates/lane/src/fpenv.rs +++ b/crates/lane/src/fpenv.rs @@ -529,13 +529,6 @@ impl CanonicalFpEnv { _not_send_not_sync: PhantomData, } } - - /// The exact control word this guard will restore. - #[inline] - #[must_use] - pub fn saved_word(&self) -> FpControlWord { - self.saved - } } #[cfg(any(target_arch = "x86_64", target_arch = "aarch64"))] @@ -586,11 +579,6 @@ impl CanonicalFpEnv { _not_send_not_sync: PhantomData, } } - - /// The exact control word this guard will restore; there is none on this target. - #[inline] - #[must_use] - pub fn saved_word(&self) -> FpControlWord {} } /// Why a render thread's floating-point environment could not be pinned. diff --git a/crates/lane/tests/MUTATIONS.md b/crates/lane/tests/MUTATIONS.md index 73143aae0..7d8dced2d 100644 --- a/crates/lane/tests/MUTATIONS.md +++ b/crates/lane/tests/MUTATIONS.md @@ -340,7 +340,7 @@ run in dev (the corpus in release), and restored. Host AMD EPYC 7313P, rustc 1.9 L-green is the expected-green row: on the sanitized domain `{+0.0} ∪ [MIN_POSITIVE, MAX]` the D8 select form is commutative by bits, so the operand order is free. -`g1_select_max_is_order_free_only_on_the_sanitized_domain` witnesses that argument directly, and +`g1_select_max_is_order_free_only_on_the_sanitized_domain` (deleted by TA4; KEEP catcher lane `sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts`) witnesses that argument directly, and also that it fails off the domain (`max(+0, -0)` and `max(1, NaN)` depend on the order). ## Issue #949 — the `f64` lane vocabulary @@ -502,3 +502,9 @@ browser's render-closure trap gate. Host AMD EPYC 7313P, rustc 1.97.1, `x86-64-v | 1219-M11 | the settled frames re-implemented as a private loop, and `mix2x2_block` then flushing its outputs (two edits: a static mix that drifts from the ramp's settled path) | gate 3 alone (`case 2, length 3830 ... left frame 3`, `-0.0` against `mix2x2_block`'s `+0.0`) | RED | | 1219-M12 | attempt 2: `route_mix_ramp_block` back to `let count = left.len(); let right = &mut right[..count];` | `--callgraph probe_ramp` on the probe: `FAIL probe_ramp: unexpected trap owner in the render closure: ...route_mix_ramp_block...`, `closure=5 traps=3`, entry `slice_index_fail` (unmutated: `closure=4 traps=0 trap_owners=[]`). Native gates cannot see it: bits do not move. | RED (probe), GREEN (native) | | 1219-M13 | attempt 2: `route_mix_settled_tail` passes its planes uncut (`mix2x2_block::(left, right, c)`) | `--callgraph probe_ramp`: `FAIL ... unexpected trap owner ...: route_mix_settled_tail`, `closure=5 traps=3` | RED (probe), GREEN (native) | + +## TA4 deletions + +The 2026-10 test audit (TA4, batch 1 mutation measurement at `81a3074fc`) deleted the tests named below. Each one's caught mutants were also red in the KEEP test named beside it. That is the recorded catcher of the deleted test's sampled mutants; the mutation of each row above was not re-run. + +- `g1_select_max_is_order_free_only_on_the_sanitized_domain`: lane `sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` diff --git a/crates/lane/tests/fader_matrix.rs b/crates/lane/tests/fader_matrix.rs index b5ad241ec..d5aaf1f02 100644 --- a/crates/lane/tests/fader_matrix.rs +++ b/crates/lane/tests/fader_matrix.rs @@ -426,168 +426,3 @@ fn select_free_fused_fader_matrix_matches_both_oracles_when_no_lane_is_identity( "NaN-payload differences [oracle A, oracle B] at each width, narrowest first: {counts:?}" ); } - -fn compare_holey_population() { - let frames = 3; - let mut active = [false; WIDTH]; - active[0] = true; - active[2] = true; - if L::WIDTH == 8 { - active[5] = true; - } - let mut left = vec![0.0; frames * L::WIDTH]; - let mut right = vec![0.0; frames * L::WIDTH]; - let mut gain_left = [1.0; WIDTH]; - let mut gain_right = [1.0; WIDTH]; - let mut mute_left = [0.0; WIDTH]; - let mut mute_right = [0.0; WIDTH]; - let mut ll = [1.0; WIDTH]; - let mut lr = [0.0; WIDTH]; - let mut rl = [0.0; WIDTH]; - let mut rr = [1.0; WIDTH]; - let mut identity = [1.0; WIDTH]; - for lane in 0..L::WIDTH { - if active[lane] { - for frame in 0..frames { - left[frame * L::WIDTH + lane] = (frame as f32 + 1.0) * (lane as f32 + 0.5); - right[frame * L::WIDTH + lane] = -(frame as f32 + 0.25) * (lane as f32 + 1.0); - } - gain_left[lane] = 0.5 + lane as f32 * 0.125; - gain_right[lane] = 1.25 - lane as f32 * 0.0625; - mute_left[lane] = f32::from(lane == 2); - mute_right[lane] = f32::from(lane == 5); - ll[lane] = 0.75; - lr[lane] = -0.25; - rl[lane] = 0.5; - rr[lane] = 0.25; - identity[lane] = 0.0; - } - } - let gl = L::load(&gain_left[..L::WIDTH]); - let gr = L::load(&gain_right[..L::WIDTH]); - let ml = mask_from_flags::(&mute_left[..L::WIDTH]); - let mr = mask_from_flags::(&mute_right[..L::WIDTH]); - let matrix = Matrix2x2Coef { - ll: L::load(&ll[..L::WIDTH]), - lr: L::load(&lr[..L::WIDTH]), - rl: L::load(&rl[..L::WIDTH]), - rr: L::load(&rr[..L::WIDTH]), - identity: mask_from_flags::(&identity[..L::WIDTH]), - }; - let mut old_left = left.clone(); - let mut old_right = right.clone(); - gain_mute_block(&mut old_left, frames, gl, ml); - gain_mute_block(&mut old_right, frames, gr, mr); - matrix2x2_block(&mut old_left, &mut old_right, frames, &matrix); - fader_matrix_block(&mut left, &mut right, frames, gl, ml, gr, mr, &matrix); - for frame in 0..frames { - for (lane, populated) in active.iter().copied().enumerate().take(L::WIDTH) { - let index = frame * L::WIDTH + lane; - assert_eq!(left[index].to_bits(), old_left[index].to_bits()); - assert_eq!(right[index].to_bits(), old_right[index].to_bits()); - if !populated { - assert_eq!( - left[index].to_bits(), - 0.0_f32.to_bits(), - "left padding lane {lane}" - ); - assert_eq!( - right[index].to_bits(), - 0.0_f32.to_bits(), - "right padding lane {lane}" - ); - } - } - } -} - -#[test] -fn holey_populations_keep_neutral_wide_padding() { - let _canonical = CanonicalFpEnv::enter(); - lane::each_vector_lane!(|L| compare_holey_population::()); -} - -fn run_scalar( - left: f32, - right: f32, - gain_left: f32, - mute_left: f32, - matrix: Matrix2x2Coef, -) -> ([u32; 2], [u32; 2]) { - let mut old_left = [left]; - let mut old_right = [right]; - gain_mute_block( - &mut old_left, - 1, - gain_left, - mask_from_flags::(&[mute_left]), - ); - gain_mute_block(&mut old_right, 1, 1.0, mask_from_flags::(&[0.0])); - matrix2x2_block(&mut old_left, &mut old_right, 1, &matrix); - let mut dut_left = [left]; - let mut dut_right = [right]; - fader_matrix_block( - &mut dut_left, - &mut dut_right, - 1, - gain_left, - mask_from_flags::(&[mute_left]), - 1.0, - mask_from_flags::(&[0.0]), - &matrix, - ); - ( - [old_left[0].to_bits(), old_right[0].to_bits()], - [dut_left[0].to_bits(), dut_right[0].to_bits()], - ) -} - -#[test] -fn wrong_equations_are_distinguished_before_the_dut_is_checked() { - let _canonical = CanonicalFpEnv::enter(); - let identity = Matrix2x2Coef { - ll: 1.0, - lr: 0.0, - rl: 0.0, - rr: 1.0, - identity: mask_from_flags::(&[1.0]), - }; - let (old, dut) = run_scalar(-2.0, 1.0, 0.5, 1.0, identity); - let wrong_mute = ((-2.0_f32 * 0.5) * 0.0).to_bits(); - assert_ne!( - wrong_mute, old[0], - "zero multiplication must differ from mask clearing" - ); - assert_eq!(dut, old); - - let cross = Matrix2x2Coef { - ll: 0.75, - lr: -0.25, - rl: 0.5, - rr: 0.25, - identity: mask_from_flags::(&[0.0]), - }; - let (old, dut) = run_scalar(2.0, 4.0, 1.0, 0.0, cross); - let overwritten_left = cross.rl * f32::from_bits(old[0]) + cross.rr * 4.0; - assert_ne!( - overwritten_left.to_bits(), - old[1], - "right must use the loaded left input" - ); - assert_eq!(dut, old); - - let zeros = Matrix2x2Coef { - ll: -0.0, - lr: -0.0, - rl: 0.0, - rr: 1.0, - identity: mask_from_flags::(&[0.0]), - }; - let (old, dut) = run_scalar(1.0, 1.0, 1.0, 0.0, zeros); - let recombined = ((0.0_f32 + zeros.ll * 1.0) + zeros.lr * 1.0).to_bits(); - assert_ne!( - recombined, old[0], - "zero-seeded recombination must differ from the frozen two-product sum" - ); - assert_eq!(dut, old); -} diff --git a/crates/lane/tests/fp_env.rs b/crates/lane/tests/fp_env.rs index 9dfb889f1..a3cd976e4 100644 --- a/crates/lane/tests/fp_env.rs +++ b/crates/lane/tests/fp_env.rs @@ -15,37 +15,7 @@ #![allow(unsafe_code)] -use lane::fpenv::{ - CanonicalFpEnv, attest_fp_environment, canonical_fp_control_word, read_fp_control_word, -}; - -#[test] -fn attestation_passes_on_this_thread() { - attest_fp_environment().expect("the canonical environment must be attestable on this thread"); -} - -#[test] -fn the_canonical_word_is_the_word_inside_the_guard() { - let outside = read_fp_control_word(); - { - let pinned = CanonicalFpEnv::enter(); - assert_eq!( - read_fp_control_word(), - canonical_fp_control_word(), - "the guard must install the canonical control word" - ); - assert_eq!( - pinned.saved_word(), - outside, - "the guard must remember the caller's exact word" - ); - } - assert_eq!( - read_fp_control_word(), - outside, - "the guard must restore the caller's exact word" - ); -} +use lane::fpenv::{CanonicalFpEnv, attest_fp_environment, read_fp_control_word}; #[cfg(target_arch = "x86_64")] mod x86 { diff --git a/crates/lane/tests/g4_flush.rs b/crates/lane/tests/g4_flush.rs index 0d96f1f1d..c9a4d9a97 100644 --- a/crates/lane/tests/g4_flush.rs +++ b/crates/lane/tests/g4_flush.rs @@ -259,101 +259,6 @@ fn g4_pair_law_holds_at_every_width() { lane::each_lane!(|L| pair_sweep::(core::any::type_name::())); } -fn pair_cases(width_name: &str) { - let below = f32::from_bits(REST_EPS.to_bits() - 1); - let small_pairs = [(below, -below), (-5.0e-15, 2.0e-20), (1.35e-16, -2.0e-21)]; - // Both words below `REST_EPS`, each above `FLUSH_EPS`, armed: the per-word law alone keeps - // them, the pair rule zeroes both. - for (n1, n2) in small_pairs { - assert_eq!( - pair_bits::(&[(n1, n2, true)]), - [(0, 0)], - "{width_name}: both below REST_EPS, armed, must both become +0.0" - ); - } - // The same pairs unarmed -- an effect input that is live, or silent for fewer than - // `N_SILENCE` frames -- keep the per-word law bit for bit (amendment A9): a section applies - // its whole response to whatever its effect is given. - for (n1, n2) in small_pairs { - let expected = (flush(n1).to_bits(), flush(n2).to_bits()); - assert_eq!( - pair_bits::(&[(n1, n2, false)]), - [expected], - "{width_name}: flush_pair({n1:e}, {n2:e}) unarmed must follow the per-word law" - ); - } - // One word at or above `REST_EPS`, armed: each word keeps the per-word law, so a small partner - // word is kept and a word below `FLUSH_EPS` is still flushed. - for (n1, n2) in [ - (REST_EPS, below), - (-below, -REST_EPS), - (0.5, 5.0e-15), - (6.0e-20, 0.25), - (1.0, 1.0e-21), - (f32::INFINITY, 1.0e-16), - ] { - let expected = (flush(n1).to_bits(), flush(n2).to_bits()); - assert_eq!( - pair_bits::(&[(n1, n2, true)]), - [expected], - "{width_name}: flush_pair({n1:e}, {n2:e}) armed must follow the per-word law" - ); - } - // NaN in either word passes through both rules, armed or not, and its partner follows the - // per-word law: `max_u32` of a NaN magnitude is a NaN, which no ordered compare admits. - for nan in [ - f32::NAN, - f32::from_bits(0xFFC0_0001), - f32::from_bits(0x7F80_0001), - ] { - for partner in [0.0f32, 1.0e-21, 5.0e-15, 0.5] { - for armed in [false, true] { - let [(ic1, ic2)] = pair_bits::(&[(nan, partner, armed)])[..] else { - unreachable!() - }; - assert_eq!( - ic1, - nan.to_bits(), - "{width_name}: a NaN first word must pass" - ); - assert_eq!(ic2, flush(partner).to_bits(), "{width_name}: NaN's partner"); - let [(ic1, ic2)] = pair_bits::(&[(partner, nan, armed)])[..] else { - unreachable!() - }; - assert_eq!( - ic2, - nan.to_bits(), - "{width_name}: a NaN second word must pass" - ); - assert_eq!(ic1, flush(partner).to_bits(), "{width_name}: NaN's partner"); - } - } - } - // `-0.0` becomes `+0.0` in either position, alone or beside a kept word, armed or not. - for armed in [false, true] { - for (n1, n2) in [(-0.0f32, -0.0f32), (-0.0, 0.5), (0.5, -0.0)] { - let [(ic1, ic2)] = pair_bits::(&[(n1, n2, armed)])[..] else { - unreachable!() - }; - assert_eq!( - ic1, - if n1 == 0.5 { n1.to_bits() } else { 0 }, - "{width_name}: -0.0" - ); - assert_eq!( - ic2, - if n2 == 0.5 { n2.to_bits() } else { 0 }, - "{width_name}: -0.0" - ); - } - } -} - -#[test] -fn g4_pair_law_cases_at_every_width() { - lane::each_lane!(|L| pair_cases::(core::any::type_name::())); -} - /// The silence counter's integer run, restated without `Lane`: `run` counts consecutive inputs /// equal to zero (IEEE `==`, both signs), saturating at `2^24`; any other input -- a subnormal, a /// NaN, an infinity -- resets it. The frame is armed once `run >= armed_after`. diff --git a/crates/lane/tests/meter_peak.rs b/crates/lane/tests/meter_peak.rs index d4eb5d70b..7e2102a34 100644 --- a/crates/lane/tests/meter_peak.rs +++ b/crates/lane/tests/meter_peak.rs @@ -175,55 +175,6 @@ fn g1_banked_sample_peak_is_the_scalar_meters_peak_at_every_width() { }); } -/// A lane fed only invalid values -- NaN, both infinities, both zeros and subnormals of both -/// signs -- ends at exactly `+0.0`, while its neighbours carry a peak. -fn invalid_lane_at() { - let invalid = [ - f32::NAN, - f32::from_bits(0xFFC0_1234), - f32::INFINITY, - f32::NEG_INFINITY, - -0.0, - 0.0, - f32::from_bits(0x0000_0001), - f32::from_bits(0x807F_FFFF), - ]; - let width = L::WIDTH; - for frames in [1_usize, 2, 3, 127, 128, 129] { - let mut words = vec![0.0_f32; frames * width]; - for (index, word) in words.iter_mut().enumerate() { - let lane = index % width; - *word = if lane == 1 { - invalid[(index / width) % invalid.len()] - } else { - pow2(-(lane as i32)) - }; - } - let peak = store(meter_sample_peak_block::(&words, frames, L::zero())); - for (lane, value) in peak.iter().enumerate() { - let expected = if lane == 1 { - 0x0000_0000 - } else { - pow2(-(lane as i32)).to_bits() - }; - assert_eq!(value.to_bits(), expected, "frames {frames} lane {lane}"); - } - } - // Every lane at once, which is the only form the `f32` width can take. - let mut only_invalid = vec![0.0_f32; 129 * width]; - for (index, word) in only_invalid.iter_mut().enumerate() { - *word = invalid[index % invalid.len()]; - } - for value in store(meter_sample_peak_block::(&only_invalid, 129, L::zero())) { - assert_eq!(value.to_bits(), 0x0000_0000); - } -} - -#[test] -fn g1_a_lane_fed_only_invalid_values_ends_at_positive_zero() { - lane::each_lane!(|L| invalid_lane_at::()); -} - /// The sanitization boundaries, swept on the bits: every exponent of both signs, with the /// mantissas that sit on each boundary. At each width the kernel over a one-frame block must equal /// the oracle step from `+0.0`. @@ -258,45 +209,3 @@ fn boundary_sweep_at() { fn g1_sanitization_boundaries_match_normal_or_zero() { lane::each_lane!(|L| boundary_sweep_at::()); } - -/// The domain argument, witnessed. On the sanitized domain `{+0.0} ∪ [MIN_POSITIVE, MAX]` the D8 -/// select form is commutative and associative by bits, which is why the kernel's -/// `L::max(c, peak)` and the expected-green mutation `L::max(peak, c)` agree, and why a -/// seeded-zero partial merged into the window equals the serial loop. Off the domain it is not: -/// `-0.0` and NaN break it, which is what the sanitization is for. -#[test] -fn g1_select_max_is_order_free_only_on_the_sanitized_domain() { - let select_max = |a: f32, b: f32| if a > b { a } else { b }; - let mut domain: Vec = hostile_pool() - .into_iter() - .map(|x| oracle_step(0.0, x)) - .collect(); - domain.sort_by(f32::total_cmp); - domain.dedup_by(|a, b| a.to_bits() == b.to_bits()); - assert_eq!(domain[0].to_bits(), 0, "+0.0 is in the domain"); - for &a in &domain { - assert!(a.to_bits() == 0 || (f32::MIN_POSITIVE..=f32::MAX).contains(&a)); - for &b in &domain { - assert_eq!(select_max(a, b).to_bits(), select_max(b, a).to_bits()); - assert_eq!( - Lane::max(a, b).to_bits(), - Lane::max(b, a).to_bits(), - "Lane::max(c, peak) and Lane::max(peak, c) agree on the domain" - ); - for &c in &domain { - assert_eq!( - select_max(select_max(a, b), c).to_bits(), - select_max(a, select_max(b, c)).to_bits() - ); - } - } - } - assert_ne!( - select_max(0.0, -0.0).to_bits(), - select_max(-0.0, 0.0).to_bits() - ); - assert_ne!( - select_max(1.0, f32::NAN).to_bits(), - select_max(f32::NAN, 1.0).to_bits() - ); -} diff --git a/crates/lane/tests/sanitise_counter.rs b/crates/lane/tests/sanitise_counter.rs index 85bf11fc4..7cbb8f4da 100644 --- a/crates/lane/tests/sanitise_counter.rs +++ b/crates/lane/tests/sanitise_counter.rs @@ -244,69 +244,6 @@ fn totals(value: L) -> Vec { // The gates. // --------------------------------------------------------------------------------------------- -/// The equivalence, at the level of the operation: for every subset of the lanes and every hostile -/// value class, `select(bad, 1.0, 0.0)` and `1.0 & bad` are the same bits. -/// -/// This is the claim the canonical-mask contract makes — a comparison result is per lane all zero -/// bits or all one bits — checked rather than cited. -#[test] -fn the_and_form_is_the_select_form_on_every_lane_subset() { - fn check(width: &str) { - let one = L::splat(1.0); - let zero = L::zero(); - let limit = L::splat(NONFINITE_LIMIT); - let sanitised = [ - f32::NAN, - f32::INFINITY, - f32::NEG_INFINITY, - 1.0e30, - -1.0e30, - -2.5e33, - f32::from_bits(0x7F80_0001), - f32::from_bits(0x7FC0_1234), - ]; - let clean = [ - 0.5, - -0.0, - 0.0, - 9.999e29, - -9.999e29, - f32::from_bits(0x0000_0001), - -0.75, - f32::MIN_POSITIVE, - ]; - for pattern in 0..(1_usize << L::WIDTH) { - for (bad_class, clean_class) in sanitised.iter().zip(clean.iter()) { - let mut words = [0.0_f32; MAX_WIDTH]; - for (lane, word) in words.iter_mut().enumerate().take(L::WIDTH) { - *word = if pattern >> lane & 1 == 1 { - *bad_class - } else { - *clean_class - }; - } - let x = L::load(&words); - let bad = L::mask_not(x.abs().lt(limit)); - assert_eq!( - bits::(L::select(bad, one, zero)), - bits::(one.andnot(L::mask_not(bad))), - "width={width}, pattern={pattern:#04x}, bad={bad_class:?}" - ); - // And the verdict itself is the policy's, not the compare's accident. - let expected: Vec = (0..L::WIDTH) - .map(|lane| u32::from(pattern >> lane & 1 == 1)) - .collect(); - assert_eq!( - totals::(L::select(bad, one, zero)), - expected, - "width={width}, pattern={pattern:#04x}: the boundary is `|x| < 1e30`" - ); - } - } - } - lane::each_lane!(|L, N| check::(&N.to_string())); -} - /// The kernels, over 64 hostile blocks of evolving state: the tree's counter words and output /// buffers are the select-form's to the bit, and both are the scalar oracle's count. /// diff --git a/crates/math/tests/f1_fast_db_bounds.rs b/crates/math/tests/f1_fast_db_bounds.rs index 5586278b5..0174b3666 100644 --- a/crates/math/tests/f1_fast_db_bounds.rs +++ b/crates/math/tests/f1_fast_db_bounds.rs @@ -558,7 +558,6 @@ const SHAPER_CONTRAST_LIMIT_DB: f32 = 24.0; const SHAPER_SHAPE_LIMIT_DB: f32 = 18.0; const SHAPER_AMOUNT_MIN: f32 = -1.0; const SHAPER_AMOUNT_MAX: f32 = 1.0; -const F1_SHAPER_LEVEL_MIN: f32 = 1.0e-8; const F1_SHAPER_LEVEL_MAX: f32 = 16.0; fn shaper_shape_f32(contrast_db: f32, attack: f32, sustain: f32) -> f32 { @@ -572,29 +571,6 @@ fn shaper_shape_f64(contrast_db: f64, attack: f64, sustain: f64) -> f64 { (attack * contrast_db.max(0.0) + sustain * (-contrast_db).max(0.0)).clamp(-18.0, 18.0) } -#[test] -fn f1_shaper_x7_x8_domains_are_covered() { - assert_eq!(SHAPER_FLOOR.to_bits(), F1_SHAPER_LEVEL_MIN.to_bits()); - - // If the ±24 dB contrast clamp does not saturate, the amplitude ratio is within these bounds. - let unsaturated_ratio_min = math::pow(10.0, -24.0 / 20.0) as f32; - let unsaturated_ratio_max = math::pow(10.0, 24.0 / 20.0) as f32; - assert!(unsaturated_ratio_min >= F1_SHAPER_LEVEL_MIN); - assert!(unsaturated_ratio_max <= F1_SHAPER_LEVEL_MAX); - - // For every corner of the parameter domains and contrast range, the final shape is clamped - // inside F1's applied-gain domain [-160, 24] dB. - for attack in [SHAPER_AMOUNT_MIN, SHAPER_AMOUNT_MAX] { - for sustain in [SHAPER_AMOUNT_MIN, SHAPER_AMOUNT_MAX] { - for contrast in [-SHAPER_CONTRAST_LIMIT_DB, SHAPER_CONTRAST_LIMIT_DB] { - let shape = shaper_shape_f32(contrast, attack, sustain); - assert!((-18.0..=18.0).contains(&shape)); - assert!((-160.0..=24.0).contains(&shape)); - } - } - } -} - fn prospective_low_ratio_rail(x: f32) -> Measurement { let fast = fast_level_db::(x); let exact = exact_level_db(x); @@ -862,91 +838,3 @@ fn restate_level_db(x: f64) -> f64 { fn restate_gain(db: f64) -> f64 { math::pow(10.0, db / 20.0) } - -/// Worst error over one same-sign run of `f32` bit patterns, `first` to `last` inclusive. -/// -/// Same-sign is the precondition, not a detail: `f32` bit patterns are monotone in *magnitude*, -/// so a range whose endpoints straddle zero is not a contiguous run of values at all -- walking it -/// passes through the infinities and the NaNs. Crossing domains that span zero are therefore -/// swept as two runs and combined by the caller. -fn worst_over_run(first: u32, last: u32, level: bool) -> f64 { - let (first, last) = if first <= last { - (first, last) - } else { - (last, first) - }; - let mut worst = 0.0_f64; - let mut bits = first; - // Stride chosen so every crossing checks a few hundred thousand points in the default run. - let stride = 1 + (u64::from(last - first) / 400_000) as u32; - while bits <= last { - let x = f32::from_bits(bits); - let error = if level { - let got = f64::from(fast_level_db::(x)); - (got - restate_level_db(f64::from(x))).abs() - } else { - let got = f64::from(fast_gain_from_db::(x)); - let want = restate_gain(f64::from(x)); - ((got - want) / want).abs() * DB_PER_RELATIVE - }; - if error.is_finite() && error > worst { - worst = error; - } - bits = match bits.checked_add(stride) { - Some(next) => next, - None => break, - }; - } - worst -} - -/// Sweeps a crossing's own domain `[lo, hi]` and returns its worst error in decibels. -/// -/// Split at zero into at most two same-sign runs, because that is the only shape -/// [`worst_over_run`] can walk. A domain that merely *ends* at zero (crossing X4's `[-96, 0]`) is -/// still a negative run: its far end is `-0.0`, not `+0.0`, and taking the `+0.0` bit pattern as -/// the endpoint sends the walk through every positive float instead. -fn crossing_worst_db(lo: f32, hi: f32, level: bool) -> f64 { - assert!(lo <= hi, "a crossing domain is given low to high"); - let mut worst = 0.0_f64; - if lo < 0.0 { - let negative_end = if hi < 0.0 { hi } else { -0.0 }; - worst = worst.max(worst_over_run(lo.to_bits(), negative_end.to_bits(), level)); - } - if hi >= 0.0 { - let positive_start = if lo > 0.0 { lo } else { 0.0 }; - worst = worst.max(worst_over_run( - positive_start.to_bits(), - hi.to_bits(), - level, - )); - } - worst -} - -/// Independent definition checks over each distinct named-crossing domain. -/// -/// X1/X3/X5/X7 share the detector domain, and X2/X6 share the applied-gain domain. These tests -/// qualify the conversions over those domains; effect tests and the fast-dB seal own the callers. -#[test] -fn f1_crossing_domains_match_independent_definitions() { - for (crossings, lo, hi, level, gate) in [ - ( - "X1/X3/X5/X7 detector level", - 1.0e-8, - 16.0, - true, - LEVEL_MAX_DB, - ), - ("X2/X6 applied gain", -124.0, 24.0, false, GAIN_MAX_DB), - ("X4 gate applied gain", -96.0, 0.0, false, GAIN_MAX_DB), - ("X8 shaper applied gain", -18.0, 18.0, false, GAIN_MAX_DB), - ] { - let worst = crossing_worst_db(lo, hi, level); - assert!( - worst <= gate, - "crossings {crossings}: {worst:.6e} dB exceeds the {gate:.1e} dB gate" - ); - println!("crossings {crossings}: {worst:.6e} dB"); - } -} diff --git a/crates/soft-clip/tests/partition_invariance.rs b/crates/soft-clip/tests/partition_invariance.rs deleted file mode 100644 index 1d8f197c1..000000000 --- a/crates/soft-clip/tests/partition_invariance.rs +++ /dev/null @@ -1,118 +0,0 @@ -#![allow(clippy::disallowed_methods)] -// D6 oracle/measurement exemption: compares against the platform deliberately (formerly check-math-policy.sh structural_exempt) -//! E3 / P1 — a block boundary is not observable. -//! -//! The same 4,096-frame stream, with automation points at sample zero, rendered in partitions of -//! {1, 7, 64, 128, 512} frames and in one shot, must produce the same bits and leave the same -//! state. This is what the segmented ramp driver and the shared history cursor have to survive: -//! the ramp's iterated additions are not `start + n * step`, and the history position is not -//! derived from a frame index. - -mod support; - -use effect_contract::NativeEffectFactory; -use effect_contract::{ - EffectProcessBlock, ParameterChannel, PreparedAutomationSpan, PreparedNativeEffect, -}; -use soft_clip::SoftClipFactory; -use support::{bits, initial_values, values_from}; - -const FRAMES: usize = 4_096; -const PARTITIONS: [usize; 4] = [7, 64, 128, 512]; - -fn signal(index: usize) -> f32 { - let phase = index as f32 * 0.041; - phase.sin() * 0.9 + (phase * 2.7).sin() * 0.2 -} - -/// Automation points, keyed by the sample they must start at. -/// -/// Only sample 0 carries events. The contract accepts a point only when it starts at the block's -/// first sample, so an event anywhere else would be *seen* by some partitions and *rejected* by -/// others, and the partitions would then legitimately disagree. Sample 0 is the one instant every -/// partition begins a block at. The 64-sample ramps it starts still cross block boundaries in the -/// small partitions and end mid-block in the large ones, which is the property under test. -fn automation_at(first_sample: u64) -> Vec { - if first_sample != 0 { - return Vec::new(); - } - vec![ - support::point(0, ParameterChannel::Left, 18.0, 0), - support::point(0, ParameterChannel::Right, -12.0, 0), - support::point(1, ParameterChannel::Left, -6.0, 0), - support::point(2, ParameterChannel::Right, 0.25, 0), - ] -} - -fn prepared() -> Box { - let values = values_from([(0.0, 0.0), (0.0, 0.0), (1.0, 1.0)]); - let mut request = support::request(&values); - request.quantum = FRAMES as u32; - SoftClipFactory.prepare(request).expect("prepare").processor -} - -/// A rendered stream and the state the instance was left in. -struct Rendered { - left: Vec, - right: Vec, - state: (Vec, Vec, Vec), -} - -/// Renders the stream in blocks of at most `partition` frames. -fn render(partition: usize) -> Rendered { - let mut effect = prepared(); - let mut left: Vec = (0..FRAMES).map(signal).collect(); - let mut right: Vec = (0..FRAMES).map(|index| signal(index + 11)).collect(); - let mut done = 0; - while done < FRAMES { - let span = partition.min(FRAMES - done); - let first_sample = done as u64; - let automation = automation_at(first_sample); - effect.process( - EffectProcessBlock::new( - &mut left[done..done + span], - &mut right[done..done + span], - None, - first_sample, - &automation, - FRAMES as u32, - ) - .expect("block"), - ); - done += span; - } - let state = support::snapshot(effect.as_ref()); - Rendered { left, right, state } -} - -#[test] -fn every_partition_renders_the_one_shot_bits_and_state() { - let reference = render(1); - for partition in PARTITIONS.into_iter().chain(core::iter::once(FRAMES)) { - let actual = render(partition); - assert_eq!( - bits(&actual.left), - bits(&reference.left), - "left, partition {partition}" - ); - assert_eq!( - bits(&actual.right), - bits(&reference.right), - "right, partition {partition}" - ); - assert_eq!( - actual.state, reference.state, - "state, partition {partition}" - ); - } - // A ramp that never moved would make the whole test vacuous. - let plain = { - let values = initial_values(); - let mut effect = support::prepare(&values); - let mut left: Vec = (0..128).map(signal).collect(); - let mut right: Vec = (0..128).map(|index| signal(index + 11)).collect(); - support::process(effect.as_mut(), &mut left, &mut right, 0, &[]); - left - }; - assert_ne!(bits(&plain), bits(&reference.left[..128])); -} diff --git a/crates/source/tests/seek_schedule_model.rs b/crates/source/tests/seek_schedule_model.rs deleted file mode 100644 index 2a0b8ff02..000000000 --- a/crates/source/tests/seek_schedule_model.rs +++ /dev/null @@ -1,533 +0,0 @@ -//! The shared ring's seek and admission semantics against an independent model. -//! -//! 256 frozen schedules (bounded queues of one, two, three and eight quanta) drive the production -//! `PcmSourceRing` through its host endpoint, `HostChunkProvider`, which is the path the browser -//! adapter and the C ABI both feed: complete and short end-of-region chunks, a submission into a -//! full queue that must admit no prefix, stale-generation and late-generation blocks, two seeks per -//! schedule and underruns. Every submit result, every rendered sample, every read report field and -//! the stale-discard counter must match what the small model below predicts. The fixed seed -//! reproduces every generated schedule. -//! -//! Moved here unchanged by #1033 from `audit fixture-source` (`tools/audit/src/source_fixture.rs`), -//! whose other half checked the native WAV/RF64 decoder that #1033 deleted. - -use std::collections::VecDeque; - -use engine::{QuantumFrames, SampleRateHz}; -use source::{ - HostChunkError, HostPlanarChunk, PcmSourceRing, PcmSourceRingConfig, SourceCommand, - SourceFrame, SourceGeneration, -}; - -#[test] -fn frozen_seek_schedules_match_the_independent_ring_model() { - frozen_seek_ring_schedules().expect("frozen seek schedules"); -} - -// This is a deliberately small independent schedule oracle, not another source ring. It models -// only the frozen action language below: one producer, one bounded FIFO of complete quanta, and -// block-boundary seeks. The production ring is exercised only after this model has produced every -// expected outcome from the sealed transcript. -const SEEK_SCHEDULE_SEED: u64 = 0x0000_0000_010a_5ee1; -const SEEK_SCHEDULE_COUNT: usize = 256; -const SEEK_QUANTUM: u32 = 4; - -#[derive(Clone, Debug)] -struct SeekSchedule { - index: u16, - capacity_quanta: usize, - actions: Vec, -} - -#[derive(Clone, Debug)] -enum SeekAction { - Submit { - generation: u64, - start_frame: u64, - frames: u32, - end_of_region: bool, - sample_bits: u32, - }, - Seek { - generation: u64, - frame: u64, - }, - Render, -} - -#[derive(Clone, Copy, Debug, Eq, PartialEq)] -enum ModelSubmit { - Accepted, - Full, - StaleGeneration, - EndOfRegion, - Invalid, -} - -#[derive(Clone, Debug, Eq, PartialEq)] -enum ModelOutcome { - Submit(ModelSubmit), - Seek, - Render(ModelRender), -} - -#[derive(Clone, Debug, Eq, PartialEq)] -struct ModelRender { - output_bits: [u32; SEEK_QUANTUM as usize], - copied_frames: u32, - underrun_frames: u32, - underrun_event: bool, - end_of_region: bool, - active_generation: u64, - cumulative_read_frames: u64, - cumulative_underrun_frames: u64, - cumulative_underrun_events: u64, - stale_discards: u64, -} - -#[derive(Clone, Copy, Debug)] -struct ModelBlock { - generation: u64, - start_frame: u64, - frames: u32, - end_of_region: bool, - sample_bits: u32, -} - -struct IndependentSeekModel { - capacity: usize, - free_blocks: usize, - data: VecDeque, - command: Option<(u64, u64)>, - active_generation: u64, - producer_generation: u64, - producer_next_frame: u64, - producer_end_submitted: bool, - next_frame: u64, - end_frame: Option, - end_of_region: bool, - cumulative_read_frames: u64, - stale_discards: u64, - underrun_frames: u64, - underrun_events: u64, -} - -impl IndependentSeekModel { - fn new(capacity: usize) -> Self { - Self { - capacity, - free_blocks: capacity, - data: VecDeque::with_capacity(capacity), - command: None, - active_generation: 1, - producer_generation: 1, - producer_next_frame: 0, - producer_end_submitted: false, - next_frame: 0, - end_frame: None, - end_of_region: false, - cumulative_read_frames: 0, - stale_discards: 0, - underrun_frames: 0, - underrun_events: 0, - } - } - - fn submit(&mut self, block: ModelBlock) -> ModelSubmit { - if block.generation != self.producer_generation { - return ModelSubmit::StaleGeneration; - } - if self.producer_end_submitted { - return ModelSubmit::EndOfRegion; - } - if block.start_frame != self.producer_next_frame - || block.frames > SEEK_QUANTUM - || (block.frames < SEEK_QUANTUM && !block.end_of_region) - || (block.frames == 0 && !block.end_of_region) - { - return ModelSubmit::Invalid; - } - if self.free_blocks == 0 || self.data.len() == self.capacity { - return ModelSubmit::Full; - } - self.free_blocks -= 1; - self.producer_next_frame = self - .producer_next_frame - .saturating_add(u64::from(block.frames)); - if block.end_of_region { - self.producer_end_submitted = true; - } - self.data.push_back(block); - ModelSubmit::Accepted - } - - fn seek(&mut self, generation: u64, frame: u64) -> Result<(), String> { - if generation <= self.producer_generation { - return Err("schedule generated a non-increasing seek".to_owned()); - } - if self.command.is_some() { - return Err("schedule overfilled its bounded seek command slot".to_owned()); - } - self.producer_generation = generation; - self.producer_next_frame = frame; - self.producer_end_submitted = false; - self.command = Some((generation, frame)); - Ok(()) - } - - fn render(&mut self) -> ModelRender { - if let Some((generation, frame)) = self.command.take() { - self.active_generation = generation; - self.next_frame = frame; - self.end_frame = None; - self.end_of_region = false; - } - let mut selected = None; - while let Some(block) = self.data.pop_front() { - if block.generation != self.active_generation || block.start_frame < self.next_frame { - self.stale_discards = self.stale_discards.saturating_add(1); - self.free_blocks += 1; - continue; - } - if block.end_of_region { - self.end_frame = Some(block.start_frame.saturating_add(u64::from(block.frames))); - } - selected = Some(block); - break; - } - - let mut output_bits = [0_u32; SEEK_QUANTUM as usize]; - let mut copied_frames = 0; - let mut underrun_frames = 0; - if self.end_frame.is_some_and(|end| self.next_frame >= end) { - self.end_of_region = true; - } else if let Some(block) = selected { - if block.start_frame == self.next_frame { - let frames = usize::try_from(block.frames).expect("frozen quantum fits usize"); - output_bits[..frames].fill(block.sample_bits); - copied_frames = block.frames; - self.next_frame = self.next_frame.saturating_add(u64::from(block.frames)); - self.cumulative_read_frames = self - .cumulative_read_frames - .saturating_add(u64::from(block.frames)); - if block.end_of_region { - self.end_of_region = true; - } - self.free_blocks += 1; - } else { - // The selected future block remains queued in the production endpoint. Frozen - // schedules never produce one, so treat it as a generator/model defect. - self.data.push_front(block); - underrun_frames = self.available_until_end(); - self.note_underrun(underrun_frames); - } - } else { - underrun_frames = self.available_until_end(); - self.note_underrun(underrun_frames); - } - - ModelRender { - output_bits, - copied_frames, - underrun_frames, - underrun_event: underrun_frames != 0, - end_of_region: self.end_of_region, - active_generation: self.active_generation, - cumulative_read_frames: self.cumulative_read_frames, - cumulative_underrun_frames: self.underrun_frames, - cumulative_underrun_events: self.underrun_events, - stale_discards: self.stale_discards, - } - } - - fn available_until_end(&self) -> u32 { - self.end_frame - .map(|end| end.saturating_sub(self.next_frame)) - .unwrap_or(u64::from(SEEK_QUANTUM)) - .min(u64::from(SEEK_QUANTUM)) as u32 - } - - fn note_underrun(&mut self, frames: u32) { - self.next_frame = self.next_frame.saturating_add(u64::from(SEEK_QUANTUM)); - if frames != 0 { - self.underrun_frames = self.underrun_frames.saturating_add(u64::from(frames)); - self.underrun_events = self.underrun_events.saturating_add(1); - } - if self.end_frame.is_some_and(|end| self.next_frame >= end) { - self.end_of_region = true; - } - } -} - -fn frozen_seek_ring_schedules() -> Result<(), String> { - let schedules = generate_frozen_seek_schedules(); - if schedules.len() != SEEK_SCHEDULE_COUNT { - return Err(format!("expected {SEEK_SCHEDULE_COUNT} schedules")); - } - for schedule in &schedules { - let expected = model_schedule(schedule)?; - exercise_production_schedule(schedule, &expected)?; - } - Ok(()) -} - -fn generate_frozen_seek_schedules() -> Vec { - let capacities = [1_usize, 2, 3, 8]; - let mut state = SEEK_SCHEDULE_SEED; - (0..SEEK_SCHEDULE_COUNT) - .map(|index| { - state = xorshift64(state); - let capacity_quanta = capacities[index % capacities.len()]; - let base = 1_024_u64 + u64::try_from(index).expect("fixed count") * 1_024; - let first_seek = base; - let second_seek = base + 512; - let first_terminal_frames = if index % 17 == 0 { - 0 - } else { - 1 + u32::try_from(state & 0x03).expect("two bits") % (SEEK_QUANTUM - 1) - }; - let second_terminal_frames = if index % 19 == 0 { - 0 - } else { - 1 + u32::try_from((state >> 8) & 0x03).expect("two bits") % (SEEK_QUANTUM - 1) - }; - let mut actions = Vec::with_capacity(capacity_quanta * 3 + 20); - for slot in 0..capacity_quanta { - actions.push(SeekAction::Submit { - generation: 1, - start_frame: u64::try_from(slot).expect("small slot") * u64::from(SEEK_QUANTUM), - frames: SEEK_QUANTUM, - end_of_region: false, - sample_bits: schedule_sample_bits(index, slot, 1), - }); - } - // This is the frozen full transition; it must accept no prefix or state change. - actions.push(SeekAction::Submit { - generation: 1, - start_frame: u64::try_from(capacity_quanta).expect("small capacity") - * u64::from(SEEK_QUANTUM), - frames: SEEK_QUANTUM, - end_of_region: false, - sample_bits: schedule_sample_bits(index, capacity_quanta, 1), - }); - actions.push(SeekAction::Seek { - generation: 2, - frame: first_seek, - }); - actions.push(SeekAction::Render); - // This late new-generation block is discarded after the declared request boundary. - actions.push(SeekAction::Submit { - generation: 2, - start_frame: first_seek, - frames: SEEK_QUANTUM, - end_of_region: false, - sample_bits: schedule_sample_bits(index, 0, 2), - }); - actions.push(SeekAction::Render); - actions.push(SeekAction::Submit { - generation: 2, - start_frame: first_seek + u64::from(SEEK_QUANTUM) * 2, - frames: SEEK_QUANTUM, - end_of_region: false, - sample_bits: schedule_sample_bits(index, 1, 2), - }); - actions.push(SeekAction::Render); - for round in 0..=capacity_quanta { - let start_frame = first_seek - + u64::from(SEEK_QUANTUM) * u64::try_from(round + 3).expect("small wrap round"); - actions.push(SeekAction::Submit { - generation: 2, - start_frame, - frames: SEEK_QUANTUM, - end_of_region: false, - sample_bits: schedule_sample_bits(index, round + 2, 2), - }); - actions.push(SeekAction::Render); - } - let first_terminal_start = first_seek - + u64::from(SEEK_QUANTUM) - * u64::try_from(capacity_quanta + 4).expect("small terminal round"); - actions.push(SeekAction::Submit { - generation: 2, - start_frame: first_terminal_start, - frames: first_terminal_frames, - end_of_region: true, - sample_bits: schedule_sample_bits(index, capacity_quanta + 3, 2), - }); - actions.push(SeekAction::Render); - actions.push(SeekAction::Render); - actions.push(SeekAction::Seek { - generation: 3, - frame: second_seek, - }); - actions.push(SeekAction::Render); - // A delayed old-generation attempt is rejected at the producer boundary. - actions.push(SeekAction::Submit { - generation: 2, - start_frame: second_seek, - frames: SEEK_QUANTUM, - end_of_region: false, - sample_bits: schedule_sample_bits(index, 0, 3), - }); - actions.push(SeekAction::Submit { - generation: 3, - start_frame: second_seek, - frames: SEEK_QUANTUM, - end_of_region: false, - sample_bits: schedule_sample_bits(index, 1, 3), - }); - actions.push(SeekAction::Render); - actions.push(SeekAction::Submit { - generation: 3, - start_frame: second_seek + u64::from(SEEK_QUANTUM) * 2, - frames: second_terminal_frames, - end_of_region: true, - sample_bits: schedule_sample_bits(index, 2, 3), - }); - actions.push(SeekAction::Render); - actions.push(SeekAction::Render); - SeekSchedule { - index: u16::try_from(index).expect("fixed schedule count"), - capacity_quanta, - actions, - } - }) - .collect() -} - -fn model_schedule(schedule: &SeekSchedule) -> Result, String> { - let mut model = IndependentSeekModel::new(schedule.capacity_quanta); - schedule - .actions - .iter() - .map(|action| match action { - SeekAction::Submit { - generation, - start_frame, - frames, - end_of_region, - sample_bits, - } => Ok(ModelOutcome::Submit(model.submit(ModelBlock { - generation: *generation, - start_frame: *start_frame, - frames: *frames, - end_of_region: *end_of_region, - sample_bits: *sample_bits, - }))), - SeekAction::Seek { generation, frame } => { - model.seek(*generation, *frame)?; - Ok(ModelOutcome::Seek) - } - SeekAction::Render => Ok(ModelOutcome::Render(model.render())), - }) - .collect() -} - -fn exercise_production_schedule( - schedule: &SeekSchedule, - expected: &[ModelOutcome], -) -> Result<(), String> { - let config = PcmSourceRingConfig { - channel_count: 1, - quantum_frames: QuantumFrames(SEEK_QUANTUM), - frame_capacity: u64::try_from(schedule.capacity_quanta).expect("small capacity") - * u64::from(SEEK_QUANTUM), - initial_generation: SourceGeneration(1), - }; - let (producer, mut consumer, _) = PcmSourceRing::prepare(config) - .map_err(|error| format!("schedule {} ring prepare: {error:?}", schedule.index))?; - let mut host = producer.into_host_chunk_provider(SampleRateHz(48_000)); - let mut output = [f32::from_bits(0xffff_ffff); SEEK_QUANTUM as usize]; - for (step, (action, expected)) in schedule.actions.iter().zip(expected).enumerate() { - match (action, expected) { - ( - SeekAction::Submit { - generation, - start_frame, - frames, - end_of_region, - sample_bits, - }, - ModelOutcome::Submit(expected_submit), - ) => { - let plane = [f32::from_bits(*sample_bits); SEEK_QUANTUM as usize]; - let planes = [&plane[..usize::try_from(*frames).expect("frozen frame count")]]; - let actual = host.submit(HostPlanarChunk { - sample_rate_hz: SampleRateHz(48_000), - generation: SourceGeneration(*generation), - start_frame: SourceFrame(*start_frame), - planes: &planes, - frames: *frames, - end_of_region: *end_of_region, - }); - let actual_submit = match &actual { - Ok(_) => ModelSubmit::Accepted, - Err(HostChunkError::Full { .. }) => ModelSubmit::Full, - Err(HostChunkError::StaleGeneration { .. }) => ModelSubmit::StaleGeneration, - Err(HostChunkError::EndOfRegionAlreadySubmitted) => ModelSubmit::EndOfRegion, - Err(_) => ModelSubmit::Invalid, - }; - if actual_submit != *expected_submit { - return Err(format!( - "schedule {} step {step} submit mismatch: expected {expected_submit:?}, actual {actual_submit:?} ({actual:?})", - schedule.index, - )); - } - } - (SeekAction::Seek { generation, frame }, ModelOutcome::Seek) => host - .try_seek(SourceCommand::Seek { - generation: SourceGeneration(*generation), - frame: SourceFrame(*frame), - }) - .map_err(|error| { - format!("schedule {} step {step} seek: {error:?}", schedule.index) - })?, - (SeekAction::Render, ModelOutcome::Render(expected_render)) => { - let report = consumer.read_block(&mut [&mut output]).map_err(|error| { - format!("schedule {} step {step} render: {error:?}", schedule.index) - })?; - let actual_bits = output.map(f32::to_bits); - if actual_bits != expected_render.output_bits - || report.copied_frames != expected_render.copied_frames - || report.underrun_frames != expected_render.underrun_frames - || report.underrun_event != expected_render.underrun_event - || report.end_of_region != expected_render.end_of_region - || report.active_generation - != SourceGeneration(expected_render.active_generation) - || report.cumulative_read_frames != expected_render.cumulative_read_frames - || report.cumulative_underrun_frames - != expected_render.cumulative_underrun_frames - || report.cumulative_underrun_events - != expected_render.cumulative_underrun_events - || consumer.telemetry().stale_generation_discard_count - != expected_render.stale_discards - { - return Err(format!( - "schedule {} step {step} render/model mismatch: expected {expected_render:?}, actual bits {actual_bits:?}, report {report:?}, telemetry {:?}", - schedule.index, - consumer.telemetry() - )); - } - } - _ => { - return Err(format!( - "schedule {} step {step} internal action/outcome mismatch", - schedule.index - )); - } - } - } - Ok(()) -} - -fn xorshift64(mut state: u64) -> u64 { - state ^= state << 13; - state ^= state >> 7; - state ^= state << 17; - state -} - -fn schedule_sample_bits(schedule: usize, slot: usize, generation: u64) -> u32 { - let value = (schedule as f32 + 1.0) * 0.001 + slot as f32 * 0.01 + generation as f32 * 0.1; - value.to_bits() -} diff --git a/hosts/host-web/tests/retained_ceilings.rs b/hosts/host-web/tests/retained_ceilings.rs deleted file mode 100644 index 2ea4f222d..000000000 --- a/hosts/host-web/tests/retained_ceilings.rs +++ /dev/null @@ -1,294 +0,0 @@ -//! #1060: the browser identity fixture's retained-memory budgets, on the native build. -//! -//! Owner decision 4 (`docs/rulings/engine-footprint-2026-09-28.md`): memory tests assert budgets -//! (upper limits), not exact byte counts. `tests/browser-v1/expected.json` used to pin every -//! resource row of this fixture to the byte, and every harmless layout change re-pinned it. The -//! shipped `wasm32` module's rows are now budgeted in `expected.json`'s `resourceCeilings` and -//! checked by `scripts/check-browser-expected-resources.py`; this test budgets the same fixture, -//! booted through the same facade with the options `direct-oracle.mjs` writes, at the native widths, -//! and proves the budget binds through the host's own admission. -//! -//! The completeness half of decision 4 -- that the reports charge every byte -- is capi's -//! allocator oracle, `crates/capi/tests/resource_lifecycle.rs`. - -use host_web::{ - AudioWorkletEngineHost, LIVE_RESPONSE_CAPTURE_BYTES, RESULT_REFUSED_BUDGET, WebBootOptions, - WebResourceReport, -}; - -/// The fixture the browser harness compiles, verbatim. -const SESSION_DOCUMENT: &str = include_str!("browser-v1/session.json"); - -/// The options the direct oracle writes into the module's `WebBootOptions` block: the physical -/// rate and quantum, plus a one-quantum ring that makes backpressure deterministic. -fn options() -> WebBootOptions { - WebBootOptions { - require_sample_rate_hz: 48_000, - require_quantum_frames: 128, - source_ring_frames: 128, - ..WebBootOptions::explicit_defaults() - } -} - -/// One retained-memory budget: a report row and its ceiling at each native lane width. -struct Budget { - row: &'static str, - value: fn(&WebResourceReport) -> u64, - eight_lanes: u64, - four_lanes: u64, -} - -impl Budget { - /// The native lane width is a compile-time function of the target: eight lanes on - /// x86-64-v3, four on AArch64 NEON. Matched by width, not by variant: the scalar variant - /// exists only under `lane/test-support` (#1059), and no native product build selects it. - fn ceiling(&self) -> u64 { - match lane::Backend::current().width() { - 8 => self.eight_lanes, - 4 => self.four_lanes, - width => panic!("no retained budget is declared for a {width}-lane native build"), - } - } -} - -/// The 1 MiB live-response capture is a fixed ABI capacity inside the two bridge rows, so the -/// growth budget applies to the rest of each row. -const CAPTURE: u64 = LIVE_RESPONSE_CAPTURE_BYTES as u64; - -/// **Headroom.** Each ceiling is the row's value on 2026-09-28 (`a509b681`) at that width, plus -/// 10 %, rounded up to a 64-byte multiple; for the two bridge rows the 10 % applies to the part -/// beyond the fixed 1 MiB capture. 10 % is where the history puts the line: #1060's review sampled -/// four past moves of these retained rows, +1.2 %, +2.3 %, +11 % and +48 %, and a 10 % budget lets -/// the two routine moves through unseen and stops the two structural ones, which then raise the -/// budget with their reason in the same commit. A zero ceiling is a claim: this identity -/// fixture declares no delay, no scalar effect and no observation capacity. The measured baselines, -/// x86-64 / AArch64 (AArch64 under qemu-user): bridge metadata 1,150,215 and bridge retained -/// 1,170,724 at both; source total 3,442 and overhead 2,418 at both; builtin retained 1,957 at both; -/// graph session+plan and incremental 48,034 / 35,230; graph metadata 6,711 / 6,675. -/// -/// **Re-pinned: `builtin_retained_bytes` (#1326, then #1312).** Every browser plan carries each -/// strip's fader/mute and matrix/pan lanes, whatever the app's live-control options say (the -/// engine ramps a strip's mute for its own transitions). #1326 added them as two 16-record rings -/// per strip, 1,234 bytes retained for this one-strip fixture (2,149 to 3,383), and re-pinned the -/// ceiling to 3,776 (3,383 * 1.1 = 3,721.3, rounded up to 64). #1312 replaced the rings with -/// latest-target cells and the row fell to 2,887 (x86-64; 2,723 measured on the wasm32 simd128 -/// module, `expected.json`). The ceiling is the new value plus 10 %, rounded up to 64 bytes: -/// 2,887 * 1.1 = 3,175.7, so 3,200. A ceiling left at 3,776 would let 889 bytes of regression -/// through unseen. Both lane widths carry that ceiling, but only the eight-lane value is measured -/// (x86-64); the four-lane one is inferred, because AArch64 runs only in CI: the cells are words, -/// not lanes, so the figure should match, and the 10 % headroom covers a small difference. -/// -/// **Re-pinned: `bridge_metadata_bytes` and `bridge_retained_bytes` (#1400 amendment, batch 6 -/// fold).** The control catalog (decision 17, C4) is retained for the whole session, and the -/// browser report charged none of it. It now does: 9,556 bytes for this fixture on both rows -/// (x86-64; 1,151,078 to 1,160,634 metadata, 1,171,689 to 1,181,245 retained), and its largest -/// allocation joins the largest-bridge-allocation row. Ceilings are the new beyond-capture part -/// plus 10 %, rounded up to 64: 112,058 * 1.1 = 123,263.8 gives 123,264, and 132,669 * 1.1 = -/// 145,935.9 gives 145,984. The four-lane figure is inferred as before. -/// -/// **Re-pinned: the bridge rows and `builtin_retained_bytes` (#1381a).** The browser's session is -/// now the control plane's `SessionState` (D1): the bridge rows charge everything the control plane -/// keeps for the session, which the browser did not hold before -- the control catalog, the -/// protocol queues, the replay cache, the control frame scratch, the plan exchange and the strip, -/// effect and send producers. For this one-strip fixture the control plane's row is 427,534 bytes -/// (x86-64; the catalog's 9,556 bytes, charged on their own since batch 6, are inside it and no longer -/// a separate term), and the rest of each bridge row grew from about 100 KB to 535,489 (metadata) and -/// 556,100 (retained), measured on x86-64. The ceilings are those values plus 10 %, rounded up to -/// 64 bytes: 589,056 and 611,712 (after the rebase onto batch 6's final head the rows measure 535,497 and -/// 556,108, 8 bytes more; the ceilings stand). `builtin_retained_bytes` rose from 2,887 to 4,041 -/// because the plan's lanes are the control plane's (decision 17 C6), which attaches the strips' -/// input lanes (trim, polarity and filters) where the browser's no-commands options attached none: -/// 4,041 * 1.1 = 4,445.1, so 4,480. The four-lane values are inferred, as before. -/// -/// **Re-pinned: `bridge_retained_bytes` (#1562b review B1).** The browser sizes its source PCM -/// staging, its plane references and its ID staging by what the grammar allows (255 channels, 127 -/// ID bytes), not by the boot session, so a rebuild can add any valid source. For this fixture the -/// retained row rose from 1,631,181 to 1,764,878 bytes (x86-64; +133,697: the PCM staging from 2 -/// to 255 channels of the quantum, the plane references and the ID staging); the metadata row rose -/// by the plane references alone (1,594,186 to 1,598,234) and stays under its ceiling. The new -/// beyond-capture figure is 716,302; plus 10 % is 787,932.2, rounded up to 64: 787,968. -/// -/// **Re-pinned: `bridge_retained_bytes` (source channels, batch 13).** A source is mono or stereo -/// (owner answer of 2026-10-15), so the browser sizes the same staging by -/// `SOURCE_CHANNELS_LAUNCH_MAXIMUM` (two), not 255: the PCM staging is back to 2 channels of the -/// quantum and the plane references to two. The ID staging keeps its 127 bytes. For this fixture -/// the retained row fell from 1,764,878 to 1,631,294 bytes (x86-64; -133,584 and 113 for the ID -/// staging, so +113 over the row before B1), and the metadata row to 1,594,186. The new -/// beyond-capture figure is 582,718; plus 10 % is 640,989.8, rounded up to 64: 641,024. -/// -/// **Re-pinned: `source_total_bytes` and `source_overhead_bytes` (#1641, batch 16).** Every plan -/// holds the session timeline: the timeline consumer's fixed bytes (#1641 D7), its one-slot command -/// queue, its one-entry history (the fixture has no latency, so `K = 1`) and the consumer inline in -/// the source driver. Both rows rose by 480 bytes (x86-64): overhead 2,658 to 3,138 and total 3,682 -/// to 4,162. The ceilings are the new values plus 10 %, rounded up to 64: 3,451.8 -> 3,456 (was -/// 2,688) and 4,578.2 -> 4,608 (was 3,840). The four-lane values are inferred, as before. -const BUDGETS: [Budget; 12] = [ - Budget { - row: "bridge_metadata_bytes", - value: |report| report.bridge_metadata_bytes, - eight_lanes: CAPTURE + 589_056, - four_lanes: CAPTURE + 589_056, - }, - Budget { - row: "bridge_retained_bytes", - value: |report| report.bridge_retained_bytes, - eight_lanes: CAPTURE + 641_024, - four_lanes: CAPTURE + 641_024, - }, - Budget { - row: "source_total_bytes", - value: |report| report.source_total_bytes, - eight_lanes: 4_608, - four_lanes: 4_608, - }, - Budget { - row: "source_overhead_bytes", - value: |report| report.source_overhead_bytes, - eight_lanes: 3_456, - four_lanes: 3_456, - }, - Budget { - row: "builtin_retained_bytes", - value: |report| report.builtin_retained_bytes, - eight_lanes: 4_480, - four_lanes: 4_480, - }, - Budget { - row: "graph_session_plus_plan_bytes", - value: |report| report.graph_session_plus_plan_bytes, - eight_lanes: 52_864, - four_lanes: 38_784, - }, - Budget { - row: "graph_incremental_plan_bytes", - value: |report| report.graph_incremental_plan_bytes, - eight_lanes: 52_864, - four_lanes: 38_784, - }, - Budget { - row: "graph_metadata_bytes", - value: |report| report.graph_metadata_bytes, - eight_lanes: 7_424, - four_lanes: 7_360, - }, - Budget { - row: "graph_delay_bytes", - value: |report| report.graph_delay_bytes, - eight_lanes: 0, - four_lanes: 0, - }, - Budget { - row: "effect_scalar_state_bytes", - value: |report| report.effect_scalar_state_bytes, - eight_lanes: 0, - four_lanes: 0, - }, - Budget { - row: "effect_scalar_scratch_bytes", - value: |report| report.effect_scalar_scratch_bytes, - eight_lanes: 0, - four_lanes: 0, - }, - Budget { - row: "observation_retained_bytes", - value: |report| report.observation_retained_bytes, - eight_lanes: 0, - four_lanes: 0, - }, -]; - -fn ceiling(row: &str) -> u64 { - BUDGETS - .iter() - .find(|budget| budget.row == row) - .unwrap_or_else(|| panic!("no budget row {row}")) - .ceiling() -} - -#[test] -fn browser_identity_fixture_retained_rows_stay_within_their_budgets() { - let host = AudioWorkletEngineHost::boot(SESSION_DOCUMENT.as_bytes(), options()).unwrap_or_else( - |failure| panic!("boot: {}", String::from_utf8_lossy(failure.diagnostic())), - ); - let report = *host.resources(); - drop(host); - - // Every row against its ceiling, reported whole before any assertion so one red run shows - // every row's headroom. - let mut over = Vec::new(); - for budget in &BUDGETS { - let value = (budget.value)(&report); - let ceiling = budget.ceiling(); - println!("{}: {value} of {ceiling}", budget.row); - if value > ceiling { - over.push(format!("{} {value} > {ceiling}", budget.row)); - } - } - assert!( - over.is_empty(), - "retained rows over their budget (raise the budget with its reason, or find the \ - regression): {over:?}" - ); - - // The budget binds through the host's own admission. The browser's one cap is its total boot - // memory budget, checked against the exact retained aggregate of the bridge, graph and source - // rows: a host configured at the budgets' sum boots the fixture, and one configured a byte - // below the fixture's own aggregate refuses it. - let exact = report.bridge_retained_bytes - + report.graph_session_plus_plan_bytes - + report.source_total_bytes; - let budgeted = ceiling("bridge_retained_bytes") - + ceiling("graph_session_plus_plan_bytes") - + ceiling("source_total_bytes"); - let at_budget = AudioWorkletEngineHost::boot( - SESSION_DOCUMENT.as_bytes(), - WebBootOptions { - maximum_memory_bytes: budgeted, - ..options() - }, - ) - .unwrap_or_else(|failure| { - panic!( - "a host at the budgeted {budgeted} bytes refused the fixture: {}", - String::from_utf8_lossy(failure.diagnostic()) - ) - }); - assert_eq!(*at_budget.resources(), report, "the budget moves no row"); - drop(at_budget); - let refused = AudioWorkletEngineHost::boot( - SESSION_DOCUMENT.as_bytes(), - WebBootOptions { - maximum_memory_bytes: exact - 1, - ..options() - }, - ) - .err() - .expect("one byte below the fixture's exact retained aggregate must refuse"); - assert_eq!(refused.result(), RESULT_REFUSED_BUDGET); -} - -/// The browser's graph row charges the allocation the plan makes for itself and not the session's -/// (#1502 m1, #1312 m3, #1399). The browser copies host-core's graph row unchanged, and the graph -/// compiler's row is its incremental row plus the session bytes the facade does not pass it, so the -/// row less the incremental row is the plan's own: its revision gate and its jump-length cell -/// (#1639 D1), whose reader holds the session's count and does not own it. The session's -/// `live_values_superseded` count is one allocation every plan of the session shares, so the -/// browser charges it once, in its bridge rows (the exact-decomposition tests in `src/tests.rs` -/// add it there), and the plan's row must not charge it again. A row that leaves the gate out would -/// let the exact aggregate under-report a real allocation, and one that charges the count per plan -/// would charge it twice; no ceiling above would notice either. -#[test] -fn the_graph_row_charges_the_plans_gate_and_not_the_sessions_superseded_count() { - let host = AudioWorkletEngineHost::boot(SESSION_DOCUMENT.as_bytes(), options()).unwrap_or_else( - |failure| panic!("boot: {}", String::from_utf8_lossy(failure.diagnostic())), - ); - let report = *host.resources(); - assert_eq!( - report.graph_session_plus_plan_bytes - report.graph_incremental_plan_bytes, - // The jump-length cell, #1639 D1. - engine::realtime::plan_revision_gate_retained_bytes() - + host_core::jump_length_retained_bytes(), - "the browser's graph row: the graph's own bytes, the plan's revision gate and its \ - jump-length cell" - ); -} diff --git a/scripts/check-effect-runtime-policy.sh b/scripts/check-effect-runtime-policy.sh index 396219086..d87aa0002 100644 --- a/scripts/check-effect-runtime-policy.sh +++ b/scripts/check-effect-runtime-policy.sh @@ -41,7 +41,7 @@ done # The rows still above 1 are not laziness, they are one blocked change. `effect-contract` # is `std` and control-plane; `effect-runtime` is `no_std` and lane-generic; # neither may depend on the other, so each defines its own `normalize_zero`, `is_negative_zero`, -# parameter-domain predicate, mapping pair and `StatePayloadError`, and every effect crate carries +# parameter-domain predicate and `StatePayloadError`, and every effect crate carries # a small `state_error` bridge between the two error types. Collapsing them needs one edge - # `effect-runtime` depending on `effect-contract`, which requires making the contract `no_std` # (its only `std` uses are `BTreeMap`, `BTreeSet` and `Arc`, all of them `alloc`) - and then a @@ -66,8 +66,8 @@ fn\s+advance_ramps\( 1 95 fn\s+check_block[(<] 1 95 fn\s+normalize_zero\( 2 95 fn\s+is_negative_zero\( 2 95 -fn\s+map_normalized\( 2 95 -fn\s+inverse_map_normalized\( 2 95 +fn\s+map_normalized\( 0 95 +fn\s+inverse_map_normalized\( 0 95 fn\s+parameter_value_valid\( 3 95 fn\s+validate_state_lengths\( 2 95 fn\s+state_error\( 6 95 diff --git a/tools/session-validator/tests/skill.rs b/tools/session-validator/tests/skill.rs deleted file mode 100644 index f96b2240e..000000000 --- a/tools/session-validator/tests/skill.rs +++ /dev/null @@ -1,111 +0,0 @@ -//! The shipped `author-session` skill's validator commands must run as written. -//! -//! The skill is the repo's answer to "how does an agent build a session file", and its whole value -//! is that an agent can paste its commands verbatim. A renamed subcommand or flag that left the -//! skill stale would be discovered by the next agent that tried to use it, which is the worst -//! possible place to discover it. So every `session-validator` command in the skill's fenced shell -//! blocks is run here, through the validator's own binary, on a launch fixture: the command line -//! must parse and the fixture must pass. Commands of other packages are not this binary's to run. - -use std::ffi::OsStr; -use std::path::{Path, PathBuf}; -use std::process::Command; - -fn repository_root() -> PathBuf { - Path::new(env!("CARGO_MANIFEST_DIR")) - .ancestors() - .nth(2) - .expect("workspace root is two levels above tools/") - .to_path_buf() -} - -/// Every line inside a fenced shell block of `markdown`. -fn fenced_shell_lines(markdown: &str) -> Vec<&str> { - let mut lines = Vec::new(); - let mut inside = false; - for line in markdown.lines().map(str::trim) { - if let Some(fence) = line.strip_prefix("```") { - inside = !inside && matches!(fence, "sh" | "bash" | "shell"); - } else if inside && !line.is_empty() { - lines.push(line); - } - } - assert!(!inside, "a fenced shell block is not closed"); - lines -} - -/// The package and argv of a `cargo run ... -p -- ` line, less a trailing -/// `> file` redirection. -fn cargo_run(line: &str) -> Option<(&str, Vec<&str>)> { - let words: Vec<&str> = line.split_whitespace().collect(); - if words.get(..2) != Some(&["cargo", "run"][..]) { - return None; - } - assert!( - !line.contains(['\'', '"', '$', '|', '<', '\\']), - "the skill command {line:?} needs a shell this test does not model" - ); - let separator = words.iter().position(|word| *word == "--")?; - let package = words[..separator] - .windows(2) - .find(|pair| pair[0] == "-p" || pair[0] == "--package") - .map(|pair| pair[1])?; - let mut argv = words[separator + 1..].to_vec(); - if let Some(redirect) = argv.iter().position(|word| *word == ">") { - assert_eq!(redirect + 2, argv.len(), "{line:?}: one redirection target"); - argv.truncate(redirect); - } - Some((package, argv)) -} - -#[test] -fn the_shipped_skill_validator_commands_run_verbatim() { - let root = repository_root(); - let path = root.join(".claude/skills/author-session/SKILL.md"); - let skill = std::fs::read_to_string(&path) - .unwrap_or_else(|error| panic!("read {}: {error}", path.display())); - // A launch fixture that passes every stage stands in for the skill's placeholder paths. - let fixture = root.join("fixtures/session/v1/canonical-minimal.json"); - let canonical = std::fs::read_to_string(&fixture) - .unwrap_or_else(|error| panic!("read {}: {error}", fixture.display())); - - let mut ran = 0; - for line in fenced_shell_lines(&skill) { - let Some(("session-validator", argv)) = cargo_run(line) else { - continue; - }; - let output = Command::new(env!("CARGO_BIN_EXE_session_validator")) - .args(argv.iter().map(|word| { - if word.ends_with(".json") { - fixture.as_os_str() - } else { - OsStr::new(word) - } - })) - .output() - .expect("run the validator binary"); - let stderr = String::from_utf8_lossy(&output.stderr); - assert_eq!( - output.status.code(), - Some(0), - "the skill command {line:?} does not run as written:\n{stderr}" - ); - let stdout = String::from_utf8(output.stdout).expect("UTF-8 output"); - if argv.contains(&"--canonical") { - assert_eq!( - stdout, canonical, - "{line:?}: stdout is the canonical document" - ); - } else { - assert!( - stdout.contains("PASS"), - "{line:?}: the stage report\n{stdout}" - ); - } - ran += 1; - } - assert!( - ran > 0, - "the skill names no session-validator command to run" - ); -} From b00d77abd8469ac6f47afb7a7d9545e02af97a46 Mon Sep 17 00:00:00 2001 From: BL Date: Tue, 20 Oct 2026 01:48:14 +0000 Subject: [PATCH 04/10] Delete measured-redundant effect tests and their unused helpers (TA4) Co-Authored-By: Claude Opus 5.5 --- crates/compressor/tests/MUTATIONS.md | 21 +- crates/compressor/tests/identity.rs | 15 - crates/compressor/tests/lane_identity.rs | 135 ----- crates/compressor/tests/mono_collapse.rs | 85 --- crates/compressor/tests/nonfinite.rs | 54 -- crates/compressor/tests/partition.rs | 83 +-- crates/compressor/tests/payload.rs | 115 +--- crates/delay/src/lib.rs | 94 ---- crates/delay/tests/MUTATIONS.md | 10 +- crates/gate-expander/tests/identity.rs | 123 +---- crates/gate-expander/tests/state.rs | 208 -------- crates/multiband-compressor/tests/identity.rs | 128 ----- crates/parametric-eq/src/lib.rs | 498 +----------------- crates/parametric-eq/tests/MUTATIONS.md | 25 +- crates/parametric-eq/tests/bank.rs | 155 +----- crates/parametric-eq/tests/carry.rs | 144 +---- crates/parametric-eq/tests/contract.rs | 103 ---- crates/parametric-eq/tests/mono_collapse.rs | 51 -- crates/parametric-eq/tests/response.rs | 221 -------- crates/soft-clip/tests/MUTATIONS.md | 8 +- crates/soft-clip/tests/boundary_check.rs | 16 - crates/soft-clip/tests/state_roundtrip.rs | 44 -- crates/transient-shaper/tests/MUTATIONS.md | 6 + crates/transient-shaper/tests/partition.rs | 89 +--- crates/true-peak-limiter/src/lib.rs | 45 -- crates/true-peak-limiter/tests/MUTATIONS.md | 12 +- .../true-peak-limiter/tests/mono_collapse.rs | 61 --- 27 files changed, 76 insertions(+), 2473 deletions(-) diff --git a/crates/compressor/tests/MUTATIONS.md b/crates/compressor/tests/MUTATIONS.md index dfe8bc6af..557deab94 100644 --- a/crates/compressor/tests/MUTATIONS.md +++ b/crates/compressor/tests/MUTATIONS.md @@ -160,7 +160,7 @@ tree restored between rows. | # | mutation | file | test | result | |---|---|---|---|---| -| M2-C1 | the collapsed per-frame body computes the level as `main_left.abs()` instead of `link_frame(detector, slot, main_left, main_left, ..)` — the "the link is a no-op on a mono bank" simplification | `compressor/src/kernel.rs` `frames_loop_mono` | `the_collapsed_body_renders_the_dual_bodys_left_plane` | RED — `LinkMode::Average` is `0.5*|p| + 0.5*|p|`, which is not `|p|` for a subnormal `p`. Every *sample* assertion stays green (the detector floor clamps it); the serialised detector ring is where it shows, which is why this test compares state | +| M2-C1 | the collapsed per-frame body computes the level as `main_left.abs()` instead of `link_frame(detector, slot, main_left, main_left, ..)` — the "the link is a no-op on a mono bank" simplification | `compressor/src/kernel.rs` `frames_loop_mono` | `the_collapsed_body_renders_the_dual_bodys_left_plane` (deleted by TA4; KEEP catcher compressor `mono_collapse::mono_reopen_drives_the_next_render_from_the_copied_state`) | RED — `LinkMode::Average` is `0.5*|p| + 0.5*|p|`, which is not `|p|` for a subnormal `p`. Every *sample* assertion stays green (the detector floor clamps it); the serialised detector ring is where it shows, which is why this test compares state | | M2-C2 | the same, in the staged idle body | `compressor/src/kernel.rs` `idle_frames_staged_mono` | the same test | RED | | M2-C3 | `Channel::copy_state_from` drops `words` | `compressor/src/kernel.rs` | `a_desymmetrized_bank_is_a_never_collapsed_bank` | RED — redundant *given* `ramps` on a continuously automated session and load-bearing on one whose ramp settled while collapsed, which is why the test retargets once and then stops | | M2-C4 | `Channel::copy_state_from` drops `ramps` | `compressor/src/kernel.rs` | `a_desymmetrized_bank_is_a_never_collapsed_bank` | RED — all four fields of every smoothed parameter; only the collapsed channel's were advanced | @@ -212,7 +212,7 @@ Driver: one mutation at a time, `CARGO_INCREMENTAL=0 cargo test --locked -p comp | # | mutation | red | |---|---|---| | 981-M1 | the recursive words are never written back to their channels | gate 1, `scenario_981_heterogeneous_hostile_render_is_pinned`, `cross_target`, and 22 more tests across `conformance`, `identity`, `lane_identity`, `mono_collapse`, `nonfinite`, `observation`, `oracle`, `partition` and `ramps` (27 red) | -| 981-M2 | `start` is ignored: the settled slice begins at frame 0 | gate 1, `scenario_981_*`, `cross_target`, `lane_identity::bank_matches_scalar_per_lane_bits`, `partition::block_partitions_are_invariant`, `partition::bank_block_partitions_are_invariant`, and three `ramps` tests (12 red) | +| 981-M2 | `start` is ignored: the settled slice begins at frame 0 | gate 1, `scenario_981_*`, `cross_target`, `lane_identity::bank_matches_scalar_per_lane_bits` (deleted by TA4; KEEP catcher lane `sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts`), `partition::block_partitions_are_invariant`, `partition::bank_block_partitions_are_invariant`, and three `ramps` tests (12 red) | | 981-M3 | every detector takes `settled_main`, so `Silent` and `Sidechain` blocks read the main input | gate 1 (its `Silent` and `Sidechain` cases under a quiet main), `contract::links_are_exact_and_connected_sidechain_is_distinct_from_main_detection`, `nonfinite::a_nan_in_the_sidechain_alone_is_clamped_to_the_level_floor` (6 red). Neither `causality` nor `partition::linked_sidechain_partitions_are_invariant` went red, which is why the grid carries the sidechain cases | | 981-M4 | the right channel's `one_frame` updates the left recursive word (`&mut gain_left`), the verification's replacement for "right before left" | gate 1, `scenario_981_*`, `cross_target`, `lane_identity`, four `mono_collapse` tests, two `nonfinite`, `observation`, `oracle` and two `ramps` tests (17 red) | @@ -230,7 +230,7 @@ differentials see dispatch as well as bits. | # | mutation | red | |---|---|---| -| 982-M1 | the arm ignores `bypass` | `identity::bypass_preserves_exact_dry_bits_at_sample_zero`, gate 1 (`the_all_wet_arm_is_the_base_body_on_all_wet_tables`, the three differentials), gate 3, `conformance`, `contract::every_launch_rate_processes_scalar_and_supported_bank_at_zero_latency`, `mono_collapse::a_statically_bypassed_bank_collapses_to_the_dual_bits` (9 red) | +| 982-M1 | the arm ignores `bypass` | `identity::bypass_preserves_exact_dry_bits_at_sample_zero` (deleted by TA4; KEEP catcher lane `sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts`), gate 1 (`the_all_wet_arm_is_the_base_body_on_all_wet_tables`, the three differentials), gate 3, `conformance`, `contract::every_launch_rate_processes_scalar_and_supported_bank_at_zero_latency`, `mono_collapse::a_statically_bypassed_bank_collapses_to_the_dual_bits` (9 red) | | 982-M2 | the arm is taken when any lane is wet (`mask_any`) | gate 1 on the mixed corpus banks (`the_settled_body_is_the_base_body_on_the_corpus_table`, `randomized_differential_simd4`/`_simd8`), gate 3, `scenario_981_*`, `cross_target`, `lane_identity::every_width_produces_the_same_words` (7 red) | | 982-M3 | the arm drops `+ makeup` | gate 1, `scenario_982_all_wet_render_is_pinned`, `cross_target` (its `f32` lane 7 has mix 1 and makeup 6), `lane_identity::every_width_produces_the_same_words` (7 red). `oracle` stays green, as the verification found | | 982-M4 | the arm is never taken | gate 3 (`the_all_wet_arm_is_taken_exactly_when_every_lane_is_wet`) and gate 1's dispatch assertion (5 red). No bit-exactness test can see it: it is a performance-only regression | @@ -246,7 +246,7 @@ frames with ramps ending at frame 40. | # | mutation | red | |---|---|---| | 983-M1 | pass 2 reads `targets[k + 1]` (`targets.iter().cycle().skip(1)`) | gate 1, all three scenarios, `cross_target`, `partition` (both), `lane_identity`, four `mono_collapse`, `conformance`, `contract` and two `ramps` tests (20 red) | -| 983-M2 | the last, short chunk is skipped (`chunks_exact_mut` on the outer loop) | gate 1, all three scenarios, `cross_target`, `partition::block_partitions_are_invariant`, `partition::bank_block_partitions_are_invariant`, `conformance`, `contract` (13 red) | +| 983-M2 | the last, short chunk is skipped (`chunks_exact_mut` on the outer loop) | gate 1, all three scenarios, `cross_target`, `partition::block_partitions_are_invariant` (deleted by TA4; KEEP catcher lane `fader_matrix::select_free_fused_fader_matrix_matches_both_oracles_when_no_lane_is_identity`), `partition::bank_block_partitions_are_invariant`, `conformance`, `contract` (13 red) | | 983-M3 | pass 1 runs only for the first chunk; later chunks reuse its targets | gate 1, all three scenarios, `cross_target`, `partition` (both), `lane_identity`, `conformance` and three `ramps` tests (16 red) | | 983-M4 | `gl` and `gr` swapped in pass 2 | gate 1, all three scenarios, `cross_target`, `lane_identity`, two `nonfinite`, `conformance` and two `ramps` tests (15 red) | | 984-M1 | the `abs` arm is taken for every link mode | gate 1, all three scenarios, `cross_target` (`maximum_link`, `average_link`), `identity::average_link_is_two_products_and_an_add`, `contract::links_are_exact_and_connected_sidechain_is_distinct_from_main_detection` (11 red) | @@ -267,7 +267,7 @@ same witness-keyed "both NaN" rule as the dual half, and the grid runs a third p | # | mutation | red | |---|---|---| | 985-M2 | the short last chunk is skipped (`chunks_exact_mut` on the outer loop), the verification's replacement for "the body reads the right plane", which cannot be written | gate 1 (its 31-, 33- and 97-frame blocks: the grid on every table and the three differentials), `scenario_985_collapsed_render_is_pinned` (7 red) | -| 985-M3 | the recursive word's write-back is dropped | gate 1, `scenario_985_*`, and four `mono_collapse` tests including `the_collapsed_body_renders_the_dual_bodys_left_plane` (11 red) | +| 985-M3 | the recursive word's write-back is dropped | gate 1, `scenario_985_*`, and four `mono_collapse` tests including `the_collapsed_body_renders_the_dual_bodys_left_plane` (deleted by TA4; KEEP catcher compressor `mono_collapse::mono_reopen_drives_the_next_render_from_the_copied_state`) (11 red) | | 985-M4 | the collapsed wet arm ignores `bypass` | `mono_collapse::a_statically_bypassed_bank_collapses_to_the_dual_bits`, gate 1 (7 red) | | # | mutation | why it survives | @@ -337,7 +337,7 @@ Driver as for #981-#985, dev profile, one mutation at a time on a scratch copy. | # | mutation | red | |---|---|---| | 1006-M1 | the `remaining == 0` hold dropped: a ramp at rest takes its target, as on its last sample | `randomized_differential_simd4`/`_simd8` (their payload restores at `remaining = 0`), both #1006 scenarios (4 red) | -| 1006-M3 | the output ramps (attack, release, makeup, mix) advanced in pass 1 as well, the brief's "attack in pass 1" | gate 1, both #1006 scenarios, `partition::block_partitions_are_invariant`, `payload::an_active_attack_restore_*`, `ramps::an_attack_cancel_to_current_*`, `native_points`, `cross_target`, two `mono_collapse` tests and `ramps::a_both_channel_point_on_every_bank_lane_*` (`bench_ramp`'s preflight until #1027 ported it) (16 red) | +| 1006-M3 | the output ramps (attack, release, makeup, mix) advanced in pass 1 as well, the brief's "attack in pass 1" | gate 1, both #1006 scenarios, `partition::block_partitions_are_invariant` (deleted by TA4; KEEP catcher lane `fader_matrix::select_free_fused_fader_matrix_matches_both_oracles_when_no_lane_is_identity`), `payload::an_active_attack_restore_*`, `ramps::an_attack_cancel_to_current_*`, `native_points`, `cross_target`, two `mono_collapse` tests and `ramps::a_both_channel_point_on_every_bank_lane_*` (`bench_ramp`'s preflight until #1027 ported it) (16 red) | | 1006-M5 | the wet arm taken while a mix ramp is open (both bodies) | gate 1 (its witness and its bits), both #1006 scenarios, `partition`, `lane_identity::every_width_produces_the_same_words`, `cross_target` (9 red) | | 1006-M6 | the words scattered from before the prefix (the dual prefix's word write-back dropped) | gate 1, `scenario_981`, `982`, `983` and `1006`, the bank scenario, #982's witness gate, `cross_target`, two `ramps` tests, `mono_collapse` (16 red) | | 1006-M7 | the collapsed prefix skips the curve redesign on a moved lane | gate 1, `scenario_985`, `scenario_1006`, the bank scenario, two `mono_collapse` tests (11 red) | @@ -373,3 +373,12 @@ file was restored byte for byte from a saved copy. `the_narrowest_soft_knees_do_not_duck_a_sample_at_the_threshold` stays green under both: it is a preservation gate for widths the rule must not move, not a red gate. + +## TA4 deletions + +The 2026-10 test audit (TA4, batch 1 mutation measurement at `81a3074fc`) deleted the tests named below. Each one's caught mutants were also red in the KEEP test named beside it. That is the recorded catcher of the deleted test's sampled mutants; the mutation of each row above was not re-run. + +- `the_collapsed_body_renders_the_dual_bodys_left_plane`: compressor `mono_collapse::mono_reopen_drives_the_next_render_from_the_copied_state` +- `bank_matches_scalar_per_lane_bits`: lane `sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` +- `block_partitions_are_invariant`: lane `fader_matrix::select_free_fused_fader_matrix_matches_both_oracles_when_no_lane_is_identity` +- `bypass_preserves_exact_dry_bits_at_sample_zero`: lane `sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` diff --git a/crates/compressor/tests/identity.rs b/crates/compressor/tests/identity.rs index 5f17a77eb..58c49d420 100644 --- a/crates/compressor/tests/identity.rs +++ b/crates/compressor/tests/identity.rs @@ -21,21 +21,6 @@ fn render( (left, right) } -#[test] -fn bypass_preserves_exact_dry_bits_at_sample_zero() { - let values = values_with(&[]); - let mut preparation = request(&values); - preparation.bypass = true; - let mut effect = prepare(preparation); - let input_left = noise(FRAMES, 0xB1_A5_00_01, 0.75); - let input_right = noise(FRAMES, 0xB1_A5_00_02, 0.75); - let (left, right) = render(effect.as_mut(), &input_left, &input_right); - for index in 0..FRAMES { - assert_eq!(left[index].to_bits(), input_left[index].to_bits()); - assert_eq!(right[index].to_bits(), input_right[index].to_bits()); - } -} - #[test] fn zero_mix_is_dry_while_gain_reduction_runs() { let compressing = values_with(&[(0, -40.0), (1, 20.0), (2, 0.0)]); diff --git a/crates/compressor/tests/lane_identity.rs b/crates/compressor/tests/lane_identity.rs index 00d6277a7..31d5bc56f 100644 --- a/crates/compressor/tests/lane_identity.rs +++ b/crates/compressor/tests/lane_identity.rs @@ -15,141 +15,6 @@ mod support; use compressor::corpus::{CASE_NAMES, POINTS, run_case}; -use effect_contract::{ParameterChannel, PreparedAutomationSpan}; -use support::{ - bind_bank, native_bank_width, noise, prepare, render_bank, render_scalar, request_with_quantum, - snapshot, snapshot_track, values_with, -}; - -const FRAMES: usize = 2_048; -const QUANTUM: u32 = 128; - -/// Per-track parameters: no two tracks agree on anything the kernel reads per lane. -fn track_values( - track: usize, -) -> [effect_contract::InitialParameterValue; support::PARAMETER_COUNT * 2] { - values_with(&[ - (0, -10.0 - 6.0 * track as f32), - (1, 1.5 + 2.0 * track as f32), - (2, 3.0 * (track % 4) as f32), - (3, 0.5 + track as f32), - (4, 20.0 + 40.0 * track as f32), - (5, -3.0 + track as f32), - (6, 0.25 + 0.1 * (track % 4) as f32), - ]) -} - -/// A bank renders each lane exactly as the scalar instance for that track does. -/// -/// Red mutations (MUTATIONS.md row 12 and the causal replacement for row 1), both proven: use -/// lane 0's current detector/input for every lane, or make the `design_lane` scatter write lane 0 -/// for every lane. -#[test] -fn bank_matches_scalar_per_lane_bits() { - let Some((_, width)) = native_bank_width() else { - println!("scalar-only build: the width half of E2 covers this case"); - return; - }; - let lanes = width.lanes() as usize; - let values: Vec<_> = (0..lanes).map(track_values).collect(); - let requests: Vec<_> = values - .iter() - .map(|v| request_with_quantum(v, QUANTUM)) - .collect(); - let mut bank = bind_bank(&requests).expect("bank must bind at this build's width"); - - // One Point early on track 1 and one later on the last track: automation is per lane too. - let spans = vec![ - ( - 3 * 128_u64, - 1_usize, - PreparedAutomationSpan { - channel: ParameterChannel::Left, - parameter_index: 0, - sample: 0, - value: -44.0, - }, - ), - ( - 9 * 128_u64, - lanes - 1, - PreparedAutomationSpan { - channel: ParameterChannel::Right, - parameter_index: 6, - sample: 0, - value: 0.9, - }, - ), - ]; - - let mut bank_left = vec![0.0_f32; FRAMES * lanes]; - let mut bank_right = vec![0.0_f32; FRAMES * lanes]; - let mut per_track: Vec<(Vec, Vec)> = Vec::new(); - for track in 0..lanes { - let left = noise(FRAMES, 0x1A_4E_00_10 + track as u64, 0.8); - let right = noise(FRAMES, 0x1A_4E_00_20 + track as u64, 0.8); - for frame in 0..FRAMES { - bank_left[frame * lanes + track] = left[frame]; - bank_right[frame * lanes + track] = right[frame]; - } - per_track.push((left, right)); - } - render_bank( - bank.as_mut(), - &mut bank_left, - &mut bank_right, - lanes, - width, - 128, - QUANTUM, - &spans, - ); - - for (track, (mut left, mut right)) in per_track.into_iter().enumerate() { - let mut effect = prepare(request_with_quantum(&values[track], QUANTUM)); - let scalar_spans: Vec<(u64, PreparedAutomationSpan)> = spans - .iter() - .filter(|(_, lane, _)| *lane == track) - .map(|(at, _, span)| (*at, *span)) - .collect(); - render_scalar( - effect.as_mut(), - &mut left, - &mut right, - 128, - QUANTUM, - &scalar_spans, - ); - - for frame in 0..FRAMES { - assert_eq!( - bank_left[frame * lanes + track].to_bits(), - left[frame].to_bits(), - "track {track}, frame {frame}, left" - ); - assert_eq!( - bank_right[frame * lanes + track].to_bits(), - right[frame].to_bits(), - "track {track}, frame {frame}, right" - ); - } - assert!( - left[1_500..].iter().any(|sample| *sample != 0.0), - "track {track} rendered nothing" - ); - - let (scalar_state_left, scalar_state_right) = snapshot(effect.as_ref()); - let (bank_state_left, bank_state_right) = snapshot_track(bank.as_ref(), track as u32); - assert_eq!( - bank_state_left, scalar_state_left, - "track {track} left state" - ); - assert_eq!( - bank_state_right, scalar_state_right, - "track {track} right state" - ); - } -} /// The one kernel body produces identical result words at `W = 1` and every vector width the build /// has: 4, and 8 in the 8-lane (AVX2) build (#1112). diff --git a/crates/compressor/tests/mono_collapse.rs b/crates/compressor/tests/mono_collapse.rs index ba0e234e2..93ba00a5b 100644 --- a/crates/compressor/tests/mono_collapse.rs +++ b/crates/compressor/tests/mono_collapse.rs @@ -147,91 +147,6 @@ fn run_block( } } -/// The collapsed body renders the dual body's left plane, bit for bit, under every link mode. -#[test] -fn the_collapsed_body_renders_the_dual_bodys_left_plane() { - let Some((_, width)) = support::native_bank_width() else { - return; - }; - let lanes = width.lanes() as usize; - for (link_mode, ramping, body) in [ - (LinkMode::DualMono, true, "per-frame"), - (LinkMode::DualMono, false, "idle"), - (LinkMode::Average, true, "per-frame"), - (LinkMode::Average, false, "idle"), - (LinkMode::Maximum, true, "per-frame"), - (LinkMode::Maximum, false, "idle"), - ] { - // A threshold and ratio that put the detector on both sides of the knee for this content. - let values = support::values_with(&[(0, -30.0), (1, 4.0)]); - let requests: Vec<_> = (0..lanes) - .map(|_| request_linked(&values, link_mode)) - .collect(); - let mut dual = support::bind_bank(&requests).expect("dual bank"); - let mut collapsed = support::bind_bank(&requests).expect("collapsed bank"); - let offsets = offsets(lanes); - - for step in 0..BLOCKS { - let mut dual_left = block(step * FRAMES, lanes); - let mut dual_right = dual_left.clone(); - let mut mono_left = dual_left.clone(); - // The plane the collapsed chain never gathers. Filled with a value the dual run can - // never produce, so a body that reads it produces something visibly wrong rather than - // something plausible. - let mut stale = vec![f32::from_bits(0x7F7F_FFFF); FRAMES * lanes]; - let first = (step * FRAMES) as u64; - let (spans, span_offsets) = automation(step, lanes); - let (spans, span_offsets): (&[PreparedAutomationSpan], &[u32]) = if ramping { - (&spans, &span_offsets) - } else { - (&[], &offsets) - }; - run_block( - dual.as_mut(), - &mut dual_left, - &mut dual_right, - width, - first, - spans, - span_offsets, - false, - ); - run_block( - collapsed.as_mut(), - &mut mono_left, - &mut stale, - width, - first, - spans, - span_offsets, - true, - ); - for (word, (collapsed_word, dual_word)) in - mono_left.iter().zip(dual_left.iter()).enumerate() - { - assert_eq!( - collapsed_word.to_bits(), - dual_word.to_bits(), - "{link_mode:?}/{body} block {step} word {word}: the collapsed left plane \ - must be the dual left plane to the bit" - ); - } - } - - // Equal PCM must also leave equal state for the following dual-channel block. - collapsed.desymmetrize_channels(); - for track in 0..lanes as u32 { - let dual_payload = support::snapshot_track(dual.as_ref(), track); - let mono_payload = support::snapshot_track(collapsed.as_ref(), track); - assert_eq!( - mono_payload, dual_payload, - "{link_mode:?}/{body} track {track}: the collapsed bank's serialised state must \ - be the dual bank's, both sections, after the disengage copy" - ); - } - } -} - /// After `desymmetrize_channels`, a bank that ran collapsed renders what a never-collapsed one does. /// /// The kernel-level transition oracle. The console gate makes the same statement over the whole diff --git a/crates/compressor/tests/nonfinite.rs b/crates/compressor/tests/nonfinite.rs index a281a6678..ee9f6966f 100644 --- a/crates/compressor/tests/nonfinite.rs +++ b/crates/compressor/tests/nonfinite.rs @@ -225,60 +225,6 @@ fn a_nan_in_the_sidechain_alone_is_clamped_to_the_level_floor() { assert_eq!(left[1_500].to_bits(), 0.5_f32.to_bits()); } -/// A value at or above the section 4.4 magnitude limit is rejected even though it is finite. -#[test] -fn the_boundary_limit_rejects_a_finite_but_absurd_value() { - let values = values_with(&[(0, 0.0), (1, 1.0), (5, 0.0), (6, 0.5)]); - let mut effect = prepare(request(&values)); - let mut left = vec![0.0_f32; 2_048]; - let mut right = vec![0.0_f32; 2_048]; - // Ratio 1 and makeup 0 make this the identity path, so the input reaches the output unchanged - // and the only thing under test is the limit itself. - left[0] = 1.0e31; - let mut trips = 0_u64; - let mut offset = 0; - while offset < left.len() { - let report = effect.process( - EffectProcessBlock::new( - &mut left[offset..offset + 128], - &mut right[offset..offset + 128], - None, - offset as u64, - &[], - 128, - ) - .expect("block"), - ); - trips += report.nonfinite_left_blocks; - offset += 128; - } - assert_eq!(trips, 1, "1e31 is above the 1e30 boundary limit"); - - // And a value just below it is not rejected. - let mut effect = prepare(request(&values)); - let mut left = vec![0.0_f32; 2_048]; - let mut right = vec![0.0_f32; 2_048]; - left[0] = 9.9e29; - let mut trips = 0_u64; - let mut offset = 0; - while offset < left.len() { - let report = effect.process( - EffectProcessBlock::new( - &mut left[offset..offset + 128], - &mut right[offset..offset + 128], - None, - offset as u64, - &[], - 128, - ) - .expect("block"), - ); - trips += report.nonfinite_left_blocks; - offset += 128; - } - assert_eq!(trips, 0, "9.9e29 is below the limit and passes through"); -} - /// The recursive word flushes to exactly `+0.0`, which is what makes a settled compressor an exact /// identity again. /// diff --git a/crates/compressor/tests/partition.rs b/crates/compressor/tests/partition.rs index 788160f72..172a70e2a 100644 --- a/crates/compressor/tests/partition.rs +++ b/crates/compressor/tests/partition.rs @@ -15,93 +15,12 @@ use effect_contract::{ EffectProcessBlock, LinkMode, ParameterChannel, PreparedAutomationSpan, PreparedSidechainPort, }; -use support::{ - noise, prepare, render_scalar, request_with_quantum, sidechain_port, snapshot, values_with, -}; +use support::{noise, prepare, request_with_quantum, sidechain_port, snapshot, values_with}; const FRAMES: usize = 4_096; const QUANTUM: u32 = 512; const PARTITIONS: [usize; 9] = [1, 7, 63, 64, 65, 127, 128, 129, 512]; -/// A Point on every smoothed parameter, both channels, in the strictly increasing order the -/// contract requires. -fn every_parameter() -> Vec<(u64, PreparedAutomationSpan)> { - let targets = [-52.0_f32, 11.0, 15.0, 3.0, 700.0, -7.0, 0.4]; - let mut spans = Vec::new(); - for (parameter, value) in targets.iter().copied().enumerate() { - for channel in [ParameterChannel::Left, ParameterChannel::Right] { - spans.push(( - 0_u64, - PreparedAutomationSpan { - channel, - parameter_index: parameter as u32, - sample: 0, - value, - }, - )); - } - } - spans -} - -/// Output bits and state bytes are identical at every partition. -/// -/// Red mutation (MUTATIONS.md row 4): make the block loop lose its frame offset. Two mutations -/// that might be expected here are recorded elsewhere instead, honestly: keeping `g` in a local is -/// invisible to *this* test (both partitions lose it identically) and is gated by `cross_target` -/// (row 7), and `ramping = frames` is an equivalent mutation (row 24) because advancing a ramp with -/// `remaining == 0` is a no-op. -#[test] -fn block_partitions_are_invariant() { - let values = values_with(&[(0, -24.0), (1, 6.0), (2, 9.0)]); - let input_left = noise(FRAMES, 0x9A_27_10_01, 0.85); - let input_right = noise(FRAMES, 0x9A_27_10_02, 0.85); - let spans = every_parameter(); - - /// Rendered bits and payload bytes of one run: left samples, right samples, left state, - /// right state. - type Rendered = (Vec, Vec, Vec, Vec); - let mut reference: Option = None; - for partition in PARTITIONS { - let mut effect = prepare(request_with_quantum(&values, QUANTUM)); - let mut left = input_left.clone(); - let mut right = input_right.clone(); - let report = render_scalar( - effect.as_mut(), - &mut left, - &mut right, - partition, - QUANTUM, - &spans, - ); - assert_eq!(report.invalid_spans, 0, "partition {partition}"); - let (state_left, state_right) = snapshot(effect.as_ref()); - let bits_left: Vec = left.iter().map(|sample| sample.to_bits()).collect(); - let bits_right: Vec = right.iter().map(|sample| sample.to_bits()).collect(); - match &reference { - None => { - assert!( - left[1_000..].iter().any(|sample| *sample != 0.0), - "the render must have content" - ); - reference = Some((bits_left, bits_right, state_left, state_right)); - } - Some((expected_left, expected_right, expected_state_left, expected_state_right)) => { - assert_eq!(&bits_left, expected_left, "left, partition {partition}"); - assert_eq!(&bits_right, expected_right, "right, partition {partition}"); - assert_eq!( - &state_left, expected_state_left, - "left state, partition {partition}" - ); - assert_eq!( - &state_right, expected_state_right, - "right state, partition {partition}" - ); - } - } - } -} - /// The same property for the bank, at this build's width. #[test] fn bank_block_partitions_are_invariant() { diff --git a/crates/compressor/tests/payload.rs b/crates/compressor/tests/payload.rs index 60d14b5a1..6dcd30ad5 100644 --- a/crates/compressor/tests/payload.rs +++ b/crates/compressor/tests/payload.rs @@ -14,7 +14,7 @@ use compressor::COMPRESSOR_PARAMETERS; use support::{ CURRENT, REMAINING, STATE_HEADER_WORDS, STATE_VERSION, STEP, TARGET, bind_bank, initial_values, native_bank_width, noise, prepare, prepare_with_metadata, ramp_word, render_scalar, request, - restore, restore_track, snapshot, snapshot_track, values_with, + restore, restore_track, snapshot, snapshot_track, }; fn point(parameter: u32, channel: ParameterChannel, value: f32) -> PreparedAutomationSpan { @@ -26,70 +26,6 @@ fn point(parameter: u32, channel: ParameterChannel, value: f32) -> PreparedAutom } } -/// A snapshot round trips, and a restore at rest is bit-exact against an uninterrupted render. -/// -/// "At rest" means `remaining == 0` on every ramp, which is every sample outside the 64-sample -/// window after an automation event — well over 99 % of a session. -/// -/// Red mutation (MUTATIONS.md row 14): commit the left channel before validating the right — RED -/// on the transactional test below. -#[test] -fn an_idle_restore_is_bit_exact() { - let values = values_with(&[(0, -30.0), (1, 6.0), (2, 6.0)]); - let input_left = noise(4_096, 0x9A_10_00_01, 0.8); - let input_right = noise(4_096, 0x9A_10_00_02, 0.8); - - let mut uninterrupted = prepare(request(&values)); - let mut left = input_left.clone(); - let mut right = input_right.clone(); - render_scalar(uninterrupted.as_mut(), &mut left, &mut right, 128, 128, &[]); - - let mut restored = prepare(request(&values)); - let mut first_left = input_left[..2_048].to_vec(); - let mut first_right = input_right[..2_048].to_vec(); - render_scalar( - restored.as_mut(), - &mut first_left, - &mut first_right, - 128, - 128, - &[], - ); - let (saved_left, saved_right) = snapshot(restored.as_ref()); - - // A fresh instance takes the payload and continues the render. - let mut continued = prepare(request(&values)); - restore(continued.as_mut(), STATE_VERSION, &saved_left, &saved_right).expect("restore"); - let mut second_left = input_left[2_048..].to_vec(); - let mut second_right = input_right[2_048..].to_vec(); - render_scalar( - continued.as_mut(), - &mut second_left, - &mut second_right, - 128, - 128, - &[], - ); - - assert_eq!( - second_left.iter().map(|s| s.to_bits()).collect::>(), - left[2_048..] - .iter() - .map(|s| s.to_bits()) - .collect::>(), - "an idle restore must continue the render bit for bit" - ); - assert_eq!( - second_right.iter().map(|s| s.to_bits()).collect::>(), - right[2_048..] - .iter() - .map(|s| s.to_bits()) - .collect::>() - ); - // And the render had content. - assert!(second_left.iter().any(|sample| *sample != 0.0)); -} - /// One corrupt word in the right channel rejects the whole restore and leaves both channels /// exactly as they were. #[test] @@ -258,55 +194,6 @@ fn malformed_raw_payloads_reject_transactionally_in_scalar_and_bank_hooks() { assert_eq!(snapshot_track(bank.as_ref(), 0), bank_saved); } -/// A mid-ramp restore continues exactly as the lane it was taken from (#1278 D2a). -/// -/// The payload carries each ramp's step, so the restored ramp walks the continued ramp's words, -/// sample for sample, and lands on the target on the same sample. Layout version 1 re-derived -/// the step as `(target - current) / remaining`, which reaches the same place by another path: -/// the mutation that restores that derivation turns this test red. -#[test] -fn a_mid_ramp_restore_continues_the_ramp_exactly() { - let values = initial_values(); - let mut effect = prepare(request(&values)); - let mut left = vec![0.0_f32; 27]; - let mut right = vec![0.0_f32; 27]; - render_scalar( - effect.as_mut(), - &mut left, - &mut right, - 27, - 128, - &[(0, point(0, ParameterChannel::Left, -71.3))], - ); - let (saved_left, saved_right) = snapshot(effect.as_ref()); - assert_eq!( - read_u32(&saved_left, ramp_word(0, REMAINING)), - 37, - "37 samples still to produce" - ); - - let mut restored = prepare(request(&values)); - restore(restored.as_mut(), STATE_VERSION, &saved_left, &saved_right).expect("restore"); - for sample in 0..=37 { - assert_eq!( - snapshot(restored.as_ref()), - snapshot(effect.as_ref()), - "sample {sample}: the restored state is the continued state" - ); - for instance in [&mut restored, &mut effect] { - let mut left = vec![0.0_f32; 1]; - let mut right = vec![0.0_f32; 1]; - render_scalar(instance.as_mut(), &mut left, &mut right, 1, 128, &[]); - } - } - let (state, _) = snapshot(restored.as_ref()); - assert_eq!(read_u32(&state, ramp_word(0, REMAINING)), 0); - assert_eq!( - read_f32(&state, ramp_word(0, CURRENT)).to_bits(), - (-71.3_f32).to_bits() - ); -} - /// An active attack restore resumes its parameter and coefficient ramps word for word: the /// restored instance renders what the source renders by continuing, whole or in blocks, and both /// snap to the target on the same sample. diff --git a/crates/delay/src/lib.rs b/crates/delay/src/lib.rs index def3bd7db..3f473bcf7 100644 --- a/crates/delay/src/lib.rs +++ b/crates/delay/src/lib.rs @@ -2696,100 +2696,6 @@ mod tests { assert_eq!(effect.cross.target.to_bits(), 0.0_f32.to_bits()); } - /// #1278 D2a: a delay restored mid-ramp continues bit-identically to the instance it was taken - /// from. Feedback, damping and mix on both channels and the shared cross-feedback are all mid - /// ramp at the snapshot, each at a point where re-deriving the step from `(current, target, - /// remaining)` gives a different step than the one the instance carries. Red on a restore that - /// re-derives the step instead of carrying it: the restored snapshot catches every ramp's step - /// at once, and the render catches the damping and mix ramps' (feedback and cross only reach - /// the output through the ring, after this window). - #[test] - fn a_mid_ramp_restore_continues_bit_identically() { - const SPLIT: usize = 23; - fn render( - effect: &mut PreparedDelay, - first: u64, - frames: usize, - spans: &[PreparedAutomationSpan], - ) -> (Vec, Vec) { - let mut left: Vec = (0..frames) - .map(|i| ((first as usize + i) * 37 % 101) as f32 / 101.0 - 0.5) - .collect(); - let mut right: Vec = (0..frames) - .map(|i| ((first as usize + i) * 53 % 97) as f32 / 97.0 - 0.5) - .collect(); - effect.process( - EffectProcessBlock::new(&mut left, &mut right, None, first, spans, QUANTUM) - .expect("block"), - ); - (left, right) - } - let mut values = initial_values(); - values[0].value = 1.0; - values[1].value = 1.5; - let spans = [ - point(1, ParameterChannel::Left, 0, 0.9), - point(1, ParameterChannel::Right, 0, -0.7), - point(2, ParameterChannel::Left, 0, 0.6), - point(2, ParameterChannel::Right, 0, 0.3), - point(3, ParameterChannel::Left, 0, 0.8), - point(3, ParameterChannel::Right, 0, 0.13), - point(4, ParameterChannel::Both, 0, 0.77), - ]; - let mut original = prepare(&values); - render(&mut original, 0, SPLIT, &spans); - let carried = [ - original.left.ramps[0], - original.left.ramps[1], - original.left.ramps[2], - original.right.ramps[0], - original.right.ramps[1], - original.right.ramps[2], - original.cross, - ]; - for (index, ramp) in carried.iter().enumerate() { - let mut rederived = LinearRamp::fixed(ramp.current); - rederived.set_target(ramp.target, ramp.remaining); - assert!(ramp.remaining > 0, "ramp {index} must be mid-ramp"); - assert_ne!( - rederived.step.to_bits(), - ramp.step.to_bits(), - "ramp {index} must carry a step its triple does not re-derive" - ); - } - let (common, left, right) = snapshot(&original); - let mut twin = prepare(&values); - twin.restore_state_payload( - 1, - StatePayloadInput::new(&common, &left, &right, twin.state_sizes).expect("input"), - ) - .expect("the delay restores its own mid-ramp snapshot"); - assert_eq!( - snapshot(&twin), - (common, left, right), - "the restored twin writes back every carried word, each ramp's step included" - ); - let mut first = SPLIT as u64; - for frames in [41, 128, 128] { - let expected = render(&mut original, first, frames, &[]); - let actual = render(&mut twin, first, frames, &[]); - for (channel, (e, a)) in [(&expected.0, &actual.0), (&expected.1, &actual.1)] - .into_iter() - .enumerate() - { - for (frame, (e, a)) in e.iter().zip(a).enumerate() { - assert_eq!( - a.to_bits(), - e.to_bits(), - "channel {channel} frame {}: restored twin diverged", - first as usize + frame - ); - } - } - first += frames as u64; - } - assert_eq!(snapshot(&twin), snapshot(&original)); - } /// #1278 D2a: a carried ramp is validated whole before anything is committed. Each row /// rewrites one word of the left feedback ramp of a mid-ramp snapshot: a non-finite step, a /// `remaining` past the 64-sample ramp, and a settled ramp that still carries a step. (A finite diff --git a/crates/delay/tests/MUTATIONS.md b/crates/delay/tests/MUTATIONS.md index 15378d682..be6d0a0f3 100644 --- a/crates/delay/tests/MUTATIONS.md +++ b/crates/delay/tests/MUTATIONS.md @@ -32,8 +32,8 @@ Mutations are listed in the order the gates appear in the issue-#93 plan's eval | M14 | G5 vacuity | `corpus::run_case` reports zeros instead of what it rendered | `corpus_cases_are_finite_distinct_and_alive` | `case dual_mono is silent` -- the guard that stops a vacuous digest passing | | M15 | E10 | `bind_homogeneous_bank` answers `Ok(None)` before validating its members | `bank_fallback_validates_every_member` | a malformed member is accepted instead of rejected | | M16 | E3 oracle | the oracle's `damping_coefficient` returns `G` instead of `G / (1 + G)` | `damped_matrix_tail_matches_reference_oracle` | worst deviation 5.2e-2 -- the oracle is independent of the engine's mapping | -| M17 | #1278 D2a | `read_carried_ramp` re-derives the step from `(current, target, remaining)` through `LinearRamp::set_target` instead of carrying the read step (the pre-#1278 delay restore) | `a_mid_ramp_restore_continues_bit_identically` | `channel 1 frame 23: restored twin diverged`, `left: 1028197727` / `right: 1028197726` -- one ulp, on the first continued frame | -| M17b | #1278 D2a | restore re-derives only the cross-feedback ramp's step (`self.cross` rebuilt with `set_target`); feedback and cross reach the output only through the ring, after the test's render window | `a_mid_ramp_restore_continues_bit_identically` (its restored-snapshot assertion) | the restored twin's snapshot differs from the payload it restored -- the render alone stayed green under this edit and under a feedback-only re-derivation | +| M17 | #1278 D2a | `read_carried_ramp` re-derives the step from `(current, target, remaining)` through `LinearRamp::set_target` instead of carrying the read step (the pre-#1278 delay restore) | `a_mid_ramp_restore_continues_bit_identically` (deleted by TA4; KEEP catcher effect-runtime `contract_ramp_identity::linear_smoother_is_bit_identical_to_the_linear_ramp`) | `channel 1 frame 23: restored twin diverged`, `left: 1028197727` / `right: 1028197726` -- one ulp, on the first continued frame | +| M17b | #1278 D2a | restore re-derives only the cross-feedback ramp's step (`self.cross` rebuilt with `set_target`); feedback and cross reach the output only through the ring, after the test's render window | `a_mid_ramp_restore_continues_bit_identically` (deleted by TA4; KEEP catcher effect-runtime `contract_ramp_identity::linear_smoother_is_bit_identical_to_the_linear_ramp`) (its restored-snapshot assertion) | the restored twin's snapshot differs from the payload it restored -- the render alone stayed green under this edit and under a feedback-only re-derivation | | M19 | #1278 D2a | `read_carried_ramp` drops its `ramp_path_inside` clause (and with it the `remaining <= 64` bound, the finite-step check and the settled-step check) | `a_carried_ramp_is_refused_unless_its_whole_path_is_valid` | `NaN step`: `left: Ok(())` / `right: Err("effect.state.parameter")` -- every other delay target, the scale-20 differential included, stays green | ## Two things the table is careful about @@ -56,3 +56,9 @@ left `M7c`, `M9` and `M10` alive, and each survivor was a real gap rather than a **Two mutations fail by panicking rather than by asserting.** `M7b` underflows `transition_remaining` and `M15` reaches the test's own `panic!`. Both are unambiguous reds, and both are recorded as what they are rather than dressed up as assertion failures. + +## TA4 deletions + +The 2026-10 test audit (TA4, batch 1 mutation measurement at `81a3074fc`) deleted the tests named below. Each one's caught mutants were also red in the KEEP test named beside it. That is the recorded catcher of the deleted test's sampled mutants; the mutation of each row above was not re-run. + +- `a_mid_ramp_restore_continues_bit_identically`: effect-runtime `contract_ramp_identity::linear_smoother_is_bit_identical_to_the_linear_ramp` diff --git a/crates/gate-expander/tests/identity.rs b/crates/gate-expander/tests/identity.rs index 3f99f90d2..1589fe395 100644 --- a/crates/gate-expander/tests/identity.rs +++ b/crates/gate-expander/tests/identity.rs @@ -2,130 +2,11 @@ mod support; -use effect_contract::{EffectBankProcessBlock, LinkMode, PreparedNativeEffectBank}; use support::{ - NATIVE_LANES, Values, active_values, assert_bits_eq, initial_values, native_width, noise, - packed, prepare, prepare_bank_native, render_scalar_sidechain, request, request_at, - retarget_spans, set_parameter, snapshot, snapshot_bank, track_of, + active_values, assert_bits_eq, initial_values, noise, prepare, render_scalar_sidechain, + request, request_at, retarget_spans, set_parameter, snapshot, }; -fn track_values() -> [Values; 8] { - core::array::from_fn(|track| { - let mut values = active_values(); - set_parameter(&mut values, 0, -24.0 - track as f32, -26.0 - track as f32); - set_parameter(&mut values, 1, 2.0 + track as f32, 3.0 + track as f32); - set_parameter(&mut values, 2, 24.0 + track as f32, 30.0 + track as f32); - set_parameter(&mut values, 3, 1.0 + track as f32, 2.0 + track as f32); - set_parameter( - &mut values, - 4, - 0.5 + track as f32 * 0.25, - 0.6 + track as f32 * 0.25, - ); - set_parameter(&mut values, 5, track as f32, 1.0 + track as f32); - set_parameter(&mut values, 6, 10.0 + track as f32, 12.0 + track as f32); - values - }) -} - -/// Renders a bank of this build's own width (#1112) in blocks of `block` frames. -fn render_bank_native( - bank: &mut dyn PreparedNativeEffectBank, - left: &mut [f32], - right: &mut [f32], - block: usize, - automation: &[effect_contract::PreparedAutomationSpan], -) { - let frames = left.len() / NATIVE_LANES; - let spans: Vec<_> = (0..NATIVE_LANES) - .flat_map(|_| automation.iter().copied()) - .collect(); - let offsets: [u32; NATIVE_LANES + 1] = - core::array::from_fn(|track| (track * automation.len()) as u32); - let empty_offsets = [0_u32; NATIVE_LANES + 1]; - let mut start = 0; - while start < frames { - let end = (start + block).min(frames); - let (spans, offsets) = if start == 0 { - (&spans[..], &offsets) - } else { - (&[][..], &empty_offsets) - }; - bank.process_bank( - EffectBankProcessBlock::new( - &mut left[start * NATIVE_LANES..end * NATIVE_LANES], - &mut right[start * NATIVE_LANES..end * NATIVE_LANES], - None, - (end - start) as u32, - native_width(), - start as u64, - spans, - offsets, - 512, - ) - .expect("bank block"), - ); - start = end; - } -} - -/// At the build's own width: W8 in the 8-lane (AVX2) build, W4 in a 4-lane (NEON/simd128) build -/// (#1112). -#[test] -fn scalar_and_native_bank_are_bit_exact_for_all_link_modes_and_ramps() { - let values = track_values(); - for link in [LinkMode::DualMono, LinkMode::Maximum, LinkMode::Average] { - let mut bank = prepare_bank_native(&values, link).expect("the build's own width binds"); - let mut scalar = Vec::new(); - for values in &values { - let mut request = request(values); - request.link_mode = link; - scalar.push(prepare(request)); - } - let frames = 257; - let left_source: Vec> = (0..NATIVE_LANES) - .map(|track| noise(11 + track as u64, frames, 0.3)) - .collect(); - let right_source: Vec> = (0..NATIVE_LANES) - .map(|track| noise(91 + track as u64, frames, 0.3)) - .collect(); - let mut bank_left = packed(&left_source); - let mut bank_right = packed(&right_source); - render_bank_native( - bank.processor.as_mut(), - &mut bank_left, - &mut bank_right, - 17, - &retarget_spans(0), - ); - for track in 0..NATIVE_LANES { - let mut left = left_source[track].clone(); - let mut right = right_source[track].clone(); - let spans = retarget_spans(0); - render_scalar_sidechain( - &mut scalar[track], - &mut left, - &mut right, - None, - 17, - &spans, - 0, - ); - assert_bits_eq( - &track_of(&bank_left, track, NATIVE_LANES), - &left, - &format!("{link:?} left {track}"), - ); - assert_bits_eq( - &track_of(&bank_right, track, NATIVE_LANES), - &right, - &format!("{link:?} right {track}"), - ); - assert_eq!(snapshot_bank(&bank, track as u32), snapshot(&scalar[track])); - } - } -} - #[test] fn partition_invariance_straddles_ramp_boundaries() { let values = active_values(); diff --git a/crates/gate-expander/tests/state.rs b/crates/gate-expander/tests/state.rs index 4f345eb68..2e5a0f353 100644 --- a/crates/gate-expander/tests/state.rs +++ b/crates/gate-expander/tests/state.rs @@ -148,65 +148,6 @@ fn reset_seeds_gain_open_hold_and_preserves_or_restores_parameters() { ); } -#[test] -fn active_state_restore_continues_an_uninterrupted_donor() { - let values = active_values(); - let source_left = noise(101, 1024, 0.4); - let source_right = noise(202, 1024, 0.4); - let spans = support::retarget_spans(0); - let mut donor = prepare(request(&values)); - let mut warm_left = source_left[..17].to_vec(); - let mut warm_right = source_right[..17].to_vec(); - render_scalar_sidechain( - &mut donor, - &mut warm_left, - &mut warm_right, - None, - 17, - &spans, - 0, - ); - let payload = snapshot(&donor); - assert_eq!(word(&payload.1, 6 + 3), 47.0_f32.to_bits()); - - let mut uninterrupted = donor; - let mut expected_left = source_left[17..].to_vec(); - let mut expected_right = source_right[17..].to_vec(); - render_scalar_sidechain( - &mut uninterrupted, - &mut expected_left, - &mut expected_right, - None, - 128, - &[], - 17, - ); - - let mut restored = prepare(request(&values)); - let sizes = restored.metadata.state_sizes; - restored - .processor - .restore_state_payload( - STATE_LAYOUT_VERSION, - StatePayloadInput::new(&payload.0, &payload.1, &payload.2, sizes).unwrap(), - ) - .unwrap(); - let mut actual_left = source_left[17..].to_vec(); - let mut actual_right = source_right[17..].to_vec(); - render_scalar_sidechain( - &mut restored, - &mut actual_left, - &mut actual_right, - None, - 128, - &[], - 17, - ); - assert_bits_eq(&actual_left, &expected_left, "restored left"); - assert_bits_eq(&actual_right, &expected_right, "restored right"); - assert_eq!(snapshot(&restored), snapshot(&uninterrupted)); -} - #[test] fn old_lengths_and_one_byte_short_payloads_reject_scalar_and_bank() { for rate in [44_100, 48_000, 88_200, 96_000] { @@ -602,155 +543,6 @@ fn scalar_and_bank_recovery_is_channel_and_lane_local() { ); } -#[test] -fn scalar_and_bank_state_payloads_interchange_without_changing_audio() { - let values = active_values(); - let source_left = noise(41, 160, 0.3); - let source_right = noise(42, 160, 0.3); - - // Scalar -> bank: restore one scalar track after a partial render and continue it in a bank of - // the build's own width (W8 in the 8-lane (AVX2) build, W4 in a 4-lane one). - let mut scalar = prepare(request(&values)); - let mut scalar_prefix_left = source_left[..17].to_vec(); - let mut scalar_prefix_right = source_right[..17].to_vec(); - render_scalar_sidechain( - &mut scalar, - &mut scalar_prefix_left, - &mut scalar_prefix_right, - None, - 17, - &[], - 0, - ); - let scalar_payload = snapshot(&scalar); - let mut scalar_expected_left = source_left[17..].to_vec(); - let mut scalar_expected_right = source_right[17..].to_vec(); - render_scalar_sidechain( - &mut scalar, - &mut scalar_expected_left, - &mut scalar_expected_right, - None, - 128, - &[], - 17, - ); - - let bank_values = [values; 8]; - let mut scalar_to_bank = - prepare_bank_native(&bank_values, LinkMode::DualMono).expect("the build's own width binds"); - let sizes = scalar_to_bank.metadata.program_key.state_sizes; - scalar_to_bank - .processor - .restore_track_state_payload( - 3, - STATE_LAYOUT_VERSION, - StatePayloadInput::new( - &scalar_payload.0, - &scalar_payload.1, - &scalar_payload.2, - sizes, - ) - .unwrap(), - ) - .unwrap(); - let mut bank_left = packed(&[&source_left[17..]; NATIVE_LANES]); - let mut bank_right = packed(&[&source_right[17..]; NATIVE_LANES]); - render_bank( - scalar_to_bank.processor.as_mut(), - &mut bank_left, - &mut bank_right, - 128, - ); - assert_bits_eq( - &track_of(&bank_left, 3, NATIVE_LANES), - &scalar_expected_left, - "scalar to bank left", - ); - assert_bits_eq( - &track_of(&bank_right, 3, NATIVE_LANES), - &scalar_expected_right, - "scalar to bank right", - ); - - // Bank -> scalar: snapshot the same track after a partial bank render and continue it in W1. - let mut bank = - prepare_bank_native(&bank_values, LinkMode::DualMono).expect("the build's own width binds"); - let mut bank_prefix_left = packed(&[&source_left[..17]; NATIVE_LANES]); - let mut bank_prefix_right = packed(&[&source_right[..17]; NATIVE_LANES]); - render_bank( - bank.processor.as_mut(), - &mut bank_prefix_left, - &mut bank_prefix_right, - 17, - ); - let bank_payload = snapshot_bank(&bank, 3); - let mut bank_to_scalar = prepare(request(&values)); - let sizes = bank_to_scalar.metadata.state_sizes; - bank_to_scalar - .processor - .restore_state_payload( - STATE_LAYOUT_VERSION, - StatePayloadInput::new(&bank_payload.0, &bank_payload.1, &bank_payload.2, sizes) - .unwrap(), - ) - .unwrap(); - let mut scalar_left = source_left[17..].to_vec(); - let mut scalar_right = source_right[17..].to_vec(); - render_scalar_sidechain( - &mut bank_to_scalar, - &mut scalar_left, - &mut scalar_right, - None, - 128, - &[], - 17, - ); - let mut bank_continuation_left = packed(&[&source_left[17..]; NATIVE_LANES]); - let mut bank_continuation_right = packed(&[&source_right[17..]; NATIVE_LANES]); - render_bank( - bank.processor.as_mut(), - &mut bank_continuation_left, - &mut bank_continuation_right, - 128, - ); - assert_bits_eq( - &scalar_left, - &track_of(&bank_continuation_left, 3, NATIVE_LANES), - "bank to scalar left", - ); - assert_bits_eq( - &scalar_right, - &track_of(&bank_continuation_right, 3, NATIVE_LANES), - "bank to scalar right", - ); -} - -#[test] -fn bank_restore_of_one_track_does_not_mutate_peers() { - let values: [Values; 8] = core::array::from_fn(|_| initial_values()); - let mut donor_bank = - prepare_bank_native(&values, LinkMode::DualMono).expect("the build's own width binds"); - let mut target_bank = - prepare_bank_native(&values, LinkMode::DualMono).expect("the build's own width binds"); - let mut left = packed(&[&[0.1; 128]; NATIVE_LANES]); - let mut right = left.clone(); - render_bank(donor_bank.processor.as_mut(), &mut left, &mut right, 128); - let donor = snapshot_bank(&donor_bank, 3); - // Track 4 in the 8-lane (AVX2) build, track 0 in a 4-lane (NEON/simd128) one (#1112). - let peer = 4 % NATIVE_LANES as u32; - let peer_before = snapshot_bank(&target_bank, peer); - let sizes = target_bank.metadata.program_key.state_sizes; - target_bank - .processor - .restore_track_state_payload( - 3, - STATE_LAYOUT_VERSION, - StatePayloadInput::new(&donor.0, &donor.1, &donor.2, sizes).unwrap(), - ) - .unwrap(); - assert_eq!(snapshot_bank(&target_bank, peer), peer_before); -} - /// Issue #1411 D1: a ramp word one ulp outside its domain is refused even while the ramp moves. /// /// From the effect's own snapshot with all four ramps in flight (threshold, ratio, range and diff --git a/crates/multiband-compressor/tests/identity.rs b/crates/multiband-compressor/tests/identity.rs index 75d90de49..1533a16a4 100644 --- a/crates/multiband-compressor/tests/identity.rs +++ b/crates/multiband-compressor/tests/identity.rs @@ -575,134 +575,6 @@ fn restored_programs_continue_across_scalar_and_bank() { } } -/// State payloads keep their meaning when moving in either direction between the scalar and bank -/// implementations. The continuation probes use nonzero filter and gain history after restore. -#[test] -fn scalar_and_bank_state_interchange_continues() { - let values = transition_values(3, 0); - let prepared = MultibandCompressorFactory - .prepare(request_with( - &values, - LinkMode::Maximum, - FRAMES as u32, - false, - )) - .expect("scalar donor"); - let sizes = prepared.metadata.state_sizes; - let mut scalar = prepared.processor; - let mut prefix_left = support::signal(RESTORE_PREFIX, 0x1357_0001); - let mut prefix_right = support::signal(RESTORE_PREFIX, 0x1357_0002); - process_scalar_frames(&mut *scalar, &mut prefix_left, &mut prefix_right, 0); - let scalar_saved = snapshot(scalar.as_ref(), sizes); - - let requests = (0..4) - .map(|_| request_with(&values, LinkMode::Maximum, FRAMES as u32, false)) - .collect::>(); - let mut bank = support::bank(BankWidth::Four, &requests).processor; - let (mut warm_left, mut warm_right) = bank_signal(RESTORE_PREFIX, 4, 0x2468_0001); - process_bank_frames( - bank.as_mut(), - BankWidth::Four, - &mut warm_left, - &mut warm_right, - 0, - ); - bank.restore_track_state_payload( - 0, - 1, - StatePayloadInput::new(&scalar_saved.0, &scalar_saved.1, &scalar_saved.2, sizes) - .expect("scalar-to-bank payload"), - ) - .expect("scalar-to-bank restore"); - - let (mut scalar_tail_left, mut scalar_tail_right) = bank_signal(RESTORE_TAIL, 1, 0x2468_1001); - process_scalar_frames( - &mut *scalar, - &mut scalar_tail_left, - &mut scalar_tail_right, - RESTORE_PREFIX as u64, - ); - let (mut bank_tail_left, mut bank_tail_right) = bank_signal(RESTORE_TAIL, 4, 0x2468_1001); - process_bank_frames( - bank.as_mut(), - BankWidth::Four, - &mut bank_tail_left, - &mut bank_tail_right, - RESTORE_PREFIX as u64, - ); - assert!(scalar_tail_left.iter().any(|sample| *sample != 0.0)); - for frame in 0..RESTORE_TAIL { - assert_eq!( - bank_tail_left[frame * 4].to_bits(), - scalar_tail_left[frame].to_bits(), - "scalar-to-bank left frame={frame}" - ); - assert_eq!( - bank_tail_right[frame * 4].to_bits(), - scalar_tail_right[frame].to_bits(), - "scalar-to-bank right frame={frame}" - ); - } - - let mut bank_donor = support::bank(BankWidth::Four, &requests).processor; - let (mut donor_left, mut donor_right) = bank_signal(RESTORE_PREFIX, 4, 0x9753_0001); - process_bank_frames( - bank_donor.as_mut(), - BankWidth::Four, - &mut donor_left, - &mut donor_right, - 0, - ); - let bank_saved = snapshot_track(bank_donor.as_ref(), 0, sizes); - let mut scalar_receiver = MultibandCompressorFactory - .prepare(request_with( - &values, - LinkMode::Maximum, - FRAMES as u32, - false, - )) - .expect("scalar receiver") - .processor; - let mut receiver_left = support::signal(RESTORE_PREFIX, 0x8642_0001); - let mut receiver_right = support::signal(RESTORE_PREFIX, 0x8642_0002); - process_scalar_frames( - scalar_receiver.as_mut(), - &mut receiver_left, - &mut receiver_right, - 0, - ); - restore(&mut *scalar_receiver, 1, &bank_saved, sizes).expect("bank-to-scalar restore"); - let (mut bank_expected_left, mut bank_expected_right) = - bank_signal(RESTORE_TAIL, 4, 0x9753_1001); - process_bank_frames( - bank_donor.as_mut(), - BankWidth::Four, - &mut bank_expected_left, - &mut bank_expected_right, - RESTORE_PREFIX as u64, - ); - let (mut scalar_tail_left, mut scalar_tail_right) = bank_signal(RESTORE_TAIL, 1, 0x9753_1001); - process_scalar_frames( - scalar_receiver.as_mut(), - &mut scalar_tail_left, - &mut scalar_tail_right, - RESTORE_PREFIX as u64, - ); - assert!(scalar_tail_left.iter().any(|sample| *sample != 0.0)); - for frame in 0..RESTORE_TAIL { - assert_eq!( - scalar_tail_left[frame].to_bits(), - bank_expected_left[frame * 4].to_bits(), - "bank-to-scalar left frame={frame}" - ); - assert_eq!( - scalar_tail_right[frame].to_bits(), - bank_expected_right[frame * 4].to_bits(), - "bank-to-scalar right frame={frame}" - ); - } -} - /// A restored different-crossover bank returns to the receiver's prepared defaults on full reset. #[test] fn bank_full_reset_restores_different_crossover_defaults() { diff --git a/crates/parametric-eq/src/lib.rs b/crates/parametric-eq/src/lib.rs index e315d09e7..67b46dea6 100644 --- a/crates/parametric-eq/src/lib.rs +++ b/crates/parametric-eq/src/lib.rs @@ -4174,12 +4174,10 @@ fn process_channels_mono_from_input( mod interleave_identity { use super::{ BAND_SECTION_OFFSET, BandTarget, Channel, EQ_BAND_COUNT, EQ_SECTION_COUNT, EqBandKind, - HPF_SECTION, LPF_SECTION, MAX_LANES, RAMP_SAMPLES, SampleRateHz, Section, cascade_sections, - cascade_sections_mono, corpus, process_channels_from_input, + HPF_SECTION, LPF_SECTION, MAX_LANES, Section, corpus, process_channels_from_input, process_channels_mono_from_input, width_label, }; use lane::Lane; - use lane::kernels::svf_block; /// `true` when both integrator words of `section` are exactly `+0.0` on every lane. /// @@ -4235,318 +4233,6 @@ mod interleave_identity { samples.iter().map(|sample| sample.to_bits()).collect() } - /// The four-section oracle that represents the pre-cut prepared cascade. - /// - /// This intentionally owns only the four original sections and calls the existing - /// per-section [`svf_block`] kernel. It is therefore an independent schedule/shape oracle for - /// the compatibility claim; a second six-section path would only prove that two new paths - /// agree. The physical six-section channel supplies the same settled coefficient/state words - /// for sections 1..4, so no filter arithmetic is reimplemented here. - fn original_four(offset: usize) -> [Section; EQ_BAND_COUNT] { - let six = channel::(offset); - core::array::from_fn(|band| six.sections[BAND_SECTION_OFFSET + band]) - } - - fn process_original_four( - sections: &mut [Section; EQ_BAND_COUNT], - io: &mut [f32], - frames: usize, - ) { - // The oracle's sections read the rest plane of the input it was given, as the cascade's do - // (issue #1328, amendment A9), from a fresh counter, as a fresh channel's. - let rest = super::test_rest_plane::(io, frames, &mut L::zero()); - for section in sections { - svf_block::(io, frames, §ion.coef, &mut section.state, &rest); - } - } - - /// Four-band ramp oracle for the one synchronized ramp used below. It mirrors the production - /// driver's current-then-advance order, final snap, and fixed tail without reimplementing - /// coefficient design. - fn process_original_four_ramped( - sections: &mut [Section; EQ_BAND_COUNT], - io: &mut [f32], - frames: usize, - ) { - let rest = super::test_rest_plane::(io, frames, &mut L::zero()); - for (index, section) in sections.iter_mut().enumerate() { - if index == 1 { - let ramp = RAMP_SAMPLES as usize; - lane::kernels::svf_block_ramped::( - &mut io[..ramp * W], - ramp, - &mut section.coef, - §ion.step, - ramp, - &mut section.state, - &rest[..ramp * W], - ); - section.coef = section.target; - section.step = Default::default(); - lane::kernels::svf_block::( - &mut io[ramp * W..frames * W], - frames - ramp, - §ion.coef, - &mut section.state, - &rest[ramp * W..frames * W], - ); - } else { - lane::kernels::svf_block::( - io, - frames, - §ion.coef, - &mut section.state, - &rest, - ); - } - } - } - - /// The exact signed-zero boundary that a disabled cut must preserve for the old four-band - /// schedule. This retained regression records the historical signed-zero compatibility failure - /// that the prepared path now fixes with per-lane dry selection. - fn all_high_pass_channel() -> Channel { - let disabled = BandTarget { - enabled: false, - kind: EqBandKind::HighPass, - frequency: 1_000.0, - gain: 0.0, - q: 1.0, - slope: 1.0, - }; - let live = BandTarget { - enabled: true, - ..disabled - }; - let mut targets = [disabled; EQ_SECTION_COUNT]; - for target in targets - .iter_mut() - .skip(BAND_SECTION_OFFSET) - .take(EQ_BAND_COUNT) - { - *target = live; - } - Channel::new([targets; W], SampleRateHz(44_100)).expect("legal all-HighPass design") - } - - fn original_state_bits(sections: &[Section; EQ_BAND_COUNT]) -> Vec { - let mut words = [0_u32; EQ_BAND_COUNT * 2 * MAX_LANES]; - for (index, section) in sections.iter().enumerate() { - let base = index * 2 * L::WIDTH; - section - .state - .ic1 - .store_bits(&mut words[base..base + L::WIDTH]); - section - .state - .ic2 - .store_bits(&mut words[base + L::WIDTH..base + 2 * L::WIDTH]); - } - words.to_vec() - } - - /// Compares the six-section prepared renderer with the direct pre-cut four-section oracle. - /// - /// With both dedicated cuts disabled and an admissible finite input, the elision list contains - /// exactly the original four physical sections. The output and original-band integrator words - /// must remain bit-identical for dual and collapsed mono execution at every launch width, - /// including a non-cold state. - fn compare_disabled_cuts_to_original_four( - width: &str, - case: usize, - seeded: bool, - mono: bool, - refusal_state: bool, - negative_zero: bool, - ) { - let mut six_left = channel::(0); - let mut six_right = channel::(3); - let mut four_left = original_four::(0); - let mut four_right = original_four::(3); - if seeded { - for section in 0..EQ_BAND_COUNT { - six_left.sections[BAND_SECTION_OFFSET + section].state.ic1 = L::splat(1.0e-40); - six_left.sections[BAND_SECTION_OFFSET + section].state.ic2 = L::splat(-1.0e-41); - four_left[section].state.ic1 = L::splat(1.0e-40); - four_left[section].state.ic2 = L::splat(-1.0e-41); - six_right.sections[BAND_SECTION_OFFSET + section].state.ic1 = L::splat(-3.5e-7); - six_right.sections[BAND_SECTION_OFFSET + section].state.ic2 = L::splat(9.0e-8); - four_right[section].state.ic1 = L::splat(-3.5e-7); - four_right[section].state.ic2 = L::splat(9.0e-8); - } - } - if refusal_state { - // A restored negative-zero integrator in a live original band refuses elision. The - // direct four-section oracle carries the same state, so this still checks old-band - // output/state bits while exercising the full six-section fallback. - six_left.sections[BAND_SECTION_OFFSET].state.ic1 = L::splat(-0.0); - four_left[0].state.ic1 = L::splat(-0.0); - } - let mut six_left_io = block::(case, 0); - let mut six_right_io = block::(case, 3); - let mut four_left_io = six_left_io.clone(); - let mut four_right_io = six_right_io.clone(); - if negative_zero { - six_left_io[0] = -0.0; - four_left_io[0] = -0.0; - } - let kept = if mono { - cascade_sections_mono(&six_left, &six_left_io, FRAMES).1 - } else { - cascade_sections(&six_left, &six_right, &six_left_io, &six_right_io, FRAMES).1 - }; - if negative_zero || refusal_state { - assert_eq!( - kept, - EQ_SECTION_COUNT, - "{width} {mode}: compatibility oracle refusal must retain all six sections", - mode = if mono { "mono" } else { "dual" } - ); - } - if mono { - process_channels_mono_from_input(&mut six_left, &mut six_left_io, FRAMES, true); - process_original_four(&mut four_left, &mut four_left_io, FRAMES); - assert_eq!( - bits(&six_left_io), - bits(&four_left_io), - "{width} mono output differs from the direct four-band oracle, case={case}, seeded={seeded}" - ); - assert_eq!( - original_state_bits(&core::array::from_fn(|band| { - six_left.sections[BAND_SECTION_OFFSET + band] - })), - original_state_bits(&four_left), - "{width} mono original-band state differs from the direct four-band oracle, case={case}, seeded={seeded}" - ); - } else { - process_channels_from_input( - (&mut six_left, &mut six_right), - &mut six_left_io, - &mut six_right_io, - FRAMES, - true, - ); - process_original_four(&mut four_left, &mut four_left_io, FRAMES); - process_original_four(&mut four_right, &mut four_right_io, FRAMES); - assert_eq!( - bits(&six_left_io), - bits(&four_left_io), - "{width} dual left output differs from the direct four-band oracle, case={case}, seeded={seeded}" - ); - assert_eq!( - bits(&six_right_io), - bits(&four_right_io), - "{width} dual right output differs from the direct four-band oracle, case={case}, seeded={seeded}" - ); - assert_eq!( - original_state_bits(&core::array::from_fn(|band| { - six_left.sections[BAND_SECTION_OFFSET + band] - })), - original_state_bits(&four_left), - "{width} dual left original-band state differs from the direct four-band oracle, case={case}, seeded={seeded}" - ); - assert_eq!( - original_state_bits(&core::array::from_fn(|band| { - six_right.sections[BAND_SECTION_OFFSET + band] - })), - original_state_bits(&four_right), - "{width} dual right original-band state differs from the direct four-band oracle, case={case}, seeded={seeded}" - ); - } - } - - /// A signed-zero input refuses elision and therefore follows the established full six-section - /// per-section path. The direct four-section oracle remains the compatibility authority for - /// settled disabled cuts; this six-versus-six comparison checks only that refusal selects the - /// corrected schedule consistently. Compare the stationary refusal with the nonstationary - /// reference at every width and for both dual and collapsed mono entry points. - fn compare_signed_zero_refusal(width: &str, mono: bool, plane: usize) { - let mut left = block::(0, 0); - let mut right = block::(0, 3); - if plane == 0 { - left[0] = -0.0; - } else { - right[0] = -0.0; - } - let kept = if mono { - let channel = channel::(0); - cascade_sections_mono(&channel, &left, FRAMES).1 - } else { - let left_channel = channel::(0); - let right_channel = channel::(3); - cascade_sections(&left_channel, &right_channel, &left, &right, FRAMES).1 - }; - assert_eq!( - kept, - EQ_SECTION_COUNT, - "{width} {mode} plane={plane}: -0.0 must refuse the shortened cascade", - mode = if mono { "mono" } else { "dual" } - ); - - let mut stationary_left_channel = channel::(0); - let mut stationary_right_channel = channel::(3); - let mut reference_left_channel = channel::(0); - let mut reference_right_channel = channel::(3); - let mut stationary_left = left.clone(); - let mut stationary_right = right.clone(); - let mut reference_left = left; - let mut reference_right = right; - if mono { - process_channels_mono_from_input( - &mut stationary_left_channel, - &mut stationary_left, - FRAMES, - true, - ); - process_channels_mono_from_input( - &mut reference_left_channel, - &mut reference_left, - FRAMES, - false, - ); - assert_eq!( - bits(&stationary_left), - bits(&reference_left), - "{width} mono signed-zero refusal changed audio" - ); - assert_eq!( - integrators(&stationary_left_channel, &stationary_right_channel), - integrators(&reference_left_channel, &reference_right_channel), - "{width} mono signed-zero refusal changed state" - ); - } else { - process_channels_from_input( - (&mut stationary_left_channel, &mut stationary_right_channel), - &mut stationary_left, - &mut stationary_right, - FRAMES, - true, - ); - process_channels_from_input( - (&mut reference_left_channel, &mut reference_right_channel), - &mut reference_left, - &mut reference_right, - FRAMES, - false, - ); - assert_eq!( - bits(&stationary_left), - bits(&reference_left), - "{width} dual left signed-zero refusal changed audio" - ); - assert_eq!( - bits(&stationary_right), - bits(&reference_right), - "{width} dual right signed-zero refusal changed audio" - ); - assert_eq!( - integrators(&stationary_left_channel, &stationary_right_channel), - integrators(&reference_left_channel, &reference_right_channel), - "{width} dual signed-zero refusal changed state" - ); - } - } - /// Runs one corpus case at one width down both arms and asserts they are the same bits. /// /// `seed_state` puts a non-zero, subnormal-adjacent state into every section first, so the @@ -4824,188 +4510,6 @@ mod interleave_identity { fn mixed_dedicated_cut_masks_match_scalar_lanes_bit_for_bit() { lane::each_vector_lane!(|L, W| mixed_cut_scalar_parity::(&width_label(W))); } - - /// A general-band ramp must keep the old four-band oracle in lockstep while dedicated cuts stay - /// disabled. The six-section consumer is explicitly forced onto the fallback by `remaining`. - fn disabled_cuts_general_ramp_parity(width: &str) { - const FRAMES: usize = 80; - const RAMP_SECTION: usize = BAND_SECTION_OFFSET + 1; - let mut six_left = channel::(0); - let mut six_right = channel::(3); - let mut four_left = original_four::(0); - let mut four_right = original_four::(3); - for lane in 0..W { - let left_target = corpus::bands((lane + 3) % corpus::LANES)[1] - .words(corpus::CORPUS_RATE) - .expect("ramp target"); - let right_target = corpus::bands((lane + 6) % corpus::LANES)[1] - .words(corpus::CORPUS_RATE) - .expect("ramp target"); - six_left.start_ramp(RAMP_SECTION, lane, left_target); - six_right.start_ramp(RAMP_SECTION, lane, right_target); - } - four_left[1] = six_left.sections[RAMP_SECTION]; - four_right[1] = six_right.sections[RAMP_SECTION]; - let mut six_left_io = vec![0.0_f32; FRAMES * W]; - let mut six_right_io = vec![0.0_f32; FRAMES * W]; - for frame in 0..FRAMES { - for lane in 0..W { - let sample = 0.02 + frame as f32 * 0.0003 + lane as f32 * 0.004; - six_left_io[frame * W + lane] = sample; - six_right_io[frame * W + lane] = -sample * 0.8; - } - } - let mut four_left_io = six_left_io.clone(); - let mut four_right_io = six_right_io.clone(); - assert!(!six_left.no_ramp_in_flight() || !six_right.no_ramp_in_flight()); - process_channels_from_input( - (&mut six_left, &mut six_right), - &mut six_left_io, - &mut six_right_io, - FRAMES, - false, - ); - process_original_four_ramped::(&mut four_left, &mut four_left_io, FRAMES); - process_original_four_ramped::(&mut four_right, &mut four_right_io, FRAMES); - assert_eq!( - bits(&six_left_io), - bits(&four_left_io), - "{width} ramped old-four left output" - ); - assert_eq!( - bits(&six_right_io), - bits(&four_right_io), - "{width} ramped old-four right output" - ); - assert_eq!( - original_state_bits(&core::array::from_fn(|band| { - six_left.sections[BAND_SECTION_OFFSET + band] - })), - original_state_bits(&four_left), - "{width} ramped old-four left original state" - ); - assert_eq!( - original_state_bits(&core::array::from_fn(|band| { - six_right.sections[BAND_SECTION_OFFSET + band] - })), - original_state_bits(&four_right), - "{width} ramped old-four right original state" - ); - } - - #[test] - fn disabled_cuts_with_an_original_band_ramp_match_the_four_section_oracle() { - lane::each_lane!(|L, W| disabled_cuts_general_ramp_parity::(&width_label(W))); - } - - #[test] - fn a_tiny_restored_disabled_cut_state_refuses_elision_but_preserves_old_bands() { - lane::each_lane!(|L, W| tiny_disabled_cut_state::(&width_label(W))); - } - - fn tiny_disabled_cut_state(width: &str) { - let mut six_left = channel::(0); - let mut six_right = channel::(3); - let mut four_left = original_four::(0); - six_left.sections[HPF_SECTION].state.ic1 = L::splat(1.0e-30); - let mut left = vec![0.000_001_f32; 9 * W]; - let mut right = vec![-0.000_002_f32; 9 * W]; - let mut old_left = left.clone(); - assert_eq!( - cascade_sections(&six_left, &six_right, &left, &right, 9).1, - EQ_SECTION_COUNT, - "{width} restored tiny disabled HPF state must refuse elision" - ); - process_channels_from_input( - (&mut six_left, &mut six_right), - &mut left, - &mut right, - 9, - true, - ); - process_original_four(&mut four_left, &mut old_left, 9); - assert_eq!( - bits(&left), - bits(&old_left), - "{width} tiny HPF state left output" - ); - assert_eq!( - original_state_bits(&core::array::from_fn(|band| { - six_left.sections[BAND_SECTION_OFFSET + band] - })), - original_state_bits(&four_left), - "{width} tiny HPF state left original state" - ); - let hpf_state = channel_lane_state_bits(&six_left, 0); - assert_eq!( - hpf_state[0], 0, - "{width} executed disabled HPF flushes its restored tiny state" - ); - } - - #[test] - fn disabled_cuts_preserve_original_band_bits_against_a_direct_four_section_oracle() { - for seeded in [false, true] { - for refusal_state in [false, true] { - for negative_zero in [false, true] { - for case in [0_usize, 2] { - for mono in [false, true] { - lane::each_lane!(|L, W| { - compare_disabled_cuts_to_original_four::( - &width_label(W), - case, - seeded, - mono, - refusal_state, - negative_zero, - ); - }); - } - } - } - } - } - } - - #[test] - fn disabled_cuts_preserve_all_high_pass_signed_zero_against_four_section_oracle() { - let mut prepared = all_high_pass_channel::(); - let mut oracle = core::array::from_fn(|band| prepared.sections[BAND_SECTION_OFFSET + band]); - let mut prepared_io = vec![-0.0_f32]; - let mut oracle_io = prepared_io.clone(); - - assert_eq!( - cascade_sections_mono(&prepared, &prepared_io, 1).1, - EQ_SECTION_COUNT, - "signed-zero input must retain the full prepared schedule while testing the oracle" - ); - process_channels_mono_from_input(&mut prepared, &mut prepared_io, 1, true); - process_original_four(&mut oracle, &mut oracle_io, 1); - - assert_eq!( - prepared_io[0].to_bits(), - oracle_io[0].to_bits(), - "all-HighPass signed-zero compatibility mismatch: prepared={:#010x}, four={:#010x}", - prepared_io[0].to_bits(), - oracle_io[0].to_bits() - ); - } - - #[test] - fn signed_zero_refusal_preserves_the_full_six_section_bits() { - for mono in [false, true] { - for plane in [0_usize, 1] { - if mono && plane == 1 { - continue; - } - lane::each_lane!(|L, W| compare_signed_zero_refusal::( - &width_label(W), - mono, - plane - )); - } - } - } } /// Identity-section elision: the shortened cascade is the full cascade, bit for bit. diff --git a/crates/parametric-eq/tests/MUTATIONS.md b/crates/parametric-eq/tests/MUTATIONS.md index 743007c40..811476667 100644 --- a/crates/parametric-eq/tests/MUTATIONS.md +++ b/crates/parametric-eq/tests/MUTATIONS.md @@ -86,12 +86,12 @@ and the PCM-fixture rows. These are the three mutations issue #105 used against All three fail `automation_starts_a_64_sample_word_ramp`. 5 leaves the words at `start + 64 * step` instead of exactly `target`; 6 makes frame 0 use the pre-event words, so the first ramped word is `start`; 7 advances twice on the first frame. 7 also fails -`automation_is_partition_invariant`, because the number of additions then depends on how the block +`automation_is_partition_invariant` (deleted by TA4; KEEP catcher parametric-eq `randomized_restores::the_stationary_cascade_renders_the_full_cascade_after_random_restores`), because the number of additions then depends on how the block was cut. ### 8 — one segment for lanes of different ramp ages -`every_width_matches_the_scalar_instantiation` fails at block 2, track 0, frame 0. This is the +`every_width_matches_the_scalar_instantiation` (deleted by TA4; KEEP catcher parametric-eq `randomized_restores::the_stationary_cascade_renders_the_full_cascade_after_random_restores`) fails at block 2, track 0, frame 0. This is the mutation that matters for the bank: at `WIDTH = 1` there is only one lane, so no cut is ever needed and the scalar path is unaffected; at `WIDTH = 8` the lanes whose ramps ended mid-block keep stepping past their target. A width difference that only appears when ramps of different ages @@ -200,7 +200,7 @@ tree restored between rows. | # | mutation | file | test | result | |---|---|---|---|---| | M2-E1 | `PreparedParametricEq::desymmetrize` drops `sections` | `parametric-eq/src/lib.rs` | `a_desymmetrized_bank_is_a_never_collapsed_bank` | RED | -| M2-E2 | the collapsed body hard-codes `stationary = true` instead of reading the one live channel's `no_ramp_in_flight` | `parametric-eq/src/lib.rs` `render_mono` | `the_collapsed_body_renders_the_dual_bodys_left_plane` | RED — 2 failed; a ramping block taking the interleaved cascade renders a coefficient that is not the one in force | +| M2-E2 | the collapsed body hard-codes `stationary = true` instead of reading the one live channel's `no_ramp_in_flight` | `parametric-eq/src/lib.rs` `render_mono` | `the_collapsed_body_renders_the_dual_bodys_left_plane` (deleted by TA4; KEEP catcher parametric-eq `response::asymmetric_cascade_sections_are_independent_and_bypass_is_total_identity`) | RED — 2 failed; a ramping block taking the interleaved cascade renders a coefficient that is not the one in force | `remaining` and `identity` are on the copy list and are not individually red, and the reason is worth stating: both are read only to choose a *schedule* — the interleaved cascade over the @@ -269,7 +269,7 @@ Rows re-run for attempt 2 (the tail keeps #976's rule; see the issue's attempt 2 | # | mutation | gate that goes red | result | |---|---|---|---| | 977-M1 | `interleave`: `admitted = true` | gate 1 scalar `cbbb3c83…` and bank `5f519f25…` (the poisoned dry lane's `NaN` state reaches the output on its refused blocks and the plane faults); gate 2 (refused blocks ran 0 masked pairs); in-crate (a refused block ran 0) | RED | -| 977-M1m | `interleave_mono`: `admitted = true` | gate 1 bank-mono `ded71138…`; gate 2 (mono refused 0); in-crate; and `interleave_identity::disabled_cuts_preserve_all_high_pass_signed_zero_against_four_section_oracle` (`+0.0` where the oracle keeps `-0.0`) | RED | +| 977-M1m | `interleave_mono`: `admitted = true` | gate 1 bank-mono `ded71138…`; gate 2 (mono refused 0); in-crate; and `interleave_identity::disabled_cuts_preserve_all_high_pass_signed_zero_against_four_section_oracle` (deleted by TA4; KEEP catcher parametric-eq `elision::a_discontinuity_reset_mid_ramp_refreshes_the_identity_flag`) (`+0.0` where the oracle keeps `-0.0`) | RED | | 977-M2 | `interleave`: `admitted = false` | gate 2 (scalar DryHpfInPair: 228 masked pairs on admitted blocks); in-crate (2 masked pairs on an admitted block); no digest moves | RED | | 977-M2m | `interleave_mono`: `admitted = false` | gate 2 (bank-mono: 26); in-crate (mono); no digest moves | RED | | 977-M3 | `interleave`: the tail made select-free on admitted blocks too (`if !admitted && (…dry…)`), attempt 1's rule | in-crate: `Simd4 hpf 00000000 lpf 01100110: the tail keeps #976's rule` (1 select-free tail, want 0); no digest moves | RED | @@ -304,7 +304,7 @@ with the same messages and digests. | # | mutation | gate that goes red | result | |---|---|---|---| | 979-M1 | back to the exact `+0.0` test (`*word == 0` only) | gate 2: `Scalar section 3: 0 of 9 later blocks elide` (the shipped rule's cliff); gate 3: `1.0` refused | RED | -| 979-M2 | accept magnitudes below `FLUSH_EPS` (the floor set to `1`) | gate 3: `1e-30` elided, integrators differ (the executed section flushes it to `+0.0`); also `a_tiny_restored_disabled_cut_state_refuses_elision_but_preserves_old_bands` and `the_interleaved_cascade_renders_the_per_section_path_bit_for_bit` (seeded subnormal states) | RED | +| 979-M2 | accept magnitudes below `FLUSH_EPS` (the floor set to `1`) | gate 3: `1e-30` elided, integrators differ (the executed section flushes it to `+0.0`); also `a_tiny_restored_disabled_cut_state_refuses_elision_but_preserves_old_bands` (deleted by TA4; KEEP catcher parametric-eq `elision::a_discontinuity_reset_mid_ramp_refreshes_the_identity_flag`) and `the_interleaved_cascade_renders_the_per_section_path_bit_for_bit` (seeded subnormal states) | RED | | 979-M3 | accept `-0.0` (`word & MAGNITUDE_MASK == 0` for the zero term) | gate 3: `-0.0` elided, integrators differ (the executed section flushes it to `+0.0`) | RED | | 979-M4 | accept above the cap (`[FLOOR, 0x7f80_0000)`, the rule as briefed before the amendment) | gate 3: the word above the ceiling (`1.0000001e30`) admitted; gate 1: scalar `c060ba98…`, bank `b0063058…`, bank-mono `7698bb8b…`, and the restored-overflow leg reports no fault (the band restored with `ic2 = -f32::MAX` is elided and the block renders audio) | RED | @@ -435,8 +435,8 @@ drives EQ ramps through prepared targets. Debug profile, AVX2 host (the EQ binds | # | mutation | gate that goes red | result | |---|---|---|---| -| 1278-M1 | `Channel::commit_track` stores a moving band's step as `(target - current) / remaining` instead of the carried step | `a_mid_ramp_restore_continues_bit_for_bit_at_every_sample` (342 of 390 scalar and bank comparisons diverge, on all three ramps); the differential (`the instance restored from its snapshot rendered 0xbeb91443 where the lane, continuing, rendered 0xbeb91440`) | RED | -| 1278-M2 | the remaining-path walk held to the design's `NORM_TOLERANCE` instead of `RAMP_PATH_NORM_TOLERANCE` | `a_mid_ramp_restore_continues_bit_for_bit_at_every_sample` (the 10 kHz bell refused at samples 0-63); the differential (`lane 1's snapshot refused by a fresh instance (effect.state.payload)`) | RED | +| 1278-M1 | `Channel::commit_track` stores a moving band's step as `(target - current) / remaining` instead of the carried step | `a_mid_ramp_restore_continues_bit_for_bit_at_every_sample` (deleted by TA4; KEEP catcher parametric-eq `response::asymmetric_cascade_sections_are_independent_and_bypass_is_total_identity`) (342 of 390 scalar and bank comparisons diverge, on all three ramps); the differential (`the instance restored from its snapshot rendered 0xbeb91443 where the lane, continuing, rendered 0xbeb91440`) | RED | +| 1278-M2 | the remaining-path walk held to the design's `NORM_TOLERANCE` instead of `RAMP_PATH_NORM_TOLERANCE` | `a_mid_ramp_restore_continues_bit_for_bit_at_every_sample` (deleted by TA4; KEEP catcher parametric-eq `response::asymmetric_cascade_sections_are_independent_and_bypass_is_total_identity`) (the 10 kHz bell refused at samples 0-63); the differential (`lane 1's snapshot refused by a fresh instance (effect.state.payload)`) | RED | | 1278-M3 | `PreparedParametricEq::restore_track` commits the left channel before decoding the right | `a_restore_refused_on_one_channel_moves_neither` (`the scalar instance moved`) | RED | ## #1328: exact rest, the input-gated joint flush and the desymmetrize caches @@ -465,3 +465,14 @@ it names, the named tests run, and the source restored. | 1328-M9 | the silent fast path skips without `silence_advance` | the same test (`the silence counter after 68 silent blocks`) | RED | | 1328-M10 | `rest_plane`'s unarmed branch returns the last written plane instead of the unarmed one | the sparse gate (its train starts after armed silence) | RED | | 1328-M11 | `lane_is_inert` without its pair term | `elision::a_non_inert_state_in_a_dead_section_refuses_elision`, `exact_rest::a_fixed_point_inside_the_joint_band_is_cleared_once_the_flush_arms` | RED | + +## TA4 deletions + +The 2026-10 test audit (TA4, batch 1 mutation measurement at `81a3074fc`) deleted the tests named below. Each one's caught mutants were also red in the KEEP test named beside it. That is the recorded catcher of the deleted test's sampled mutants; the mutation of each row above was not re-run. + +- `automation_is_partition_invariant`: parametric-eq `randomized_restores::the_stationary_cascade_renders_the_full_cascade_after_random_restores` +- `every_width_matches_the_scalar_instantiation`: parametric-eq `randomized_restores::the_stationary_cascade_renders_the_full_cascade_after_random_restores` +- `the_collapsed_body_renders_the_dual_bodys_left_plane`: parametric-eq `response::asymmetric_cascade_sections_are_independent_and_bypass_is_total_identity` +- `disabled_cuts_preserve_all_high_pass_signed_zero_against_four_section_oracle`: parametric-eq `elision::a_discontinuity_reset_mid_ramp_refreshes_the_identity_flag` +- `a_tiny_restored_disabled_cut_state_refuses_elision_but_preserves_old_bands`: parametric-eq `elision::a_discontinuity_reset_mid_ramp_refreshes_the_identity_flag` +- `a_mid_ramp_restore_continues_bit_for_bit_at_every_sample`: parametric-eq `response::asymmetric_cascade_sections_are_independent_and_bypass_is_total_identity` diff --git a/crates/parametric-eq/tests/bank.rs b/crates/parametric-eq/tests/bank.rs index 90bd1061f..d3be27681 100644 --- a/crates/parametric-eq/tests/bank.rs +++ b/crates/parametric-eq/tests/bank.rs @@ -16,7 +16,7 @@ use dsp_reference::class_a; use effect_contract::{ BankWidth, EffectBankProcessBlock, EffectProcessBlock, NativeEffectFactory, ParameterChannel, PrepareEffectBankRequest, PreparedEffectBank, PreparedEffectTarget, StatePayloadInput, - StatePayloadOutput, TailSamples, + StatePayloadOutput, }; use lane::Backend; use parametric_eq::{EqBandKind, PARAMETRIC_EQ_DESCRIPTOR, ParametricEqFactory, design_svf}; @@ -180,159 +180,6 @@ fn snapshot_bank(bank: &PreparedEffectBank, track: u32) -> Payload { (common, left, right) } -/// E7: every available width reproduces the scalar instantiation bit for bit, with ramps in flight. -#[test] -fn every_width_matches_the_scalar_instantiation() { - let Some((width, backend)) = native_bank() else { - return; - }; - let lanes = width.lanes() as usize; - let factory = ParametricEqFactory; - let values_by_track: Vec<_> = (0..lanes).map(configured_values).collect(); - let requests: Vec<_> = values_by_track - .iter() - .map(|values| request(values, false)) - .collect(); - let mut bank = factory - .bind_homogeneous_bank(PrepareEffectBankRequest { - backend, - width, - requests: &requests, - active_mask: width.full_mask(), - }) - .expect("valid bank request") - .expect("the native width must bind"); - assert_eq!(bank.metadata.width, width); - assert_eq!(bank.metadata.program_key.tail, TailSamples::Infinite); - - let mut scalar: Vec<_> = values_by_track - .iter() - .map(|values| { - factory - .prepare(request(values, false)) - .expect("scalar prepare") - }) - .collect(); - - // Blocks of 16, 128, 64 and 128 frames, with prepared edits in the first and third block for - // different tracks, so ramps of different ages coexist inside one bank block. - let mut position = 0_u64; - for (index, frames) in [16_usize, 128, 64, 128].into_iter().enumerate() { - for track in 0..lanes { - if (index == 0 && track % 2 == 0) || (index == 2 && track % 2 == 1) { - let mut target_values = values_by_track[track].clone(); - set_initial( - &mut target_values, - 3, - ParameterChannel::Left, - -4.0 + track as f32 * 0.5, - ); - set_initial( - &mut target_values, - 4, - ParameterChannel::Right, - 0.8 + track as f32 * 0.01, - ); - let mut changed = vec![false; target_values.len()]; - changed[3 * 2] = true; - changed[4 * 2 + 1] = true; - apply_prepared_targets(&mut scalar[track], &target_values, &changed); - apply_prepared_targets_lane( - &mut *bank.processor, - track, - 48_000, - &target_values, - &changed, - ); - } - } - - let mut bank_left = vec![0.0_f32; frames * lanes]; - let mut bank_right = vec![0.0_f32; frames * lanes]; - let empty_offsets = vec![0_u32; lanes + 1]; - let mut scalar_left = vec![vec![0.0_f32; frames]; lanes]; - let mut scalar_right = vec![vec![0.0_f32; frames]; lanes]; - for frame in 0..frames { - for track in 0..lanes { - let sample = - ((position as usize + frame) as f32 * 0.017 + track as f32 * 0.31).sin() * 0.6; - bank_left[frame * lanes + track] = sample; - bank_right[frame * lanes + track] = -sample * 0.75; - scalar_left[track][frame] = sample; - scalar_right[track][frame] = -sample * 0.75; - } - } - - let mut scalar_reports = Vec::with_capacity(lanes); - for track in 0..lanes { - scalar_reports.push( - scalar[track].processor.process( - EffectProcessBlock::new( - &mut scalar_left[track], - &mut scalar_right[track], - None, - position, - &[], - 128, - ) - .expect("scalar block"), - ), - ); - } - let bank_report = bank.processor.process_bank( - EffectBankProcessBlock::new( - &mut bank_left, - &mut bank_right, - None, - frames as u32, - width, - position, - &[], - &empty_offsets, - 128, - ) - .expect("bank block"), - ); - - for track in 0..lanes { - assert_eq!( - bank_report.reports[track], scalar_reports[track], - "block {index} track {track} report" - ); - for frame in 0..frames { - let cell = frame * lanes + track; - assert_eq!( - bank_left[cell].to_bits(), - scalar_left[track][frame].to_bits(), - "block {index} track {track} frame {frame} left" - ); - assert_eq!( - bank_right[cell].to_bits(), - scalar_right[track][frame].to_bits(), - "block {index} track {track} frame {frame} right" - ); - } - assert_eq!( - snapshot_bank(&bank, track as u32), - snapshot(&scalar[track]), - "block {index} track {track} state" - ); - } - position += frames as u64; - } - - let saved = snapshot_bank(&bank, 0); - let sizes = bank.metadata.program_key.state_sizes; - bank.processor - .restore_track_state_payload( - 0, - 1, - StatePayloadInput::new(&saved.0, &saved.1, &saved.2, sizes).expect("state input"), - ) - .expect("state restore"); - assert_eq!(snapshot_bank(&bank, 0), saved); -} - /// E8 for the bank: a bank block may be cut anywhere without moving a bit. #[test] fn bank_rendering_is_partition_invariant() { diff --git a/crates/parametric-eq/tests/carry.rs b/crates/parametric-eq/tests/carry.rs index 54c862d46..3eca03f71 100644 --- a/crates/parametric-eq/tests/carry.rs +++ b/crates/parametric-eq/tests/carry.rs @@ -20,9 +20,9 @@ mod support; use effect_contract::{ - BankWidth, EffectBankProcessBlock, EffectProcessBlock, InitialParameterValue, - NativeEffectFactory, ParameterChannel, PrepareEffectBankRequest, PreparedEffect, - PreparedEffectBank, StatePayloadInput, StatePayloadOutput, + BankWidth, EffectProcessBlock, InitialParameterValue, NativeEffectFactory, ParameterChannel, + PrepareEffectBankRequest, PreparedEffect, PreparedEffectBank, StatePayloadInput, + StatePayloadOutput, }; use parametric_eq::{EqBandKind, ParametricEqFactory}; use support::{ @@ -31,8 +31,6 @@ use support::{ /// Samples rendered before the ramp starts, so the integrators hold signal. const WARM: usize = 37; -/// Samples compared after each restore: past the 64-sample ramp's end. -const TAIL: usize = 100; /// A deterministic test signal with no exact zero. fn signal(frames: usize, seed: u32) -> Vec { @@ -70,7 +68,6 @@ fn moved( /// One ramp: the prepared configuration, and the targets applied after so many ramp samples. struct Ramp { - name: &'static str, values: Vec, retargets: Vec<(usize, Vec, Vec)>, } @@ -82,18 +79,18 @@ fn ramps() -> Vec { let (second, second_changed) = moved(&first, 450.0, 11.0, 0.6); let (swing, swing_changed) = moved(&wide, 10_000.0, 24.0, 0.1); vec![ + // bell moving in frequency, gain and Q. Ramp { - name: "bell moving in frequency, gain and Q", values: bell.clone(), retargets: vec![(0, first.clone(), first_changed.clone())], }, + // 10 kHz bell at Q 0.1 swinging -24 dB to +24 dB. Ramp { - name: "10 kHz bell at Q 0.1 swinging -24 dB to +24 dB", values: wide, retargets: vec![(0, swing, swing_changed)], }, + // bell retargeted 17 samples into its ramp. Ramp { - name: "bell retargeted 17 samples into its ramp", values: bell, retargets: vec![(0, first, first_changed), (17, second, second_changed)], }, @@ -127,139 +124,10 @@ fn continuing(ramp: &Ramp, elapsed: usize) -> PreparedEffect { effect } -/// Renders `TAIL` frames through the restored bank lane `lane`, the other lanes fed another signal. -fn bank_tail( - ramp: &Ramp, - width: BankWidth, - lane: usize, - payload: &Payload, - first: u64, -) -> Option<(Vec, Vec)> { - let lanes = width.lanes() as usize; - let requests: Vec<_> = (0..lanes).map(|_| request(&ramp.values, false)).collect(); - let mut bank = ParametricEqFactory - .bind_homogeneous_bank(PrepareEffectBankRequest { - backend: width.backend(), - width, - requests: &requests, - active_mask: width.full_mask(), - }) - .expect("bank request")?; - let sizes = bank.metadata.program_key.state_sizes; - bank.processor - .restore_track_state_payload( - lane as u32, - 1, - StatePayloadInput::new(&payload.0, &payload.1, &payload.2, sizes).expect("input"), - ) - .unwrap_or_else(|error| panic!("{width:?}: the bank lane refused ({})", error.code)); - let (tail_left, tail_right) = (signal(TAIL, 5), signal(TAIL, 6)); - let (other_left, other_right) = (signal(TAIL, 7), signal(TAIL, 8)); - let mut left = vec![0.0_f32; TAIL * lanes]; - let mut right = vec![0.0_f32; TAIL * lanes]; - for frame in 0..TAIL { - for track in 0..lanes { - let (l, r) = if track == lane { - (tail_left[frame], tail_right[frame]) - } else { - (other_left[frame], other_right[frame]) - }; - left[frame * lanes + track] = l; - right[frame * lanes + track] = r; - } - } - let offsets = vec![0_u32; lanes + 1]; - bank.processor.process_bank( - EffectBankProcessBlock::new( - &mut left, - &mut right, - None, - TAIL as u32, - width, - first, - &[], - &offsets, - 128, - ) - .expect("bank block"), - ); - let gather = |plane: &[f32]| (0..TAIL).map(|frame| plane[frame * lanes + lane]).collect(); - Some((gather(&left), gather(&right))) -} - fn same_bits(a: &[f32], b: &[f32]) -> bool { a.iter().zip(b).all(|(x, y)| x.to_bits() == y.to_bits()) } -#[test] -fn a_mid_ramp_restore_continues_bit_for_bit_at_every_sample() { - let mut banks_bound = 0; - let mut failures = Vec::new(); - for ramp in ramps() { - for elapsed in 0..=64_usize { - let mut lane = continuing(&ramp, elapsed); - let payload = snapshot(&lane); - let first = (WARM + elapsed) as u64; - let mut restored = ParametricEqFactory - .prepare(request(&ramp.values, false)) - .expect("prepare"); - let sizes = restored.metadata.state_sizes; - if let Err(error) = restored.processor.restore_state_payload( - 1, - StatePayloadInput::new(&payload.0, &payload.1, &payload.2, sizes).expect("input"), - ) { - failures.push(format!( - "{}: sample {elapsed}: the scalar restore refused ({})", - ramp.name, error.code - )); - continue; - } - let (mut left, mut right) = (signal(TAIL, 5), signal(TAIL, 6)); - let (mut restored_left, mut restored_right) = (left.clone(), right.clone()); - lane.processor.process( - EffectProcessBlock::new(&mut left, &mut right, None, first, &[], 128) - .expect("tail"), - ); - restored.processor.process( - EffectProcessBlock::new( - &mut restored_left, - &mut restored_right, - None, - first, - &[], - 128, - ) - .expect("tail"), - ); - if !same_bits(&left, &restored_left) || !same_bits(&right, &restored_right) { - failures.push(format!( - "{}: sample {elapsed}: the restored instance diverges from the continuing lane", - ramp.name - )); - } - for &width in BankWidth::ALL { - let target = width.lanes() as usize - 1; - // A width this build does not execute declines by design (issue #1112). - let Some((bank_left, bank_right)) = - bank_tail(&ramp, width, target, &payload, first) - else { - continue; - }; - banks_bound += 1; - if !same_bits(&left, &bank_left) || !same_bits(&right, &bank_right) { - failures.push(format!( - "{}: sample {elapsed}: {width:?} bank lane {target} diverges from the \ - continuing lane", - ramp.name - )); - } - } - } - } - assert!(banks_bound > 0, "no width bound a bank"); - assert!(failures.is_empty(), "{failures:#?}"); -} - /// A restore validates both channels before it commits either: a payload whose left section is a /// mid-ramp snapshot and whose right section is refused leaves the receiver as it was, scalar and /// bank lane alike. diff --git a/crates/parametric-eq/tests/contract.rs b/crates/parametric-eq/tests/contract.rs index 1853cb20b..96331925a 100644 --- a/crates/parametric-eq/tests/contract.rs +++ b/crates/parametric-eq/tests/contract.rs @@ -333,109 +333,6 @@ fn an_over_capacity_automation_block_is_rejected_whole() { assert_eq!(band_word(&left, 0, 14), 0); } -/// E8: the rendered block and the retained state do not depend on where a block is cut. -#[test] -fn automation_is_partition_invariant() { - for partition in [ - vec![1_usize, 63, 64], - vec![1, 7, 64, 56], - vec![128], - vec![64, 64], - ] { - let values = bell_values(); - let mut whole = ParametricEqFactory - .prepare(request(&values, false)) - .expect("whole prepare"); - let mut split = ParametricEqFactory - .prepare(request(&values, false)) - .expect("split prepare"); - let mut target_values = values.clone(); - set_initial(&mut target_values, 2, ParameterChannel::Left, 3_000.0); - set_initial(&mut target_values, 3, ParameterChannel::Left, -9.0); - let mut changed = vec![false; target_values.len()]; - changed[2 * 2] = true; - changed[3 * 2] = true; - assert_eq!( - apply_prepared_targets(&mut whole, &target_values, &changed), - 1 - ); - assert_eq!( - apply_prepared_targets(&mut split, &target_values, &changed), - 1 - ); - let mut whole_left: Vec = (0..192).map(|index| (index as f32).sin() * 0.5).collect(); - let mut whole_right: Vec = whole_left.iter().map(|value| -value).collect(); - let mut split_left = whole_left.clone(); - let mut split_right = whole_right.clone(); - - whole.processor.process( - EffectProcessBlock::new( - &mut whole_left[..128], - &mut whole_right[..128], - None, - 0, - &[], - 128, - ) - .expect("whole block"), - ); - whole.processor.process( - EffectProcessBlock::new( - &mut whole_left[128..], - &mut whole_right[128..], - None, - 128, - &[], - 128, - ) - .expect("whole tail"), - ); - - let mut first = 0_usize; - for frames in partition.iter().copied() { - split.processor.process( - EffectProcessBlock::new( - &mut split_left[first..first + frames], - &mut split_right[first..first + frames], - None, - first as u64, - &[], - 128, - ) - .expect("split block"), - ); - first += frames; - } - split.processor.process( - EffectProcessBlock::new( - &mut split_left[first..], - &mut split_right[first..], - None, - first as u64, - &[], - 128, - ) - .expect("split tail"), - ); - - assert_eq!( - whole_left.iter().map(|v| v.to_bits()).collect::>(), - split_left.iter().map(|v| v.to_bits()).collect::>(), - "partition {partition:?} left" - ); - assert_eq!( - whole_right.iter().map(|v| v.to_bits()).collect::>(), - split_right.iter().map(|v| v.to_bits()).collect::>(), - "partition {partition:?} right" - ); - assert_eq!( - snapshot(&whole), - snapshot(&split), - "partition {partition:?} state" - ); - } -} - #[test] fn prepared_target_applies_and_settles_at_sample_a_plus_64() { let values = values(); diff --git a/crates/parametric-eq/tests/mono_collapse.rs b/crates/parametric-eq/tests/mono_collapse.rs index d99ef04b5..f0ac26496 100644 --- a/crates/parametric-eq/tests/mono_collapse.rs +++ b/crates/parametric-eq/tests/mono_collapse.rs @@ -174,57 +174,6 @@ fn bind_lpf(width: BankWidth, backend: Backend, lanes: usize) -> PreparedEffectB .expect("the native width must bind") } -/// The collapsed cascade renders the dual cascade's left plane, ramping and stationary. -#[test] -fn the_collapsed_body_renders_the_dual_bodys_left_plane() { - let Some((width, backend)) = native_bank() else { - return; - }; - let lanes = width.lanes() as usize; - for ramping in [true, false] { - let mut dual = bind(width, backend, lanes); - let mut collapsed = bind(width, backend, lanes); - for step in 0..BLOCKS { - let mut dual_left = block(step * FRAMES, lanes); - let mut dual_right = dual_left.clone(); - let mut mono_left = dual_left.clone(); - // The plane the collapsed chain never gathers, filled with a value the dual run cannot - // produce so that a body which reads it is visibly wrong rather than plausibly so. - let mut stale = vec![f32::from_bits(0x7F7F_FFFF); FRAMES * lanes]; - let first = (step * FRAMES) as u64; - run_block( - dual.processor.as_mut(), - &mut dual_left, - &mut dual_right, - width, - first, - step, - ramping, - false, - ); - run_block( - collapsed.processor.as_mut(), - &mut mono_left, - &mut stale, - width, - first, - step, - ramping, - true, - ); - for (word, (collapsed_word, dual_word)) in - mono_left.iter().zip(dual_left.iter()).enumerate() - { - assert_eq!( - collapsed_word.to_bits(), - dual_word.to_bits(), - "ramping {ramping} block {step} word {word}" - ); - } - } - } -} - /// After `desymmetrize_channels`, a bank that ran collapsed renders what a never-collapsed one does. /// /// The retarget schedule is deliberate: **one** span, early, and then none. A `Point` span smooths diff --git a/crates/parametric-eq/tests/response.rs b/crates/parametric-eq/tests/response.rs index 5375e1080..8ec0235ef 100644 --- a/crates/parametric-eq/tests/response.rs +++ b/crates/parametric-eq/tests/response.rs @@ -1762,227 +1762,6 @@ fn common_eq_adapter_is_bit_identical_for_asymmetric_sections_and_all_launch_rat } } -#[test] -fn common_eq_adapter_preserves_input_ownership_capacity_and_refusal_sentinels() { - let mut values = configured_four_sections(48_000); - let provider = common_prepared(&values, false, 48_000, usize::MAX).expect("provider"); - let retained = provider.retained_bytes(); - assert!(retained > 0); - assert!(matches!( - common_prepared(&values, false, 48_000, retained - 1), - Err(ResponseAnalysisError::ResourceLimit) - )); - assert!(common_prepared(&values, false, 48_000, retained).is_ok()); - let frequencies = [100.0_f32, 1_000.0]; - let enabled_left_before = provider.configuration().enabled_left.to_owned(); - let enabled_right_before = provider.configuration().enabled_right.to_owned(); - let mut before_left = [f32::NAN; 2]; - let mut before_right = [f32::NAN; 2]; - provider - .query_into( - ResponseQuery { - configuration_id: 1, - frequencies_hz: &frequencies, - maximum_points: frequencies.len(), - }, - ResponseOutput { - total_left_db: &mut before_left, - total_right_db: &mut before_right, - sections_left_db: None, - sections_right_db: None, - }, - ) - .expect("pre-mutation common query"); - values[2].value = 20_000.0; - values[3].value = -12.0; - let mut after_left = [f32::NAN; 2]; - let mut after_right = [f32::NAN; 2]; - provider - .query_into( - ResponseQuery { - configuration_id: 2, - frequencies_hz: &frequencies, - maximum_points: frequencies.len(), - }, - ResponseOutput { - total_left_db: &mut after_left, - total_right_db: &mut after_right, - sections_left_db: None, - sections_right_db: None, - }, - ) - .expect("post-mutation common query"); - assert_bits_equal(&after_left, &before_left); - assert_bits_equal(&after_right, &before_right); - assert_eq!(provider.configuration().enabled_left, &enabled_left_before); - assert_eq!( - provider.configuration().enabled_right, - &enabled_right_before - ); - - let mut invalid_left = [47.0_f32; 1]; - let mut invalid_right = [48.0_f32; 1]; - let mut invalid_sections_left = [49.0_f32; EQ_SECTION_COUNT]; - let mut invalid_sections_right = [50.0_f32; EQ_SECTION_COUNT]; - let invalid = provider.query_into( - ResponseQuery { - configuration_id: u64::MAX, - frequencies_hz: &[f32::NAN], - maximum_points: 1, - }, - ResponseOutput { - total_left_db: &mut invalid_left, - total_right_db: &mut invalid_right, - sections_left_db: Some(&mut invalid_sections_left), - sections_right_db: Some(&mut invalid_sections_right), - }, - ); - assert_eq!(invalid, Err(ResponseAnalysisError::InvalidFrequencyGrid)); - assert_eq!(invalid_left, [47.0]); - assert_eq!(invalid_right, [48.0]); - assert_eq!(invalid_sections_left, [49.0; EQ_SECTION_COUNT]); - assert_eq!(invalid_sections_right, [50.0; EQ_SECTION_COUNT]); - - let mut left = [41.0_f32; 2]; - let mut right = [42.0_f32; 2]; - let mut sections_left = [43.0_f32; EQ_SECTION_COUNT * 2]; - let mut sections_right = [44.0_f32; EQ_SECTION_COUNT * 2]; - let result = provider.query_into( - ResponseQuery { - configuration_id: u64::MAX, - frequencies_hz: &[1_000.0, 100.0], - maximum_points: 2, - }, - ResponseOutput { - total_left_db: &mut left, - total_right_db: &mut right, - sections_left_db: Some(&mut sections_left), - sections_right_db: Some(&mut sections_right), - }, - ); - assert_eq!(result, Err(ResponseAnalysisError::InvalidFrequencyGrid)); - assert_eq!(left, [41.0; 2]); - assert_eq!(right, [42.0; 2]); - assert_eq!(sections_left, [43.0; EQ_SECTION_COUNT * 2]); - assert_eq!(sections_right, [44.0; EQ_SECTION_COUNT * 2]); - - let mut left = [43.0_f32; 2]; - let mut right = [44.0_f32; 2]; - let mut sections_left = [45.0_f32; EQ_SECTION_COUNT * 2]; - let mut sections_right = [46.0_f32; EQ_SECTION_COUNT * 2]; - let result = provider.query_into( - ResponseQuery { - configuration_id: u64::MAX, - frequencies_hz: &frequencies, - maximum_points: 1, - }, - ResponseOutput { - total_left_db: &mut left, - total_right_db: &mut right, - sections_left_db: Some(&mut sections_left), - sections_right_db: Some(&mut sections_right), - }, - ); - assert_eq!(result, Err(ResponseAnalysisError::Capacity)); - assert_eq!(left, [43.0; 2]); - assert_eq!(right, [44.0; 2]); - assert_eq!(sections_left, [45.0; EQ_SECTION_COUNT * 2]); - assert_eq!(sections_right, [46.0; EQ_SECTION_COUNT * 2]); - - let mut left = [45.0_f32; 2]; - let mut right = [46.0_f32; 2]; - let result = provider.query_into( - ResponseQuery { - configuration_id: u64::MAX, - frequencies_hz: &frequencies, - maximum_points: 2, - }, - ResponseOutput { - total_left_db: &mut left[..1], - total_right_db: &mut right, - sections_left_db: None, - sections_right_db: None, - }, - ); - assert_eq!(result, Err(ResponseAnalysisError::OutputShape)); - assert_eq!(left, [45.0; 2]); - assert_eq!(right, [46.0; 2]); - - let mut left = [49.0_f32; 2]; - let mut right = [50.0_f32; 2]; - let mut sections = [51.0_f32; 8]; - let result = provider.query_into( - ResponseQuery { - configuration_id: u64::MAX, - frequencies_hz: &frequencies, - maximum_points: frequencies.len(), - }, - ResponseOutput { - total_left_db: &mut left, - total_right_db: &mut right, - sections_left_db: Some(&mut sections[..7]), - sections_right_db: None, - }, - ); - assert_eq!(result, Err(ResponseAnalysisError::OutputShape)); - assert_eq!(left, [49.0; 2]); - assert_eq!(right, [50.0; 2]); - assert_eq!(sections, [51.0; 8]); - - let mut left = [52.0_f32; 2]; - let mut right = [53.0_f32; 2]; - let mut sections = [54.0_f32; 9]; - let result = provider.query_into( - ResponseQuery { - configuration_id: u64::MAX, - frequencies_hz: &frequencies, - maximum_points: frequencies.len(), - }, - ResponseOutput { - total_left_db: &mut left, - total_right_db: &mut right, - sections_left_db: Some(&mut sections), - sections_right_db: None, - }, - ); - assert_eq!(result, Err(ResponseAnalysisError::OutputShape)); - assert_eq!(left, [52.0; 2]); - assert_eq!(right, [53.0; 2]); - assert_eq!(sections, [54.0; 9]); - - let mut left = [55.0_f32; 2]; - let mut right = [56.0_f32; 2]; - let mut right_sections = [57.0_f32; 9]; - let result = provider.query_into( - ResponseQuery { - configuration_id: u64::MAX, - frequencies_hz: &frequencies, - maximum_points: frequencies.len(), - }, - ResponseOutput { - total_left_db: &mut left, - total_right_db: &mut right, - sections_left_db: None, - sections_right_db: Some(&mut right_sections[..7]), - }, - ); - assert_eq!(result, Err(ResponseAnalysisError::OutputShape)); - assert_eq!(left, [55.0; 2]); - assert_eq!(right, [56.0; 2]); - assert_eq!(right_sections, [57.0; 9]); - - let mut invalid = values.clone(); - set_initial(&mut invalid, 2, ParameterChannel::Left, f32::NAN); - assert!(matches!( - common_prepared(&invalid, false, 48_000, usize::MAX), - Err(ResponseAnalysisError::Configuration( - effect_contract::EffectPrepareError { - code: "effect.parameter.initial" - } - )) - )); -} - #[test] fn common_eq_trait_object_query_is_allocation_free() { bench_alloc::assert_installed(); diff --git a/crates/soft-clip/tests/MUTATIONS.md b/crates/soft-clip/tests/MUTATIONS.md index 242cf98f2..7fb383947 100644 --- a/crates/soft-clip/tests/MUTATIONS.md +++ b/crates/soft-clip/tests/MUTATIONS.md @@ -28,7 +28,7 @@ cargo test --release --locked -p soft-clip --test | 3 | the odd-phase sample is read from row `base - 30` instead of `base - 31` | `src/kernel.rs` | `polyphase_identity` | RED | | 4 | the bypass mask is inverted | `src/kernel.rs` | `polyphase_identity` | RED | | 5 | the segment length is the first lane's countdown instead of the minimum over all lanes and parameters | `src/lib.rs` | `lane_identity` | RED | -| 6 | the kernel never writes `h.pos` back, keeping the history position in a local | `src/kernel.rs` | `partition_invariance` | RED | +| 6 | the kernel never writes `h.pos` back, keeping the history position in a local | `src/kernel.rs` | `partition_invariance` (deleted by TA4; KEEP catcher lane `sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts`) | RED | | 7 | the §4.4 boundary check is skipped and every block is accepted | `src/lib.rs` | `boundary_check` | RED | | 8 | a `Vec::with_capacity(frames)` is added to the per-block driver | `src/lib.rs` | `allocation` | RED | | 9 | a restore writes the payload's ages in reverse order into the history | `src/lib.rs` | `state_roundtrip` | RED | @@ -109,3 +109,9 @@ mutation and the defect are the same edit. Both reset kinds are now inside the m * The wasm leg of the corpus (`tools/wasm-gates`) is exercised by `scripts/run-wasm-gates.sh`; its own mutations live in that crate's `MUTATIONS.md`. + +## TA4 deletions + +The 2026-10 test audit (TA4, batch 1 mutation measurement at `81a3074fc`) deleted the tests named below. Each one's caught mutants were also red in the KEEP test named beside it. That is the recorded catcher of the deleted test's sampled mutants; the mutation of each row above was not re-run. + +- `partition_invariance` (the test binary; its one test, `every_partition_renders_the_one_shot_bits_and_state`): lane `sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` diff --git a/crates/soft-clip/tests/boundary_check.rs b/crates/soft-clip/tests/boundary_check.rs index a64923955..ed35b0950 100644 --- a/crates/soft-clip/tests/boundary_check.rs +++ b/crates/soft-clip/tests/boundary_check.rs @@ -65,19 +65,3 @@ fn a_non_finite_block_is_zeroed_reset_and_reports_its_frames() { support::snapshot(fresh.as_ref()) ); } - -/// A value that is finite but enormous fails the block too: the check is `|x| < 1e30`, not `x == x`. -#[test] -fn a_finite_but_out_of_range_block_also_fails() { - // mix = 0 and output = 1 is the exact identity select, so the dry sample reaches the output - // untouched 31 samples later -- the only way a *finite* out-of-range value can be observed, - // since the cubic clamps the wet path to +-2/3. - let values = support::values_from([(0.0, 0.0), (0.0, 0.0), (0.0, 0.0)]); - let mut effect = prepare(&values); - let mut left = vec![0.0_f32; FRAMES]; - let mut right = vec![0.0_f32; FRAMES]; - left[0] = 1.0e35; - let report = process(effect.as_mut(), &mut left, &mut right, 0, &[]); - assert!(left.iter().all(|sample| sample.to_bits() == 0)); - assert_eq!(report.nonfinite_left_blocks, FRAMES as u64); -} diff --git a/crates/soft-clip/tests/state_roundtrip.rs b/crates/soft-clip/tests/state_roundtrip.rs index b1bd47ed7..21f807612 100644 --- a/crates/soft-clip/tests/state_roundtrip.rs +++ b/crates/soft-clip/tests/state_roundtrip.rs @@ -38,50 +38,6 @@ fn live_instance(frames: usize) -> (Box = (0..256).map(|index| signal(index + 17, 0)).collect(); - let mut expected_right: Vec = (0..256).map(|index| signal(index + 17, 1)).collect(); - let mut actual_left = expected_left.clone(); - let mut actual_right = expected_right.clone(); - for offset in (0..256).step_by(FRAMES) { - process( - source.as_mut(), - &mut expected_left[offset..offset + FRAMES], - &mut expected_right[offset..offset + FRAMES], - first_sample + offset as u64, - &[], - ); - process( - destination.as_mut(), - &mut actual_left[offset..offset + FRAMES], - &mut actual_right[offset..offset + FRAMES], - first_sample + offset as u64, - &[], - ); - } - assert_eq!(bits(&actual_left), bits(&expected_left)); - assert_eq!(bits(&actual_right), bits(&expected_right)); - assert_eq!( - support::snapshot(source.as_ref()), - support::snapshot(destination.as_ref()) - ); -} - /// #1071: every word the effect itself can hold restores, subnormals included, and the restored /// instance continues bit for bit. A subnormal mix is inside its `[0, 1]` domain, a ramp between /// two subnormal mixes steps by a subnormal, and the dry history holds the input unflushed. diff --git a/crates/transient-shaper/tests/MUTATIONS.md b/crates/transient-shaper/tests/MUTATIONS.md index 4ad5bb788..e60022a04 100644 --- a/crates/transient-shaper/tests/MUTATIONS.md +++ b/crates/transient-shaper/tests/MUTATIONS.md @@ -184,3 +184,9 @@ dropped. Bit-identical for the reason given under row 8. It is a performance regression — it puts three `LinearRamp::next_value` calls per lane per channel back into the steady-state loop, which is audit finding F6 — and is rejected on that ground, not on a numeric one. + +## TA4 deletions + +The 2026-10 test audit (TA4, batch 1 mutation measurement at `81a3074fc`) deleted the tests named below. Each one's caught mutants were also red in the KEEP test named beside it. That is the recorded catcher of the deleted test's sampled mutants; the mutation of each row above was not re-run. + +- `the_scalar_product_is_partition_invariant`: effect-runtime `contract_ramp_identity::linear_smoother_is_bit_identical_to_the_linear_ramp` diff --git a/crates/transient-shaper/tests/partition.rs b/crates/transient-shaper/tests/partition.rs index ae4648e35..10031f7eb 100644 --- a/crates/transient-shaper/tests/partition.rs +++ b/crates/transient-shaper/tests/partition.rs @@ -7,10 +7,7 @@ mod common; use common::*; -use effect_contract::{ - EffectBankProcessBlock, EffectProcessBlock, LinkMode, NativeEffectFactory, ParameterChannel, -}; -use transient_shaper::TransientShaperFactory; +use effect_contract::{EffectBankProcessBlock, LinkMode, ParameterChannel}; /// Deterministic, integer-built noise with impulses; no platform math anywhere in the signal. fn signal(seed: u64, frames: usize) -> Vec { @@ -31,93 +28,9 @@ fn signal(seed: u64, frames: usize) -> Vec { const PARTITIONS: [usize; 5] = [1, 7, 64, 128, 512]; -/// One render's result: the two output channels and the state payload sections it left behind. -type Rendered = (Vec, Vec, (Vec, Vec)); - /// One bank render's result: the two interleaved output blocks and one payload pair per track. type RenderedBank = (Vec, Vec, Vec<(Vec, Vec)>); -/// Red mutation: hoist `ramp_prefix` out of `run` and compute it once at prepare — the 7-frame and -/// 64-frame partitions then evaluate the ramp differently from the one-shot render. -#[test] -fn the_scalar_product_is_partition_invariant() { - let frames = 512; - let left = signal(0x1234_5678, frames); - let right = signal(0x9abc_def0, frames); - let spans = [ - point(ParameterChannel::Left, 0, 0, 0.875), - point(ParameterChannel::Right, 0, 0, -0.375), - point(ParameterChannel::Left, 1, 0, -0.625), - point(ParameterChannel::Right, 1, 0, 0.25), - point(ParameterChannel::Left, 2, 0, 0.5), - point(ParameterChannel::Right, 2, 0, 0.75), - ]; - - let render = |block: usize| -> Rendered { - let mut effect = TransientShaperFactory - .prepare(request_full( - &values_of(-0.5, 0.75, 1.0), - 48_000, - 512, - false, - LinkMode::DualMono, - )) - .expect("prepare") - .processor; - let mut out_left = left.clone(); - let mut out_right = right.clone(); - let mut start = 0; - while start < frames { - let end = (start + block).min(frames); - let spans: &[_] = if start == 0 { &spans } else { &[] }; - effect.process( - EffectProcessBlock::new( - &mut out_left[start..end], - &mut out_right[start..end], - None, - start as u64, - spans, - 512, - ) - .expect("partition block"), - ); - start = end; - } - let state = snapshot(effect.as_ref()); - (out_left, out_right, state) - }; - - let reference = render(frames); - // Non-vacuity: the effect must actually have shaped the signal, or every partition agrees on - // having done nothing. - let changed = reference - .0 - .iter() - .zip(&left) - .filter(|(a, b)| a.to_bits() != b.to_bits()) - .count(); - assert!( - changed > frames / 2, - "only {changed} of {frames} samples moved" - ); - let reference_left = reference.0.iter().map(|x| x.to_bits()).collect::>(); - let reference_right = reference.1.iter().map(|x| x.to_bits()).collect::>(); - for block in PARTITIONS { - let candidate = render(block); - assert_eq!( - candidate.0.iter().map(|x| x.to_bits()).collect::>(), - reference_left, - "left PCM at block size {block}" - ); - assert_eq!( - candidate.1.iter().map(|x| x.to_bits()).collect::>(), - reference_right, - "right PCM at block size {block}" - ); - assert_eq!(candidate.2, reference.2, "state at block size {block}"); - } -} - /// The same property at the build's bank width, where the ramp prefix is the maximum over lanes. #[test] fn the_bank_is_partition_invariant() { diff --git a/crates/true-peak-limiter/src/lib.rs b/crates/true-peak-limiter/src/lib.rs index 8d8f7c262..3a816898a 100644 --- a/crates/true-peak-limiter/src/lib.rs +++ b/crates/true-peak-limiter/src/lib.rs @@ -7538,51 +7538,6 @@ mod tests { ); } - /// E9: partition invariance over the gate's block sizes (master plan P1). - #[test] - fn partition_invariance_holds_over_block_sizes() { - let values = values_with(-6.0, 100.0, 5.0); - let frames = 512_usize; - let mut noise = Noise(0x7777); - let source_left: Vec = (0..frames).map(|_| noise.next() * 4.0).collect(); - let source_right: Vec = (0..frames).map(|_| noise.next() * 4.0).collect(); - - let mut reference = TruePeakLimiterFactory - .prepare(request_at(&values, 48_000, 512)) - .expect("prepare"); - let mut left = source_left.clone(); - let mut right = source_right.clone(); - render(&mut reference, &mut left, &mut right, 512); - let reference_state = snapshot(&reference); - - for block in [1_usize, 7, 64, 128] { - let mut effect = TruePeakLimiterFactory - .prepare(request_at(&values, 48_000, 512)) - .expect("prepare"); - let mut partitioned_left = source_left.clone(); - let mut partitioned_right = source_right.clone(); - render( - &mut effect, - &mut partitioned_left, - &mut partitioned_right, - block, - ); - for frame in 0..frames { - assert_eq!( - partitioned_left[frame].to_bits(), - left[frame].to_bits(), - "block {block} left frame {frame}" - ); - assert_eq!( - partitioned_right[frame].to_bits(), - right[frame].to_bits(), - "block {block} right frame {frame}" - ); - } - assert_eq!(snapshot(&effect), reference_state, "block {block}"); - } - } - /// E10: the D7 boundary check replaces every per-value recovery path. #[test] fn a_nonfinite_block_is_zeroed_reset_and_counted() { diff --git a/crates/true-peak-limiter/tests/MUTATIONS.md b/crates/true-peak-limiter/tests/MUTATIONS.md index 55e8269f4..9485d87b6 100644 --- a/crates/true-peak-limiter/tests/MUTATIONS.md +++ b/crates/true-peak-limiter/tests/MUTATIONS.md @@ -26,7 +26,7 @@ cargo test -p true-peak-limiter --lib phase_outputs | 5 | `smoothed = box_sum / window` → `smoothed = quantised` (box smoother removed, bare minimum applied) | `src/lib.rs` `channel_frame` | `the_gain_ramp_falls_gradually_and_arrives_at_the_requirement` | | 6 | `flush(target.max(released))` → `target.max(released)` | `src/lib.rs` `channel_frame` | `silence_restores_exact_identity_including_signed_zero` | | 7 | van Herk suffix pass guarded by `complete && width < 2`, so it never runs at W4/W8 | `src/lib.rs` `sliding_minimum` | `lane_identity_holds_across_widths` | -| 8 | `left.prefix.fill(1.0)` / `right.prefix.fill(1.0)` at block entry (min-filter prefix not carried across blocks) | `src/lib.rs` `limiter_block` | `partition_invariance_holds_over_block_sizes` | +| 8 | `left.prefix.fill(1.0)` / `right.prefix.fill(1.0)` at block entry (min-filter prefix not carried across blocks) | `src/lib.rs` `limiter_block` | `partition_invariance_holds_over_block_sizes` (deleted by TA4; KEEP catcher lane `sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts`) | | 9 | `return;` inserted after `limiter_block` so the §4.4 boundary check never runs | `src/lib.rs` `LimiterCore::process_block` | `a_nonfinite_block_is_zeroed_reset_and_counted` | | 10 | the `recomputed == box_sum` check in restore disabled | `src/lib.rs` `read_lane` | `state_round_trips_and_rejects_corruption` | | 11 | `peak = history[6].abs()` → `peak = L::zero()` (sample term dropped from `P`) | `src/lib.rs` `detector_peak` | `fixed_latency_guarded_ceiling_and_bypass_bits_hold` | @@ -145,7 +145,7 @@ Every row below is a **bit** test. The claims here are about *when* a state word | # | mutation | file | test that turned red | |---|---|---|---| -| round2-1 | the block-end write-back of `prefix` dropped | `src/lib.rs` `limiter_block_uniform` | `a_mixed_lookahead_cohort_falls_back_bit_identically`, `a_restore_that_desyncs_the_phase_falls_back`, `fixed_latency_guarded_ceiling_and_bypass_bits_hold`, `lane_identity_holds_across_widths`, `partition_invariance_holds_over_block_sizes` | +| round2-1 | the block-end write-back of `prefix` dropped | `src/lib.rs` `limiter_block_uniform` | `a_mixed_lookahead_cohort_falls_back_bit_identically`, `a_restore_that_desyncs_the_phase_falls_back`, `fixed_latency_guarded_ceiling_and_bypass_bits_hold`, `lane_identity_holds_across_widths`, `partition_invariance_holds_over_block_sizes` (deleted by TA4; KEEP catcher lane `sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts`) | | round2-2 | the block-end write-back of `phase` dropped, so the cohort restarts each block at the phase it entered the previous one with | `src/lib.rs` `limiter_block_uniform` | `a_de_zipper_window_open_across_a_block_boundary_refuses_the_claim`, `a_mixed_lookahead_cohort_falls_back_bit_identically`, `a_negative_zero_input_block_is_not_treated_as_silence`, `a_restore_that_desyncs_the_phase_falls_back`, `a_restore_withdraws_the_silence_claim`, `a_settled_silent_limiter_renders_exactly_the_never_fast_path` | | round2-3 | `.min(ring - left_end)` dropped from the segment run | `src/lib.rs` `segment` | `the_segment_walk_visits_the_slots_a_frame_at_a_time_walk_visits` — **and nothing else** | | round2-4 | `.min(ring - left_expiring)` dropped from the segment run | `src/lib.rs` `segment` | `the_segment_walk_visits_the_slots_a_frame_at_a_time_walk_visits` — **and nothing else** | @@ -158,7 +158,7 @@ Every row below is a **bit** test. The claims here are about *when* a state word | round2-11 | the alignment sample read from tap 0 instead of tap 6 | `src/lib.rs` `detector_peak` | `every_case_has_one_digest_at_every_width` (the E12 `D90_DIGESTS`) | | round2-12 | the left channel takes the **right** channel's block-end phase: `left.phase.fill(left_phase)` → `fill(right_phase)` | `src/lib.rs` `limiter_block_uniform` | `the_two_channels_of_a_uniform_cohort_keep_their_own_phases` — **and nothing else** | | round2-13 | the mirror of round2-12: `right.phase.fill(right_phase)` → `fill(left_phase)` | `src/lib.rs` `limiter_block_uniform` | `the_two_channels_of_a_uniform_cohort_keep_their_own_phases` — **and nothing else** | -| round2-14 | the two channels' block-end `prefix` write-backs are swapped | `src/lib.rs` `limiter_block_uniform` | seven tests, including `lane_identity_holds_across_widths`, `partition_invariance_holds_over_block_sizes`, `output_true_peak_never_exceeds_the_ceiling` and `passes_effect_contract_conformance` | +| round2-14 | the two channels' block-end `prefix` write-backs are swapped | `src/lib.rs` `limiter_block_uniform` | seven tests, including `lane_identity_holds_across_widths`, `partition_invariance_holds_over_block_sizes` (deleted by TA4; KEEP catcher lane `sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts`), `output_true_peak_never_exceeds_the_ceiling` and `passes_effect_contract_conformance` | ### Why a crossed phase needed its own test and a crossed prefix did not @@ -641,3 +641,9 @@ NL green is the case's reference: its pin is the words of the pre-#990 behaviour here; the session test's "equal" check (`ch16`) still owns it at every width. E0 is green at `Simd8` because lanes 0 and 7 unlink in the same block, so the eight-lane bank unlinks through lane 7; the session test's `ch48` row still owns E0 and EL at `Simd8`. + +## TA4 deletions + +The 2026-10 test audit (TA4, batch 1 mutation measurement at `81a3074fc`) deleted the tests named below. Each one's caught mutants were also red in the KEEP test named beside it. That is the recorded catcher of the deleted test's sampled mutants; the mutation of each row above was not re-run. + +- `partition_invariance_holds_over_block_sizes`: lane `sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` diff --git a/crates/true-peak-limiter/tests/mono_collapse.rs b/crates/true-peak-limiter/tests/mono_collapse.rs index 96c66eeec..4f17e98a6 100644 --- a/crates/true-peak-limiter/tests/mono_collapse.rs +++ b/crates/true-peak-limiter/tests/mono_collapse.rs @@ -246,67 +246,6 @@ fn run_block( } } -/// The collapsed body renders the dual body's left plane, ramping and stationary. -/// -/// The stationary arm is the one that exercises `limiter_block_uniform_mono` -- the van Herk -/// segment walk, whose collapsed form hands the walk one channel's window offsets for both of its -/// arguments -- and the ramping arm the uniform ramping body beside it. -#[test] -fn the_collapsed_body_renders_the_dual_bodys_left_plane() { - let Some((width, backend)) = native_bank() else { - return; - }; - let lanes = width.lanes() as usize; - for ramping in [true, false] { - let mut dual = bind(width, backend, lanes); - let mut collapsed = bind(width, backend, lanes); - let idle = vec![0_u32; lanes + 1]; - - for step in 0..BLOCKS { - let mut dual_left = block(step, lanes); - let mut dual_right = dual_left.clone(); - let mut mono_left = dual_left.clone(); - let mut stale = vec![f32::from_bits(0x7F7F_FFFF); FRAMES * lanes]; - let first = (step * FRAMES) as u64; - let (spans, packed) = automation(step, lanes); - let (spans, packed): (&[PreparedAutomationSpan], &[u32]) = if ramping { - (&spans, &packed) - } else { - (&[], &idle) - }; - run_block( - dual.processor.as_mut(), - &mut dual_left, - &mut dual_right, - width, - first, - spans, - packed, - false, - ); - run_block( - collapsed.processor.as_mut(), - &mut mono_left, - &mut stale, - width, - first, - spans, - packed, - true, - ); - for (word, (collapsed_word, dual_word)) in - mono_left.iter().zip(dual_left.iter()).enumerate() - { - assert_eq!( - collapsed_word.to_bits(), - dual_word.to_bits(), - "ramping {ramping} block {step} word {word}" - ); - } - } - } -} - /// After `desymmetrize_channels`, a bank that ran collapsed renders what a never-collapsed one does. /// /// One retarget, early, and then none: the ramps open and close well before the transition, so at From d0bc7f84118bf919a346caae8024b57436491d39 Mon Sep 17 00:00:00 2001 From: BL Date: Tue, 20 Oct 2026 01:48:14 +0000 Subject: [PATCH 05/10] Delete measured-redundant graph, builtins, protocol and source tests (TA4) Co-Authored-By: Claude Opus 5.5 --- crates/builtins-compiler/src/lib.rs | 68 --- crates/builtins/src/tests.rs | 350 ------------ crates/builtins/tests/MUTATIONS.md | 11 +- crates/builtins/tests/filter_response.rs | 139 +---- crates/builtins/tests/matrix.rs | 59 -- crates/builtins/tests/randomized.rs | 4 +- crates/builtins/tests/response.rs | 72 --- crates/builtins/tests/stage.rs | 306 ---------- crates/engine/src/realtime/mod.rs | 47 -- crates/graph-compiler/src/lib.rs | 357 ------------ crates/graph-compiler/tests/MUTATIONS.md | 19 +- crates/graph-compiler/tests/compile_shapes.rs | 142 +---- .../tests/route_coefficients.rs | 205 ------- crates/graph-compiler/tests/route_gain.rs | 8 - crates/graph-compiler/tests/track_delay.rs | 30 - crates/graph/src/lib.rs | 26 +- crates/graph/src/program.rs | 4 +- crates/graph/src/program/tests.rs | 179 ------ crates/graph/src/runtime.rs | 121 ---- crates/graph/tests/MUTATIONS.md | 13 +- crates/host-core/tests/timeline.rs | 2 +- crates/protocol/src/controller/tests.rs | 169 ------ crates/protocol/tests/MUTATIONS.md | 8 +- crates/protocol/tests/edit_ramps.rs | 40 -- crates/protocol/tests/vca_edits.rs | 260 +-------- crates/rack/src/lib.rs | 148 ----- crates/session/src/edit_ramp.rs | 22 - crates/session/tests/invalid_matrix.rs | 32 -- crates/source/src/lib.rs | 526 ------------------ crates/source/tests/randomized.rs | 5 +- 30 files changed, 58 insertions(+), 3314 deletions(-) diff --git a/crates/builtins-compiler/src/lib.rs b/crates/builtins-compiler/src/lib.rs index 27ab82913..568eecce1 100644 --- a/crates/builtins-compiler/src/lib.rs +++ b/crates/builtins-compiler/src/lib.rs @@ -14679,74 +14679,6 @@ mod tests { ); } - #[test] - fn resource_estimate_enforces_the_actual_largest_retained_payload() { - let config = MeterConfig { - period_frames: NonZeroU32::new(16).expect("constant"), - peak_hold_frames: 0, - peak_decay_db_per_second: 0.0, - queue_capacity: NonZeroUsize::new(1).expect("constant"), - reset_generation: 0, - }; - let requests = [MeterRequest { - handle: handle(1), - track_id: "vocal".to_owned(), - tap: MeterTap::PostMatrix, - config, - }]; - let baseline = prepare_session_builtins(&session(), &requests, caps()).expect("prepare"); - let mut constrained = caps(); - constrained.maximum_single_allocation_bytes = baseline - .resources - .maximum_single_allocation_bytes - .saturating_sub(1); - let Err(error) = prepare_session_builtins(&session(), &requests, constrained) else { - panic!("largest retained payload must be capped"); - }; - assert_eq!( - error.0, - vec![diag("builtin.resource.limit", "$.builtin_compile_caps")] - ); - } - - #[test] - fn retained_payload_boundaries_reject_in_phase_one() { - let config = MeterConfig { - period_frames: NonZeroU32::new(16).expect("constant"), - peak_hold_frames: 0, - peak_decay_db_per_second: 0.0, - queue_capacity: NonZeroUsize::new(1).expect("constant"), - reset_generation: 0, - }; - let requests = [MeterRequest { - handle: handle(1), - track_id: "vocal".to_owned(), - tap: MeterTap::PostMatrix, - config, - }]; - let baseline = prepare_session_builtins(&session(), &requests, caps()).expect("prepare"); - let report = baseline.resource_report(); - let mut state_limited = caps(); - state_limited.maximum_total_state_bytes = report - .engine_owned_processor_payload_bytes - .checked_sub(1) - .expect("nonzero processor payload"); - let mut meter_limited = caps(); - meter_limited.maximum_total_meter_bytes = report - .engine_owned_meter_payload_bytes - .checked_sub(1) - .expect("nonzero meter payload"); - for limited in [state_limited, meter_limited] { - let Err(error) = prepare_session_builtins(&session(), &requests, limited) else { - panic!("one byte below a retained-payload boundary must reject"); - }; - assert_eq!( - error.0, - vec![diag("builtin.resource.limit", "$.builtin_compile_caps")] - ); - } - } - #[test] fn cutoff_boundaries_match_compiler_diagnostics_at_every_launch_rate_and_section() { let document = include_str!("../../../fixtures/session/v1/canonical.json"); diff --git a/crates/builtins/src/tests.rs b/crates/builtins/src/tests.rs index d5b17ab31..8d1bb1e99 100644 --- a/crates/builtins/src/tests.rs +++ b/crates/builtins/src/tests.rs @@ -844,356 +844,6 @@ fn prepared_filters_design_only_before_runtime_application() { assert_eq!(FILTER_DESIGN_CALLS.with(Cell::get), 0); } -/// Issue #944 gate 2: a settled matrix block takes the select-free arm exactly when no lane of the -/// stage -- padding lanes included -- is the identity, once per settled segment. -/// -/// `MATRIX_SELECT_FREE_BLOCKS` counts the arm, so this is the one gate that sees a -/// performance-only regression: never taking the arm (issue #944 M2) renders the same bits. -#[test] -fn settled_matrix_takes_the_select_free_arm_only_without_an_identity_lane() { - use super::{BuiltinMatrixBank, MATRIX_SELECT_FREE_BLOCKS}; - use effect_contract::BankWidth; - - const FRAMES: usize = 64; - /// Ends 24 frames into a 64-frame block, so the block has a settled tail. - const WINDOW: u32 = 24; - - fn non_identity(lane: usize) -> Matrix2x2 { - let k = lane as f32 * 0.0625; - Matrix2x2 { - ll: 0.75 - k, - lr: -0.25 + k, - rl: 0.5 - k, - rr: 0.875 - k, - } - } - - fn counted(render: impl FnOnce()) -> usize { - MATRIX_SELECT_FREE_BLOCKS.with(|blocks| blocks.set(0)); - render(); - MATRIX_SELECT_FREE_BLOCKS.with(Cell::get) - } - - // Widest first, as written before #1112. - for &width in BankWidth::ALL.iter().rev() { - let backend = width.backend(); - let lanes = width.lanes() as usize; - let bank = |members: usize, identity_member: Option| { - let prepared = (0..members) - .map(|lane| { - let matrix = if identity_member == Some(lane) { - Matrix2x2::IDENTITY - } else { - non_identity(lane) - }; - (matrix, 0) - }) - .collect(); - BuiltinMatrixBank::new(backend, width, prepared).unwrap() - }; - let mut left = vec![0.25; FRAMES * lanes]; - let mut right = vec![-0.5; FRAMES * lanes]; - let mut render = |bank: &mut BuiltinMatrixBank, blocks: usize| { - counted(|| { - for _ in 0..blocks { - bank.process(&mut left, &mut right, FRAMES as u32); - } - }) - }; - - // A full bank with no identity lane: once per settled block, never per frame. - let mut full = bank(lanes, None); - assert_eq!( - render(&mut full, 3), - 3, - "width={lanes}: full non-identity bank" - ); - - // One identity member keeps the select form. - let mut one_identity = bank(lanes, Some(lanes / 2)); - assert_eq!( - render(&mut one_identity, 3), - 0, - "width={lanes}: identity member" - ); - - // A partial bank carries identity padding lanes, so it keeps the select form too. - let mut partial = bank(lanes - 1, None); - assert_eq!( - render(&mut partial, 3), - 0, - "width={lanes}: identity padding lane" - ); - let mut single = bank(1, None); - assert_eq!(render(&mut single, 3), 0, "width={lanes}: one member"); - - // A ramp that ends mid-block toward a non-identity target: its settled tail is one - // select-free segment, and the next block is another. - let mut retarget = bank(lanes, None); - retarget - .set_target_smoothed(0, non_identity(lanes), WINDOW) - .unwrap(); - assert_eq!(render(&mut retarget, 1), 1, "width={lanes}: settled tail"); - assert_eq!(render(&mut retarget, 1), 1, "width={lanes}: after the ramp"); - - // A ramp that covers the whole block has no settled segment at all. - retarget - .set_target_smoothed(1, non_identity(lanes + 1), FRAMES as u32 + WINDOW) - .unwrap(); - assert_eq!( - render(&mut retarget, 1), - 0, - "width={lanes}: ramp covers block" - ); - assert_eq!( - render(&mut retarget, 1), - 1, - "width={lanes}: ramp ends mid-block" - ); - - // A ramp that ends mid-block on the identity: its tail and every block after keep the - // select, because `sync_settled` has set that lane's mask before the tail runs. - let mut to_identity = bank(lanes, None); - to_identity - .set_target_smoothed(0, Matrix2x2::IDENTITY, WINDOW) - .unwrap(); - assert_eq!( - render(&mut to_identity, 1), - 0, - "width={lanes}: identity tail" - ); - assert_eq!( - render(&mut to_identity, 2), - 0, - "width={lanes}: identity settled" - ); - } - - // The scalar per-track stage takes the same method; its mask is the lane's own flag. - let chain = |matrix: Matrix2x2| { - BuiltinChain::new( - 48_000, - BuiltinParameters { - matrix, - ..BuiltinParameters::default() - }, - ) - .unwrap() - }; - let render = |chain: &mut BuiltinChain, blocks: usize| { - counted(|| { - for _ in 0..blocks { - let mut left = [0.25; FRAMES]; - let mut right = [-0.5; FRAMES]; - chain - .matrix - .process(DualMonoBlock::new(&mut left, &mut right, 0).unwrap()); - } - }) - }; - let mut scalar = chain(non_identity(3)); - assert_eq!(render(&mut scalar, 2), 2, "scalar non-identity"); - let mut identity = chain(Matrix2x2::IDENTITY); - assert_eq!(render(&mut identity, 2), 0, "scalar identity"); - scalar - .matrix - .set_target_smoothed(Matrix2x2::IDENTITY, WINDOW) - .unwrap(); - assert_eq!(render(&mut scalar, 1), 0, "scalar identity tail"); - identity - .matrix - .set_target_smoothed(non_identity(5), WINDOW) - .unwrap(); - assert_eq!(render(&mut identity, 1), 1, "scalar settled tail"); -} - -/// Issue #954 dispatch witness: a settled fused fader/matrix block takes the select-free arm -/// exactly when no lane of the matrix -- padding lanes included -- is the identity, once per call, -/// at all four call sites of the fused kernel. -/// -/// `FUSED_SELECT_FREE_BLOCKS` counts the arm, so this is the one gate that sees a -/// performance-only regression: never taking the arm (issue #954 M2) renders the same bits. -#[test] -fn fused_fader_matrix_takes_the_select_free_arm_only_without_an_identity_lane() { - use super::{ - BuiltinFaderBank, BuiltinMatrixBank, FUSED_SELECT_FREE_BLOCKS, FaderMuteRampBuiltins, - }; - use effect_contract::BankWidth; - - const FRAMES: usize = 64; - const WINDOW: u32 = 24; - - fn non_identity(lane: usize) -> Matrix2x2 { - let k = lane as f32 * 0.0625; - Matrix2x2 { - ll: 0.75 - k, - lr: -0.25 + k, - rl: 0.5 - k, - rr: 0.875 - k, - } - } - - fn counted(render: impl FnOnce()) -> usize { - FUSED_SELECT_FREE_BLOCKS.with(|blocks| blocks.set(0)); - render(); - FUSED_SELECT_FREE_BLOCKS.with(Cell::get) - } - - // Widest first, as written before #1112. - for &width in BankWidth::ALL.iter().rev() { - let backend = width.backend(); - let lanes = width.lanes() as usize; - let banks = |members: usize, identity_member: Option| { - let matrices = (0..members) - .map(|lane| { - let matrix = if identity_member == Some(lane) { - Matrix2x2::IDENTITY - } else { - non_identity(lane) - }; - (matrix, 0) - }) - .collect(); - let faders = (0..members) - .map(|lane| BuiltinParameters { - left: ChannelParameters { - fader_db: -3.0, - muted: lane == 1, - ..ChannelParameters::default() - }, - ..BuiltinParameters::default() - }) - .collect(); - ( - BuiltinFaderBank::new(backend, width, faders).unwrap(), - BuiltinMatrixBank::new(backend, width, matrices).unwrap(), - ) - }; - // One fused call over fresh planes; whether it was accepted, and whether it took the arm. - let call = |(fader, matrix): &mut (BuiltinFaderBank, BuiltinMatrixBank)| { - let mut left = vec![0.25; FRAMES * lanes]; - let mut right = vec![-0.5; FRAMES * lanes]; - let mut fused = false; - let arm = counted(|| { - fused = fader.try_process_settled_with_matrix( - matrix, - &mut left, - &mut right, - FRAMES as u32, - ); - }); - if !fused { - fader.process(&mut left, &mut right, FRAMES as u32); - matrix.process(&mut left, &mut right, FRAMES as u32); - } - (fused, arm) - }; - // Counts the arm over `blocks` calls; every call must be accepted as fused. - let render = |banks: &mut (BuiltinFaderBank, BuiltinMatrixBank), blocks: usize| { - (0..blocks) - .map(|_| { - let (fused, arm) = call(banks); - assert!(fused, "width={lanes}: a settled pair is fused"); - arm - }) - .sum::() - }; - - // A full bank with no identity lane: once per fused call, never per frame. - let mut full = banks(lanes, None); - assert_eq!(render(&mut full, 3), 3, "width={lanes}: full non-identity"); - - // One identity member keeps the select form. - let mut one_identity = banks(lanes, Some(lanes / 2)); - assert_eq!( - render(&mut one_identity, 3), - 0, - "width={lanes}: identity member" - ); - - // A partial bank carries identity padding lanes, so it keeps the select form too. - let mut partial = banks(lanes - 1, None); - assert_eq!(render(&mut partial, 3), 0, "width={lanes}: padding lane"); - let mut single = banks(1, None); - assert_eq!(render(&mut single, 3), 0, "width={lanes}: one member"); - - // An instant retarget to the identity is seen by the very next call, and so is the - // instant retarget back: the mask is read per call and never cached. - full.1 - .set_target_smoothed(0, Matrix2x2::IDENTITY, 0) - .unwrap(); - assert_eq!(render(&mut full, 2), 0, "width={lanes}: instant identity"); - full.1.set_target_smoothed(0, non_identity(7), 0).unwrap(); - assert_eq!(render(&mut full, 2), 2, "width={lanes}: instant pan"); - - // A ramp in flight on either stage declines the fused call, so nothing is counted. - full.1 - .set_target_smoothed(1, non_identity(6), WINDOW) - .unwrap(); - assert_eq!(call(&mut full), (false, 0), "width={lanes}: matrix ramp"); - full.0 - .set_fader_db(0, BuiltinLaneSelector::Both, -6.0, WINDOW) - .unwrap(); - assert_eq!(call(&mut full), (false, 0), "width={lanes}: fader ramp"); - assert_eq!(render(&mut full, 1), 1, "width={lanes}: settled again"); - } - - // The two scalar call sites take the same method; a track's mask is its own flag. - let parameters = |matrix: Matrix2x2| BuiltinParameters { - matrix, - ..BuiltinParameters::default() - }; - let chain_blocks = |chain: &mut BuiltinChain, blocks: usize| { - counted(|| { - for _ in 0..blocks { - let mut left = [0.25; FRAMES]; - let mut right = [-0.5; FRAMES]; - chain.process_dual_mono(DualMonoBlock::new(&mut left, &mut right, 0).unwrap()); - } - }) - }; - let mut pan = BuiltinChain::new(48_000, parameters(non_identity(3))).unwrap(); - assert_eq!(chain_blocks(&mut pan, 2), 2, "chain pan"); - let mut identity = BuiltinChain::new(48_000, parameters(Matrix2x2::IDENTITY)).unwrap(); - assert_eq!(chain_blocks(&mut identity, 2), 0, "chain identity"); - pan.set_matrix_target(Matrix2x2::IDENTITY).unwrap(); - assert_eq!(chain_blocks(&mut pan, 1), 0, "chain instant identity"); - - let ramp_blocks = - |fader: &mut FaderMuteRampBuiltins, matrix: &mut super::MatrixBuiltins, blocks: usize| { - counted(|| { - for _ in 0..blocks { - let mut left = [0.25; FRAMES]; - let mut right = [-0.5; FRAMES]; - let mut block = DualMonoBlock::new(&mut left, &mut right, 0).unwrap(); - assert!(fader.process_fader_matrix(matrix, &mut block)); - } - }) - }; - let (_, _, mut pan_matrix) = prepare_sections(48_000, parameters(non_identity(5))).unwrap(); - let (_, _, mut identity_matrix) = - prepare_sections(48_000, parameters(Matrix2x2::IDENTITY)).unwrap(); - let mut fader = FaderMuteRampBuiltins::new(BuiltinParameters::default()).unwrap(); - assert_eq!( - ramp_blocks(&mut fader, &mut pan_matrix, 2), - 2, - "per-track pan" - ); - assert_eq!( - ramp_blocks(&mut fader, &mut identity_matrix, 2), - 0, - "per-track identity" - ); - pan_matrix - .set_target_smoothed(Matrix2x2::IDENTITY, 0) - .unwrap(); - assert_eq!( - ramp_blocks(&mut fader, &mut pan_matrix, 1), - 0, - "per-track instant identity" - ); -} - /// Issue #1638 D3: the sink refuses a padding lane, a bad gain and a second operation of one /// kind on one lane and channel, and a refusal queues nothing on either channel. #[test] diff --git a/crates/builtins/tests/MUTATIONS.md b/crates/builtins/tests/MUTATIONS.md index 601ddf037..cfbf0fd14 100644 --- a/crates/builtins/tests/MUTATIONS.md +++ b/crates/builtins/tests/MUTATIONS.md @@ -220,7 +220,7 @@ settled dispatch witness and signed-zero law, plus `matrix2x2_block` otherwise; both settled call sites (the `maximum == 0` block and the post-ramp tail) go through it. The gates: -- gate 2, `tests::settled_matrix_takes_the_select_free_arm_only_without_an_identity_lane` +- gate 2, `tests::settled_matrix_takes_the_select_free_arm_only_without_an_identity_lane` (deleted by TA4; KEEP catcher builtins `randomized::the_banks_render_their_scalar_sections_under_random_retargets`) (`src/tests.rs`): the `#[cfg(test)]` witness `MATRIX_SELECT_FREE_BLOCKS` counts the arm per settled segment, at W8, W4 and the scalar stage; - gate 3, `settled_matrix_shapes_render_the_base_bits` (`tests/matrix.rs`): one SHA-256 over every @@ -285,7 +285,7 @@ its own settled check: `BuiltinFaderBank::try_process_settled_with_matrix` at `S `FaderMuteRampBuiltins::process_fader_matrix` and `BuiltinChain::process_dual_mono`. The gates: - gate 1 (lane), in `crates/lane/tests/MUTATIONS.md`; -- the dispatch witness, `tests::fused_fader_matrix_takes_the_select_free_arm_only_without_an_identity_lane` +- the dispatch witness, `tests::fused_fader_matrix_takes_the_select_free_arm_only_without_an_identity_lane` (deleted by TA4; KEEP catcher builtins `tests::full_public_chain_matches_the_three_section_reference`) (`src/tests.rs`): the `#[cfg(test)]` counter `FUSED_SELECT_FREE_BLOCKS` counts the arm per fused call at W8, W4 and both scalar sites, over identity members, partial banks, instant retargets to and from the identity, and ramps that decline the fused call; @@ -367,3 +367,10 @@ restored. Before attempt 2 both S-1 rows were green, because the safety net moved both seeds at once and either half refused the commit. + +## TA4 deletions + +The 2026-10 test audit (TA4, batch 1 mutation measurement at `81a3074fc`) deleted the tests named below. Each one's caught mutants were also red in the KEEP test named beside it. That is the recorded catcher of the deleted test's sampled mutants; the mutation of each row above was not re-run. + +- `settled_matrix_takes_the_select_free_arm_only_without_an_identity_lane`: builtins `randomized::the_banks_render_their_scalar_sections_under_random_retargets` +- `fused_fader_matrix_takes_the_select_free_arm_only_without_an_identity_lane`: builtins `tests::full_public_chain_matches_the_three_section_reference` diff --git a/crates/builtins/tests/filter_response.rs b/crates/builtins/tests/filter_response.rs index f37856f10..da19dda54 100644 --- a/crates/builtins/tests/filter_response.rs +++ b/crates/builtins/tests/filter_response.rs @@ -7,14 +7,13 @@ use builtins::{ BuiltinChain, BuiltinLaneSelector, BuiltinParameterError, BuiltinParameters, ChannelParameters, DualMonoBlock, InputBuiltins, InputFilterResponseError, InputFilterResponseMode, InputFilterResponseOutput, InputFilterResponseRequest, InputFilterResponseSummary, Matrix2x2, - builtin_filter_cutoff_maximum_hz, input_filter_response_descriptor, - prepare_input_filter_response, query_input_filter_response_into, + builtin_filter_cutoff_maximum_hz, prepare_input_filter_response, + query_input_filter_response_into, }; use dsp_reference::ReferenceSvfStateSpace; use effect_contract::{ - EffectPrepareError, PreparedResponseAnalysis, ResponseAnalysisError, ResponseAnalysisMode, - ResponseBypassSemantics, ResponseOutput, ResponsePrepareLimits, ResponseQuery, - ResponseTotalScope, validate_response_analysis_descriptor, + EffectPrepareError, PreparedResponseAnalysis, ResponseAnalysisError, ResponseOutput, + ResponsePrepareLimits, ResponseQuery, }; use engine::LAUNCH_SAMPLE_RATES; @@ -867,136 +866,6 @@ fn query_does_not_change_seeded_state_or_an_inflight_trim_polarity_ramp() { assert_eq!(input_snapshot(&queried), input_snapshot(&twin)); } -#[test] -fn common_builtin_adapter_matches_direct_owner_for_all_launch_rates_and_sections() { - assert_eq!( - validate_response_analysis_descriptor(input_filter_response_descriptor()), - Ok(()) - ); - for rate in LAUNCH_SAMPLE_RATES.map(|rate| rate.0) { - let maximum = builtin_filter_cutoff_maximum_hz(rate).expect("launch maximum"); - let configuration = filters(100.0, 0.0, 0.0, 8_000.0); - let frequencies = probe_grid(rate, &[maximum]); - let (_, direct_left, direct_right, direct_sections_left, direct_sections_right) = - query_with_sections(rate, configuration, &frequencies, true); - let provider = prepare_input_filter_response( - rate, - configuration, - ResponsePrepareLimits { - maximum_prepared_bytes: usize::MAX, - }, - ) - .expect("builtin response provider"); - let descriptor = provider.analysis_descriptor(); - assert_eq!(descriptor, input_filter_response_descriptor()); - assert_eq!(descriptor.sections.len(), 2); - assert_eq!(descriptor.sections[0].name, "HPF"); - assert_eq!(descriptor.sections[1].name, "LPF"); - assert_eq!(descriptor.floor_db, -120.0); - assert_eq!( - descriptor.total_scope, - ResponseTotalScope::BuiltinInputFilterSubtotal - ); - assert_eq!(descriptor.bypass, ResponseBypassSemantics::NoEffectBypass); - assert_eq!(provider.configuration().sample_rate_hz, rate); - assert_eq!(provider.configuration().bypass, None); - assert_eq!(provider.configuration().enabled_left, &[true, false]); - assert_eq!(provider.configuration().enabled_right, &[false, true]); - - let mut common_left = vec![f32::NAN; frequencies.len()]; - let mut common_right = vec![f32::NAN; frequencies.len()]; - let mut common_sections_left = vec![f32::NAN; frequencies.len() * 2]; - let mut common_sections_right = vec![f32::NAN; frequencies.len() * 2]; - let summary = provider - .query_into( - ResponseQuery { - configuration_id: u64::MAX, - frequencies_hz: &frequencies, - maximum_points: frequencies.len(), - }, - ResponseOutput { - total_left_db: &mut common_left, - total_right_db: &mut common_right, - sections_left_db: Some(&mut common_sections_left), - sections_right_db: Some(&mut common_sections_right), - }, - ) - .expect("common builtin query"); - assert_eq!(summary.configuration_id, u64::MAX); - assert_eq!(summary.mode, ResponseAnalysisMode::RequestedConfiguration); - assert_eq!(summary.sample_rate_hz, rate); - assert_eq!(bits(&common_left), bits(&direct_left)); - assert_eq!(bits(&common_right), bits(&direct_right)); - assert_eq!(bits(&common_sections_left), bits(&direct_sections_left)); - assert_eq!(bits(&common_sections_right), bits(&direct_sections_right)); - - let mut total_only_left = vec![f32::NAN; frequencies.len()]; - let mut total_only_right = vec![f32::NAN; frequencies.len()]; - let total_summary = provider - .query_into( - ResponseQuery { - configuration_id: 9_007_199_254_740_993, - frequencies_hz: &frequencies, - maximum_points: frequencies.len(), - }, - ResponseOutput { - total_left_db: &mut total_only_left, - total_right_db: &mut total_only_right, - sections_left_db: None, - sections_right_db: None, - }, - ) - .expect("total-only builtin query"); - assert_eq!(total_summary.configuration_id, 9_007_199_254_740_993); - assert_eq!(bits(&total_only_left), bits(&direct_left)); - assert_eq!(bits(&total_only_right), bits(&direct_right)); - - let mut left_only_sections = vec![f32::NAN; frequencies.len() * 2]; - let mut left_only_total = vec![f32::NAN; frequencies.len()]; - let mut left_only_right = vec![f32::NAN; frequencies.len()]; - provider - .query_into( - ResponseQuery { - configuration_id: 2, - frequencies_hz: &frequencies, - maximum_points: frequencies.len(), - }, - ResponseOutput { - total_left_db: &mut left_only_total, - total_right_db: &mut left_only_right, - sections_left_db: Some(&mut left_only_sections), - sections_right_db: None, - }, - ) - .expect("left-section builtin query"); - assert_eq!(bits(&left_only_total), bits(&direct_left)); - assert_eq!(bits(&left_only_right), bits(&direct_right)); - assert_eq!(bits(&left_only_sections), bits(&direct_sections_left)); - - let mut right_only_sections = vec![f32::NAN; frequencies.len() * 2]; - let mut right_only_total = vec![f32::NAN; frequencies.len()]; - let mut right_only_left = vec![f32::NAN; frequencies.len()]; - provider - .query_into( - ResponseQuery { - configuration_id: 3, - frequencies_hz: &frequencies, - maximum_points: frequencies.len(), - }, - ResponseOutput { - total_left_db: &mut right_only_left, - total_right_db: &mut right_only_total, - sections_left_db: None, - sections_right_db: Some(&mut right_only_sections), - }, - ) - .expect("right-section builtin query"); - assert_eq!(bits(&right_only_left), bits(&direct_left)); - assert_eq!(bits(&right_only_total), bits(&direct_right)); - assert_eq!(bits(&right_only_sections), bits(&direct_sections_right)); - } -} - #[test] fn common_builtin_adapter_preserves_resource_and_refusal_contract() { let configuration = filters(100.0, 4_000.0, 1_000.0, 8_000.0); diff --git a/crates/builtins/tests/matrix.rs b/crates/builtins/tests/matrix.rs index c88b54cfb..d12b6a811 100644 --- a/crates/builtins/tests/matrix.rs +++ b/crates/builtins/tests/matrix.rs @@ -112,41 +112,6 @@ fn matrix_retarget_mid_ramp_matches_the_reference() { } } -/// T8: the ramp tracks the exact `f64` interpolation it approximates. -/// -/// The bound is derived, not chosen: `n` iterated `f32` additions each round once, so the drift is -/// at most `n * 2^-24` for coefficients of magnitude at most one -- `1.53e-5` at `n = 257`. The -/// measured worst is `1.12e-6`, a factor of 13.7 inside it. A per-sample division (the pre-D11 -/// law) would not drift at all, which is exactly why this is a bound and not an equality. -#[test] -fn matrix_ramp_tracks_the_f64_interpolation() { - const SAMPLES: u32 = 257; - let mut chain = chain_with(SAMPLES); - chain - .set_matrix_target(Matrix2x2 { - ll: -0.75, - lr: 0.0, - rl: 0.0, - rr: 1.0, - }) - .expect("target"); - let start = 1.0_f64; - let step64 = (-0.75_f64 - start) / f64::from(SAMPLES); - let mut worst = 0.0_f64; - for index in 0..SAMPLES as usize { - let applied = f64::from(step(&mut chain).ll); - let exact = if index + 1 == SAMPLES as usize { - -0.75 - } else { - start + (index + 1) as f64 * step64 - }; - worst = worst.max((applied - exact).abs()); - } - /// One half-ulp of `1.0` in `f32`. - const HALF_ULP: f64 = 5.960_464_477_539_063e-8; - assert!(worst <= f64::from(SAMPLES) * HALF_ULP, "worst={worst}"); -} - /// T8: a settled identity matrix is a per-lane pass-through, so it preserves `-0.0`. #[test] fn settled_identity_matrix_preserves_signed_zero() { @@ -181,30 +146,6 @@ fn zero_window_snaps_and_reset_cancels_a_ramp() { assert_eq!(current(&chain), target); } -#[test] -fn matrix_ramp_reaches_target() { - let mut chain = BuiltinChain::new( - 48_000, - BuiltinParameters { - smoothing_samples: 2, - ..BuiltinParameters::default() - }, - ) - .expect("prepare"); - chain - .set_matrix_target(Matrix2x2 { - ll: 0.0, - lr: 0.0, - rl: 0.0, - rr: 0.0, - }) - .expect("target"); - let mut left = [1.0, 1.0]; - let mut right = [0.0, 0.0]; - chain.process_matrix(DualMonoBlock::new(&mut left, &mut right, 0).expect("block")); - assert_eq!(left, [0.5, 0.0]); -} - /// Issue #137 D1: an explicit ramp window travels with the retarget, and becomes the lane's own. /// /// `matrix_ll/lr/rl/rr` are the only builtin parameters whose declared update rate is diff --git a/crates/builtins/tests/randomized.rs b/crates/builtins/tests/randomized.rs index 5cc8b32f3..b2d0183ed 100644 --- a/crates/builtins/tests/randomized.rs +++ b/crates/builtins/tests/randomized.rs @@ -28,9 +28,7 @@ //! lane's `-0.0` as `+0.0` while another lane's matrix ramps, where that lane's own //! `MatrixBuiltins` passes the `-0.0` through (first found at eight lanes): with any lane //! ramping, the bank runs the ramp arithmetic on every lane, and `1 * -0.0 + 0 * x` is `+0.0`. -//! The fixed-input gate beside it -//! (`stage.rs::banked_fader_and_matrix_are_bit_identical_to_the_per_track_sections`) never feeds -//! a signed zero. Until #1072 lands, the per-PR test compares the two zeros as one value on a +//! Until #1072 lands, the per-PR test compares the two zeros as one value on a //! block where a matrix ramp may be in flight; the ignored test below is the reproducer. use builtins::{ diff --git a/crates/builtins/tests/response.rs b/crates/builtins/tests/response.rs index f1e6b5b36..87164f74d 100644 --- a/crates/builtins/tests/response.rs +++ b/crates/builtins/tests/response.rs @@ -218,78 +218,6 @@ fn ten_thousand_bounded_parameter_and_block_mutations_stay_finite() { } } -#[test] -fn launch_and_extended_compatibility_rate_sweeps_match_f64_magnitude() { - for rate in launch_and_extended_compatibility_rates() { - for frequency in [100.0, 1_000.0, f64::from(rate) * 0.2] { - let frames = 4_096; - let mut left: Vec = (0..frames) - .map(|index| { - (core::f64::consts::TAU * frequency * index as f64 / f64::from(rate)).sin() - as f32 - }) - .collect(); - let mut right = vec![0.0_f32; frames]; - let parameters = BuiltinParameters { - left: ChannelParameters { - hpf_hz: 100.0, - lpf_hz: 1_000.0, - ..ChannelParameters::default() - }, - ..BuiltinParameters::default() - }; - let mut chain = BuiltinChain::new(rate, parameters).expect("prepare"); - let mut offset = 0; - for quantum in [1, 127, 128, 255, 1_024].into_iter().cycle() { - if offset == frames { - break; - } - let end = (offset + quantum).min(frames); - let _ = chain.process_input( - DualMonoBlock::new( - &mut left[offset..end], - &mut right[offset..end], - offset as u64, - ) - .expect("block"), - ); - offset = end; - } - let mut high = ReferenceBiquad::rbj_butterworth( - f64::from(rate), - 100.0, - ReferenceFilterKind::HighPass, - ) - .expect("reference high pass"); - let mut low = ReferenceBiquad::rbj_butterworth( - f64::from(rate), - 1_000.0, - ReferenceFilterKind::LowPass, - ) - .expect("reference low pass"); - let mut actual_energy = 0.0_f64; - let mut reference_energy = 0.0_f64; - for (index, actual) in left.iter().copied().enumerate() { - let input = - (core::f64::consts::TAU * frequency * index as f64 / f64::from(rate)).sin(); - let reference = low.process(high.process(input)); - if index >= frames / 2 { - actual_energy += f64::from(actual) * f64::from(actual); - reference_energy += reference * reference; - } - } - let actual_db = 10.0 * actual_energy.log10(); - let reference_db = 10.0 * reference_energy.log10(); - if reference_db >= -120.0 { - assert!( - (actual_db - reference_db).abs() <= 0.05, - "rate={rate}, frequency={frequency}, actual={actual_db}, reference={reference_db}" - ); - } - } - } -} - #[test] fn cast_tpt_state_space_matches_independent_rbj_transfer_at_compatibility_rates() { for rate in launch_and_extended_compatibility_rates() { diff --git a/crates/builtins/tests/stage.rs b/crates/builtins/tests/stage.rs index 84c4109be..bc67aac7b 100644 --- a/crates/builtins/tests/stage.rs +++ b/crates/builtins/tests/stage.rs @@ -857,312 +857,6 @@ fn identity_sections_are_elided_only_when_every_lane_and_word_says_so() { } } -/// One live command in the automation script the banked-identity gates replay. -/// -/// A script entry names the lane it addresses, so the same script drives the bank (by lane) and -/// the per-track sections (one section per lane) without either side reordering it. -#[derive(Clone, Copy, Debug)] -enum Command { - FaderDb { - lane: usize, - channels: BuiltinLaneSelector, - db: f32, - smoothing_samples: u32, - }, - Mute { - lane: usize, - channels: BuiltinLaneSelector, - muted: bool, - smoothing_samples: u32, - }, - Pan { - lane: usize, - matrix: Matrix2x2, - smoothing_samples: u32, - }, -} - -/// A deterministic automation script: `(block index, command)`, ramps deliberately overlapping. -/// -/// The windows are chosen against the partitions below so that ramps are **in flight across block -/// boundaries** at every partition, and so that lanes settle at different frames inside one block: -/// that is the case a banked ramp could get wrong and a per-track one cannot, because it is the -/// only case where one lane's countdown reaching zero must not disturb its neighbours'. -fn automation_script(members: usize) -> Vec<(usize, Command)> { - let mut script = Vec::new(); - let channels = [ - BuiltinLaneSelector::Both, - BuiltinLaneSelector::Left, - BuiltinLaneSelector::Right, - ]; - for lane in 0..members { - // Windows that are not multiples of any partition, so a ramp never settles on a boundary - // for every partition at once. - script.push(( - 0, - Command::FaderDb { - lane, - channels: channels[lane % 3], - db: -6.0 - lane as f32, - smoothing_samples: 37 + lane as u32 * 53, - }, - )); - script.push(( - 1, - Command::Pan { - lane, - matrix: pan_matrix(-0.5 + lane as f32 * 0.1, 0.5 - lane as f32 * 0.1) - .expect("in-domain pan"), - smoothing_samples: 91 + lane as u32 * 29, - }, - )); - // A retarget *while the first ramp is still running*: the step is recomputed from the - // gain in flight, so a bank that shared one countdown across lanes would diverge here. - script.push(( - 2, - Command::FaderDb { - lane, - channels: channels[(lane + 1) % 3], - db: 3.0 - lane as f32 * 0.5, - smoothing_samples: 71 + lane as u32 * 17, - }, - )); - script.push(( - 3, - Command::Mute { - lane, - channels: channels[(lane + 2) % 3], - muted: lane % 2 == 0, - smoothing_samples: 23 + lane as u32 * 41, - }, - )); - // Unmute back to the remembered fader gain, overlapping the mute ramp on odd lanes. - script.push(( - 5, - Command::Mute { - lane, - channels: channels[(lane + 2) % 3], - muted: false, - smoothing_samples: 13 + lane as u32 * 7, - }, - )); - // A zero-window snap: the D11 branch that assigns instead of ramping. - script.push(( - 7, - Command::Pan { - lane, - matrix: pan_matrix(0.25, -0.25).expect("in-domain pan"), - smoothing_samples: 0, - }, - )); - } - script -} - -/// Renders one automation script through the banked fader and matrix, in AoSoA order. -/// -/// Returns the planar per-lane output, so it can be compared word for word against the per-track -/// sections that the graph binds today. -fn render_banked( - backend: Backend, - width: BankWidth, - members: usize, - blocks: usize, - frames: usize, - planar: &[Vec], -) -> Vec> { - let lanes = width.lanes() as usize; - let mut fader = - BuiltinFaderBank::new(backend, width, (0..members).map(parameters_for).collect()) - .expect("fader bank"); - let mut matrix = BuiltinMatrixBank::new( - backend, - width, - (0..members) - .map(|index| { - let parameters = parameters_for(index); - (parameters.matrix, parameters.smoothing_samples) - }) - .collect(), - ) - .expect("matrix bank"); - assert_eq!(fader.active_lanes(), members); - assert_eq!(matrix.active_lanes(), members); - - let script = automation_script(members); - let mut output: Vec> = vec![Vec::with_capacity(blocks * frames * 2); members]; - let mut left = vec![0.0_f32; frames * lanes]; - let mut right = vec![0.0_f32; frames * lanes]; - // The bit patterns a padding lane must not be able to leak out of, refreshed every block. - const POISON: [u32; 4] = [0x7FC0_0000, 0x7F80_0000, 0x8000_0000, 0x0000_0001]; - for block in 0..blocks { - for (at, command) in &script { - if *at != block { - continue; - } - match *command { - Command::FaderDb { - lane, - channels, - db, - smoothing_samples, - } => fader - .set_fader_db(lane, channels, db, smoothing_samples) - .expect("in-domain fader move"), - Command::Mute { - lane, - channels, - muted, - smoothing_samples, - } => fader - .set_mute(lane, channels, muted, smoothing_samples) - .expect("member lane"), - Command::Pan { - lane, - matrix: target, - smoothing_samples, - } => matrix - .set_target_smoothed(lane, target, smoothing_samples) - .expect("in-domain pan"), - } - } - for frame in 0..frames { - let sample = block * frames + frame; - for lane in 0..lanes { - let (l, r) = if lane < members { - (planar[lane][sample], planar[lane][blocks * frames + sample]) - } else { - let poison = f32::from_bits(POISON[(sample + lane) % POISON.len()]); - (poison, poison) - }; - left[frame * lanes + lane] = l; - right[frame * lanes + lane] = r; - } - } - fader.process(&mut left, &mut right, frames as u32); - matrix.process(&mut left, &mut right, frames as u32); - for (lane, out) in output.iter_mut().enumerate() { - for frame in 0..frames { - out.push(left[frame * lanes + lane]); - } - for frame in 0..frames { - out.push(right[frame * lanes + lane]); - } - } - } - output -} - -/// Renders the same script through the per-track sections the graph binds today, one per lane. -fn render_per_track( - members: usize, - blocks: usize, - frames: usize, - planar: &[Vec], -) -> Vec> { - let script = automation_script(members); - let mut faders: Vec = (0..members) - .map(|index| FaderMuteRampBuiltins::new(parameters_for(index)).expect("fader")) - .collect(); - let mut matrices: Vec = (0..members) - .map(|index| { - let (_, _, matrix) = BuiltinChain::new(48_000, parameters_for(index)) - .expect("chain") - .into_sections(); - matrix - }) - .collect(); - let mut output: Vec> = vec![Vec::with_capacity(blocks * frames * 2); members]; - for block in 0..blocks { - for (at, command) in &script { - if *at != block { - continue; - } - match *command { - Command::FaderDb { - lane, - channels, - db, - smoothing_samples, - } => faders[lane] - .set_fader_db(channels, db, smoothing_samples) - .expect("in-domain fader move"), - Command::Mute { - lane, - channels, - muted, - smoothing_samples, - } => faders[lane].set_mute(channels, muted, smoothing_samples), - Command::Pan { - lane, - matrix: target, - smoothing_samples, - } => matrices[lane] - .set_target_smoothed(target, smoothing_samples) - .expect("in-domain pan"), - } - } - for lane in 0..members { - let start = block * frames; - let mut left = planar[lane][start..start + frames].to_vec(); - let mut right = - planar[lane][blocks * frames + start..blocks * frames + start + frames].to_vec(); - faders[lane].process(DualMonoBlock::new(&mut left, &mut right, 0).expect("block")); - matrices[lane].process(DualMonoBlock::new(&mut left, &mut right, 0).expect("block")); - output[lane].extend_from_slice(&left); - output[lane].extend_from_slice(&right); - } - } - output -} - -/// The Class-A claim of the banked strip: a banked fader and matrix render the exact bits the -/// per-track sections render, under live automation, at every width and every member count. -/// -/// This is the identity the whole job rests on, and it is stated over the case that can break it -/// and nothing else: ramps in flight across block boundaries, retargets landing mid-ramp, mutes -/// and unmutes overlapping, per-lane windows that settle at different frames inside one block, -/// and padding lanes pre-filled with NaN, infinity, `-0.0` and a subnormal. -/// -/// Red-mutation proven: sharing one countdown across the bank -- replacing the per-lane -/// `remaining` maximum in `FaderRampStage::process_plane` with lane 0's count -- fails on lane 1 -/// of the first ragged case. -#[test] -fn banked_fader_and_matrix_are_bit_identical_to_the_per_track_sections() { - const BLOCKS: usize = 9; - for (backend, width) in banks() { - let lanes = width.lanes() as usize; - for members in [1, lanes - 1, lanes] { - // Partitions chosen against the script's windows so a ramp is always mid-flight at a - // boundary: 1 is the pathological case, 128 is the master-plan quantum. - for frames in [1, 7, 64, 128] { - let mut rng = Rng(0x5A17_0BED ^ members as u64 ^ (frames as u64) << 8); - let planar: Vec> = (0..members) - .map(|_| { - (0..BLOCKS * frames * 2) - .map(|_| rng.next_sample()) - .collect() - }) - .collect(); - let banked = render_banked(backend, width, members, BLOCKS, frames, &planar); - let per_track = render_per_track(members, BLOCKS, frames, &planar); - for lane in 0..members { - for (index, (bank, track)) in - banked[lane].iter().zip(per_track[lane].iter()).enumerate() - { - assert_eq!( - bank.to_bits(), - track.to_bits(), - "width={lanes}, members={members}, frames={frames}, lane={lane}, \ - sample={index}: banked {bank:?} vs per-track {track:?}" - ); - } - } - } - } - } -} - /// A settled mute is exactly `+0.0` in the bank, for a negative input too, and a settled lane's /// gain is one multiply -- the two properties banking must not quietly trade away. /// diff --git a/crates/engine/src/realtime/mod.rs b/crates/engine/src/realtime/mod.rs index 51fac52f7..d641a3603 100644 --- a/crates/engine/src/realtime/mod.rs +++ b/crates/engine/src/realtime/mod.rs @@ -358,53 +358,6 @@ mod tests { ); } - #[test] - fn native_spsc_preserves_value_on_full_and_fifo_wrap() { - let (mut producer, mut consumer) = - bounded_spsc::(NonZeroUsize::new(2).expect("two"), QueueGeneration(9)) - .expect("queue"); - producer.try_push(1).expect("one"); - producer.try_push(2).expect("two"); - assert!(matches!( - producer.try_push(3), - Err(QueueFull { - value: 3, - generation: QueueGeneration(9), - .. - }) - )); - assert_eq!(consumer.try_pop().expect("first"), 1); - producer.try_push(3).expect("wrap"); - assert_eq!(consumer.try_pop().expect("second"), 2); - assert_eq!(consumer.try_pop().expect("third"), 3); - assert!(matches!( - consumer.try_pop(), - Err(QueueEmpty { - generation: QueueGeneration(9), - empty_count: 1, - }) - )); - assert_eq!(producer.capacity(), 2); - assert_eq!(producer.success_count(), 3); - assert_eq!(producer.full_count(), 1); - assert_eq!(consumer.success_count(), 3); - } - - #[test] - fn move_only_spsc_preserves_full_value_and_transfers_to_consumer() { - #[derive(Debug)] - struct MoveOnly(u32); - let (mut producer, mut consumer) = - bounded_spsc_move::(NonZeroUsize::new(1).expect("one"), QueueGeneration(10)) - .expect("queue"); - producer.try_push(MoveOnly(7)).expect("first transfer"); - let full = producer - .try_push(MoveOnly(9)) - .expect_err("full queue returns move-only item"); - assert_eq!(full.value.0, 9); - assert_eq!(consumer.try_pop().expect("single consumer transfer").0, 7); - } - fn prepared(id: u64) -> PreparedRenderPlan { PreparedRenderPlan::prepare(PrepareRenderPlan { plan_id: id, diff --git a/crates/graph-compiler/src/lib.rs b/crates/graph-compiler/src/lib.rs index 3460cd9f0..ade54cdfb 100644 --- a/crates/graph-compiler/src/lib.rs +++ b/crates/graph-compiler/src/lib.rs @@ -1138,63 +1138,6 @@ mod tests { (console, inserts) } - /// Compile one accepted model twice: once against the real registry (banks where it can) and - /// once against a registry whose only difference is that `bind_homogeneous_bank` returns - /// `Ok(None)` (`ScalarOnlyDelegateFactory`), which forces every instance onto the per-node - /// path. Same session, same dispatch, same parameters -- the *only* variable is whether the - /// arithmetic is done a lane at a time or `width` lanes at a time. - fn compile_bank_and_per_node( - model: &session::SessionModel, - effect_id: &str, - plan_id: u64, - ) -> (PreparedGraphBuiltinsArtifact, PreparedGraphBuiltinsArtifact) { - let session = compile_session( - model, - CompileCaps { - max_compiled_model_bytes: u64::MAX, - max_requested_runtime_bytes: u64::MAX, - max_single_allocation_bytes: u64::MAX, - max_queue_items: u64::MAX, - max_source_ring_frames: u64::MAX, - max_source_ring_bytes: u64::MAX, - }, - ) - .expect("accepted fixture"); - let registry = launch_native_effect_registry().expect("launch registry"); - let scalar_registry = NativeEffectRegistry::new([Box::new(ScalarOnlyDelegateFactory { - delegate: registry - .get_shared_ascii(effect_id) - .expect("registered launch effect"), - }) - as Box]) - .expect("per-node registry"); - let effect_caps = EffectCompileCaps { - maximum_total_state_bytes: 1 << 20, - maximum_scratch_bytes: 1 << 20, - maximum_automation_spans_per_block: 32, - }; - let bank_effects = prepare_native_session_effects(&session, registry, effect_caps) - .expect("prepared bank-capable effects"); - let per_node_effects = - prepare_native_session_effects(&session, &scalar_registry, effect_caps) - .expect("prepared per-node effects"); - let bank = compile_with_session_builtins(SessionBuiltinsCompile { - dispatch: host_dispatch(), - plan_id, - effects: bank_effects, - caps: integration_caps(), - }) - .unwrap_or_else(|failure| panic!("bank graph: {:?}", failure.diagnostics)); - let per_node = compile_with_session_builtins(SessionBuiltinsCompile { - dispatch: host_dispatch(), - plan_id: plan_id + 1, - effects: per_node_effects, - caps: integration_caps(), - }) - .unwrap_or_else(|failure| panic!("per-node graph: {:?}", failure.diagnostics)); - (bank, per_node) - } - /// Compile one accepted model against the real launch registry. fn compile_bank_only( model: &session::SessionModel, @@ -2782,26 +2725,6 @@ mod tests { assert_eq!((repeat.1, repeat.2), (2, true)); } - #[test] - fn direct_graph_report_exposes_zero_output_latency_and_tail_without_identity_change() { - let first = compile_fixture(700); - let second = compile_fixture(701); - assert_eq!(first.report().output_latency, LatencySamples(0)); - assert_eq!(first.report().output_tail, TailSamples::Finite(0)); - assert_eq!( - GraphCompiler::evidence(first.graph(), first.report()).canonical_bytes, - GraphCompiler::evidence(second.graph(), second.report()).canonical_bytes - ); - assert_eq!( - GraphCompiler::sha256(first.graph(), first.report()), - GraphCompiler::sha256(second.graph(), second.report()) - ); - assert_eq!( - GraphCompiler::evidence(first.graph(), first.report()).dot, - GraphCompiler::evidence(second.graph(), second.report()).dot - ); - } - /// #99 F6: dispatch is an input, so the scalar path is reachable on any host and the /// semantic graph does not move when it is taken. /// @@ -6918,94 +6841,6 @@ mod tests { } } - /// Phase 1b: a native effect carrying the homogeneous-bank kernel contract banks in the - /// **dynamic** rack, and every rendered sample is bit-identical to the per-node path. - /// - /// Before this, `rack_location` mapped `RackId::Dynamic` to `None`, so this exact session -- - /// ten identical sidechain-free compressors -- produced zero banks and ran scalar at width 1. - /// Nothing about the compressor changed to make it bankable; only the candidacy gate did. - /// - /// The bar is class A. Banking changes lane *grouping*, not per-lane arithmetic: - /// `PreparedCompressorBank` runs the same coefficient and detector update per lane that the - /// scalar instance runs, so a single differing bit would be a defect in the bank kernel or in - /// the gather/scatter, never something to re-pin around. This renders sixteen blocks so the - /// comparison covers live compressed audio with retained detector state, including the first - /// causal block rather than a latency pad of zeros. - #[test] - fn dynamic_rack_compressors_bank_and_render_bit_identically_to_the_per_node_path() { - let model = accepted_dynamic_rack_compressor_fixture(); - assert_eq!(model.tracks.len(), 10); - assert!(model.console.slots().next().is_none()); - assert!( - model - .tracks - .iter() - .all(|track| { track.console.is_empty() && track.inserts.effects.len() == 1 }) - ); - let (bank, per_node) = compile_bank_and_per_node(&model, "miso.compressor", 1_610); - - // Structure: the dynamic rack is now a bank location, and it fills exactly as SIMD-1 does. - // Nine tracks are bankable (`eq8` carries a routed sidechain); the tenth is the tail. - let width = BankWidth::for_backend(bank.report().rack_cohorts.dispatch); - if let Some(width) = width { - let lanes = width.lanes() as usize; - let cohorts = &bank.report().rack_cohorts; - assert_eq!(bank.graph().prepared_bank_count(), 9 / lanes); - assert_eq!( - cohorts.bound_groups_in(RackLocation::Dynamic).count(), - 9 / lanes, - "the dynamic rack binds full cohorts" - ); - assert_eq!( - cohorts.groups_in(RackLocation::Simd1).count(), - 0, - "no compressor is left in SIMD-1" - ); - let scalar = cohorts.scalar_in(RackLocation::Dynamic); - assert_eq!(scalar.len(), 1 + 9 % lanes); - assert!( - scalar.iter().any(|id| id.track_id.as_str() == "eq8"), - "a routed sidechain still blocks banking in the dynamic rack (#96 F9)" - ); - assert!(scalar.iter().all(|id| id.rack == RackId::Dynamic)); - } else { - assert_eq!(bank.graph().prepared_bank_count(), 0); - } - assert_eq!(per_node.graph().prepared_bank_count(), 0); - assert!(per_node.report().rack_cohorts.bound_slots.is_empty()); - assert_eq!( - per_node.report().rack_cohorts.plan.groups, - bank.report().rack_cohorts.plan.groups, - "cohort planning is independent of the factory's legal scalar fallback" - ); - - // Banking is an execution-layer decision: it must not move the graph. - assert_eq!( - bank.graph().sequential_schedule, - per_node.graph().sequential_schedule - ); - assert_eq!(bank.graph().route_timings, per_node.graph().route_timings); - assert_eq!( - bank.graph().inserted_delays, - per_node.graph().inserted_delays - ); - - let banked = render_blocks(bank, 16); - let scalar = render_blocks(per_node, 16); - assert_pcm_bits_equal(&banked, &scalar, "dynamic-rack compressor bank vs per node"); - assert!( - banked.iter().flatten().any(|sample| *sample != 0.0), - "sixteen blocks must retain non-silent causal compressor output" - ); - assert!( - banked[15] - .iter() - .zip(&banked[14]) - .any(|(a, b)| a.to_bits() != b.to_bits()), - "the bank must carry detector state across blocks, not restart each one" - ); - } - /// Rack placement decides where an effect sits in the signal chain, and since decision 12 /// whether its remainder banks. It must never decide what the arithmetic produces. /// @@ -7335,198 +7170,6 @@ mod tests { right: -0.015625 * (index % 5 + 1) as f32, }) } - /// The measured session: the 64-track console fixture the benchmark renders. - /// - /// Every track places `miso.parametric-eq` in SIMD-1 and `miso.compressor` in the **dynamic** - /// rack, sidechain-free. Before phase 1b this compiled to 64/lanes EQ banks and *64 scalar - /// compressors* -- the compressor ran a lane at a time purely because of its placement, which - /// the profile measured as the majority of the block. It now compiles to the same number of - /// compressor banks as EQ banks, with nothing left on the per-node path. - /// - /// The three things this pins, in the order they matter: - /// - /// 1. **Bits.** Rendered PCM is byte-identical to the same session compiled against a registry - /// that refuses every bank. Class A: banking regrouped the lanes, it did not change the - /// arithmetic. - /// 2. **Structure.** Both racks bank fully; `scalar_in` is empty in both. - /// 3. **G5** (master plan §4.5). One planar/AoSoA round-trip per bank per block, still exact - /// with the extra banks present. The pin is derived from the realised bank count, not a - /// literal, so the extra dynamic banks scale both sides of it -- there is no re-pin here. - #[test] - fn console_sixty_four_track_fixture_banks_its_dynamic_compressor_bit_identically() { - // The causal compressor has no latency pad; the first block is already live audio. - const BLOCKS: u64 = 12; - let model = parse_session_json(CONSOLE_SIXTY_FOUR_TRACK_FIXTURE).expect("console fixture"); - assert_eq!(model.tracks.len(), 64); - // Decision 12: the EQ is the `pre_insert` console slot (SIMD-1) and the compressor every - // track's insert (the dynamic rack), this fixture being the console-versus-insert - // placement witness. - assert_eq!(model.console.pre_insert.len(), 1); - assert!(model.console.post_insert.is_empty()); - assert!(model.tracks.iter().all(|track| { - track.console.len() == 1 - && track.inserts.effects.len() == 1 - && matches!( - track.inserts.effects[0].sidechain, - SidechainDeclaration::None - ) - })); - let session = compile_session( - &model, - CompileCaps { - max_compiled_model_bytes: u64::MAX, - max_requested_runtime_bytes: u64::MAX, - max_single_allocation_bytes: u64::MAX, - max_queue_items: u64::MAX, - max_source_ring_frames: u64::MAX, - max_source_ring_bytes: u64::MAX, - }, - ) - .expect("compiled console fixture"); - let registry = launch_native_effect_registry().expect("launch registry"); - let effect_caps = EffectCompileCaps { - maximum_total_state_bytes: 1 << 20, - maximum_scratch_bytes: 1 << 20, - maximum_automation_spans_per_block: 32, - }; - let bank = compile_with_session_builtins(SessionBuiltinsCompile { - dispatch: host_dispatch(), - plan_id: 1_650, - effects: prepare_native_session_effects(&session, registry, effect_caps) - .expect("prepared console effects"), - caps: integration_caps(), - }) - .unwrap_or_else(|failure| panic!("console graph: {:?}", failure.diagnostics)); - // #1098: the EQ is a console slot, which never renders per node on a vector backend. The - // per-node arm is the same chain with the EQ folded into every track's inserts, on the - // same backend; the graph it must not move is the `Scalar` oracle's, which compiles the - // session as written. - let per_node = - per_node_inserts_artifact(&model, &["miso.parametric-eq", "miso.compressor"], 1_651); - let scalar_graph = compile_with_session_builtins(SessionBuiltinsCompile { - dispatch: Backend::Scalar, - plan_id: 1_652, - effects: prepare_native_session_effects(&session, registry, effect_caps) - .expect("prepared Scalar console effects"), - caps: integration_caps(), - }) - .unwrap_or_else(|failure| panic!("Scalar console graph: {:?}", failure.diagnostics)); - - let width = BankWidth::for_backend(bank.report().rack_cohorts.dispatch); - let Some(width) = width else { - assert_eq!(bank.graph().prepared_bank_count(), 0); - return; - }; - let lanes = width.lanes() as usize; - assert_eq!(64 % lanes, 0, "the fixture is a whole number of cohorts"); - let cohorts = &bank.report().rack_cohorts; - assert_eq!( - cohorts.bound_slots_in(RackLocation::Simd1).count(), - 64 / lanes, - "the EQ banked before phase 1b and still does" - ); - assert_eq!( - cohorts.bound_slots_in(RackLocation::Dynamic).count(), - 64 / lanes, - "and the dynamic-rack compressor now banks at the same width" - ); - assert!(cohorts.scalar_in(RackLocation::Simd1).is_empty()); - assert!( - cohorts.scalar_in(RackLocation::Dynamic).is_empty(), - "no compressor is left on the per-node path" - ); - assert_eq!(bank.graph().prepared_bank_count(), 2 * (64 / lanes)); - assert_eq!(per_node.graph().prepared_bank_count(), 0); - assert_eq!( - bank.graph().sequential_schedule, - scalar_graph.graph().sequential_schedule, - "banking is an execution decision and must not move the graph" - ); - assert_eq!( - bank.report().output_latency, - scalar_graph.report().output_latency - ); - assert_eq!( - bank.report().output_latency, - per_node.report().output_latency - ); - - let bank_count = bank.graph().prepared_bank_count(); - let builtin_bank_count = bank.graph().prepared_builtin_bank_count(); - let bound_slots = (bank_count + builtin_bank_count) as u64; - // G5 derivation, issue #202 rec 2. Each cohort binds five slots, in cascade order: the - // post-input builtins, `64 / lanes` EQ slots on `simd1`, `64 / lanes` compressor slots in - // `dynamic`, the fader and the matrix. Lane `i` of the compressor bank reads lane `i` of - // the EQ bank through the elided `PostSimd1` boundary, undelayed, unmixed, with no second - // reader and no observer, and each builtin slot is the sole reader of the slot before it, - // so every cohort fuses into one chain: - // - // chains = bound slots - four merges per cohort = 5 * (64 / lanes) - 4 * (64 / lanes) - // - // #964 re-pin: compiled without builtins this fixture bound the EQ and compressor slots - // alone, one merge per cohort, `2 * (64 / lanes) - 64 / lanes` chains. The claim is the - // same -- the cross-rack pair fuses -- and the builtin slots on either side of it now - // fuse into the same chain. Before rec 2 the merge was never proposed, because the cohort - // planner pools per `RackLocation` and these two slots sit in different racks. - let cohorts = 64 / lanes; - assert_eq!( - builtin_bank_count, - BANKABLE_TRACK_STAGES as usize * cohorts, - "post-input, fader and matrix bank once per cohort" - ); - assert_eq!( - per_node.graph().prepared_builtin_bank_count(), - builtin_bank_count, - "refusing the effect banks leaves the builtin banks alone" - ); - let expected_chains = bound_slots - 4 * cohorts as u64; - let banked = render_console_blocks(bank, BLOCKS); - let scalar = render_console_blocks(per_node, BLOCKS); - assert_pcm_bits_equal(&banked.0, &scalar.0, "64-track console: banked vs per node"); - assert!( - banked.0.iter().flatten().any(|sample| *sample != 0.0), - "the console fixture rendered audio" - ); - assert_eq!( - banked.3, bound_slots, - "every bound bank is a slot of exactly one realised chain" - ); - assert_eq!( - banked.2, expected_chains, - "the EQ and the dynamic compressor fuse into one chain per cohort" - ); - // G5: one planar/AoSoA round-trip per bank *chain* per block. - assert_eq!( - banked.1, - BLOCKS * expected_chains, - "one planar/AoSoA round-trip per chain per block" - ); - assert!( - banked.2 < banked.3, - "a cross-rack cohort must realise fewer chains than slots" - ); - // #964 re-pin: without builtins the per-node arm bound no bank and transposed nothing. With - // them it binds only its builtin slots, and the per-node EQ and compressor between them - // split each cohort's strip into two chains, `[post-input]` and `[fader, matrix]`. - assert_eq!( - (scalar.3, scalar.2), - (builtin_bank_count as u64, 2 * cohorts as u64), - "the per-node arm binds only its builtin slots, as two chains per cohort" - ); - assert_eq!( - scalar.1, - BLOCKS * scalar.2, - "the per-node arm transposes only its builtin chains" - ); - // Descriptive, printed under `--nocapture`: what phase 1b actually buys on the measured - // session, and what the composed benchmark should expect to see. - println!( - "console 64-track @ {lanes} lanes: {} effect banks ({} EQ + {} compressor) \ - + {} builtin banks; {} scalar effect nodes; {} slots -> {} chains; {} transposes \ - over {BLOCKS} blocks", - bank_count, cohorts, cohorts, builtin_bank_count, 0, banked.3, banked.2, banked.1, - ); - } /// Issue #175: the intended production layout's chain structure and its G5 transpose count. /// diff --git a/crates/graph-compiler/tests/MUTATIONS.md b/crates/graph-compiler/tests/MUTATIONS.md index 0d2409dfa..3159e701a 100644 --- a/crates/graph-compiler/tests/MUTATIONS.md +++ b/crates/graph-compiler/tests/MUTATIONS.md @@ -244,7 +244,7 @@ fixture strengthening #964 added. Both controls stay green, which is why the str | # | ported test (what it must still catch) | mutation | file | command | result | |---|---|---|---|---|---| -| 964-1 | `direct_graph_report_exposes_zero_output_latency_and_tail_without_identity_change` (a filter-free input section keeps the output tail finite) | `BuiltinTail::FiniteZero => TailSamples::Infinite` in `compile_with_builtins` | `graph-compiler/src/compile.rs` | `cargo test -p graph-compiler --lib direct_graph_report_exposes_zero_output_latency` | RED — `left: Infinite`, `right: Finite(0)` | +| 964-1 | `direct_graph_report_exposes_zero_output_latency_and_tail_without_identity_change` (deleted by TA4; KEEP catcher graph `program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers`) (a filter-free input section keeps the output tail finite) | `BuiltinTail::FiniteZero => TailSamples::Infinite` in `compile_with_builtins` | `graph-compiler/src/compile.rs` | `cargo test -p graph-compiler --lib direct_graph_report_exposes_zero_output_latency` | RED — `left: Infinite`, `right: Finite(0)` | | 964-2 | `issue122_reverse_route_ids_emit_sorted_levels_and_bind` (SHA `14d73…` pins the with-builtins plan) | as 964-1 | as 964-1 | `... --lib issue122` | RED — `sorted production identity: "canonical identity"` | | 964-3 | `the_zero_delay_plan_digest_is_the_current_semantic_plan` (the re-pinned digest covers the builtin tails) | `BuiltinTail::Infinite => TailSamples::Finite(0)` | as 964-1 | `cargo test -p graph-compiler --test track_delay` | RED — the digest falls back to exactly the builtins-less `eb3ca776…cb18e0ea10`, against the pinned `957e97ca…ce7640e42`: the eighteen tail tokens are the whole difference | | 964-4 | `scalar_dispatch_compiles_without_banks_on_any_host` (the scalar dispatch forms no bank, builtin banks included) | attach the builtin banks at `Backend::current()` instead of the request's dispatch | as 964-1 (`into_graph_artifact_with_banks` call) | `... --lib scalar_dispatch` | RED — `plain.prepared_builtin_bank_count()`, `6` vs `0`. The assertion is new in #964; the effect-bank count the test already had stays green here | @@ -252,8 +252,8 @@ fixture strengthening #964 added. Both controls stay green, which is why the str | 964-6 | `effect_control_resource_uses_independent_queue_and_owner_arithmetic` (owner deltas on the report and the whole-plan estimate) | charge half the target-staging bytes | `graph-compiler/src/estimate.rs` | `... --lib effect_control_resource_uses` | RED — `bank-one-target: report graph owner delta`, 344,952 vs 459,640 | | 964-7 | `accepted_session_compiles_binds_and_renders_direct_route` (the host binds exactly the input and the output) | a builtin bank member counts as an external node (`\|\| bank_nodes.contains(node)` for `&& !bank_nodes.contains(node)`) | `builtins-compiler/src/lib.rs` (`external_binding_nodes`) | `... --lib accepted_session_compiles` | RED — the external set lists `PostInputBuiltins`, `PostFader` and `PostMatrix` | | 964-8 | `route_transform_bits_participate_in_semantic_hash` | the canonical `route-transform` row writes `1.0` for the gain | `graph-compiler/src/canonical.rs` | `... --lib route_transform_bits_participate` | RED — both plans hash to `0b8ee1b2…`. **Control:** the same mutation with the changed model left on the fixture's own input filters stays GREEN: their infinite tails alone make the two hashes differ | -| 964-9 | `dynamic_rack_compressors_bank_and_render_bit_identically_to_the_per_node_path` (bank against per node, lane by lane) | the per-node effect exchanges its two output planes after processing | `graph/src/runtime.rs` (`NodeKind::Effect`) | `... --lib dynamic_rack_compressors_bank_and_render` | RED — block 0 differs, `1068755679` vs `3201302908`. **Control:** the same mutation with `accepted_compressor_graph_fixture` on the fixture's own `pan: {left: 1, right: 1}` stays GREEN: both lanes are panned hard right and sum into one output, so a crossed lane renders the same bits | -| 964-10 | `add_a_track_keeps_existing_track_bits_and_one_transpose_per_chain`, `console_sixty_four_track_fixture_banks_its_dynamic_compressor_bit_identically` (the chain re-pins) | the runtime never merges two bank units into one chain (`&& false` on `chains_into`) | `graph/src/runtime.rs` (`cohort_runs`) | `... --lib add_a_track`; `... --lib console_sixty_four_track_fixture` | RED — `8 tracks: [post-input, EQ] and [fader, matrix] per cohort`, 4 vs 2; `the EQ and the dynamic compressor fuse into one chain per cohort`, 40 vs 8. The pin add-a-track replaced, `chains == slots`, holds under this mutation (4 == 4) | +| 964-9 | `dynamic_rack_compressors_bank_and_render_bit_identically_to_the_per_node_path` (deleted by TA4; KEEP catcher graph `runtime::tests::a_host_plane_reduction_is_the_arena_reduction_bit_for_bit`) (bank against per node, lane by lane) | the per-node effect exchanges its two output planes after processing | `graph/src/runtime.rs` (`NodeKind::Effect`) | `... --lib dynamic_rack_compressors_bank_and_render` | RED — block 0 differs, `1068755679` vs `3201302908`. **Control:** the same mutation with `accepted_compressor_graph_fixture` on the fixture's own `pan: {left: 1, right: 1}` stays GREEN: both lanes are panned hard right and sum into one output, so a crossed lane renders the same bits | +| 964-10 | `add_a_track_keeps_existing_track_bits_and_one_transpose_per_chain`, `console_sixty_four_track_fixture_banks_its_dynamic_compressor_bit_identically` (deleted by TA4; KEEP catcher graph-compiler `tests::add_a_track_keeps_existing_track_bits_and_one_transpose_per_chain`) (the chain re-pins) | the runtime never merges two bank units into one chain (`&& false` on `chains_into`) | `graph/src/runtime.rs` (`cohort_runs`) | `... --lib add_a_track`; `... --lib console_sixty_four_track_fixture` | RED — `8 tracks: [post-input, EQ] and [fader, matrix] per cohort`, 4 vs 2; `the EQ and the dynamic compressor fuse into one chain per cohort`, 40 vs 8. The pin add-a-track replaced, `chains == slots`, holds under this mutation (4 == 4) | | 964-11 | `compiles_65_537_tracks_or_rejects_only_a_configured_resource` (only a configured cap can refuse the session) | a compiled track ceiling: `graph.track.limit` above 65,536 tracks | as 964-1 | `cargo test -p graph-compiler --test scale compiles_65_537` | RED — the constrained compile's diagnostics are no longer all `graph.resource.limit` | ### Attempt 2 (after Sol's attempt-1 verdict) @@ -269,9 +269,9 @@ tests while the builtins-less originals went RED. The five now read `graph_resou | 964-12 (Sol's M-b) | the limiter, multiband, soft-clip, transient-shaper and delay `launch_*` tests (the one-byte-below cap sits exactly one byte below the figure the compile caps) | the bank-slot reservation is left out of the capped estimate only (`capped_estimate.checked_add_bank_slot_owners(Default::default())`) | `graph-compiler/src/compile.rs` | `cargo test -p graph-compiler --lib launch_` | RED, all five: `one-byte-below {limiter,multiband,soft-clip,transient} graph cap must reject before publication`, `one-byte-below delay graph cap must reject`. Attempt 1's versions stayed GREEN under the same mutation (Sol) | | 964-13 | the limiter, multiband, soft-clip and transient-shaper `launch_*` tests (the bank-against-scalar deltas they pin on the report hold on the whole-plan estimate: `assert_builtin_attachment_matches`) | the builtin attachment charges the effect banks' metadata to `incremental_plan_bytes` a second time (in `PreparedGraphPlan::with_builtin_banks`) | `graph/src/lib.rs` | `cargo test -p graph-compiler --lib launch_` | RED, all four: `the builtin attachment adds the same bytes to both arms`, e.g. multiband `64802` against `64042` | | 964-3 (recheck) | `track_delay::the_zero_delay_plan_digest_is_the_current_semantic_plan`, now at `Backend::current()` | as 964-3 | as 964-3 | `cargo test -p graph-compiler --test track_delay` | RED, the digest falls back to `eb3ca776…` | -| 964-1 (#1329 recheck) | `direct_graph_report_exposes_zero_output_latency_and_tail_without_identity_change` | #1329 deleted `BuiltinTail`: `compile_with_builtins` takes the prepared `TailSamples` directly, so 964-1's mapping is gone. Equivalent mutation: every builtin tail read as `TailSamples::Infinite` | `graph-compiler/src/compile.rs` | `cargo test -p graph-compiler --lib direct_graph_report_exposes_zero_output_latency` | RED -- `left: Infinite`, `right: Finite(0)` (on `11f59fa42`) | +| 964-1 (#1329 recheck) | `direct_graph_report_exposes_zero_output_latency_and_tail_without_identity_change` (deleted by TA4; KEEP catcher graph `program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers`) | #1329 deleted `BuiltinTail`: `compile_with_builtins` takes the prepared `TailSamples` directly, so 964-1's mapping is gone. Equivalent mutation: every builtin tail read as `TailSamples::Infinite` | `graph-compiler/src/compile.rs` | `cargo test -p graph-compiler --lib direct_graph_report_exposes_zero_output_latency` | RED -- `left: Infinite`, `right: Finite(0)` (on `11f59fa42`) | | 964-3 (#1329 recheck) | `track_delay::the_zero_delay_plan_digest_is_the_current_semantic_plan`, re-pinned by #1329 to `60cae21e…fc6c362` (the eighteen tail tokens read `finite:10048`) | every builtin tail read as `TailSamples::Finite(0)` | as 964-1 (#1329 recheck) | `cargo test -p graph-compiler --test track_delay` | RED -- the digest moves to `664a575a…d0d0c1a2` against the pinned `60cae21e…fc6c362`; `builtins_replace_only_the_three_internal_track_bindings` also turns RED (`Finite(0)` against the prepared `Finite(10048)`) | -| S5 (recheck) | `track_delay::the_estimate_charges_each_lane_its_own_ring` at `Backend::current()` | the left ring is charged 2 bytes per sample | `graph-compiler/src/compile.rs` | as above | RED, `delay_bytes for 1/0`, 2 vs 4 | +| S5 (recheck) | `track_delay::the_estimate_charges_each_lane_its_own_ring` (deleted by TA4; KEEP catcher graph-compiler `track_delay::a_ring_is_a_named_allocation`) at `Backend::current()` | the left ring is charged 2 bytes per sample | `graph-compiler/src/compile.rs` | as above | RED, `delay_bytes for 1/0`, 2 vs 4 | --- @@ -366,3 +366,12 @@ deleted or trimmed some tests that rows above name. The rows stay as history; th the owner bytes from `size_of`. It asserts that the three deltas agree, are zero exactly when no instance is controlled, and that the exact caps accept and one byte below refuses. A partial under-charge such as this row's is left to the allocator ceiling in `tests/bypass_resources.rs`. + +## TA4 deletions + +The 2026-10 test audit (TA4, batch 1 mutation measurement at `81a3074fc`) deleted the tests named below. Each one's caught mutants were also red in the KEEP test named beside it. That is the recorded catcher of the deleted test's sampled mutants; the mutation of each row above was not re-run. + +- `direct_graph_report_exposes_zero_output_latency_and_tail_without_identity_change`: graph `program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers` +- `dynamic_rack_compressors_bank_and_render_bit_identically_to_the_per_node_path`: graph `runtime::tests::a_host_plane_reduction_is_the_arena_reduction_bit_for_bit` +- `console_sixty_four_track_fixture_banks_its_dynamic_compressor_bit_identically`: graph-compiler `tests::add_a_track_keeps_existing_track_bits_and_one_transpose_per_chain` +- `the_estimate_charges_each_lane_its_own_ring`: graph-compiler `track_delay::a_ring_is_a_named_allocation` diff --git a/crates/graph-compiler/tests/compile_shapes.rs b/crates/graph-compiler/tests/compile_shapes.rs index b1b33ccf3..21d27ccdb 100644 --- a/crates/graph-compiler/tests/compile_shapes.rs +++ b/crates/graph-compiler/tests/compile_shapes.rs @@ -45,10 +45,9 @@ use graph_compiler::{ }; use rack::RackLocation; use session::{ - ChannelMatrix, CompileCaps, CompiledSession, ConsoleEntry, ConsoleSlot, EffectIdentity, - EffectParam, ParameterChannel, ParameterUnit, Route, RouteDestination, RouteSource, SendTap, - SessionModel, Sidechain, SidechainDeclaration, StableId, Submix, compile_session, - parse_session_json, + CompileCaps, CompiledSession, ConsoleEntry, ConsoleSlot, EffectIdentity, EffectParam, + ParameterChannel, ParameterUnit, Route, RouteDestination, RouteSource, SendTap, Sidechain, + SidechainDeclaration, StableId, Submix, compile_session, parse_session_json, }; const SESSION: &str = include_str!("../../../fixtures/session/v1/canonical.json"); @@ -373,141 +372,6 @@ fn mixed_rack_depths_bank_every_stage_and_leave_subsequences_and_sidechains_scal } } -fn taps() -> [SendTap; 7] { - [ - SendTap::Input, - SendTap::PostInput, - SendTap::InsertSend, - SendTap::InsertReturn, - SendTap::PreFader, - SendTap::PostFader, - SendTap::PostPan, - ] -} - -/// 256 tracks, every fourth carrying an insert delay and every eighth a routed sidechain; -/// 992 track routes into 32 submixes from all seven taps, and 32 submix routes to the output. -fn representative_console() -> SessionModel { - let mut model = parse_session_json(SESSION).expect("seed session"); - let track_template = model.tracks.pop().expect("seed track"); - let route_template = model.routes.pop().expect("seed route"); - model.automation.clear(); - model.submixes = (0..32) - .map(|index| Submix::unity(stable(&format!("submix-{index:02}")), &model.console)) - .collect(); - model.tracks = (0..256) - .map(|index| { - let mut track = track_template.clone(); - track.id = stable(&format!("track-{index:03}")); - track.console.clear(); - track.inserts.effects.clear(); - if index % 4 == 1 { - let mut effect = track_template.inserts.effects[0].clone(); - effect.id = stable("delay"); - effect.identity = EffectIdentity::Native { - effect_id: stable("conformance.delay"), - }; - effect.params = [ParameterChannel::Left, ParameterChannel::Right] - .map(|channel| EffectParam { - parameter_id: 1, - channel, - unit: ParameterUnit::Linear, - value: 1.0, - }) - .to_vec(); - effect.sidechain = if index % 8 == 1 { - SidechainDeclaration::Routed(Sidechain { - source: RouteSource::Track { - track_id: stable("track-000"), - tap: SendTap::Input, - }, - port_id: stable("sidechain-in"), - }) - } else { - SidechainDeclaration::None - }; - track.inserts.effects.push(effect); - } - track - }) - .collect(); - model.routes.clear(); - for index in 0..992 { - let mut route = route_template.clone(); - route.id = stable(&format!("track-route-{index:04}")); - route.source = RouteSource::Track { - track_id: stable(&format!("track-{:03}", index % 256)), - tap: taps()[index % taps().len()], - }; - route.destination = RouteDestination::SubmixInput { - submix_id: stable(&format!("submix-{:02}", index % 32)), - }; - model.routes.push(route); - } - for index in 0..32 { - model.routes.push(Route { - id: stable(&format!("submix-route-{index:02}")), - source: RouteSource::Submix { - submix_id: stable(&format!("submix-{index:02}")), - tap: SendTap::PostPan, - }, - destination: RouteDestination::OutputInput { - output_id: model.outputs[0].id.clone(), - }, - channel_matrix: ChannelMatrix { - ll: 1.0, - lr: 0.0, - rl: 0.0, - rr: 1.0, - }, - gain_db: 0.0, - mute: false, - follows_mute: false, - }); - } - model -} - -#[test] -fn representative_console_compiles_with_builtins_and_reports_its_shape() { - let model = representative_console(); - assert_eq!(model.tracks.len(), 256); - assert_eq!(model.routes.len(), 1_024); - assert_eq!(model.submixes.len(), 32); - let effects: Vec<_> = model - .tracks - .iter() - .flat_map(|track| &track.inserts.effects) - .collect(); - assert!(model.console.slots().next().is_none()); - assert_eq!(effects.len(), 64); - assert_eq!( - effects - .iter() - .filter(|effect| matches!(effect.sidechain, SidechainDeclaration::Routed(_))) - .count(), - 32 - ); - let session = compile_session(&model, compile_caps()).expect("representative session"); - // The production compile, at the host's dispatch: every shipped target has a SIMD width. - let dispatch = Backend::current(); - assert!(dispatch.width() > 1); - let artifact = compile(&session, &[], dispatch); - let estimate = artifact.graph_resource_estimate(); - assert_eq!(estimate.routes, 1_024); - assert_eq!(estimate.effects, 64); - assert!(estimate.builtin_bank_count > 0); - // Every strip's post-input, fader and matrix stages are builtin bank members: the 256 - // tracks' and, since a submix lowers to a strip (#1200), the 32 submixes'. - assert_eq!( - artifact.graph().builtin_bank_members().count(), - 3 * (256 + 32) - ); - let evidence = GraphCompiler::evidence(artifact.graph(), artifact.report()); - assert!(!evidence.canonical_bytes.is_empty()); - assert!(!evidence.dot.is_empty()); -} - /// #1200 gate 4: a bus that three routes feed keeps its sum in the canonical text and in /// `GraphCompiler::reductions`, now recorded on the submix strip's `Input` stage: exactly one /// reduction, whose three contributions are the three route-destination edges in route-ID order. diff --git a/crates/graph-compiler/tests/route_coefficients.rs b/crates/graph-compiler/tests/route_coefficients.rs index c08e55f32..6db7f9a6b 100644 --- a/crates/graph-compiler/tests/route_coefficients.rs +++ b/crates/graph-compiler/tests/route_coefficients.rs @@ -471,208 +471,3 @@ fn a_subnormal_folded_coefficient_is_positive_zero() { ); } } - -/// #1216 gate 5: a route's mute is in the sealed graph text. The same session compiles twice, one -/// route muted and then open: outside the `estimate` row (which charges #1217's route-activity -/// table), the texts differ by exactly one `route-mute\t` row, right after that route's -/// `route-transform` row, and an open route writes no such row. -/// -/// Red if the gate is invisible to the canonical text (two plans binding different constants -/// would share one digest), or if the row lands on another route or elsewhere in the text. -#[test] -fn a_muted_route_seals_one_route_mute_row_after_its_transform() { - let text = |model: &SessionModel| { - let artifact = compile(model).expect("the session compiles"); - String::from_utf8( - GraphCompiler::evidence(artifact.graph(), artifact.report()).canonical_bytes, - ) - .expect("canonical text is UTF-8") - }; - let open_model = parse_session_json(SESSION).expect("fixture parses"); - let open = text(&open_model); - let open_lines: Vec<&str> = open.lines().collect(); - assert!( - open_lines - .iter() - .all(|line| !line.starts_with("route-mute")), - "an open route writes no gate row" - ); - // Three choices, so the row is placed by the route and not by the text's first or last route. - for index in [0, 4, open_model.routes.len() - 1] { - let mut muted_model = open_model.clone(); - muted_model.routes[index].mute = true; - let node = format!("route:{}", muted_model.routes[index].id.as_str()); - let muted = text(&muted_model); - let mut muted_lines: Vec<&str> = muted.lines().collect(); - let row = format!("route-mute\t{node}"); - let at = muted_lines - .iter() - .position(|line| *line == row) - .unwrap_or_else(|| panic!("no `{row}` row")); - assert!( - muted_lines[at - 1].starts_with(&format!("route-transform\t{node}\t")), - "`{row}` follows `{}`", - muted_lines[at - 1] - ); - muted_lines.remove(at); - // A muted route also makes bind build the route-activity table, which the sealed - // `estimate` row charges (#1217 D6; `route_activity.rs` holds the charge to what bind - // retains). That row may differ only by exactly that charge, in the fields it enters. - let estimate_at = |lines: &[&str]| { - lines - .iter() - .position(|line| line.starts_with("estimate\t")) - .expect("an estimate row") - }; - let (open_at, muted_at) = (estimate_at(&open_lines), estimate_at(&muted_lines)); - assert_estimate_moves_by_the_route_activity_charge( - open_lines[open_at], - muted_lines[muted_at], - open_model.routes.len(), - &node, - ); - muted_lines.remove(muted_at); - let mut open_rest = open_lines.clone(); - open_rest.remove(open_at); - assert_eq!( - muted_lines, open_rest, - "the gate row is the only difference outside the estimate ({node})" - ); - } -} - -/// The muted compile's `estimate` row equals the open one's but for #1217 D6's charge, -/// `graph::route_activity_bound_bytes(routes, logical_nodes)`: `graph_metadata_bytes`, -/// `incremental_plan_bytes` and `session_plus_plan_bytes` each grow by exactly the charge, and -/// `largest_allocation_bytes` is the larger of the open one and the muted metadata bytes. -fn assert_estimate_moves_by_the_route_activity_charge( - open: &str, - muted: &str, - routes: usize, - node: &str, -) { - let fields = |row: &str| -> Vec { - row.split('\t') - .skip(1) - .map(|field| field.parse().expect("a numeric estimate field")) - .collect() - }; - let (open, muted) = (fields(open), fields(muted)); - assert_eq!(open.len(), 20, "the estimate row's field count"); - // Field positions in the row (`canonical.rs`'s `estimate` writer). - const LOGICAL_NODES: usize = 0; - const GRAPH_METADATA: usize = 11; - const LARGEST_ALLOCATION: usize = 17; - const CHARGED: [usize; 3] = [GRAPH_METADATA, 18, 19]; - let charge = graph::route_activity_bound_bytes(routes as u64, open[LOGICAL_NODES]) - .expect("the charge fits u64"); - let mut expected = open.clone(); - for field in CHARGED { - expected[field] += charge; - } - expected[LARGEST_ALLOCATION] = open[LARGEST_ALLOCATION].max(expected[GRAPH_METADATA]); - assert_eq!( - muted, expected, - "the estimate moves by the route-activity charge ({charge} bytes) and nothing else ({node})" - ); -} - -/// #1218 D3: a following send's zeroed source lanes are in the sealed graph text. A send from a -/// muted track compiles with `follows_mute` on and off: outside the `estimate` row (a send whose -/// two source lanes are muted is silenced, so #1217's activity table is charged), the texts differ -/// by exactly one `route-follow-zeroed\t\t\t` row, after that route's -/// `route-transform` row and, when the send is also muted, its `route-mute` row. -/// -/// Red if the follow is invisible to the canonical text (a follow-zeroed plan and an open one -/// would share a digest while binding different constants), if the lane bits are swapped, or if -/// the row lands before the route's `route-mute` row or on another route. The case where only the -/// follow silences the send (both lanes muted, the send itself open) is the one where the estimate -/// row moves: red there if the activity charge is keyed on the route's `mute` alone rather than on -/// the gate's `silences()` (#1218 verdict NIT-3). -#[test] -fn a_following_send_seals_one_route_follow_zeroed_row() { - let text = |model: &SessionModel| { - let artifact = compile(model).expect("the session compiles"); - String::from_utf8( - GraphCompiler::evidence(artifact.graph(), artifact.report()).canonical_bytes, - ) - .expect("canonical text is UTF-8") - }; - let without_estimate = |text: &str| -> Vec { - text.lines() - .filter(|line| !line.starts_with("estimate\t")) - .map(str::to_owned) - .collect() - }; - let base = with_sends(&parse_session_json(SESSION).expect("fixture parses")); - let track = base.tracks[3].id.as_str().to_owned(); - let send = format!("send-{track}"); - let node = format!("route:{send}"); - for (left, right, mute) in [ - (true, false, false), - (false, true, false), - (true, true, false), - (true, true, true), - ] { - let mut open = base.clone(); - let fader = &mut open.tracks[3].fader; - (fader.left_mute, fader.right_mute) = (left, right); - let index = open - .routes - .iter() - .position(|route| route.id.as_str() == send) - .expect("the send is declared"); - open.routes[index].mute = mute; - let mut following = open.clone(); - following.routes[index].follows_mute = true; - let open_text = text(&open); - assert!( - open_text - .lines() - .all(|line| !line.starts_with("route-follow-zeroed")), - "a send that does not follow writes no follow row" - ); - let following_text = text(&following); - let mut lines = without_estimate(&following_text); - let row = format!( - "route-follow-zeroed\t{node}\t{}\t{}", - u8::from(left), - u8::from(right) - ); - let at = lines - .iter() - .position(|line| *line == row) - .unwrap_or_else(|| panic!("no `{row}` row")); - let previous = if mute { - format!("route-mute\t{node}") - } else { - format!("route-transform\t{node}\t") - }; - assert!( - lines[at - 1].starts_with(&previous), - "`{row}` follows `{}`", - lines[at - 1] - ); - lines.remove(at); - assert_eq!( - lines, - without_estimate(&open_text), - "the follow row is the only difference outside the estimate ({left}, {right}, {mute})" - ); - let estimate = |text: &str| -> String { - text.lines() - .find(|line| line.starts_with("estimate\t")) - .expect("an estimate row") - .to_owned() - }; - // Only the follow silences the send when both lanes are muted and the send is open; then, - // and only then, the follow charges the route-activity table. - let follow_alone_silences = left && right && !mute; - assert_eq!( - estimate(&following_text) != estimate(&open_text), - follow_alone_silences, - "the estimate moves exactly when the follow alone silences the send \ - ({left}, {right}, {mute})" - ); - } -} diff --git a/crates/graph-compiler/tests/route_gain.rs b/crates/graph-compiler/tests/route_gain.rs index 9d4ef3bcf..1eddc88b7 100644 --- a/crates/graph-compiler/tests/route_gain.rs +++ b/crates/graph-compiler/tests/route_gain.rs @@ -69,11 +69,3 @@ fn route_gain_matches_f64_oracle_within_two_ulp() { assert!(gap <= 2, "db_to_gain_f32 deviates {gap} ulp at {db} dB"); } } - -/// `db_to_gain_f32(0) = exp2f(0) = 1.0` exactly, so a 0 dB route keeps `0x3f80_0000` and every -/// checked-in graph fixture (all of whose routes are 0 dB) is byte-identical across F4. -#[test] -fn unity_route_gain_is_exactly_one() { - assert_eq!(math::db_to_gain_f32(0.0).to_bits(), 0x3f80_0000); - assert_eq!(math::db_to_gain_f32(-0.0).to_bits(), 0x3f80_0000); -} diff --git a/crates/graph-compiler/tests/track_delay.rs b/crates/graph-compiler/tests/track_delay.rs index 9ca53b074..c26f24a5b 100644 --- a/crates/graph-compiler/tests/track_delay.rs +++ b/crates/graph-compiler/tests/track_delay.rs @@ -291,36 +291,6 @@ fn a_track_delay_moves_no_pdc_row() { // P2-4: accounting // --------------------------------------------------------------------------------------------- -/// `delay_bytes` grows by exactly four bytes per declared sample per lane, and by nothing else. -/// -/// Four and not eight: PDC's `* 8` is one `CompensationDelay` of `n` samples holding *two* rings of -/// `n`, because PDC's skew is per edge and therefore per pair. A track delay is declared per lane, -/// so the two rings are sized independently and each lane is charged for its own. -/// -/// Red mutations, both measured: folding the term into `timing.total_delay` before the `* 8` -/// instead of adding it beside trips this row (the per-lane sum stops being recoverable from the -/// per-pair one); declaring `delay_samples` as the input node's `GraphNode.latency` trips this row, -/// `a_track_delay_moves_no_pdc_row` and `the_pdc_counts_are_untouched` together, which is the -/// three-way signature of the one mistake this feature most needs to be unable to make. -#[test] -fn the_estimate_charges_each_lane_its_own_ring() { - let base = compiled(0, 0).delay_bytes; - for (left, right) in [ - (1_u32, 0_u32), - (0, 1), - (480, 480), - (48_000, 12), - (7, 48_000), - ] { - let expected = base + u64::from(left) * 4 + u64::from(right) * 4; - assert_eq!( - compiled(left, right).delay_bytes, - expected, - "delay_bytes for {left}/{right}" - ); - } -} - /// The samples stay out of PDC's counts even though the bytes join PDC's row. #[test] fn the_pdc_counts_are_untouched() { diff --git a/crates/graph/src/lib.rs b/crates/graph/src/lib.rs index c2f665239..1bb2de2bb 100644 --- a/crates/graph/src/lib.rs +++ b/crates/graph/src/lib.rs @@ -5942,7 +5942,7 @@ impl PreparedPlanExecutor for GraphExecutor { #[cfg(test)] mod tests { use super::*; - use crate::runtime::CompensationDelay; + use conformance::DualAccumulatorDelayFactory; use effect_contract::{ BankWidth, EffectDescriptor, EffectId, EffectProcessBlock, EffectQuality, @@ -7409,30 +7409,6 @@ mod tests { assert_eq!(failure.code, "graph.scheduler.layout"); } - #[test] - fn delay_is_exact_and_lane_independent() { - let mut delay = CompensationDelay::new(2); - let mut l = [1.0, 2.0, 3.0]; - let mut r = [4.0, 5.0, 6.0]; - delay.process(&mut l, &mut r); - assert_eq!(l, [0.0, 0.0, 1.0]); - assert_eq!(r, [0.0, 0.0, 4.0]); - } - #[test] - fn binding_rejects_duplicates_and_returns_all_ownership() { - let (plan, mut bindings, duplicate) = binding_plan(); - bindings - .nodes - .push(GraphNodeBinding::new(duplicate, Box::new(Noop))); - let failure = match plan.bind(bindings) { - Ok(_) => panic!("duplicate binding unexpectedly accepted"), - Err(failure) => failure, - }; - assert_eq!(failure.code, "graph.plan.binding"); - assert_eq!(failure.bindings.nodes.len(), 3); - assert_eq!(failure.plan.plan_id, 42); - } - /// `GraphNodeBinding::identity` acknowledges a required node without a host processor: the /// node is still listed (so a genuinely missing binding still fails), and the executor renders /// it with its own reduction kind, bit-for-bit as a do-nothing host processor did. diff --git a/crates/graph/src/program.rs b/crates/graph/src/program.rs index 88456b3fa..8aa2b9845 100644 --- a/crates/graph/src/program.rs +++ b/crates/graph/src/program.rs @@ -480,9 +480,7 @@ struct Lifetime { /// /// `bank_windows` computes those ranges and pass 2 *holds* every slot freed inside one until /// the window closes, instead of returning it to the free list where an op the bank hoists past -/// its releaser could take it. `a_bank_window_never_recycles_a_physical_slot` constructs the -/// smallest graph that reaches the defect and -/// `bank_window_hoisting_preserves_dataflow_on_random_graphs` interprets seeded graphs in the +/// its releaser could take it. `bank_window_hoisting_preserves_dataflow_on_random_graphs` interprets seeded graphs in the /// order the executor actually runs them. /// /// ## The rejected alternative: dedication by bank membership diff --git a/crates/graph/src/program/tests.rs b/crates/graph/src/program/tests.rs index 44189eff2..9ee61f1dd 100644 --- a/crates/graph/src/program/tests.rs +++ b/crates/graph/src/program/tests.rs @@ -717,47 +717,6 @@ fn malformed_inputs_are_rejected_rather_than_lowered() { // ---- issue #169: colouring across a bank's reordering window --------------------------- -/// A track whose dynamic rack carries one effect, spliced between the two stage boundaries -/// that surround it, plus one route to the shared output. -fn dynamic_track(track: &str, route: &str) -> (Vec, Vec) { - let (mut nodes, mut edges) = plain_track(track, &[route]); - let effect = GraphNodeId::Effect(crate::EffectNodeId { - track_id: gid(track), - rack: RackId::Dynamic, - effect_id: gid("fx"), - }); - nodes.push(node(effect.clone())); - edges.retain(|edge| { - edge.id - != GraphEdgeId::TrackMain { - target: stage_node(track, TrackStage::PostDynamic), - } - }); - edges.push(main_edge( - GraphEdgeId::TrackMain { - target: effect.clone(), - }, - stage_node(track, TrackStage::PostSimd1), - effect.clone(), - )); - edges.push(main_edge( - GraphEdgeId::TrackMain { - target: stage_node(track, TrackStage::PostDynamic), - }, - effect, - stage_node(track, TrackStage::PostDynamic), - )); - (nodes, edges) -} - -fn dynamic_effect(track: &str) -> GraphNodeId { - GraphNodeId::Effect(crate::EffectNodeId { - track_id: gid(track), - rack: RackId::Dynamic, - effect_id: gid("fx"), - }) -} - /// `node index -> (bank, lane)`, the shape `runtime::BankMembership` has. fn member_lanes( spec: &GraphSpec, @@ -1316,144 +1275,6 @@ fn assert_no_slot_is_recycled_inside_a_bank_window( } } -/// Issue #169, the minimal reproduction: a slot released inside a bank window was handed -/// straight back to a member of that same bank. -/// -/// Three tracks, one dynamic effect each, and a bank over the *outer* two -- the shape #166 -/// made reachable, because a dynamic rack banks by cohort signature, so the tracks that share -/// a compressor bank need not be adjacent. Track `t01`'s effect is not in the bank and sits -/// between the two members in the schedule, so the executor defers it past the bank; its -/// delayed input needs a staging slot, and colouring released that slot one op before `t02`'s -/// member allocated its output. -/// -/// In schedule order that is correct: the staging slot is dead the moment `t01`'s op finishes. -/// In *execution* order the bank runs first, `t02`'s member writes the slot, and then the -/// deferred `t01` stages over the top of it -- so `t02` renders `t01`'s delayed input. -/// -/// The second half of the test is what keeps the first half honest: lowered with no bank -/// declared -- which is exactly what the pre-#169 signature could express -- the same graph -/// really does hand the slot over. -#[test] -fn a_bank_window_never_recycles_a_physical_slot() { - let mut nodes = Vec::new(); - let mut edges = Vec::new(); - for (index, track) in ["t00", "t01", "t02"].iter().enumerate() { - let (track_nodes, track_edges) = dynamic_track(track, &format!("r{index:02}")); - nodes.extend( - track_nodes.into_iter().filter(|candidate| { - !matches!(candidate.id, GraphNodeId::Output { .. }) || index == 0 - }), - ); - edges.extend(track_edges); - } - let (spec, schedule, levels) = build(nodes, edges); - // The one PDC edge: into the effect of the track the bank does *not* contain. - let delays = vec![InsertedDelay { - node: dynamic_effect("t01"), - edge_id: GraphEdgeId::TrackMain { - target: dynamic_effect("t01"), - }, - samples: LatencySamples(64), - }]; - let banks = vec![vec![dynamic_effect("t00"), dynamic_effect("t02")]]; - let lanes = member_lanes(&spec, &banks); - - // Not vacuous: told nothing about the bank, colouring recycles the slot and the render - // diverges. This is the pre-#169 behaviour, and the fixture exists to reach it. - let unaware = lower(&spec, &schedule, &levels, &delays, &[]).expect("lowers"); - assert_program_matches_spec(&spec, &schedule, &delays, &unaware); - let member = node_index(&spec, &dynamic_effect("t02")).expect("member"); - let outsider = node_index(&spec, &dynamic_effect("t01")).expect("outsider"); - let outsider_op = &unaware.ops[unaware.node_op[outsider as usize].expect("op") as usize]; - let staging = unaware.inputs_of(outsider_op)[0] - .delay - .expect("the outsider's input is delayed") - .staging; - assert_eq!( - unaware.node_buffer[member as usize], staging, - "the fixture must reach the collision it is here to pin" - ); - assert!( - divergence_in_runtime_order(&spec, &schedule, &delays, &unaware, &lanes).is_some(), - "and that collision must actually change what renders" - ); - - // Told about the bank, the slot is held until the window closes. - let program = lower(&spec, &schedule, &levels, &delays, &banks).expect("lowers"); - assert_program_matches_spec(&spec, &schedule, &delays, &program); - assert_no_slot_is_recycled_inside_a_bank_window(&program, &spec, &banks, "minimal"); - assert_eq!( - divergence_in_runtime_order(&spec, &schedule, &delays, &program, &lanes), - None - ); - // And it costs nothing here: holding a slot across the window changes *which* slot each - // op gets, not how many exist. The window hold buys the collision away out of the - // colouring's own slack -- which is why it, and not dedication, is the fix that shipped. - assert_eq!((unaware.buffers, program.buffers), (7, 7)); -} - -/// Issue #169's structural half: **no physical slot is recycled inside a merged bank -/// window**, which is the whole soundness condition (see [`lower`]). -/// -/// Four tracks and two interleaved cohorts -- the shape a dynamic rack produces when -/// neighbouring tracks carry different chains, which is what #166 made reachable. Each bank's -/// window contains the other's members, so the two merge into one span: what makes them -/// unsafe is not either bank alone but that each reorders the other's ops. -/// -/// The overlap assertion is the non-vacuity guard. If the fixture ever stopped interleaving, -/// the windows would stop merging and this would pass on a graph that no longer poses the -/// question. -#[test] -fn no_slot_is_recycled_inside_a_merged_bank_window() { - let mut nodes = Vec::new(); - let mut edges = Vec::new(); - for (index, track) in ["t00", "t01", "t02", "t03"].iter().enumerate() { - let (track_nodes, track_edges) = dynamic_track(track, &format!("r{index:02}")); - nodes.extend( - track_nodes.into_iter().filter(|candidate| { - !matches!(candidate.id, GraphNodeId::Output { .. }) || index == 0 - }), - ); - edges.extend(track_edges); - } - let (spec, schedule, levels) = build(nodes, edges); - let banks = vec![ - vec![dynamic_effect("t00"), dynamic_effect("t02")], - vec![dynamic_effect("t01"), dynamic_effect("t03")], - ]; - let program = lower(&spec, &schedule, &levels, &[], &banks).expect("lowers"); - assert_program_matches_spec(&spec, &schedule, &[], &program); - - // The two windows really do interleave, so `bank_windows` really does merge them. - let window = |members: &[GraphNodeId]| { - let ops: Vec = members - .iter() - .map(|id| { - let index = node_index(&spec, id).expect("member is a node"); - program.node_op[index as usize].expect("a member is never elided") as usize - }) - .collect(); - ( - *ops.iter().min().expect("first"), - *ops.iter().max().expect("last"), - ) - }; - let (first_start, first_end) = window(&banks[0]); - let (second_start, second_end) = window(&banks[1]); - assert!( - first_start < second_start && second_start < first_end && first_end < second_end, - "the cohorts must interleave: {first_start}..{first_end} and \ - {second_start}..{second_end}" - ); - - assert_no_slot_is_recycled_inside_a_bank_window(&program, &spec, &banks, "merged window"); - let lanes = member_lanes(&spec, &banks); - assert_eq!( - divergence_in_runtime_order(&spec, &schedule, &[], &program, &lanes), - None - ); -} - /// Issue #169, the load-bearing eval: over seeded multi-track graphs with dynamic rack chains, /// interleaved cohorts, fan-out and PDC, the program renders the value the semantic graph does /// **in the order the executor actually runs it**, with banks hoisted to their first member. diff --git a/crates/graph/src/runtime.rs b/crates/graph/src/runtime.rs index da6507dbe..01b034941 100644 --- a/crates/graph/src/runtime.rs +++ b/crates/graph/src/runtime.rs @@ -12310,127 +12310,6 @@ mod tests { } } - fn assert_width_matches_reference() { - #[derive(Clone, Copy, Debug)] - enum Family { - Finite, - NegativeZero, - SmallNormal, - Subnormal, - Infinity, - Nan, - } - - let _fp_env = lane::fpenv::CanonicalFpEnv::enter(); - for frames in [ - 1, - L::WIDTH.saturating_sub(1).max(1), - L::WIDTH, - L::WIDTH + 1, - L::WIDTH * 3 + 1, - 128, - ] { - for family in [ - Family::Finite, - Family::NegativeZero, - Family::SmallNormal, - Family::Subnormal, - Family::Infinity, - Family::Nan, - ] { - let inputs: Vec> = (0..9) - .map(|input| { - (0..frames) - .map(|frame| match family { - Family::Finite => match (frame % 2, input) { - (0, 0) => 2.0, - (0, 1) => -0.5, - (0, 2) => 0.25, - (1, 0) => 16_777_216.0, - (1, 1) => 1.0, - (1, 2) => -16_777_216.0, - _ => 0.0, - }, - Family::NegativeZero => -0.0, - Family::SmallNormal => { - if input < 2 { - f32::MIN_POSITIVE - } else { - 0.0 - } - } - Family::Subnormal => { - if input < 2 { - f32::from_bits(1) - } else { - 0.0 - } - } - Family::Infinity => match (frame % 2, input) { - (0, 0) => f32::INFINITY, - (0, 1) => 1.0, - (1, 0) => f32::NEG_INFINITY, - (1, 1) => -1.0, - _ => 0.0, - }, - Family::Nan => { - if input == 0 { - f32::from_bits(0x7fc0_4201) - } else { - 0.0 - } - } - }) - .collect() - }) - .collect(); - let mut actual = single_arena(frames, 11); - let ids: Vec = (2..11).collect(); - for (index, values) in inputs.iter().enumerate() { - actual.write(0, ids[index]).copy_from_slice(values); - } - reduce_many::(&mut actual, 0, 1, &ids); - for (frame, value) in actual.read(0, 1).iter().enumerate() { - let reference = inputs - .iter() - .map(|input| input[frame]) - .reduce(|left, right| left + right) - .expect("nonempty inputs"); - let expected_bits = match family { - Family::Finite if frame % 2 == 0 => 1.75_f32.to_bits(), - Family::Finite => 0.0_f32.to_bits(), - Family::NegativeZero => (-0.0_f32).to_bits(), - Family::SmallNormal => 0x0100_0000, - Family::Subnormal => 2, - Family::Infinity if frame % 2 == 0 => f32::INFINITY.to_bits(), - Family::Infinity => f32::NEG_INFINITY.to_bits(), - Family::Nan => { - assert!(reference.is_nan(), "NaN family reference at frame {frame}"); - reference.to_bits() - } - }; - assert_eq!( - reference.to_bits(), - expected_bits, - "{family:?} category at width {} frames {frames} frame {frame}", - L::WIDTH - ); - assert_eq!( - value.to_bits(), - reference.to_bits(), - "{family:?} width {} frames {frames} frame {frame}", - L::WIDTH - ); - } - } - } - } - - #[test] - fn every_lane_width_matches_the_scalar_reference_on_hostile_values() { - lane::each_lane!(|L| assert_width_matches_reference::()); - } - /// The one NaN payload the #898 corpus uses; see `hoisting_word`. const HOISTING_NAN: u32 = 0x7fc0_4898; diff --git a/crates/graph/tests/MUTATIONS.md b/crates/graph/tests/MUTATIONS.md index b249ae64f..78394543a 100644 --- a/crates/graph/tests/MUTATIONS.md +++ b/crates/graph/tests/MUTATIONS.md @@ -441,7 +441,7 @@ checked before writing, the suites were run with `--no-fail-fast`, and the file deleted the bankless ring fixture these rows ran on and ported the four gates onto issue #918's banked fixture (gate 5 is now `the_metadata_charge_covers_the_banked_source_plans_executor_tables`); the #957 rows below re-prove 936-1, 936-2 and 936-4 on the ported gates. -- console-workload "gate 1" is `tests::the_driver_fed_gain_pan_row_dispatches_every_unit_but_its_inputs` +- console-workload "gate 1" is `tests::the_driver_fed_gain_pan_row_dispatches_every_unit_but_its_inputs` (deleted by TA4; KEEP catcher graph `runtime::tests::a_plan_that_reads_the_session_output_is_refused_at_bind`) (then `the_driver_fed_plumbing_row_dispatches_only_its_output_unit`, re-homed by issue #956), "gate 5" `tests::the_driver_fed_rows_metadata_charge_grows_by_exactly_the_executor_tables`, and "gate 4" is chain_shape `the_plumbing_row_is_input_route_output_and_renders_the_base_bits` @@ -460,7 +460,7 @@ checked before writing, the suites were run with `--no-fail-fast`, and the file | 936-1b | only `op.observers.is_empty()` dropped | `graph/src/runtime.rs` `Runtime::unit_inert` | `cargo test -p graph --lib` | **GREEN, equivalent** (113 of 113). `Runtime::new_with_observation_activation`, which every runtime passes through, sets `identity.observed = unit.has_observers()`, and for a plain op that is `!op.observers.is_empty()`. The two clauses the brief lists name one fact, so dropping either alone moves nothing. 936-1 is the brief's mutation in the form that is not equivalent. | | 936-2 | a delayed claim is inert (`NodeKind::SourceInput \| NodeKind::TrackDelay { .. }`) | `graph/src/runtime.rs` `Runtime::unit_inert` | `cargo test -p graph --lib`; gate 3 bits-only | RED, graph 3 of 113: gate 3 `TrackDelayed, 1 frames: skipped unit 5 is a plain unobserved source input`, #927's gate 2, #918's gate 1. Bits-only: RED `TrackDelayed: every host word and meter frame is the pre-change executor's` (`0xce6b3a3d49968c67`, the undelayed Plain digest: the copied words reach the Output without their delay line, against `0xe8b0890ea031f463`). | | 936-3 | the loop iterates the table in reverse (`active_units.iter().rev()`) | `graph/src/lib.rs` `GraphExecutor::render` | console-workload lib and chain_shape; `cargo test -p graph --lib` | RED on gate 4: chain_shape `the_plumbing_row_is_input_route_output_and_renders_the_base_bits` (`eliding identity stages moved a bit`, `BASE_DIGEST`; retired by issue #956) and `the_folded_master_is_the_reductions_own_bits`, and the lib's `the_driver_fed_plumbing_row_renders_the_bound_rows_bits` (now `the_driver_fed_gain_pan_row_renders_the_bound_rows_bits`). The driver-fed row dispatches only its Output op, so reversing it changes nothing; the bound row's reversal is what the equality catches. graph: 27 of 113 red, gates 2 and 3 and the rt9 source pin among them. | -| 936-4 | the loop dispatches every unit again (`let _ = &active_units; for unit in 0..runtime.units.len() {`) | `graph/src/lib.rs` `GraphExecutor::render` | `cargo test -p graph --lib`; console-workload lib and chain_shape | RED only on what counts dispatches: graph gates 1-3 (`Plain, 1 frames: units dispatched per block`, `[65; 16]` against `[1; 16]`) and the rt9 source pin (the pre-#936 header is refused); console gate 1 (`sixty_four_track_plumbing_ring, block 0: units dispatched`, 65 against 1; the row is now `sixty_four_track_gain_pan_ring` and the test `the_driver_fed_gain_pan_row_dispatches_every_unit_but_its_inputs`, issue #956). GREEN: chain_shape 24 of 24 and every digest. The change is class A, so a count is the only thing that can tell a skipped unit from a dispatched one. | +| 936-4 | the loop dispatches every unit again (`let _ = &active_units; for unit in 0..runtime.units.len() {`) | `graph/src/lib.rs` `GraphExecutor::render` | `cargo test -p graph --lib`; console-workload lib and chain_shape | RED only on what counts dispatches: graph gates 1-3 (`Plain, 1 frames: units dispatched per block`, `[65; 16]` against `[1; 16]`) and the rt9 source pin (the pre-#936 header is refused); console gate 1 (`sixty_four_track_plumbing_ring, block 0: units dispatched`, 65 against 1; the row is now `sixty_four_track_gain_pan_ring` and the test `the_driver_fed_gain_pan_row_dispatches_every_unit_but_its_inputs` (deleted by TA4; KEEP catcher graph `runtime::tests::a_plan_that_reads_the_session_output_is_refused_at_bind`), issue #956). GREEN: chain_shape 24 of 24 and every digest. The change is class A, so a count is the only thing that can tell a skipped unit from a dispatched one. | | 936-5a | `GraphExecutorWithoutObservationActivation` omits `active_units` | `graph/src/lib.rs` | `cargo test -p graph --lib` | RED, the metadata test only: `the observation owner delta is the runtime state's alone` (272 against 256). | | 936-5b | `GraphExecutorWithoutSplitPairTable` omits `active_units` | `graph/src/lib.rs` | `cargo test -p graph --lib` | RED, the metadata test only: `the split owner delta is the runtime field's alone` (32 against 16). | | 936-6a | the copied-claim table is charged nothing (`source_input_entry_bytes.checked_mul(0)`) | `graph/src/lib.rs` `checked_for_with_response_bindings` | `cargo test -p graph --lib`; console-workload lib | RED: the metadata test, graph gate 5 (`declined true: the charge (516, 0) covers the tables (4, 1024)`), console gate 5. | @@ -708,7 +708,7 @@ host-core/test-support,graph/test-support --test route_mute`); gate 4 is | 1217-10 | the estimate charges no table | `graph-compiler/src/estimate.rs` `resource_estimate` | gate 4 | RED: `graph_metadata_bytes grew by 0, the bound plan by 237`. | | 1217-11 | the host-master form stores nothing for an inactive first input (`SumSegment::Zero => {}` in `reduce_gated_into`) | `graph/src/runtime.rs` `reduce_gated_into` | gate 1 (attempt 2, host planes pre-filled with `HOST_SENTINEL = 7.0`) | RED: `an_inactive_route_is_neither_mixed_nor_read` (`seed 0, Output, r0 muted, plane 0: sample 0: 7.0 != 0.0`) and `a_destination_whose_every_route_is_muted_renders_positive_zero` (`Output, 2 muted routes: plane 0 frame 0: 7.0, expected 0.0`). GREEN on the whole file with the sentinel set back to `0.0`, which is the attempt-1 hole. | | 1217-12 | the host-master form skips its sum when every route input is inactive (an early `return` in `reduce_gated_into`) | `graph/src/runtime.rs` `reduce_gated_into` | gate 1, every contributor muted | RED, 1 of 12: `a_destination_whose_every_route_is_muted_renders_positive_zero` (`Output, 2 muted routes: plane 0 frame 0: 7.0, expected 0.0`). | -| 1217-13 | the estimate charges twice the table's bound (`route_activity_bytes * 2`) | `graph-compiler/src/estimate.rs` `resource_estimate` | #1216 gate 5, tightened (attempt 2, NIT-1) | RED: `a_muted_route_seals_one_route_mute_row_after_its_transform` (`the estimate moves by the route-activity charge (545 bytes) and nothing else (route:eq0-main)`); gate 4's lower-bound check stays green. | +| 1217-13 | the estimate charges twice the table's bound (`route_activity_bytes * 2`) | `graph-compiler/src/estimate.rs` `resource_estimate` | #1216 gate 5, tightened (attempt 2, NIT-1) | RED: `a_muted_route_seals_one_route_mute_row_after_its_transform` (deleted by TA4; KEEP catcher graph-compiler `track_delay::a_ring_is_a_named_allocation`) (`the estimate moves by the route-activity charge (545 bytes) and nothing else (route:eq0-main)`); gate 4's lower-bound check stays green. | ## Issue #1220 -- live send coefficients ramp on the render plane @@ -759,3 +759,10 @@ deleted the last three builtins-compiler scalar-oracle pairing tests. The rows s - 916-16 and 916-17: `actual_scalar_nonadjacent_failed_render_materializes_post_fader_before_error` and `actual_scalar_nonadjacent_ramp_retarget_and_failed_retry_stay_at_original_boundaries` are deleted. The allocation_tracker tests these rows name remain. + +## TA4 deletions + +The 2026-10 test audit (TA4, batch 1 mutation measurement at `81a3074fc`) deleted the tests named below. Each one's caught mutants were also red in the KEEP test named beside it. That is the recorded catcher of the deleted test's sampled mutants; the mutation of each row above was not re-run. + +- `the_driver_fed_gain_pan_row_dispatches_every_unit_but_its_inputs`: graph `runtime::tests::a_plan_that_reads_the_session_output_is_refused_at_bind` +- `a_muted_route_seals_one_route_mute_row_after_its_transform`: graph-compiler `track_delay::a_ring_is_a_named_allocation` diff --git a/crates/host-core/tests/timeline.rs b/crates/host-core/tests/timeline.rs index 4ff409b23..024e8aee3 100644 --- a/crates/host-core/tests/timeline.rs +++ b/crates/host-core/tests/timeline.rs @@ -631,7 +631,7 @@ fn a_latent_successor_keeps_the_newest_entries_in_a_history_of_its_own_size() { /// Test value: red if a discontinuity successor moves the sources and not the timeline (it /// restarts it, or steps it back with the source-read clock). The plan has no latency, so its /// history holds one entry and no overlap: the reader's overlap rule is the `source` unit tests' -/// (`a_node_block_reports_the_steps_of_a_source_read_step_back`). +/// (`a_node_block_reports_the_step_of_a_seek_inside_it_or_at_its_first_sample`). #[test] fn a_discontinuity_keeps_the_sources_and_the_timeline_in_step() { const OFFSET: u64 = 3 * Q; diff --git a/crates/protocol/src/controller/tests.rs b/crates/protocol/src/controller/tests.rs index d0b5100f5..55ecf6c9e 100644 --- a/crates/protocol/src/controller/tests.rs +++ b/crates/protocol/src/controller/tests.rs @@ -2361,99 +2361,6 @@ fn a_transport_set_answers_the_state_and_queues_one_event_with_it() { assert!(endpoint.queues_mut().try_dequeue_event().is_err()); } -/// The acked-batch question for the console (#1094): a transaction that changes the slot set but -/// skips a track's entries is refused before any acknowledgement is written, and a peer that -/// retries the same bytes gets the same refusal from the replay cache, never an ack. -/// -/// Red if the controller acknowledged on edit resolution and validated after, or committed the -/// declaration without the entries. -#[test] -fn a_slot_set_change_that_skips_a_track_is_never_acknowledged() { - let fixture = conformance::console_session_fixture(); - let track = fixture.tracks[0].id.clone(); - let mut console = fixture.console.clone(); - console.post_insert.push(session::ConsoleSlot { - slot: session::StableId::parse("desk-limit").expect("ID"), - identity: session::EffectIdentity::Native { - effect_id: session::StableId::parse("miso.true-peak-limiter").expect("ID"), - }, - quality: session::EffectQuality::High, - link_mode: session::LinkMode::Maximum, - }); - let mut endpoint = controller_over(fixture, 8, SampleTime(0)); - let snapshot = endpoint.session().canonical_snapshot().to_owned(); - let edits = [SessionEdit::SetConsole { - console: console.clone(), - ramp_samples: None, - }]; - let input = full_command( - 1, - ExpectedRevision::Exact(SessionRevision(7)), - crate::CommandPayload::SessionTransactionApply(&edits), - ); - let first = process_full_command(&mut endpoint, &input); - let replayed = process_full_command(&mut endpoint, &input); - assert_eq!( - replayed, first, - "the replay cache answers with the same refusal" - ); - let mut fields = [0_u16; 64]; - let crate::DecodedTypedResponseFrame::NonOk { header, payload } = ProtocolCodec::default() - .decode_typed_response(&first, &mut DecodeScratch::new(&mut fields)) - .expect("typed response") - else { - panic!("a slot set change that skips a track was acknowledged"); - }; - assert_eq!(header.status, StatusCode::ValidationFailed); - assert_eq!(payload.diagnostics[0].code, "console.entry_missing"); - assert_eq!(payload.diagnostics[0].operation_index, Some(1)); - assert_eq!(endpoint.session().revision(), SessionRevision(7)); - assert_eq!(endpoint.session().canonical_snapshot(), snapshot); - assert_eq!( - endpoint - .queues() - .report(crate::QueueKind::ReliableEvent) - .occupancy, - 0 - ); - - let mut entries = endpoint.session().compiled().normalized_model().tracks[0] - .console - .clone(); - entries.push(session::ConsoleEntry { - slot: session::StableId::parse("desk-limit").expect("ID"), - bypass: false, - params: Vec::new(), - }); - let whole = [ - SessionEdit::SetConsole { - console, - ramp_samples: None, - }, - SessionEdit::SetTrackConsole { - track_id: track, - console: entries, - ramp_samples: None, - }, - ]; - let response = process_full_command( - &mut endpoint, - &full_command( - 2, - ExpectedRevision::Exact(SessionRevision(7)), - crate::CommandPayload::SessionTransactionApply(&whole), - ), - ); - let mut fields = [0_u16; 64]; - assert!(matches!( - ProtocolCodec::default() - .decode_typed_response(&response, &mut DecodeScratch::new(&mut fields)) - .expect("typed response"), - crate::DecodedTypedResponseFrame::Success { .. } - )); - assert_eq!(endpoint.session().revision(), SessionRevision(8)); -} - #[test] fn every_non_ok_status_has_a_canonical_common_response_payload() { struct Case { @@ -2758,82 +2665,6 @@ fn rejected_engine_rates_have_identical_typed_and_btlv_rollback_diagnostics() { } } -#[test] -fn decoded_track_edit_reaches_same_atomic_session_store() { - let mut controller = controller(4); - let edits = [builtin_edit( - "vocal", - "fader_db", - crate::control_core::Lane::Left, - -2.0, - None, - )]; - let frame = crate::SessionTransactionFrame { - request_id: id(1), - expected_revision: ExpectedRevision::Exact(SessionRevision(7)), - edits: &edits, - }; - let codec = ProtocolCodec::default(); - let mut bytes = vec![ - 0; - codec - .encoded_session_transaction_len(&frame) - .expect("length") - ]; - codec - .encode_session_transaction(&frame, &mut bytes) - .expect("encode"); - let response = controller - .process_session_transaction_btlv(&codec, &bytes, &mut DecodeScratch::new(&mut [0_u16; 1])) - .expect("decode/process"); - assert_eq!(response.status, StatusCode::Ok); - assert_eq!( - controller.session().compiled().normalized_model().tracks[0] - .fader - .left_db, - -2.0 - ); -} - -#[test] -fn decoded_route_edit_reaches_same_atomic_session_store() { - let mut controller = controller(4); - let edits = [SessionEdit::set_control( - crate::control_core::row_address( - crate::control_core::Owner::Route(session::StableId::parse("to-main").expect("ID")), - crate::control_core::Section::Own, - "gain_db", - crate::control_core::Lane::Both, - ) - .expect("a route row"), - -1.0, - None, - )]; - let frame = crate::SessionTransactionFrame { - request_id: id(1), - expected_revision: ExpectedRevision::Exact(SessionRevision(7)), - edits: &edits, - }; - let codec = ProtocolCodec::default(); - let mut bytes = vec![ - 0; - codec - .encoded_session_transaction_len(&frame) - .expect("length") - ]; - codec - .encode_session_transaction(&frame, &mut bytes) - .expect("encode"); - let response = controller - .process_session_transaction_btlv(&codec, &bytes, &mut DecodeScratch::new(&mut [0_u16; 1])) - .expect("decode/process"); - assert_eq!(response.status, StatusCode::Ok); - assert_eq!( - controller.session().compiled().normalized_model().routes[0].gain_db, - -1.0 - ); -} - #[test] fn decoded_invalid_automation_rolls_back_after_final_compilation() { let mut controller = controller(4); diff --git a/crates/protocol/tests/MUTATIONS.md b/crates/protocol/tests/MUTATIONS.md index ac07d7f50..d697693f8 100644 --- a/crates/protocol/tests/MUTATIONS.md +++ b/crates/protocol/tests/MUTATIONS.md @@ -42,7 +42,13 @@ Driver: a scratch script (PR evidence, not committed), one mutation at a time on | M3 | knob edits skip the console entry (`Console` falls through to `effect_mut`) | `model.rs` | `console_knob_edits_change_only_that_tracks_entry`, `every_console_edit_round_trips_to_the_document_the_parser_builds` | | M4 | `parse_track` reads with plain `schema_spec` (optional retired fields skipped) | `session_wire.rs` | `retired_track_rack_fields_are_refused`, `retired_and_console_refused_codes_meet_their_conformance_rows` | | M5 | rack code `1` decodes as `inserts` | `schema.rs` | `parameter_enum_wire_mappings_are_exhaustive_and_roundtrip`, `retired_and_console_refused_codes_meet_their_conformance_rows` | -| M6 | `SetConsole` applied as a no-op | `model.rs` | `every_console_edit_round_trips_...`, `a_slot_set_change_that_skips_a_track_refuses_whole`, `a_slot_set_change_that_skips_a_track_is_never_acknowledged` | +| M6 | `SetConsole` applied as a no-op | `model.rs` | `every_console_edit_round_trips_...`, `a_slot_set_change_that_skips_a_track_refuses_whole`, `a_slot_set_change_that_skips_a_track_is_never_acknowledged` (deleted by TA4; KEEP catcher protocol `console_session_edits::a_slot_set_change_that_skips_a_track_refuses_whole`) | | M7 | the console decoder reads `pre_insert` from the `post_insert` field | `session_wire.rs` | `console_declaration_and_track_entry_opcodes_round_trip_canonically` and the three above | | M8 | `ConsoleSlotFixed` reported as `session.edit.not_found` | `controller.rs` | `retired_and_console_refused_codes_meet_their_conformance_rows` | | M9 | `SetTrackConsole` writes the first track's entries | `model.rs` | `every_console_edit_round_trips_...`, `a_slot_set_change_that_skips_a_track_refuses_whole` | + +## TA4 deletions + +The 2026-10 test audit (TA4, batch 1 mutation measurement at `81a3074fc`) deleted the tests named below. Each one's caught mutants were also red in the KEEP test named beside it. That is the recorded catcher of the deleted test's sampled mutants; the mutation of each row above was not re-run. + +- `a_slot_set_change_that_skips_a_track_is_never_acknowledged`: protocol `console_session_edits::a_slot_set_change_that_skips_a_track_refuses_whole` diff --git a/crates/protocol/tests/edit_ramps.rs b/crates/protocol/tests/edit_ramps.rs index 0e246496b..e0e523802 100644 --- a/crates/protocol/tests/edit_ramps.rs +++ b/crates/protocol/tests/edit_ramps.rs @@ -772,43 +772,3 @@ fn two_controls_that_share_a_ramp_row_must_agree_on_its_length() { assert_eq!(store.revision(), revision); assert_eq!(store.canonical_snapshot(), before); } - -/// #1553 gate 1 at the model, kept by #1561: a `SetControl` writes exactly the field its address -/// names, on the lane it names, and leaves every other byte of the model as it was. -/// -/// Red if the address resolves a different field, lane or value. -#[test] -fn set_control_writes_exactly_the_field_its_address_names() { - let commit = |edit: SessionEdit| { - let store = store(); - store - .prepare_transaction(ExpectedRevision::Exact(store.revision()), &[edit]) - .expect("prepares") - .compiled() - .expect("a compiled transaction") - .normalized_model() - .clone() - }; - let base = store().compiled().normalized_model().clone(); - let mut expected = base.clone(); - expected.revision += 1; - expected - .tracks - .iter_mut() - .find(|t| t.id == id("vocal")) - .unwrap() - .fader - .left_db = -4.5; - assert_eq!( - commit(set_control( - builtin("vocal", FADER_DB, Lane::Left), - -4.5, - None - )), - expected - ); - // The mute row has its own address, and the left lane only. - let model = commit(set_control(builtin("vocal", MUTE, Lane::Left), 1.0, None)); - let track = model.tracks.iter().find(|t| t.id == id("vocal")).unwrap(); - assert!(track.fader.left_mute && !track.fader.right_mute); -} diff --git a/crates/protocol/tests/vca_edits.rs b/crates/protocol/tests/vca_edits.rs index 51a267ba7..3ef011556 100644 --- a/crates/protocol/tests/vca_edits.rs +++ b/crates/protocol/tests/vca_edits.rs @@ -6,14 +6,14 @@ //! and one VCA, `grp`, over `a` and `x`. Every transaction travels through the wire codec first, //! so each assertion is about what a peer's frame does to the committed snapshot. -use protocol::control_core::{ControlError, Lane, Owner, Section, row_address}; +use protocol::control_core::{Lane, Owner, Section, row_address}; use protocol::{ - DecodeScratch, ExpectedRevision, ProtocolCodec, RequestId, SessionEdit, SessionEditError, - SessionRevision, SessionStore, SessionStoreError, SessionTransactionFrame, + DecodeScratch, ExpectedRevision, ProtocolCodec, RequestId, SessionEdit, SessionRevision, + SessionStore, SessionTransactionFrame, }; use session::{ - CompileCaps, Console, ConsoleSlot, DualMonoFader, EffectIdentity, EffectQuality, LinkMode, - SessionModel, StableId, Vca, canonical_session_json, parse_session_json, + CompileCaps, DualMonoFader, SessionModel, StableId, Vca, canonical_session_json, + parse_session_json, }; const BUILTINS: &str = r#"{ "polarity_invert": false, "trim_db": 0.0, "hpf_hz": 20.0, "lpf_hz": 20000.0, "delay_samples": 0 }"#; @@ -274,253 +274,3 @@ fn vca_edits_commit_and_snapshot_canonically() { assert_snapshot(&store, expected, "remove the leaf"); assert_eq!(snapshot_vcas(&store).len(), 1); } - -fn refusal_codes(error: &SessionStoreError, operations: usize) -> Vec<(String, String)> { - let SessionStoreError::Validation { - operation_index, - diagnostics, - } = error - else { - panic!("expected a final-validation refusal, got {error:?}"); - }; - assert_eq!(*operation_index, operations); - diagnostics - .diagnostics() - .iter() - .map(|diagnostic| { - ( - diagnostic.code.as_str().to_owned(), - diagnostic.path.to_string(), - ) - }) - .collect() -} - -enum Refusal { - /// An edit-resolution refusal at this operation index. - Edit(usize, SessionEditError), - /// A final-validation refusal carrying exactly these `(code, path)` diagnostics. - Validation(&'static [(&'static str, &'static str)]), -} - -/// Gate 2, the refusals. Each transaction opens with an edit that commits on its own (a `0702` on -/// `grp`), then: -/// -/// - `0701` at an unknown ID, and the strip edit `0211` at the VCA ID `grp` (after a `0007`, which -/// it requires), are `session.edit.not_found`, and a `SET_CONTROL` at an unknown VCA ID or at -/// `grp` read as a strip is `control.address_unknown`; -/// - removing member track `x` or member submix `bus` without rewriting `grp`, or a nested VCA its -/// parent still lists, is `reference.missing_entity` at the member path; a `0700` that closes a -/// cycle is `vca.cycle` on both VCAs; a `0700` reusing a track's ID is `id.duplicate`; -/// - a `SET_CONTROL` past the fader domain (+30 dB) is `control.domain` at its edit; -/// -/// and the revision and snapshot are unchanged after each. Removing `x` while the same -/// transaction rewrites `grp` without it commits. -/// -/// Red if a strip edit reaches a VCA, if `0701` or a `SET_CONTROL` at an unknown ID is skipped -/// silently, if `0701`, `RemoveTrack` or `RemoveSubmix` cascades into the member lists that name -/// it, if a `SET_CONTROL` clamps an out-of-domain offset instead of refusing it, or if a VCA edit commits without the -/// transaction's final validation (a dangling member, a cycle or a collision committed, or the -/// opening edit committed alone). -#[test] -fn vca_refusals_commit_nothing() { - let opening = || vca_row("grp", "offset_db", Lane::Both, -6.0); - let unknown = SessionEditError::Control(ControlError::AddressUnknown); - let unity = || fader(0.0, 0.0, false, false); - let cases: Vec<(&str, Vec, Refusal)> = vec![ - ( - "0701 at an unknown ID", - vec![SessionEdit::RemoveVca { - vca_id: id("ghost"), - }], - Refusal::Edit(1, SessionEditError::NotFound), - ), - ( - "SET_CONTROL at an unknown VCA ID", - vec![vca_row("ghost", "offset_db", Lane::Both, 0.0)], - Refusal::Edit(1, unknown.clone()), - ), - ( - "a builtin row at a VCA ID", - vec![SessionEdit::set_control( - row_address( - Owner::Strip(id("grp")), - Section::Builtins, - "trim_db", - Lane::Left, - ) - .expect("the trim row"), - -3.0, - None, - )], - Refusal::Edit(1, unknown.clone()), - ), - ( - "a fader row at a VCA ID", - vec![SessionEdit::set_control( - row_address( - Owner::Strip(id("grp")), - Section::Builtins, - "fader_db", - Lane::Left, - ) - .expect("the fader row"), - -12.0, - None, - )], - Refusal::Edit(1, unknown.clone()), - ), - ( - "a pan row at a VCA ID", - vec![SessionEdit::set_control( - row_address( - Owner::Strip(id("grp")), - Section::Builtins, - "pan", - Lane::Left, - ) - .expect("the pan row"), - 0.5, - None, - )], - Refusal::Edit(1, unknown.clone()), - ), - ( - "0211 at a VCA ID", - vec![ - // A console that differs from the committed one, so that the check of the VCA ID - // is reached; the edit refuses at its own index, before any final validation. - SessionEdit::SetConsole { - console: Console { - pre_insert: vec![ConsoleSlot { - slot: id("eq"), - identity: EffectIdentity::Native { - effect_id: id("miso.parametric-eq"), - }, - quality: EffectQuality::Normal, - link_mode: LinkMode::DualMono, - }], - post_insert: Vec::new(), - }, - ramp_samples: None, - }, - SessionEdit::SetTrackConsole { - track_id: id("grp"), - console: Vec::new(), - ramp_samples: None, - }, - ], - Refusal::Edit(2, SessionEditError::NotFound), - ), - ( - "remove member track x without rewriting grp", - vec![SessionEdit::RemoveTrack { track_id: id("x") }], - Refusal::Validation(&[("reference.missing_entity", "$.vcas[0].members[1]")]), - ), - ( - "0701 removing a VCA its parent still lists", - vec![ - SessionEdit::UpsertVca { - vca: vca("inner", unity(), &["a"]), - }, - SessionEdit::UpsertVca { - vca: vca("grp", unity(), &["a", "inner", "x"]), - }, - SessionEdit::RemoveVca { - vca_id: id("inner"), - }, - ], - Refusal::Validation(&[("reference.missing_entity", "$.vcas[0].members[1]")]), - ), - ( - "0700 closing a cycle", - vec![ - SessionEdit::UpsertVca { - vca: vca("inner", unity(), &["grp"]), - }, - SessionEdit::UpsertVca { - vca: vca("grp", unity(), &["a", "inner"]), - }, - ], - Refusal::Validation(&[("vca.cycle", "$.vcas[0]"), ("vca.cycle", "$.vcas[1]")]), - ), - ( - "0700 reusing a track ID", - vec![SessionEdit::UpsertVca { - vca: vca("a", unity(), &["x"]), - }], - Refusal::Validation(&[("id.duplicate", "$.vcas[1].id")]), - ), - ( - "remove member submix bus without rewriting grp", - vec![ - SessionEdit::UpsertVca { - vca: vca("grp", unity(), &["a", "bus", "x"]), - }, - SessionEdit::RemoveRoute { - route_id: id("a-bus"), - }, - SessionEdit::RemoveRoute { - route_id: id("bus-out"), - }, - SessionEdit::RemoveSubmix { - submix_id: id("bus"), - }, - ], - Refusal::Validation(&[("reference.missing_entity", "$.vcas[0].members[1]")]), - ), - ( - "SET_CONTROL past the fader domain", - vec![vca_row("grp", "offset_db", Lane::Left, 30.0)], - Refusal::Edit(1, SessionEditError::Control(ControlError::Domain)), - ), - ]; - for (name, tail, refusal) in cases { - let mut store = store(); - let revision = store.revision(); - let snapshot = store.canonical_snapshot().to_owned(); - let mut edits = vec![opening()]; - edits.extend(tail); - let error = store - .apply_transaction(ExpectedRevision::Exact(revision), &through_the_wire(&edits)) - .expect_err(name); - match refusal { - Refusal::Edit(operation_index, expected) => assert_eq!( - error, - SessionStoreError::Edit { - operation_index, - error: expected, - }, - "{name}" - ), - Refusal::Validation(expected) => { - let codes = refusal_codes(&error, edits.len()); - let expected: Vec<(String, String)> = expected - .iter() - .map(|(code, path)| ((*code).to_owned(), (*path).to_owned())) - .collect(); - assert_eq!(codes, expected, "{name}"); - } - } - assert_eq!(store.revision(), revision, "{name}"); - assert_eq!(store.canonical_snapshot(), snapshot, "{name}"); - } - - // The positive control: the same removal commits when the transaction rewrites `grp`. - let mut store = store(); - let rewritten = vca("grp", fader(-6.0, -6.0, false, false), &["a"]); - commit( - &mut store, - &[ - opening(), - SessionEdit::RemoveTrack { track_id: id("x") }, - SessionEdit::UpsertVca { - vca: rewritten.clone(), - }, - ], - ); - let mut expected = base(); - expected.tracks.retain(|track| track.id != id("x")); - expected.vcas = vec![rewritten]; - assert_snapshot(&store, expected, "remove x and rewrite grp"); -} diff --git a/crates/rack/src/lib.rs b/crates/rack/src/lib.rs index d404f7601..74dc84cb1 100644 --- a/crates/rack/src/lib.rs +++ b/crates/rack/src/lib.rs @@ -2084,8 +2084,6 @@ const _: () = assert!( impl PreparedSlot { #[inline(always)] fn has_active_lanes(&self) -> bool { - #[cfg(test)] - TEST_PREPARED_ACTIVITY_QUERIES.with(|count| count.set(count.get() + 1)); self.active_lanes != 0 } @@ -2097,20 +2095,9 @@ impl PreparedSlot { #[cfg(test)] thread_local! { - static TEST_PREPARED_ACTIVITY_QUERIES: std::cell::Cell = const { std::cell::Cell::new(0) }; static TEST_PREPARED_DROPS: std::cell::Cell = const { std::cell::Cell::new(0) }; } -#[cfg(test)] -fn reset_prepared_activity_observation() { - TEST_PREPARED_ACTIVITY_QUERIES.with(|count| count.set(0)); -} - -#[cfg(test)] -fn prepared_activity_observation() -> usize { - TEST_PREPARED_ACTIVITY_QUERIES.with(std::cell::Cell::get) -} - /// The staged planar tiles for one ordered folded cohort. pub struct FoldCohort<'a> { lane_ids: &'a [usize], @@ -4997,141 +4984,6 @@ mod tests { exercise_trace_case(&seam_failure, Some(2), 149); } - #[test] - fn prepared_slot_dispatch_uses_constant_activity_checks() { - reset_prepared_activity_observation(); - let full = [true; 4]; - let specs = [ - TraceSpec { - id: 0, - mask: full, - seam: SeamSide::UpstreamOfSeam, - mono_capable: true, - fail: None, - delta: 1.0, - }, - TraceSpec { - id: 1, - mask: full, - seam: SeamSide::SeamSide, - mono_capable: false, - fail: None, - delta: 2.0, - }, - ]; - TEST_TRACE.with(|trace| *trace.borrow_mut() = TraceObservation::with_queues(&specs)); - let mut chain = BankChain::new( - AoSoaScratch::new(BankWidth::Four, 4).expect("scratch"), - vec![true; 4].into_boxed_slice(), - specs.into_iter().map(trace_slot).collect(), - ) - .expect("chain"); - let mut planes = Planes { - left: (0..4).map(|lane| vec![lane as f32; 4]).collect(), - right: (0..4).map(|lane| vec![32.0 + lane as f32; 4]).collect(), - }; - chain.force_mono_collapse_off(true); - chain - .run(&mut planes, 4, 0, LiveSnapshot::ALL) - .expect("ordinary run"); - assert!(!chain.is_collapsed()); - chain.force_mono_collapse_off(false); - chain.arm_mono_collapse(true); - chain - .run(&mut planes, 4, 4, LiveSnapshot::ALL) - .expect("collapsed run"); - assert!(chain.is_collapsed()); - assert_eq!(chain.collapses(), 1); - let trace = TEST_TRACE.with(|trace| trace.borrow().clone()); - assert_eq!( - trace.ordered_events(), - &[ - Some(TraceEvent { - kind: TraceKind::Begin, - stage: 0, - first_sample: 0, - frames: 0, - queue_before: 2, - arithmetic_before: 0 - }), - Some(TraceEvent { - kind: TraceKind::Begin, - stage: 1, - first_sample: 0, - frames: 0, - queue_before: 2, - arithmetic_before: 0 - }), - Some(TraceEvent { - kind: TraceKind::Dual, - stage: 0, - first_sample: 0, - frames: 4, - queue_before: 1, - arithmetic_before: 0 - }), - Some(TraceEvent { - kind: TraceKind::Dual, - stage: 1, - first_sample: 0, - frames: 4, - queue_before: 1, - arithmetic_before: 0 - }), - Some(TraceEvent { - kind: TraceKind::Begin, - stage: 0, - first_sample: 4, - frames: 0, - queue_before: 1, - arithmetic_before: 1 - }), - Some(TraceEvent { - kind: TraceKind::Begin, - stage: 1, - first_sample: 4, - frames: 0, - queue_before: 1, - arithmetic_before: 1 - }), - Some(TraceEvent { - kind: TraceKind::Mono, - stage: 0, - first_sample: 4, - frames: 4, - queue_before: 0, - arithmetic_before: 1 - }), - Some(TraceEvent { - kind: TraceKind::Dual, - stage: 1, - first_sample: 4, - frames: 4, - queue_before: 0, - arithmetic_before: 1 - }), - ] - ); - assert_eq!(trace.queues[..2], [0, 0]); - assert_eq!(trace.arithmetic[..2], [2, 2]); - assert_eq!( - trace_plane_bits(&planes), - ( - (0..4) - .map(|lane| vec![(lane as f32 + 6.0).to_bits(); 4]) - .collect(), - (0..4) - .map(|lane| vec![(lane as f32 + 6.0).to_bits(); 4]) - .collect(), - ) - ); - assert_eq!( - prepared_activity_observation(), - 10, - "ordinary, prefix-mono and seam-dual guards plus two stage publications" - ); - } - /// Every bit pattern a 32-bit word can carry that a permutation must not touch: quiet and /// signalling NaN payloads, both signed zeroes, both signed subnormals and both infinities. const HOSTILE: [f32; 10] = [ diff --git a/crates/session/src/edit_ramp.rs b/crates/session/src/edit_ramp.rs index 47a3fd3cc..f828547b4 100644 --- a/crates/session/src/edit_ramp.rs +++ b/crates/session/src/edit_ramp.rs @@ -250,26 +250,4 @@ mod tests { ); assert!(EditRamps::new().is_untouched()); } - - #[test] - fn clearing_a_target_drops_its_rows_and_nothing_else() { - let strip = |name: &str| EditRampTarget::Strip(id(name)); - let mut ramps = EditRamps::new(); - ramps.set(&strip("a"), EditRampRow::Matrix, Some(5)); - ramps.set(&strip("a"), EditRampRow::Link, Some(6)); - ramps.set(&strip("b"), EditRampRow::Link, Some(7)); - ramps.set( - &EditRampTarget::Route(id("a")), - EditRampRow::RouteGain, - Some(8), - ); - ramps.clear_target(&strip("a")); - assert_eq!( - ramps.entries(), - vec![ - (strip("b"), EditRampRow::Link, 7), - (EditRampTarget::Route(id("a")), EditRampRow::RouteGain, 8), - ] - ); - } } diff --git a/crates/session/tests/invalid_matrix.rs b/crates/session/tests/invalid_matrix.rs index 72dfc4f3f..07025a8c0 100644 --- a/crates/session/tests/invalid_matrix.rs +++ b/crates/session/tests/invalid_matrix.rs @@ -53,38 +53,6 @@ fn model_case( *count += 1; } -#[test] -fn u64_model_fields_accept_the_full_unsigned_domain() { - // `revision` is not a full-domain leaf: it is bounded at `MAX_SESSION_REVISION` (#1503) and - // its refusal is pinned in `diagnostic_parity.rs`. Nor is an automation segment sample: it is - // bounded below `automation::TIME_LIMIT`, `2^53` (pinned there too); its largest value is - // checked here. - type Mutation = fn(&mut SessionModel); - let largest_sample = automation::TIME_LIMIT - 1; - let cases: &[(Mutation, &str, u64)] = &[ - ( - |session| session.sources[0].frames = u64::MAX, - "$.sources[0].frames", - u64::MAX, - ), - ( - |session| { - session.automation[0].segments[0].start_sample = automation::TIME_LIMIT - 2; - session.automation[0].segments[0].end_sample = automation::TIME_LIMIT - 1; - }, - "$.automation[0].segments[0].end_sample", - largest_sample, - ), - ]; - - for (mutate, path, largest) in cases { - let mut session = parse_session_json(EXAMPLE).expect("fixture parses"); - mutate(&mut session); - let canonical = canonical_session_json(&session).expect("full domain canonicalizes"); - assert!(canonical.contains(&format!("\"{largest}\"")), "{path}"); - } -} - fn replaced(needle: &str, replacement: &str) -> String { let compact = compact_json(EXAMPLE); let needle = json_fragment(needle); diff --git a/crates/source/src/lib.rs b/crates/source/src/lib.rs index 345ae6d88..6346f4fb8 100644 --- a/crates/source/src/lib.rs +++ b/crates/source/src/lib.rs @@ -4159,82 +4159,6 @@ mod tests { assert_eq!(output, sought); } - #[test] - fn host_submission_is_fifo_wraparound_and_never_accepts_a_prefix() { - let (producer, mut consumer, _) = session_ring(config(2, 4, 4)).expect("ring"); - let mut host = producer.into_host_chunk_provider(RATE); - let left_a = [1.0, 2.0, 3.0, 4.0]; - let right_a = [11.0, 12.0, 13.0, 14.0]; - let planes_a = [&left_a[..], &right_a[..]]; - host.submit(chunk(1, 0, &planes_a, 4, false)) - .expect("first"); - let left_b = [5.0, 6.0, 7.0, 8.0]; - let right_b = [15.0, 16.0, 17.0, 18.0]; - let planes_b = [&left_b[..], &right_b[..]]; - assert!(matches!( - host.submit(chunk(1, 4, &planes_b, 4, false)), - Err(HostChunkError::Full { .. }) - )); - assert_eq!(host.telemetry().cumulative_written_frames, 4); - let mut left_out = [99.0; 4]; - let mut right_out = [99.0; 4]; - let report = { - let mut output = [&mut left_out[..], &mut right_out[..]]; - consumer.read_block(&mut output).expect("render") - }; - assert_eq!(report.copied_frames, 4); - assert_eq!(left_out, left_a); - assert_eq!(right_out, right_a); - host.submit(chunk(1, 4, &planes_b, 4, false)).expect("wrap"); - { - let mut output = [&mut left_out[..], &mut right_out[..]]; - consumer.read_block(&mut output).expect("second render"); - } - assert_eq!(left_out, left_b); - assert_eq!(right_out, right_b); - } - - #[test] - fn underrun_is_positive_zero_and_eof_is_not_an_underrun() { - let (producer, mut consumer, _) = session_ring(config(1, 4, 8)).expect("ring"); - let mut host = producer.into_host_chunk_provider(RATE); - let mut output_plane = [-1.0; 4]; - let missing = { - let mut output = [&mut output_plane[..]]; - consumer.read_block(&mut output).expect("missing") - }; - assert_eq!(output_plane.map(f32::to_bits), [0; 4]); - assert_eq!(missing.underrun_frames, 4); - assert!(missing.underrun_event); - let delayed = [0.0, 0.0, 0.0, 0.0]; - host.submit(chunk(1, 0, &[&delayed], 4, false)) - .expect("late source frame"); - let final_plane = [0.25, -0.5]; - let planes = [&final_plane[..]]; - host.submit(chunk(1, 4, &planes, 2, true)).expect("final"); - let eof = { - let mut output = [&mut output_plane[..]]; - consumer.read_block(&mut output).expect("eof") - }; - assert_eq!(eof.copied_frames, 2); - assert_eq!(eof.underrun_frames, 0); - assert!(eof.end_of_region); - assert_eq!(output_plane[..2], final_plane); - assert_eq!( - output_plane[2..] - .iter() - .map(|sample| sample.to_bits()) - .collect::>(), - [0; 2] - ); - let after_eof = { - let mut output = [&mut output_plane[..]]; - consumer.read_block(&mut output).expect("after eof") - }; - assert_eq!(after_eof.underrun_frames, 0); - assert_eq!(after_eof.cumulative_underrun_events, 1); - } - #[test] fn retained_played_block_supports_repeat_fanout_and_auto_recycles_once() { let (producer, mut consumer, _) = session_ring(config(2, 4, 8)).expect("ring"); @@ -4329,44 +4253,6 @@ mod tests { } } - /// Full PCM, short PCM with a zero tail, and silence overwrite every poisoned destination. - #[test] - fn copy_channel_preserves_pcm_and_zeroes_missing_frames() { - let (producer, mut consumer, _) = session_ring(config(2, 4, 8)).expect("ring"); - let mut host = producer.into_host_chunk_provider(RATE); - - // No retained quantum at all: the whole plane is the underrun. - assert_copy_channel(&consumer, 0, &[0.0; 4], "before any block"); - - // `-0.0` and a subnormal-adjacent value in the payload, so a copy that was quietly - // replaced by a zero fill could not pass by comparing equal. - let left_full = [1.0, -0.0, f32::MIN_POSITIVE, 4.0]; - let right_full = [-1.0, -2.0, -3.0, -4.0]; - host.submit(chunk(1, 0, &[&left_full, &right_full], 4, false)) - .expect("whole-quantum block"); - let left_short = [5.0, -6.0]; - let right_short = [-5.0, 6.0]; - host.submit(chunk(1, 4, &[&left_short, &right_short], 2, true)) - .expect("short EOF block"); - - // Whole quantum: every sample is the supplied PCM. - let full = consumer.begin_block(); - assert_eq!(full.copied_frames, 4); - assert_copy_channel(&consumer, 0, &left_full, "whole quantum, left"); - assert_copy_channel(&consumer, 1, &right_full, "whole quantum, right"); - - // Short submission: the copied prefix, then a tail that must still come out `+0.0`. - let short = consumer.begin_block(); - assert_eq!(short.copied_frames, 2); - assert_copy_channel(&consumer, 0, &[5.0, -6.0, 0.0, 0.0], "short quantum, left"); - assert_copy_channel(&consumer, 1, &[-5.0, 6.0, 0.0, 0.0], "short quantum, right"); - - // Past the end of the region: nothing is retained, so the whole plane is zeroed. - let after = consumer.begin_block(); - assert!(after.end_of_region); - assert_copy_channel(&consumer, 0, &[0.0; 4], "past the end of the region"); - } - fn test_mapping(index: u32) -> SourceGraphTrackMapping { SourceGraphTrackMapping { node: GraphNodeId::TrackStage { @@ -4749,40 +4635,6 @@ mod tests { .expect("errored claim's block recycled on next begin"); } - #[test] - fn seek_switches_at_boundary_and_discards_older_queued_audio() { - let (producer, mut consumer, _) = session_ring(config(1, 4, 12)).expect("ring"); - let mut host = producer.into_host_chunk_provider(RATE); - let old_a = [1.0, 1.0, 1.0, 1.0]; - let old_b = [2.0, 2.0, 2.0, 2.0]; - host.submit(chunk(1, 0, &[&old_a], 4, false)) - .expect("old a"); - host.submit(chunk(1, 4, &[&old_b], 4, false)) - .expect("old b"); - host.try_seek(SourceCommand::Seek { - generation: SourceGeneration(2), - frame: SourceFrame(100), - }) - .expect("seek"); - let fresh = [9.0, 8.0, 7.0, 6.0]; - host.submit(chunk(2, 100, &[&fresh], 4, true)) - .expect("fresh"); - let mut output_plane = [0.0; 4]; - let mut output = [&mut output_plane[..]]; - let report = consumer.read_block(&mut output).expect("new generation"); - assert_eq!(report.active_generation, SourceGeneration(2)); - assert!(report.generation_changed); - assert_eq!(output_plane, fresh); - assert_eq!(consumer.telemetry().stale_generation_discard_count, 2); - assert!(matches!( - host.try_seek(SourceCommand::Seek { - generation: SourceGeneration(2), - frame: SourceFrame(0), - }), - Err(SourceSeekError::GenerationNotStrictlyIncreasing { .. }) - )); - } - #[test] fn registry_and_host_shape_errors_are_stable() { assert_eq!( @@ -4841,297 +4693,6 @@ mod tests { assert_eq!(right, right_in); } - #[test] - fn rejected_host_submission_publishes_nothing_and_leaves_the_producer_untouched() { - let (producer, mut consumer, _) = session_ring(config(1, 4, 8)).expect("ring"); - let mut host = producer.into_host_chunk_provider(RATE); - host.try_seek(SourceCommand::Seek { - generation: SourceGeneration(2), - frame: SourceFrame(100), - }) - .expect("seek"); - let before = host.telemetry(); - // A chunk stamped before the admitted seek is stale; validation precedes any publication. - let stale = [1.0, 2.0, 3.0, 4.0]; - assert_eq!( - host.submit(chunk(1, 0, &[&stale], 4, false)), - Err(HostChunkError::StaleGeneration { - active: SourceGeneration(2), - submitted: SourceGeneration(1), - }) - ); - // A short chunk that does not end the region has the wrong frame count. - let short = [1.0, 2.0, 3.0]; - assert_eq!( - host.submit(chunk(2, 100, &[&short], 3, false)), - Err(HostChunkError::FrameCount { - quantum_frames: 4, - submitted_frames: 3, - end_of_region: false, - }) - ); - assert_eq!(host.telemetry(), before); - let fresh = [5.0, 6.0, 7.0, 8.0]; - host.submit(chunk(2, 100, &[&fresh], 4, true)) - .expect("fresh submission"); - // The render sees only the fresh block: nothing rejected was published, so there is no - // stale block to discard ahead of it. - let mut output = [7.0_f32; 4]; - let report = consumer.read_block(&mut [&mut output]).expect("fresh read"); - assert_eq!(report.active_generation, SourceGeneration(2)); - assert_eq!(report.copied_frames, 4); - assert_eq!(output, fresh); - assert_eq!(consumer.telemetry().stale_generation_discard_count, 0); - } - - #[cfg(not(target_arch = "wasm32"))] - #[test] - fn one_four_channel_source_fans_out_to_three_inputs_in_the_sequential_executor() { - use core::num::NonZeroUsize; - use effect_contract::{LatencySamples, TailSamples}; - use engine::{ - QuantumFrames, - realtime::{PlanarBufferMut, RenderEnvelope, RenderIo, RenderTime}, - }; - use graph::{ - DependencyLevel, GraphEdge, GraphEdgeId, GraphNode, GraphPortId, GraphPortKind, - GraphResourceEstimate, GraphRuntimeBindings, GraphRuntimeProcessor, GraphSpec, - PreparedGraphPlan, PreparedGraphPlanParts, StableGraphId, TrackStage, - }; - - struct Noop; - impl GraphRuntimeProcessor for Noop { - fn process( - &mut self, - _block: graph::GraphBindingBlock<'_>, - ) -> Result<(), engine::realtime::RenderError> { - Ok(()) - } - } - - let envelope = RenderEnvelope { - sample_rate: RATE, - quantum: QuantumFrames(2), - output_channels: NonZeroUsize::new(2).expect("two"), - }; - let track = |id| graph::GraphNodeId::TrackStage { - track_id: StableGraphId::parse(id).expect("track ID"), - stage: TrackStage::Input, - }; - let inputs = [track("a"), track("b"), track("c")]; - let output = graph::GraphNodeId::Output { - output_id: StableGraphId::parse("main").expect("output ID"), - }; - let edge = |source: graph::GraphNodeId, route: &str| GraphEdge { - id: GraphEdgeId::RouteSource { - route_id: StableGraphId::parse(route).expect("route ID"), - }, - source: GraphPortId { - node: source, - kind: GraphPortKind::MainOutput, - effect_port: None, - }, - destination: GraphPortId { - node: output.clone(), - kind: GraphPortKind::MainInput, - effect_port: None, - }, - path: format!("$.{route}"), - }; - let schedule = vec![ - inputs[0].clone(), - inputs[1].clone(), - inputs[2].clone(), - output.clone(), - ]; - let make_plan = || { - PreparedGraphPlan::new(PreparedGraphPlanParts { - plan_id: 10, - spec: GraphSpec { - nodes: schedule - .iter() - .cloned() - .map(|id| GraphNode { - id, - latency: LatencySamples(0), - tail: TailSamples::Finite(0), - }) - .collect(), - ports: Vec::new(), - edges: vec![ - edge(inputs[0].clone(), "a"), - edge(inputs[1].clone(), "b"), - edge(inputs[2].clone(), "c"), - ], - }, - sequential_schedule: schedule.clone(), - dependency_levels: vec![ - DependencyLevel { - level: 0, - nodes: inputs.to_vec(), - }, - DependencyLevel { - level: 1, - nodes: vec![output.clone()], - }, - ], - route_timings: Vec::new(), - inserted_delays: Vec::new(), - buffer_assignments: Vec::new(), - estimate: GraphResourceEstimate { - logical_nodes: 0, - materialized_nodes: 0, - edges: 0, - schedule_items: 0, - dependency_levels: 0, - reductions: 0, - routes: 0, - effects: 0, - audio_buffer_samples: 0, - total_delay_samples: 0, - delay_bytes: 0, - graph_metadata_bytes: 0, - declared_effect_bytes: 0, - effect_bank_count: 0, - effect_bank_scratch_bytes: 0, - effect_bank_runtime_buffer_bytes: 0, - effect_bank_metadata_bytes: 0, - builtin_bank_bytes: 0, - builtin_bank_scratch_bytes: 0, - builtin_bank_count: 0, - largest_allocation_bytes: 0, - incremental_plan_bytes: 0, - session_plus_plan_bytes: 0, - }, - envelope, - required_bindings: [ - inputs[0].clone(), - inputs[1].clone(), - inputs[2].clone(), - output.clone(), - ] - .to_vec(), - routes: Vec::new(), - track_delays: Vec::new(), - effects: Vec::new(), - effect_controls: Vec::new(), - banks: Vec::new(), - builtin_banks: Vec::new(), - observers: Vec::new(), - effect_observations: Vec::new(), - }) - }; - let mapping = |node, left_channel, right_channel| SourceGraphTrackMapping { - node, - source_index: 0, - left_channel, - right_channel, - }; - let normal_mappings = || { - vec![ - mapping(inputs[0].clone(), 0, 1), - mapping(inputs[1].clone(), 3, 2), - mapping(inputs[2].clone(), 0, 2), - ] - }; - let make_source_set = |mappings| { - let config = PcmSourceRingConfig { - channel_count: 4, - quantum_frames: QuantumFrames(2), - frame_capacity: 2, - initial_generation: SourceGeneration(1), - }; - let (producer, consumer, resources) = session_ring(config).expect("ring"); - let mut host = producer.into_host_chunk_provider(RATE); - let c0 = [1.0_f32, 1.0]; - let c1 = [2.0_f32, 2.0]; - let c2 = [4.0_f32, 4.0]; - let c3 = [8.0_f32, 8.0]; - host.submit(HostPlanarChunk { - sample_rate_hz: RATE, - generation: SourceGeneration(1), - start_frame: SourceFrame(0), - planes: &[&c0, &c1, &c2, &c3], - frames: 2, - end_of_region: true, - }) - .expect("source PCM"); - session_source_set( - envelope, - vec![SourceGraphSource::new(consumer, resources, 0, 0)], - test_timeline(2), - mappings, - ) - .expect("source set") - }; - let bindings = || GraphRuntimeBindings { - envelope, - nodes: vec![graph::GraphNodeBinding::new(output.clone(), Box::new(Noop))], - observers: Vec::new(), - }; - let assert_transactional_rejection = |source_set, graph_bindings| match make_plan() - .bind_with_source_set(graph_bindings, source_set) - { - Ok(_) => panic!("invalid source claims unexpectedly bound"), - Err(failure) => { - assert_eq!(failure.code, "source.graph.binding_mismatch"); - assert!(!failure.source_set.claims().is_empty()); - } - }; - assert_transactional_rejection( - make_source_set(vec![ - mapping(inputs[0].clone(), 0, 1), - mapping(inputs[1].clone(), 3, 2), - ]), - bindings(), - ); - assert_transactional_rejection( - make_source_set(vec![ - mapping(inputs[0].clone(), 0, 1), - mapping(inputs[1].clone(), 3, 2), - mapping(inputs[2].clone(), 0, 2), - mapping(track("unexpected"), 0, 1), - ]), - bindings(), - ); - assert_transactional_rejection( - make_source_set(vec![ - mapping(inputs[0].clone(), 0, 1), - mapping(inputs[0].clone(), 3, 2), - mapping(inputs[1].clone(), 3, 2), - mapping(inputs[2].clone(), 0, 2), - ]), - bindings(), - ); - assert_transactional_rejection( - make_source_set(normal_mappings()), - GraphRuntimeBindings { - envelope, - nodes: vec![ - graph::GraphNodeBinding::new(output.clone(), Box::new(Noop)), - graph::GraphNodeBinding::new(inputs[0].clone(), Box::new(Noop)), - ], - observers: Vec::new(), - }, - ); - let mut sequential = match make_plan() - .bind_with_source_set(bindings(), make_source_set(normal_mappings())) - { - Ok(plan) => plan, - Err(failure) => panic!("sequential bind failed: {}", failure.code), - }; - let mut sequential_pcm = [0.0_f32; 4]; - sequential - .render( - RenderIo { - output: PlanarBufferMut::try_new(&mut sequential_pcm, 2, 2, 2).expect("output"), - }, - RenderTime { absolute_sample: 0 }, - ) - .expect("render"); - assert_eq!(sequential_pcm, [10.0, 10.0, 10.0, 10.0]); - } - fn plane_bits(plane: &[f32]) -> Vec { plane.iter().map(|sample| sample.to_bits()).collect() } @@ -6933,93 +6494,6 @@ mod tests { assert_eq!(end.timeline_block(-1, Q), plain(i64::MIN)); } - /// Batch 16a fold M1: a source-read clock step-back (#1641 D4) overlaps a newer entry on - /// an older one, so the timeline steps where the newer entry starts and again where it - /// ends, with no seek entry in sight. - /// - /// Test value: red if `timeline_block` reports only seek entries (a node block that - /// straddles the step-back reads 88 of its 128 samples 256 off), or misses the step where - /// the newer entry ends. - #[test] - fn a_node_block_reports_the_steps_of_a_source_read_step_back() { - let (_producer, mut consumer) = timeline(4); - blocks_at(&mut consumer, &[0, QU, 2 * QU, 3 * QU, 2 * QU]); - assert_eq!(consumer.timeline_at(2 * QU), 512); - assert_eq!( - consumer.timeline_block(216, Q), - TimelineSpan { - start: 216, - step: Some(TimelineStep { - offset: 40, - timeline: 512, - }), - } - ); - // The newer entry ends at 384, where the older entry of the same samples resumes. - assert_eq!( - consumer.timeline_block(344, Q), - TimelineSpan { - start: 600, - step: Some(TimelineStep { - offset: 40, - timeline: 384, - }), - } - ); - // Every node block with one step at most agrees with `timeline_at` sample by sample. - for first in (0..5 * QU).step_by(8) { - let span = consumer.timeline_block(i128::from(first), Q); - for i in 0..Q { - assert_eq!( - span_value(span, i), - consumer.timeline_at(first + u64::from(i)), - "block from {first}, sample {i}" - ); - } - } - } - - /// Batch 16a fold 2, M1: after a step-back the oldest held entry is not the lowest - /// source-read sample, so a sample before every held entry is extrapolated back from an - /// entry that does not start next to it, and the timeline can step where a newer entry - /// starts although that entry is no seek. - /// - /// Test value: red if `timeline_block` tests only for a seek entry where no held entry - /// starts at or before `s - 1` (`K` 3: samples 124 to 127 read 128 off; `K` 2: samples 56 - /// to 127 read 256 off). - #[test] - fn a_step_back_steps_where_no_held_entry_starts_before_it() { - let (_producer, mut consumer) = timeline(3); - blocks_at(&mut consumer, &[0, QU, 2 * QU, 3 * QU, 3 * QU, 4 * QU]); - assert_eq!(consumer.timeline_at(383), 383); - assert_eq!(consumer.timeline_at(384), 512); - assert_eq!( - consumer.timeline_block(260, Q), - TimelineSpan { - start: 260, - step: Some(TimelineStep { - offset: 124, - timeline: 512, - }), - } - ); - - let (_producer, mut consumer) = timeline(2); - blocks_at(&mut consumer, &[0, QU, 2 * QU, 3 * QU, 2 * QU]); - assert_eq!(consumer.timeline_at(255), 255); - assert_eq!(consumer.timeline_at(256), 512); - assert_eq!( - consumer.timeline_block(200, Q), - TimelineSpan { - start: 200, - step: Some(TimelineStep { - offset: 56, - timeline: 512, - }), - } - ); - } - /// Batch 16a fold 2, M1 sweep: `K` 1 to 5, a step-back of 64, 128, 200, 256 or 384 /// samples after four plain blocks, and a node block from every fourth sample. /// diff --git a/crates/source/tests/randomized.rs b/crates/source/tests/randomized.rs index ba467b374..9476da3d9 100644 --- a/crates/source/tests/randomized.rs +++ b/crates/source/tests/randomized.rs @@ -1,8 +1,7 @@ //! Issue #1051: the source ring against an independent model, over random edge-biased schedules. //! -//! `seek_schedule_model.rs` drives the production `PcmSourceRing` through 256 frozen schedules of -//! one fixed shape: one channel, a quantum of four, one scripted sequence of submissions, seeks -//! and renders per schedule. This file draws the schedules instead, per seed and edge-biased: +//! This file draws the schedules that drive the production `PcmSourceRing`, per seed and +//! edge-biased: //! //! * the quantum from 1 to 16 frames, the capacity from one to eight quanta, one to three //! channels, a starting generation of 1 or far from it; From 5337e9df25183c64b99feabfd675ab36c9379c42 Mon Sep 17 00:00:00 2001 From: BL Date: Tue, 20 Oct 2026 01:48:14 +0000 Subject: [PATCH 06/10] Delete measured-redundant host and tool tests; update references (TA4) Co-Authored-By: Claude Opus 5.5 --- ...unning-browser-session-in-the-rust-host.md | 2 +- ...nvalid-a-typed-held-preparation-timed-r.md | 4 +- ...-source-ring-by-the-warm-prime-headroom.md | 2 +- ...ed-send-gain-mute-and-matrix-automation.md | 2 +- ...overlays-and-edit-ramps-in-the-capi-row.md | 9 +- ...delete-digest-type-size-and-unrun-tests.md | 2 +- Cargo.lock | 1 - crates/capi/src/runtime/live_tests.rs | 932 +----------------- crates/capi/src/runtime/supersede_tests.rs | 299 +----- crates/capi/src/runtime/tests.rs | 66 -- docs/C_ABI_V1_QUALIFICATION.md | 2 +- hosts/host-web/Cargo.toml | 3 - hosts/host-web/MUTATIONS.md | 8 +- hosts/host-web/src/tests.rs | 532 ---------- hosts/host-web/tests/control_parity.rs | 146 --- scripts/check-browser-expected-resources.py | 3 +- tools/audit/src/fixture_builtins.rs | 61 -- tools/audit/src/vectorization.rs | 136 --- tools/bench/src/floor.rs | 23 +- tools/console-workload/src/lib.rs | 46 - tools/console-workload/tests/automation.rs | 34 +- .../tests/eq_ramping_scenario.rs | 5 - tools/console-workload/tests/paired_spans.rs | 28 - tools/console-workload/tests/placement.rs | 22 - tools/realtime-policy/tests/policy/binary.rs | 10 - .../tests/policy/drain/indirect.rs | 16 - .../tests/policy/unsafe_ownership.rs | 103 -- tools/session-validator/tests/validate.rs | 28 - 28 files changed, 25 insertions(+), 2500 deletions(-) diff --git a/.github/ISSUE_SPECS/1290-replace-the-running-browser-session-in-the-rust-host.md b/.github/ISSUE_SPECS/1290-replace-the-running-browser-session-in-the-rust-host.md index fb4212b07..1eb81aeeb 100644 --- a/.github/ISSUE_SPECS/1290-replace-the-running-browser-session-in-the-rust-host.md +++ b/.github/ISSUE_SPECS/1290-replace-the-running-browser-session-in-the-rust-host.md @@ -366,7 +366,7 @@ now only through the test-support switch `structural_command_for_test` (the refu **Gates -> tests** (`cargo test --locked -p host-web --features host-web/test-support`): - gate 1: `tests::structural_apply::a_rebuild_swaps_without_a_gap` -- gate 2: `a_live_edit_is_part_of_the_base_the_successor_is_prepared_from` (the ramp is in flight +- gate 2: `a_live_edit_is_part_of_the_base_the_successor_is_prepared_from` (deleted by TA4; KEEP catcher host-web `tests::structural_apply::a_master_designated_after_an_empty_boot_reads_as_a_boot_designation`) (the ramp is in flight at the adoption block) - gate 3: `a_malformed_transaction_is_refused_and_changes_nothing`, `a_rate_or_quantum_change_is_refused_as_a_required_reprepare`, diff --git a/.github/ISSUE_SPECS/1350-tighten-the-seek-entry-points-source-id-invalid-a-typed-held-preparation-timed-r.md b/.github/ISSUE_SPECS/1350-tighten-the-seek-entry-points-source-id-invalid-a-typed-held-preparation-timed-r.md index 94cbc0625..7fcdcaf6d 100644 --- a/.github/ISSUE_SPECS/1350-tighten-the-seek-entry-points-source-id-invalid-a-typed-held-preparation-timed-r.md +++ b/.github/ISSUE_SPECS/1350-tighten-the-seek-entry-points-source-id-invalid-a-typed-held-preparation-timed-r.md @@ -36,7 +36,7 @@ Four seek-path defects found in the #1275 review are closed: - **Untimed reads.** `begin_block` (`:1103`) and `read_block` (`:1077`) use `SeekClock::Now`, which applies an anchored seek at once and ignores its anchor. Production renders through `begin_block_at` (`:1721`). The untimed paths are called only by the crate's own tests and by - `crates/source/tests/randomized.rs:454` and `crates/source/tests/seek_schedule_model.rs:486`. + `crates/source/tests/randomized.rs:454` and `crates/source/tests/seek_schedule_model.rs:486` (deleted by TA4). ## Decisions frozen for this slice @@ -69,7 +69,7 @@ Four seek-path defects found in the #1275 review are closed: - `crates/capi/src/ffi.rs`, `crates/capi/src/runtime/error.rs` (or the #1309 successor file) - `crates/source/src/lib.rs`, `crates/source/tests/randomized.rs`, - `crates/source/tests/seek_schedule_model.rs` + `crates/source/tests/seek_schedule_model.rs` (deleted by TA4) ## Non-goals diff --git a/.github/ISSUE_SPECS/1406-grow-the-default-source-ring-by-the-warm-prime-headroom.md b/.github/ISSUE_SPECS/1406-grow-the-default-source-ring-by-the-warm-prime-headroom.md index ab4cbd20a..df1f3cbb1 100644 --- a/.github/ISSUE_SPECS/1406-grow-the-default-source-ring-by-the-warm-prime-headroom.md +++ b/.github/ISSUE_SPECS/1406-grow-the-default-source-ring-by-the-warm-prime-headroom.md @@ -160,7 +160,7 @@ engine, the published ABI layout, the SDK and the browser host derive the same r `hosts/host-web/web/miso-engine-v1-audio-worklet-host.d.ts` and `sdk/src/browser/shipped-host.d.ts` (the ring comments only), `scripts/test-web-audioworklet.mjs` (gate 4's case at `:1103-1128` only) -- `hosts/host-web/src/tests.rs` (`default_ring_covers_stall_tolerance` and the doc comment of +- `hosts/host-web/src/tests.rs` (`default_ring_covers_stall_tolerance` (deleted by TA4; KEEP catcher host-core `prepare::default_ring_derivation_covers_the_stall_and_two_in_flight_quanta`) and the doc comment of `ring_prefill_survives_stall` only), `hosts/host-web/MUTATIONS.md` (rows 7 and 8 only) - `hosts/host-web/src/lib.rs` (the doc comment of the ring override field only), `hosts/host-web/DEPLOYMENT.md` (the ring sentence only), diff --git a/.github/ISSUE_SPECS/1654-render-stored-send-gain-mute-and-matrix-automation.md b/.github/ISSUE_SPECS/1654-render-stored-send-gain-mute-and-matrix-automation.md index d362ffcc2..00c9436aa 100644 --- a/.github/ISSUE_SPECS/1654-render-stored-send-gain-mute-and-matrix-automation.md +++ b/.github/ISSUE_SPECS/1654-render-stored-send-gain-mute-and-matrix-automation.md @@ -729,7 +729,7 @@ Gates (all green), with red-without-the-feature evidence (once each): - Gate 4: capi `a_hand_send_mute_ors_with_its_curve_on_the_c_abi`; host-web `a_hand_send_mute_ors_with_its_curve_on_both_hosts`. Red with the curve replacing the static mute (not ORed): "the hand mute shuts the send while the curve is open". -- Gate 5: capi `an_output_route_entry_is_refused_on_the_c_abi`; host-web +- Gate 5: capi `an_output_route_entry_is_refused_on_the_c_abi` (deleted by TA4; KEEP catcher graph `program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers`); host-web `an_output_route_entry_is_refused_alike_on_both_hosts` (one diagnostic, `control.automation.target`). - Gate 6: zero render allocations in host-core gates 1, 2 and 7 (`bench_support::alloc` thread diff --git a/.github/ISSUE_SPECS/1696-charge-the-monitor-overlays-and-edit-ramps-in-the-capi-row.md b/.github/ISSUE_SPECS/1696-charge-the-monitor-overlays-and-edit-ramps-in-the-capi-row.md index 655e37318..8d0ad8784 100644 --- a/.github/ISSUE_SPECS/1696-charge-the-monitor-overlays-and-edit-ramps-in-the-capi-row.md +++ b/.github/ISSUE_SPECS/1696-charge-the-monitor-overlays-and-edit-ramps-in-the-capi-row.md @@ -65,7 +65,8 @@ hosts charge the same, because the row is computed once, in the core. (`assert_capi_retained_bytes_are_complete`, `:867`; driver `:995`). It observes the compile of one session; it never populates a solo, a master or a pending candidate, so a term that the commit path adds later is outside it. The browser's ceilings are - `hosts/host-web/tests/retained_ceilings.rs` and `tests/browser-v1/expected.json` + `hosts/host-web/tests/retained_ceilings.rs` (deleted by TA4: batch 1 measured both its tests + redundant) and `tests/browser-v1/expected.json` (`resourceCeilings`, `:69`). ## Decisions to take (the implementer proposes, the coordinator rules) @@ -104,7 +105,7 @@ hosts charge the same, because the row is computed once, in the core. admissions. 3. Re-pins of every moved row, each measured on the final tree with its reason: the capi `maximum_capi_retained_bytes` fixtures that sit at a measured floor, the browser - `resourceCeilings` in `expected.json` and the `retained_ceilings.rs` budgets + `resourceCeilings` in `expected.json` and the `retained_ceilings.rs` budgets (deleted by TA4) (`scripts/check-browser-expected-resources.py` measures the browser), and the SDK or fixture files that carry a figure. Owner decision 4 applies: budgets stay ceilings, not exact counts, except the `capi_retained_bytes` equality, which stays exact. @@ -117,7 +118,7 @@ hosts charge the same, because the row is computed once, in the core. - `crates/controls/src/effective.rs` (a reserve or a capacity accessor on `MonitorOverlay`) and `crates/session/src/edit_ramp.rs` (a ceiling function over the row counts), with their tests. - `crates/capi/tests/resource_lifecycle.rs`, `crates/capi/src/runtime/live_tests.rs` and - `live_peak_tests.rs` where a floor moves; `hosts/host-web/tests/retained_ceilings.rs`, + `live_peak_tests.rs` where a floor moves; `hosts/host-web/tests/retained_ceilings.rs` (deleted by TA4), `hosts/host-web/tests/browser-v1/expected.json`. - This spec file's decision record. @@ -141,7 +142,7 @@ hosts charge the same, because the row is computed once, in the core. 2. The existing exact equality `capi_retained_bytes == observed terms` still holds on every fixture, with the new term added to the right-hand side as an observed value. 3. The same session on the browser: `WebResourceReport` reads the same core charge; the - `retained_ceilings.rs` budgets and `check-browser-expected-resources.py` pass with the moved + `retained_ceilings.rs` budgets (deleted by TA4) and `check-browser-expected-resources.py` pass with the moved rows re-pinned from measurement, each with its reason. 4. A control plane at the exact `maximum_control_retained_bytes` that the session needs without the overlay is refused when the overlay is populated, on both hosts, with the typed resource diff --git a/.github/ISSUE_SPECS/1722-delete-digest-type-size-and-unrun-tests.md b/.github/ISSUE_SPECS/1722-delete-digest-type-size-and-unrun-tests.md index 4dd21be2d..cedda1f4a 100644 --- a/.github/ISSUE_SPECS/1722-delete-digest-type-size-and-unrun-tests.md +++ b/.github/ISSUE_SPECS/1722-delete-digest-type-size-and-unrun-tests.md @@ -177,7 +177,7 @@ owner rules (ASK 1): - Product code: `tools/audit` `builtins.rs` and `builtins_graph.rs` fixture identities are checks in the tool itself, not test assertions. - Ceilings: `graph` `runtime.rs` executor-table bound, `bypass_resources.rs`, allocation trackers. -- `track_delay.rs` `the_estimate_charges_each_lane_its_own_ring`: four bytes per `f32` sample is the +- `track_delay.rs` `the_estimate_charges_each_lane_its_own_ring` (deleted by TA4; KEEP catcher graph-compiler `track_delay::a_ring_is_a_named_allocation`): four bytes per `f32` sample is the product's accounting rule, not a struct total. ### Docs updated diff --git a/Cargo.lock b/Cargo.lock index d31b4413e..2074705d6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -992,7 +992,6 @@ dependencies = [ "effect-contract", "engine", "host-core", - "lane", "math", "protocol", "serde_json", diff --git a/crates/capi/src/runtime/live_tests.rs b/crates/capi/src/runtime/live_tests.rs index 72419c66c..1042951ad 100644 --- a/crates/capi/src/runtime/live_tests.rs +++ b/crates/capi/src/runtime/live_tests.rs @@ -1482,84 +1482,6 @@ fn a_replayed_live_edit_writes_nothing() { assert_eq!(rig.summary().0, revision); } -/// Gate 3 (d): a live edit while a candidate is pending goes to the candidate, which renders it. -#[test] -fn a_live_edit_while_a_candidate_is_pending_reaches_the_candidate() { - let document = long_session(10, 48_000); - let mut rig = Rig::new(&document); - let model = parse_session_json(&document).expect("model"); - rig.step(); - assert_eq!(rig.apply(&[content_edit(&model)]), crate::RESULT_OK); - assert_eq!(rig.summary().3, 1, "a candidate is pending"); - assert_eq!(rig.writes(Epoch::Pending, "eq3"), (0, 0)); - - let mut edits = fader_edit( - "eq3", - DualMonoFader { - left_db: -6.0, - right_db: 3.0, - left_mute: false, - right_mute: true, - }, - ); - edits.extend(matrix_edit( - &StableId::parse("eq3").expect("eq3"), - MatrixOrPan::Pan { - left: 0.5, - right: 0.75, - smoothing_samples: 8, - }, - )); - assert_eq!(rig.apply(&edits), crate::RESULT_OK); - assert_eq!(rig.summary().3, 1, "still the one candidate"); - // Two fader cells (left and right dB differ), one mute cell (right only), one matrix cell. - assert_eq!(rig.writes(Epoch::Pending, "eq3"), (3, 1)); - assert_eq!(rig.writes(Epoch::Current, "eq3"), (0, 0)); - - rig.render(); - rig.seek_to_start(); - // The candidate ramps its fader and mute from their prepared values over the session's ramps - // and its pan over its own 8-sample window; the control starts at the target. - let ramps = model.control_smoothing_samples(); - let k = window( - rig.latency(), - ramps.fader.max(ramps.mute).max(8), - rig.quantum, - ); - let blocks = k + 3; - let rendered: Vec<_> = (0..blocks).map(|_| rig.step()).collect(); - // The controls take the same rebuild from the same history, so they carry what the candidate - // carried (#1276); one bakes the edits into the rebuild's transaction, one leaves them out. - let control = |baked: &[SessionEdit]| { - let mut control = Rig::new(&document); - control.step(); - let mut structural = vec![content_edit(&model)]; - structural.extend_from_slice(baked); - assert_eq!(control.apply(&structural), crate::RESULT_OK); - assert_eq!(control.summary().3, 1, "the control rebuilds"); - control.render(); - control.seek_to_start(); - (0..blocks).map(|_| control.step()).collect::>() - }; - let reference = control(&edits); - let unedited = control(&[]); - let mut differs = false; - for block in k as usize..blocks as usize { - let expected = &reference[block]; - assert!(expected.iter().any(|sample| *sample != 0.0)); - assert_eq!( - bits(&rendered[block]), - bits(expected), - "candidate block {block}" - ); - differs |= bits(&unedited[block]) != bits(expected); - } - assert!( - differs, - "the edit is audible against the candidate's own values" - ); -} - /// The plan's watermark as a host reads it: `(revision, first sample, flags, exact count)`. fn watermark(rig: &Rig) -> (u64, u64, u64, u64) { let (result, watermark) = crate::ffi::test_plan_watermark(rig.plan); @@ -8003,84 +7925,6 @@ mod set_control { } } - /// #1631. A `matrix_mode` switch under a stored pan entry is refused with the row rule's - /// `control.inactive` at the entry's path, before any commit: the revision, the committed - /// document, the replay log and the reliable lane do not move and no candidate is prepared. The - /// switch together with the entry's retarget to the matrix row commits, and a switch on a strip - /// with no pan or matrix entry stays live. - /// - /// Red mutation: run the classifier's row rule only when the automation table changes -> the - /// switch commits live and the model holds an entry that its own next rebuild refuses. - #[test] - fn a_mode_switch_under_a_stored_pan_entry_is_refused_before_any_commit() { - let document = effect_session(10, 48_000); - let mut rig = Rig::new(&document); - rig.step(); - let ride = SessionEdit::UpsertAutomation { - automation: session::Automation { - id: id("pan-ride"), - target: builtin("eq0", PAN, Lane::Left), - segments: vec![session::AutomationSegment { - shape: session::AutomationShape::Linear, - start_sample: 0, - end_sample: 960, - start_value: 0.0, - end_value: 0.5, - unit: session::ParameterUnit::Linear, - }], - offset: session::AutomationOffset::default(), - }, - }; - assert_eq!( - rig.apply(&[ride]), - crate::RESULT_OK, - "a pan entry on a pan strip" - ); - - let switch = set(own("eq0", MATRIX_MODE, Lane::Both), 1.0, None); - let before = (refusal_state(&rig), rig.summary()); - assert_eq!( - rig.apply(core::slice::from_ref(&switch)), - crate::RESULT_COMPILE_REJECTED - ); - let diagnostics = String::from_utf8_lossy(&rig.last_error()).into_owned(); - assert!( - diagnostics.contains("control.inactive") - && diagnostics.contains("$.automation[id=pan-ride].target"), - "{diagnostics}" - ); - assert_eq!( - (refusal_state(&rig), rig.summary()), - before, - "nothing committed, nothing prepared" - ); - - let retarget = SessionEdit::SetAutomationTarget { - automation_id: id("pan-ride"), - target: builtin("eq0", MATRIX_LL, Lane::Both), - }; - let revision = rig.summary().0; - assert_eq!( - rig.apply(&[switch, retarget]), - crate::RESULT_OK, - "the switch with the entry retargeted" - ); - let after = rig.summary(); - assert_eq!( - (after.0, after.3), - (revision + 1, 0), - "one revision, live, no candidate" - ); - - let other = set(own("eq1", MATRIX_MODE, Lane::Both), 1.0, None); - assert_eq!( - rig.apply(&[other]), - crate::RESULT_OK, - "no entry, no refusal" - ); - assert_eq!(rig.summary().3, 0, "still live"); - } - // #1709: live level values are composed in the canonical floating-point environment. /// #1709 D2 on the C ABI: a live move made while the host's control thread runs FTZ, DAZ and @@ -8405,273 +8249,6 @@ mod set_control { offset: session::AutomationOffset::default(), } } - - /// The ten-track session at 48 kHz with `eq0` riding its fader, VCA `v` holding `eq0` and - /// `eq1` (which has no automation), and `change` applied. - pub(super) fn document(change: impl FnOnce(&mut SessionModel)) -> String { - with_model(&long_session(10, 48_000), |model| { - model.automation.push(ride()); - model.vcas.push(vca_of("v", &["eq0", "eq1"])); - change(model); - }) - } - - /// A VCA of `db` on both lanes holding `members`. - fn vca_at(name: &str, db: f32, members: &[&str]) -> session::Vca { - let mut vca = vca_of(name, members); - vca.fader.left_db = db; - vca.fader.right_db = db; - vca - } - - /// `(eq0's offsets-cell writes [left, right], eq1's fader/mute cell writes)` in the current - /// epoch. - pub(super) fn writes(rig: &Rig) -> ([Option; 2], [u64; 4]) { - let snapshot = crate::ffi::test_transaction_snapshot(rig.session); - let epoch = snapshot.provider_epoch; - let offsets = snapshot - .strip_offsets_cells - .iter() - .find(|(row, strip, _)| *row == epoch && &**strip == "eq0") - .map(|&(_, _, writes)| writes) - .expect("eq0's producer"); - let fader = snapshot - .strip_cells - .iter() - .find(|(row, strip, ..)| *row == epoch && &**strip == "eq1") - .map(|&(_, _, fader, _)| fader) - .expect("eq1's producer"); - (offsets, fader) - } - - /// One case: a rig on `before` plays four blocks and takes `edits` with path `path`, one - /// revision on the same plan with no candidate. From the end of a jump of `jump` samples - /// and the first grid ramp after it (two grid periods of 64), the output equals a plan - /// prepared from the committed session fed the same PCM from frame 0, and no render block - /// allocates or frees. `heard`: the output differs from `before`'s own plan there. Returns - /// the cell writes the edit made, as [`writes`] counts them. - fn case( - label: &str, - before: &str, - edits: &[SessionEdit], - path: protocol::EditPath, - jump: u32, - heard: bool, - ) -> ([Option; 2], [u64; 4]) { - let mut rig = Rig::new(before); - for _ in 0..4 { - rig.step(); - } - let (revision, _, epoch, pending) = rig.summary(); - let (offsets_before, fader_before) = writes(&rig); - let bytes = rig.transaction(edits); - let (result, response) = rig.send(&bytes); - assert_eq!(result, crate::RESULT_OK, "{label}"); - assert_eq!(edit_path_of(&response), path, "{label}: path"); - assert_eq!( - (rig.summary().0, rig.summary().2, rig.summary().3), - (revision + 1, epoch, pending), - "{label}: one revision, the same plan, no candidate" - ); - let (offsets_after, fader_after) = writes(&rig); - let committed = rig.snapshot(); - let k = window(rig.latency(), jump + 128, rig.quantum); - let edit_block = rig.block; - let mut live = Vec::new(); - for _ in 0..k + 4 { - let (pcm, used) = rig.step_counted(); - assert_eq!( - (used.allocations, used.deallocations), - (0, 0), - "{label}: a render block allocated or freed" - ); - live.push(pcm); - } - let reference = Reference::run(&committed, rig.block); - let unedited = Reference::run(before, rig.block); - let mut moved = false; - for (offset, pcm) in live.iter().enumerate().skip(k as usize) { - let block = edit_block as usize + offset; - assert_eq!( - bits(pcm), - bits(&reference[block]), - "{label}: block {block} renders the committed session's plan" - ); - moved |= bits(pcm) != bits(&unedited[block]); - } - assert_eq!( - moved, heard, - "{label}: heard exactly when the edit moves a value" - ); - let delta = |after: Option, before: Option| { - after.zip(before).map(|(after, before)| after - before) - }; - ( - [ - delta(offsets_after[0], offsets_before[0]), - delta(offsets_after[1], offsets_before[1]), - ], - core::array::from_fn(|cell| fader_after[cell] - fader_before[cell]), - ) - } - - /// The session's fader length, in samples: the `VcaOffset` row's length of a VCA edit with - /// no length of its own. - pub(super) fn fader_length(document: &str) -> u32 { - parse_session_json(document) - .expect("model") - .control_smoothing_samples() - .fader - } - - /// #1649 gates 1 and 3 (C ABI). A -6 dB move of `v` on a playing engine is `live`: the - /// automated member `eq0` takes one offsets-cell write per lane and the plain member `eq1` - /// one `FaderDb` (a `Both` record: one write to each fader cell), and from the end of the - /// jump and the first grid ramp after it the output equals a plan prepared with `v` at - /// -6 dB and the same automation. With the edit's own ramp of 256 samples both members - /// settle within 256 samples (a longer ramp on either would still differ in the window). - /// A move of `v` to its current value, and a move of a VCA that does not reach `eq0`, - /// write no offsets cell and move no bit of `eq0`. - /// - /// Test value: red if a VCA move does not reach the offsets cell (the ride keeps the old - /// composition, so the window differs from the plan), if the automated or the plain - /// member takes another length than the edit's, if the plain member loses its record, or - /// if an unchanged offset still writes the cell or retargets the lane. - #[test] - fn a_vca_move_over_an_automated_member_is_live_and_renders_the_prepared_plan() { - bench_support::alloc::assert_installed(); - let before = document(|_| {}); - let fader = fader_length(&before); - let both = |ramp| vec![set(vca_row("v", VCA_OFFSET_DB, Lane::Both), -6.0, ramp)]; - for (label, ramp, jump) in [ - ("the session's length", None, fader), - ("the edit's own 256 samples", Some(256), 256), - ] { - let (offsets, fader_cells) = case( - label, - &before, - &both(ramp), - protocol::EditPath::Live, - jump, - true, - ); - assert_eq!(offsets, [Some(1), Some(1)], "{label}: eq0's offsets cells"); - assert_eq!(fader_cells, [1, 1, 0, 0], "{label}: eq1's one `FaderDb`"); - } - let (offsets, fader_cells) = case( - "v to its current value", - &before, - &[set(vca_row("v", VCA_OFFSET_DB, Lane::Both), 0.0, None)], - protocol::EditPath::ModelOnly, - fader, - false, - ); - assert_eq!((offsets, fader_cells), ([Some(0), Some(0)], [0; 4])); - let far = document(|model| model.vcas.push(vca_of("far", &["eq2"]))); - let (offsets, _) = case( - "a VCA that does not reach eq0", - &far, - &[set(vca_row("far", VCA_OFFSET_DB, Lane::Both), -6.0, None)], - protocol::EditPath::Live, - fader, - true, - ); - assert_eq!(offsets, [Some(0), Some(0)], "eq0's cells are not written"); - } - - /// #1649 gate 4 (C ABI). Each edit that changes which VCAs reach the automated member, or - /// how many VCAs the session has, is `live` and from the end of the jump renders a plan - /// prepared from the committed session: `eq0` added to a second VCA; that VCA (holding - /// `eq0`) made a member of `v`, so `v` reaches `eq0` through it; a new VCA that reaches - /// `eq0`; the first VCA of a session that had none; a VCA that reaches `eq0` removed. - /// - /// Test value: red if any of these rebuilds, if a lane no VCA reached had no cell to write - /// when a VCA is added, or if a removed VCA leaves its offset in `S`. - #[test] - fn vca_reach_and_count_changes_over_an_automated_member_are_live() { - bench_support::alloc::assert_installed(); - let upsert = |vca: session::Vca| SessionEdit::UpsertVca { vca }; - let base = document(|model| { - model.vcas[0] = vca_at("v", -3.0, &["eq0", "eq1"]); - model.vcas.push(vca_at("w", -4.0, &["eq2"])); - }); - let nested = document(|model| { - model.vcas[0] = vca_at("v", -3.0, &["eq1"]); - model.vcas.push(vca_at("w", -4.0, &["eq0"])); - }); - let bare = document(|model| model.vcas.clear()); - let fader = fader_length(&base); - let cases: [(&str, &str, Vec); 5] = [ - ( - "eq0 added to a second VCA", - &base, - vec![upsert(vca_at("w", -4.0, &["eq0", "eq2"]))], - ), - ( - "the VCA holding eq0 nested in v", - &nested, - vec![upsert(vca_at("v", -3.0, &["eq1", "w"]))], - ), - ( - "a new VCA that reaches eq0", - &base, - vec![upsert(vca_at("x", -2.0, &["eq0"]))], - ), - ( - "the first VCA of the session", - &bare, - vec![upsert(vca_at("v", -6.0, &["eq0", "eq1"]))], - ), - ( - "a VCA that reaches eq0 removed", - &base, - vec![SessionEdit::RemoveVca { vca_id: id("v") }], - ), - ]; - for (label, before, edits) in cases { - let (offsets, _) = - case(label, before, &edits, protocol::EditPath::Live, fader, true); - assert_eq!(offsets, [Some(1), Some(1)], "{label}: eq0's offsets cells"); - } - } - - /// #1649 (U3 fold, MAJOR 4). Two moves of `v` in turn on a playing engine: -6 dB, then, - /// after the first has settled, -2 dB. Each is `live`, and from the end of its jump and - /// the first grid ramp after it the output equals a plan prepared from the committed - /// session, so the automated member hears the second write as it heard the first. - /// - /// Test value: red if render applies only the first write of an offsets cell (a writer - /// whose sequence restarts at each write is acked and never heard), which a single move - /// cannot show. - #[test] - fn a_second_vca_move_over_an_automated_member_is_heard() { - let before = document(|_| {}); - let fader = fader_length(&before); - let mut rig = Rig::new(&before); - for _ in 0..4 { - rig.step(); - } - let k = window(rig.latency(), fader + 128, rig.quantum); - for db in [-6.0, -2.0] { - let bytes = - rig.transaction(&[set(vca_row("v", VCA_OFFSET_DB, Lane::Both), db, None)]); - let (result, response) = rig.send(&bytes); - assert_eq!(result, crate::RESULT_OK, "v at {db} dB"); - assert_eq!(edit_path_of(&response), protocol::EditPath::Live); - let committed = rig.snapshot(); - let edit_block = rig.block; - let live: Vec> = (0..k + 4).map(|_| rig.step()).collect(); - let reference = Reference::run(&committed, rig.block); - for (offset, pcm) in live.iter().enumerate().skip(k as usize) { - let block = edit_block as usize + offset; - assert_eq!( - bits(pcm), - bits(&reference[block]), - "v at {db} dB: block {block} renders the committed session's plan" - ); - } - } - } } /// #1648 D2 and #1649 across a plan swap (batch 17 U3 fold): a level value that reaches an @@ -9618,35 +9195,6 @@ mod set_control { } } - /// U3 fold, MAJOR 2 (R4). An offset-only `UpsertAutomation` of the ride (a hand move's - /// stored offset, #1650) inside a structural transaction renders as the same upsert sent - /// alone. On this branch the offset is stored and not yet heard (#1650a); with #1650b it - /// moves `S` and reaches the carried lane as the join's offsets record. - /// - /// Test value: red if an offset carried across a swap is heard differently from the same - /// offset committed without one (with #1650b: a lost record, or a jump over another - /// length). - #[test] - fn an_offset_only_upsert_inside_a_rebuild_renders_as_it_does_alone() { - let document = riding(); - let model = parse_session_json(&document).expect("model"); - let mut ride = model.automation[0].clone(); - ride.offset = session::AutomationOffset { - left_db: -4.5, - right_db: -4.5, - }; - let upsert = SessionEdit::UpsertAutomation { automation: ride }; - let mut rigs = warm(&document); - let mut edits = vec![upsert.clone()]; - edits.extend(add_muted_track(&model, "added")); - send(&mut rigs[0], &edits, protocol::EditPath::Rebuild, "R4"); - let bytes = rigs[1].transaction(&[upsert]); - assert_eq!(rigs[1].send(&bytes).0, crate::RESULT_OK, "R4: alone"); - let (first, _) = lockstep(&mut rigs, 40); - assert_eq!(rigs[0].summary().3, 0, "R4: the successor is adopted"); - assert_eq!(first, None, "R4: first difference (block, sample)"); - } - /// U3 fold, MAJOR 2 (R6, R7). The batch 13b held-ramp obligation owed at a swap: the /// muted first track steps from 0 dB to -9 dB at sample 3,000 inside an unmute ramp, so /// the step is only remembered and the lane owes a move where the ramp ends. A rebuild @@ -9702,70 +9250,6 @@ mod set_control { } } - /// #1711 G4 (A1): an exact hand unmute that frees a lane held over a moving ride - /// discharges the move the hold owed. The first track rides linearly from 0 to -6 dB over - /// `[0, 1,280)`, holds -6 dB to 2,320, then rides on to -12 dB. A hand mute (ramp 256) at - /// block 4 and an exact hand unmute (ramp 0) at block 8 hold the lane over moving grid - /// points (a move is owed, then the unmute frees the lane at its block's entry); a hand - /// mute (256) at block 12 and a hand unmute (200) at block 16 hold it again where the ride - /// is flat, so nothing is remembered in that hold, whose end `E` is 2,248. From block 9 on - /// every sample equals a rig that took only the second hold, and every block is - /// allocation-free. - /// - /// Test value: red if the free write at the unmute's entry does not discharge the owed - /// move (the `owed = false` of `HeldRampObligation::block`): the stale obligation then - /// lands a move over `J` at `E` with nothing remembered (first difference block 17). - #[test] - fn an_exact_unmute_that_frees_a_held_lane_discharges_the_owed_move() { - bench_support::alloc::assert_installed(); - let document = session_with(|model, first, _| { - let lin = session::AutomationShape::Linear; - model.automation.push(entry( - first, - vec![ - segment(lin, (0, 1_280), (0.0, -6.0)), - segment(lin, (1_280, 2_320), (-6.0, -6.0)), - segment(lin, (2_320, SOURCE_FRAMES), (-6.0, -12.0)), - ], - )); - }); - let track = first_track(&document); - let mute = |muted: bool, ramp: u32| { - [set( - builtin(&track, MUTE, Lane::Both), - f32::from(u8::from(muted)), - Some(ramp), - )] - }; - let first_hold = [(4, mute(true, 256)), (8, mute(false, 0))]; - let second_hold = [(12, mute(true, 256)), (16, mute(false, 200))]; - let mut a = Rig::new(&document); - let mut r = Rig::new(&document); - for _ in 0..40 { - let block = a.block; - for (at, edit) in first_hold.iter().chain(&second_hold) { - if *at == block { - send(&mut a, edit, protocol::EditPath::Live, "both holds"); - } - } - for (at, edit) in &second_hold { - if *at == block { - send(&mut r, edit, protocol::EditPath::Live, "the second hold"); - } - } - let (x, used) = a.step_counted(); - assert_eq!( - (used.allocations, used.deallocations), - (0, 0), - "block {block} allocated or freed" - ); - let y = r.step(); - if block >= 9 { - assert_eq!(bits(&x), bits(&y), "block {block}"); - } - } - } - /// U3 fold, MINOR 8 (#1648 D2, the reposition's seeding). A live fader move to -6 dB /// (the session's 960 samples) and a rebuild that adds a ride on the same track commit in /// one gap between blocks. The ride holds 0 dB until sample 100 and -6 dB after, so the @@ -9861,177 +9345,9 @@ mod set_control { /// #1650b: a hand move on a fader that stored automation drives, on the C ABI. mod automated_hand_move { - use super::automated_vca::{document, fader_length, ride, writes}; + use super::automated_vca::ride; use super::*; - /// The rows of `eq0`'s `fader_db` in the list: per lane, the bits of the value and - /// `automated`. - fn fader_rows(rig: &mut Rig) -> Vec<(Option, u32, bool)> { - let (list, ..) = control_list_all_c(rig.session, &mut rig.request, 256); - list.iter() - .filter(|entry| entry.address.owner_id.as_deref() == Some("eq0")) - .filter_map(|entry| { - control_of(entry) - .filter(|row| row.name == "fader_db") - .map(|row| (entry.address.lane, row.value.to_bits(), row.automated)) - }) - .collect() - } - - /// What one leg of gate 2 gives: the reply, the committed document, the offsets-cell writes - /// the move made and every block from the edit on. - struct Leg { - reply: Vec, - committed: String, - offsets: [Option; 2], - blocks: Vec>, - } - - /// `edits` on a rig on `before` after four blocks: `live`, one revision on the same plan - /// with no candidate; then `blocks` blocks, none of which allocates or frees. - fn leg(label: &str, before: &str, edits: &[SessionEdit], blocks: u64) -> Leg { - let mut rig = Rig::new(before); - for _ in 0..4 { - rig.step(); - } - let (revision, _, epoch, pending) = rig.summary(); - let (offsets_before, _) = writes(&rig); - let bytes = rig.transaction(edits); - let (result, reply) = rig.send(&bytes); - assert_eq!(result, crate::RESULT_OK, "{label}"); - assert_eq!(edit_path_of(&reply), protocol::EditPath::Live, "{label}"); - assert_eq!( - (rig.summary().0, rig.summary().2, rig.summary().3), - (revision + 1, epoch, pending), - "{label}: one revision, the same plan, no candidate" - ); - let (offsets_after, _) = writes(&rig); - let offsets = [0, 1].map(|lane| { - offsets_after[lane] - .zip(offsets_before[lane]) - .map(|(after, before)| after - before) - }); - let committed = rig.snapshot(); - let mut out = Vec::new(); - for _ in 0..blocks { - let (pcm, used) = rig.step_counted(); - assert_eq!( - (used.allocations, used.deallocations), - (0, 0), - "{label}: a render block allocated or freed" - ); - out.push(pcm); - } - Leg { - reply, - committed, - offsets, - blocks: out, - } - } - - /// #1650b gate 2 (C ABI) and root's ruling R17-1. `eq0` rides its fader on both lanes - /// under VCA `v`. `SET_CONTROL fader_db = +3` on its left lane is `live`, one revision on - /// the same plan, and writes the left lane's offsets cell once and the right lane's not at - /// all; the committed document stores `+3` as the ride's left offset and keeps the static - /// fader; from the end of the jump and the first grid ramp after it every block equals a - /// fresh plan of that document, and none allocates. The list reads `+3` on the left row - /// and `0` on the right, both `automated`. The same transaction prepared by the full path - /// gives the same reply, document, cell writes and bits; the in-place leg commits in place. - /// - /// Test value: red if the move writes the static fallback (the curve overrides it, so the - /// window differs from the fresh plan), rebuilds, reaches the right lane, or if the - /// in-place path answers otherwise than the full path (an in-place owners model with no - /// automation entry reads the lane as not automated: `model_only`, checked once). - #[test] - fn a_hand_move_on_an_automated_fader_is_live_and_renders_the_stored_offset() { - bench_support::alloc::assert_installed(); - let before = document(|_| {}); - let edits = [set(builtin("eq0", FADER_DB, Lane::Left), 3.0, None)]; - let probe = Rig::new(&before); - let k = window(probe.latency(), fader_length(&before) + 128, probe.quantum); - drop(probe); - - control_plane::test_take_in_place_counts(); - let in_place = leg("in place", &before, &edits, k + 4); - assert_eq!( - control_plane::test_take_in_place_counts(), - (1, 0), - "the hand move commits in place" - ); - assert_eq!( - in_place.offsets, - [Some(1), Some(0)], - "the left lane's cell only" - ); - let model = parse_session_json(&in_place.committed).expect("model"); - let plain = parse_session_json(&before).expect("model"); - let ride = model - .automation - .iter() - .find(|entry| entry.id == ride().id) - .expect("the ride"); - assert_eq!( - ( - ride.offset.left_db.to_bits(), - ride.offset.right_db.to_bits() - ), - (3.0_f32.to_bits(), 0.0_f32.to_bits()), - "the ride stores the move on its left lane" - ); - assert_eq!( - model.tracks[0].fader, plain.tracks[0].fader, - "the static fader stays" - ); - let reference = Reference::run(&in_place.committed, 4 + k + 4); - let unedited = Reference::run(&before, 4 + k + 4); - let mut moved = false; - for (offset, pcm) in in_place.blocks.iter().enumerate().skip(k as usize) { - let block = 4 + offset; - assert_eq!( - bits(pcm), - bits(&reference[block]), - "block {block} renders the stored offset's plan" - ); - moved |= bits(pcm) != bits(&unedited[block]); - } - assert!(moved, "the offset is heard"); - let mut rig = Rig::new(&in_place.committed); - assert_eq!( - fader_rows(&mut rig), - vec![ - ( - Some(protocol::ParameterChannel::Left), - 3.0_f32.to_bits(), - true - ), - ( - Some(protocol::ParameterChannel::Right), - 0.0_f32.to_bits(), - true - ), - ], - "the list reads the offset back" - ); - - control_plane::test_force_full_preparation(true); - let full = leg("full path", &before, &edits, k + 4); - control_plane::test_force_full_preparation(false); - assert_eq!(control_plane::test_take_in_place_counts().0, 0); - assert_eq!(full.reply, in_place.reply, "one reply on both paths"); - assert_eq!(full.committed, in_place.committed, "one document"); - assert_eq!(full.offsets, in_place.offsets, "one cell write"); - assert_eq!( - full.blocks.iter().map(|pcm| bits(pcm)).collect::>(), - in_place - .blocks - .iter() - .map(|pcm| bits(pcm)) - .collect::>(), - "the same bits on both paths" - ); - } - /// #1650b gate 3. A flat ride at -7.25 dB with offset `0` renders the bits of a static /// -7.25 dB fader (#1646 gate 1's twin), with no VCA and under a reaching VCA at -2.5 dB; /// so does an offset of `-0.0`. @@ -10089,75 +9405,6 @@ mod set_control { } } } - - /// #1650b gate 4 (C ABI). On a ride that stores a +3 dB left offset, `SetAutomationSegments` - /// rebuilds and keeps the offset (the list still reads +3, `automated`); `RemoveAutomation` - /// rebuilds and removes it, and the lanes list their static fader, not `automated`. - /// - /// Test value: red if a curve edit drops the hand offset, or a removal keeps it. - #[test] - fn re_authoring_keeps_the_hand_offset_and_removal_ends_it() { - let before = document(|model| model.automation[0].offset.left_db = 3.0); - let plain = parse_session_json(&before).expect("model"); - let mut rig = Rig::new(&before); - rig.step(); - let offset_rows = vec![ - ( - Some(protocol::ParameterChannel::Left), - 3.0_f32.to_bits(), - true, - ), - ( - Some(protocol::ParameterChannel::Right), - 0.0_f32.to_bits(), - true, - ), - ]; - assert_eq!(fader_rows(&mut rig), offset_rows); - let mut segments = ride().segments; - segments[0].start_value = -9.0; - let bytes = rig.transaction(&[SessionEdit::SetAutomationSegments { - automation_id: ride().id, - segments, - }]); - let (result, reply) = rig.send(&bytes); - assert_eq!(result, crate::RESULT_OK); - assert_eq!(edit_path_of(&reply), protocol::EditPath::Rebuild); - rig.step(); - rig.step(); - assert_eq!(fader_rows(&mut rig), offset_rows, "the curve edit keeps it"); - let bytes = rig.transaction(&[SessionEdit::RemoveAutomation { - automation_id: ride().id, - }]); - let (result, reply) = rig.send(&bytes); - assert_eq!(result, crate::RESULT_OK); - assert_eq!(edit_path_of(&reply), protocol::EditPath::Rebuild); - rig.step(); - rig.step(); - let fader = &plain.tracks[0].fader; - assert_eq!( - fader_rows(&mut rig), - vec![ - ( - Some(protocol::ParameterChannel::Left), - fader.left_db.to_bits(), - false - ), - ( - Some(protocol::ParameterChannel::Right), - fader.right_db.to_bits(), - false - ), - ], - "the removal returns the lanes to their static fader" - ); - assert!( - parse_session_json(&rig.snapshot()) - .expect("model") - .automation - .is_empty() - ); - } } } @@ -11169,58 +10416,6 @@ fn follow_document(entry: bool, muted: bool) -> String { session::canonical_session_json(&model).expect("canonical follow session") } -/// #1652 gate 1 on the C ABI. From the first block boundary after the end of the mute ramp (1,000 -/// plus the 480-sample mute length) to the unmute at 2,500, the output is bit for bit the plan with -/// `eq0` statically muted, fed the same PCM (the right lane is negative, so a signed zero shows); -/// from the first block boundary after the end of the unmute ramp it is bit for bit the plan with -/// no mute. Not vacuous: the send's plane differs from the static mute's before the mute. -/// -/// Test value: red if the C ABI plan attaches no following lane for the send (its pre-fader audio -/// leaks while the strip is muted), or the send does not reopen after the unmute. -#[test] -fn a_following_send_leaks_nothing_of_a_stored_mute() { - const BLOCKS: usize = 32; - let run = |document: &str| -> Vec { - let mut rig = Rig::new(document); - let mut planes = [Vec::new(), Vec::new()]; - for _ in 0..BLOCKS { - let pcm = rig.step(); - let quantum = rig.quantum; - planes[0].extend_from_slice(&pcm[..quantum]); - planes[1].extend_from_slice(&pcm[quantum..]); - } - let [left, right] = planes; - left.into_iter().chain(right).collect() - }; - let quantum = 128_usize; - let frames = BLOCKS * quantum; - let curve = run(&follow_document(true, false)); - let muted = run(&follow_document(false, true)); - let open = run(&follow_document(false, false)); - let muted_window = (1_000 + 480_usize).div_ceil(quantum) * quantum..2_500; - let open_window = (2_500 + 480_usize).div_ceil(quantum) * quantum..frames; - for plane in 0..2 { - let at = |range: &core::ops::Range| { - plane * frames + range.start..plane * frames + range.end - }; - assert_eq!( - bits(&curve[at(&muted_window)]), - bits(&muted[at(&muted_window)]), - "plane {plane}: the statically muted plan's bits while the curve mutes" - ); - assert_eq!( - bits(&curve[at(&open_window)]), - bits(&open[at(&open_window)]), - "plane {plane}: the open plan's bits after the unmute" - ); - } - assert_ne!( - bits(&curve[frames..frames + 900]), - bits(&muted[frames..frames + 900]), - "the send carries audio before the mute" - ); -} - /// #1652 U2a fold 2 (MAJOR-A, conservative; #1713 deletes the flag). A rebuild whose send join /// carries a following route into a six-word one (it removes `eq0`'s mute entry while `eq0-b` /// follows it) completes as the transition fallback: the C ABI watermark that covers it reads @@ -11377,83 +10572,6 @@ fn live_and_render(rig: &mut Rig, edits: &[SessionEdit], blocks: usize) -> (u64, (first, (0..blocks).map(|_| rig.step()).collect()) } -/// The `follows_mute` row of route `route`, set to `on`. -fn follows_mute_edit(route: &str, on: bool) -> SessionEdit { - use protocol::control_core::{Lane, Owner, Section, row_address}; - SessionEdit::set_control( - row_address( - Owner::Route(StableId::parse(route).expect("route ID")), - Section::Own, - "follows_mute", - Lane::Both, - ) - .expect("the follows_mute row"), - f32::from(u8::from(on)), - None, - ) -} - -/// #1653 gate 1 on the C ABI. `eq0` is automated-muted from 1,000 (480-sample mute ramps); -/// `eq0-b` follows it. At 1,024 a transaction turns `follows_mute` off, at 1,920 one turns it on -/// again: each is `live`. From the first block boundary after each route ramp (480 samples) the -/// output is bit for bit a fresh plan of the committed document, session-seeked to the edit's -/// block and fed the same PCM: the send open while the curve mutes, then closed again until the -/// curve's unmute at 2,500 reopens it. Not vacuous: the send's plane carries audio while it is off -/// and is silent after it is on again. -/// -/// Test value: red if `follows_mute` is still read from the prepared route only (the live toggle -/// on an automated route is lost and the send stays shut), or if the commit refuses the -/// seven-word record. -#[test] -fn a_follows_mute_toggle_on_a_following_route_is_live() { - let mut rig = Rig::new(&follow_document(true, false)); - let quantum = rig.quantum; - for _ in 0..8 { - rig.step(); - } - let settled = |at: u64| (at as usize + 480).div_ceil(quantum) - at as usize / quantum; - assert_eq!( - rig.current_route_cells(), - Vec::::new(), - "no six-word send" - ); - assert_eq!( - rig.current_follow_route_cells(), - vec![0], - "one seven-word send" - ); - for ((label, on, blocks), writes) in [("off", false, 7), ("on", true, 17)] - .into_iter() - .zip(1_u64..) - { - let (at, live) = live_and_render(&mut rig, &[follows_mute_edit("eq0-b", on)], blocks); - assert_eq!( - rig.current_follow_route_cells(), - vec![writes], - "{label}: one seven-word cell write" - ); - let reference = seeked_reference(&rig.snapshot(), at, blocks); - let from = settled(at); - for plane in 0..2 { - assert_eq!( - plane_bits(&live[from..], plane, quantum), - plane_bits(&reference[from..], plane, quantum), - "{label}, plane {plane}: a fresh plan of the committed document after the ramp" - ); - } - // The send's plane up to the curve's unmute at 2,500 (only the "on" run reaches it). - let send = plane_bits(&live[from..], 1, quantum); - let window = (2_500_usize.saturating_sub(at as usize + from * quantum)).min(send.len()); - let silent = send[..window] - .iter() - .all(|&word| f32::from_bits(word) == 0.0); - assert_eq!( - silent, on, - "{label}: the send is shut exactly when it follows" - ); - } -} - /// #1653 (replaces #1652c's rebuild gate): a send gain edit on the following route `eq0-b`, and a /// hand mute of its source `eq0` (which changes its terms and its gate), are each `live`, and from /// the first block boundary after their ramps the C ABI renders what the committed document @@ -11497,27 +10615,6 @@ fn an_edit_of_a_following_route_is_live() { } } -/// #1654 T5: an entry `name` on route `route`'s own row `row` (1 `gain_db`, 2 `mute`, 3-6 the -/// matrix) with `segments`. -fn route_entry( - name: &str, - route: &str, - row: u32, - segments: Vec, -) -> session::Automation { - session::Automation { - id: StableId::parse(name).expect("automation ID"), - target: session::ControlAddress { - owner: session::Owner::Route(StableId::parse(route).expect("route ID")), - section: session::Section::Own, - control: row, - lane: session::ParameterChannel::Both, - }, - segments, - offset: session::AutomationOffset::default(), - } -} - /// A flat curve at `value` over the source (step-shaped for a mute row). fn send_flat( value: f32, @@ -11604,33 +10701,6 @@ fn fallback_count(rig: &Rig) -> u64 { watermark.transition_fallback_count } -/// #1654 gate 5 on the C ABI: an automation entry on the route into the output `eq0-main` is -/// refused `control.automation.target`, and the revision does not move. -/// -/// Test value: red if a route into the output's rows became automatable (D8). -#[test] -fn an_output_route_entry_is_refused_on_the_c_abi() { - let mut rig = Rig::new(&follow_document(false, false)); - rig.step(); - let before = rig.summary(); - let entry = route_entry( - "out-gain", - "eq0-main", - 1, - send_flat(-6.0, session::ParameterUnit::Db, false), - ); - assert_ne!( - rig.apply(&[SessionEdit::UpsertAutomation { automation: entry }]), - crate::RESULT_OK - ); - assert!( - String::from_utf8_lossy(&rig.last_error()).contains("control.automation.target"), - "{}", - String::from_utf8_lossy(&rig.last_error()) - ); - assert_eq!(rig.summary(), before, "no revision"); -} - /// #1654 U2 fold 1, MAJOR-3 on the C ABI, on a mute-following send. The send `eq0-b` hears /// `eq0`'s right lane, whose mute entry holds it muted; `eq0`'s left lane has its own (open) mute /// entry. A rebuild removes the right lane's entry: the send stays a following route (the left diff --git a/crates/capi/src/runtime/supersede_tests.rs b/crates/capi/src/runtime/supersede_tests.rs index a6de8fcda..bd92805b6 100644 --- a/crates/capi/src/runtime/supersede_tests.rs +++ b/crates/capi/src/runtime/supersede_tests.rs @@ -3,8 +3,7 @@ use super::*; use crate::runtime::tests::{ - command_bytes_at_revision, continuity_block, limits, render_direct, stateless_session, - submit_direct, + command_bytes_at_revision, limits, render_direct, stateless_session, submit_direct, }; use protocol::{ExpectedRevision, SessionEdit, SessionRevision}; use session::{ @@ -243,68 +242,6 @@ fn a_superseding_replacement_renders_as_one_combined_transaction() { assert_eq!(adopted.exact, before.exact + 1); } -/// Gate 2: a source a withdrawn candidate added keeps the PCM and the anchored seek the host was -/// acked for: the replacement plays it from the anchor exactly as when the candidate was adopted -/// before the next transaction. -/// -/// Only `s` is fed, so the mix is `s`'s track alone; T2 replaces another track's insert, which -/// renders silence either way. -/// -/// Test value: red if the replacement allocates a fresh ring for `s` instead of taking the -/// candidate's: the acked chunks and the held seek are lost, and `s` is silent from the anchor on. -#[test] -fn a_donated_source_keeps_its_pcm_and_its_held_seek() { - const ANCHOR_BLOCK: u64 = 5; - let mut model = stateless_session(48_000); - model.tracks[0].inserts.effects.push(compressor()); - let first = add_source_track(&model); - let second = [put(&model, 0, gate())]; - let run = |superseding: bool| { - let mut children = compile(&model, limits()); - let mut blocks = vec![render_direct(&mut children, 0)]; - commit(&mut children, 1, 42, &first); - children - .session - .seek_at(ADDED, 2, 0, ANCHOR_BLOCK * 128) - .unwrap_or_else(|_| panic!("the anchored seek")); - for block in 0..4 { - let (left, right) = continuity_block(block, 1); - children - .session - .submit( - ADDED, - SourceSubmission { - generation: 2, - start_frame: block * 128, - sample_rate_hz: 48_000, - planes: &[&left, &right], - frames: 128, - end_of_region: false, - }, - ) - .unwrap_or_else(|_| panic!("chunk {block}")); - } - if !superseding { - blocks.push(render_direct(&mut children, 1)); - } - commit(&mut children, 2, 43, &second); - for block in blocks.len() as u64..9 { - blocks.push(render_direct(&mut children, block)); - } - blocks - }; - let superseded = run(true); - let twin = run(false); - for (block, (actual, expected)) in superseded.iter().zip(&twin).enumerate() { - assert_eq!(bits(actual), bits(expected), "block {block}"); - assert_eq!( - expected.iter().any(|sample| *sample != 0.0), - block as u64 >= ANCHOR_BLOCK, - "block {block}: `s` plays from its anchor" - ); - } -} - /// The lifecycle counters every constructed owner and every reservation are balanced in. fn assert_balanced(label: &str, counters: TestOwnerCounters) { assert_eq!( @@ -815,49 +752,6 @@ fn assert_same_blocks(label: &str, actual: &[Vec], expected: &[Vec]) { } } -/// #1698 gate 1 (owners): T1 restarts `t2`'s insert (`restart`: replaced) or removes it, and T2, -/// which supersedes T1, puts `t2`'s compressor back as P0 has it and replaces `t3`'s. `t2` -/// carries from P0, its compressor state included, so the replacement renders bit-identically to -/// the combined transaction P0 -> B (`t3`'s replacement alone). -fn a_reverted_owner_carries_from_p0(restart: bool) { - let mut model = stateless_session(48_000); - model.tracks[1].inserts.effects.push(compressor()); - model.tracks[2].inserts.effects.push(compressor()); - let first = if restart { - put(&model, 1, gate()) - } else { - remove(&model, 1) - }; - let revert = vec![put(&model, 1, compressor()), put(&model, 2, gate())]; - let (superseded, twin) = superseding_and_combined( - &model, - &[(vec![first], true), (revert, true)], - &[put(&model, 2, gate())], - ); - assert_same_blocks( - if restart { "restarted" } else { "removed" }, - &superseded, - &twin, - ); -} - -/// [`a_reverted_owner_carries_from_p0`], T1 replacing `t2`'s insert. -/// -/// Test value: red if an owner the withdrawn candidate restarted starts fresh in the replacement -/// (the batch 15a base, P0's inventory restricted to what the candidate carried). -#[test] -fn an_owner_the_candidate_restarts_and_the_replacement_reverts_carries_from_p0() { - a_reverted_owner_carries_from_p0(true); -} - -/// [`a_reverted_owner_carries_from_p0`], T1 removing `t2`'s insert. -/// -/// Test value: red if an owner the withdrawn candidate removed starts fresh in the replacement. -#[test] -fn an_owner_the_candidate_removes_and_the_replacement_restores_carries_from_p0() { - a_reverted_owner_carries_from_p0(false); -} - /// #1310 (D3 with root ruling B15-Q3, "B wins on a shared row"): T1 moves `t4`'s fader with its own /// ramp length; T2, which supersedes T1, moves it again with no length. The replacement ramps /// `t4` with the session default, as a transaction holding T1's structural edit and T2 does: B @@ -1263,194 +1157,3 @@ fn a_displaced_plan_not_yet_reclaimed_is_charged_after_a_taken_promotion() { } } } - -/// `UpsertSource` of `s-source` as `model` declares it, with its content identity's `7e94` -/// replaced by `content` when given: a declaration change that restarts the source in a fresh -/// ring. -fn upsert_added_source(model: &SessionModel, content: Option<&str>) -> SessionEdit { - let mut source = add_source_track(model) - .into_iter() - .find_map(|edit| match edit { - SessionEdit::UpsertSource { source } => Some(source), - _ => None, - }) - .expect("the added source"); - if let Some(content) = content { - source.content = source.content.replace("7e94", content); - assert!( - source.content != model.sources[0].content, - "the content identity changed" - ); - } - SessionEdit::UpsertSource { source } -} - -/// `RemoveRoute`, `RemoveTrack` and `RemoveSource` of what [`add_source_track`] adds. -fn remove_source_track() -> Vec { - vec![ - SessionEdit::RemoveRoute { - route_id: id("ts-main"), - }, - SessionEdit::RemoveTrack { track_id: id("ts") }, - SessionEdit::RemoveSource { - source_id: id("s-source"), - }, - ] -} - -/// One case of the acked-fresh-source guard (#1310, root ruling M-A of 2026-10-16): what P0, A -/// and B do to `s-source`. -struct FreshSourceCase { - label: &'static str, - /// Whether P0 declares `s-source` (with its track): committed and adopted before A. - in_p0: bool, - /// T(A): creates `s-source`'s ring fresh in A (adds or redeclares it). - first: Vec, - /// T(B): does not keep `s-source` as A declares it. - second: Vec, - /// Whether B declares `s-source`, restarting it fresh: the host refeeds it from frame 0. - in_b: bool, -} - -fn fresh_source_cases(model: &SessionModel) -> Vec { - let redeclared = |content| vec![upsert_added_source(model, Some(content))]; - vec![ - FreshSourceCase { - label: "(a) A redeclares, B reverts to P0", - in_p0: true, - first: redeclared("0e0e"), - second: vec![upsert_added_source(model, None)], - in_b: true, - }, - FreshSourceCase { - label: "(b) A redeclares, B redeclares a third way", - in_p0: true, - first: redeclared("0e0e"), - second: redeclared("1e1e"), - in_b: true, - }, - FreshSourceCase { - label: "(c) A redeclares, B removes", - in_p0: true, - first: redeclared("0e0e"), - second: remove_source_track(), - in_b: false, - }, - FreshSourceCase { - label: "(d) A adds, B removes", - in_p0: false, - first: add_source_track(model).to_vec(), - second: remove_source_track(), - in_b: false, - }, - FreshSourceCase { - label: "(d) A adds, B redeclares", - in_p0: false, - first: add_source_track(model).to_vec(), - second: redeclared("1e1e"), - in_b: true, - }, - ] -} - -/// #1310, root rulings of 2026-10-16 (no ack before a drop; M-A of fold 3). P0 plays the fixture -/// source and, in cases (a)-(c), `s-source`. T(A) creates `s-source`'s ring fresh in A (it -/// redeclares it, or in case (d) adds it), and the host's chunk for it is acked into A's ring. -/// T(B) does not keep `s-source` as A declares it: it reverts it to P0's declaration (a), -/// redeclares it a third way (b, d), or removes it (c, d). B does not take A's ring by donation, -/// so A's acked chunk would drop with A. So T(B) is refused with `BACKPRESSURE` before its commit: -/// the revision stays T(A)'s, A stays the candidate, no event is queued. The next block adopts A -/// and plays the acked chunk; the same T(B) then commits on A. Every block equals the sequential -/// run (T(B) submitted only after A's adoption), and the acked chunk is heard (the block differs -/// from a run whose host never fed A's ring). -/// -/// Test value: red if the guard is missing or narrower than the ruling (the fold-2 guard let -/// (b)-(d) commit at once and supersede A), or if the refusal changes anything (a block, the -/// revision, the candidate or an event differs). -#[test] -fn a_supersession_that_would_drop_acked_pcm_on_a_fresh_source_is_backpressure() { - let model = stateless_session(48_000); - for case in fresh_source_cases(&model) { - let label = case.label; - let run = |attempt_early: bool, feed_a: bool| { - let mut children = compile(&model, limits()); - let mut blocks = Vec::new(); - let mut base = 42; - submit_direct(&mut children, &[FIXTURE], 0); - blocks.push(render_direct(&mut children, 0)); - if case.in_p0 { - commit(&mut children, 1, base, &add_source_track(&model)); - base += 1; - submit_direct(&mut children, &[ADDED], 0); - } - submit_direct(&mut children, &[FIXTURE], 1); - blocks.push(render_direct(&mut children, 1)); - children.session.service().expect("service"); - commit(&mut children, 2, base, &case.first); - base += 1; - let candidate = children.session.test_pending_providers()[0].test_epoch(); - if feed_a { - // A created `s-source` at generation 1, frame 0: this chunk is acked into A's ring. - submit_direct(&mut children, &[ADDED], 0); - } - submit_direct(&mut children, &[FIXTURE], 2); - if attempt_early { - let refused = children - .session - .command(&transaction(3, base, &case.second), 4_096); - assert!( - matches!(refused, Err(CommandError::Backpressure)), - "{label}: the supersession would drop A's acked chunk: {refused:?}" - ); - assert_eq!( - revision(&children), - base, - "{label}: the revision does not move" - ); - let pending: Vec = children - .session - .test_pending_providers() - .iter() - .map(|provider| provider.test_epoch()) - .collect(); - assert_eq!(pending, vec![candidate], "{label}: A stays the candidate"); - assert!( - children - .session - .dequeue_event(EventLane::Reliable, 4_096) - .expect("the event lane") - .is_none(), - "{label}: the refusal queues no event" - ); - } - blocks.push(render_direct(&mut children, 2)); - children.session.service().expect("service"); - assert_eq!( - children.session.test_providers().test_epoch(), - candidate, - "{label}: A is adopted" - ); - commit(&mut children, 4, base, &case.second); - for block in 3..6 { - if case.in_b { - // B restarts `s-source` again: the host refeeds it from frame 0. - submit_direct(&mut children, &[ADDED], block - 3); - } - submit_direct(&mut children, &[FIXTURE], block); - blocks.push(render_direct(&mut children, block)); - } - blocks - }; - let sequential = run(false, true); - let refused = run(true, true); - for (block, (actual, expected)) in refused.iter().zip(&sequential).enumerate() { - assert_eq!(bits(actual), bits(expected), "{label}: block {block}"); - } - let unfed = run(false, false); - assert_ne!( - bits(&sequential[2]), - bits(&unfed[2]), - "{label}: A's adoption block plays the acked chunk" - ); - } -} diff --git a/crates/capi/src/runtime/tests.rs b/crates/capi/src/runtime/tests.rs index 34ab1b7f9..b5db761c7 100644 --- a/crates/capi/src/runtime/tests.rs +++ b/crates/capi/src/runtime/tests.rs @@ -1464,72 +1464,6 @@ fn seek_report_c(session: *mut crate::Session, id: &[u8]) -> (u64, u64, u64, u64 ) } -/// Issue #1316 gate 1: a plain seek during playback is reported at the block that applied it. -/// Blocks 0-5 play generation 1; the host seeks to generation 2 at frame 4096 and submits it from -/// there, and block 6 (render sample 768) reports `(2, 768, 4096, 0, 0)`. -/// -/// Test value: red if the report follows the producer's generation at the call (it reads 2 -/// before block 6 renders), or names the block after the one that applied the seek. -#[test] -fn a_plain_seek_is_reported_at_the_block_that_applied_it() { - let model = stateless_session(48_000); - let document = session::canonical_session_json(&model).expect("canonical"); - let (session, plan) = boxed_c_children(&document); - const SOURCE: &[u8] = b"fixture-source"; - assert_eq!(seek_report_c(session, SOURCE), (0, 0, 0, 0, 0)); - let (left, right) = continuity_block(0, 0); - submit_c(session, 1, 0, 48_000, &left, &right, false); - let _ = feed_and_render_c(session, plan, 48_000, 0, 6); - assert_eq!(seek_report_c(session, SOURCE), (1, 0, 0, 0, 0)); - assert_eq!( - crate::ffi::test_source_seek(session, SOURCE, 2, 4_096), - crate::RESULT_OK - ); - submit_block_c(session, SOURCE, 2, 32, 0, 48_000); - assert_eq!( - seek_report_c(session, SOURCE), - (1, 0, 0, 0, 0), - "nothing has played generation 2 yet" - ); - let _ = render_c(plan, 6); - assert_eq!(seek_report_c(session, SOURCE), (2, 768, 4_096, 0, 0)); - submit_block_c(session, SOURCE, 2, 33, 0, 48_000); - let _ = render_c(plan, 7); - assert_eq!(seek_report_c(session, SOURCE), (2, 768, 4_096, 0, 0)); - crate::ffi::test_plan_destroy(plan); - crate::ffi::test_session_destroy(session); -} - -/// Issue #1316 gate 2: an anchored seek render reaches after its anchor starts at its frame plus -/// the lateness, and the report says so. After block 9, `seek_at(2, F = 384, A = 896)`; block 10 -/// (render sample 1280) starts at `384 + (1280 - 896) = 768` and reports `(2, 1280, 768)`. The -/// session holds no DSP state, so block 10 is bit-identical to block 6, which read frames 768 on. -/// -/// Test value: red if the report omits the lateness (reports 384), or the block plays from it. -#[test] -fn a_late_anchored_seek_reports_its_frame_plus_the_lateness() { - let model = stateless_session(48_000); - let document = session::canonical_session_json(&model).expect("canonical"); - let (session, plan) = boxed_c_children(&document); - const SOURCE: &[u8] = b"fixture-source"; - let (left, right) = continuity_block(0, 0); - submit_c(session, 1, 0, 48_000, &left, &right, false); - let played = feed_and_render_c(session, plan, 48_000, 0, 10); - assert_eq!( - crate::ffi::test_source_seek_at(session, SOURCE, 2, 384, 896), - crate::RESULT_OK - ); - // The producer takes generation 2 from frame 384; render discards what precedes 768. - for block in 3..=6 { - submit_block_c(session, SOURCE, 2, block, 0, 48_000); - } - let late = render_c(plan, 10); - assert_eq!(seek_report_c(session, SOURCE), (2, 1_280, 768, 0, 0)); - assert_bit_identical("late anchored seek", 10, &[late], &played[6..7]); - crate::ffi::test_plan_destroy(plan); - crate::ffi::test_session_destroy(session); -} - /// Issue #1316 gates 3 and 4: scrub one stem, then start another aligned to it. /// /// One track plays stem X. After block 5 the host plain-seeks X to generation 2 at frame 4096 and diff --git a/docs/C_ABI_V1_QUALIFICATION.md b/docs/C_ABI_V1_QUALIFICATION.md index 9a3b8bf27..984cb0eee 100644 --- a/docs/C_ABI_V1_QUALIFICATION.md +++ b/docs/C_ABI_V1_QUALIFICATION.md @@ -1092,4 +1092,4 @@ that window is admitted against the plan that renders. `an_edit_that_supersedes_a_discontinuity_successor_is_prepared_at_it`; `host-core` `successor_swap::a_declared_discontinuity_resets_the_floors_at_every_rate_and_width`; `host-web` `tests::structural_apply::a_declared_discontinuity_resets_the_floors_on_the_browser` and the - parity row `control_parity::a_declared_discontinuity_resets_the_floors_alike_on_both_hosts`. + parity row `control_parity::a_declared_discontinuity_resets_the_floors_alike_on_both_hosts` (deleted by TA4; KEEP catcher graph `program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers`). diff --git a/hosts/host-web/Cargo.toml b/hosts/host-web/Cargo.toml index cd25aefa4..90ce37be6 100644 --- a/hosts/host-web/Cargo.toml +++ b/hosts/host-web/Cargo.toml @@ -42,9 +42,6 @@ math.workspace = true # `control_smoothing_parity.rs`. Never linked into the browser artifact: a dev-dependency does not # reach `-p host-web`'s release build. capi.workspace = true -# Dev-only: `tests/retained_ceilings.rs` picks each budget by the native lane width (#1060), and -# the #1709 live gate runs a hostile caller environment (`lane::fpenv::under_hostile_fp_env`). -lane = { workspace = true, features = ["test-support"] } # The tests name `protocol` directly: its command frames drive the control plane the C ABI embeds # beside the browser host (`tests/control_parity.rs`, #1560, which absorbed #1399's # `strip_cells_cross_host.rs`). The browser artifact links `protocol` already, through the control diff --git a/hosts/host-web/MUTATIONS.md b/hosts/host-web/MUTATIONS.md index 3a814e8c4..ccba6402b 100644 --- a/hosts/host-web/MUTATIONS.md +++ b/hosts/host-web/MUTATIONS.md @@ -4,7 +4,7 @@ | `check-web-audioworklet-callgraph.py --self-test` (a)-(f) | synthetic disassembly per case | each case is the red mutation of one rule; the runner fails if any escapes | | `test-web-audioworklet.mjs` trap-containment test (F5) | remove the `try` around `miso_engine_web_v1_render` in `process()` | the `process()` call throws instead of returning `true` | | `tests::facade_source_rules_reach_the_browser_host` (F1) | delete the `end_of_region != (end == region_end)` check from `host_core::SourceControlSet::submit` | the region-end submission returns `RESULT_BACKPRESSURE` (6) instead of `RESULT_INVALID_ARGUMENT` (1) | -| `tests::default_ring_covers_stall_tolerance` (F3) | `+ 2` -> `+ 1` in `default_source_ring_frames` | 48 000/128 yields 4 992 where 5 120 is required | +| `tests::default_ring_covers_stall_tolerance` (deleted by TA4; KEEP catcher host-core `prepare::default_ring_derivation_covers_the_stall_and_two_in_flight_quanta`) (F3) | `+ 2` -> `+ 1` in `default_source_ring_frames` | 48 000/128 yields 4 992 where 5 120 is required | | `tests::ring_prefill_survives_stall` (F3) | `SOURCE_STALL_TOLERANCE_MS = 50` (a 21-quantum ring) | the ring runs dry mid-stall and a starved quantum renders zeros instead of the ramp | | `test-web-audioworklet.mjs` pipelining test (F3) | make `#saturated` return `true` at one unsettled source request | the second of four in-flight chunks is refused and its planes are never transferred | | `tests::native_identity_session_digest_pins_the_wasm_parity` + `direct-oracle.mjs` parity assertion (F4/E4) | flip one hex digit of `directOracle.nativePcmF32leSha256` in `expected.json` | both legs fail against the pin, and they fail with the same value | @@ -565,3 +565,9 @@ qualification of decision 15's heavy gates" (#1605) or the first CI run that app | same (S3), Chromium, Firefox, WebKit | in `#submit` (`sdk/src/core/observation-subscriptions.ts`), drop `if (!rendered)` so the typed refusal is thrown whatever `next` returns | gate 3: the render instance's close ends in `backpressure` (`resolved: false`, log `[ok, bp]`) | | same (S4) | `current.renderedQuanta >= since` in `next` | gate 1: early, and more than one close send in the log | | same (S5) | the browser engine passes no `renderWait` | gates 1 and 3 | + +## TA4 deletions + +The 2026-10 test audit (TA4, batch 1 mutation measurement at `81a3074fc`) deleted the tests named below. Each one's caught mutants were also red in the KEEP test named beside it. That is the recorded catcher of the deleted test's sampled mutants; the mutation of each row above was not re-run. + +- `default_ring_covers_stall_tolerance`: host-core `prepare::default_ring_derivation_covers_the_stall_and_two_in_flight_quanta` diff --git a/hosts/host-web/src/tests.rs b/hosts/host-web/src/tests.rs index f721fbf1a..68561b56a 100644 --- a/hosts/host-web/src/tests.rs +++ b/hosts/host-web/src/tests.rs @@ -1673,38 +1673,6 @@ fn facade_source_rules_reach_the_browser_host() { assert_eq!(host.status().state, STATE_READY, "no rejection is sticky"); } -/// #106 F3. The pinned default ring capacity at every launch rate and a spread of quanta. -/// -/// The oracle is the derivation in [`default_source_ring_frames`]'s documentation, evaluated by -/// hand: `(ceil(100 ms * fs / quantum) + 2) * quantum`. -/// -/// Red mutation: change the `+ 2` to `+ 1` -> 48 000/128 yields 4 992, not 5 120. -#[test] -fn default_ring_covers_stall_tolerance() { - assert_eq!(SOURCE_STALL_TOLERANCE_MS, 100); - for (sample_rate_hz, quantum, expected) in [ - (48_000_u32, 128_u32, 5_120_u32), - (44_100, 128, 4_736), - (88_200, 128, 9_088), - (96_000, 128, 9_856), - (48_000, 256, 5_376), - (48_000, 64, 4_928), - ] { - let frames = default_source_ring_frames(sample_rate_hz, quantum); - assert_eq!(frames, expected, "{sample_rate_hz} Hz / {quantum} frames"); - assert_eq!( - frames % quantum, - 0, - "a ring capacity is a whole number of quanta" - ); - let stall_frames = u64::from(sample_rate_hz) * u64::from(SOURCE_STALL_TOLERANCE_MS) / 1000; - assert!( - u64::from(frames) >= stall_frames + 2 * u64::from(quantum), - "the ring must cover the stall plus the consumer and recycle quanta" - ); - } -} - /// #106 F3. A full default ring renders the whole stall tolerance with no submission at all. /// /// The identity session passes source frames to the output unchanged, so the oracle is the @@ -7060,111 +7028,6 @@ mod structural_apply { ); } - /// The ramp of the live fader edit, in samples: longer than the blocks between the edit and - /// the adoption block, so the ramp is in flight when the plan swaps. - const FADER_RAMP: u32 = 400; - - /// A live fader edit of strip `id` through the production control entry, as the SDK sends it. - fn live_fader(rig: &mut Rig, id: &str, db: f32, request: u64) { - let edits = [SessionEdit::SetControl { - expected_effect: None, - address: controls::ControlAddress { - owner: controls::Owner::Strip(StableId::parse(id).expect("strip ID")), - section: controls::Section::Builtins, - control: 5, - lane: session::ParameterChannel::Both, - }, - value: db, - ramp_samples: Some(FADER_RAMP), - }]; - let bytes = frame(&edits, request, rig.host.committed_revision()); - let staging = rig - .host - .control_request_mut(bytes.len() as u32) - .expect("the control staging"); - staging[..bytes.len()].copy_from_slice(&bytes); - assert_eq!( - rig.host.control_command(bytes.len() as u32, None), - RESULT_OK - ); - assert_eq!( - outcome(rig.host.control_response()), - Outcome::Applied { - path: EditPath::Live, - revision: rig.host.committed_revision() - } - ); - } - - /// Gate 2. Test value: red if the successor is prepared from the boot document instead of the - /// committed model, which would lose the live edit (the fader would snap back after the swap). - #[test] - fn a_live_edit_is_part_of_the_base_the_successor_is_prepared_from() { - // The edit starts at sample 640 and its ramp ends at 1040, in block 8: it crosses the - // adoption at block 6. - const EDIT_BEFORE: u64 = 5; - const SETTLED_FROM: usize = 9; - let model = gate_model(); - let edited_id = model.tracks[3].id.as_str().to_owned(); - let edited_db = -7.5; - - // The committed model: the live edit, then the added track. - let mut committed = with_muted_track(&model, ADDED); - let edited = committed - .tracks - .iter_mut() - .find(|track| track.id.as_str() == edited_id) - .expect("the edited track"); - edited.fader.left_db = edited_db; - edited.fader.right_db = edited_db; - let mut fresh = Rig::boot(&committed, options(), None); - for _ in 0..BLOCKS { - fresh.step(); - } - - // The same live edit and no structural edit: what the swap must not disturb. - let mut live_only = Rig::boot(&model, options(), None); - // The unedited session: the edit must be audible. - let mut unedited = Rig::boot(&model, options(), None); - let mut swapped = Rig::boot(&model, options(), None); - for block in 0..BLOCKS { - if block == EDIT_BEFORE { - live_fader(&mut live_only, &edited_id, edited_db, 1); - live_fader(&mut swapped, &edited_id, edited_db, 1); - } - if block == APPLY_BEFORE { - let base = swapped.host.committed_revision(); - assert_eq!( - swapped.apply(&add_muted_track(&model, ADDED), 2), - Outcome::Applied { - path: EditPath::Rebuild, - revision: base + 1 - } - ); - } - live_only.step(); - unedited.step(); - swapped.step(); - } - assert_eq!(swapped.epoch(), 1); - assert_eq!( - first_difference(&swapped.bits, &live_only.bits), - None, - "the swap disturbs nothing, the ramp in flight included: every block equals the run \ - with the live edit alone" - ); - let last = BLOCKS as usize - 1; - assert_ne!( - swapped.bits[last], unedited.bits[last], - "the edit is audible after the swap" - ); - assert_eq!( - first_difference(&swapped.bits[SETTLED_FROM..], &fresh.bits[SETTLED_FROM..]), - None, - "once the ramp ends the output equals a fresh boot of the committed model" - ); - } - /// Everything a refusal must leave as it was. #[derive(Debug, Eq, PartialEq)] struct Untouched { @@ -7733,66 +7596,6 @@ mod structural_apply { } } - /// #1310 on the browser path, which runs the same control plane: a structural edit while a - /// candidate waits unadopted commits and supersedes it. The first candidate never renders; the - /// replacement carries both transactions and is adopted at the next block. - /// - /// Test value: red if the second structural edit is refused while the first waits (the - /// one-candidate backpressure the C ABI dropped), or if the replacement leaves out the first - /// transaction's source. - #[test] - fn a_structural_edit_behind_an_unadopted_candidate_supersedes_it() { - let model = parse_session_json(include_str!("../tests/browser-v1/command-session.json")) - .expect("accepted command fixture"); - let mut source = model.sources[0].clone(); - source.id = StableId::parse("a-source").expect("source ID"); - let mut track = model.tracks[0].clone(); - track.id = StableId::parse("a-track").expect("track ID"); - track.source_id = source.id.clone(); - let mut route = model.routes[0].clone(); - route.id = StableId::parse("a-track-main").expect("route ID"); - let RouteSource::Track { track_id, .. } = &mut route.source else { - panic!("a track route") - }; - *track_id = track.id.clone(); - let mut later = source.clone(); - later.id = StableId::parse("b-source").expect("source ID"); - let first = [ - SessionEdit::UpsertSource { source }, - SessionEdit::UpsertTrack { track }, - SessionEdit::UpsertRoute { route }, - ]; - let second = [SessionEdit::UpsertSource { source: later }]; - let mut rig = Rig::boot(&model, options(), None); - rig.step(); - assert!(matches!( - rig.apply(&first, 1), - Outcome::Applied { - path: EditPath::Rebuild, - .. - } - )); - assert!( - matches!( - rig.apply(&second, 2), - Outcome::Applied { - path: EditPath::Rebuild, - .. - } - ), - "a structural edit behind an unadopted candidate supersedes it" - ); - rig.step(); - assert_eq!( - rig.epoch(), - 2, - "the replacement is adopted; the first never rendered" - ); - assert_eq!(rig.host.session_source_count(), 3); - assert_eq!(rig.host.service(None), RESULT_OK); - rig.step(); - } - /// #1310 on a paused page (batch 15a review fold B1): eight structural edits with no render /// between them each commit, each superseding the candidate before it, as on the C ABI. The /// host keeps one table entry per candidate the core holds, so the fifth edit finds room; @@ -10265,77 +10068,6 @@ mod session_seek { assert_eq!(rig.landed(ADDED), (2, swap, 3_000)); assert_eq!(rig.timeline(swap), 3_000); } - - /// `one_source()` with track `0`'s fader on a ride (`automated`): `0` dB before timeline - /// 2,000 and `-9` dB from it on; or, as the reference, its static fader at `-9` dB. - fn seek_ride(automated: bool) -> SessionModel { - let mut model = one_source(); - if automated { - model.automation = vec![session::Automation { - id: StableId::parse("ride").expect("automation ID"), - target: session::ControlAddress { - owner: session::Owner::Strip(model.tracks[0].id.clone()), - section: session::Section::Builtins, - control: 5, - lane: session::ParameterChannel::Both, - }, - segments: vec![session::AutomationSegment { - shape: session::AutomationShape::Step, - start_sample: 0, - end_sample: 2_000, - start_value: 0.0, - end_value: -9.0, - unit: session::ParameterUnit::Db, - }], - offset: session::AutomationOffset::default(), - }]; - } else { - let fader = &mut model.tracks[0].fader; - (fader.left_db, fader.right_db) = (-9.0, -9.0); - } - model - } - - /// Boot the ride, seek to timeline 6,000 through `miso_engine_web_v1_session_seek` after the - /// four primed blocks, and render six blocks of generation 2: the blocks before and from the - /// seek, and the render sample the seek applied at. - fn seek_ride_blocks(automated: bool) -> (Vec>, u64) { - let mut rig = Rig::boot(&seek_ride(automated), &[LONG]); - rig.feed(1, rig.next()); - let mut blocks = vec![rig.render()]; - assert_eq!( - miso_engine_web_v1_session_seek(rig.handle, 2, 6_000), - RESULT_OK - ); - for step in 0..6 { - rig.feed(2, 6_000 + step * Q); - blocks.push(rig.render()); - } - let (generation, first, frame) = rig.landed(LONG); - assert_eq!((generation, frame), (2, 6_000)); - (blocks, first) - } - - /// #1647 gate 4, the browser leg (decision 17 C1): after `miso_engine_web_v1_session_seek` to - /// a timeline where the ride is flat at `-9` dB, the automated fader renders the static `-9` - /// dB fader's bits from the block the seek applied at, with no ramp, and the `0` dB of the - /// ride's start before it: the same core seek as `miso_engine_v1_session_seek`. - /// - /// Test value: red if the browser's seek ramps an automated lane, lands it at another block, - /// or reaches the fader without moving it. - #[test] - fn a_session_seek_sets_an_automated_fader_exactly_in_the_browser() { - let (automated, r) = seek_ride_blocks(true); - let (reference, reference_r) = seek_ride_blocks(false); - assert_eq!(r, reference_r); - assert_eq!(r, 5 * Q, "the seek applies at the block after it"); - assert_ne!(automated[0], reference[0], "the ride starts at 0 dB"); - assert_eq!( - automated[1..], - reference[1..], - "the static fader's bits from r" - ); - } } /// #1646 gate 1 (browser): the parity fixture's first three tracks, with empty console sections, @@ -10527,267 +10259,3 @@ fn a_flat_fader_automation_renders_the_static_fader_bits_in_the_browser() { } } } - -/// #1709 D2 (browser): a live level move made while the control thread runs FTZ, DAZ and round -/// toward zero. The browser host's own tests run natively, so the caller's word can be set. -#[cfg(any(target_arch = "x86_64", target_arch = "aarch64"))] -mod canonical_live { - use super::*; - use lane::fpenv::under_hostile_fp_env; - use protocol::control_core::{ControlAddress, Lane, Owner, Section}; - use protocol::{ - CommandPayload, DecodeScratch, DecodedSuccessResponsePayload, DecodedTypedResponseFrame, - EditPath, ExpectedRevision, ProtocolCodec, RequestId, SessionEdit, SessionRevision, - TypedCommandFrame, - }; - use session::StableId; - - /// The member dB and VCA offset of #1646's environment gate (asserted below to round apart). - const MEMBER_DB: f32 = -0.01384; - const OFFSET_DB: f32 = 1.0 / 3.0; - /// The track the VCA holds. - const MEMBER: usize = 1; - /// The automated rows' flat curve, VCA offset, hand offset and prior hand offset: the C ABI - /// `canonical_live` module's, where the choice is explained. `S = HAND_DB + VCA_DB` sums to - /// `20` under round to nearest and to the `f64` below it under round toward zero, and render's - /// composition of the curve with the two reaches different gains (asserted below). - const CURVE_DB: f32 = 3.0 / 1_048_576.0; - const VCA_DB: f32 = 20.0; - const HAND_DB: f32 = -1e-30; - const PRIOR_HAND_DB: f32 = 1.0; - - /// [`flat_fader_base`] with VCA `v` over track 1: the track's left fader at `member`, the - /// VCA's left offset at `offset`. - fn model(member: f32, offset: f32) -> session::SessionModel { - let mut model = flat_fader_base(); - model.vcas = vec![flat_fader_vca(&model, "v", 0.0, &[MEMBER])]; - model.vcas[0].fader.left_db = offset; - model.tracks[MEMBER].fader.left_db = member; - model - } - - fn set(owner: Owner, section: Section, control: u32, value: f32) -> SessionEdit { - SessionEdit::SetControl { - expected_effect: None, - address: ControlAddress { - owner, - section, - control, - lane: Lane::Left, - }, - value, - ramp_samples: None, - } - } - - /// The transaction frame of `edit` at `revision`. - fn frame(edit: &SessionEdit, revision: u64) -> Vec { - let codec = ProtocolCodec::default(); - let mut bytes = vec![0_u8; codec.limits().max_frame_bytes]; - let length = codec - .encode_command_frame_into( - &TypedCommandFrame { - request_id: RequestId::new(7).expect("nonzero request"), - expected_revision: ExpectedRevision::Exact(SessionRevision(revision)), - payload: CommandPayload::SessionTransactionApply(std::slice::from_ref(edit)), - }, - &mut bytes, - ) - .expect("a transaction frame"); - bytes.truncate(length); - bytes - } - - /// The path and revision of an applied transaction's response. - fn applied(response: &[u8]) -> (EditPath, u64) { - let mut fields = [0_u16; 64]; - match ProtocolCodec::default() - .decode_typed_response(response, &mut DecodeScratch::new(&mut fields)) - .expect("a transaction response") - { - DecodedTypedResponseFrame::Success { - header, - payload: DecodedSuccessResponsePayload::SessionTransactionApplied(applied), - } => (applied.edit_path, header.revision.0), - _ => panic!("the transaction applies"), - } - } - - /// A browser host booted on `before` takes `edit` under the hostile word, live, and from the - /// block its ramp leaves behind renders the bits of a canonical boot of the committed model. - fn live_move_under_hostile_word( - label: &str, - before: &session::SessionModel, - edit: &SessionEdit, - after: &session::SessionModel, - ) { - const BLOCKS: u64 = 4; - let document = canonical_session_json(before).expect("canonical"); - let mut host = strip_boot( - &document, - WebBootOptions { - require_sample_rate_hz: 48_000, - require_quantum_frames: STRIP_QUANTUM, - source_ring_frames: STRIP_QUANTUM * 4, - ..WebBootOptions::live_control_defaults() - }, - ); - let mut rendered = Vec::new(); - let mut render = |host: &mut AudioWorkletEngineHost, block: u64| { - submit_strip_source(host, "fixture-source", block, &strip_planes(0, block)); - assert_eq!(host.render_next(), RESULT_OK, "{label}: block {block}"); - rendered.push( - host.output_pcm() - .expect("output") - .iter() - .map(|sample| sample.to_bits()) - .collect::>(), - ); - }; - for block in 0..BLOCKS { - render(&mut host, block); - } - let bytes = frame(edit, before.revision); - let staging = host - .control_request_mut(bytes.len() as u32) - .expect("the control staging"); - staging[..bytes.len()].copy_from_slice(&bytes); - let result = under_hostile_fp_env(|| host.control_command(bytes.len() as u32, None)); - assert_eq!(result, RESULT_OK, "{label}"); - assert_eq!( - applied(host.control_response()), - (EditPath::Live, before.revision + 1), - "{label}: the move is live" - ); - let mut committed = after.clone(); - committed.revision = before.revision + 1; - let ramp = u64::from(committed.control_smoothing_samples().fader); - let settled = BLOCKS + ramp.div_ceil(u64::from(STRIP_QUANTUM)) + 1; - for block in BLOCKS..settled + 4 { - render(&mut host, block); - } - let reference = render_flat_fader_web(&committed, settled + 4); - for block in settled..settled + 4 { - let block = block as usize; - assert!( - reference[block] - .iter() - .any(|bits| f32::from_bits(*bits) != 0.0), - "{label}: the reference plays" - ); - assert_eq!( - rendered[block], reference[block], - "{label}: block {block} renders the canonical boot's bits" - ); - } - } - - /// #1709 D2 (browser): a live fader move on a VCA member, a live VCA offset move over it, - /// (#1649) a VCA move over a member whose fader is automated, and (#1650b) a hand move on - /// that automated fader, each made through the browser's control entry while the caller's - /// thread runs FTZ, DAZ and round toward zero, render from the end of their ramp the bits of - /// the committed model booted on a canonical thread. The static pair's composition rounds to - /// another `f32`, and another gain, under that word, and the automated rows' `S` sums to - /// another `f64`, which render composes to another gain (both asserted), so no row is - /// vacuous. - /// - /// Test value: red if the browser's live transaction composes a member's effective fader, or - /// an automated lane's offsets-cell `S`, in the caller's environment: remove the guard in the - /// core's `SessionState::command`. - #[test] - fn a_live_fader_and_vca_move_under_a_hostile_caller_word_render_the_canonical_bits() { - // `black_box` on the inputs and outputs: under `--release` LLVM otherwise folds the - // composition at compile time, whatever the thread's word. - let compose = || { - core::hint::black_box(session::vca_effective_db( - core::hint::black_box(MEMBER_DB), - [core::hint::black_box(OFFSET_DB)], - )) - }; - let rounded = under_hostile_fp_env(compose); - assert_ne!( - builtins::checked_fader_gain(compose()).map(f32::to_bits), - builtins::checked_fader_gain(rounded).map(f32::to_bits), - "the gate is vacuous: the hostile word's composition converts to the same gain" - ); - let sum = || session::vca_offsets_sum([HAND_DB, VCA_DB]).expect("two offsets"); - let rounded = under_hostile_fp_env(sum); - assert_ne!( - builtins::checked_fader_gain(session::vca_compose_db(CURVE_DB, sum())) - .map(f32::to_bits), - builtins::checked_fader_gain(session::vca_compose_db(CURVE_DB, rounded)) - .map(f32::to_bits), - "the gate is vacuous: the hostile word's S converts to the same gain" - ); - let member = model(0.0, OFFSET_DB).tracks[MEMBER].id.clone(); - let vca_move = |offset| { - set( - Owner::Vca(StableId::parse("v").expect("VCA ID")), - Section::Own, - 1, - offset, - ) - }; - live_move_under_hostile_word( - "a live fader move", - &model(0.0, OFFSET_DB), - &set(Owner::Strip(member), Section::Builtins, 5, MEMBER_DB), - &model(MEMBER_DB, OFFSET_DB), - ); - live_move_under_hostile_word( - "a live VCA move", - &model(MEMBER_DB, 0.0), - &vca_move(OFFSET_DB), - &model(MEMBER_DB, OFFSET_DB), - ); - // #1649: a VCA move over a member whose left fader is automated, flat at the curve's dB, - // writes the lane's offsets cell; render composes the curve with it. - live_move_under_hostile_word( - "a live VCA move on an automated lane", - &automated(model(CURVE_DB, 0.0), HAND_DB), - &vca_move(VCA_DB), - &automated(model(CURVE_DB, VCA_DB), HAND_DB), - ); - // #1650b: a hand move on that automated fader writes the ride's left offset, and the - // lane's offsets cell with `S` = the offset and the VCA's; the static fader stays. - live_move_under_hostile_word( - "a hand move on an automated lane", - &automated(model(CURVE_DB, VCA_DB), PRIOR_HAND_DB), - &set( - Owner::Strip(model(0.0, 0.0).tracks[MEMBER].id.clone()), - Section::Builtins, - 5, - HAND_DB, - ), - &automated(model(CURVE_DB, VCA_DB), HAND_DB), - ); - } - - /// `model` with track [`MEMBER`]'s left fader automated, flat at [`CURVE_DB`], with the stored - /// left hand offset `hand` (#1649, #1650). - fn automated(mut model: session::SessionModel, hand: f32) -> session::SessionModel { - let owner = session::Owner::Strip(model.tracks[MEMBER].id.clone()); - model.automation.push(session::Automation { - id: StableId::parse("member-flat").expect("automation ID"), - target: session::ControlAddress { - owner, - section: session::Section::Builtins, - control: 5, - lane: session::ParameterChannel::Left, - }, - segments: vec![session::AutomationSegment { - shape: session::AutomationShape::Step, - start_sample: 0, - end_sample: 1 << 20, - start_value: CURVE_DB, - end_value: CURVE_DB, - unit: session::ParameterUnit::Db, - }], - offset: session::AutomationOffset { - left_db: hand, - right_db: 0.0, - }, - }); - model - } -} diff --git a/hosts/host-web/tests/control_parity.rs b/hosts/host-web/tests/control_parity.rs index 59bb54980..53fb7e85e 100644 --- a/hosts/host-web/tests/control_parity.rs +++ b/hosts/host-web/tests/control_parity.rs @@ -4065,79 +4065,6 @@ fn both_hosts_designate_the_master_strip_after_an_empty_boot_alike() { } } -/// #1310 on a paused host (batch 15a review fold B1): eight structural edits with no render -/// between them each commit on both hosts, each superseding the candidate before it, and from the -/// block that adopts the newest plan the two hosts render the same bits. -/// -/// Test value: red if one host refuses a paused structural edit the other commits (the browser -/// kept a superseded candidate's tables until a later adoption and refused the fifth edit with -/// `BACKPRESSURE`), or if the two hosts adopt different plans. -#[test] -fn paused_structural_edits_commit_alike_on_both_hosts() { - const EDITS: u64 = 8; - const PAUSE_AT: u64 = 2; - for rate in [48_000, 96_000] { - let model = model_at(rate); - let mut browser = Rig::new(&model); - let mut c_abi = CAbi::new(&model); - for block in 0..PAUSE_AT { - let b = browser.step(block); - assert_eq!(b, c_abi.step(block), "{rate} Hz: block {block}"); - } - let routes: Vec = model - .routes - .iter() - .filter(|route| { - matches!( - &route.source, - session::RouteSource::Track { track_id, .. } if track_id.as_str() == T1.id - ) - }) - .cloned() - .collect(); - assert!(!routes.is_empty(), "t1 routes somewhere"); - for edit in 0..EDITS { - // A copy of `t1` with no insert, on `t1`'s source, routed as `t1` is. - let mut track = model.tracks[T1.index as usize].clone(); - track.id = id(&format!("p{edit}")); - track.inserts.effects.clear(); - let mut edits = vec![SessionEdit::UpsertTrack { - track: track.clone(), - }]; - for (index, route) in routes.iter().enumerate() { - let mut route = route.clone(); - route.id = id(&format!("p{edit}-r{index}")); - let session::RouteSource::Track { track_id, .. } = &mut route.source else { - unreachable!("filtered on a track source") - }; - *track_id = track.id.clone(); - edits.push(SessionEdit::UpsertRoute { route }); - } - let (b_verdict, _) = browser.transaction_reply(&edits); - let (c_verdict, _) = c_abi.transaction(&edits); - c_abi.drain_reliable(); - assert_eq!( - b_verdict, - Verdict::Applied { - path: EditPath::Rebuild, - revision: model.revision + edit + 1 - }, - "{rate} Hz: paused edit {edit} commits on the browser" - ); - assert_eq!(b_verdict, c_verdict, "{rate} Hz: paused edit {edit}"); - } - for block in PAUSE_AT..PAUSE_AT + 8 { - let b = browser.step(block); - assert_eq!(b, c_abi.step(block), "{rate} Hz: block {block}"); - } - assert_eq!( - browser.host.live_control_tracks().len(), - model.tracks.len() + EDITS as usize, - "{rate} Hz: the browser adopted the plan of every edit" - ); - } -} - /// #1310, root rulings of 2026-10-16 (no ack before a drop; M-A of fold 3), on both hosts. T1 (A) /// redeclares `src-t1`, so A restarts it at frame 0 in a ring A creates, and the host's next /// chunk for it is acked into A's ring. T2 (B) does not keep `src-t1` as A declares it: (a) it @@ -4406,79 +4333,6 @@ fn c_latency(c_abi: &CAbi) -> u64 { report.latency_samples } -/// #1323 on both hosts: removing the true-peak limiter insert keeps every node's latency (#1285), -/// and a declared discontinuity, `miso_engine_v1_declare_discontinuity` on the C ABI and the -/// browser host's `declare_discontinuity`, publishes the committed session with no floors on both. -/// From the block after it the two hosts render the same bits, and the C ABI reports a lower -/// latency than before the declaration. -/// -/// Test value: red if one host's entry does not reach the control plane's declaration, or -/// reaches another rule (that host keeps the floors, and its remaining tracks play later than the -/// other host's), or if the declaration is a no-op on both (the C ABI latency stays floored). -#[test] -fn a_declared_discontinuity_resets_the_floors_alike_on_both_hosts() { - for rate in [48_000, 96_000] { - let model = model_at(rate); - let mut browser = Rig::new(&model); - let mut c_abi = CAbi::new(&model); - same_blocks(&mut browser, &mut c_abi, 0..4, &format!("{rate} Hz before")); - let edits = [SessionEdit::RemoveTrackEffect { - track_id: id(LIMITER.track.id), - rack_name: session::RackName::Inserts, - effect_id: id(LIMITER.id), - }]; - let (b_verdict, _) = browser.transaction_reply(&edits); - let (c_verdict, _) = c_abi.transaction(&edits); - c_abi.drain_reliable(); - assert!( - matches!( - b_verdict, - Verdict::Applied { - path: EditPath::Rebuild, - .. - } - ), - "{rate} Hz: {b_verdict:?}" - ); - assert_eq!(b_verdict, c_verdict, "{rate} Hz"); - same_blocks( - &mut browser, - &mut c_abi, - 4..8, - &format!("{rate} Hz floored"), - ); - let floored = c_latency(&c_abi); - assert_eq!( - browser_plan_latency(&mut browser).0, - floored, - "{rate} Hz: both hosts report the floored latency" - ); - assert_eq!( - browser.host.declare_discontinuity(None), - host_web::RESULT_OK, - "{rate} Hz" - ); - // SAFETY: The session is live and used by this thread alone. - let code = unsafe { capi::miso_engine_v1_declare_discontinuity(c_abi.session) }; - assert_eq!(code, C_RESULT_OK, "{rate} Hz"); - same_blocks( - &mut browser, - &mut c_abi, - 8..16, - &format!("{rate} Hz declared"), - ); - assert!( - c_latency(&c_abi) < floored, - "{rate} Hz: the declaration resets the floors ({floored})" - ); - assert_eq!( - browser_plan_latency(&mut browser).0, - c_latency(&c_abi), - "{rate} Hz: both hosts report the reset latency" - ); - } -} - /// #1688 gate 1 with #1285's floors: a muted track behind a true-peak limiter (and the delay and /// multiband beside it) sets the plan's latency. A transaction that removes the track and its /// routes rebuilds the plan, and a fresh compile of the committed session would report a lower diff --git a/scripts/check-browser-expected-resources.py b/scripts/check-browser-expected-resources.py index 18093b53a..668cb4292 100755 --- a/scripts/check-browser-expected-resources.py +++ b/scripts/check-browser-expected-resources.py @@ -27,8 +27,7 @@ it is red and raises the budget with its reason. The gate prints each row's headroom as a live report. A zero row is red too, because a row that stops being charged is a decrease a ceiling cannot see; that the rows charge every allocation is capi's allocator oracle - (`crates/capi/tests/resource_lifecycle.rs`), and the native budgets of this fixture are - `hosts/host-web/tests/retained_ceilings.rs`. + (`crates/capi/tests/resource_lifecycle.rs`). Everything else in the printed document -- the status snapshots, the result transcripts, the SET_CONTROL, observation and automation timelines and the four PCM digests, which diff --git a/tools/audit/src/fixture_builtins.rs b/tools/audit/src/fixture_builtins.rs index b1cbe0759..db710febb 100644 --- a/tools/audit/src/fixture_builtins.rs +++ b/tools/audit/src/fixture_builtins.rs @@ -5620,54 +5620,6 @@ mod tests { remove_temporary_root(root); } - #[test] - fn check_rejects_benchmark_identity_parameter_and_pcm_hash_mutations() { - let files = complete_files(); - for (name, mutate) in [ - ( - "workload_id", - benchmark_text_mutation( - "workload_id = \"issue035.full_chain_filters.48000hz.q128\"", - "workload_id = \"issue035.full_chain_filters.96000hz.q128\"", - ), - ), - ( - "missing_parameter", - benchmark_text_mutation("matrix_rr = 0.7\n", ""), - ), - ( - "declared_pcm_hash", - benchmark_text_mutation( - "input_pcm_sha256 = \"e53eead1da91f80b8c93a730bd1a45629f4efdddf90c3642d38498d29952d1ff\"", - "input_pcm_sha256 = \"0000000000000000000000000000000000000000000000000000000000000000\"", - ), - ), - ] { - let root = temporary_root(&format!("benchmark-{name}")); - let mut mutated = files.clone(); - mutate(&mut mutated); - write_fixture(&root, &mutated); - assert!( - check_fixture_root(&root).is_err(), - "accepted benchmark {name} mutation" - ); - remove_temporary_root(root); - } - - let root = temporary_root("benchmark-pcm-content"); - let mut mutated = files; - mutated - .get_mut("pcm/filters-asymmetric.f32le") - .expect("fixture PCM") - .push(0); - write_fixture(&root, &mutated); - assert!( - check_fixture_root(&root).is_err(), - "accepted benchmark PCM manifest-hash mismatch" - ); - remove_temporary_root(root); - } - fn reject_payload_mutation( files: &BTreeMap>, class: &str, @@ -5749,19 +5701,6 @@ mod tests { generated().into_iter().collect() } - fn benchmark_text_mutation( - from: &'static str, - to: &'static str, - ) -> impl FnOnce(&mut BTreeMap>) { - move |files| { - let path = "benchmark/full_chain_filters-48000.toml"; - let input = std::str::from_utf8(files.get(path).expect("benchmark input")) - .expect("benchmark input UTF-8"); - assert!(input.contains(from), "frozen benchmark field"); - files.insert(path.to_owned(), input.replacen(from, to, 1).into_bytes()); - } - } - fn write_fixture(root: &Path, files: &BTreeMap>) { if root.exists() { fs::remove_dir_all(root).expect("replace fixture root"); diff --git a/tools/audit/src/vectorization.rs b/tools/audit/src/vectorization.rs index 878b2fcf9..35d2b3227 100644 --- a/tools/audit/src/vectorization.rs +++ b/tools/audit/src/vectorization.rs @@ -719,27 +719,6 @@ mod tests { ); } - #[test] - fn near_name_impostor_does_not_satisfy_probe() { - for impostor in [ - format!("{PROBE_MODULE}::probe_gain_simd8_impostor"), - format!("{PROBE_MODULE}::probe_gain_simd80"), - format!("impostor::{PROBE_MODULE}::probe_gain_simd8"), - "unrelated::probe_gain_simd8".to_owned(), - ] { - let exact_header = format!("{PROBE_MODULE}::probe_gain_simd8"); - let disassembly = synthetic_bodies("vector-op").replace(&exact_header, &impostor); - let failures = certify(&disassembly, &active_rules()); - assert!( - failures.iter().any(|failure| { - failure.contains("probe_gain_simd8") - && failure.contains("probe symbol is absent from the artifact") - }), - "expected the exact gain probe to be absent for {impostor}, got {failures:?}" - ); - } - } - #[test] fn malformed_prose_and_instruction_prefixes_do_not_own_probe_body() { let exact_header = format!("{PROBE_MODULE}::probe_gain_simd8"); @@ -765,121 +744,6 @@ mod tests { } } - #[test] - fn ordinary_instruction_annotations_do_not_terminate_probe_body() { - let exact_header = format!("{PROBE_MODULE}::probe_gain_simd8"); - let annotation = format!(" 0000: e8 00 00 00 00 call 0x1000 <{exact_header}+0x10>\n"); - let annotation_header_lookalike = - format!(" 0000: e8 00 00 00 00 call 0x1000 <{exact_header}>:\n"); - let original = format!("0000 <{exact_header}>:\n vector-op\n"); - let replacement = format!( - "0000 <{exact_header}>:\n{annotation}{annotation_header_lookalike} vector-op\n" - ); - let disassembly = synthetic_bodies("vector-op").replace(&original, &replacement); - assert!( - certify(&disassembly, &active_rules()).is_empty(), - "an ordinary instruction annotation must remain inside the owning body" - ); - } - - #[test] - fn repeated_probe_bodies_are_ambiguous_before_requirements_are_checked() { - let mut rules = active_rules(); - let svf = rules - .iter_mut() - .find(|rule| rule.symbol == "probe_svf_simd8") - .expect("active rules include the SVF probe"); - svf.required = vec![vec!["vmulps".to_owned()], vec!["vaddps".to_owned()]]; - - let mut disassembly = synthetic_bodies("vector-op"); - let original = format!("0000 <{PROBE_MODULE}::probe_svf_simd8>:\n vector-op\n"); - let repeated = format!( - "0000 <{PROBE_MODULE}::probe_svf_simd8>:\n vmulps %ymm0, %ymm1, %ymm2\n0010 <{PROBE_MODULE}::probe_svf_simd8>:\n vaddps %ymm0, %ymm1, %ymm2\n" - ); - assert!(disassembly.contains(&original)); - disassembly = disassembly.replace(&original, &repeated); - - let failures = certify(&disassembly, &rules); - assert!( - failures - .iter() - .any(|failure| failure.contains("ambiguous") && failure.contains("probe_svf_simd8")), - "expected repeated SVF bodies to be rejected as ambiguous, got {failures:?}" - ); - } - - #[test] - fn independently_valid_repeated_probe_bodies_are_ambiguous() { - let mut rules = active_rules(); - let svf = rules - .iter_mut() - .find(|rule| rule.symbol == "probe_svf_simd8") - .expect("active rules include the SVF probe"); - svf.required = vec![vec!["vmulps".to_owned()], vec!["vaddps".to_owned()]]; - - let mut disassembly = synthetic_bodies("vector-op"); - let original = format!("0000 <{PROBE_MODULE}::probe_svf_simd8>:\n vector-op\n"); - let valid_body = " vmulps %ymm0, %ymm1, %ymm2\n vaddps %ymm0, %ymm1, %ymm2\n"; - let single = format!("0000 <{PROBE_MODULE}::probe_svf_simd8>:\n{valid_body}"); - let single_disassembly = disassembly.replace(&original, &single); - assert!( - certify(&single_disassembly, &rules).is_empty(), - "one SVF body containing both required families must be valid" - ); - - let repeated = format!( - "0000 <{PROBE_MODULE}::probe_svf_simd8>:\n{valid_body}0000 <{PROBE_MODULE}::probe_svf_simd8>:\n{valid_body}" - ); - assert!(disassembly.contains(&original)); - disassembly = disassembly.replace(&original, &repeated); - - let failures = certify(&disassembly, &rules); - assert!( - failures - .iter() - .any(|failure| failure.contains("ambiguous") && failure.contains("probe_svf_simd8")), - "expected independently valid repeated SVF bodies to be rejected, got {failures:?}" - ); - assert!( - !failures.iter().any(|failure| { - failure.contains("probe_svf_simd8") && failure.contains("missing vector family") - }), - "ambiguity must be diagnosed before body requirements, got {failures:?}" - ); - } - - #[test] - fn exact_probe_path_and_body_boundaries_are_preserved() { - let gain_header = format!("0000 <{PROBE_MODULE}::probe_gain_simd8>:"); - let unrelated_header = "0010 :\n"; - let unsupported_header = format!("0020 <{PROBE_MODULE}::probe_gain_simd8::unsupported>:\n"); - let disassembly = synthetic_bodies("vector-op").replace( - &gain_header, - &(gain_header.clone() - + "\n vector-op\n" - + unrelated_header - + " scalar-op\n" - + &unsupported_header - + " scalar-op\n"), - ); - let failures = certify(&disassembly, &active_rules()); - assert!( - failures.is_empty(), - "an unrelated header must terminate the exact body without contaminating it, got {failures:?}" - ); - } - - #[test] - fn probe_bodies_remain_green_when_listing_order_changes() { - let body = |symbol: &str| format!("0000 <{PROBE_MODULE}::{symbol}>:\n vector-op\n"); - let disassembly = ACTIVE_REGISTRY - .iter() - .rev() - .map(|symbol| body(symbol)) - .collect::(); - assert!(certify(&disassembly, &active_rules()).is_empty()); - } - #[test] fn rust_disambiguator_suffix_is_narrowly_supported() { let exact_header = format!("{PROBE_MODULE}::probe_gain_simd8"); diff --git a/tools/bench/src/floor.rs b/tools/bench/src/floor.rs index 5b462b7c4..108e57360 100644 --- a/tools/bench/src/floor.rs +++ b/tools/bench/src/floor.rs @@ -380,8 +380,7 @@ mod tests { use std::process::{Command, Stdio}; use super::{ - BANK_WIDTH, BUILTINS_IDENTITY_LANE_OPS, COMPRESSOR_LANE_OPS, EQ_LANE_OPS, LIMITER_LANE_OPS, - OPS_PER_CYCLE, floor_row, lane_samples_per_block, + BANK_WIDTH, BUILTINS_IDENTITY_LANE_OPS, OPS_PER_CYCLE, floor_row, lane_samples_per_block, }; use console_workload::{ BUS_SEND_WORKLOADS, CONSOLE_STRIP_WORKLOADS, Workload, native_session_rows, @@ -643,24 +642,4 @@ input as $rust | assert!(row.control.is_none(), "{}", workload.kind()); } } - - #[test] - fn the_current_effect_recount_keeps_fractional_link_work_and_composes_the_strip() { - // The linked stereo max is shared by the two channel samples, hence the .5 in the - // compressor inventory. The limiter's shared link has the same accounting shape. - assert_eq!(COMPRESSOR_LANE_OPS, 81.5); - assert_eq!(LIMITER_LANE_OPS, 129.5); - assert_eq!(EQ_LANE_OPS, 27.0); - let console = floor_row(Workload::SixtyFourTrackConsole).expect("derived console row"); - let expected = (69.0 + 27.0 + 81.5 + 129.5) / (BANK_WIDTH * OPS_PER_CYCLE); - assert!((console.cycles_per_lane_sample() - expected).abs() < 1.0e-12); - let compressor = floor_row(Workload::SixtyFourTrackCompressorOnly).expect("compressor"); - let builtins = floor_row(Workload::SixtyFourTrackBuiltinsOnly).expect("builtins"); - assert!( - ((compressor.cycles_per_lane_sample() - builtins.cycles_per_lane_sample()) - - COMPRESSOR_LANE_OPS / (BANK_WIDTH * OPS_PER_CYCLE)) - .abs() - < 1.0e-12 - ); - } } diff --git a/tools/console-workload/src/lib.rs b/tools/console-workload/src/lib.rs index 507c5f576..52b2fe0f0 100644 --- a/tools/console-workload/src/lib.rs +++ b/tools/console-workload/src/lib.rs @@ -2530,52 +2530,6 @@ mod tests { ); } - /// Issue #956 gate 2 (#936 gate 1, re-homed): at the native width the executor dispatches - /// only the units that do work. - /// - /// Both gain/pan rows bind the same units: sixty-four track inputs, the cohorts' bank chains - /// and the Output op. On the bound-feed row every input is a host processor - /// (`NodeKind::Bound`) that writes its buffer, so every unit is dispatched every block. On the - /// driver-fed row every input is a claim its bank's gather reads in place (issue #918): a - /// plain, unobserved `SourceInput` op whose dispatch would return at once, which bind leaves - /// out of the dispatched-unit table. So the loop dispatches every unit but the sixty-four - /// inputs, once per block (`graph::test_only_unit_dispatches`, reset before every block), and - /// the row still renders the bound row's bits - /// (`the_driver_fed_gain_pan_row_renders_the_bound_rows_bits`). - #[test] - fn the_driver_fed_gain_pan_row_dispatches_every_unit_but_its_inputs() { - const BLOCKS: u64 = 64; - let tracks = u64::from(Workload::SixtyFourTrackGainPanRing.tracks()); - let mut censuses = Vec::new(); - for (workload, skipped) in [ - (Workload::SixtyFourTrackGainPanRing, tracks), - (Workload::SixtyFourTrackGainPanOnly, 0), - ] { - let mut runtime = SessionRuntime::new(workload); - let units = runtime.unit_eligibility().len() as u64; - assert!( - units > tracks, - "{}: the inputs, the bank chains and the Output", - workload.kind() - ); - censuses.push(units); - for block in 0..BLOCKS { - graph::test_only_unit_dispatch_reset(); - runtime.render(block).expect("console render"); - assert_eq!( - graph::test_only_unit_dispatches(), - units - skipped, - "{}, block {block}: units dispatched", - workload.kind() - ); - } - } - assert_eq!( - censuses[0], censuses[1], - "the census keeps every unit: the feed changes what is dispatched, not what is bound" - ); - } - /// The driver's five methods, called directly under the realtime audit: `played_planes` lends /// exactly the words `copy_track_input` copies, claim by claim, and both are the claimed /// track's frozen block through that track's declared channel mapping. diff --git a/tools/console-workload/tests/automation.rs b/tools/console-workload/tests/automation.rs index b964f101f..e3704142a 100644 --- a/tools/console-workload/tests/automation.rs +++ b/tools/console-workload/tests/automation.rs @@ -177,11 +177,10 @@ fn a_plan_without_a_control_channel_resolves_nothing() { // ------------------------------------------------------------------------------------------------- mod mixing { - use bench_support::digest::Sha256Sink; + use console_workload::SessionRuntime; use console_workload::mixing_automation::{ - self, Arm, CONTROLS, Effect, Lowering, MixingArm, MixingAutomation, PREFLIGHT_BLOCKS, - ResolveError, + self, Arm, CONTROLS, Effect, Lowering, MixingArm, MixingAutomation, ResolveError, }; use effect_contract::ParameterChannel; use lane::Backend; @@ -292,35 +291,6 @@ mod mixing { ); } - /// Restating every held value, in the host's lowerings, moves no rendered bit on any block. - /// - /// The collapse is at stake here and nowhere else in this file: the compressor's and the - /// limiter's Left and Right records retire their cohorts' collapse, and the dual bank must then - /// render the collapsed bank's bits. Block by block, because the property is bit-exactness. - #[test] - fn restating_the_held_values_moves_no_rendered_bit() { - let backend = Backend::current(); - let mut quiet = MixingArm::prepare(Arm::Quiet, None, backend); - let mut restated = MixingArm::prepare(Arm::Restated, None, backend); - for block in 0..PREFLIGHT_BLOCKS { - quiet.drive(); - restated.drive(); - quiet.render().expect("quiet render"); - restated.render().expect("restated render"); - let mut left = Sha256Sink::new(); - let mut right = Sha256Sink::new(); - quiet.runtime.hash_output(&mut left); - restated.runtime.hash_output(&mut right); - assert_eq!( - left.finish_hex(), - right.finish_hex(), - "block {block}: restating the held values moved a rendered bit" - ); - } - assert_eq!(restated.tally.accepted, restated.tally.attempted); - assert_eq!(restated.tally.attempted, 13 * PREFLIGHT_BLOCKS); - } - /// Every automated effect moves bits on its own, and the whole ride moves them on every /// block; the EQ's restatement keeps every cohort collapsed. The preflight the bench runs /// before it takes a number, run here on every change. diff --git a/tools/console-workload/tests/eq_ramping_scenario.rs b/tools/console-workload/tests/eq_ramping_scenario.rs index 2b8a7dce6..a218c6296 100644 --- a/tools/console-workload/tests/eq_ramping_scenario.rs +++ b/tools/console-workload/tests/eq_ramping_scenario.rs @@ -155,8 +155,3 @@ fn check(workload: Workload) { fn eq_only_gain_rides_move_bits_and_agree_between_supported_widths() { check(Workload::SixtyFourTrackEqOnly); } - -#[test] -fn mono_console_both_rides_move_bits_and_agree_between_supported_widths() { - check(Workload::SixtyFourTrackConsoleMono); -} diff --git a/tools/console-workload/tests/paired_spans.rs b/tools/console-workload/tests/paired_spans.rs index 57cd5a568..707710ed2 100644 --- a/tools/console-workload/tests/paired_spans.rs +++ b/tools/console-workload/tests/paired_spans.rs @@ -1405,16 +1405,6 @@ fn run_all(fxs: &[Fx]) { eprintln!("{fxs:?}: scenarios per width {ran:?}"); } -#[test] -fn the_eq_bank_renders_the_dual_bits_in_every_scenario() { - run_all(&[Fx::Eq]); -} - -#[test] -fn the_compressor_bank_renders_the_dual_bits_in_every_scenario() { - run_all(&[Fx::Compressor]); -} - #[test] fn the_limiter_bank_renders_the_dual_bits_in_every_scenario() { run_all(&[Fx::Limiter]); @@ -2230,24 +2220,6 @@ fn a_restatement_keeps_every_cohort_collapsed() { ); } -/// The product's EQ path never needed the rule: the SDK sends a symmetric both-channel EQ edit as -/// one `Both` target, which the witness always preserved. This holds on the base tree as well -/// (VERIFY-AUTOMATION F2), and is here so that stays true. -#[test] -fn an_eq_only_both_channel_ride_keeps_every_cohort_collapsed() { - const BLOCKS: u64 = 16; - let (counters, _, _) = console_run(Backend::current(), BLOCKS, &|block, tracks| { - (0..tracks.len()) - .step_by(3) - .map(|track| { - let gain = if block.is_multiple_of(2) { 2.0 } else { -2.0 }; - (track, Push::Both(EQ, EQ_GAIN, gain)) - }) - .collect() - }); - assert_eq!(counters[0], BLOCKS * counters[1]); -} - /// A one-channel write or a near pair retires exactly its own cohort, on the block it lands. #[test] fn a_one_channel_write_or_a_near_pair_retires_exactly_its_cohort() { diff --git a/tools/console-workload/tests/placement.rs b/tools/console-workload/tests/placement.rs index 4cb21144c..0e934d911 100644 --- a/tools/console-workload/tests/placement.rs +++ b/tools/console-workload/tests/placement.rs @@ -46,25 +46,3 @@ fn the_intended_strips_limiter_moves_rendered_bits() { "the simd2 true-peak limiter must actually process the signal" ); } - -/// The legacy split EQ/compressor chains and the merged chain agree on each block's digest. -/// The public output-hashing surface folds every master word; this comparison names the first -/// block that disagrees, while the chain-shape test also checks the full run and plan topology. -#[test] -fn the_two_placements_agree_block_by_block() { - let mut split = SessionRuntime::new(Workload::SixtyFourTrackConsoleLegacy); - let mut merged = SessionRuntime::new(Workload::SixtyFourTrackEqCompSimd1); - for block in 0..BLOCKS { - split.render(block).expect("split-chain render"); - merged.render(block).expect("merged-chain render"); - let mut left = Sha256Sink::new(); - let mut right = Sha256Sink::new(); - split.hash_output(&mut left); - merged.hash_output(&mut right); - assert_eq!( - left.finish_hex(), - right.finish_hex(), - "block {block}: the two placements diverged" - ); - } -} diff --git a/tools/realtime-policy/tests/policy/binary.rs b/tools/realtime-policy/tests/policy/binary.rs index 98e3786fa..7eadb12f7 100644 --- a/tools/realtime-policy/tests/policy/binary.rs +++ b/tools/realtime-policy/tests/policy/binary.rs @@ -25,13 +25,3 @@ fn a_root_with_a_missing_scan_root_exits_one() { "failure line expected: {stderr}" ); } - -#[test] -fn two_arguments_exit_two() { - let output = binary() - .args(["one", "two"]) - .output() - .expect("run the binary"); - assert_eq!(output.status.code(), Some(2)); - assert!(output.stdout.is_empty()); -} diff --git a/tools/realtime-policy/tests/policy/drain/indirect.rs b/tools/realtime-policy/tests/policy/drain/indirect.rs index 0d0bdb9c3..f61f37c90 100644 --- a/tools/realtime-policy/tests/policy/drain/indirect.rs +++ b/tools/realtime-policy/tests/policy/drain/indirect.rs @@ -246,22 +246,6 @@ fn a_debug_assert_that_a_file_shadows_is_not_taken_at_its_word() { }); } -/// F2 (root Amendment 2): a workspace proc macro named `debug_assert` rebinds the count with no -/// `macro_rules!`, no `macro` and no `use`, and `#[macro_use] extern crate` brings it into the -/// drain's file. The file here holds only `#[proc_macro] pub fn debug_assert`. Two rules refuse it -/// and either alone suffices: F2 (a `debug_assert` that no `!` follows is a shadow, so the base -/// tree's drains that name a count in one are refused) and D3's (d) (a `proc_macro` identifier). -/// The row is red only if both are dropped. -#[test] -fn a_proc_macro_named_debug_assert_is_refused() { - let tree = Tree::base("proc-macro-fn"); - tree.apply(&[Edit::Create { - path: "crates/shadowing/src/lib.rs", - text: "#[proc_macro]\npub fn debug_assert(input: TokenStream) -> TokenStream {\n input\n}\n", - }]); - assert_classes(&tree, &[DRAIN]); -} - /// D2: text that is not a definition or an import of the name leaves `debug_assert!` trusted: a /// string, a comment, a longer name, a `use` of another macro, a `use<..>` bound. #[test] diff --git a/tools/realtime-policy/tests/policy/unsafe_ownership.rs b/tools/realtime-policy/tests/policy/unsafe_ownership.rs index 9fe52aae3..bf53357ca 100644 --- a/tools/realtime-policy/tests/policy/unsafe_ownership.rs +++ b/tools/realtime-policy/tests/policy/unsafe_ownership.rs @@ -10,113 +10,10 @@ fn bad_fn() -> String { format!("{UNSAFE} fn bad() {{}}\n") } -/// Each row puts unsafe code in a file the allowlist does not name. Several rows are one directory -/// or one file stem away from a listed file: a prefix or directory match would let them through. -#[test] -fn unsafe_code_outside_the_allowlist_is_a_finding() { - let bad = bad_fn(); - let extern_fn = format!("pub {UNSAFE} extern \"C\" fn bad() {{}}\n"); - let rows: [(&str, Edit); 16] = [ - ( - "unsafe-scope", - Edit::Append { - path: "crates/engine/src/realtime/buffer.rs", - text: &bad, - }, - ), - ( - "unsafe-outside-exact-allowlist", - create("tools/bench/src/other.rs", &bad), - ), - ( - "unsafe-outside-capi-audit-main", - create("tools/audit/src/other.rs", &bad), - ), - ( - "unsafe-in-deleted-native-pcm-runner-lib", - create("tools/native-pcm-runner/src/lib.rs", &bad), - ), - ( - "unsafe-in-deleted-bench-protocol", - create("tools/bench/src/protocol.rs", &bad), - ), - ( - "unsafe-in-deleted-core-arch", - create("crates/engine/src/arch/x86.rs", &bad), - ), - ( - "unsafe-outside-capi-ffi", - create("crates/capi/src/lib.rs", &extern_fn), - ), - ( - "unsafe-in-second-capi-ffi-path", - create("crates/capi/src/ffi/other.rs", &bad), - ), - ( - "unsafe-outside-capi-lifecycle-audit", - create("crates/capi/tests/other.rs", &bad), - ), - ( - "unsafe-outside-session-allocation-budget", - create("crates/session/tests/other.rs", &bad), - ), - ( - "unsafe-outside-web-ffi", - Edit::Append { - path: "hosts/host-web/src/lib.rs", - text: &extern_fn, - }, - ), - ( - "unsafe-in-second-web-ffi-path", - create("hosts/host-web/src/ffi/other.rs", &bad), - ), - ( - "unsafe-outside-web-peak-audit", - create("hosts/host-web/tests/other.rs", &bad), - ), - ( - "unsafe-outside-disjoint-arena", - create("crates/engine/src/realtime/disjoint_extra.rs", &bad), - ), - ( - "unsafe-outside-lane-softfma", - create("crates/lane/src/kernels.rs", &bad), - ), - ( - "unsafe-outside-lane-fpenv", - create("crates/lane/src/fpenv_extra.rs", &bad), - ), - ]; - for (name, edit) in rows { - expect_failure(name, &[edit], &[OUTSIDE]); - } -} - fn create<'a>(path: &'a str, text: &'a str) -> Edit<'a> { Edit::Create { path, text } } -/// The five files that the 2026-10-08 amendment dropped from the allowlist must stay dropped: -/// each holds no unsafe code today, and a listed file lets a later change add some unreviewed. -#[test] -fn the_dropped_allowlist_entries_are_findings() { - let bad = bad_fn(); - for path in [ - "crates/soft-clip/tests/allocation.rs", - "crates/transient-shaper/tests/allocation.rs", - "crates/true-peak-limiter/tests/allocation.rs", - "crates/multiband-compressor/tests/no_alloc_render.rs", - "tools/wasm-gate-guest/src/lib.rs", - ] { - expect_failure( - &format!("dropped-{}", path.replace('/', "-")), - &[create(path, &bad)], - &[OUTSIDE], - ); - } -} - /// The finding names the file, the line of the `unsafe` token and that line's text. #[test] fn a_finding_carries_its_file_line_and_source_line() { diff --git a/tools/session-validator/tests/validate.rs b/tools/session-validator/tests/validate.rs index a33d6e767..0a5668fbc 100644 --- a/tools/session-validator/tests/validate.rs +++ b/tools/session-validator/tests/validate.rs @@ -134,22 +134,6 @@ fn fixtures_distinguish_schema_examples_from_launch_effects() { ); } -#[test] -fn the_duplicate_key_fixture_fails_the_grammar_stage() { - let name = "json-invalid-duplicate-key.json"; - let report = validate_session_document(&fixture(name)); - assert!(!report.passed()); - assert_eq!(report.failed_stage(), Some(0)); - let stage = &report.stages()[0]; - assert_eq!(stage.name, "json-grammar"); - assert_eq!(stage.diagnostics.len(), 1); - assert_eq!(stage.diagnostics[0].code, "json.syntax"); - for later in &report.stages()[1..] { - assert_eq!(later.status, StageStatus::Skipped, "{}", later.name); - } - assert!(report.canonical().is_none()); -} - /// `(fixture, needle, replacement, expected stage index, expected diagnostic code)`. /// /// Every row is a single textual substitution on a checked-in fixture, so a row that stops @@ -427,18 +411,6 @@ fn parse_stage_diagnostics_carry_a_source_location_and_preparation_diagnostics_d } } -#[test] -fn canonical_output_reproduces_the_checked_in_canonical_fixtures() { - let name = "canonical-minimal.json"; - let source = fixture(name); - let report = validate_session_document(&source); - assert_eq!( - report.canonical(), - Some(source.as_str()), - "{name} is checked in as canonical" - ); -} - #[test] fn canonicalization_normalizes_and_is_a_fixed_point() { let canonical = fixture("observation-frame-shape.json"); From 765eb20dfe487e9b45c24f89a81b51ba9c77f8c2 Mon Sep 17 00:00:00 2001 From: BL Date: Tue, 20 Oct 2026 01:50:14 +0000 Subject: [PATCH 07/10] Spec TBD-TA4 and add the #1728 spec (CI debug test job time margin) Co-Authored-By: Claude Opus 5.5 --- ...space-debug-test-job-a-real-time-margin.md | 12 + ...TA4-delete-the-measured-redundant-tests.md | 444 ++++++++++++++++++ 2 files changed, 456 insertions(+) create mode 100644 .github/ISSUE_SPECS/1728-give-the-workspace-debug-test-job-a-real-time-margin.md create mode 100644 .github/ISSUE_SPECS/TBD-TA4-delete-the-measured-redundant-tests.md diff --git a/.github/ISSUE_SPECS/1728-give-the-workspace-debug-test-job-a-real-time-margin.md b/.github/ISSUE_SPECS/1728-give-the-workspace-debug-test-job-a-real-time-margin.md new file mode 100644 index 000000000..00c58dac2 --- /dev/null +++ b/.github/ISSUE_SPECS/1728-give-the-workspace-debug-test-job-a-real-time-margin.md @@ -0,0 +1,12 @@ +# Give the workspace debug test job a real time margin + +The required `qualification` job "workspace debug tests (minus DSP crates and evidence tools)" has `timeout-minutes: 15` (`.github/workflows/qualification.yml:609`). On recent runs it took 14.5 to 14.7 minutes (PR #1725: 14:41; batch 20, PR #1721: 14:36), and on PR #1727 it hit the timeout twice while its tests were still passing. One rerun of the failed job then passed in 10.5 minutes. The job runs too close to its limit, so a cold cache or a slow runner turns a green PR red. + +## Decision to make + +- Cut the job's time (the 2026-10 test audit removes redundant tests; the 5 `tools/audit` `fixture_builtins` tests use about 14% of all test-binary time and are in this job's scope only if not excluded), or +- raise the timeout to a measured margin (for example 1.5 times the slowest recent green run), or both. + +## Gate + +Ten consecutive green runs of the job with at least 25% margin under its timeout. diff --git a/.github/ISSUE_SPECS/TBD-TA4-delete-the-measured-redundant-tests.md b/.github/ISSUE_SPECS/TBD-TA4-delete-the-measured-redundant-tests.md new file mode 100644 index 000000000..edb575d18 --- /dev/null +++ b/.github/ISSUE_SPECS/TBD-TA4-delete-the-measured-redundant-tests.md @@ -0,0 +1,444 @@ +# Delete the tests that mutation measurement found redundant (test audit TA4) + +Owner approval: option A, relayed by root on 2026-10-20: delete what batch 1 measured redundant now, +sample batch 2, and end the audit with one PR (TA5) from that sample. Branch: +`codex/batch-test-policy-3`, from `main` at `b9135008d` (TA1 #1722, TA2 #1724 and TA3 #1726 merged). +Phase B PR 4 of the 2026-10 test audit. + +## Method (batch 1) + +Batch 1 is the 2026-10-19 stage 3 run at base `81a3074fc` (6.0 h; method and data kept with the +audit's working notes, `m/README.md`). Its candidates were the 180 reading-agent DELETE/UNSURE rows +outside the policy classes and the never-delete classes. cargo-mutants 27.1.0 mutants were drawn +from functions each candidate covers (stage 1 coverage map), up to 4 catches or 12 tries per +candidate; each viable mutant ran every candidate that covers its function and then the covering +KEEP tests. 392 mutants, 292 viable, 21 survivors. + +- MEASURED-REDUNDANT: every mutant the candidate caught was also red in a KEEP test. +- REDUNDANT-IF-PEER-KEPT: some catches were made only by candidates; a greedy cover over those + catches keeps 4 tests and drops the rest. +- UNIQUE: at least one mutant only this test caught. THIN, WEAK, NO-COVERAGE: too few tries or + catches to judge. + +"Redundant" means: no mutant of the sample needs this test. It is not a proof over all mutants, +and the KEEP catchers below are the recorded catchers of the sampled mutants, not of every row +mutation that a `MUTATIONS.md` names. + +## What this change does + +1. Deletes the 140 MEASURED-REDUNDANT tests that still exist as measured (2 skipped, below). +2. Deletes the 8 REDUNDANT-IF-PEER-KEPT tests that the greedy cover drops. The cover keeps 4: + `audit` `vectorization::tests::rust_disambiguator_suffix_is_narrowly_supported` and + `parametric-eq` `malformed_requests_preserve_output_sentinels_and_opaque_ids` stay; + `conformance` `tolerance_boundary_tie_and_snr_cases_are_explicit` and `effect-runtime` + `the_mapping_inverse_round_trips` are UNIQUE only on test-only code and go with it (item 4). + (The brief said 6 of 10; the data has 10 IF-PEER-KEPT rows, 2 of them kept by the cover, plus + 2 UNIQUE rows in the cover, so the cover drops 8. Each dropped test's candidate-only mutants are + in code that a kept test catches or that item 4 deletes.) +3. Keeps every UNIQUE (except item 4), THIN, WEAK and NO-COVERAGE test. +4. Deletes code that only tests call, with its UNIQUE tests. Proof: `git grep` over `crates/`, + `hosts/` and `tools/` outside test code finds no caller, and the workspace builds warning-free + without it (`cargo clippy --workspace --all-targets --all-features -- -D warnings`). + - `conformance` `PlanarBlock`/`BlockError` (`src/block.rs`, 68 lines), `compare_f32_to_f64` and + its report types (`src/compare.rs`, 235), `verify_bit_exact_repeat`/`DeterminismError` + (`src/determinism.rs`, 34): only the crate's own tests used them. Deleted with + `tests/api_metrics.rs` (100; UNIQUE `tolerance_boundary_tie_and_snr_cases_are_explicit` and + `invalid_rates_shapes_tolerances_and_nonfinite_values_are_typed`), the lib test + `block_metrics_and_repeat_bits_cover_boundaries`, and the two `PlanarBlock` assertions of + the KEEP test `fixtures.rs` `planar_blocks_and_fixtures_accept_only_launch_rates`, renamed + `fixtures_accept_only_launch_rates` (its fixture assertions stay). + - `effect-contract` `map_normalized`, `inverse_map_normalized`, `map_stepped_normalized`, + `inverse_map_stepped_normalized` (`src/lib.rs:1220-1285`): no product caller. Deleted with + UNIQUE `conformance` `normalized_mapping_endpoints_ties_and_round_trips_are_stable`. + - `effect-runtime` `params::map_normalized`, `params::inverse_map_normalized` + (`src/params.rs:182-229`): no product caller. Deleted with UNIQUE + `the_mapping_inverse_round_trips` and its three IF-PEER-KEPT peers. The + `check-effect-runtime-policy.sh` ratchet rows for the pair go to 0. + - `lane` `CanonicalFpEnv::saved_word` (`src/fpenv.rs:533-538` and `:590-593`): no product + caller. Deleted with UNIQUE `fp_env.rs` `the_canonical_word_is_the_word_inside_the_guard` + (its install and restore assertions are the KEEP tests' catches). + - Kept: `controls` `ControlDescriptor::range_contains` (UNIQUE `domain_boundaries`), + `audit` `is_encoding_token` and `symbol_header` (UNIQUE `call_inside_kernel_body_is_red`, + `malformed_prose_and_instruction_prefixes_do_not_own_probe_body`) and `builtins` + `PreparedInputFilterResponse::retained_bytes` (UNIQUE + `common_builtin_adapter_preserves_resource_and_refusal_contract`; host-core `response.rs` + calls it through the trait): product code calls each of them. +5. Deletes helpers only after the compiler reported them unused (dead_code or unused imports under + clippy `--all-targets --all-features`), looped until it reported nothing. No + `#[allow(dead_code)]` was added. Test files left with no test are deleted whole. +6. Updates the references: each `MUTATIONS.md` row or doc line that names a deleted test now says + "deleted by TA4" and names the KEEP catcher batch 1 recorded for that test's mutants, and each + such `MUTATIONS.md` ends with a "TA4 deletions" list. Open specs that name a deleted test or file + (#1290, #1350, #1406, #1654, #1696, #1722) say so in place. + +## Non-goals + +- No product render, prepare or control path changes. Item 4 deletes only code no product path + calls. +- No new tests. The 21 survivors are TA4's other half (agent T4S, merged in later). +- Dated records under `docs/handoffs`, `docs/audits` and `artifacts/` and the rename table in + `docs/rulings/de-versioning-inventory.md` are history and are not edited. + +## Objective gates + +Every `run:` step of the qualification `lint` job (fmt, workspace clippy `-D warnings`, +`RUSTDOCFLAGS='-D warnings' cargo doc --locked --workspace --no-deps`, the hermetic policy gates), +and `cargo test --locked --all-features -p ` for every touched package. + +## Evidence + +Line numbers are at `b9135008d`. Each test lists the number of sampled mutants it caught and the +KEEP tests that were also red on them (count per catcher; "other candidates only" are the cover's +peers, "timeout" is a 20-minute KEEP run counted as caught). + +### Deleted tests (153, 7,175 lines) + +#### audit + +- `fixture_builtins::tests::check_rejects_benchmark_identity_parameter_and_pcm_hash_mutations`, `tools/audit/src/fixture_builtins.rs:5623-5669`; 16 caught: `graph lib program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers` (4); timeout in engine lib (2); `builtins-compiler lib tests::cutoff_boundaries_match_compiler_diagnostics_at_every_launch_rate_and_section` (1); `graph lib runtime::tests::a_plan_that_reads_the_session_output_is_refused_at_bind` (1); `engine lib realtime::spsc::tests::peek_returns_each_queued_item_in_order_across_wraps_and_changes_nothing` (1); `engine lib realtime::spsc::tests::available_at_entry_is_bounded_and_handles_wrapped_cursors` (1); `graph lib runtime::tests::a_banked_source_gathers_the_played_block_bit_for_bit_with_the_copy` (1); `session json_grammar::u64_decimal_strings_cover_full_domain_and_reject_noncanonical_forms` (1); `graph lib program::tests::delayed_edge_gets_staging_buffer_and_blocks_in_place` (1); `graph-compiler track_delay::a_ring_is_a_named_allocation` (1); `graph lib program::tests::a_delayed_stage_boundary_is_not_elided` (1); `graph-compiler track_delay::the_pdc_counts_are_untouched` (1) +- `vectorization::tests::near_name_impostor_does_not_satisfy_probe` [REDUNDANT-IF-PEER-KEPT], `tools/audit/src/vectorization.rs:722-741`; 4 caught: `audit bin vectorization::tests::scalar_fallback_is_red` (2); other candidates only (1); `audit bin vectorization::tests::missing_vector_family_is_red` (1) +- `vectorization::tests::ordinary_instruction_annotations_do_not_terminate_probe_body`, `tools/audit/src/vectorization.rs:768-783`; 4 caught: `audit bin vectorization::tests::scalar_fallback_is_red` (3); `audit bin vectorization::tests::missing_vector_family_is_red` (1) +- `vectorization::tests::repeated_probe_bodies_are_ambiguous_before_requirements_are_checked`, `tools/audit/src/vectorization.rs:785-809`; 5 caught: `audit bin vectorization::tests::scalar_fallback_is_red` (4); `audit bin vectorization::tests::missing_vector_family_is_red` (1) +- `vectorization::tests::independently_valid_repeated_probe_bodies_are_ambiguous`, `tools/audit/src/vectorization.rs:811-849`; 5 caught: `audit bin vectorization::tests::scalar_fallback_is_red` (4); `audit bin vectorization::tests::missing_vector_family_is_red` (1) +- `vectorization::tests::exact_probe_path_and_body_boundaries_are_preserved` [REDUNDANT-IF-PEER-KEPT], `tools/audit/src/vectorization.rs:851-870`; 5 caught: `audit bin vectorization::tests::scalar_fallback_is_red` (3); other candidates only (1); `audit bin vectorization::tests::missing_vector_family_is_red` (1) +- `vectorization::tests::probe_bodies_remain_green_when_listing_order_changes`, `tools/audit/src/vectorization.rs:872-881`; 4 caught: `audit bin vectorization::tests::scalar_fallback_is_red` (3); `audit bin vectorization::tests::missing_vector_family_is_red` (1) + +#### bench + +- `floor::tests::the_current_effect_recount_keeps_fractional_link_work_and_composes_the_strip`, `tools/bench/src/floor.rs:647-665`; 4 caught: `bench bin floor::tests::the_driver_fed_gain_pan_row_is_costed_at_the_identity_inventory_and_isolates_nothing` (2); `bench bin floor::tests::every_derived_row_names_its_ruling_and_composes_a_positive_floor` (1); `bench bin floor::tests::a_control_row_is_always_cheaper_than_the_row_it_isolates` (1) + +#### builtins + +- `tests::settled_matrix_takes_the_select_free_arm_only_without_an_identity_lane`, `crates/builtins/src/tests.rs:847-1008`; 3 caught: `builtins randomized::the_banks_render_their_scalar_sections_under_random_retargets` (1); `lane g1_op_identity::g1_exp2_int_is_exact_on_the_integer_range` (1); `lane sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` (1) +- `tests::fused_fader_matrix_takes_the_select_free_arm_only_without_an_identity_lane`, `crates/builtins/src/tests.rs:1010-1195`; 6 caught: `builtins lib tests::full_public_chain_matches_the_three_section_reference` (1); `builtins randomized::the_banks_render_their_scalar_sections_under_random_retargets` (1); `lane g1_op_identity::g1_exp2_int_is_exact_on_the_integer_range` (1); `lane sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` (1); `graph-compiler track_delay::a_ring_is_a_named_allocation` (1); `graph-compiler track_delay::the_pdc_counts_are_untouched` (1) +- `common_builtin_adapter_matches_direct_owner_for_all_launch_rates_and_sections`, `crates/builtins/tests/filter_response.rs:870-998`; 3 caught: `builtins filter_response::every_launch_rate_checks_exact_maximum_successors_and_equal_order` (2); `builtins filter_response::common_builtin_trait_object_query_is_allocation_free` (1) +- `matrix_ramp_tracks_the_f64_interpolation`, `crates/builtins/tests/matrix.rs:115-148`; 5 caught: `lane fader_matrix::select_free_fused_fader_matrix_matches_both_oracles_when_no_lane_is_identity` (2); `builtins matrix::explicit_window_retarget_ramps_over_the_requested_window_and_is_adopted` (1); `lane g1_op_identity::g1_exp2_int_is_exact_on_the_integer_range` (1); `lane sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` (1) +- `matrix_ramp_reaches_target`, `crates/builtins/tests/matrix.rs:184-206`; 6 caught: `lane fader_matrix::select_free_fused_fader_matrix_matches_both_oracles_when_no_lane_is_identity` (2); `lane sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` (2); `builtins matrix::explicit_window_retarget_ramps_over_the_requested_window_and_is_adopted` (1); `lane g1_op_identity::g1_exp2_int_is_exact_on_the_integer_range` (1) +- `launch_and_extended_compatibility_rate_sweeps_match_f64_magnitude`, `crates/builtins/tests/response.rs:221-291`; 5 caught: `builtins response::launch_and_extended_compatibility_rates_match_the_independent_f64_rbj_oracle` (1); `lane g4_flush::g4_flush_law_holds_at_every_width` (1); `lane sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` (1); `graph-compiler track_delay::a_zero_delay_session_lowers_no_delay_node` (1); `graph-compiler track_delay::an_oversized_delay_is_rejected_by_the_caps` (1) +- `banked_fader_and_matrix_are_bit_identical_to_the_per_track_sections`, `crates/builtins/tests/stage.rs:1119-1164`; 13 caught: `builtins randomized::the_banks_render_their_scalar_sections_under_random_retargets` (3); `lane sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` (3); `lane fader_matrix::select_free_fused_fader_matrix_matches_both_oracles_when_no_lane_is_identity` (2); `lane fader_matrix::select_free_matrix_matches_the_select_form_when_no_lane_is_identity` (1); `lane g1_op_identity::g1_exp2_int_is_exact_on_the_integer_range` (1); `lane fader_matrix::settled_fader_matrix_matches_the_two_primitive_oracle` (1); `graph-compiler track_delay::a_ring_is_a_named_allocation` (1); `graph-compiler track_delay::the_pdc_counts_are_untouched` (1) + +#### builtins-compiler + +- `tests::resource_estimate_enforces_the_actual_largest_retained_payload`, `crates/builtins-compiler/src/lib.rs:14682-14710`; 3 caught: `builtins-compiler lib tests::cutoff_boundaries_match_compiler_diagnostics_at_every_launch_rate_and_section` (1); `session json_grammar::u64_decimal_strings_cover_full_domain_and_reject_noncanonical_forms` (1); `graph-compiler track_delay::the_pdc_counts_are_untouched` (1) +- `tests::retained_payload_boundaries_reject_in_phase_one`, `crates/builtins-compiler/src/lib.rs:14712-14748`; 3 caught: `builtins-compiler lib tests::cutoff_boundaries_match_compiler_diagnostics_at_every_launch_rate_and_section` (1); `session json_grammar::u64_decimal_strings_cover_full_domain_and_reject_noncanonical_forms` (1); `graph-compiler track_delay::the_pdc_counts_are_untouched` (1) + +#### capi + +- `runtime::live_tests::a_live_edit_while_a_candidate_is_pending_reaches_the_candidate`, `crates/capi/src/runtime/live_tests.rs:1485-1561`; 28 caught: `graph lib program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers` (4); `math scalar_accuracy::extreme_scaling_paths` (2); `graph-compiler track_delay::a_ring_is_a_named_allocation` (2); timeout in engine lib (2); `graph lib program::tests::delayed_edge_gets_staging_buffer_and_blocks_in_place` (2); `graph lib runtime::tests::a_plan_that_reads_the_session_output_is_refused_at_bind` (1); `math scalar_accuracy::exact_anchors` (1); `engine lib realtime::spsc::tests::peek_returns_each_queued_item_in_order_across_wraps_and_changes_nothing` (1); `engine lib realtime::spsc::tests::available_at_entry_is_bounded_and_handles_wrapped_cursors` (1); `host-web lib tests::structural_apply::a_master_designated_after_an_empty_boot_reads_as_a_boot_designation` (1); `graph lib runtime::tests::a_banked_source_gathers_the_played_block_bit_for_bit_with_the_copy` (1); `protocol console_session_edits::a_slot_set_change_that_skips_a_track_refuses_whole` (1); `graph-compiler track_delay::a_zero_delay_session_lowers_no_delay_node` (1); `graph-compiler track_delay::an_oversized_delay_is_rejected_by_the_caps` (1); `parametric-eq response::asymmetric_cascade_sections_are_independent_and_bypass_is_total_identity` (1); `rack lib tests::a_fully_folded_full_bank_offers_its_resident_block_before_writing_staging` (1); `capi lib runtime::live_tests::a_live_fader_left_undrained_before_a_carrying_structural_commit_is_baked` (1); `controls domain::a_value_a_valid_session_holds_is_inside_its_row` (1); `graph lib program::tests::a_delayed_stage_boundary_is_not_elided` (1); `graph-compiler track_delay::the_pdc_counts_are_untouched` (1); `rack lib tests::a_partial_agreement_slot_declines_the_collapse` (1) +- `runtime::live_tests::set_control::a_mode_switch_under_a_stored_pan_entry_is_refused_before_any_commit`, `crates/capi/src/runtime/live_tests.rs:8006-8082`; 20 caught: `graph lib program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers` (4); `graph-compiler track_delay::a_ring_is_a_named_allocation` (2); timeout in engine lib (2); `graph lib runtime::tests::a_plan_that_reads_the_session_output_is_refused_at_bind` (1); `engine lib realtime::spsc::tests::peek_returns_each_queued_item_in_order_across_wraps_and_changes_nothing` (1); `engine lib realtime::spsc::tests::available_at_entry_is_bounded_and_handles_wrapped_cursors` (1); `host-web lib tests::structural_apply::a_master_designated_after_an_empty_boot_reads_as_a_boot_designation` (1); `graph lib runtime::tests::a_banked_source_gathers_the_played_block_bit_for_bit_with_the_copy` (1); `protocol console_session_edits::a_slot_set_change_that_skips_a_track_refuses_whole` (1); `graph-compiler track_delay::a_zero_delay_session_lowers_no_delay_node` (1); `graph-compiler track_delay::an_oversized_delay_is_rejected_by_the_caps` (1); `parametric-eq response::asymmetric_cascade_sections_are_independent_and_bypass_is_total_identity` (1); `graph lib program::tests::delayed_edge_gets_staging_buffer_and_blocks_in_place` (1); `graph lib program::tests::a_delayed_stage_boundary_is_not_elided` (1); `graph-compiler track_delay::the_pdc_counts_are_untouched` (1) +- `runtime::live_tests::set_control::automated_vca::a_vca_move_over_an_automated_member_is_live_and_renders_the_prepared_plan`, `crates/capi/src/runtime/live_tests.rs:8527-8580`; 38 caught: `capi lib runtime::live_tests::a_live_edits_own_ramp_length_overrides_the_session_and_does_not_outlive_its_transaction` (4); `capi lib runtime::live_tests::a_rebuild_that_drops_a_following_route_to_six_words_reports_a_fallback` (4); `graph lib program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers` (4); `session json_grammar::insignificant_whitespace_and_shuffled_keys_canonicalize` (3); `math scalar_accuracy::extreme_scaling_paths` (2); `graph-compiler track_delay::a_ring_is_a_named_allocation` (2); timeout in engine lib (2); `graph lib program::tests::delayed_edge_gets_staging_buffer_and_blocks_in_place` (2); `builtins-compiler lib tests::cutoff_boundaries_match_compiler_diagnostics_at_every_launch_rate_and_section` (1); `graph lib runtime::tests::a_plan_that_reads_the_session_output_is_refused_at_bind` (1); `math scalar_accuracy::exact_anchors` (1); `host-web control_parity::a_vca_move_over_an_automated_member_is_live_alike_on_both_hosts` (1); `engine lib realtime::spsc::tests::peek_returns_each_queued_item_in_order_across_wraps_and_changes_nothing` (1); `engine lib realtime::spsc::tests::available_at_entry_is_bounded_and_handles_wrapped_cursors` (1); `graph lib runtime::tests::a_banked_source_gathers_the_played_block_bit_for_bit_with_the_copy` (1); `graph-compiler track_delay::a_zero_delay_session_lowers_no_delay_node` (1); `graph-compiler track_delay::an_oversized_delay_is_rejected_by_the_caps` (1); `parametric-eq response::asymmetric_cascade_sections_are_independent_and_bypass_is_total_identity` (1); `rack lib tests::a_fully_folded_full_bank_offers_its_resident_block_before_writing_staging` (1); `capi lib runtime::live_tests::a_live_fader_left_undrained_before_a_carrying_structural_commit_is_baked` (1); `graph lib program::tests::a_delayed_stage_boundary_is_not_elided` (1); `graph-compiler track_delay::the_pdc_counts_are_untouched` (1); `rack lib tests::a_partial_agreement_slot_declines_the_collapse` (1) +- `runtime::live_tests::set_control::automated_vca::vca_reach_and_count_changes_over_an_automated_member_are_live`, `crates/capi/src/runtime/live_tests.rs:8582-8636`; 36 caught: `capi lib runtime::live_tests::a_rebuild_that_drops_a_following_route_to_six_words_reports_a_fallback` (4); `graph lib program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers` (4); `session json_grammar::insignificant_whitespace_and_shuffled_keys_canonicalize` (3); `math scalar_accuracy::extreme_scaling_paths` (2); `graph-compiler track_delay::a_ring_is_a_named_allocation` (2); timeout in engine lib (2); `graph lib program::tests::delayed_edge_gets_staging_buffer_and_blocks_in_place` (2); `builtins-compiler lib tests::cutoff_boundaries_match_compiler_diagnostics_at_every_launch_rate_and_section` (1); `graph lib runtime::tests::a_plan_that_reads_the_session_output_is_refused_at_bind` (1); `math scalar_accuracy::exact_anchors` (1); `host-web control_parity::a_vca_move_over_an_automated_member_is_live_alike_on_both_hosts` (1); `engine lib realtime::spsc::tests::peek_returns_each_queued_item_in_order_across_wraps_and_changes_nothing` (1); `engine lib realtime::spsc::tests::available_at_entry_is_bounded_and_handles_wrapped_cursors` (1); `host-web lib tests::structural_apply::a_master_designated_after_an_empty_boot_reads_as_a_boot_designation` (1); `graph lib runtime::tests::a_banked_source_gathers_the_played_block_bit_for_bit_with_the_copy` (1); `protocol console_session_edits::a_slot_set_change_that_skips_a_track_refuses_whole` (1); `graph-compiler track_delay::a_zero_delay_session_lowers_no_delay_node` (1); `graph-compiler track_delay::an_oversized_delay_is_rejected_by_the_caps` (1); `parametric-eq response::asymmetric_cascade_sections_are_independent_and_bypass_is_total_identity` (1); `rack lib tests::a_fully_folded_full_bank_offers_its_resident_block_before_writing_staging` (1); `capi lib runtime::live_tests::a_live_fader_left_undrained_before_a_carrying_structural_commit_is_baked` (1); `graph lib program::tests::a_delayed_stage_boundary_is_not_elided` (1); `graph-compiler track_delay::the_pdc_counts_are_untouched` (1); `rack lib tests::a_partial_agreement_slot_declines_the_collapse` (1) +- `runtime::live_tests::set_control::automated_vca::a_second_vca_move_over_an_automated_member_is_heard`, `crates/capi/src/runtime/live_tests.rs:8638-8674`; 24 caught: `capi lib runtime::live_tests::a_rebuild_that_drops_a_following_route_to_six_words_reports_a_fallback` (4); `graph lib program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers` (4); `graph-compiler track_delay::a_ring_is_a_named_allocation` (2); timeout in engine lib (2); `builtins-compiler lib tests::cutoff_boundaries_match_compiler_diagnostics_at_every_launch_rate_and_section` (1); `graph lib runtime::tests::a_plan_that_reads_the_session_output_is_refused_at_bind` (1); `host-web control_parity::a_vca_move_over_an_automated_member_is_live_alike_on_both_hosts` (1); `engine lib realtime::spsc::tests::peek_returns_each_queued_item_in_order_across_wraps_and_changes_nothing` (1); `engine lib realtime::spsc::tests::available_at_entry_is_bounded_and_handles_wrapped_cursors` (1); `graph lib runtime::tests::a_banked_source_gathers_the_played_block_bit_for_bit_with_the_copy` (1); `graph-compiler track_delay::a_zero_delay_session_lowers_no_delay_node` (1); `graph-compiler track_delay::an_oversized_delay_is_rejected_by_the_caps` (1); `parametric-eq response::asymmetric_cascade_sections_are_independent_and_bypass_is_total_identity` (1); `graph lib program::tests::delayed_edge_gets_staging_buffer_and_blocks_in_place` (1); `graph lib program::tests::a_delayed_stage_boundary_is_not_elided` (1); `graph-compiler track_delay::the_pdc_counts_are_untouched` (1) +- `runtime::live_tests::set_control::automated_carry::an_offset_only_upsert_inside_a_rebuild_renders_as_it_does_alone`, `crates/capi/src/runtime/live_tests.rs:9621-9648`; 24 caught: `capi lib runtime::live_tests::a_rebuild_that_drops_a_following_route_to_six_words_reports_a_fallback` (4); `graph lib program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers` (4); `session json_grammar::insignificant_whitespace_and_shuffled_keys_canonicalize` (3); `math scalar_accuracy::extreme_scaling_paths` (2); timeout in engine lib (2); `graph lib runtime::tests::a_plan_that_reads_the_session_output_is_refused_at_bind` (1); `math scalar_accuracy::exact_anchors` (1); `engine lib realtime::spsc::tests::peek_returns_each_queued_item_in_order_across_wraps_and_changes_nothing` (1); `engine lib realtime::spsc::tests::available_at_entry_is_bounded_and_handles_wrapped_cursors` (1); `host-web lib tests::structural_apply::a_master_designated_after_an_empty_boot_reads_as_a_boot_designation` (1); `graph lib runtime::tests::a_banked_source_gathers_the_played_block_bit_for_bit_with_the_copy` (1); `protocol console_session_edits::a_slot_set_change_that_skips_a_track_refuses_whole` (1); `graph lib program::tests::delayed_edge_gets_staging_buffer_and_blocks_in_place` (1); `graph lib program::tests::a_delayed_stage_boundary_is_not_elided` (1) +- `runtime::live_tests::set_control::automated_carry::an_exact_unmute_that_frees_a_held_lane_discharges_the_owed_move`, `crates/capi/src/runtime/live_tests.rs:9705-9767`; 21 caught: `capi lib runtime::live_tests::a_live_edits_own_ramp_length_overrides_the_session_and_does_not_outlive_its_transaction` (4); `capi lib runtime::live_tests::a_rebuild_that_drops_a_following_route_to_six_words_reports_a_fallback` (4); `graph lib program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers` (4); timeout in engine lib (2); `graph lib runtime::tests::a_plan_that_reads_the_session_output_is_refused_at_bind` (1); `engine lib realtime::spsc::tests::peek_returns_each_queued_item_in_order_across_wraps_and_changes_nothing` (1); `engine lib realtime::spsc::tests::available_at_entry_is_bounded_and_handles_wrapped_cursors` (1); `graph lib runtime::tests::a_banked_source_gathers_the_played_block_bit_for_bit_with_the_copy` (1); `graph lib program::tests::delayed_edge_gets_staging_buffer_and_blocks_in_place` (1); `host-web control_parity::a_follows_mute_toggle_on_a_following_route_is_live_on_both_hosts` (1); `graph lib program::tests::a_delayed_stage_boundary_is_not_elided` (1) +- `runtime::live_tests::set_control::automated_hand_move::a_hand_move_on_an_automated_fader_is_live_and_renders_the_stored_offset`, `crates/capi/src/runtime/live_tests.rs:9933-10033`; 34 caught: `capi lib runtime::live_tests::a_rebuild_that_drops_a_following_route_to_six_words_reports_a_fallback` (4); `graph lib program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers` (4); `session json_grammar::insignificant_whitespace_and_shuffled_keys_canonicalize` (3); `graph-compiler track_delay::a_ring_is_a_named_allocation` (2); timeout in engine lib (2); `graph lib program::tests::delayed_edge_gets_staging_buffer_and_blocks_in_place` (2); `builtins-compiler lib tests::cutoff_boundaries_match_compiler_diagnostics_at_every_launch_rate_and_section` (1); `graph lib runtime::tests::a_plan_that_reads_the_session_output_is_refused_at_bind` (1); `host-web control_parity::a_vca_move_over_an_automated_member_is_live_alike_on_both_hosts` (1); `engine lib realtime::spsc::tests::peek_returns_each_queued_item_in_order_across_wraps_and_changes_nothing` (1); `engine lib realtime::spsc::tests::available_at_entry_is_bounded_and_handles_wrapped_cursors` (1); `host-web lib tests::structural_apply::a_master_designated_after_an_empty_boot_reads_as_a_boot_designation` (1); `graph lib runtime::tests::a_banked_source_gathers_the_played_block_bit_for_bit_with_the_copy` (1); `protocol console_session_edits::a_slot_set_change_that_skips_a_track_refuses_whole` (1); `graph-compiler track_delay::a_zero_delay_session_lowers_no_delay_node` (1); `graph-compiler track_delay::an_oversized_delay_is_rejected_by_the_caps` (1); `parametric-eq response::asymmetric_cascade_sections_are_independent_and_bypass_is_total_identity` (1); `rack lib tests::a_fully_folded_full_bank_offers_its_resident_block_before_writing_staging` (1); `capi lib runtime::live_tests::a_live_fader_left_undrained_before_a_carrying_structural_commit_is_baked` (1); `graph lib program::tests::a_delayed_stage_boundary_is_not_elided` (1); `graph-compiler track_delay::the_pdc_counts_are_untouched` (1); `capi lib runtime::live_tests::set_control::automated_carry::a_hand_move_pending_at_a_swap_keeps_its_length` (1); `rack lib tests::a_partial_agreement_slot_declines_the_collapse` (1) +- `runtime::live_tests::set_control::automated_hand_move::re_authoring_keeps_the_hand_offset_and_removal_ends_it`, `crates/capi/src/runtime/live_tests.rs:10093-10160`; 28 caught: `capi lib runtime::live_tests::a_rebuild_that_drops_a_following_route_to_six_words_reports_a_fallback` (4); `graph lib program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers` (4); `session json_grammar::insignificant_whitespace_and_shuffled_keys_canonicalize` (3); `graph-compiler track_delay::a_ring_is_a_named_allocation` (2); timeout in engine lib (2); `graph lib runtime::tests::a_plan_that_reads_the_session_output_is_refused_at_bind` (1); `host-web control_parity::a_vca_move_over_an_automated_member_is_live_alike_on_both_hosts` (1); `engine lib realtime::spsc::tests::peek_returns_each_queued_item_in_order_across_wraps_and_changes_nothing` (1); `engine lib realtime::spsc::tests::available_at_entry_is_bounded_and_handles_wrapped_cursors` (1); `host-web lib tests::structural_apply::a_master_designated_after_an_empty_boot_reads_as_a_boot_designation` (1); `graph lib runtime::tests::a_banked_source_gathers_the_played_block_bit_for_bit_with_the_copy` (1); `protocol console_session_edits::a_slot_set_change_that_skips_a_track_refuses_whole` (1); `graph-compiler track_delay::a_zero_delay_session_lowers_no_delay_node` (1); `graph-compiler track_delay::an_oversized_delay_is_rejected_by_the_caps` (1); `parametric-eq response::asymmetric_cascade_sections_are_independent_and_bypass_is_total_identity` (1); `graph lib program::tests::delayed_edge_gets_staging_buffer_and_blocks_in_place` (1); `graph lib program::tests::a_delayed_stage_boundary_is_not_elided` (1); `graph-compiler track_delay::the_pdc_counts_are_untouched` (1) +- `runtime::live_tests::a_following_send_leaks_nothing_of_a_stored_mute`, `crates/capi/src/runtime/live_tests.rs:11172-11222`; 25 caught: `capi lib runtime::live_tests::a_rebuild_that_drops_a_following_route_to_six_words_reports_a_fallback` (4); `graph lib program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers` (4); `session json_grammar::insignificant_whitespace_and_shuffled_keys_canonicalize` (3); `math scalar_accuracy::extreme_scaling_paths` (2); timeout in engine lib (2); `graph lib program::tests::delayed_edge_gets_staging_buffer_and_blocks_in_place` (2); `graph lib runtime::tests::a_plan_that_reads_the_session_output_is_refused_at_bind` (1); `math scalar_accuracy::exact_anchors` (1); `engine lib realtime::spsc::tests::peek_returns_each_queued_item_in_order_across_wraps_and_changes_nothing` (1); `engine lib realtime::spsc::tests::available_at_entry_is_bounded_and_handles_wrapped_cursors` (1); `graph lib runtime::tests::a_banked_source_gathers_the_played_block_bit_for_bit_with_the_copy` (1); `graph-compiler track_delay::a_zero_delay_session_lowers_no_delay_node` (1); `graph-compiler track_delay::an_oversized_delay_is_rejected_by_the_caps` (1); `graph lib program::tests::a_delayed_stage_boundary_is_not_elided` (1) +- `runtime::live_tests::a_follows_mute_toggle_on_a_following_route_is_live`, `crates/capi/src/runtime/live_tests.rs:11396-11455`; 27 caught: `capi lib runtime::live_tests::a_rebuild_that_drops_a_following_route_to_six_words_reports_a_fallback` (4); `graph lib program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers` (4); `session json_grammar::insignificant_whitespace_and_shuffled_keys_canonicalize` (3); `math scalar_accuracy::extreme_scaling_paths` (2); timeout in engine lib (2); `graph lib program::tests::delayed_edge_gets_staging_buffer_and_blocks_in_place` (2); `graph lib runtime::tests::a_plan_that_reads_the_session_output_is_refused_at_bind` (1); `math scalar_accuracy::exact_anchors` (1); `host-web control_parity::a_vca_move_over_an_automated_member_is_live_alike_on_both_hosts` (1); `engine lib realtime::spsc::tests::peek_returns_each_queued_item_in_order_across_wraps_and_changes_nothing` (1); `engine lib realtime::spsc::tests::available_at_entry_is_bounded_and_handles_wrapped_cursors` (1); `graph lib runtime::tests::a_banked_source_gathers_the_played_block_bit_for_bit_with_the_copy` (1); `graph-compiler track_delay::a_zero_delay_session_lowers_no_delay_node` (1); `graph-compiler track_delay::an_oversized_delay_is_rejected_by_the_caps` (1); `host-web control_parity::a_follows_mute_toggle_on_a_following_route_is_live_on_both_hosts` (1); `graph lib program::tests::a_delayed_stage_boundary_is_not_elided` (1) +- `runtime::live_tests::an_output_route_entry_is_refused_on_the_c_abi`, `crates/capi/src/runtime/live_tests.rs:11607-11632`; 14 caught: `graph lib program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers` (4); timeout in engine lib (2); `graph lib runtime::tests::a_plan_that_reads_the_session_output_is_refused_at_bind` (1); `engine lib realtime::spsc::tests::peek_returns_each_queued_item_in_order_across_wraps_and_changes_nothing` (1); `engine lib realtime::spsc::tests::available_at_entry_is_bounded_and_handles_wrapped_cursors` (1); `host-web lib tests::structural_apply::a_master_designated_after_an_empty_boot_reads_as_a_boot_designation` (1); `graph lib runtime::tests::a_banked_source_gathers_the_played_block_bit_for_bit_with_the_copy` (1); `protocol console_session_edits::a_slot_set_change_that_skips_a_track_refuses_whole` (1); `graph lib program::tests::delayed_edge_gets_staging_buffer_and_blocks_in_place` (1); `graph lib program::tests::a_delayed_stage_boundary_is_not_elided` (1) +- `runtime::supersede_tests::a_donated_source_keeps_its_pcm_and_its_held_seek`, `crates/capi/src/runtime/supersede_tests.rs:246-306`; 20 caught: `graph lib program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers` (4); `math scalar_accuracy::extreme_scaling_paths` (2); timeout in engine lib (2); `graph lib program::tests::delayed_edge_gets_staging_buffer_and_blocks_in_place` (2); `graph lib runtime::tests::a_plan_that_reads_the_session_output_is_refused_at_bind` (1); `math scalar_accuracy::exact_anchors` (1); `engine lib realtime::spsc::tests::peek_returns_each_queued_item_in_order_across_wraps_and_changes_nothing` (1); `engine lib realtime::spsc::tests::available_at_entry_is_bounded_and_handles_wrapped_cursors` (1); `host-web lib tests::structural_apply::a_master_designated_after_an_empty_boot_reads_as_a_boot_designation` (1); `graph lib runtime::tests::a_banked_source_gathers_the_played_block_bit_for_bit_with_the_copy` (1); `protocol console_session_edits::a_slot_set_change_that_skips_a_track_refuses_whole` (1); `graph-compiler track_delay::a_zero_delay_session_lowers_no_delay_node` (1); `graph-compiler track_delay::an_oversized_delay_is_rejected_by_the_caps` (1); `graph lib program::tests::a_delayed_stage_boundary_is_not_elided` (1) +- `runtime::supersede_tests::an_owner_the_candidate_restarts_and_the_replacement_reverts_carries_from_p0`, `crates/capi/src/runtime/supersede_tests.rs:844-851`; 20 caught: `graph lib program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers` (4); `math scalar_accuracy::extreme_scaling_paths` (2); timeout in engine lib (2); `graph lib program::tests::delayed_edge_gets_staging_buffer_and_blocks_in_place` (2); `graph lib runtime::tests::a_plan_that_reads_the_session_output_is_refused_at_bind` (1); `math scalar_accuracy::exact_anchors` (1); `engine lib realtime::spsc::tests::peek_returns_each_queued_item_in_order_across_wraps_and_changes_nothing` (1); `engine lib realtime::spsc::tests::available_at_entry_is_bounded_and_handles_wrapped_cursors` (1); `host-web lib tests::structural_apply::a_master_designated_after_an_empty_boot_reads_as_a_boot_designation` (1); `graph lib runtime::tests::a_banked_source_gathers_the_played_block_bit_for_bit_with_the_copy` (1); `protocol console_session_edits::a_slot_set_change_that_skips_a_track_refuses_whole` (1); `graph-compiler track_delay::a_zero_delay_session_lowers_no_delay_node` (1); `graph-compiler track_delay::an_oversized_delay_is_rejected_by_the_caps` (1); `graph lib program::tests::a_delayed_stage_boundary_is_not_elided` (1) +- `runtime::supersede_tests::an_owner_the_candidate_removes_and_the_replacement_restores_carries_from_p0`, `crates/capi/src/runtime/supersede_tests.rs:853-859`; 20 caught: `graph lib program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers` (4); `math scalar_accuracy::extreme_scaling_paths` (2); timeout in engine lib (2); `graph lib program::tests::delayed_edge_gets_staging_buffer_and_blocks_in_place` (2); `graph lib runtime::tests::a_plan_that_reads_the_session_output_is_refused_at_bind` (1); `math scalar_accuracy::exact_anchors` (1); `engine lib realtime::spsc::tests::peek_returns_each_queued_item_in_order_across_wraps_and_changes_nothing` (1); `engine lib realtime::spsc::tests::available_at_entry_is_bounded_and_handles_wrapped_cursors` (1); `host-web lib tests::structural_apply::a_master_designated_after_an_empty_boot_reads_as_a_boot_designation` (1); `graph lib runtime::tests::a_banked_source_gathers_the_played_block_bit_for_bit_with_the_copy` (1); `protocol console_session_edits::a_slot_set_change_that_skips_a_track_refuses_whole` (1); `graph-compiler track_delay::a_zero_delay_session_lowers_no_delay_node` (1); `graph-compiler track_delay::an_oversized_delay_is_rejected_by_the_caps` (1); `graph lib program::tests::a_delayed_stage_boundary_is_not_elided` (1) +- `runtime::supersede_tests::a_supersession_that_would_drop_acked_pcm_on_a_fresh_source_is_backpressure`, `crates/capi/src/runtime/supersede_tests.rs:1356-1456`; 17 caught: `graph lib program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers` (4); timeout in engine lib (2); `graph lib program::tests::delayed_edge_gets_staging_buffer_and_blocks_in_place` (2); `graph lib runtime::tests::a_plan_that_reads_the_session_output_is_refused_at_bind` (1); `engine lib realtime::spsc::tests::peek_returns_each_queued_item_in_order_across_wraps_and_changes_nothing` (1); `engine lib realtime::spsc::tests::available_at_entry_is_bounded_and_handles_wrapped_cursors` (1); `host-web lib tests::structural_apply::a_master_designated_after_an_empty_boot_reads_as_a_boot_designation` (1); `graph lib runtime::tests::a_banked_source_gathers_the_played_block_bit_for_bit_with_the_copy` (1); `protocol console_session_edits::a_slot_set_change_that_skips_a_track_refuses_whole` (1); `graph-compiler track_delay::a_zero_delay_session_lowers_no_delay_node` (1); `graph-compiler track_delay::an_oversized_delay_is_rejected_by_the_caps` (1); `graph lib program::tests::a_delayed_stage_boundary_is_not_elided` (1) +- `runtime::tests::a_plain_seek_is_reported_at_the_block_that_applied_it`, `crates/capi/src/runtime/tests.rs:1467-1501`; 12 caught: `graph lib program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers` (4); timeout in engine lib (2); `graph lib runtime::tests::a_plan_that_reads_the_session_output_is_refused_at_bind` (1); `engine lib realtime::spsc::tests::peek_returns_each_queued_item_in_order_across_wraps_and_changes_nothing` (1); `engine lib realtime::spsc::tests::available_at_entry_is_bounded_and_handles_wrapped_cursors` (1); `graph lib runtime::tests::a_banked_source_gathers_the_played_block_bit_for_bit_with_the_copy` (1); `graph lib program::tests::delayed_edge_gets_staging_buffer_and_blocks_in_place` (1); `graph lib program::tests::a_delayed_stage_boundary_is_not_elided` (1) +- `runtime::tests::a_late_anchored_seek_reports_its_frame_plus_the_lateness`, `crates/capi/src/runtime/tests.rs:1503-1531`; 18 caught: `graph lib program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers` (4); `math scalar_accuracy::extreme_scaling_paths` (2); timeout in engine lib (2); `graph lib program::tests::delayed_edge_gets_staging_buffer_and_blocks_in_place` (2); `graph lib runtime::tests::a_plan_that_reads_the_session_output_is_refused_at_bind` (1); `math scalar_accuracy::exact_anchors` (1); `engine lib realtime::spsc::tests::peek_returns_each_queued_item_in_order_across_wraps_and_changes_nothing` (1); `engine lib realtime::spsc::tests::available_at_entry_is_bounded_and_handles_wrapped_cursors` (1); `graph lib runtime::tests::a_banked_source_gathers_the_played_block_bit_for_bit_with_the_copy` (1); `graph-compiler track_delay::a_zero_delay_session_lowers_no_delay_node` (1); `graph-compiler track_delay::an_oversized_delay_is_rejected_by_the_caps` (1); `graph lib program::tests::a_delayed_stage_boundary_is_not_elided` (1) + +#### compressor + +- `bypass_preserves_exact_dry_bits_at_sample_zero`, `crates/compressor/tests/identity.rs:24-37`; 6 caught: `lane sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` (3); `lane fader_matrix::select_free_fused_fader_matrix_matches_both_oracles_when_no_lane_is_identity` (2); `lane g4_flush::g4_pair_law_holds_at_every_width` (1) +- `bank_matches_scalar_per_lane_bits`, `crates/compressor/tests/lane_identity.rs:42-152`; 10 caught: `lane sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` (4); `lane fader_matrix::select_free_fused_fader_matrix_matches_both_oracles_when_no_lane_is_identity` (2); `builtins randomized::the_banks_render_their_scalar_sections_under_random_retargets` (1); `lane g4_flush::g4_pair_law_holds_at_every_width` (1); `lane g1_op_identity::g1_exp2_int_is_exact_on_the_integer_range` (1); `lane g4_flush::g4_flush_law_holds_at_every_width` (1) +- `the_collapsed_body_renders_the_dual_bodys_left_plane`, `crates/compressor/tests/mono_collapse.rs:150-233`; 4 caught: `compressor mono_collapse::mono_reopen_drives_the_next_render_from_the_copied_state` (3); `compressor mono_collapse::a_desymmetrized_bank_is_a_never_collapsed_bank` (1) +- `the_boundary_limit_rejects_a_finite_but_absurd_value`, `crates/compressor/tests/nonfinite.rs:228-280`; 11 caught: `lane sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` (4); `effect-runtime lane_identity::the_lane_mask_agrees_across_widths` (2); `lane fader_matrix::select_free_fused_fader_matrix_matches_both_oracles_when_no_lane_is_identity` (2); `effect-runtime lane_identity::the_boundary_check_is_width_independent` (1); `lane g4_flush::g4_flush_law_holds_at_every_width` (1); `effect-runtime bank::a_rejected_block_is_zeroed_reset_and_counted` (1) +- `block_partitions_are_invariant`, `crates/compressor/tests/partition.rs:47-103`; 4 caught: `lane fader_matrix::select_free_fused_fader_matrix_matches_both_oracles_when_no_lane_is_identity` (2); `lane sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` (2) +- `an_idle_restore_is_bit_exact`, `crates/compressor/tests/payload.rs:29-91`; 3 caught: `lane sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` (2); `host-web lib tests::selected_observation_reads_keep_same_track_owner_windows_and_sequences` (1) +- `a_mid_ramp_restore_continues_the_ramp_exactly`, `crates/compressor/tests/payload.rs:261-308`; 9 caught: `lane sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` (3); `lane fader_matrix::select_free_fused_fader_matrix_matches_both_oracles_when_no_lane_is_identity` (2); `effect-runtime contract_ramp_identity::linear_smoother_is_bit_identical_to_the_linear_ramp` (2); `lane g1_op_identity::g1_exp2_int_is_exact_on_the_integer_range` (1); `host-web lib tests::selected_observation_reads_keep_same_track_owner_windows_and_sequences` (1) + +#### conformance + +- `compare::tests::scaled_sum_squares_handles_extreme_finite_values` [REDUNDANT-IF-PEER-KEPT], `crates/conformance/src/compare.rs:228-234`; 4 caught: other candidates only (4) +- `tests::block_metrics_and_repeat_bits_cover_boundaries` [REDUNDANT-IF-PEER-KEPT], `crates/conformance/src/lib.rs:94-121`; 3 caught: other candidates only (3) +- `tolerance_boundary_tie_and_snr_cases_are_explicit` [UNIQUE (test-only code)], `crates/conformance/tests/api_metrics.rs:14-62`; 8 caught: other candidates only (8) +- `invalid_rates_shapes_tolerances_and_nonfinite_values_are_typed` [UNIQUE (test-only code)], `crates/conformance/tests/api_metrics.rs:64-100`; 4 caught: other candidates only (4) +- `normalized_mapping_endpoints_ties_and_round_trips_are_stable` [UNIQUE (test-only code)], `crates/conformance/tests/effect_contract.rs:123-142`; 4 caught: other candidates only (4) +- `smoothers_finish_on_the_exact_update`, `crates/conformance/tests/effect_contract.rs:144-163`; 5 caught: `lane fader_matrix::select_free_fused_fader_matrix_matches_both_oracles_when_no_lane_is_identity` (2); `lane sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` (2); `effect-runtime contract_ramp_identity::no_smoothing_snaps_and_one_pole_uses_a_precomputed_coefficient` (1) + +#### console-workload + +- `tests::the_driver_fed_gain_pan_row_dispatches_every_unit_but_its_inputs`, `tools/console-workload/src/lib.rs:2533-2577`; 13 caught: `graph lib program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers` (4); `builtins-compiler lib tests::cutoff_boundaries_match_compiler_diagnostics_at_every_launch_rate_and_section` (1); `graph lib runtime::tests::a_plan_that_reads_the_session_output_is_refused_at_bind` (1); `graph lib runtime::tests::a_banked_source_gathers_the_played_block_bit_for_bit_with_the_copy` (1); `graph-compiler track_delay::a_zero_delay_session_lowers_no_delay_node` (1); `graph-compiler track_delay::an_oversized_delay_is_rejected_by_the_caps` (1); `graph lib program::tests::delayed_edge_gets_staging_buffer_and_blocks_in_place` (1); `graph-compiler track_delay::a_ring_is_a_named_allocation` (1); `graph lib program::tests::a_delayed_stage_boundary_is_not_elided` (1); `graph-compiler track_delay::the_pdc_counts_are_untouched` (1) +- `mixing::restating_the_held_values_moves_no_rendered_bit`, `tools/console-workload/tests/automation.rs:295-322`; 18 caught: `graph lib program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers` (4); `graph-compiler track_delay::a_ring_is_a_named_allocation` (2); `console-workload automation::mixing::the_eq_lowering_keeps_the_collapse_when_a_pair_lands_in_one_block` (2); `builtins-compiler lib tests::cutoff_boundaries_match_compiler_diagnostics_at_every_launch_rate_and_section` (1); `graph lib runtime::tests::a_plan_that_reads_the_session_output_is_refused_at_bind` (1); `console-workload automation::mixing::a_plan_without_a_control_channel_refuses_the_row` (1); `graph lib runtime::tests::a_banked_source_gathers_the_played_block_bit_for_bit_with_the_copy` (1); `graph-compiler track_delay::a_zero_delay_session_lowers_no_delay_node` (1); `graph-compiler track_delay::an_oversized_delay_is_rejected_by_the_caps` (1); `parametric-eq response::asymmetric_cascade_sections_are_independent_and_bypass_is_total_identity` (1); `graph lib program::tests::delayed_edge_gets_staging_buffer_and_blocks_in_place` (1); `graph lib program::tests::a_delayed_stage_boundary_is_not_elided` (1); `graph-compiler track_delay::the_pdc_counts_are_untouched` (1) +- `mono_console_both_rides_move_bits_and_agree_between_supported_widths`, `tools/console-workload/tests/eq_ramping_scenario.rs:159-162`; 44 caught: `console-workload paired_spans::the_limiter_bank_renders_the_dual_bits_in_every_scenario` (5); `graph lib program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers` (4); `effect-contract live_window::one_block_applies_every_live_cell_of_one_transaction` (3); `lane fader_matrix::select_free_fused_fader_matrix_matches_both_oracles_when_no_lane_is_identity` (2); `math scalar_accuracy::extreme_scaling_paths` (2); `graph-compiler track_delay::a_ring_is_a_named_allocation` (2); `lane sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` (2); `graph lib program::tests::delayed_edge_gets_staging_buffer_and_blocks_in_place` (2); `parametric-eq lib randomized_restores::the_stationary_cascade_renders_the_full_cascade_after_random_restores` (2); `console-workload automation::mixing::the_eq_lowering_keeps_the_collapse_when_a_pair_lands_in_one_block` (2); `builtins-compiler lib tests::cutoff_boundaries_match_compiler_diagnostics_at_every_launch_rate_and_section` (1); `graph lib runtime::tests::a_plan_that_reads_the_session_output_is_refused_at_bind` (1); `math scalar_accuracy::exact_anchors` (1); `builtins randomized::the_banks_render_their_scalar_sections_under_random_retargets` (1); `console-workload automation::mixing::a_plan_without_a_control_channel_refuses_the_row` (1); `lane g4_flush::g4_pair_law_holds_at_every_width` (1); `lane g1_op_identity::g1_exp2_int_is_exact_on_the_integer_range` (1); `effect-contract paired_spans::bypass_and_observe_records_fold_in_place_around_a_pair` (1); `lane g4_flush::g4_flush_law_holds_at_every_width` (1); `graph lib runtime::tests::a_banked_source_gathers_the_played_block_bit_for_bit_with_the_copy` (1); `graph-compiler track_delay::a_zero_delay_session_lowers_no_delay_node` (1); `graph-compiler track_delay::an_oversized_delay_is_rejected_by_the_caps` (1); `parametric-eq response::asymmetric_cascade_sections_are_independent_and_bypass_is_total_identity` (1); `rack lib tests::a_fully_folded_full_bank_offers_its_resident_block_before_writing_staging` (1); `capi lib runtime::live_tests::a_live_fader_left_undrained_before_a_carrying_structural_commit_is_baked` (1); `graph lib program::tests::a_delayed_stage_boundary_is_not_elided` (1); `graph-compiler track_delay::the_pdc_counts_are_untouched` (1); `rack lib tests::a_partial_agreement_slot_declines_the_collapse` (1) +- `the_eq_bank_renders_the_dual_bits_in_every_scenario`, `tools/console-workload/tests/paired_spans.rs:1408-1411`; 24 caught: `effect-contract live_window::one_block_applies_every_live_cell_of_one_transaction` (4); `effect-runtime lane_identity::the_lane_mask_agrees_across_widths` (3); `console-workload paired_spans::the_limiter_bank_renders_the_dual_bits_in_every_scenario` (3); `effect-contract paired_spans::a_pair_whose_second_half_never_arrives_clears_live` (2); `graph-compiler track_delay::a_ring_is_a_named_allocation` (2); `effect-contract paired_spans::bypass_and_observe_records_fold_in_place_around_a_pair` (1); `host-web lib tests::selected_observation_reads_keep_same_track_owner_windows_and_sequences` (1); `graph-compiler track_delay::a_zero_delay_session_lowers_no_delay_node` (1); `rack mono_reengage::a_bypass_episode_re_engages_because_it_never_moved_the_channels_apart` (1); `graph-compiler track_delay::an_oversized_delay_is_rejected_by_the_caps` (1); `effect-runtime bank::a_rejected_block_is_zeroed_reset_and_counted` (1); `parametric-eq response::asymmetric_cascade_sections_are_independent_and_bypass_is_total_identity` (1); `effect-runtime lane_identity::the_boundary_check_is_width_independent` (1); `graph-compiler track_delay::the_pdc_counts_are_untouched` (1); `rack lib tests::a_partial_agreement_slot_declines_the_collapse` (1) +- `the_compressor_bank_renders_the_dual_bits_in_every_scenario`, `tools/console-workload/tests/paired_spans.rs:1413-1416`; 19 caught: `effect-contract live_window::one_block_applies_every_live_cell_of_one_transaction` (4); `console-workload paired_spans::the_limiter_bank_renders_the_dual_bits_in_every_scenario` (3); `compressor mono_collapse::mono_reopen_drives_the_next_render_from_the_copied_state` (3); `effect-contract paired_spans::bypass_and_observe_records_fold_in_place_around_a_pair` (2); `effect-contract paired_spans::a_pair_whose_second_half_never_arrives_clears_live` (2); `host-web lib tests::selected_observation_reads_keep_same_track_owner_windows_and_sequences` (1); `rack mono_reengage::a_bypass_episode_re_engages_because_it_never_moved_the_channels_apart` (1); `compressor mono_collapse::a_desymmetrized_bank_is_a_never_collapsed_bank` (1); `effect-runtime contract_ramp_identity::linear_smoother_is_bit_identical_to_the_linear_ramp` (1); `rack lib tests::a_partial_agreement_slot_declines_the_collapse` (1) +- `an_eq_only_both_channel_ride_keeps_every_cohort_collapsed`, `tools/console-workload/tests/paired_spans.rs:2233-2249`; 25 caught: `console-workload paired_spans::the_limiter_bank_renders_the_dual_bits_in_every_scenario` (5); `graph lib program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers` (4); `graph-compiler track_delay::a_ring_is_a_named_allocation` (2); `console-workload automation::mixing::the_eq_lowering_keeps_the_collapse_when_a_pair_lands_in_one_block` (2); `builtins-compiler lib tests::cutoff_boundaries_match_compiler_diagnostics_at_every_launch_rate_and_section` (1); `graph lib runtime::tests::a_plan_that_reads_the_session_output_is_refused_at_bind` (1); `console-workload automation::mixing::a_plan_without_a_control_channel_refuses_the_row` (1); `effect-contract paired_spans::bypass_and_observe_records_fold_in_place_around_a_pair` (1); `graph lib runtime::tests::a_banked_source_gathers_the_played_block_bit_for_bit_with_the_copy` (1); `graph-compiler track_delay::a_zero_delay_session_lowers_no_delay_node` (1); `graph-compiler track_delay::an_oversized_delay_is_rejected_by_the_caps` (1); `parametric-eq response::asymmetric_cascade_sections_are_independent_and_bypass_is_total_identity` (1); `graph lib program::tests::delayed_edge_gets_staging_buffer_and_blocks_in_place` (1); `graph lib program::tests::a_delayed_stage_boundary_is_not_elided` (1); `graph-compiler track_delay::the_pdc_counts_are_untouched` (1); `rack lib tests::a_partial_agreement_slot_declines_the_collapse` (1) +- `the_two_placements_agree_block_by_block`, `tools/console-workload/tests/placement.rs:50-70`; 18 caught: `graph lib program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers` (4); `graph-compiler track_delay::a_ring_is_a_named_allocation` (2); `console-workload automation::mixing::the_eq_lowering_keeps_the_collapse_when_a_pair_lands_in_one_block` (2); `builtins-compiler lib tests::cutoff_boundaries_match_compiler_diagnostics_at_every_launch_rate_and_section` (1); `graph lib runtime::tests::a_plan_that_reads_the_session_output_is_refused_at_bind` (1); `console-workload automation::mixing::a_plan_without_a_control_channel_refuses_the_row` (1); `graph lib runtime::tests::a_banked_source_gathers_the_played_block_bit_for_bit_with_the_copy` (1); `graph-compiler track_delay::a_zero_delay_session_lowers_no_delay_node` (1); `graph-compiler track_delay::an_oversized_delay_is_rejected_by_the_caps` (1); `parametric-eq response::asymmetric_cascade_sections_are_independent_and_bypass_is_total_identity` (1); `graph lib program::tests::delayed_edge_gets_staging_buffer_and_blocks_in_place` (1); `graph lib program::tests::a_delayed_stage_boundary_is_not_elided` (1); `graph-compiler track_delay::the_pdc_counts_are_untouched` (1) + +#### delay + +- `tests::a_mid_ramp_restore_continues_bit_identically`, `crates/delay/src/lib.rs:2699-2792`; 9 caught: `effect-runtime contract_ramp_identity::linear_smoother_is_bit_identical_to_the_linear_ramp` (5); `lane sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` (2); `lane g1_op_identity::g1_exp2_int_is_exact_on_the_integer_range` (1); `host-web lib tests::selected_observation_reads_keep_same_track_owner_windows_and_sequences` (1) + +#### effect-contract + +- `an_enumeration_lattice_is_spelled_in_choice_values_and_indexed_by_ordinal`, `crates/effect-contract/tests/lattice.rs:311-363`; 4 caught: `effect-contract lib step::tests::an_index_lattice_is_ordinal_indexed_and_choice_value_spelled` (4) +- `a_drained_cell_stages_nothing_on_the_next_block`, `crates/effect-contract/tests/live_control.rs:218-225`; 4 caught: `effect-contract live_window::one_block_applies_every_live_cell_of_one_transaction` (4) +- `a_lone_one_channel_write_clears_live`, `crates/effect-contract/tests/paired_spans.rs:109-115`; 6 caught: `effect-contract live_window::one_block_applies_every_live_cell_of_one_transaction` (4); `effect-contract paired_spans::a_pair_whose_second_half_never_arrives_clears_live` (2) +- `last_wins_decides_the_pair`, `crates/effect-contract/tests/paired_spans.rs:145-162`; 8 caught: `effect-contract live_window::one_block_applies_every_live_cell_of_one_transaction` (4); `effect-contract paired_spans::bypass_and_observe_records_fold_in_place_around_a_pair` (2); `effect-contract paired_spans::a_pair_whose_second_half_never_arrives_clears_live` (2) +- `a_shared_parameters_both_cell_needs_no_twin_and_does_not_break_a_pair`, `crates/effect-contract/tests/paired_spans.rs:164-169`; 8 caught: `effect-contract live_window::one_block_applies_every_live_cell_of_one_transaction` (4); `effect-contract paired_spans::bypass_and_observe_records_fold_in_place_around_a_pair` (2); `effect-contract paired_spans::a_pair_whose_second_half_never_arrives_clears_live` (2) +- `a_pair_split_across_two_blocks_clears_live`, `crates/effect-contract/tests/paired_spans.rs:171-193`; 8 caught: `effect-contract live_window::one_block_applies_every_live_cell_of_one_transaction` (4); `effect-contract paired_spans::bypass_and_observe_records_fold_in_place_around_a_pair` (2); `effect-contract paired_spans::a_pair_whose_second_half_never_arrives_clears_live` (2) + +#### effect-runtime + +- `a_finite_block_is_accepted`, `crates/effect-runtime/tests/bank.rs:9-15`; 4 caught: `effect-runtime bank::a_rejected_block_is_zeroed_reset_and_counted` (2); `lane sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` (1); `effect-runtime lane_identity::the_boundary_check_is_width_independent` (1) +- `the_precomputed_increment_is_the_declared_one_and_the_last_update_assigns`, `crates/effect-runtime/tests/contract_ramp_identity.rs:67-94`; 5 caught: `lane fader_matrix::select_free_fused_fader_matrix_matches_both_oracles_when_no_lane_is_identity` (2); `lane sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` (2); `effect-runtime contract_ramp_identity::no_smoothing_snaps_and_one_pole_uses_a_precomputed_coefficient` (1) +- `the_curve_matches_the_paper`, `crates/effect-runtime/tests/dynamics.rs:39-76`; 10 caught: `effect-runtime dynamics::knee_words_follow_the_finite_reciprocal_rule` (3); `lane sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` (3); `lane fader_matrix::select_free_fused_fader_matrix_matches_both_oracles_when_no_lane_is_identity` (2); `builtins randomized::the_banks_render_their_scalar_sections_under_random_retargets` (1); `lane g1_op_identity::g1_exp2_int_is_exact_on_the_integer_range` (1) +- `a_knee_whose_reciprocal_overflows_is_a_hard_knee`, `crates/effect-runtime/tests/dynamics.rs:321-364`; 6 caught: `lane sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` (3); `effect-runtime dynamics::knee_words_follow_the_finite_reciprocal_rule` (2); `builtins randomized::the_banks_render_their_scalar_sections_under_random_retargets` (1) +- `the_narrowest_soft_knees_are_finite_at_the_threshold`, `crates/effect-runtime/tests/dynamics.rs:366-396`; 4 caught: `effect-runtime dynamics::knee_words_follow_the_finite_reciprocal_rule` (2); `lane sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` (2) +- `the_corpus_is_width_independent`, `crates/effect-runtime/tests/lane_identity.rs:26-45`; 8 caught: `lane sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` (3); `lane fader_matrix::select_free_fused_fader_matrix_matches_both_oracles_when_no_lane_is_identity` (2); `builtins randomized::the_banks_render_their_scalar_sections_under_random_retargets` (1); `lane g1_op_identity::g1_exp2_int_is_exact_on_the_integer_range` (1); `lane g4_flush::g4_flush_law_holds_at_every_width` (1) +- `mapping_is_exact_at_the_ends_and_monotone` [REDUNDANT-IF-PEER-KEPT], `crates/effect-runtime/tests/params.rs:100-123`; 4 caught: other candidates only (2); `effect-runtime params::clamping_always_lands_in_the_domain` (1); `host-web lib tests::selected_observation_reads_keep_same_track_owner_windows_and_sequences` (1) +- `a_logarithmic_mapping_is_constant_ratio` [REDUNDANT-IF-PEER-KEPT], `crates/effect-runtime/tests/params.rs:125-136`; 6 caught: other candidates only (2); `math scalar_accuracy::extreme_scaling_paths` (2); `effect-runtime params::clamping_always_lands_in_the_domain` (1); `host-web lib tests::selected_observation_reads_keep_same_track_owner_windows_and_sequences` (1) +- `the_mapping_inverse_round_trips` [UNIQUE (test-only code)], `crates/effect-runtime/tests/params.rs:138-151`; 8 caught: other candidates only (4); `math scalar_accuracy::extreme_scaling_paths` (2); `effect-runtime params::clamping_always_lands_in_the_domain` (1); `host-web lib tests::selected_observation_reads_keep_same_track_owner_windows_and_sequences` (1) +- `a_degenerate_range_has_no_position` [REDUNDANT-IF-PEER-KEPT], `crates/effect-runtime/tests/params.rs:153-159`; 5 caught: other candidates only (3); `effect-runtime params::clamping_always_lands_in_the_domain` (1); `host-web lib tests::selected_observation_reads_keep_same_track_owner_windows_and_sequences` (1) +- `the_step_is_computed_once`, `crates/effect-runtime/tests/ramp.rs:47-72`; 9 caught: `effect-runtime contract_ramp_identity::linear_smoother_is_bit_identical_to_the_linear_ramp` (5); `lane fader_matrix::select_free_fused_fader_matrix_matches_both_oracles_when_no_lane_is_identity` (2); `lane sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` (2) +- `the_last_sample_is_exactly_the_target`, `crates/effect-runtime/tests/ramp.rs:74-90`; 4 caught: `effect-runtime contract_ramp_identity::linear_smoother_is_bit_identical_to_the_linear_ramp` (4) + +#### engine + +- `realtime::tests::native_spsc_preserves_value_on_full_and_fifo_wrap`, `crates/engine/src/realtime/mod.rs:361-391`; 5 caught: timeout in engine lib (2); `engine lib realtime::spsc::tests::producer_available_capacity_is_acquired_once_and_wrap_safe` (1); `engine lib realtime::spsc::tests::peek_returns_each_queued_item_in_order_across_wraps_and_changes_nothing` (1); `engine lib realtime::spsc::tests::available_at_entry_is_bounded_and_handles_wrapped_cursors` (1) +- `realtime::tests::move_only_spsc_preserves_full_value_and_transfers_to_consumer`, `crates/engine/src/realtime/mod.rs:393-406`; 4 caught: timeout in engine lib (2); `engine lib realtime::spsc::tests::peek_returns_each_queued_item_in_order_across_wraps_and_changes_nothing` (1); `engine lib realtime::spsc::tests::available_at_entry_is_bounded_and_handles_wrapped_cursors` (1) + +#### gate-expander + +- `scalar_and_native_bank_are_bit_exact_for_all_link_modes_and_ramps`, `crates/gate-expander/tests/identity.rs:72-127`; 11 caught: `lane sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` (4); `lane fader_matrix::select_free_fused_fader_matrix_matches_both_oracles_when_no_lane_is_identity` (2); `lane input_chain_arming::any_state_word_in_the_band_arms_the_block` (1); `lane g4_flush::g4_pair_law_holds_at_every_width` (1); `lane g1_op_identity::g1_exp2_int_is_exact_on_the_integer_range` (1); `lane g4_flush::g4_flush_law_holds_at_every_width` (1); `gate-expander ramp_endpoint::every_ramped_word_of_a_bank_lane_follows_its_own_target` (1) +- `active_state_restore_continues_an_uninterrupted_donor`, `crates/gate-expander/tests/state.rs:151-208`; 12 caught: `lane sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` (3); `lane fader_matrix::select_free_fused_fader_matrix_matches_both_oracles_when_no_lane_is_identity` (2); `effect-runtime contract_ramp_identity::linear_smoother_is_bit_identical_to_the_linear_ramp` (2); `gate-expander lib tests::internal_w4_pcm_and_serialized_continuation_are_bit_exact` (1); `lane g1_op_identity::g1_exp2_int_is_exact_on_the_integer_range` (1); `host-web lib tests::selected_observation_reads_keep_same_track_owner_windows_and_sequences` (1); `gate-expander contract::payload_header_is_version_one_and_forty_four_words_and_restore_is_transactional` (1); `gate-expander identity::bypass_preserves_current_signed_zero_and_advances_state` (1) +- `scalar_and_bank_state_payloads_interchange_without_changing_audio`, `crates/gate-expander/tests/state.rs:605-726`; 15 caught: `lane sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` (4); `lane fader_matrix::select_free_fused_fader_matrix_matches_both_oracles_when_no_lane_is_identity` (2); `lane input_chain_arming::any_state_word_in_the_band_arms_the_block` (1); `gate-expander lib tests::internal_w4_pcm_and_serialized_continuation_are_bit_exact` (1); `lane g4_flush::g4_pair_law_holds_at_every_width` (1); `lane g1_op_identity::g1_exp2_int_is_exact_on_the_integer_range` (1); `lane g4_flush::g4_flush_law_holds_at_every_width` (1); `host-web lib tests::selected_observation_reads_keep_same_track_owner_windows_and_sequences` (1); `gate-expander contract::payload_header_is_version_one_and_forty_four_words_and_restore_is_transactional` (1); `gate-expander ramp_endpoint::every_ramped_word_of_a_bank_lane_follows_its_own_target` (1); `gate-expander identity::bypass_preserves_current_signed_zero_and_advances_state` (1) +- `bank_restore_of_one_track_does_not_mutate_peers`, `crates/gate-expander/tests/state.rs:728-752`; 3 caught: `host-web lib tests::selected_observation_reads_keep_same_track_owner_windows_and_sequences` (1); `gate-expander ramp_endpoint::every_ramped_word_of_a_bank_lane_follows_its_own_target` (1); `gate-expander identity::bypass_preserves_current_signed_zero_and_advances_state` (1) + +#### graph + +- `tests::delay_is_exact_and_lane_independent`, `crates/graph/src/lib.rs:7412-7420`; 4 caught: `graph lib runtime::tests::a_successor_line_continues_the_predecessors_pending_samples_head_aligned` (4) +- `tests::binding_rejects_duplicates_and_returns_all_ownership`, `crates/graph/src/lib.rs:7421-7434`; 3 caught: `graph lib program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers` (2); `graph lib program::tests::delayed_edge_gets_staging_buffer_and_blocks_in_place` (1) +- `program::tests::a_bank_window_never_recycles_a_physical_slot`, `crates/graph/src/program/tests.rs:1319-1393`; 10 caught: `graph lib program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers` (5); `graph lib program::tests::delayed_edge_gets_staging_buffer_and_blocks_in_place` (3); `graph lib program::tests::bank_window_hoisting_preserves_dataflow_on_random_graphs` (1); `graph lib program::tests::a_delayed_stage_boundary_is_not_elided` (1) +- `program::tests::no_slot_is_recycled_inside_a_merged_bank_window`, `crates/graph/src/program/tests.rs:1395-1455`; 7 caught: `graph lib program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers` (4); `graph lib program::tests::delayed_edge_gets_staging_buffer_and_blocks_in_place` (2); `graph lib program::tests::a_delayed_stage_boundary_is_not_elided` (1) +- `runtime::tests::every_lane_width_matches_the_scalar_reference_on_hostile_values`, `crates/graph/src/runtime.rs:12429-12432`; 4 caught: `graph lib runtime::tests::a_host_plane_reduction_is_the_arena_reduction_bit_for_bit` (3); `graph lib runtime::tests::negative_zero_survives_every_reduction_group_edge` (1) + +#### graph-compiler + +- `tests::direct_graph_report_exposes_zero_output_latency_and_tail_without_identity_change`, `crates/graph-compiler/src/lib.rs:2785-2803`; 7 caught: `graph lib program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers` (2); `builtins-compiler lib tests::cutoff_boundaries_match_compiler_diagnostics_at_every_launch_rate_and_section` (1); `session json_grammar::u64_decimal_strings_cover_full_domain_and_reject_noncanonical_forms` (1); `graph-compiler track_delay::a_zero_delay_session_lowers_no_delay_node` (1); `graph-compiler track_delay::an_oversized_delay_is_rejected_by_the_caps` (1); `graph lib program::tests::delayed_edge_gets_staging_buffer_and_blocks_in_place` (1) +- `tests::dynamic_rack_compressors_bank_and_render_bit_identically_to_the_per_node_path`, `crates/graph-compiler/src/lib.rs:6921-7007`; 29 caught: `graph lib program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers` (4); `lane sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` (3); `graph-compiler lib tests::launch_compressor_fixture_retains_bank_tail_and_connected_scalar_with_zero_pdc` (2); `lane fader_matrix::select_free_fused_fader_matrix_matches_both_oracles_when_no_lane_is_identity` (2); `math scalar_accuracy::extreme_scaling_paths` (2); `graph lib program::tests::delayed_edge_gets_staging_buffer_and_blocks_in_place` (2); `builtins-compiler lib tests::cutoff_boundaries_match_compiler_diagnostics_at_every_launch_rate_and_section` (1); `graph lib runtime::tests::a_plan_that_reads_the_session_output_is_refused_at_bind` (1); `math scalar_accuracy::exact_anchors` (1); `builtins randomized::the_banks_render_their_scalar_sections_under_random_retargets` (1); `lane g1_op_identity::g1_exp2_int_is_exact_on_the_integer_range` (1); `lane g4_flush::g4_flush_law_holds_at_every_width` (1); `host-web lib tests::selected_observation_reads_keep_same_track_owner_windows_and_sequences` (1); `graph lib runtime::tests::a_banked_source_gathers_the_played_block_bit_for_bit_with_the_copy` (1); `graph-compiler track_delay::a_zero_delay_session_lowers_no_delay_node` (1); `graph-compiler track_delay::an_oversized_delay_is_rejected_by_the_caps` (1); `graph lib program::tests::bank_window_hoisting_preserves_dataflow_on_random_graphs` (1); `rack lib tests::a_fully_folded_full_bank_offers_its_resident_block_before_writing_staging` (1); `graph lib runtime::tests::a_host_plane_reduction_is_the_arena_reduction_bit_for_bit` (1); `graph lib program::tests::a_delayed_stage_boundary_is_not_elided` (1) +- `tests::console_sixty_four_track_fixture_banks_its_dynamic_compressor_bit_identically`, `crates/graph-compiler/src/lib.rs:7338-7529`; 33 caught: `graph lib program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers` (4); `lane sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` (3); `lane fader_matrix::select_free_fused_fader_matrix_matches_both_oracles_when_no_lane_is_identity` (2); `math scalar_accuracy::extreme_scaling_paths` (2); `graph-compiler track_delay::a_ring_is_a_named_allocation` (2); `graph lib program::tests::delayed_edge_gets_staging_buffer_and_blocks_in_place` (2); `console-workload automation::mixing::the_eq_lowering_keeps_the_collapse_when_a_pair_lands_in_one_block` (2); `builtins-compiler lib tests::cutoff_boundaries_match_compiler_diagnostics_at_every_launch_rate_and_section` (1); `graph lib runtime::tests::a_plan_that_reads_the_session_output_is_refused_at_bind` (1); `math scalar_accuracy::exact_anchors` (1); `builtins randomized::the_banks_render_their_scalar_sections_under_random_retargets` (1); `console-workload automation::mixing::a_plan_without_a_control_channel_refuses_the_row` (1); `lane g1_op_identity::g1_exp2_int_is_exact_on_the_integer_range` (1); `graph-compiler lib tests::add_a_track_keeps_existing_track_bits_and_one_transpose_per_chain` (1); `lane g4_flush::g4_flush_law_holds_at_every_width` (1); `graph lib runtime::tests::a_banked_source_gathers_the_played_block_bit_for_bit_with_the_copy` (1); `graph-compiler track_delay::a_zero_delay_session_lowers_no_delay_node` (1); `graph-compiler track_delay::an_oversized_delay_is_rejected_by_the_caps` (1); `parametric-eq response::asymmetric_cascade_sections_are_independent_and_bypass_is_total_identity` (1); `rack lib tests::a_fully_folded_full_bank_offers_its_resident_block_before_writing_staging` (1); `graph lib program::tests::a_delayed_stage_boundary_is_not_elided` (1); `graph-compiler track_delay::the_pdc_counts_are_untouched` (1); `rack lib tests::a_partial_agreement_slot_declines_the_collapse` (1) +- `representative_console_compiles_with_builtins_and_reports_its_shape`, `crates/graph-compiler/tests/compile_shapes.rs:471-509`; 9 caught: `graph lib program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers` (2); `builtins-compiler lib tests::cutoff_boundaries_match_compiler_diagnostics_at_every_launch_rate_and_section` (1); `graph rt1_direct_bank_alloc::direct_bank_graph_render_is_allocation_free_and_bit_exact` (1); `session json_grammar::u64_decimal_strings_cover_full_domain_and_reject_noncanonical_forms` (1); `graph-compiler track_delay::a_zero_delay_session_lowers_no_delay_node` (1); `graph-compiler track_delay::an_oversized_delay_is_rejected_by_the_caps` (1); `graph lib program::tests::delayed_edge_gets_staging_buffer_and_blocks_in_place` (1); `graph-compiler track_delay::the_pdc_counts_are_untouched` (1) +- `a_muted_route_seals_one_route_mute_row_after_its_transform`, `crates/graph-compiler/tests/route_coefficients.rs:475-542`; 10 caught: `graph-compiler track_delay::a_ring_is_a_named_allocation` (2); `graph lib program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers` (2); `builtins-compiler lib tests::cutoff_boundaries_match_compiler_diagnostics_at_every_launch_rate_and_section` (1); `graph-compiler track_delay::a_zero_delay_session_lowers_no_delay_node` (1); `graph-compiler track_delay::an_oversized_delay_is_rejected_by_the_caps` (1); `parametric-eq response::asymmetric_cascade_sections_are_independent_and_bypass_is_total_identity` (1); `graph lib program::tests::delayed_edge_gets_staging_buffer_and_blocks_in_place` (1); `graph-compiler track_delay::the_pdc_counts_are_untouched` (1) +- `a_following_send_seals_one_route_follow_zeroed_row`, `crates/graph-compiler/tests/route_coefficients.rs:580-678`; 10 caught: `graph-compiler track_delay::a_ring_is_a_named_allocation` (2); `graph lib program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers` (2); `builtins-compiler lib tests::cutoff_boundaries_match_compiler_diagnostics_at_every_launch_rate_and_section` (1); `graph-compiler track_delay::a_zero_delay_session_lowers_no_delay_node` (1); `graph-compiler track_delay::an_oversized_delay_is_rejected_by_the_caps` (1); `parametric-eq response::asymmetric_cascade_sections_are_independent_and_bypass_is_total_identity` (1); `graph lib program::tests::delayed_edge_gets_staging_buffer_and_blocks_in_place` (1); `graph-compiler track_delay::the_pdc_counts_are_untouched` (1) +- `unity_route_gain_is_exactly_one`, `crates/graph-compiler/tests/route_gain.rs:73-79`; 4 caught: `math scalar_accuracy::exact_anchors` (2); `math scalar_accuracy::extreme_scaling_paths` (2) +- `the_estimate_charges_each_lane_its_own_ring`, `crates/graph-compiler/tests/track_delay.rs:294-322`; 10 caught: `graph-compiler track_delay::a_ring_is_a_named_allocation` (2); `graph lib program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers` (2); `builtins-compiler lib tests::cutoff_boundaries_match_compiler_diagnostics_at_every_launch_rate_and_section` (1); `graph-compiler track_delay::a_zero_delay_session_lowers_no_delay_node` (1); `graph-compiler track_delay::an_oversized_delay_is_rejected_by_the_caps` (1); `parametric-eq response::asymmetric_cascade_sections_are_independent_and_bypass_is_total_identity` (1); `graph lib program::tests::delayed_edge_gets_staging_buffer_and_blocks_in_place` (1); `graph-compiler track_delay::the_pdc_counts_are_untouched` (1) + +#### host-web + +- `tests::default_ring_covers_stall_tolerance`, `hosts/host-web/src/tests.rs:1676-1706`; 4 caught: `host-core prepare::default_ring_derivation_covers_the_stall_and_two_in_flight_quanta` (4) +- `tests::structural_apply::a_live_edit_is_part_of_the_base_the_successor_is_prepared_from`, `hosts/host-web/src/tests.rs:7099-7166`; 34 caught: `capi lib runtime::live_tests::a_live_edits_own_ramp_length_overrides_the_session_and_does_not_outlive_its_transaction` (4); `graph lib program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers` (4); `host-core prepare::default_ring_derivation_covers_the_stall_and_two_in_flight_quanta` (3); `host-web lib tests::structural_apply::a_master_designated_after_an_empty_boot_reads_as_a_boot_designation` (2); `math scalar_accuracy::extreme_scaling_paths` (2); timeout in engine lib (2); `graph lib program::tests::delayed_edge_gets_staging_buffer_and_blocks_in_place` (2); `graph lib runtime::tests::a_plan_that_reads_the_session_output_is_refused_at_bind` (1); `math scalar_accuracy::exact_anchors` (1); `engine lib realtime::spsc::tests::peek_returns_each_queued_item_in_order_across_wraps_and_changes_nothing` (1); `engine lib realtime::spsc::tests::available_at_entry_is_bounded_and_handles_wrapped_cursors` (1); `lane fader_matrix::select_free_matrix_matches_the_select_form_when_no_lane_is_identity` (1); `graph lib runtime::tests::a_banked_source_gathers_the_played_block_bit_for_bit_with_the_copy` (1); `protocol console_session_edits::a_slot_set_change_that_skips_a_track_refuses_whole` (1); `graph-compiler track_delay::a_zero_delay_session_lowers_no_delay_node` (1); `graph-compiler track_delay::an_oversized_delay_is_rejected_by_the_caps` (1); `lane fader_matrix::settled_fader_matrix_matches_the_two_primitive_oracle` (1); `capi lib runtime::live_tests::a_live_fader_left_undrained_before_a_carrying_structural_commit_is_baked` (1); `graph-compiler track_delay::a_ring_is_a_named_allocation` (1); `graph lib program::tests::a_delayed_stage_boundary_is_not_elided` (1); `graph-compiler track_delay::the_pdc_counts_are_untouched` (1); `rack lib tests::a_partial_agreement_slot_declines_the_collapse` (1) +- `tests::structural_apply::a_structural_edit_behind_an_unadopted_candidate_supersedes_it`, `hosts/host-web/src/tests.rs:7736-7794`; 21 caught: `graph lib program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers` (4); `host-core prepare::default_ring_derivation_covers_the_stall_and_two_in_flight_quanta` (3); `host-web lib tests::structural_apply::a_master_designated_after_an_empty_boot_reads_as_a_boot_designation` (2); timeout in engine lib (2); `graph lib runtime::tests::a_plan_that_reads_the_session_output_is_refused_at_bind` (1); `engine lib realtime::spsc::tests::peek_returns_each_queued_item_in_order_across_wraps_and_changes_nothing` (1); `engine lib realtime::spsc::tests::available_at_entry_is_bounded_and_handles_wrapped_cursors` (1); `graph lib runtime::tests::a_banked_source_gathers_the_played_block_bit_for_bit_with_the_copy` (1); `protocol console_session_edits::a_slot_set_change_that_skips_a_track_refuses_whole` (1); `graph-compiler track_delay::a_zero_delay_session_lowers_no_delay_node` (1); `graph-compiler track_delay::an_oversized_delay_is_rejected_by_the_caps` (1); `parametric-eq response::asymmetric_cascade_sections_are_independent_and_bypass_is_total_identity` (1); `graph lib program::tests::delayed_edge_gets_staging_buffer_and_blocks_in_place` (1); `graph lib program::tests::a_delayed_stage_boundary_is_not_elided` (1) +- `tests::session_seek::a_session_seek_sets_an_automated_fader_exactly_in_the_browser`, `hosts/host-web/src/tests.rs:10319-10338`; 27 caught: `capi lib runtime::live_tests::a_rebuild_that_drops_a_following_route_to_six_words_reports_a_fallback` (4); `session json_grammar::insignificant_whitespace_and_shuffled_keys_canonicalize` (3); `math scalar_accuracy::extreme_scaling_paths` (2); timeout in engine lib (2); `graph lib program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers` (2); `host-web lib tests::session_seek::the_session_seek_exports_refuse_a_sticky_failed_host_and_change_nothing` (1); `graph lib runtime::tests::a_plan_that_reads_the_session_output_is_refused_at_bind` (1); `math scalar_accuracy::exact_anchors` (1); `engine lib realtime::spsc::tests::peek_returns_each_queued_item_in_order_across_wraps_and_changes_nothing` (1); `engine lib realtime::spsc::tests::available_at_entry_is_bounded_and_handles_wrapped_cursors` (1); `graph lib runtime::tests::a_banked_source_gathers_the_played_block_bit_for_bit_with_the_copy` (1); `graph lib program::tests::delayed_edge_gets_staging_buffer_and_blocks_in_place` (1); `source lib tests::timeline::a_seek_in_the_oldest_entry_is_still_a_step` (1); `source lib tests::timeline::a_node_block_reports_the_step_of_a_seek_inside_it_or_at_its_first_sample` (1); `graph-compiler track_delay::a_zero_delay_session_lowers_no_delay_node` (1); `graph-compiler track_delay::an_oversized_delay_is_rejected_by_the_caps` (1); `lane fader_matrix::settled_fader_matrix_matches_the_two_primitive_oracle` (1); `capi lib runtime::live_tests::a_live_fader_left_undrained_before_a_carrying_structural_commit_is_baked` (1); `graph lib program::tests::a_delayed_stage_boundary_is_not_elided` (1) +- `tests::canonical_live::a_live_fader_and_vca_move_under_a_hostile_caller_word_render_the_canonical_bits`, `hosts/host-web/src/tests.rs:10685-10764`; 34 caught: `capi lib runtime::live_tests::a_rebuild_that_drops_a_following_route_to_six_words_reports_a_fallback` (4); `graph lib program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers` (4); `session json_grammar::insignificant_whitespace_and_shuffled_keys_canonicalize` (3); `math scalar_accuracy::extreme_scaling_paths` (2); `graph-compiler track_delay::a_ring_is_a_named_allocation` (2); timeout in engine lib (2); `graph lib program::tests::delayed_edge_gets_staging_buffer_and_blocks_in_place` (2); `console-workload automation::mixing::the_eq_lowering_keeps_the_collapse_when_a_pair_lands_in_one_block` (2); `host-web lib tests::structural_apply::a_master_designated_after_an_empty_boot_reads_as_a_boot_designation` (1); `graph lib runtime::tests::a_plan_that_reads_the_session_output_is_refused_at_bind` (1); `math scalar_accuracy::exact_anchors` (1); `engine lib realtime::spsc::tests::peek_returns_each_queued_item_in_order_across_wraps_and_changes_nothing` (1); `console-workload automation::mixing::a_plan_without_a_control_channel_refuses_the_row` (1); `engine lib realtime::spsc::tests::available_at_entry_is_bounded_and_handles_wrapped_cursors` (1); `graph lib runtime::tests::a_banked_source_gathers_the_played_block_bit_for_bit_with_the_copy` (1); `graph-compiler track_delay::a_zero_delay_session_lowers_no_delay_node` (1); `graph-compiler track_delay::an_oversized_delay_is_rejected_by_the_caps` (1); `capi lib runtime::live_tests::a_live_fader_left_undrained_before_a_carrying_structural_commit_is_baked` (1); `graph lib program::tests::a_delayed_stage_boundary_is_not_elided` (1); `graph-compiler track_delay::the_pdc_counts_are_untouched` (1); `capi lib runtime::live_tests::set_control::automated_carry::a_hand_move_pending_at_a_swap_keeps_its_length` (1) +- `paused_structural_edits_commit_alike_on_both_hosts`, `hosts/host-web/tests/control_parity.rs:4068-4139`; 26 caught: `graph lib program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers` (4); `host-web lib tests::structural_apply::a_master_designated_after_an_empty_boot_reads_as_a_boot_designation` (2); `graph lib program::tests::delayed_edge_gets_staging_buffer_and_blocks_in_place` (2); timeout in engine lib (2); `lane sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` (2); `graph lib runtime::tests::a_plan_that_reads_the_session_output_is_refused_at_bind` (1); `engine lib realtime::spsc::tests::peek_returns_each_queued_item_in_order_across_wraps_and_changes_nothing` (1); `engine lib realtime::spsc::tests::available_at_entry_is_bounded_and_handles_wrapped_cursors` (1); `host-web lib tests::selected_observation_reads_keep_same_track_owner_windows_and_sequences` (1); `graph lib runtime::tests::a_banked_source_gathers_the_played_block_bit_for_bit_with_the_copy` (1); `protocol console_session_edits::a_slot_set_change_that_skips_a_track_refuses_whole` (1); `graph-compiler track_delay::a_zero_delay_session_lowers_no_delay_node` (1); `graph-compiler track_delay::an_oversized_delay_is_rejected_by_the_caps` (1); `parametric-eq response::asymmetric_cascade_sections_are_independent_and_bypass_is_total_identity` (1); `graph lib runtime::tests::a_host_plane_reduction_is_the_arena_reduction_bit_for_bit` (1); `effect-runtime lane_identity::the_boundary_check_is_width_independent` (1); `graph-compiler track_delay::a_ring_is_a_named_allocation` (1); `graph lib program::tests::a_delayed_stage_boundary_is_not_elided` (1); `graph-compiler track_delay::the_pdc_counts_are_untouched` (1) +- `a_declared_discontinuity_resets_the_floors_alike_on_both_hosts`, `hosts/host-web/tests/control_parity.rs:4409-4480`; 26 caught: `graph lib program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers` (4); `host-web lib tests::structural_apply::a_master_designated_after_an_empty_boot_reads_as_a_boot_designation` (2); `graph lib program::tests::delayed_edge_gets_staging_buffer_and_blocks_in_place` (2); timeout in engine lib (2); `lane sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` (2); `graph lib runtime::tests::a_plan_that_reads_the_session_output_is_refused_at_bind` (1); `engine lib realtime::spsc::tests::peek_returns_each_queued_item_in_order_across_wraps_and_changes_nothing` (1); `engine lib realtime::spsc::tests::available_at_entry_is_bounded_and_handles_wrapped_cursors` (1); `host-web lib tests::selected_observation_reads_keep_same_track_owner_windows_and_sequences` (1); `graph lib runtime::tests::a_banked_source_gathers_the_played_block_bit_for_bit_with_the_copy` (1); `protocol console_session_edits::a_slot_set_change_that_skips_a_track_refuses_whole` (1); `graph-compiler track_delay::a_zero_delay_session_lowers_no_delay_node` (1); `graph-compiler track_delay::an_oversized_delay_is_rejected_by_the_caps` (1); `parametric-eq response::asymmetric_cascade_sections_are_independent_and_bypass_is_total_identity` (1); `graph lib runtime::tests::a_host_plane_reduction_is_the_arena_reduction_bit_for_bit` (1); `effect-runtime lane_identity::the_boundary_check_is_width_independent` (1); `graph-compiler track_delay::a_ring_is_a_named_allocation` (1); `graph lib program::tests::a_delayed_stage_boundary_is_not_elided` (1); `graph-compiler track_delay::the_pdc_counts_are_untouched` (1) +- `browser_identity_fixture_retained_rows_stay_within_their_budgets`, `hosts/host-web/tests/retained_ceilings.rs:208-268`; 11 caught: `graph lib program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers` (4); timeout in engine lib (2); `host-web boot_transient_budget::pinned_multiplier_bounds_the_worst_accepted_parse_and_model_build_peak` (1); `graph lib runtime::tests::a_plan_that_reads_the_session_output_is_refused_at_bind` (1); `graph lib runtime::tests::a_banked_source_gathers_the_played_block_bit_for_bit_with_the_copy` (1); `graph lib program::tests::delayed_edge_gets_staging_buffer_and_blocks_in_place` (1); `graph lib program::tests::a_delayed_stage_boundary_is_not_elided` (1) +- `the_graph_row_charges_the_plans_gate_and_not_the_sessions_superseded_count`, `hosts/host-web/tests/retained_ceilings.rs:270-294`; 10 caught: `graph lib program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers` (4); timeout in engine lib (2); `graph lib runtime::tests::a_plan_that_reads_the_session_output_is_refused_at_bind` (1); `graph lib runtime::tests::a_banked_source_gathers_the_played_block_bit_for_bit_with_the_copy` (1); `graph lib program::tests::delayed_edge_gets_staging_buffer_and_blocks_in_place` (1); `graph lib program::tests::a_delayed_stage_boundary_is_not_elided` (1) + +#### lane + +- `holey_populations_keep_neutral_wide_padding`, `crates/lane/tests/fader_matrix.rs:504-508`; 3 caught: `lane fader_matrix::select_free_fused_fader_matrix_matches_both_oracles_when_no_lane_is_identity` (1); `lane fader_matrix::select_free_matrix_matches_the_select_form_when_no_lane_is_identity` (1); `lane fader_matrix::settled_fader_matrix_matches_the_two_primitive_oracle` (1) +- `wrong_equations_are_distinguished_before_the_dut_is_checked`, `crates/lane/tests/fader_matrix.rs:545-593`; 5 caught: `lane fader_matrix::select_free_fused_fader_matrix_matches_both_oracles_when_no_lane_is_identity` (3); `lane fader_matrix::select_free_matrix_matches_the_select_form_when_no_lane_is_identity` (1); `lane fader_matrix::settled_fader_matrix_matches_the_two_primitive_oracle` (1) +- `attestation_passes_on_this_thread`, `crates/lane/tests/fp_env.rs:22-25`; 4 caught: `lane fp_env::` (2); `lane fp_env::x86::a_hostile_caller_word_is_normalised_and_returned_bit_exactly` (1); `lane fp_env::x86::attestation_passes_from_a_hostile_caller_word` (1) +- `the_canonical_word_is_the_word_inside_the_guard` [UNIQUE (test-only code)], `crates/lane/tests/fp_env.rs:27-48`; 4 caught: `lane fp_env::` (2); other candidates only (1); `lane fp_env::x86::a_hostile_caller_word_is_normalised_and_returned_bit_exactly` (1) +- `g4_pair_law_cases_at_every_width`, `crates/lane/tests/g4_flush.rs:352-355`; 4 caught: `lane g4_flush::g4_pair_law_holds_at_every_width` (2); `lane g4_flush::g4_flush_law_holds_at_every_width` (1); `lane sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` (1) +- `g1_a_lane_fed_only_invalid_values_ends_at_positive_zero`, `crates/lane/tests/meter_peak.rs:222-225`; 8 caught: `lane sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` (3); `lane fader_matrix::select_free_fused_fader_matrix_matches_both_oracles_when_no_lane_is_identity` (2); `lane input_chain_arming::any_state_word_in_the_band_arms_the_block` (1); `lane g1_op_identity::g1_exp2_int_is_exact_on_the_integer_range` (1); `lane g4_flush::g4_flush_law_holds_at_every_width` (1) +- `g1_select_max_is_order_free_only_on_the_sanitized_domain`, `crates/lane/tests/meter_peak.rs:262-302`; 4 caught: `lane sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` (3); `lane g1_op_identity::g1_exp2_int_is_exact_on_the_integer_range` (1) +- `the_and_form_is_the_select_form_on_every_lane_subset`, `crates/lane/tests/sanitise_counter.rs:247-308`; 7 caught: `lane sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` (4); `lane fader_matrix::select_free_fused_fader_matrix_matches_both_oracles_when_no_lane_is_identity` (2); `lane g4_flush::g4_flush_law_holds_at_every_width` (1) + +#### math + +- `f1_shaper_x7_x8_domains_are_covered`, `crates/math/tests/f1_fast_db_bounds.rs:575-596`; 4 caught: `graph-compiler track_delay::a_ring_is_a_named_allocation` (1); `graph-compiler track_delay::a_zero_delay_session_lowers_no_delay_node` (1); `graph-compiler track_delay::an_oversized_delay_is_rejected_by_the_caps` (1); `graph-compiler track_delay::the_pdc_counts_are_untouched` (1) +- `f1_crossing_domains_match_independent_definitions`, `crates/math/tests/f1_fast_db_bounds.rs:927-952`; 8 caught: `lane sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` (3); `lane fader_matrix::select_free_fused_fader_matrix_matches_both_oracles_when_no_lane_is_identity` (2); `lane g1_op_identity::g1_exp2_int_is_exact_on_the_integer_range` (1); `capi lib runtime::live_tests::a_live_fader_left_undrained_before_a_carrying_structural_commit_is_baked` (1); `graph-compiler track_delay::a_ring_is_a_named_allocation` (1) + +#### multiband-compressor + +- `scalar_and_bank_state_interchange_continues`, `crates/multiband-compressor/tests/identity.rs:578-704`; 10 caught: `lane sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` (3); `lane fader_matrix::select_free_fused_fader_matrix_matches_both_oracles_when_no_lane_is_identity` (2); `builtins randomized::the_banks_render_their_scalar_sections_under_random_retargets` (1); `lane g1_op_identity::g1_exp2_int_is_exact_on_the_integer_range` (1); `lane g4_flush::g4_flush_law_holds_at_every_width` (1); `host-web lib tests::selected_observation_reads_keep_same_track_owner_windows_and_sequences` (1); `effect-runtime lane_identity::the_boundary_check_is_width_independent` (1) + +#### parametric-eq + +- `interleave_identity::disabled_cuts_with_an_original_band_ramp_match_the_four_section_oracle`, `crates/parametric-eq/src/lib.rs:4896-4899`; 15 caught: `parametric-eq lib elision::a_discontinuity_reset_mid_ramp_refreshes_the_identity_flag` (4); `graph-compiler track_delay::a_ring_is_a_named_allocation` (2); `console-workload automation::mixing::the_eq_lowering_keeps_the_collapse_when_a_pair_lands_in_one_block` (2); `console-workload automation::mixing::a_plan_without_a_control_channel_refuses_the_row` (1); `lane g4_flush::g4_pair_law_holds_at_every_width` (1); `graph-compiler track_delay::a_zero_delay_session_lowers_no_delay_node` (1); `graph-compiler track_delay::an_oversized_delay_is_rejected_by_the_caps` (1); `lane sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` (1); `effect-runtime contract_ramp_identity::linear_smoother_is_bit_identical_to_the_linear_ramp` (1); `graph-compiler track_delay::the_pdc_counts_are_untouched` (1) +- `interleave_identity::a_tiny_restored_disabled_cut_state_refuses_elision_but_preserves_old_bands`, `crates/parametric-eq/src/lib.rs:4901-4904`; 18 caught: `parametric-eq lib elision::a_discontinuity_reset_mid_ramp_refreshes_the_identity_flag` (4); `lane sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` (3); `graph-compiler track_delay::a_ring_is_a_named_allocation` (2); `parametric-eq lib randomized_restores::the_stationary_cascade_renders_the_full_cascade_after_random_restores` (2); `console-workload automation::mixing::the_eq_lowering_keeps_the_collapse_when_a_pair_lands_in_one_block` (2); `console-workload automation::mixing::a_plan_without_a_control_channel_refuses_the_row` (1); `lane g4_flush::g4_pair_law_holds_at_every_width` (1); `graph-compiler track_delay::a_zero_delay_session_lowers_no_delay_node` (1); `graph-compiler track_delay::an_oversized_delay_is_rejected_by_the_caps` (1); `graph-compiler track_delay::the_pdc_counts_are_untouched` (1) +- `interleave_identity::disabled_cuts_preserve_original_band_bits_against_a_direct_four_section_oracle`, `crates/parametric-eq/src/lib.rs:4946-4968`; 15 caught: `parametric-eq lib elision::a_discontinuity_reset_mid_ramp_refreshes_the_identity_flag` (4); `graph-compiler track_delay::a_ring_is_a_named_allocation` (2); `parametric-eq lib randomized_restores::the_stationary_cascade_renders_the_full_cascade_after_random_restores` (2); `console-workload automation::mixing::the_eq_lowering_keeps_the_collapse_when_a_pair_lands_in_one_block` (2); `console-workload automation::mixing::a_plan_without_a_control_channel_refuses_the_row` (1); `graph-compiler track_delay::a_zero_delay_session_lowers_no_delay_node` (1); `graph-compiler track_delay::an_oversized_delay_is_rejected_by_the_caps` (1); `lane sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` (1); `graph-compiler track_delay::the_pdc_counts_are_untouched` (1) +- `interleave_identity::disabled_cuts_preserve_all_high_pass_signed_zero_against_four_section_oracle`, `crates/parametric-eq/src/lib.rs:4970-4992`; 5 caught: `parametric-eq lib elision::a_discontinuity_reset_mid_ramp_refreshes_the_identity_flag` (4); `lane sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` (1) +- `interleave_identity::signed_zero_refusal_preserves_the_full_six_section_bits`, `crates/parametric-eq/src/lib.rs:4994-5008`; 14 caught: `parametric-eq lib elision::a_discontinuity_reset_mid_ramp_refreshes_the_identity_flag` (4); `graph-compiler track_delay::a_ring_is_a_named_allocation` (2); `parametric-eq lib randomized_restores::the_stationary_cascade_renders_the_full_cascade_after_random_restores` (2); `console-workload automation::mixing::the_eq_lowering_keeps_the_collapse_when_a_pair_lands_in_one_block` (2); `console-workload automation::mixing::a_plan_without_a_control_channel_refuses_the_row` (1); `graph-compiler track_delay::a_zero_delay_session_lowers_no_delay_node` (1); `graph-compiler track_delay::an_oversized_delay_is_rejected_by_the_caps` (1); `graph-compiler track_delay::the_pdc_counts_are_untouched` (1) +- `every_width_matches_the_scalar_instantiation`, `crates/parametric-eq/tests/bank.rs:183-334`; 17 caught: `lane sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` (3); `lane fader_matrix::select_free_fused_fader_matrix_matches_both_oracles_when_no_lane_is_identity` (2); `graph-compiler track_delay::a_ring_is_a_named_allocation` (2); `parametric-eq lib randomized_restores::the_stationary_cascade_renders_the_full_cascade_after_random_restores` (2); `lane g4_flush::g4_pair_law_holds_at_every_width` (1); `lane g4_flush::g4_flush_law_holds_at_every_width` (1); `host-web lib tests::selected_observation_reads_keep_same_track_owner_windows_and_sequences` (1); `graph-compiler track_delay::a_zero_delay_session_lowers_no_delay_node` (1); `graph-compiler track_delay::an_oversized_delay_is_rejected_by_the_caps` (1); `parametric-eq response::asymmetric_cascade_sections_are_independent_and_bypass_is_total_identity` (1); `effect-runtime lane_identity::the_boundary_check_is_width_independent` (1); `graph-compiler track_delay::the_pdc_counts_are_untouched` (1) +- `a_mid_ramp_restore_continues_bit_for_bit_at_every_sample`, `crates/parametric-eq/tests/carry.rs:194-261`; 18 caught: `lane sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` (3); `lane fader_matrix::select_free_fused_fader_matrix_matches_both_oracles_when_no_lane_is_identity` (2); `graph-compiler track_delay::a_ring_is_a_named_allocation` (2); `console-workload automation::mixing::the_eq_lowering_keeps_the_collapse_when_a_pair_lands_in_one_block` (2); `console-workload automation::mixing::a_plan_without_a_control_channel_refuses_the_row` (1); `lane g4_flush::g4_pair_law_holds_at_every_width` (1); `lane g4_flush::g4_flush_law_holds_at_every_width` (1); `host-web lib tests::selected_observation_reads_keep_same_track_owner_windows_and_sequences` (1); `graph-compiler track_delay::a_zero_delay_session_lowers_no_delay_node` (1); `graph-compiler track_delay::an_oversized_delay_is_rejected_by_the_caps` (1); `parametric-eq response::asymmetric_cascade_sections_are_independent_and_bypass_is_total_identity` (1); `effect-runtime lane_identity::the_boundary_check_is_width_independent` (1); `graph-compiler track_delay::the_pdc_counts_are_untouched` (1) +- `automation_is_partition_invariant`, `crates/parametric-eq/tests/contract.rs:336-437`; 9 caught: `graph-compiler track_delay::a_ring_is_a_named_allocation` (2); `parametric-eq lib randomized_restores::the_stationary_cascade_renders_the_full_cascade_after_random_restores` (2); `graph-compiler track_delay::a_zero_delay_session_lowers_no_delay_node` (1); `graph-compiler track_delay::an_oversized_delay_is_rejected_by_the_caps` (1); `parametric-eq response::asymmetric_cascade_sections_are_independent_and_bypass_is_total_identity` (1); `effect-runtime lane_identity::the_boundary_check_is_width_independent` (1); `graph-compiler track_delay::the_pdc_counts_are_untouched` (1) +- `the_collapsed_body_renders_the_dual_bodys_left_plane`, `crates/parametric-eq/tests/mono_collapse.rs:177-226`; 7 caught: `graph-compiler track_delay::a_ring_is_a_named_allocation` (2); `graph-compiler track_delay::a_zero_delay_session_lowers_no_delay_node` (1); `graph-compiler track_delay::an_oversized_delay_is_rejected_by_the_caps` (1); `parametric-eq response::asymmetric_cascade_sections_are_independent_and_bypass_is_total_identity` (1); `effect-runtime lane_identity::the_boundary_check_is_width_independent` (1); `graph-compiler track_delay::the_pdc_counts_are_untouched` (1) +- `common_eq_adapter_preserves_input_ownership_capacity_and_refusal_sentinels` [REDUNDANT-IF-PEER-KEPT], `crates/parametric-eq/tests/response.rs:1765-1984`; 9 caught: `graph-compiler track_delay::a_ring_is_a_named_allocation` (2); `parametric-eq response::asymmetric_cascade_sections_are_independent_and_bypass_is_total_identity` (2); `parametric-eq response::common_eq_trait_object_query_is_allocation_free` (1); other candidates only (1); `graph-compiler track_delay::a_zero_delay_session_lowers_no_delay_node` (1); `graph-compiler track_delay::an_oversized_delay_is_rejected_by_the_caps` (1); `graph-compiler track_delay::the_pdc_counts_are_untouched` (1) + +#### protocol + +- `controller::tests::a_slot_set_change_that_skips_a_track_is_never_acknowledged`, `crates/protocol/src/controller/tests.rs:2364-2455`; 5 caught: timeout in engine lib (2); `protocol lib controller::tests::edit_path_is_written_at_commit_and_replayed_byte_for_byte` (1); `protocol console_session_edits::a_slot_set_change_that_skips_a_track_refuses_whole` (1); `session json_grammar::u64_decimal_strings_cover_full_domain_and_reject_noncanonical_forms` (1) +- `controller::tests::decoded_track_edit_reaches_same_atomic_session_store`, `crates/protocol/src/controller/tests.rs:2761-2796`; 4 caught: timeout in engine lib (2); `protocol console_session_edits::a_slot_set_change_that_skips_a_track_refuses_whole` (1); `session json_grammar::u64_decimal_strings_cover_full_domain_and_reject_noncanonical_forms` (1) +- `controller::tests::decoded_route_edit_reaches_same_atomic_session_store`, `crates/protocol/src/controller/tests.rs:2798-2835`; 4 caught: timeout in engine lib (2); `protocol console_session_edits::a_slot_set_change_that_skips_a_track_refuses_whole` (1); `session json_grammar::u64_decimal_strings_cover_full_domain_and_reject_noncanonical_forms` (1) +- `set_control_writes_exactly_the_field_its_address_names`, `crates/protocol/tests/edit_ramps.rs:776-814`; 3 caught: `host-web lib tests::structural_apply::a_master_designated_after_an_empty_boot_reads_as_a_boot_designation` (1); `protocol console_session_edits::a_slot_set_change_that_skips_a_track_refuses_whole` (1); `session json_grammar::u64_decimal_strings_cover_full_domain_and_reject_noncanonical_forms` (1) +- `vca_refusals_commit_nothing`, `crates/protocol/tests/vca_edits.rs:306-526`; 3 caught: `host-web control_parity::a_vca_move_over_an_automated_member_is_live_alike_on_both_hosts` (1); `protocol console_session_edits::a_slot_set_change_that_skips_a_track_refuses_whole` (1); `protocol submix_strip_edits::every_strip_opcode_edits_a_submix` (1) + +#### rack + +- `tests::prepared_slot_dispatch_uses_constant_activity_checks`, `crates/rack/src/lib.rs:5000-5133`; 4 caught: `rack lib tests::disengaging_copies_the_prefixs_state_once` (1); `console-workload paired_spans::the_limiter_bank_renders_the_dual_bits_in_every_scenario` (1); `rack lib tests::a_fully_folded_full_bank_offers_its_resident_block_before_writing_staging` (1); `rack lib tests::a_partial_agreement_slot_declines_the_collapse` (1) + +#### realtime-policy + +- `binary::two_arguments_exit_two`, `tools/realtime-policy/tests/policy/binary.rs:29-37`; 4 caught: `realtime-policy policy::binary::a_root_with_a_missing_scan_root_exits_one` (1); `realtime-policy policy::run::a_valid_tree_exits_zero_and_prints_the_success_line` (1); `realtime-policy policy::boundary::a_boundary_finding_names_the_marker_line` (1); `realtime-policy policy::boundary::a_marker_inside_an_attribute_is_refused` (1) +- `drain::indirect::a_proc_macro_named_debug_assert_is_refused`, `tools/realtime-policy/tests/policy/drain/indirect.rs:249-263`; 3 caught: `realtime-policy policy::boundary::a_region_that_ends_in_another_block_is_refused` (1); `realtime-policy policy::boundary::a_boundary_finding_names_the_marker_line` (1); `realtime-policy policy::boundary::a_marker_inside_an_attribute_is_refused` (1) +- `unsafe_ownership::unsafe_code_outside_the_allowlist_is_a_finding`, `tools/realtime-policy/tests/policy/unsafe_ownership.rs:13-94`; 4 caught: `realtime-policy policy::boundary::a_region_that_ends_in_another_block_is_refused` (1); `realtime-policy policy::boundary::a_boundary_finding_names_the_marker_line` (1); `realtime-policy policy::boundary::a_marker_inside_an_attribute_is_refused` (1); `realtime-policy policy::boundary::a_region_inside_a_macro_body_is_tokens_and_passes` (1) +- `unsafe_ownership::the_dropped_allowlist_entries_are_findings`, `tools/realtime-policy/tests/policy/unsafe_ownership.rs:100-118`; 4 caught: `realtime-policy policy::boundary::a_region_that_ends_in_another_block_is_refused` (1); `realtime-policy policy::boundary::a_boundary_finding_names_the_marker_line` (1); `realtime-policy policy::boundary::a_marker_inside_an_attribute_is_refused` (1); `realtime-policy policy::boundary::a_region_inside_a_macro_body_is_tokens_and_passes` (1) + +#### session + +- `edit_ramp::tests::clearing_a_target_drops_its_rows_and_nothing_else`, `crates/session/src/edit_ramp.rs:254-274`; 4 caught: `protocol edit_ramps::an_edit_that_rewrites_or_removes_a_target_clears_its_earlier_lengths` (2); `protocol edit_ramps::set_control_records_the_row_its_address_names` (1); `protocol edit_ramps::the_last_edit_to_write_a_row_decides_its_length` (1) +- `u64_model_fields_accept_the_full_unsigned_domain`, `crates/session/tests/invalid_matrix.rs:56-86`; 4 caught: `session json_grammar::insignificant_whitespace_and_shuffled_keys_canonicalize` (3); `session json_grammar::u64_decimal_strings_cover_full_domain_and_reject_noncanonical_forms` (1) + +#### session-validator + +- `the_shipped_skill_validator_commands_run_verbatim`, `tools/session-validator/tests/skill.rs:61-111`; 5 caught: `session-validator validate::effect_preparation_matches_engine_and_cli_refuses_without_canonical_output` (3); `session-validator validate::each_mutation_is_attributed_to_the_stage_that_rejects_it` (2) +- `the_duplicate_key_fixture_fails_the_grammar_stage`, `tools/session-validator/tests/validate.rs:137-151`; 7 caught: `session-validator validate::each_mutation_is_attributed_to_the_stage_that_rejects_it` (7) +- `canonical_output_reproduces_the_checked_in_canonical_fixtures`, `tools/session-validator/tests/validate.rs:430-440`; 4 caught: `session-validator validate::effect_preparation_matches_engine_and_cli_refuses_without_canonical_output` (2); `session-validator validate::each_mutation_is_attributed_to_the_stage_that_rejects_it` (2) + +#### soft-clip + +- `a_finite_but_out_of_range_block_also_fails`, `crates/soft-clip/tests/boundary_check.rs:69-83`; 10 caught: `effect-runtime lane_identity::the_lane_mask_agrees_across_widths` (2); `lane fader_matrix::select_free_fused_fader_matrix_matches_both_oracles_when_no_lane_is_identity` (2); `math scalar_accuracy::extreme_scaling_paths` (2); `math scalar_accuracy::exact_anchors` (1); `effect-runtime lane_identity::the_boundary_check_is_width_independent` (1); `lane sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` (1); `lane g4_flush::g4_flush_law_holds_at_every_width` (1) +- `every_partition_renders_the_one_shot_bits_and_state`, `crates/soft-clip/tests/partition_invariance.rs:88-118`; 14 caught: `lane sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` (3); `math scalar_accuracy::exact_anchors` (2); `lane fader_matrix::select_free_fused_fader_matrix_matches_both_oracles_when_no_lane_is_identity` (2); `math scalar_accuracy::extreme_scaling_paths` (2); `effect-runtime contract_ramp_identity::linear_smoother_is_bit_identical_to_the_linear_ramp` (2); `lane g4_flush::g4_flush_law_holds_at_every_width` (1); `host-web lib tests::selected_observation_reads_keep_same_track_owner_windows_and_sequences` (1); `math m3_determinism::m3_corpus_digests_match_pins` (1) +- `a_snapshot_restores_into_a_fresh_instance_and_continues_bit_for_bit`, `crates/soft-clip/tests/state_roundtrip.rs:41-83`; 13 caught: `lane sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` (3); `math scalar_accuracy::exact_anchors` (2); `lane fader_matrix::select_free_fused_fader_matrix_matches_both_oracles_when_no_lane_is_identity` (2); `math scalar_accuracy::extreme_scaling_paths` (2); `effect-runtime contract_ramp_identity::linear_smoother_is_bit_identical_to_the_linear_ramp` (2); `host-web lib tests::selected_observation_reads_keep_same_track_owner_windows_and_sequences` (1); `math m3_determinism::m3_corpus_digests_match_pins` (1) + +#### source + +- `tests::host_submission_is_fifo_wraparound_and_never_accepts_a_prefix`, `crates/source/src/lib.rs:4162-4195`; 4 caught: timeout in engine lib (2); `engine lib realtime::spsc::tests::peek_returns_each_queued_item_in_order_across_wraps_and_changes_nothing` (1); `engine lib realtime::spsc::tests::available_at_entry_is_bounded_and_handles_wrapped_cursors` (1) +- `tests::underrun_is_positive_zero_and_eof_is_not_an_underrun`, `crates/source/src/lib.rs:4197-4236`; 5 caught: timeout in engine lib (2); `source randomized::random_schedules_match_the_independent_ring_model` (1); `engine lib realtime::spsc::tests::peek_returns_each_queued_item_in_order_across_wraps_and_changes_nothing` (1); `engine lib realtime::spsc::tests::available_at_entry_is_bounded_and_handles_wrapped_cursors` (1) +- `tests::copy_channel_preserves_pcm_and_zeroes_missing_frames`, `crates/source/src/lib.rs:4332-4368`; 4 caught: timeout in engine lib (2); `engine lib realtime::spsc::tests::peek_returns_each_queued_item_in_order_across_wraps_and_changes_nothing` (1); `engine lib realtime::spsc::tests::available_at_entry_is_bounded_and_handles_wrapped_cursors` (1) +- `tests::seek_switches_at_boundary_and_discards_older_queued_audio`, `crates/source/src/lib.rs:4752-4784`; 4 caught: timeout in engine lib (2); `engine lib realtime::spsc::tests::peek_returns_each_queued_item_in_order_across_wraps_and_changes_nothing` (1); `engine lib realtime::spsc::tests::available_at_entry_is_bounded_and_handles_wrapped_cursors` (1) +- `tests::rejected_host_submission_publishes_nothing_and_leaves_the_producer_untouched`, `crates/source/src/lib.rs:4844-4885`; 4 caught: timeout in engine lib (2); `engine lib realtime::spsc::tests::peek_returns_each_queued_item_in_order_across_wraps_and_changes_nothing` (1); `engine lib realtime::spsc::tests::available_at_entry_is_bounded_and_handles_wrapped_cursors` (1) +- `tests::one_four_channel_source_fans_out_to_three_inputs_in_the_sequential_executor`, `crates/source/src/lib.rs:4887-5133`; 12 caught: `graph lib program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers` (3); timeout in engine lib (2); `graph lib program::tests::delayed_edge_gets_staging_buffer_and_blocks_in_place` (2); `graph lib runtime::tests::a_plan_that_reads_the_session_output_is_refused_at_bind` (1); `engine lib realtime::spsc::tests::peek_returns_each_queued_item_in_order_across_wraps_and_changes_nothing` (1); `engine lib realtime::spsc::tests::available_at_entry_is_bounded_and_handles_wrapped_cursors` (1); `graph lib runtime::tests::a_banked_source_gathers_the_played_block_bit_for_bit_with_the_copy` (1); `graph lib program::tests::a_delayed_stage_boundary_is_not_elided` (1) +- `tests::timeline::a_node_block_reports_the_steps_of_a_source_read_step_back`, `crates/source/src/lib.rs:6936-6980`; 4 caught: `source lib tests::timeline::a_node_block_reports_the_step_of_a_seek_inside_it_or_at_its_first_sample` (2); `source lib tests::published::an_unpublished_seek_and_its_pcm_wait_in_their_slots_until_published` (1); `source lib tests::timeline::a_seek_in_the_oldest_entry_is_still_a_step` (1) +- `tests::timeline::a_step_back_steps_where_no_held_entry_starts_before_it`, `crates/source/src/lib.rs:6982-7021`; 4 caught: `source lib tests::timeline::a_node_block_reports_the_step_of_a_seek_inside_it_or_at_its_first_sample` (2); `source lib tests::published::an_unpublished_seek_and_its_pcm_wait_in_their_slots_until_published` (1); `source lib tests::timeline::a_seek_in_the_oldest_entry_is_still_a_step` (1) +- `frozen_seek_schedules_match_the_independent_ring_model`, `crates/source/tests/seek_schedule_model.rs:22-25`; 4 caught: timeout in engine lib (2); `engine lib realtime::spsc::tests::peek_returns_each_queued_item_in_order_across_wraps_and_changes_nothing` (1); `engine lib realtime::spsc::tests::available_at_entry_is_bounded_and_handles_wrapped_cursors` (1) + +#### transient-shaper + +- `the_scalar_product_is_partition_invariant`, `crates/transient-shaper/tests/partition.rs:40-119`; 7 caught: `effect-runtime contract_ramp_identity::linear_smoother_is_bit_identical_to_the_linear_ramp` (3); `lane sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` (2); `lane g4_flush::g4_flush_law_holds_at_every_width` (1); `host-web lib tests::selected_observation_reads_keep_same_track_owner_windows_and_sequences` (1) + +#### true-peak-limiter + +- `tests::partition_invariance_holds_over_block_sizes`, `crates/true-peak-limiter/src/lib.rs:7541-7584`; 3 caught: `lane sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` (2); `effect-runtime lane_identity::the_boundary_check_is_width_independent` (1) +- `the_collapsed_body_renders_the_dual_bodys_left_plane`, `crates/true-peak-limiter/tests/mono_collapse.rs:249-308`; 5 caught: `true-peak-limiter mono_collapse::a_desymmetrized_bank_is_a_never_collapsed_bank` (2); `console-workload paired_spans::the_limiter_bank_renders_the_dual_bits_in_every_scenario` (2); `effect-runtime lane_identity::the_boundary_check_is_width_independent` (1) + +### Deleted test files (whole) + +- `crates/conformance/src/block.rs` (68), `src/compare.rs` (235), `src/determinism.rs` (34), + `tests/api_metrics.rs` (100): item 4. +- `crates/soft-clip/tests/partition_invariance.rs` (118), `crates/source/tests/seek_schedule_model.rs` + (533), `hosts/host-web/tests/retained_ceilings.rs` (294), `tools/session-validator/tests/skill.rs` + (111): every test in them is listed above; their helpers go with them. `retained_ceilings.rs` + held the native budgets of the browser identity fixture; the browser rows keep their ceilings in + `tests/browser-v1/expected.json` (`check-browser-expected-resources.py`). host-web's `lane` + dev-dependency served only it and the deleted `canonical_live` module, so it goes too + (`Cargo.lock` loses that edge). + +### Deleted helpers (compiler-reported, 75 items, 2,088 lines) + +- `Command`, `crates/builtins/tests/stage.rs:860-883` +- `automation_script`, `crates/builtins/tests/stage.rs:885-960` +- `render_banked`, `crates/builtins/tests/stage.rs:962-1054` +- `render_per_track`, `crates/builtins/tests/stage.rs:1056-1117` +- `document`, `crates/capi/src/runtime/live_tests.rs:8409-8417` +- `vca_at`, `crates/capi/src/runtime/live_tests.rs:8419-8425` +- `writes`, `crates/capi/src/runtime/live_tests.rs:8427-8445` +- `case`, `crates/capi/src/runtime/live_tests.rs:8447-8516` +- `fader_length`, `crates/capi/src/runtime/live_tests.rs:8518-8525` +- `fader_rows`, `crates/capi/src/runtime/live_tests.rs:9867-9879` +- `Leg`, `crates/capi/src/runtime/live_tests.rs:9881-9888` +- `leg`, `crates/capi/src/runtime/live_tests.rs:9890-9931` +- `follows_mute_edit`, `crates/capi/src/runtime/live_tests.rs:11380-11394` +- `route_entry`, `crates/capi/src/runtime/live_tests.rs:11500-11519` +- `a_reverted_owner_carries_from_p0`, `crates/capi/src/runtime/supersede_tests.rs:818-842` +- `upsert_added_source`, `crates/capi/src/runtime/supersede_tests.rs:1267-1286` +- `remove_source_track`, `crates/capi/src/runtime/supersede_tests.rs:1288-1299` +- `FreshSourceCase`, `crates/capi/src/runtime/supersede_tests.rs:1301-1313` +- `fresh_source_cases`, `crates/capi/src/runtime/supersede_tests.rs:1315-1354` +- `FRAMES`, `crates/compressor/tests/lane_identity.rs:24-24` +- `QUANTUM`, `crates/compressor/tests/lane_identity.rs:25-25` +- `track_values`, `crates/compressor/tests/lane_identity.rs:27-40` +- `every_parameter`, `crates/compressor/tests/partition.rs:26-45` +- `OVERFLOWING_KNEES`, `crates/effect-runtime/tests/dynamics.rs:237-246` +- `NARROWEST_SOFT_KNEES`, `crates/effect-runtime/tests/dynamics.rs:248-255` +- `track_values`, `crates/gate-expander/tests/identity.rs:12-29` +- `render_bank_native`, `crates/gate-expander/tests/identity.rs:31-70` +- `compile_bank_and_per_node`, `crates/graph-compiler/src/lib.rs:1141-1196` +- `taps`, `crates/graph-compiler/tests/compile_shapes.rs:376-386` +- `representative_console`, `crates/graph-compiler/tests/compile_shapes.rs:388-469` +- `assert_estimate_moves_by_the_route_activity_charge`, `crates/graph-compiler/tests/route_coefficients.rs:544-578` +- `dynamic_track`, `crates/graph/src/program/tests.rs:720-751` +- `dynamic_effect`, `crates/graph/src/program/tests.rs:753-759` +- `assert_width_matches_reference`, `crates/graph/src/runtime.rs:12313-12427` +- `compare_holey_population`, `crates/lane/tests/fader_matrix.rs:430-502` +- `run_scalar`, `crates/lane/tests/fader_matrix.rs:510-543` +- `pair_cases`, `crates/lane/tests/g4_flush.rs:262-350` +- `invalid_lane_at`, `crates/lane/tests/meter_peak.rs:178-220` +- `F1_SHAPER_LEVEL_MIN`, `crates/math/tests/f1_fast_db_bounds.rs:561-561` +- `worst_over_run`, `crates/math/tests/f1_fast_db_bounds.rs:866-901` +- `crossing_worst_db`, `crates/math/tests/f1_fast_db_bounds.rs:903-925` +- `original_four`, `crates/parametric-eq/src/lib.rs:4238-4248` +- `process_original_four`, `crates/parametric-eq/src/lib.rs:4250-4261` +- `process_original_four_ramped`, `crates/parametric-eq/src/lib.rs:4263-4303` +- `all_high_pass_channel`, `crates/parametric-eq/src/lib.rs:4305-4330` +- `original_state_bits`, `crates/parametric-eq/src/lib.rs:4332-4346` +- `compare_disabled_cuts_to_original_four`, `crates/parametric-eq/src/lib.rs:4348-4456` +- `compare_signed_zero_refusal`, `crates/parametric-eq/src/lib.rs:4458-4548` +- `disabled_cuts_general_ramp_parity`, `crates/parametric-eq/src/lib.rs:4828-4894` +- `tiny_disabled_cut_state`, `crates/parametric-eq/src/lib.rs:4906-4944` +- `TAIL`, `crates/parametric-eq/tests/carry.rs:34-35` +- `bank_tail`, `crates/parametric-eq/tests/carry.rs:130-188` +- `refusal_codes`, `crates/protocol/tests/vca_edits.rs:278-297` +- `Refusal`, `crates/protocol/tests/vca_edits.rs:299-304` +- `reset_prepared_activity_observation`, `crates/rack/src/lib.rs:2104-2107` +- `prepared_activity_observation`, `crates/rack/src/lib.rs:2109-2112` +- `Rendered`, `crates/transient-shaper/tests/partition.rs:34-35` +- `FADER_RAMP`, `hosts/host-web/src/tests.rs:7063-7065` +- `live_fader`, `hosts/host-web/src/tests.rs:7067-7097` +- `seek_ride`, `hosts/host-web/src/tests.rs:10269-10297` +- `seek_ride_blocks`, `hosts/host-web/src/tests.rs:10299-10317` +- `MEMBER_DB`, `hosts/host-web/src/tests.rs:10545-10546` +- `OFFSET_DB`, `hosts/host-web/src/tests.rs:10547-10547` +- `MEMBER`, `hosts/host-web/src/tests.rs:10548-10549` +- `CURVE_DB`, `hosts/host-web/src/tests.rs:10550-10554` +- `VCA_DB`, `hosts/host-web/src/tests.rs:10555-10555` +- `HAND_DB`, `hosts/host-web/src/tests.rs:10556-10556` +- `PRIOR_HAND_DB`, `hosts/host-web/src/tests.rs:10557-10557` +- `model`, `hosts/host-web/src/tests.rs:10559-10567` +- `set`, `hosts/host-web/src/tests.rs:10569-10581` +- `frame`, `hosts/host-web/src/tests.rs:10583-10599` +- `applied`, `hosts/host-web/src/tests.rs:10601-10614` +- `live_move_under_hostile_word`, `hosts/host-web/src/tests.rs:10616-10683` +- `automated`, `hosts/host-web/src/tests.rs:10766-10792` +- `benchmark_text_mutation`, `tools/audit/src/fixture_builtins.rs:5752-5763` + +Also: the `rack` `TEST_PREPARED_ACTIVITY_QUERIES` counter and its `#[cfg(test)]` increment in +`PreparedSlot::has_active_lanes` (only the two deleted readers read it); the `parametric-eq` +`carry.rs` `Ramp::name` field (read only by deleted tests; each ramp keeps its name as a comment); +the emptied `host-web` `tests::canonical_live` module. + +Lead, not deleted (the compiler is silent on it): `builtins` `MATRIX_SELECT_FREE_BLOCKS` and +`FUSED_SELECT_FREE_BLOCKS` are `#[cfg(test)]` counters that are now written and never read. + +### Skipped + +- `graph-compiler` `live_routes.rs` `route_control_resources_cover_the_allocation` and + `gate-expander` `contract.rs` `bypass_is_exact_identity_at_all_rates`: TA1 trimmed the first and + TA2 rewrote the second after the measurement, so the measured test no longer exists. Both stay. +- The cover's kept `audit` `rust_disambiguator_suffix_is_narrowly_supported` and `parametric-eq` + `malformed_requests_preserve_output_sentinels_and_opaque_ids`. + +## Survivor gaps + +Placeholder: agent T4S fills this section from its worktree (`codex/batch-test-gaps-ta4`). From 2cd2d69ef0043e3c6e8b84ab242cf77afd8526fa Mon Sep 17 00:00:00 2001 From: BL Date: Tue, 20 Oct 2026 02:11:50 +0000 Subject: [PATCH 08/10] TA4 spec: survivor gaps, the IF-PEER deviation and the builtins counter lead; trim gap-2 Co-Authored-By: Claude Opus 5.5 --- ...TA4-delete-the-measured-redundant-tests.md | 64 +++++++++++++++++-- ...gap-2-remove-test-only-public-functions.md | 10 +-- 2 files changed, 63 insertions(+), 11 deletions(-) diff --git a/.github/ISSUE_SPECS/TBD-TA4-delete-the-measured-redundant-tests.md b/.github/ISSUE_SPECS/TBD-TA4-delete-the-measured-redundant-tests.md index edb575d18..40e958ff3 100644 --- a/.github/ISSUE_SPECS/TBD-TA4-delete-the-measured-redundant-tests.md +++ b/.github/ISSUE_SPECS/TBD-TA4-delete-the-measured-redundant-tests.md @@ -32,9 +32,24 @@ mutation that a `MUTATIONS.md` names. `parametric-eq` `malformed_requests_preserve_output_sentinels_and_opaque_ids` stay; `conformance` `tolerance_boundary_tie_and_snr_cases_are_explicit` and `effect-runtime` `the_mapping_inverse_round_trips` are UNIQUE only on test-only code and go with it (item 4). - (The brief said 6 of 10; the data has 10 IF-PEER-KEPT rows, 2 of them kept by the cover, plus - 2 UNIQUE rows in the cover, so the cover drops 8. Each dropped test's candidate-only mutants are - in code that a kept test catches or that item 4 deletes.) + Deviation from root's brief, which said "delete 6": the data has 10 IF-PEER-KEPT rows. The + cover keeps 2 of them; its other 2 kept tests are UNIQUE rows, not IF-PEER-KEPT. So the cover + drops 8, and all 8 are deleted. Evidence per test (its candidate-only mutants, and who still + catches them): + - `conformance` `scaled_sum_squares_handles_extreme_finite_values` (m9174, m9175, m9176, + m9193) and `block_metrics_and_repeat_bits_cover_boundaries` (m9120, m9121, m9122): every + mutant is in `compare.rs`, which item 4 deletes; `tolerance_boundary_tie_and_snr_cases_are_explicit` + also caught each one. + - `effect-runtime` `mapping_is_exact_at_the_ends_and_monotone`, + `a_logarithmic_mapping_is_constant_ratio` (m17453, m17454) and + `a_degenerate_range_has_no_position` (m17453, m17454, m17480): every mutant is in + `params::map_normalized`/`inverse_map_normalized`, which item 4 deletes; + `the_mapping_inverse_round_trips` also caught each one. + - `audit` `near_name_impostor_does_not_satisfy_probe` and + `exact_probe_path_and_body_boundaries_are_preserved` (m4430): also red in the kept + `rust_disambiguator_suffix_is_narrowly_supported`. + - `parametric-eq` `common_eq_adapter_preserves_input_ownership_capacity_and_refusal_sentinels` + (m35416): also red in the kept `malformed_requests_preserve_output_sentinels_and_opaque_ids`. 3. Keeps every UNIQUE (except item 4), THIN, WEAK and NO-COVERAGE test. 4. Deletes code that only tests call, with its UNIQUE tests. Proof: `git grep` over `crates/`, `hosts/` and `tools/` outside test code finds no caller, and the workspace builds warning-free @@ -428,8 +443,11 @@ Also: the `rack` `TEST_PREPARED_ACTIVITY_QUERIES` counter and its `#[cfg(test)]` `carry.rs` `Ramp::name` field (read only by deleted tests; each ramp keeps its name as a comment); the emptied `host-web` `tests::canonical_live` module. -Lead, not deleted (the compiler is silent on it): `builtins` `MATRIX_SELECT_FREE_BLOCKS` and -`FUSED_SELECT_FREE_BLOCKS` are `#[cfg(test)]` counters that are now written and never read. +Lead for a successor, not fixed here (the compiler does not report it): `builtins` +`MATRIX_SELECT_FREE_BLOCKS` and `FUSED_SELECT_FREE_BLOCKS` (`crates/builtins/src/lib.rs`) are +`#[cfg(test)]` counters that are now written and never read. Their readers were the deleted +`settled_matrix_takes_the_select_free_arm_only_without_an_identity_lane` and +`fused_fader_matrix_takes_the_select_free_arm_only_without_an_identity_lane`. ### Skipped @@ -441,4 +459,38 @@ Lead, not deleted (the compiler is silent on it): `builtins` `MATRIX_SELECT_FREE ## Survivor gaps -Placeholder: agent T4S fills this section from its worktree (`codex/batch-test-gaps-ta4`). +Batch 1 left 21 survivors: viable mutants that no candidate and no covering KEEP test turned red. +Agent T4S classified each one (branch `codex/batch-test-gaps-ta4`, merged here): + +- EQUIVALENT 6: m38090 (rack `BankStage::begin_block` default body), m26403 (lane + `scheduling_barrier`, an empty `asm!`), m26693 (lane scalar select: disjoint bits, so `|` is `^`), + m4419 (audit `vectorization.rs:336`, the next clause catches it), m35318 and m6786 + (`Complex::is_finite` in parametric-eq and builtins responses: a later finite check catches + every non-finite value). +- UNREACHABLE 3: m17240 and m17239 (effect-contract `ExactDecimal::parse`; its one product caller + passes canonical digits only) and m26408 (lane `attest_fp_environment` refusals, which need a + control word that does not read back). m26408 goes to + `TBD-TA4-gap-1-test-the-fp-environment-refusal.md` (a pure decision seam and its test). +- DEAD CODE 7: m9108, m9109, m9111, m9118 (`conformance` `PlanarBlock`, `compare_f32_to_f64`) and + m16329, m16330 (`effect-contract` `map_stepped_normalized`) are in code that item 4 deleted. + m42034 (`source` `validate_output_shape`, reached only through the test-only `read_block`) goes + to `TBD-TA4-gap-2-remove-test-only-public-functions.md`. +- REAL GAP 5, closed by 4 new tests. Each was red with its mutant applied and is green on the branch: + - m18792, gate-expander `tests/state.rs::a_subnormal_gain_word_is_refused` (red at + `state.rs:886`). A restore that stops refusing a subnormal gain word (`normal_or_zero` + dropped or weakened) turns it red; no other test feeds a gain word outside the normal/zero set. + - m41330 and m41333, session-validator + `tests/validate.rs::the_report_labels_each_stage_and_prints_every_message_line` (red at the + label assertion, `validate.rs:487`, and at the multi-line assertion, `:512`). A report that + loses its stage labels or drops message lines turns it red; the other tests only compare two + renders or search stderr for the result line. + - m39691, realtime-policy `tests/policy/drain/forms.rs` row `count-in-an-expression-macro` (red in + `a_count_that_the_rule_cannot_prove_is_refused`). A D7 check that stops seeing a count used + inside a non-assert macro in expression position turns it red. + - m39758, realtime-policy `tests/policy/drain/outer.rs` row + `array-from-fn-after-a-field-named-std` (red in + `a_constructor_that_loops_is_refused_anywhere_in_a_region`). An `array::from_fn` exemption that + matches a path with a single `:` turns it red. + +Successors: `TBD-TA4-gap-1-test-the-fp-environment-refusal.md` and +`TBD-TA4-gap-2-remove-test-only-public-functions.md` (now only the `source` `read_block` item). diff --git a/.github/ISSUE_SPECS/TBD-TA4-gap-2-remove-test-only-public-functions.md b/.github/ISSUE_SPECS/TBD-TA4-gap-2-remove-test-only-public-functions.md index de820aaf6..e5c2b10b3 100644 --- a/.github/ISSUE_SPECS/TBD-TA4-gap-2-remove-test-only-public-functions.md +++ b/.github/ISSUE_SPECS/TBD-TA4-gap-2-remove-test-only-public-functions.md @@ -4,19 +4,19 @@ Found by the TA4 survivor audit: mutants in these functions survive because no p ## Problem -These public functions have no caller outside tests (checked at `b9135008d` with a workspace grep): +This public function has no caller outside tests (checked at `b9135008d` with a workspace grep): -- `conformance::PlanarBlock` and `conformance::compare_f32_to_f64` (`crates/conformance/src/block.rs`, `compare.rs`): only `crates/conformance`'s own tests use them. - `source::PcmSourceConsumer::read_block` and its `validate_output_shape` (`crates/source/src/lib.rs`): only `crates/source`'s unit tests and `tests/` call them; the render path reads a source through `begin_block_at` and its played planes (`crates/graph/src/runtime.rs`, `crates/host-core/src/source.rs`). -- `effect_contract::map_stepped_normalized` (`crates/effect-contract/src/lib.rs`): only `crates/conformance/tests/effect_contract.rs` calls it. + +TA4 (`TBD-TA4-delete-the-measured-redundant-tests.md`, item 4) already deleted the other items the survivor audit found: `conformance::PlanarBlock` and `compare_f32_to_f64` (survivors m9108, m9109, m9111, m9118) and the `effect_contract` `map_stepped_normalized` family (m16329, m16330). What is left is the source item above (m42034). Dead public code carries tests and review cost and hides real gaps from mutation testing. ## Smallest closable slice -For each item, either delete it with the tests that only test it, or name the product caller that should use it and open an issue for that. Delete nothing a fuzz target, an ABI pin or a wire format uses. +Either delete it with the tests that only test it, or name the product caller that should use it and open an issue for that. Delete nothing a fuzz target, an ABI pin or a wire format uses. ## Gates -1. A workspace grep shows no remaining test-only public function from the list above, or the issue names the product caller for each that is kept. +1. A workspace grep shows that `read_block` and `validate_output_shape` are gone, or the issue names the product caller that keeps them. 2. `cargo test --workspace --all-features` and `scripts/check-workspace-policy.sh` are green. From afe447e308cfc500ee43c6ab07af371b5f4e2439 Mon Sep 17 00:00:00 2001 From: BL Date: Tue, 20 Oct 2026 02:40:56 +0000 Subject: [PATCH 09/10] Fold the TA4 verifier's fixes: restore the bank-window reproducers and the rack count claim; reword catchers and ceilings Co-Authored-By: Claude Opus 5.5 --- ...unning-browser-session-in-the-rust-host.md | 2 +- ...-source-ring-by-the-warm-prime-headroom.md | 2 +- ...ed-send-gain-mute-and-matrix-automation.md | 2 +- ...overlays-and-edit-ramps-in-the-capi-row.md | 7 +- ...TA4-delete-the-measured-redundant-tests.md | 63 ++++-- ...4-gap-1-test-the-fp-environment-refusal.md | 4 + crates/builtins/tests/MUTATIONS.md | 10 +- crates/compressor/tests/MUTATIONS.md | 16 +- crates/delay/tests/MUTATIONS.md | 8 +- crates/effect-runtime/tests/MUTATIONS.md | 4 +- crates/graph-compiler/tests/MUTATIONS.md | 12 +- crates/graph/src/program.rs | 4 +- crates/graph/src/program/tests.rs | 179 ++++++++++++++++++ crates/graph/tests/MUTATIONS.md | 12 +- crates/lane/tests/MUTATIONS.md | 6 +- crates/parametric-eq/tests/MUTATIONS.md | 20 +- crates/protocol/tests/MUTATIONS.md | 2 +- crates/rack/src/lib.rs | 148 +++++++++++++++ crates/soft-clip/tests/MUTATIONS.md | 6 +- crates/transient-shaper/tests/MUTATIONS.md | 4 +- crates/true-peak-limiter/tests/MUTATIONS.md | 10 +- docs/C_ABI_V1_QUALIFICATION.md | 2 +- hosts/host-web/MUTATIONS.md | 6 +- 23 files changed, 443 insertions(+), 86 deletions(-) diff --git a/.github/ISSUE_SPECS/1290-replace-the-running-browser-session-in-the-rust-host.md b/.github/ISSUE_SPECS/1290-replace-the-running-browser-session-in-the-rust-host.md index 1eb81aeeb..bb5e32f49 100644 --- a/.github/ISSUE_SPECS/1290-replace-the-running-browser-session-in-the-rust-host.md +++ b/.github/ISSUE_SPECS/1290-replace-the-running-browser-session-in-the-rust-host.md @@ -366,7 +366,7 @@ now only through the test-support switch `structural_command_for_test` (the refu **Gates -> tests** (`cargo test --locked -p host-web --features host-web/test-support`): - gate 1: `tests::structural_apply::a_rebuild_swaps_without_a_gap` -- gate 2: `a_live_edit_is_part_of_the_base_the_successor_is_prepared_from` (deleted by TA4; KEEP catcher host-web `tests::structural_apply::a_master_designated_after_an_empty_boot_reads_as_a_boot_designation`) (the ramp is in flight +- gate 2: `a_live_edit_is_part_of_the_base_the_successor_is_prepared_from` (deleted by TA4) (the ramp is in flight at the adoption block) - gate 3: `a_malformed_transaction_is_refused_and_changes_nothing`, `a_rate_or_quantum_change_is_refused_as_a_required_reprepare`, diff --git a/.github/ISSUE_SPECS/1406-grow-the-default-source-ring-by-the-warm-prime-headroom.md b/.github/ISSUE_SPECS/1406-grow-the-default-source-ring-by-the-warm-prime-headroom.md index df1f3cbb1..03964d061 100644 --- a/.github/ISSUE_SPECS/1406-grow-the-default-source-ring-by-the-warm-prime-headroom.md +++ b/.github/ISSUE_SPECS/1406-grow-the-default-source-ring-by-the-warm-prime-headroom.md @@ -160,7 +160,7 @@ engine, the published ABI layout, the SDK and the browser host derive the same r `hosts/host-web/web/miso-engine-v1-audio-worklet-host.d.ts` and `sdk/src/browser/shipped-host.d.ts` (the ring comments only), `scripts/test-web-audioworklet.mjs` (gate 4's case at `:1103-1128` only) -- `hosts/host-web/src/tests.rs` (`default_ring_covers_stall_tolerance` (deleted by TA4; KEEP catcher host-core `prepare::default_ring_derivation_covers_the_stall_and_two_in_flight_quanta`) and the doc comment of +- `hosts/host-web/src/tests.rs` (`default_ring_covers_stall_tolerance` (deleted by TA4) and the doc comment of `ring_prefill_survives_stall` only), `hosts/host-web/MUTATIONS.md` (rows 7 and 8 only) - `hosts/host-web/src/lib.rs` (the doc comment of the ring override field only), `hosts/host-web/DEPLOYMENT.md` (the ring sentence only), diff --git a/.github/ISSUE_SPECS/1654-render-stored-send-gain-mute-and-matrix-automation.md b/.github/ISSUE_SPECS/1654-render-stored-send-gain-mute-and-matrix-automation.md index 00c9436aa..dcbc2527f 100644 --- a/.github/ISSUE_SPECS/1654-render-stored-send-gain-mute-and-matrix-automation.md +++ b/.github/ISSUE_SPECS/1654-render-stored-send-gain-mute-and-matrix-automation.md @@ -729,7 +729,7 @@ Gates (all green), with red-without-the-feature evidence (once each): - Gate 4: capi `a_hand_send_mute_ors_with_its_curve_on_the_c_abi`; host-web `a_hand_send_mute_ors_with_its_curve_on_both_hosts`. Red with the curve replacing the static mute (not ORed): "the hand mute shuts the send while the curve is open". -- Gate 5: capi `an_output_route_entry_is_refused_on_the_c_abi` (deleted by TA4; KEEP catcher graph `program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers`); host-web +- Gate 5: capi `an_output_route_entry_is_refused_on_the_c_abi` (deleted by TA4); host-web `an_output_route_entry_is_refused_alike_on_both_hosts` (one diagnostic, `control.automation.target`). - Gate 6: zero render allocations in host-core gates 1, 2 and 7 (`bench_support::alloc` thread diff --git a/.github/ISSUE_SPECS/1696-charge-the-monitor-overlays-and-edit-ramps-in-the-capi-row.md b/.github/ISSUE_SPECS/1696-charge-the-monitor-overlays-and-edit-ramps-in-the-capi-row.md index 8d0ad8784..02569d38b 100644 --- a/.github/ISSUE_SPECS/1696-charge-the-monitor-overlays-and-edit-ramps-in-the-capi-row.md +++ b/.github/ISSUE_SPECS/1696-charge-the-monitor-overlays-and-edit-ramps-in-the-capi-row.md @@ -65,8 +65,7 @@ hosts charge the same, because the row is computed once, in the core. (`assert_capi_retained_bytes_are_complete`, `:867`; driver `:995`). It observes the compile of one session; it never populates a solo, a master or a pending candidate, so a term that the commit path adds later is outside it. The browser's ceilings are - `hosts/host-web/tests/retained_ceilings.rs` (deleted by TA4: batch 1 measured both its tests - redundant) and `tests/browser-v1/expected.json` + `hosts/host-web/tests/retained_ceilings.rs` (deleted by TA4) and `tests/browser-v1/expected.json` (`resourceCeilings`, `:69`). ## Decisions to take (the implementer proposes, the coordinator rules) @@ -142,8 +141,8 @@ hosts charge the same, because the row is computed once, in the core. 2. The existing exact equality `capi_retained_bytes == observed terms` still holds on every fixture, with the new term added to the right-hand side as an observed value. 3. The same session on the browser: `WebResourceReport` reads the same core charge; the - `retained_ceilings.rs` budgets (deleted by TA4) and `check-browser-expected-resources.py` pass with the moved - rows re-pinned from measurement, each with its reason. + `check-browser-expected-resources.py` ceilings pass with the moved rows re-pinned from + measurement, each with its reason. (`retained_ceilings.rs` was deleted by TA4: the shipped wasm32 artifact's ceilings stay in `expected.json` (checked by `check-browser-expected-resources.py`); the deleted file ceilinged only the native 8- and 4-lane builds, which do not ship.) 4. A control plane at the exact `maximum_control_retained_bytes` that the session needs without the overlay is refused when the overlay is populated, on both hosts, with the typed resource code, and accepted with the limit raised by the charge. diff --git a/.github/ISSUE_SPECS/TBD-TA4-delete-the-measured-redundant-tests.md b/.github/ISSUE_SPECS/TBD-TA4-delete-the-measured-redundant-tests.md index 40e958ff3..afae0573c 100644 --- a/.github/ISSUE_SPECS/TBD-TA4-delete-the-measured-redundant-tests.md +++ b/.github/ISSUE_SPECS/TBD-TA4-delete-the-measured-redundant-tests.md @@ -20,13 +20,26 @@ KEEP tests. 392 mutants, 292 viable, 21 survivors. - UNIQUE: at least one mutant only this test caught. THIN, WEAK, NO-COVERAGE: too few tries or catches to judge. +MEASURED-REDUNDANT cannot see allocation, count or ceiling claims; tests whose claim is one of these +are kept or restored. The verifier's review restored three such tests (below, "Restored"). The +deleted capi `set_control::automated_vca` tests (`a_vca_move_over_an_automated_member_is_live_and_renders_the_prepared_plan`, +`vca_reach_and_count_changes_over_an_automated_member_are_live`, through the deleted helper `case`), +`set_control::automated_hand_move::a_hand_move_on_an_automated_fader_is_live_and_renders_the_stored_offset` +(through the deleted helper `leg`) and `set_control::automated_carry::an_exact_unmute_that_frees_a_held_lane_discharges_the_owed_move` +also asserted that every render block after the live edit makes 0 allocations and 0 frees on the +C ABI (`bench_support::alloc` thread counters). The same render path still has its allocation +counts in host-core: `tests/stored_vca_automation.rs` (`rig.allocations == (0, 0)` on the render +thread in its VCA ride, mute and carry tests) and `tests/stored_fader_automation.rs` +(`rendering_fader_events_allocates_nothing`, and the carry runs' swap-block counts). + "Redundant" means: no mutant of the sample needs this test. It is not a proof over all mutants, and the KEEP catchers below are the recorded catchers of the sampled mutants, not of every row mutation that a `MUTATIONS.md` names. ## What this change does -1. Deletes the 140 MEASURED-REDUNDANT tests that still exist as measured (2 skipped, below). +1. Deletes 137 of the 142 MEASURED-REDUNDANT tests: 2 no longer exist as measured and 3 are + restored after review (both below, "Skipped" and "Restored"). 2. Deletes the 8 REDUNDANT-IF-PEER-KEPT tests that the greedy cover drops. The cover keeps 4: `audit` `vectorization::tests::rust_disambiguator_suffix_is_narrowly_supported` and `parametric-eq` `malformed_requests_preserve_output_sentinels_and_opaque_ids` stay; @@ -82,8 +95,9 @@ mutation that a `MUTATIONS.md` names. clippy `--all-targets --all-features`), looped until it reported nothing. No `#[allow(dead_code)]` was added. Test files left with no test are deleted whole. 6. Updates the references: each `MUTATIONS.md` row or doc line that names a deleted test now says - "deleted by TA4" and names the KEEP catcher batch 1 recorded for that test's mutants, and each - such `MUTATIONS.md` ends with a "TA4 deletions" list. Open specs that name a deleted test or file + "deleted by TA4". It names a KEEP catcher only where batch 1 recorded that catcher red on the + deleted test's mutants in the same crate and it can plausibly see the row's mutation; otherwise + it names none. Each such `MUTATIONS.md` ends with a "TA4 deletions" list. Open specs that name a deleted test or file (#1290, #1350, #1406, #1654, #1696, #1722) say so in place. ## Non-goals @@ -106,7 +120,7 @@ Line numbers are at `b9135008d`. Each test lists the number of sampled mutants i KEEP tests that were also red on them (count per catcher; "other candidates only" are the cover's peers, "timeout" is a 20-minute KEEP run counted as caught). -### Deleted tests (153, 7,175 lines) +### Deleted tests (150, 6,905 lines) #### audit @@ -231,8 +245,6 @@ peers, "timeout" is a 20-minute KEEP run counted as caught). - `tests::delay_is_exact_and_lane_independent`, `crates/graph/src/lib.rs:7412-7420`; 4 caught: `graph lib runtime::tests::a_successor_line_continues_the_predecessors_pending_samples_head_aligned` (4) - `tests::binding_rejects_duplicates_and_returns_all_ownership`, `crates/graph/src/lib.rs:7421-7434`; 3 caught: `graph lib program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers` (2); `graph lib program::tests::delayed_edge_gets_staging_buffer_and_blocks_in_place` (1) -- `program::tests::a_bank_window_never_recycles_a_physical_slot`, `crates/graph/src/program/tests.rs:1319-1393`; 10 caught: `graph lib program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers` (5); `graph lib program::tests::delayed_edge_gets_staging_buffer_and_blocks_in_place` (3); `graph lib program::tests::bank_window_hoisting_preserves_dataflow_on_random_graphs` (1); `graph lib program::tests::a_delayed_stage_boundary_is_not_elided` (1) -- `program::tests::no_slot_is_recycled_inside_a_merged_bank_window`, `crates/graph/src/program/tests.rs:1395-1455`; 7 caught: `graph lib program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers` (4); `graph lib program::tests::delayed_edge_gets_staging_buffer_and_blocks_in_place` (2); `graph lib program::tests::a_delayed_stage_boundary_is_not_elided` (1) - `runtime::tests::every_lane_width_matches_the_scalar_reference_on_hostile_values`, `crates/graph/src/runtime.rs:12429-12432`; 4 caught: `graph lib runtime::tests::a_host_plane_reduction_is_the_arena_reduction_bit_for_bit` (3); `graph lib runtime::tests::negative_zero_survives_every_reduction_group_edge` (1) #### graph-compiler @@ -299,10 +311,6 @@ peers, "timeout" is a 20-minute KEEP run counted as caught). - `set_control_writes_exactly_the_field_its_address_names`, `crates/protocol/tests/edit_ramps.rs:776-814`; 3 caught: `host-web lib tests::structural_apply::a_master_designated_after_an_empty_boot_reads_as_a_boot_designation` (1); `protocol console_session_edits::a_slot_set_change_that_skips_a_track_refuses_whole` (1); `session json_grammar::u64_decimal_strings_cover_full_domain_and_reject_noncanonical_forms` (1) - `vca_refusals_commit_nothing`, `crates/protocol/tests/vca_edits.rs:306-526`; 3 caught: `host-web control_parity::a_vca_move_over_an_automated_member_is_live_alike_on_both_hosts` (1); `protocol console_session_edits::a_slot_set_change_that_skips_a_track_refuses_whole` (1); `protocol submix_strip_edits::every_strip_opcode_edits_a_submix` (1) -#### rack - -- `tests::prepared_slot_dispatch_uses_constant_activity_checks`, `crates/rack/src/lib.rs:5000-5133`; 4 caught: `rack lib tests::disengaging_copies_the_prefixs_state_once` (1); `console-workload paired_spans::the_limiter_bank_renders_the_dual_bits_in_every_scenario` (1); `rack lib tests::a_fully_folded_full_bank_offers_its_resident_block_before_writing_staging` (1); `rack lib tests::a_partial_agreement_slot_declines_the_collapse` (1) - #### realtime-policy - `binary::two_arguments_exit_two`, `tools/realtime-policy/tests/policy/binary.rs:29-37`; 4 caught: `realtime-policy policy::binary::a_root_with_a_missing_scan_root_exits_one` (1); `realtime-policy policy::run::a_valid_tree_exits_zero_and_prints_the_success_line` (1); `realtime-policy policy::boundary::a_boundary_finding_names_the_marker_line` (1); `realtime-policy policy::boundary::a_marker_inside_an_attribute_is_refused` (1) @@ -355,12 +363,13 @@ peers, "timeout" is a 20-minute KEEP run counted as caught). - `crates/soft-clip/tests/partition_invariance.rs` (118), `crates/source/tests/seek_schedule_model.rs` (533), `hosts/host-web/tests/retained_ceilings.rs` (294), `tools/session-validator/tests/skill.rs` (111): every test in them is listed above; their helpers go with them. `retained_ceilings.rs` - held the native budgets of the browser identity fixture; the browser rows keep their ceilings in - `tests/browser-v1/expected.json` (`check-browser-expected-resources.py`). host-web's `lane` + held the native budgets of the browser identity fixture: the shipped wasm32 artifact's ceilings + stay in `expected.json` (checked by `check-browser-expected-resources.py`); the deleted file + ceilinged only the native 8- and 4-lane builds, which do not ship. host-web's `lane` dev-dependency served only it and the deleted `canonical_live` module, so it goes too (`Cargo.lock` loses that edge). -### Deleted helpers (compiler-reported, 75 items, 2,088 lines) +### Deleted helpers (compiler-reported, 71 items, 2,041 lines) - `Command`, `crates/builtins/tests/stage.rs:860-883` - `automation_script`, `crates/builtins/tests/stage.rs:885-960` @@ -393,8 +402,6 @@ peers, "timeout" is a 20-minute KEEP run counted as caught). - `taps`, `crates/graph-compiler/tests/compile_shapes.rs:376-386` - `representative_console`, `crates/graph-compiler/tests/compile_shapes.rs:388-469` - `assert_estimate_moves_by_the_route_activity_charge`, `crates/graph-compiler/tests/route_coefficients.rs:544-578` -- `dynamic_track`, `crates/graph/src/program/tests.rs:720-751` -- `dynamic_effect`, `crates/graph/src/program/tests.rs:753-759` - `assert_width_matches_reference`, `crates/graph/src/runtime.rs:12313-12427` - `compare_holey_population`, `crates/lane/tests/fader_matrix.rs:430-502` - `run_scalar`, `crates/lane/tests/fader_matrix.rs:510-543` @@ -416,8 +423,6 @@ peers, "timeout" is a 20-minute KEEP run counted as caught). - `bank_tail`, `crates/parametric-eq/tests/carry.rs:130-188` - `refusal_codes`, `crates/protocol/tests/vca_edits.rs:278-297` - `Refusal`, `crates/protocol/tests/vca_edits.rs:299-304` -- `reset_prepared_activity_observation`, `crates/rack/src/lib.rs:2104-2107` -- `prepared_activity_observation`, `crates/rack/src/lib.rs:2109-2112` - `Rendered`, `crates/transient-shaper/tests/partition.rs:34-35` - `FADER_RAMP`, `hosts/host-web/src/tests.rs:7063-7065` - `live_fader`, `hosts/host-web/src/tests.rs:7067-7097` @@ -438,8 +443,7 @@ peers, "timeout" is a 20-minute KEEP run counted as caught). - `automated`, `hosts/host-web/src/tests.rs:10766-10792` - `benchmark_text_mutation`, `tools/audit/src/fixture_builtins.rs:5752-5763` -Also: the `rack` `TEST_PREPARED_ACTIVITY_QUERIES` counter and its `#[cfg(test)]` increment in -`PreparedSlot::has_active_lanes` (only the two deleted readers read it); the `parametric-eq` +Also: the `parametric-eq` `carry.rs` `Ramp::name` field (read only by deleted tests; each ramp keeps its name as a comment); the emptied `host-web` `tests::canonical_live` module. @@ -449,6 +453,27 @@ Lead for a successor, not fixed here (the compiler does not report it): `builtin `settled_matrix_takes_the_select_free_arm_only_without_an_identity_lane` and `fused_fader_matrix_takes_the_select_free_arm_only_without_an_identity_lane`. +### Restored after review + +The TA4 verifier (READY WITH FIXES) restored these exactly as at `b9135008d`: + +- `graph` `program::tests::a_bank_window_never_recycles_a_physical_slot` (the #169 minimal + reproduction; a regression reproducer is never-delete) and + `no_slot_is_recycled_inside_a_merged_bank_window`, with their helpers `dynamic_track` and + `dynamic_effect` (`crates/graph/src/program/tests.rs`), and the `program.rs` doc line that cites + the first. +- `rack` `tests::prepared_slot_dispatch_uses_constant_activity_checks` (a count claim: the dispatch + makes a constant number of activity checks, which mutation cannot see), with the `#[cfg(test)]` + `TEST_PREPARED_ACTIVITY_QUERIES` counter, its increment in `PreparedSlot::has_active_lanes` and + its readers `reset_prepared_activity_observation` and `prepared_activity_observation`. + +### The browser hostile-FP live gate + +TA4 deleted host-web `tests::canonical_live::a_live_fader_and_vca_move_under_a_hostile_caller_word_render_the_canonical_bits` +(#1709 D2). The capi test of the same name stays (`crates/capi/src/runtime/live_tests.rs:8158`), +so the browser side of that check is gone. `TBD-TA4-gap-1-test-the-fp-environment-refusal.md` +records it in case the owner wants the browser side back. + ### Skipped - `graph-compiler` `live_routes.rs` `route_control_resources_cover_the_allocation` and diff --git a/.github/ISSUE_SPECS/TBD-TA4-gap-1-test-the-fp-environment-refusal.md b/.github/ISSUE_SPECS/TBD-TA4-gap-1-test-the-fp-environment-refusal.md index d930ba2e9..f431ecb73 100644 --- a/.github/ISSUE_SPECS/TBD-TA4-gap-1-test-the-fp-environment-refusal.md +++ b/.github/ISSUE_SPECS/TBD-TA4-gap-1-test-the-fp-environment-refusal.md @@ -15,3 +15,7 @@ Split the decision out of the hardware access: a pure function that takes the th 1. A unit test in `crates/lane` calls the pure function with a readback whose control bits differ from the canonical word and gets `CanonicalWordRefused`; with a `restored` word that differs from `observed` it gets `RestoreRefused`; with matching words it gets `Ok`. 2. The mutant `attest_fp_environment -> Ok(())` is red, measured once (PR evidence, not a committed test). 3. No rendered bit moves; `cargo test -p lane -p host-core` is green. + +## Related: the browser side of the hostile-FP live gate + +TA4 deleted host-web `tests::canonical_live::a_live_fader_and_vca_move_under_a_hostile_caller_word_render_the_canonical_bits` (#1709 D2, browser); the capi test of the same name stays (`crates/capi/src/runtime/live_tests.rs:8158`), so only the C ABI side of that check remains. If the owner wants the browser side back, restore it from `b9135008d` (`hosts/host-web/src/tests.rs`) with the `lane` test-support dev-dependency. diff --git a/crates/builtins/tests/MUTATIONS.md b/crates/builtins/tests/MUTATIONS.md index cfbf0fd14..5ce51eaa5 100644 --- a/crates/builtins/tests/MUTATIONS.md +++ b/crates/builtins/tests/MUTATIONS.md @@ -220,7 +220,7 @@ settled dispatch witness and signed-zero law, plus `matrix2x2_block` otherwise; both settled call sites (the `maximum == 0` block and the post-ramp tail) go through it. The gates: -- gate 2, `tests::settled_matrix_takes_the_select_free_arm_only_without_an_identity_lane` (deleted by TA4; KEEP catcher builtins `randomized::the_banks_render_their_scalar_sections_under_random_retargets`) +- gate 2, `tests::settled_matrix_takes_the_select_free_arm_only_without_an_identity_lane` (deleted by TA4) (`src/tests.rs`): the `#[cfg(test)]` witness `MATRIX_SELECT_FREE_BLOCKS` counts the arm per settled segment, at W8, W4 and the scalar stage; - gate 3, `settled_matrix_shapes_render_the_base_bits` (`tests/matrix.rs`): one SHA-256 over every @@ -285,7 +285,7 @@ its own settled check: `BuiltinFaderBank::try_process_settled_with_matrix` at `S `FaderMuteRampBuiltins::process_fader_matrix` and `BuiltinChain::process_dual_mono`. The gates: - gate 1 (lane), in `crates/lane/tests/MUTATIONS.md`; -- the dispatch witness, `tests::fused_fader_matrix_takes_the_select_free_arm_only_without_an_identity_lane` (deleted by TA4; KEEP catcher builtins `tests::full_public_chain_matches_the_three_section_reference`) +- the dispatch witness, `tests::fused_fader_matrix_takes_the_select_free_arm_only_without_an_identity_lane` (deleted by TA4) (`src/tests.rs`): the `#[cfg(test)]` counter `FUSED_SELECT_FREE_BLOCKS` counts the arm per fused call at W8, W4 and both scalar sites, over identity members, partial banks, instant retargets to and from the identity, and ramps that decline the fused call; @@ -370,7 +370,7 @@ either half refused the commit. ## TA4 deletions -The 2026-10 test audit (TA4, batch 1 mutation measurement at `81a3074fc`) deleted the tests named below. Each one's caught mutants were also red in the KEEP test named beside it. That is the recorded catcher of the deleted test's sampled mutants; the mutation of each row above was not re-run. +The 2026-10 test audit (TA4, batch 1 mutation measurement at `81a3074fc`) deleted the tests named below. Where a KEEP test is named, batch 1 recorded it red on that test's sampled mutants in this crate; the mutation of each row above was not re-run. Where none is named, batch 1 recorded no same-crate catcher that could plausibly see the row's mutation. -- `settled_matrix_takes_the_select_free_arm_only_without_an_identity_lane`: builtins `randomized::the_banks_render_their_scalar_sections_under_random_retargets` -- `fused_fader_matrix_takes_the_select_free_arm_only_without_an_identity_lane`: builtins `tests::full_public_chain_matches_the_three_section_reference` +- `settled_matrix_takes_the_select_free_arm_only_without_an_identity_lane`: no plausible same-crate KEEP catcher recorded +- `fused_fader_matrix_takes_the_select_free_arm_only_without_an_identity_lane`: no plausible same-crate KEEP catcher recorded diff --git a/crates/compressor/tests/MUTATIONS.md b/crates/compressor/tests/MUTATIONS.md index 557deab94..0b5b71fbd 100644 --- a/crates/compressor/tests/MUTATIONS.md +++ b/crates/compressor/tests/MUTATIONS.md @@ -212,7 +212,7 @@ Driver: one mutation at a time, `CARGO_INCREMENTAL=0 cargo test --locked -p comp | # | mutation | red | |---|---|---| | 981-M1 | the recursive words are never written back to their channels | gate 1, `scenario_981_heterogeneous_hostile_render_is_pinned`, `cross_target`, and 22 more tests across `conformance`, `identity`, `lane_identity`, `mono_collapse`, `nonfinite`, `observation`, `oracle`, `partition` and `ramps` (27 red) | -| 981-M2 | `start` is ignored: the settled slice begins at frame 0 | gate 1, `scenario_981_*`, `cross_target`, `lane_identity::bank_matches_scalar_per_lane_bits` (deleted by TA4; KEEP catcher lane `sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts`), `partition::block_partitions_are_invariant`, `partition::bank_block_partitions_are_invariant`, and three `ramps` tests (12 red) | +| 981-M2 | `start` is ignored: the settled slice begins at frame 0 | gate 1, `scenario_981_*`, `cross_target`, `lane_identity::bank_matches_scalar_per_lane_bits` (deleted by TA4), `partition::block_partitions_are_invariant`, `partition::bank_block_partitions_are_invariant`, and three `ramps` tests (12 red) | | 981-M3 | every detector takes `settled_main`, so `Silent` and `Sidechain` blocks read the main input | gate 1 (its `Silent` and `Sidechain` cases under a quiet main), `contract::links_are_exact_and_connected_sidechain_is_distinct_from_main_detection`, `nonfinite::a_nan_in_the_sidechain_alone_is_clamped_to_the_level_floor` (6 red). Neither `causality` nor `partition::linked_sidechain_partitions_are_invariant` went red, which is why the grid carries the sidechain cases | | 981-M4 | the right channel's `one_frame` updates the left recursive word (`&mut gain_left`), the verification's replacement for "right before left" | gate 1, `scenario_981_*`, `cross_target`, `lane_identity`, four `mono_collapse` tests, two `nonfinite`, `observation`, `oracle` and two `ramps` tests (17 red) | @@ -230,7 +230,7 @@ differentials see dispatch as well as bits. | # | mutation | red | |---|---|---| -| 982-M1 | the arm ignores `bypass` | `identity::bypass_preserves_exact_dry_bits_at_sample_zero` (deleted by TA4; KEEP catcher lane `sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts`), gate 1 (`the_all_wet_arm_is_the_base_body_on_all_wet_tables`, the three differentials), gate 3, `conformance`, `contract::every_launch_rate_processes_scalar_and_supported_bank_at_zero_latency`, `mono_collapse::a_statically_bypassed_bank_collapses_to_the_dual_bits` (9 red) | +| 982-M1 | the arm ignores `bypass` | `identity::bypass_preserves_exact_dry_bits_at_sample_zero` (deleted by TA4), gate 1 (`the_all_wet_arm_is_the_base_body_on_all_wet_tables`, the three differentials), gate 3, `conformance`, `contract::every_launch_rate_processes_scalar_and_supported_bank_at_zero_latency`, `mono_collapse::a_statically_bypassed_bank_collapses_to_the_dual_bits` (9 red) | | 982-M2 | the arm is taken when any lane is wet (`mask_any`) | gate 1 on the mixed corpus banks (`the_settled_body_is_the_base_body_on_the_corpus_table`, `randomized_differential_simd4`/`_simd8`), gate 3, `scenario_981_*`, `cross_target`, `lane_identity::every_width_produces_the_same_words` (7 red) | | 982-M3 | the arm drops `+ makeup` | gate 1, `scenario_982_all_wet_render_is_pinned`, `cross_target` (its `f32` lane 7 has mix 1 and makeup 6), `lane_identity::every_width_produces_the_same_words` (7 red). `oracle` stays green, as the verification found | | 982-M4 | the arm is never taken | gate 3 (`the_all_wet_arm_is_taken_exactly_when_every_lane_is_wet`) and gate 1's dispatch assertion (5 red). No bit-exactness test can see it: it is a performance-only regression | @@ -246,7 +246,7 @@ frames with ramps ending at frame 40. | # | mutation | red | |---|---|---| | 983-M1 | pass 2 reads `targets[k + 1]` (`targets.iter().cycle().skip(1)`) | gate 1, all three scenarios, `cross_target`, `partition` (both), `lane_identity`, four `mono_collapse`, `conformance`, `contract` and two `ramps` tests (20 red) | -| 983-M2 | the last, short chunk is skipped (`chunks_exact_mut` on the outer loop) | gate 1, all three scenarios, `cross_target`, `partition::block_partitions_are_invariant` (deleted by TA4; KEEP catcher lane `fader_matrix::select_free_fused_fader_matrix_matches_both_oracles_when_no_lane_is_identity`), `partition::bank_block_partitions_are_invariant`, `conformance`, `contract` (13 red) | +| 983-M2 | the last, short chunk is skipped (`chunks_exact_mut` on the outer loop) | gate 1, all three scenarios, `cross_target`, `partition::block_partitions_are_invariant` (deleted by TA4), `partition::bank_block_partitions_are_invariant`, `conformance`, `contract` (13 red) | | 983-M3 | pass 1 runs only for the first chunk; later chunks reuse its targets | gate 1, all three scenarios, `cross_target`, `partition` (both), `lane_identity`, `conformance` and three `ramps` tests (16 red) | | 983-M4 | `gl` and `gr` swapped in pass 2 | gate 1, all three scenarios, `cross_target`, `lane_identity`, two `nonfinite`, `conformance` and two `ramps` tests (15 red) | | 984-M1 | the `abs` arm is taken for every link mode | gate 1, all three scenarios, `cross_target` (`maximum_link`, `average_link`), `identity::average_link_is_two_products_and_an_add`, `contract::links_are_exact_and_connected_sidechain_is_distinct_from_main_detection` (11 red) | @@ -337,7 +337,7 @@ Driver as for #981-#985, dev profile, one mutation at a time on a scratch copy. | # | mutation | red | |---|---|---| | 1006-M1 | the `remaining == 0` hold dropped: a ramp at rest takes its target, as on its last sample | `randomized_differential_simd4`/`_simd8` (their payload restores at `remaining = 0`), both #1006 scenarios (4 red) | -| 1006-M3 | the output ramps (attack, release, makeup, mix) advanced in pass 1 as well, the brief's "attack in pass 1" | gate 1, both #1006 scenarios, `partition::block_partitions_are_invariant` (deleted by TA4; KEEP catcher lane `fader_matrix::select_free_fused_fader_matrix_matches_both_oracles_when_no_lane_is_identity`), `payload::an_active_attack_restore_*`, `ramps::an_attack_cancel_to_current_*`, `native_points`, `cross_target`, two `mono_collapse` tests and `ramps::a_both_channel_point_on_every_bank_lane_*` (`bench_ramp`'s preflight until #1027 ported it) (16 red) | +| 1006-M3 | the output ramps (attack, release, makeup, mix) advanced in pass 1 as well, the brief's "attack in pass 1" | gate 1, both #1006 scenarios, `partition::block_partitions_are_invariant` (deleted by TA4), `payload::an_active_attack_restore_*`, `ramps::an_attack_cancel_to_current_*`, `native_points`, `cross_target`, two `mono_collapse` tests and `ramps::a_both_channel_point_on_every_bank_lane_*` (`bench_ramp`'s preflight until #1027 ported it) (16 red) | | 1006-M5 | the wet arm taken while a mix ramp is open (both bodies) | gate 1 (its witness and its bits), both #1006 scenarios, `partition`, `lane_identity::every_width_produces_the_same_words`, `cross_target` (9 red) | | 1006-M6 | the words scattered from before the prefix (the dual prefix's word write-back dropped) | gate 1, `scenario_981`, `982`, `983` and `1006`, the bank scenario, #982's witness gate, `cross_target`, two `ramps` tests, `mono_collapse` (16 red) | | 1006-M7 | the collapsed prefix skips the curve redesign on a moved lane | gate 1, `scenario_985`, `scenario_1006`, the bank scenario, two `mono_collapse` tests (11 red) | @@ -376,9 +376,9 @@ preservation gate for widths the rule must not move, not a red gate. ## TA4 deletions -The 2026-10 test audit (TA4, batch 1 mutation measurement at `81a3074fc`) deleted the tests named below. Each one's caught mutants were also red in the KEEP test named beside it. That is the recorded catcher of the deleted test's sampled mutants; the mutation of each row above was not re-run. +The 2026-10 test audit (TA4, batch 1 mutation measurement at `81a3074fc`) deleted the tests named below. Where a KEEP test is named, batch 1 recorded it red on that test's sampled mutants in this crate; the mutation of each row above was not re-run. Where none is named, batch 1 recorded no same-crate catcher that could plausibly see the row's mutation. - `the_collapsed_body_renders_the_dual_bodys_left_plane`: compressor `mono_collapse::mono_reopen_drives_the_next_render_from_the_copied_state` -- `bank_matches_scalar_per_lane_bits`: lane `sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` -- `block_partitions_are_invariant`: lane `fader_matrix::select_free_fused_fader_matrix_matches_both_oracles_when_no_lane_is_identity` -- `bypass_preserves_exact_dry_bits_at_sample_zero`: lane `sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` +- `bank_matches_scalar_per_lane_bits`: no plausible same-crate KEEP catcher recorded +- `block_partitions_are_invariant`: no plausible same-crate KEEP catcher recorded +- `bypass_preserves_exact_dry_bits_at_sample_zero`: no plausible same-crate KEEP catcher recorded diff --git a/crates/delay/tests/MUTATIONS.md b/crates/delay/tests/MUTATIONS.md index be6d0a0f3..2d3dad0f1 100644 --- a/crates/delay/tests/MUTATIONS.md +++ b/crates/delay/tests/MUTATIONS.md @@ -32,8 +32,8 @@ Mutations are listed in the order the gates appear in the issue-#93 plan's eval | M14 | G5 vacuity | `corpus::run_case` reports zeros instead of what it rendered | `corpus_cases_are_finite_distinct_and_alive` | `case dual_mono is silent` -- the guard that stops a vacuous digest passing | | M15 | E10 | `bind_homogeneous_bank` answers `Ok(None)` before validating its members | `bank_fallback_validates_every_member` | a malformed member is accepted instead of rejected | | M16 | E3 oracle | the oracle's `damping_coefficient` returns `G` instead of `G / (1 + G)` | `damped_matrix_tail_matches_reference_oracle` | worst deviation 5.2e-2 -- the oracle is independent of the engine's mapping | -| M17 | #1278 D2a | `read_carried_ramp` re-derives the step from `(current, target, remaining)` through `LinearRamp::set_target` instead of carrying the read step (the pre-#1278 delay restore) | `a_mid_ramp_restore_continues_bit_identically` (deleted by TA4; KEEP catcher effect-runtime `contract_ramp_identity::linear_smoother_is_bit_identical_to_the_linear_ramp`) | `channel 1 frame 23: restored twin diverged`, `left: 1028197727` / `right: 1028197726` -- one ulp, on the first continued frame | -| M17b | #1278 D2a | restore re-derives only the cross-feedback ramp's step (`self.cross` rebuilt with `set_target`); feedback and cross reach the output only through the ring, after the test's render window | `a_mid_ramp_restore_continues_bit_identically` (deleted by TA4; KEEP catcher effect-runtime `contract_ramp_identity::linear_smoother_is_bit_identical_to_the_linear_ramp`) (its restored-snapshot assertion) | the restored twin's snapshot differs from the payload it restored -- the render alone stayed green under this edit and under a feedback-only re-derivation | +| M17 | #1278 D2a | `read_carried_ramp` re-derives the step from `(current, target, remaining)` through `LinearRamp::set_target` instead of carrying the read step (the pre-#1278 delay restore) | `a_mid_ramp_restore_continues_bit_identically` (deleted by TA4) | `channel 1 frame 23: restored twin diverged`, `left: 1028197727` / `right: 1028197726` -- one ulp, on the first continued frame | +| M17b | #1278 D2a | restore re-derives only the cross-feedback ramp's step (`self.cross` rebuilt with `set_target`); feedback and cross reach the output only through the ring, after the test's render window | `a_mid_ramp_restore_continues_bit_identically` (deleted by TA4) (its restored-snapshot assertion) | the restored twin's snapshot differs from the payload it restored -- the render alone stayed green under this edit and under a feedback-only re-derivation | | M19 | #1278 D2a | `read_carried_ramp` drops its `ramp_path_inside` clause (and with it the `remaining <= 64` bound, the finite-step check and the settled-step check) | `a_carried_ramp_is_refused_unless_its_whole_path_is_valid` | `NaN step`: `left: Ok(())` / `right: Err("effect.state.parameter")` -- every other delay target, the scale-20 differential included, stays green | ## Two things the table is careful about @@ -59,6 +59,6 @@ both are recorded as what they are rather than dressed up as assertion failures. ## TA4 deletions -The 2026-10 test audit (TA4, batch 1 mutation measurement at `81a3074fc`) deleted the tests named below. Each one's caught mutants were also red in the KEEP test named beside it. That is the recorded catcher of the deleted test's sampled mutants; the mutation of each row above was not re-run. +The 2026-10 test audit (TA4, batch 1 mutation measurement at `81a3074fc`) deleted the tests named below. Where a KEEP test is named, batch 1 recorded it red on that test's sampled mutants in this crate; the mutation of each row above was not re-run. Where none is named, batch 1 recorded no same-crate catcher that could plausibly see the row's mutation. -- `a_mid_ramp_restore_continues_bit_identically`: effect-runtime `contract_ramp_identity::linear_smoother_is_bit_identical_to_the_linear_ramp` +- `a_mid_ramp_restore_continues_bit_identically`: no plausible same-crate KEEP catcher recorded diff --git a/crates/effect-runtime/tests/MUTATIONS.md b/crates/effect-runtime/tests/MUTATIONS.md index af2edabc2..320faf369 100644 --- a/crates/effect-runtime/tests/MUTATIONS.md +++ b/crates/effect-runtime/tests/MUTATIONS.md @@ -250,10 +250,10 @@ list of overflowing widths in these tests therefore also carries `0x0000_0002` ( ## TA4 deletions -The 2026-10 test audit (TA4, batch 1 mutation measurement at `81a3074fc`) deleted the tests named below. Each one's caught mutants were also red in the KEEP test named beside it. That is the recorded catcher of the deleted test's sampled mutants; the mutation of each row above was not re-run. +The 2026-10 test audit (TA4, batch 1 mutation measurement at `81a3074fc`) deleted the tests named below. Where a KEEP test is named, batch 1 recorded it red on that test's sampled mutants in this crate; the mutation of each row above was not re-run. Where none is named, batch 1 recorded no same-crate catcher that could plausibly see the row's mutation. - `the_step_is_computed_once`: effect-runtime `contract_ramp_identity::linear_smoother_is_bit_identical_to_the_linear_ramp` - `the_curve_matches_the_paper`: effect-runtime `dynamics::knee_words_follow_the_finite_reciprocal_rule` -- `the_corpus_is_width_independent`: lane `sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` +- `the_corpus_is_width_independent`: no plausible same-crate KEEP catcher recorded - `a_knee_whose_reciprocal_overflows_is_a_hard_knee`: effect-runtime `dynamics::knee_words_follow_the_finite_reciprocal_rule` - `the_narrowest_soft_knees_are_finite_at_the_threshold`: effect-runtime `dynamics::knee_words_follow_the_finite_reciprocal_rule` diff --git a/crates/graph-compiler/tests/MUTATIONS.md b/crates/graph-compiler/tests/MUTATIONS.md index 3159e701a..e73e3a687 100644 --- a/crates/graph-compiler/tests/MUTATIONS.md +++ b/crates/graph-compiler/tests/MUTATIONS.md @@ -244,7 +244,7 @@ fixture strengthening #964 added. Both controls stay green, which is why the str | # | ported test (what it must still catch) | mutation | file | command | result | |---|---|---|---|---|---| -| 964-1 | `direct_graph_report_exposes_zero_output_latency_and_tail_without_identity_change` (deleted by TA4; KEEP catcher graph `program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers`) (a filter-free input section keeps the output tail finite) | `BuiltinTail::FiniteZero => TailSamples::Infinite` in `compile_with_builtins` | `graph-compiler/src/compile.rs` | `cargo test -p graph-compiler --lib direct_graph_report_exposes_zero_output_latency` | RED — `left: Infinite`, `right: Finite(0)` | +| 964-1 | `direct_graph_report_exposes_zero_output_latency_and_tail_without_identity_change` (deleted by TA4) (a filter-free input section keeps the output tail finite) | `BuiltinTail::FiniteZero => TailSamples::Infinite` in `compile_with_builtins` | `graph-compiler/src/compile.rs` | `cargo test -p graph-compiler --lib direct_graph_report_exposes_zero_output_latency` | RED — `left: Infinite`, `right: Finite(0)` | | 964-2 | `issue122_reverse_route_ids_emit_sorted_levels_and_bind` (SHA `14d73…` pins the with-builtins plan) | as 964-1 | as 964-1 | `... --lib issue122` | RED — `sorted production identity: "canonical identity"` | | 964-3 | `the_zero_delay_plan_digest_is_the_current_semantic_plan` (the re-pinned digest covers the builtin tails) | `BuiltinTail::Infinite => TailSamples::Finite(0)` | as 964-1 | `cargo test -p graph-compiler --test track_delay` | RED — the digest falls back to exactly the builtins-less `eb3ca776…cb18e0ea10`, against the pinned `957e97ca…ce7640e42`: the eighteen tail tokens are the whole difference | | 964-4 | `scalar_dispatch_compiles_without_banks_on_any_host` (the scalar dispatch forms no bank, builtin banks included) | attach the builtin banks at `Backend::current()` instead of the request's dispatch | as 964-1 (`into_graph_artifact_with_banks` call) | `... --lib scalar_dispatch` | RED — `plain.prepared_builtin_bank_count()`, `6` vs `0`. The assertion is new in #964; the effect-bank count the test already had stays green here | @@ -252,7 +252,7 @@ fixture strengthening #964 added. Both controls stay green, which is why the str | 964-6 | `effect_control_resource_uses_independent_queue_and_owner_arithmetic` (owner deltas on the report and the whole-plan estimate) | charge half the target-staging bytes | `graph-compiler/src/estimate.rs` | `... --lib effect_control_resource_uses` | RED — `bank-one-target: report graph owner delta`, 344,952 vs 459,640 | | 964-7 | `accepted_session_compiles_binds_and_renders_direct_route` (the host binds exactly the input and the output) | a builtin bank member counts as an external node (`\|\| bank_nodes.contains(node)` for `&& !bank_nodes.contains(node)`) | `builtins-compiler/src/lib.rs` (`external_binding_nodes`) | `... --lib accepted_session_compiles` | RED — the external set lists `PostInputBuiltins`, `PostFader` and `PostMatrix` | | 964-8 | `route_transform_bits_participate_in_semantic_hash` | the canonical `route-transform` row writes `1.0` for the gain | `graph-compiler/src/canonical.rs` | `... --lib route_transform_bits_participate` | RED — both plans hash to `0b8ee1b2…`. **Control:** the same mutation with the changed model left on the fixture's own input filters stays GREEN: their infinite tails alone make the two hashes differ | -| 964-9 | `dynamic_rack_compressors_bank_and_render_bit_identically_to_the_per_node_path` (deleted by TA4; KEEP catcher graph `runtime::tests::a_host_plane_reduction_is_the_arena_reduction_bit_for_bit`) (bank against per node, lane by lane) | the per-node effect exchanges its two output planes after processing | `graph/src/runtime.rs` (`NodeKind::Effect`) | `... --lib dynamic_rack_compressors_bank_and_render` | RED — block 0 differs, `1068755679` vs `3201302908`. **Control:** the same mutation with `accepted_compressor_graph_fixture` on the fixture's own `pan: {left: 1, right: 1}` stays GREEN: both lanes are panned hard right and sum into one output, so a crossed lane renders the same bits | +| 964-9 | `dynamic_rack_compressors_bank_and_render_bit_identically_to_the_per_node_path` (deleted by TA4) (bank against per node, lane by lane) | the per-node effect exchanges its two output planes after processing | `graph/src/runtime.rs` (`NodeKind::Effect`) | `... --lib dynamic_rack_compressors_bank_and_render` | RED — block 0 differs, `1068755679` vs `3201302908`. **Control:** the same mutation with `accepted_compressor_graph_fixture` on the fixture's own `pan: {left: 1, right: 1}` stays GREEN: both lanes are panned hard right and sum into one output, so a crossed lane renders the same bits | | 964-10 | `add_a_track_keeps_existing_track_bits_and_one_transpose_per_chain`, `console_sixty_four_track_fixture_banks_its_dynamic_compressor_bit_identically` (deleted by TA4; KEEP catcher graph-compiler `tests::add_a_track_keeps_existing_track_bits_and_one_transpose_per_chain`) (the chain re-pins) | the runtime never merges two bank units into one chain (`&& false` on `chains_into`) | `graph/src/runtime.rs` (`cohort_runs`) | `... --lib add_a_track`; `... --lib console_sixty_four_track_fixture` | RED — `8 tracks: [post-input, EQ] and [fader, matrix] per cohort`, 4 vs 2; `the EQ and the dynamic compressor fuse into one chain per cohort`, 40 vs 8. The pin add-a-track replaced, `chains == slots`, holds under this mutation (4 == 4) | | 964-11 | `compiles_65_537_tracks_or_rejects_only_a_configured_resource` (only a configured cap can refuse the session) | a compiled track ceiling: `graph.track.limit` above 65,536 tracks | as 964-1 | `cargo test -p graph-compiler --test scale compiles_65_537` | RED — the constrained compile's diagnostics are no longer all `graph.resource.limit` | @@ -269,7 +269,7 @@ tests while the builtins-less originals went RED. The five now read `graph_resou | 964-12 (Sol's M-b) | the limiter, multiband, soft-clip, transient-shaper and delay `launch_*` tests (the one-byte-below cap sits exactly one byte below the figure the compile caps) | the bank-slot reservation is left out of the capped estimate only (`capped_estimate.checked_add_bank_slot_owners(Default::default())`) | `graph-compiler/src/compile.rs` | `cargo test -p graph-compiler --lib launch_` | RED, all five: `one-byte-below {limiter,multiband,soft-clip,transient} graph cap must reject before publication`, `one-byte-below delay graph cap must reject`. Attempt 1's versions stayed GREEN under the same mutation (Sol) | | 964-13 | the limiter, multiband, soft-clip and transient-shaper `launch_*` tests (the bank-against-scalar deltas they pin on the report hold on the whole-plan estimate: `assert_builtin_attachment_matches`) | the builtin attachment charges the effect banks' metadata to `incremental_plan_bytes` a second time (in `PreparedGraphPlan::with_builtin_banks`) | `graph/src/lib.rs` | `cargo test -p graph-compiler --lib launch_` | RED, all four: `the builtin attachment adds the same bytes to both arms`, e.g. multiband `64802` against `64042` | | 964-3 (recheck) | `track_delay::the_zero_delay_plan_digest_is_the_current_semantic_plan`, now at `Backend::current()` | as 964-3 | as 964-3 | `cargo test -p graph-compiler --test track_delay` | RED, the digest falls back to `eb3ca776…` | -| 964-1 (#1329 recheck) | `direct_graph_report_exposes_zero_output_latency_and_tail_without_identity_change` (deleted by TA4; KEEP catcher graph `program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers`) | #1329 deleted `BuiltinTail`: `compile_with_builtins` takes the prepared `TailSamples` directly, so 964-1's mapping is gone. Equivalent mutation: every builtin tail read as `TailSamples::Infinite` | `graph-compiler/src/compile.rs` | `cargo test -p graph-compiler --lib direct_graph_report_exposes_zero_output_latency` | RED -- `left: Infinite`, `right: Finite(0)` (on `11f59fa42`) | +| 964-1 (#1329 recheck) | `direct_graph_report_exposes_zero_output_latency_and_tail_without_identity_change` (deleted by TA4) | #1329 deleted `BuiltinTail`: `compile_with_builtins` takes the prepared `TailSamples` directly, so 964-1's mapping is gone. Equivalent mutation: every builtin tail read as `TailSamples::Infinite` | `graph-compiler/src/compile.rs` | `cargo test -p graph-compiler --lib direct_graph_report_exposes_zero_output_latency` | RED -- `left: Infinite`, `right: Finite(0)` (on `11f59fa42`) | | 964-3 (#1329 recheck) | `track_delay::the_zero_delay_plan_digest_is_the_current_semantic_plan`, re-pinned by #1329 to `60cae21e…fc6c362` (the eighteen tail tokens read `finite:10048`) | every builtin tail read as `TailSamples::Finite(0)` | as 964-1 (#1329 recheck) | `cargo test -p graph-compiler --test track_delay` | RED -- the digest moves to `664a575a…d0d0c1a2` against the pinned `60cae21e…fc6c362`; `builtins_replace_only_the_three_internal_track_bindings` also turns RED (`Finite(0)` against the prepared `Finite(10048)`) | | S5 (recheck) | `track_delay::the_estimate_charges_each_lane_its_own_ring` (deleted by TA4; KEEP catcher graph-compiler `track_delay::a_ring_is_a_named_allocation`) at `Backend::current()` | the left ring is charged 2 bytes per sample | `graph-compiler/src/compile.rs` | as above | RED, `delay_bytes for 1/0`, 2 vs 4 | @@ -369,9 +369,9 @@ deleted or trimmed some tests that rows above name. The rows stay as history; th ## TA4 deletions -The 2026-10 test audit (TA4, batch 1 mutation measurement at `81a3074fc`) deleted the tests named below. Each one's caught mutants were also red in the KEEP test named beside it. That is the recorded catcher of the deleted test's sampled mutants; the mutation of each row above was not re-run. +The 2026-10 test audit (TA4, batch 1 mutation measurement at `81a3074fc`) deleted the tests named below. Where a KEEP test is named, batch 1 recorded it red on that test's sampled mutants in this crate; the mutation of each row above was not re-run. Where none is named, batch 1 recorded no same-crate catcher that could plausibly see the row's mutation. -- `direct_graph_report_exposes_zero_output_latency_and_tail_without_identity_change`: graph `program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers` -- `dynamic_rack_compressors_bank_and_render_bit_identically_to_the_per_node_path`: graph `runtime::tests::a_host_plane_reduction_is_the_arena_reduction_bit_for_bit` +- `direct_graph_report_exposes_zero_output_latency_and_tail_without_identity_change`: no plausible same-crate KEEP catcher recorded +- `dynamic_rack_compressors_bank_and_render_bit_identically_to_the_per_node_path`: no plausible same-crate KEEP catcher recorded - `console_sixty_four_track_fixture_banks_its_dynamic_compressor_bit_identically`: graph-compiler `tests::add_a_track_keeps_existing_track_bits_and_one_transpose_per_chain` - `the_estimate_charges_each_lane_its_own_ring`: graph-compiler `track_delay::a_ring_is_a_named_allocation` diff --git a/crates/graph/src/program.rs b/crates/graph/src/program.rs index 8aa2b9845..88456b3fa 100644 --- a/crates/graph/src/program.rs +++ b/crates/graph/src/program.rs @@ -480,7 +480,9 @@ struct Lifetime { /// /// `bank_windows` computes those ranges and pass 2 *holds* every slot freed inside one until /// the window closes, instead of returning it to the free list where an op the bank hoists past -/// its releaser could take it. `bank_window_hoisting_preserves_dataflow_on_random_graphs` interprets seeded graphs in the +/// its releaser could take it. `a_bank_window_never_recycles_a_physical_slot` constructs the +/// smallest graph that reaches the defect and +/// `bank_window_hoisting_preserves_dataflow_on_random_graphs` interprets seeded graphs in the /// order the executor actually runs them. /// /// ## The rejected alternative: dedication by bank membership diff --git a/crates/graph/src/program/tests.rs b/crates/graph/src/program/tests.rs index 9ee61f1dd..44189eff2 100644 --- a/crates/graph/src/program/tests.rs +++ b/crates/graph/src/program/tests.rs @@ -717,6 +717,47 @@ fn malformed_inputs_are_rejected_rather_than_lowered() { // ---- issue #169: colouring across a bank's reordering window --------------------------- +/// A track whose dynamic rack carries one effect, spliced between the two stage boundaries +/// that surround it, plus one route to the shared output. +fn dynamic_track(track: &str, route: &str) -> (Vec, Vec) { + let (mut nodes, mut edges) = plain_track(track, &[route]); + let effect = GraphNodeId::Effect(crate::EffectNodeId { + track_id: gid(track), + rack: RackId::Dynamic, + effect_id: gid("fx"), + }); + nodes.push(node(effect.clone())); + edges.retain(|edge| { + edge.id + != GraphEdgeId::TrackMain { + target: stage_node(track, TrackStage::PostDynamic), + } + }); + edges.push(main_edge( + GraphEdgeId::TrackMain { + target: effect.clone(), + }, + stage_node(track, TrackStage::PostSimd1), + effect.clone(), + )); + edges.push(main_edge( + GraphEdgeId::TrackMain { + target: stage_node(track, TrackStage::PostDynamic), + }, + effect, + stage_node(track, TrackStage::PostDynamic), + )); + (nodes, edges) +} + +fn dynamic_effect(track: &str) -> GraphNodeId { + GraphNodeId::Effect(crate::EffectNodeId { + track_id: gid(track), + rack: RackId::Dynamic, + effect_id: gid("fx"), + }) +} + /// `node index -> (bank, lane)`, the shape `runtime::BankMembership` has. fn member_lanes( spec: &GraphSpec, @@ -1275,6 +1316,144 @@ fn assert_no_slot_is_recycled_inside_a_bank_window( } } +/// Issue #169, the minimal reproduction: a slot released inside a bank window was handed +/// straight back to a member of that same bank. +/// +/// Three tracks, one dynamic effect each, and a bank over the *outer* two -- the shape #166 +/// made reachable, because a dynamic rack banks by cohort signature, so the tracks that share +/// a compressor bank need not be adjacent. Track `t01`'s effect is not in the bank and sits +/// between the two members in the schedule, so the executor defers it past the bank; its +/// delayed input needs a staging slot, and colouring released that slot one op before `t02`'s +/// member allocated its output. +/// +/// In schedule order that is correct: the staging slot is dead the moment `t01`'s op finishes. +/// In *execution* order the bank runs first, `t02`'s member writes the slot, and then the +/// deferred `t01` stages over the top of it -- so `t02` renders `t01`'s delayed input. +/// +/// The second half of the test is what keeps the first half honest: lowered with no bank +/// declared -- which is exactly what the pre-#169 signature could express -- the same graph +/// really does hand the slot over. +#[test] +fn a_bank_window_never_recycles_a_physical_slot() { + let mut nodes = Vec::new(); + let mut edges = Vec::new(); + for (index, track) in ["t00", "t01", "t02"].iter().enumerate() { + let (track_nodes, track_edges) = dynamic_track(track, &format!("r{index:02}")); + nodes.extend( + track_nodes.into_iter().filter(|candidate| { + !matches!(candidate.id, GraphNodeId::Output { .. }) || index == 0 + }), + ); + edges.extend(track_edges); + } + let (spec, schedule, levels) = build(nodes, edges); + // The one PDC edge: into the effect of the track the bank does *not* contain. + let delays = vec![InsertedDelay { + node: dynamic_effect("t01"), + edge_id: GraphEdgeId::TrackMain { + target: dynamic_effect("t01"), + }, + samples: LatencySamples(64), + }]; + let banks = vec![vec![dynamic_effect("t00"), dynamic_effect("t02")]]; + let lanes = member_lanes(&spec, &banks); + + // Not vacuous: told nothing about the bank, colouring recycles the slot and the render + // diverges. This is the pre-#169 behaviour, and the fixture exists to reach it. + let unaware = lower(&spec, &schedule, &levels, &delays, &[]).expect("lowers"); + assert_program_matches_spec(&spec, &schedule, &delays, &unaware); + let member = node_index(&spec, &dynamic_effect("t02")).expect("member"); + let outsider = node_index(&spec, &dynamic_effect("t01")).expect("outsider"); + let outsider_op = &unaware.ops[unaware.node_op[outsider as usize].expect("op") as usize]; + let staging = unaware.inputs_of(outsider_op)[0] + .delay + .expect("the outsider's input is delayed") + .staging; + assert_eq!( + unaware.node_buffer[member as usize], staging, + "the fixture must reach the collision it is here to pin" + ); + assert!( + divergence_in_runtime_order(&spec, &schedule, &delays, &unaware, &lanes).is_some(), + "and that collision must actually change what renders" + ); + + // Told about the bank, the slot is held until the window closes. + let program = lower(&spec, &schedule, &levels, &delays, &banks).expect("lowers"); + assert_program_matches_spec(&spec, &schedule, &delays, &program); + assert_no_slot_is_recycled_inside_a_bank_window(&program, &spec, &banks, "minimal"); + assert_eq!( + divergence_in_runtime_order(&spec, &schedule, &delays, &program, &lanes), + None + ); + // And it costs nothing here: holding a slot across the window changes *which* slot each + // op gets, not how many exist. The window hold buys the collision away out of the + // colouring's own slack -- which is why it, and not dedication, is the fix that shipped. + assert_eq!((unaware.buffers, program.buffers), (7, 7)); +} + +/// Issue #169's structural half: **no physical slot is recycled inside a merged bank +/// window**, which is the whole soundness condition (see [`lower`]). +/// +/// Four tracks and two interleaved cohorts -- the shape a dynamic rack produces when +/// neighbouring tracks carry different chains, which is what #166 made reachable. Each bank's +/// window contains the other's members, so the two merge into one span: what makes them +/// unsafe is not either bank alone but that each reorders the other's ops. +/// +/// The overlap assertion is the non-vacuity guard. If the fixture ever stopped interleaving, +/// the windows would stop merging and this would pass on a graph that no longer poses the +/// question. +#[test] +fn no_slot_is_recycled_inside_a_merged_bank_window() { + let mut nodes = Vec::new(); + let mut edges = Vec::new(); + for (index, track) in ["t00", "t01", "t02", "t03"].iter().enumerate() { + let (track_nodes, track_edges) = dynamic_track(track, &format!("r{index:02}")); + nodes.extend( + track_nodes.into_iter().filter(|candidate| { + !matches!(candidate.id, GraphNodeId::Output { .. }) || index == 0 + }), + ); + edges.extend(track_edges); + } + let (spec, schedule, levels) = build(nodes, edges); + let banks = vec![ + vec![dynamic_effect("t00"), dynamic_effect("t02")], + vec![dynamic_effect("t01"), dynamic_effect("t03")], + ]; + let program = lower(&spec, &schedule, &levels, &[], &banks).expect("lowers"); + assert_program_matches_spec(&spec, &schedule, &[], &program); + + // The two windows really do interleave, so `bank_windows` really does merge them. + let window = |members: &[GraphNodeId]| { + let ops: Vec = members + .iter() + .map(|id| { + let index = node_index(&spec, id).expect("member is a node"); + program.node_op[index as usize].expect("a member is never elided") as usize + }) + .collect(); + ( + *ops.iter().min().expect("first"), + *ops.iter().max().expect("last"), + ) + }; + let (first_start, first_end) = window(&banks[0]); + let (second_start, second_end) = window(&banks[1]); + assert!( + first_start < second_start && second_start < first_end && first_end < second_end, + "the cohorts must interleave: {first_start}..{first_end} and \ + {second_start}..{second_end}" + ); + + assert_no_slot_is_recycled_inside_a_bank_window(&program, &spec, &banks, "merged window"); + let lanes = member_lanes(&spec, &banks); + assert_eq!( + divergence_in_runtime_order(&spec, &schedule, &[], &program, &lanes), + None + ); +} + /// Issue #169, the load-bearing eval: over seeded multi-track graphs with dynamic rack chains, /// interleaved cohorts, fan-out and PDC, the program renders the value the semantic graph does /// **in the order the executor actually runs it**, with banks hoisted to their first member. diff --git a/crates/graph/tests/MUTATIONS.md b/crates/graph/tests/MUTATIONS.md index 78394543a..eb8b2c944 100644 --- a/crates/graph/tests/MUTATIONS.md +++ b/crates/graph/tests/MUTATIONS.md @@ -441,7 +441,7 @@ checked before writing, the suites were run with `--no-fail-fast`, and the file deleted the bankless ring fixture these rows ran on and ported the four gates onto issue #918's banked fixture (gate 5 is now `the_metadata_charge_covers_the_banked_source_plans_executor_tables`); the #957 rows below re-prove 936-1, 936-2 and 936-4 on the ported gates. -- console-workload "gate 1" is `tests::the_driver_fed_gain_pan_row_dispatches_every_unit_but_its_inputs` (deleted by TA4; KEEP catcher graph `runtime::tests::a_plan_that_reads_the_session_output_is_refused_at_bind`) +- console-workload "gate 1" is `tests::the_driver_fed_gain_pan_row_dispatches_every_unit_but_its_inputs` (deleted by TA4) (then `the_driver_fed_plumbing_row_dispatches_only_its_output_unit`, re-homed by issue #956), "gate 5" `tests::the_driver_fed_rows_metadata_charge_grows_by_exactly_the_executor_tables`, and "gate 4" is chain_shape `the_plumbing_row_is_input_route_output_and_renders_the_base_bits` @@ -460,7 +460,7 @@ checked before writing, the suites were run with `--no-fail-fast`, and the file | 936-1b | only `op.observers.is_empty()` dropped | `graph/src/runtime.rs` `Runtime::unit_inert` | `cargo test -p graph --lib` | **GREEN, equivalent** (113 of 113). `Runtime::new_with_observation_activation`, which every runtime passes through, sets `identity.observed = unit.has_observers()`, and for a plain op that is `!op.observers.is_empty()`. The two clauses the brief lists name one fact, so dropping either alone moves nothing. 936-1 is the brief's mutation in the form that is not equivalent. | | 936-2 | a delayed claim is inert (`NodeKind::SourceInput \| NodeKind::TrackDelay { .. }`) | `graph/src/runtime.rs` `Runtime::unit_inert` | `cargo test -p graph --lib`; gate 3 bits-only | RED, graph 3 of 113: gate 3 `TrackDelayed, 1 frames: skipped unit 5 is a plain unobserved source input`, #927's gate 2, #918's gate 1. Bits-only: RED `TrackDelayed: every host word and meter frame is the pre-change executor's` (`0xce6b3a3d49968c67`, the undelayed Plain digest: the copied words reach the Output without their delay line, against `0xe8b0890ea031f463`). | | 936-3 | the loop iterates the table in reverse (`active_units.iter().rev()`) | `graph/src/lib.rs` `GraphExecutor::render` | console-workload lib and chain_shape; `cargo test -p graph --lib` | RED on gate 4: chain_shape `the_plumbing_row_is_input_route_output_and_renders_the_base_bits` (`eliding identity stages moved a bit`, `BASE_DIGEST`; retired by issue #956) and `the_folded_master_is_the_reductions_own_bits`, and the lib's `the_driver_fed_plumbing_row_renders_the_bound_rows_bits` (now `the_driver_fed_gain_pan_row_renders_the_bound_rows_bits`). The driver-fed row dispatches only its Output op, so reversing it changes nothing; the bound row's reversal is what the equality catches. graph: 27 of 113 red, gates 2 and 3 and the rt9 source pin among them. | -| 936-4 | the loop dispatches every unit again (`let _ = &active_units; for unit in 0..runtime.units.len() {`) | `graph/src/lib.rs` `GraphExecutor::render` | `cargo test -p graph --lib`; console-workload lib and chain_shape | RED only on what counts dispatches: graph gates 1-3 (`Plain, 1 frames: units dispatched per block`, `[65; 16]` against `[1; 16]`) and the rt9 source pin (the pre-#936 header is refused); console gate 1 (`sixty_four_track_plumbing_ring, block 0: units dispatched`, 65 against 1; the row is now `sixty_four_track_gain_pan_ring` and the test `the_driver_fed_gain_pan_row_dispatches_every_unit_but_its_inputs` (deleted by TA4; KEEP catcher graph `runtime::tests::a_plan_that_reads_the_session_output_is_refused_at_bind`), issue #956). GREEN: chain_shape 24 of 24 and every digest. The change is class A, so a count is the only thing that can tell a skipped unit from a dispatched one. | +| 936-4 | the loop dispatches every unit again (`let _ = &active_units; for unit in 0..runtime.units.len() {`) | `graph/src/lib.rs` `GraphExecutor::render` | `cargo test -p graph --lib`; console-workload lib and chain_shape | RED only on what counts dispatches: graph gates 1-3 (`Plain, 1 frames: units dispatched per block`, `[65; 16]` against `[1; 16]`) and the rt9 source pin (the pre-#936 header is refused); console gate 1 (`sixty_four_track_plumbing_ring, block 0: units dispatched`, 65 against 1; the row is now `sixty_four_track_gain_pan_ring` and the test `the_driver_fed_gain_pan_row_dispatches_every_unit_but_its_inputs` (deleted by TA4), issue #956). GREEN: chain_shape 24 of 24 and every digest. The change is class A, so a count is the only thing that can tell a skipped unit from a dispatched one. | | 936-5a | `GraphExecutorWithoutObservationActivation` omits `active_units` | `graph/src/lib.rs` | `cargo test -p graph --lib` | RED, the metadata test only: `the observation owner delta is the runtime state's alone` (272 against 256). | | 936-5b | `GraphExecutorWithoutSplitPairTable` omits `active_units` | `graph/src/lib.rs` | `cargo test -p graph --lib` | RED, the metadata test only: `the split owner delta is the runtime field's alone` (32 against 16). | | 936-6a | the copied-claim table is charged nothing (`source_input_entry_bytes.checked_mul(0)`) | `graph/src/lib.rs` `checked_for_with_response_bindings` | `cargo test -p graph --lib`; console-workload lib | RED: the metadata test, graph gate 5 (`declined true: the charge (516, 0) covers the tables (4, 1024)`), console gate 5. | @@ -708,7 +708,7 @@ host-core/test-support,graph/test-support --test route_mute`); gate 4 is | 1217-10 | the estimate charges no table | `graph-compiler/src/estimate.rs` `resource_estimate` | gate 4 | RED: `graph_metadata_bytes grew by 0, the bound plan by 237`. | | 1217-11 | the host-master form stores nothing for an inactive first input (`SumSegment::Zero => {}` in `reduce_gated_into`) | `graph/src/runtime.rs` `reduce_gated_into` | gate 1 (attempt 2, host planes pre-filled with `HOST_SENTINEL = 7.0`) | RED: `an_inactive_route_is_neither_mixed_nor_read` (`seed 0, Output, r0 muted, plane 0: sample 0: 7.0 != 0.0`) and `a_destination_whose_every_route_is_muted_renders_positive_zero` (`Output, 2 muted routes: plane 0 frame 0: 7.0, expected 0.0`). GREEN on the whole file with the sentinel set back to `0.0`, which is the attempt-1 hole. | | 1217-12 | the host-master form skips its sum when every route input is inactive (an early `return` in `reduce_gated_into`) | `graph/src/runtime.rs` `reduce_gated_into` | gate 1, every contributor muted | RED, 1 of 12: `a_destination_whose_every_route_is_muted_renders_positive_zero` (`Output, 2 muted routes: plane 0 frame 0: 7.0, expected 0.0`). | -| 1217-13 | the estimate charges twice the table's bound (`route_activity_bytes * 2`) | `graph-compiler/src/estimate.rs` `resource_estimate` | #1216 gate 5, tightened (attempt 2, NIT-1) | RED: `a_muted_route_seals_one_route_mute_row_after_its_transform` (deleted by TA4; KEEP catcher graph-compiler `track_delay::a_ring_is_a_named_allocation`) (`the estimate moves by the route-activity charge (545 bytes) and nothing else (route:eq0-main)`); gate 4's lower-bound check stays green. | +| 1217-13 | the estimate charges twice the table's bound (`route_activity_bytes * 2`) | `graph-compiler/src/estimate.rs` `resource_estimate` | #1216 gate 5, tightened (attempt 2, NIT-1) | RED: `a_muted_route_seals_one_route_mute_row_after_its_transform` (deleted by TA4) (`the estimate moves by the route-activity charge (545 bytes) and nothing else (route:eq0-main)`); gate 4's lower-bound check stays green. | ## Issue #1220 -- live send coefficients ramp on the render plane @@ -762,7 +762,7 @@ deleted the last three builtins-compiler scalar-oracle pairing tests. The rows s ## TA4 deletions -The 2026-10 test audit (TA4, batch 1 mutation measurement at `81a3074fc`) deleted the tests named below. Each one's caught mutants were also red in the KEEP test named beside it. That is the recorded catcher of the deleted test's sampled mutants; the mutation of each row above was not re-run. +The 2026-10 test audit (TA4, batch 1 mutation measurement at `81a3074fc`) deleted the tests named below. Where a KEEP test is named, batch 1 recorded it red on that test's sampled mutants in this crate; the mutation of each row above was not re-run. Where none is named, batch 1 recorded no same-crate catcher that could plausibly see the row's mutation. -- `the_driver_fed_gain_pan_row_dispatches_every_unit_but_its_inputs`: graph `runtime::tests::a_plan_that_reads_the_session_output_is_refused_at_bind` -- `a_muted_route_seals_one_route_mute_row_after_its_transform`: graph-compiler `track_delay::a_ring_is_a_named_allocation` +- `the_driver_fed_gain_pan_row_dispatches_every_unit_but_its_inputs`: no plausible same-crate KEEP catcher recorded +- `a_muted_route_seals_one_route_mute_row_after_its_transform`: no plausible same-crate KEEP catcher recorded diff --git a/crates/lane/tests/MUTATIONS.md b/crates/lane/tests/MUTATIONS.md index 7d8dced2d..ce13f92f7 100644 --- a/crates/lane/tests/MUTATIONS.md +++ b/crates/lane/tests/MUTATIONS.md @@ -340,7 +340,7 @@ run in dev (the corpus in release), and restored. Host AMD EPYC 7313P, rustc 1.9 L-green is the expected-green row: on the sanitized domain `{+0.0} ∪ [MIN_POSITIVE, MAX]` the D8 select form is commutative by bits, so the operand order is free. -`g1_select_max_is_order_free_only_on_the_sanitized_domain` (deleted by TA4; KEEP catcher lane `sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts`) witnesses that argument directly, and +`g1_select_max_is_order_free_only_on_the_sanitized_domain` (deleted by TA4) witnesses that argument directly, and also that it fails off the domain (`max(+0, -0)` and `max(1, NaN)` depend on the order). ## Issue #949 — the `f64` lane vocabulary @@ -505,6 +505,6 @@ browser's render-closure trap gate. Host AMD EPYC 7313P, rustc 1.97.1, `x86-64-v ## TA4 deletions -The 2026-10 test audit (TA4, batch 1 mutation measurement at `81a3074fc`) deleted the tests named below. Each one's caught mutants were also red in the KEEP test named beside it. That is the recorded catcher of the deleted test's sampled mutants; the mutation of each row above was not re-run. +The 2026-10 test audit (TA4, batch 1 mutation measurement at `81a3074fc`) deleted the tests named below. Where a KEEP test is named, batch 1 recorded it red on that test's sampled mutants in this crate; the mutation of each row above was not re-run. Where none is named, batch 1 recorded no same-crate catcher that could plausibly see the row's mutation. -- `g1_select_max_is_order_free_only_on_the_sanitized_domain`: lane `sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` +- `g1_select_max_is_order_free_only_on_the_sanitized_domain`: no plausible same-crate KEEP catcher recorded diff --git a/crates/parametric-eq/tests/MUTATIONS.md b/crates/parametric-eq/tests/MUTATIONS.md index 811476667..f144fdd3d 100644 --- a/crates/parametric-eq/tests/MUTATIONS.md +++ b/crates/parametric-eq/tests/MUTATIONS.md @@ -86,12 +86,12 @@ and the PCM-fixture rows. These are the three mutations issue #105 used against All three fail `automation_starts_a_64_sample_word_ramp`. 5 leaves the words at `start + 64 * step` instead of exactly `target`; 6 makes frame 0 use the pre-event words, so the first ramped word is `start`; 7 advances twice on the first frame. 7 also fails -`automation_is_partition_invariant` (deleted by TA4; KEEP catcher parametric-eq `randomized_restores::the_stationary_cascade_renders_the_full_cascade_after_random_restores`), because the number of additions then depends on how the block +`automation_is_partition_invariant` (deleted by TA4), because the number of additions then depends on how the block was cut. ### 8 — one segment for lanes of different ramp ages -`every_width_matches_the_scalar_instantiation` (deleted by TA4; KEEP catcher parametric-eq `randomized_restores::the_stationary_cascade_renders_the_full_cascade_after_random_restores`) fails at block 2, track 0, frame 0. This is the +`every_width_matches_the_scalar_instantiation` (deleted by TA4) fails at block 2, track 0, frame 0. This is the mutation that matters for the bank: at `WIDTH = 1` there is only one lane, so no cut is ever needed and the scalar path is unaffected; at `WIDTH = 8` the lanes whose ramps ended mid-block keep stepping past their target. A width difference that only appears when ramps of different ages @@ -200,7 +200,7 @@ tree restored between rows. | # | mutation | file | test | result | |---|---|---|---|---| | M2-E1 | `PreparedParametricEq::desymmetrize` drops `sections` | `parametric-eq/src/lib.rs` | `a_desymmetrized_bank_is_a_never_collapsed_bank` | RED | -| M2-E2 | the collapsed body hard-codes `stationary = true` instead of reading the one live channel's `no_ramp_in_flight` | `parametric-eq/src/lib.rs` `render_mono` | `the_collapsed_body_renders_the_dual_bodys_left_plane` (deleted by TA4; KEEP catcher parametric-eq `response::asymmetric_cascade_sections_are_independent_and_bypass_is_total_identity`) | RED — 2 failed; a ramping block taking the interleaved cascade renders a coefficient that is not the one in force | +| M2-E2 | the collapsed body hard-codes `stationary = true` instead of reading the one live channel's `no_ramp_in_flight` | `parametric-eq/src/lib.rs` `render_mono` | `the_collapsed_body_renders_the_dual_bodys_left_plane` (deleted by TA4) | RED — 2 failed; a ramping block taking the interleaved cascade renders a coefficient that is not the one in force | `remaining` and `identity` are on the copy list and are not individually red, and the reason is worth stating: both are read only to choose a *schedule* — the interleaved cascade over the @@ -435,8 +435,8 @@ drives EQ ramps through prepared targets. Debug profile, AVX2 host (the EQ binds | # | mutation | gate that goes red | result | |---|---|---|---| -| 1278-M1 | `Channel::commit_track` stores a moving band's step as `(target - current) / remaining` instead of the carried step | `a_mid_ramp_restore_continues_bit_for_bit_at_every_sample` (deleted by TA4; KEEP catcher parametric-eq `response::asymmetric_cascade_sections_are_independent_and_bypass_is_total_identity`) (342 of 390 scalar and bank comparisons diverge, on all three ramps); the differential (`the instance restored from its snapshot rendered 0xbeb91443 where the lane, continuing, rendered 0xbeb91440`) | RED | -| 1278-M2 | the remaining-path walk held to the design's `NORM_TOLERANCE` instead of `RAMP_PATH_NORM_TOLERANCE` | `a_mid_ramp_restore_continues_bit_for_bit_at_every_sample` (deleted by TA4; KEEP catcher parametric-eq `response::asymmetric_cascade_sections_are_independent_and_bypass_is_total_identity`) (the 10 kHz bell refused at samples 0-63); the differential (`lane 1's snapshot refused by a fresh instance (effect.state.payload)`) | RED | +| 1278-M1 | `Channel::commit_track` stores a moving band's step as `(target - current) / remaining` instead of the carried step | `a_mid_ramp_restore_continues_bit_for_bit_at_every_sample` (deleted by TA4) (342 of 390 scalar and bank comparisons diverge, on all three ramps); the differential (`the instance restored from its snapshot rendered 0xbeb91443 where the lane, continuing, rendered 0xbeb91440`) | RED | +| 1278-M2 | the remaining-path walk held to the design's `NORM_TOLERANCE` instead of `RAMP_PATH_NORM_TOLERANCE` | `a_mid_ramp_restore_continues_bit_for_bit_at_every_sample` (deleted by TA4) (the 10 kHz bell refused at samples 0-63); the differential (`lane 1's snapshot refused by a fresh instance (effect.state.payload)`) | RED | | 1278-M3 | `PreparedParametricEq::restore_track` commits the left channel before decoding the right | `a_restore_refused_on_one_channel_moves_neither` (`the scalar instance moved`) | RED | ## #1328: exact rest, the input-gated joint flush and the desymmetrize caches @@ -468,11 +468,11 @@ it names, the named tests run, and the source restored. ## TA4 deletions -The 2026-10 test audit (TA4, batch 1 mutation measurement at `81a3074fc`) deleted the tests named below. Each one's caught mutants were also red in the KEEP test named beside it. That is the recorded catcher of the deleted test's sampled mutants; the mutation of each row above was not re-run. +The 2026-10 test audit (TA4, batch 1 mutation measurement at `81a3074fc`) deleted the tests named below. Where a KEEP test is named, batch 1 recorded it red on that test's sampled mutants in this crate; the mutation of each row above was not re-run. Where none is named, batch 1 recorded no same-crate catcher that could plausibly see the row's mutation. -- `automation_is_partition_invariant`: parametric-eq `randomized_restores::the_stationary_cascade_renders_the_full_cascade_after_random_restores` -- `every_width_matches_the_scalar_instantiation`: parametric-eq `randomized_restores::the_stationary_cascade_renders_the_full_cascade_after_random_restores` -- `the_collapsed_body_renders_the_dual_bodys_left_plane`: parametric-eq `response::asymmetric_cascade_sections_are_independent_and_bypass_is_total_identity` +- `automation_is_partition_invariant`: no plausible same-crate KEEP catcher recorded +- `every_width_matches_the_scalar_instantiation`: no plausible same-crate KEEP catcher recorded +- `the_collapsed_body_renders_the_dual_bodys_left_plane`: no plausible same-crate KEEP catcher recorded - `disabled_cuts_preserve_all_high_pass_signed_zero_against_four_section_oracle`: parametric-eq `elision::a_discontinuity_reset_mid_ramp_refreshes_the_identity_flag` - `a_tiny_restored_disabled_cut_state_refuses_elision_but_preserves_old_bands`: parametric-eq `elision::a_discontinuity_reset_mid_ramp_refreshes_the_identity_flag` -- `a_mid_ramp_restore_continues_bit_for_bit_at_every_sample`: parametric-eq `response::asymmetric_cascade_sections_are_independent_and_bypass_is_total_identity` +- `a_mid_ramp_restore_continues_bit_for_bit_at_every_sample`: no plausible same-crate KEEP catcher recorded diff --git a/crates/protocol/tests/MUTATIONS.md b/crates/protocol/tests/MUTATIONS.md index d697693f8..df37d9bb0 100644 --- a/crates/protocol/tests/MUTATIONS.md +++ b/crates/protocol/tests/MUTATIONS.md @@ -49,6 +49,6 @@ Driver: a scratch script (PR evidence, not committed), one mutation at a time on ## TA4 deletions -The 2026-10 test audit (TA4, batch 1 mutation measurement at `81a3074fc`) deleted the tests named below. Each one's caught mutants were also red in the KEEP test named beside it. That is the recorded catcher of the deleted test's sampled mutants; the mutation of each row above was not re-run. +The 2026-10 test audit (TA4, batch 1 mutation measurement at `81a3074fc`) deleted the tests named below. Where a KEEP test is named, batch 1 recorded it red on that test's sampled mutants in this crate; the mutation of each row above was not re-run. Where none is named, batch 1 recorded no same-crate catcher that could plausibly see the row's mutation. - `a_slot_set_change_that_skips_a_track_is_never_acknowledged`: protocol `console_session_edits::a_slot_set_change_that_skips_a_track_refuses_whole` diff --git a/crates/rack/src/lib.rs b/crates/rack/src/lib.rs index 74dc84cb1..d404f7601 100644 --- a/crates/rack/src/lib.rs +++ b/crates/rack/src/lib.rs @@ -2084,6 +2084,8 @@ const _: () = assert!( impl PreparedSlot { #[inline(always)] fn has_active_lanes(&self) -> bool { + #[cfg(test)] + TEST_PREPARED_ACTIVITY_QUERIES.with(|count| count.set(count.get() + 1)); self.active_lanes != 0 } @@ -2095,9 +2097,20 @@ impl PreparedSlot { #[cfg(test)] thread_local! { + static TEST_PREPARED_ACTIVITY_QUERIES: std::cell::Cell = const { std::cell::Cell::new(0) }; static TEST_PREPARED_DROPS: std::cell::Cell = const { std::cell::Cell::new(0) }; } +#[cfg(test)] +fn reset_prepared_activity_observation() { + TEST_PREPARED_ACTIVITY_QUERIES.with(|count| count.set(0)); +} + +#[cfg(test)] +fn prepared_activity_observation() -> usize { + TEST_PREPARED_ACTIVITY_QUERIES.with(std::cell::Cell::get) +} + /// The staged planar tiles for one ordered folded cohort. pub struct FoldCohort<'a> { lane_ids: &'a [usize], @@ -4984,6 +4997,141 @@ mod tests { exercise_trace_case(&seam_failure, Some(2), 149); } + #[test] + fn prepared_slot_dispatch_uses_constant_activity_checks() { + reset_prepared_activity_observation(); + let full = [true; 4]; + let specs = [ + TraceSpec { + id: 0, + mask: full, + seam: SeamSide::UpstreamOfSeam, + mono_capable: true, + fail: None, + delta: 1.0, + }, + TraceSpec { + id: 1, + mask: full, + seam: SeamSide::SeamSide, + mono_capable: false, + fail: None, + delta: 2.0, + }, + ]; + TEST_TRACE.with(|trace| *trace.borrow_mut() = TraceObservation::with_queues(&specs)); + let mut chain = BankChain::new( + AoSoaScratch::new(BankWidth::Four, 4).expect("scratch"), + vec![true; 4].into_boxed_slice(), + specs.into_iter().map(trace_slot).collect(), + ) + .expect("chain"); + let mut planes = Planes { + left: (0..4).map(|lane| vec![lane as f32; 4]).collect(), + right: (0..4).map(|lane| vec![32.0 + lane as f32; 4]).collect(), + }; + chain.force_mono_collapse_off(true); + chain + .run(&mut planes, 4, 0, LiveSnapshot::ALL) + .expect("ordinary run"); + assert!(!chain.is_collapsed()); + chain.force_mono_collapse_off(false); + chain.arm_mono_collapse(true); + chain + .run(&mut planes, 4, 4, LiveSnapshot::ALL) + .expect("collapsed run"); + assert!(chain.is_collapsed()); + assert_eq!(chain.collapses(), 1); + let trace = TEST_TRACE.with(|trace| trace.borrow().clone()); + assert_eq!( + trace.ordered_events(), + &[ + Some(TraceEvent { + kind: TraceKind::Begin, + stage: 0, + first_sample: 0, + frames: 0, + queue_before: 2, + arithmetic_before: 0 + }), + Some(TraceEvent { + kind: TraceKind::Begin, + stage: 1, + first_sample: 0, + frames: 0, + queue_before: 2, + arithmetic_before: 0 + }), + Some(TraceEvent { + kind: TraceKind::Dual, + stage: 0, + first_sample: 0, + frames: 4, + queue_before: 1, + arithmetic_before: 0 + }), + Some(TraceEvent { + kind: TraceKind::Dual, + stage: 1, + first_sample: 0, + frames: 4, + queue_before: 1, + arithmetic_before: 0 + }), + Some(TraceEvent { + kind: TraceKind::Begin, + stage: 0, + first_sample: 4, + frames: 0, + queue_before: 1, + arithmetic_before: 1 + }), + Some(TraceEvent { + kind: TraceKind::Begin, + stage: 1, + first_sample: 4, + frames: 0, + queue_before: 1, + arithmetic_before: 1 + }), + Some(TraceEvent { + kind: TraceKind::Mono, + stage: 0, + first_sample: 4, + frames: 4, + queue_before: 0, + arithmetic_before: 1 + }), + Some(TraceEvent { + kind: TraceKind::Dual, + stage: 1, + first_sample: 4, + frames: 4, + queue_before: 0, + arithmetic_before: 1 + }), + ] + ); + assert_eq!(trace.queues[..2], [0, 0]); + assert_eq!(trace.arithmetic[..2], [2, 2]); + assert_eq!( + trace_plane_bits(&planes), + ( + (0..4) + .map(|lane| vec![(lane as f32 + 6.0).to_bits(); 4]) + .collect(), + (0..4) + .map(|lane| vec![(lane as f32 + 6.0).to_bits(); 4]) + .collect(), + ) + ); + assert_eq!( + prepared_activity_observation(), + 10, + "ordinary, prefix-mono and seam-dual guards plus two stage publications" + ); + } + /// Every bit pattern a 32-bit word can carry that a permutation must not touch: quiet and /// signalling NaN payloads, both signed zeroes, both signed subnormals and both infinities. const HOSTILE: [f32; 10] = [ diff --git a/crates/soft-clip/tests/MUTATIONS.md b/crates/soft-clip/tests/MUTATIONS.md index 7fb383947..c57e8f925 100644 --- a/crates/soft-clip/tests/MUTATIONS.md +++ b/crates/soft-clip/tests/MUTATIONS.md @@ -28,7 +28,7 @@ cargo test --release --locked -p soft-clip --test | 3 | the odd-phase sample is read from row `base - 30` instead of `base - 31` | `src/kernel.rs` | `polyphase_identity` | RED | | 4 | the bypass mask is inverted | `src/kernel.rs` | `polyphase_identity` | RED | | 5 | the segment length is the first lane's countdown instead of the minimum over all lanes and parameters | `src/lib.rs` | `lane_identity` | RED | -| 6 | the kernel never writes `h.pos` back, keeping the history position in a local | `src/kernel.rs` | `partition_invariance` (deleted by TA4; KEEP catcher lane `sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts`) | RED | +| 6 | the kernel never writes `h.pos` back, keeping the history position in a local | `src/kernel.rs` | `partition_invariance` (deleted by TA4) | RED | | 7 | the §4.4 boundary check is skipped and every block is accepted | `src/lib.rs` | `boundary_check` | RED | | 8 | a `Vec::with_capacity(frames)` is added to the per-block driver | `src/lib.rs` | `allocation` | RED | | 9 | a restore writes the payload's ages in reverse order into the history | `src/lib.rs` | `state_roundtrip` | RED | @@ -112,6 +112,6 @@ mutation and the defect are the same edit. Both reset kinds are now inside the m ## TA4 deletions -The 2026-10 test audit (TA4, batch 1 mutation measurement at `81a3074fc`) deleted the tests named below. Each one's caught mutants were also red in the KEEP test named beside it. That is the recorded catcher of the deleted test's sampled mutants; the mutation of each row above was not re-run. +The 2026-10 test audit (TA4, batch 1 mutation measurement at `81a3074fc`) deleted the tests named below. Where a KEEP test is named, batch 1 recorded it red on that test's sampled mutants in this crate; the mutation of each row above was not re-run. Where none is named, batch 1 recorded no same-crate catcher that could plausibly see the row's mutation. -- `partition_invariance` (the test binary; its one test, `every_partition_renders_the_one_shot_bits_and_state`): lane `sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` +- `partition_invariance` (the test binary; its one test, `every_partition_renders_the_one_shot_bits_and_state`): no plausible same-crate KEEP catcher recorded diff --git a/crates/transient-shaper/tests/MUTATIONS.md b/crates/transient-shaper/tests/MUTATIONS.md index e60022a04..49ddbc030 100644 --- a/crates/transient-shaper/tests/MUTATIONS.md +++ b/crates/transient-shaper/tests/MUTATIONS.md @@ -187,6 +187,6 @@ dropped. ## TA4 deletions -The 2026-10 test audit (TA4, batch 1 mutation measurement at `81a3074fc`) deleted the tests named below. Each one's caught mutants were also red in the KEEP test named beside it. That is the recorded catcher of the deleted test's sampled mutants; the mutation of each row above was not re-run. +The 2026-10 test audit (TA4, batch 1 mutation measurement at `81a3074fc`) deleted the tests named below. Where a KEEP test is named, batch 1 recorded it red on that test's sampled mutants in this crate; the mutation of each row above was not re-run. Where none is named, batch 1 recorded no same-crate catcher that could plausibly see the row's mutation. -- `the_scalar_product_is_partition_invariant`: effect-runtime `contract_ramp_identity::linear_smoother_is_bit_identical_to_the_linear_ramp` +- `the_scalar_product_is_partition_invariant`: no plausible same-crate KEEP catcher recorded diff --git a/crates/true-peak-limiter/tests/MUTATIONS.md b/crates/true-peak-limiter/tests/MUTATIONS.md index 9485d87b6..f82d9df10 100644 --- a/crates/true-peak-limiter/tests/MUTATIONS.md +++ b/crates/true-peak-limiter/tests/MUTATIONS.md @@ -26,7 +26,7 @@ cargo test -p true-peak-limiter --lib phase_outputs | 5 | `smoothed = box_sum / window` → `smoothed = quantised` (box smoother removed, bare minimum applied) | `src/lib.rs` `channel_frame` | `the_gain_ramp_falls_gradually_and_arrives_at_the_requirement` | | 6 | `flush(target.max(released))` → `target.max(released)` | `src/lib.rs` `channel_frame` | `silence_restores_exact_identity_including_signed_zero` | | 7 | van Herk suffix pass guarded by `complete && width < 2`, so it never runs at W4/W8 | `src/lib.rs` `sliding_minimum` | `lane_identity_holds_across_widths` | -| 8 | `left.prefix.fill(1.0)` / `right.prefix.fill(1.0)` at block entry (min-filter prefix not carried across blocks) | `src/lib.rs` `limiter_block` | `partition_invariance_holds_over_block_sizes` (deleted by TA4; KEEP catcher lane `sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts`) | +| 8 | `left.prefix.fill(1.0)` / `right.prefix.fill(1.0)` at block entry (min-filter prefix not carried across blocks) | `src/lib.rs` `limiter_block` | `partition_invariance_holds_over_block_sizes` (deleted by TA4) | | 9 | `return;` inserted after `limiter_block` so the §4.4 boundary check never runs | `src/lib.rs` `LimiterCore::process_block` | `a_nonfinite_block_is_zeroed_reset_and_counted` | | 10 | the `recomputed == box_sum` check in restore disabled | `src/lib.rs` `read_lane` | `state_round_trips_and_rejects_corruption` | | 11 | `peak = history[6].abs()` → `peak = L::zero()` (sample term dropped from `P`) | `src/lib.rs` `detector_peak` | `fixed_latency_guarded_ceiling_and_bypass_bits_hold` | @@ -145,7 +145,7 @@ Every row below is a **bit** test. The claims here are about *when* a state word | # | mutation | file | test that turned red | |---|---|---|---| -| round2-1 | the block-end write-back of `prefix` dropped | `src/lib.rs` `limiter_block_uniform` | `a_mixed_lookahead_cohort_falls_back_bit_identically`, `a_restore_that_desyncs_the_phase_falls_back`, `fixed_latency_guarded_ceiling_and_bypass_bits_hold`, `lane_identity_holds_across_widths`, `partition_invariance_holds_over_block_sizes` (deleted by TA4; KEEP catcher lane `sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts`) | +| round2-1 | the block-end write-back of `prefix` dropped | `src/lib.rs` `limiter_block_uniform` | `a_mixed_lookahead_cohort_falls_back_bit_identically`, `a_restore_that_desyncs_the_phase_falls_back`, `fixed_latency_guarded_ceiling_and_bypass_bits_hold`, `lane_identity_holds_across_widths`, `partition_invariance_holds_over_block_sizes` (deleted by TA4) | | round2-2 | the block-end write-back of `phase` dropped, so the cohort restarts each block at the phase it entered the previous one with | `src/lib.rs` `limiter_block_uniform` | `a_de_zipper_window_open_across_a_block_boundary_refuses_the_claim`, `a_mixed_lookahead_cohort_falls_back_bit_identically`, `a_negative_zero_input_block_is_not_treated_as_silence`, `a_restore_that_desyncs_the_phase_falls_back`, `a_restore_withdraws_the_silence_claim`, `a_settled_silent_limiter_renders_exactly_the_never_fast_path` | | round2-3 | `.min(ring - left_end)` dropped from the segment run | `src/lib.rs` `segment` | `the_segment_walk_visits_the_slots_a_frame_at_a_time_walk_visits` — **and nothing else** | | round2-4 | `.min(ring - left_expiring)` dropped from the segment run | `src/lib.rs` `segment` | `the_segment_walk_visits_the_slots_a_frame_at_a_time_walk_visits` — **and nothing else** | @@ -158,7 +158,7 @@ Every row below is a **bit** test. The claims here are about *when* a state word | round2-11 | the alignment sample read from tap 0 instead of tap 6 | `src/lib.rs` `detector_peak` | `every_case_has_one_digest_at_every_width` (the E12 `D90_DIGESTS`) | | round2-12 | the left channel takes the **right** channel's block-end phase: `left.phase.fill(left_phase)` → `fill(right_phase)` | `src/lib.rs` `limiter_block_uniform` | `the_two_channels_of_a_uniform_cohort_keep_their_own_phases` — **and nothing else** | | round2-13 | the mirror of round2-12: `right.phase.fill(right_phase)` → `fill(left_phase)` | `src/lib.rs` `limiter_block_uniform` | `the_two_channels_of_a_uniform_cohort_keep_their_own_phases` — **and nothing else** | -| round2-14 | the two channels' block-end `prefix` write-backs are swapped | `src/lib.rs` `limiter_block_uniform` | seven tests, including `lane_identity_holds_across_widths`, `partition_invariance_holds_over_block_sizes` (deleted by TA4; KEEP catcher lane `sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts`), `output_true_peak_never_exceeds_the_ceiling` and `passes_effect_contract_conformance` | +| round2-14 | the two channels' block-end `prefix` write-backs are swapped | `src/lib.rs` `limiter_block_uniform` | seven tests, including `lane_identity_holds_across_widths`, `partition_invariance_holds_over_block_sizes` (deleted by TA4), `output_true_peak_never_exceeds_the_ceiling` and `passes_effect_contract_conformance` | ### Why a crossed phase needed its own test and a crossed prefix did not @@ -644,6 +644,6 @@ lane 7; the session test's `ch48` row still owns E0 and EL at `Simd8`. ## TA4 deletions -The 2026-10 test audit (TA4, batch 1 mutation measurement at `81a3074fc`) deleted the tests named below. Each one's caught mutants were also red in the KEEP test named beside it. That is the recorded catcher of the deleted test's sampled mutants; the mutation of each row above was not re-run. +The 2026-10 test audit (TA4, batch 1 mutation measurement at `81a3074fc`) deleted the tests named below. Where a KEEP test is named, batch 1 recorded it red on that test's sampled mutants in this crate; the mutation of each row above was not re-run. Where none is named, batch 1 recorded no same-crate catcher that could plausibly see the row's mutation. -- `partition_invariance_holds_over_block_sizes`: lane `sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` +- `partition_invariance_holds_over_block_sizes`: no plausible same-crate KEEP catcher recorded diff --git a/docs/C_ABI_V1_QUALIFICATION.md b/docs/C_ABI_V1_QUALIFICATION.md index 984cb0eee..d80d52590 100644 --- a/docs/C_ABI_V1_QUALIFICATION.md +++ b/docs/C_ABI_V1_QUALIFICATION.md @@ -1092,4 +1092,4 @@ that window is admitted against the plan that renders. `an_edit_that_supersedes_a_discontinuity_successor_is_prepared_at_it`; `host-core` `successor_swap::a_declared_discontinuity_resets_the_floors_at_every_rate_and_width`; `host-web` `tests::structural_apply::a_declared_discontinuity_resets_the_floors_on_the_browser` and the - parity row `control_parity::a_declared_discontinuity_resets_the_floors_alike_on_both_hosts` (deleted by TA4; KEEP catcher graph `program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers`). + parity row `control_parity::a_declared_discontinuity_resets_the_floors_alike_on_both_hosts` (deleted by TA4). diff --git a/hosts/host-web/MUTATIONS.md b/hosts/host-web/MUTATIONS.md index ccba6402b..cd710ca5d 100644 --- a/hosts/host-web/MUTATIONS.md +++ b/hosts/host-web/MUTATIONS.md @@ -4,7 +4,7 @@ | `check-web-audioworklet-callgraph.py --self-test` (a)-(f) | synthetic disassembly per case | each case is the red mutation of one rule; the runner fails if any escapes | | `test-web-audioworklet.mjs` trap-containment test (F5) | remove the `try` around `miso_engine_web_v1_render` in `process()` | the `process()` call throws instead of returning `true` | | `tests::facade_source_rules_reach_the_browser_host` (F1) | delete the `end_of_region != (end == region_end)` check from `host_core::SourceControlSet::submit` | the region-end submission returns `RESULT_BACKPRESSURE` (6) instead of `RESULT_INVALID_ARGUMENT` (1) | -| `tests::default_ring_covers_stall_tolerance` (deleted by TA4; KEEP catcher host-core `prepare::default_ring_derivation_covers_the_stall_and_two_in_flight_quanta`) (F3) | `+ 2` -> `+ 1` in `default_source_ring_frames` | 48 000/128 yields 4 992 where 5 120 is required | +| `tests::default_ring_covers_stall_tolerance` (deleted by TA4) (F3) | `+ 2` -> `+ 1` in `default_source_ring_frames` | 48 000/128 yields 4 992 where 5 120 is required | | `tests::ring_prefill_survives_stall` (F3) | `SOURCE_STALL_TOLERANCE_MS = 50` (a 21-quantum ring) | the ring runs dry mid-stall and a starved quantum renders zeros instead of the ramp | | `test-web-audioworklet.mjs` pipelining test (F3) | make `#saturated` return `true` at one unsettled source request | the second of four in-flight chunks is refused and its planes are never transferred | | `tests::native_identity_session_digest_pins_the_wasm_parity` + `direct-oracle.mjs` parity assertion (F4/E4) | flip one hex digit of `directOracle.nativePcmF32leSha256` in `expected.json` | both legs fail against the pin, and they fail with the same value | @@ -568,6 +568,6 @@ qualification of decision 15's heavy gates" (#1605) or the first CI run that app ## TA4 deletions -The 2026-10 test audit (TA4, batch 1 mutation measurement at `81a3074fc`) deleted the tests named below. Each one's caught mutants were also red in the KEEP test named beside it. That is the recorded catcher of the deleted test's sampled mutants; the mutation of each row above was not re-run. +The 2026-10 test audit (TA4, batch 1 mutation measurement at `81a3074fc`) deleted the tests named below. Where a KEEP test is named, batch 1 recorded it red on that test's sampled mutants in this crate; the mutation of each row above was not re-run. Where none is named, batch 1 recorded no same-crate catcher that could plausibly see the row's mutation. -- `default_ring_covers_stall_tolerance`: host-core `prepare::default_ring_derivation_covers_the_stall_and_two_in_flight_quanta` +- `default_ring_covers_stall_tolerance`: no plausible same-crate KEEP catcher recorded From e4bf72796975a6751b16f8364b6d5d49b62dca81 Mon Sep 17 00:00:00 2001 From: BL Date: Tue, 20 Oct 2026 03:02:43 +0000 Subject: [PATCH 10/10] Number the TA4 specs: #1729, #1730, #1731 The TA4 spec's per-test catcher list moves to two comments on #1731, because the full list is longer than a GitHub issue body allows. Co-Authored-By: Claude Opus 5.5 --- ...> 1729-test-the-fp-environment-refusal.md} | 0 ...1730-remove-test-only-public-functions.md} | 2 +- ...731-delete-the-measured-redundant-tests.md | 293 ++++++++++ ...TA4-delete-the-measured-redundant-tests.md | 521 ------------------ 4 files changed, 294 insertions(+), 522 deletions(-) rename .github/ISSUE_SPECS/{TBD-TA4-gap-1-test-the-fp-environment-refusal.md => 1729-test-the-fp-environment-refusal.md} (100%) rename .github/ISSUE_SPECS/{TBD-TA4-gap-2-remove-test-only-public-functions.md => 1730-remove-test-only-public-functions.md} (77%) create mode 100644 .github/ISSUE_SPECS/1731-delete-the-measured-redundant-tests.md delete mode 100644 .github/ISSUE_SPECS/TBD-TA4-delete-the-measured-redundant-tests.md diff --git a/.github/ISSUE_SPECS/TBD-TA4-gap-1-test-the-fp-environment-refusal.md b/.github/ISSUE_SPECS/1729-test-the-fp-environment-refusal.md similarity index 100% rename from .github/ISSUE_SPECS/TBD-TA4-gap-1-test-the-fp-environment-refusal.md rename to .github/ISSUE_SPECS/1729-test-the-fp-environment-refusal.md diff --git a/.github/ISSUE_SPECS/TBD-TA4-gap-2-remove-test-only-public-functions.md b/.github/ISSUE_SPECS/1730-remove-test-only-public-functions.md similarity index 77% rename from .github/ISSUE_SPECS/TBD-TA4-gap-2-remove-test-only-public-functions.md rename to .github/ISSUE_SPECS/1730-remove-test-only-public-functions.md index e5c2b10b3..653da9ac4 100644 --- a/.github/ISSUE_SPECS/TBD-TA4-gap-2-remove-test-only-public-functions.md +++ b/.github/ISSUE_SPECS/1730-remove-test-only-public-functions.md @@ -8,7 +8,7 @@ This public function has no caller outside tests (checked at `b9135008d` with a - `source::PcmSourceConsumer::read_block` and its `validate_output_shape` (`crates/source/src/lib.rs`): only `crates/source`'s unit tests and `tests/` call them; the render path reads a source through `begin_block_at` and its played planes (`crates/graph/src/runtime.rs`, `crates/host-core/src/source.rs`). -TA4 (`TBD-TA4-delete-the-measured-redundant-tests.md`, item 4) already deleted the other items the survivor audit found: `conformance::PlanarBlock` and `compare_f32_to_f64` (survivors m9108, m9109, m9111, m9118) and the `effect_contract` `map_stepped_normalized` family (m16329, m16330). What is left is the source item above (m42034). +TA4 (`1731-delete-the-measured-redundant-tests.md`, item 4) already deleted the other items the survivor audit found: `conformance::PlanarBlock` and `compare_f32_to_f64` (survivors m9108, m9109, m9111, m9118) and the `effect_contract` `map_stepped_normalized` family (m16329, m16330). What is left is the source item above (m42034). Dead public code carries tests and review cost and hides real gaps from mutation testing. diff --git a/.github/ISSUE_SPECS/1731-delete-the-measured-redundant-tests.md b/.github/ISSUE_SPECS/1731-delete-the-measured-redundant-tests.md new file mode 100644 index 000000000..71405ea5b --- /dev/null +++ b/.github/ISSUE_SPECS/1731-delete-the-measured-redundant-tests.md @@ -0,0 +1,293 @@ +# Delete the tests that mutation measurement found redundant (test audit TA4) + +Owner approval: option A, relayed by root on 2026-10-20: delete what batch 1 measured redundant now, +sample batch 2, and end the audit with one PR (TA5) from that sample. Branch: +`codex/batch-test-policy-3`, from `main` at `b9135008d` (TA1 #1722, TA2 #1724 and TA3 #1726 merged). +Phase B PR 4 of the 2026-10 test audit. + +## Method (batch 1) + +Batch 1 is the 2026-10-19 stage 3 run at base `81a3074fc` (6.0 h; method and data kept with the +audit's working notes, `m/README.md`). Its candidates were the 180 reading-agent DELETE/UNSURE rows +outside the policy classes and the never-delete classes. cargo-mutants 27.1.0 mutants were drawn +from functions each candidate covers (stage 1 coverage map), up to 4 catches or 12 tries per +candidate; each viable mutant ran every candidate that covers its function and then the covering +KEEP tests. 392 mutants, 292 viable, 21 survivors. + +- MEASURED-REDUNDANT: every mutant the candidate caught was also red in a KEEP test. +- REDUNDANT-IF-PEER-KEPT: some catches were made only by candidates; a greedy cover over those + catches keeps 4 tests and drops the rest. +- UNIQUE: at least one mutant only this test caught. THIN, WEAK, NO-COVERAGE: too few tries or + catches to judge. + +MEASURED-REDUNDANT cannot see allocation, count or ceiling claims; tests whose claim is one of these +are kept or restored. The verifier's review restored three such tests (below, "Restored"). The +deleted capi `set_control::automated_vca` tests (`a_vca_move_over_an_automated_member_is_live_and_renders_the_prepared_plan`, +`vca_reach_and_count_changes_over_an_automated_member_are_live`, through the deleted helper `case`), +`set_control::automated_hand_move::a_hand_move_on_an_automated_fader_is_live_and_renders_the_stored_offset` +(through the deleted helper `leg`) and `set_control::automated_carry::an_exact_unmute_that_frees_a_held_lane_discharges_the_owed_move` +also asserted that every render block after the live edit makes 0 allocations and 0 frees on the +C ABI (`bench_support::alloc` thread counters). The same render path still has its allocation +counts in host-core: `tests/stored_vca_automation.rs` (`rig.allocations == (0, 0)` on the render +thread in its VCA ride, mute and carry tests) and `tests/stored_fader_automation.rs` +(`rendering_fader_events_allocates_nothing`, and the carry runs' swap-block counts). + +"Redundant" means: no mutant of the sample needs this test. It is not a proof over all mutants, +and the KEEP catchers below are the recorded catchers of the sampled mutants, not of every row +mutation that a `MUTATIONS.md` names. + +## What this change does + +1. Deletes 137 of the 142 MEASURED-REDUNDANT tests: 2 no longer exist as measured and 3 are + restored after review (both below, "Skipped" and "Restored"). +2. Deletes the 8 REDUNDANT-IF-PEER-KEPT tests that the greedy cover drops. The cover keeps 4: + `audit` `vectorization::tests::rust_disambiguator_suffix_is_narrowly_supported` and + `parametric-eq` `malformed_requests_preserve_output_sentinels_and_opaque_ids` stay; + `conformance` `tolerance_boundary_tie_and_snr_cases_are_explicit` and `effect-runtime` + `the_mapping_inverse_round_trips` are UNIQUE only on test-only code and go with it (item 4). + Deviation from root's brief, which said "delete 6": the data has 10 IF-PEER-KEPT rows. The + cover keeps 2 of them; its other 2 kept tests are UNIQUE rows, not IF-PEER-KEPT. So the cover + drops 8, and all 8 are deleted. Evidence per test (its candidate-only mutants, and who still + catches them): + - `conformance` `scaled_sum_squares_handles_extreme_finite_values` (m9174, m9175, m9176, + m9193) and `block_metrics_and_repeat_bits_cover_boundaries` (m9120, m9121, m9122): every + mutant is in `compare.rs`, which item 4 deletes; `tolerance_boundary_tie_and_snr_cases_are_explicit` + also caught each one. + - `effect-runtime` `mapping_is_exact_at_the_ends_and_monotone`, + `a_logarithmic_mapping_is_constant_ratio` (m17453, m17454) and + `a_degenerate_range_has_no_position` (m17453, m17454, m17480): every mutant is in + `params::map_normalized`/`inverse_map_normalized`, which item 4 deletes; + `the_mapping_inverse_round_trips` also caught each one. + - `audit` `near_name_impostor_does_not_satisfy_probe` and + `exact_probe_path_and_body_boundaries_are_preserved` (m4430): also red in the kept + `rust_disambiguator_suffix_is_narrowly_supported`. + - `parametric-eq` `common_eq_adapter_preserves_input_ownership_capacity_and_refusal_sentinels` + (m35416): also red in the kept `malformed_requests_preserve_output_sentinels_and_opaque_ids`. +3. Keeps every UNIQUE (except item 4), THIN, WEAK and NO-COVERAGE test. +4. Deletes code that only tests call, with its UNIQUE tests. Proof: `git grep` over `crates/`, + `hosts/` and `tools/` outside test code finds no caller, and the workspace builds warning-free + without it (`cargo clippy --workspace --all-targets --all-features -- -D warnings`). + - `conformance` `PlanarBlock`/`BlockError` (`src/block.rs`, 68 lines), `compare_f32_to_f64` and + its report types (`src/compare.rs`, 235), `verify_bit_exact_repeat`/`DeterminismError` + (`src/determinism.rs`, 34): only the crate's own tests used them. Deleted with + `tests/api_metrics.rs` (100; UNIQUE `tolerance_boundary_tie_and_snr_cases_are_explicit` and + `invalid_rates_shapes_tolerances_and_nonfinite_values_are_typed`), the lib test + `block_metrics_and_repeat_bits_cover_boundaries`, and the two `PlanarBlock` assertions of + the KEEP test `fixtures.rs` `planar_blocks_and_fixtures_accept_only_launch_rates`, renamed + `fixtures_accept_only_launch_rates` (its fixture assertions stay). + - `effect-contract` `map_normalized`, `inverse_map_normalized`, `map_stepped_normalized`, + `inverse_map_stepped_normalized` (`src/lib.rs:1220-1285`): no product caller. Deleted with + UNIQUE `conformance` `normalized_mapping_endpoints_ties_and_round_trips_are_stable`. + - `effect-runtime` `params::map_normalized`, `params::inverse_map_normalized` + (`src/params.rs:182-229`): no product caller. Deleted with UNIQUE + `the_mapping_inverse_round_trips` and its three IF-PEER-KEPT peers. The + `check-effect-runtime-policy.sh` ratchet rows for the pair go to 0. + - `lane` `CanonicalFpEnv::saved_word` (`src/fpenv.rs:533-538` and `:590-593`): no product + caller. Deleted with UNIQUE `fp_env.rs` `the_canonical_word_is_the_word_inside_the_guard` + (its install and restore assertions are the KEEP tests' catches). + - Kept: `controls` `ControlDescriptor::range_contains` (UNIQUE `domain_boundaries`), + `audit` `is_encoding_token` and `symbol_header` (UNIQUE `call_inside_kernel_body_is_red`, + `malformed_prose_and_instruction_prefixes_do_not_own_probe_body`) and `builtins` + `PreparedInputFilterResponse::retained_bytes` (UNIQUE + `common_builtin_adapter_preserves_resource_and_refusal_contract`; host-core `response.rs` + calls it through the trait): product code calls each of them. +5. Deletes helpers only after the compiler reported them unused (dead_code or unused imports under + clippy `--all-targets --all-features`), looped until it reported nothing. No + `#[allow(dead_code)]` was added. Test files left with no test are deleted whole. +6. Updates the references: each `MUTATIONS.md` row or doc line that names a deleted test now says + "deleted by TA4". It names a KEEP catcher only where batch 1 recorded that catcher red on the + deleted test's mutants in the same crate and it can plausibly see the row's mutation; otherwise + it names none. Each such `MUTATIONS.md` ends with a "TA4 deletions" list. Open specs that name a deleted test or file + (#1290, #1350, #1406, #1654, #1696, #1722) say so in place. + +## Non-goals + +- No product render, prepare or control path changes. Item 4 deletes only code no product path + calls. +- No new tests. The 21 survivors are TA4's other half (agent T4S, merged in later). +- Dated records under `docs/handoffs`, `docs/audits` and `artifacts/` and the rename table in + `docs/rulings/de-versioning-inventory.md` are history and are not edited. + +## Objective gates + +Every `run:` step of the qualification `lint` job (fmt, workspace clippy `-D warnings`, +`RUSTDOCFLAGS='-D warnings' cargo doc --locked --workspace --no-deps`, the hermetic policy gates), +and `cargo test --locked --all-features -p ` for every touched package. + +## Evidence + +Line numbers are at `b9135008d`. Each test lists the number of sampled mutants it caught and the +KEEP tests that were also red on them (count per catcher; "other candidates only" are the cover's +peers, "timeout" is a 20-minute KEEP run counted as caught). + +### Deleted tests (150, 6,905 lines) + +Tests per package: audit 7; bench 1; builtins 7; builtins-compiler 2; capi 18; compressor 7; conformance 6; console-workload 7; delay 1; effect-contract 6; effect-runtime 12; engine 2; gate-expander 4; graph 3; graph-compiler 8; host-web 9; lane 8; math 2; multiband-compressor 1; parametric-eq 10; protocol 5; realtime-policy 4; session 2; session-validator 3; soft-clip 3; source 9; transient-shaper 1; true-peak-limiter 2. + +The list of each deleted test, with its location at `b9135008d`, its caught mutants and the KEEP +tests that were also red on them, is too long for an issue body. It is in the two comments on this +issue ("Deleted tests, part 1/2" and "part 2/2"), and the PR diff is the list of what went. + +### Deleted test files (whole) + +- `crates/conformance/src/block.rs` (68), `src/compare.rs` (235), `src/determinism.rs` (34), + `tests/api_metrics.rs` (100): item 4. +- `crates/soft-clip/tests/partition_invariance.rs` (118), `crates/source/tests/seek_schedule_model.rs` + (533), `hosts/host-web/tests/retained_ceilings.rs` (294), `tools/session-validator/tests/skill.rs` + (111): every test in them is listed above; their helpers go with them. `retained_ceilings.rs` + held the native budgets of the browser identity fixture: the shipped wasm32 artifact's ceilings + stay in `expected.json` (checked by `check-browser-expected-resources.py`); the deleted file + ceilinged only the native 8- and 4-lane builds, which do not ship. host-web's `lane` + dev-dependency served only it and the deleted `canonical_live` module, so it goes too + (`Cargo.lock` loses that edge). + +### Deleted helpers (compiler-reported, 71 items, 2,041 lines) + +- `Command`, `crates/builtins/tests/stage.rs:860-883` +- `automation_script`, `crates/builtins/tests/stage.rs:885-960` +- `render_banked`, `crates/builtins/tests/stage.rs:962-1054` +- `render_per_track`, `crates/builtins/tests/stage.rs:1056-1117` +- `document`, `crates/capi/src/runtime/live_tests.rs:8409-8417` +- `vca_at`, `crates/capi/src/runtime/live_tests.rs:8419-8425` +- `writes`, `crates/capi/src/runtime/live_tests.rs:8427-8445` +- `case`, `crates/capi/src/runtime/live_tests.rs:8447-8516` +- `fader_length`, `crates/capi/src/runtime/live_tests.rs:8518-8525` +- `fader_rows`, `crates/capi/src/runtime/live_tests.rs:9867-9879` +- `Leg`, `crates/capi/src/runtime/live_tests.rs:9881-9888` +- `leg`, `crates/capi/src/runtime/live_tests.rs:9890-9931` +- `follows_mute_edit`, `crates/capi/src/runtime/live_tests.rs:11380-11394` +- `route_entry`, `crates/capi/src/runtime/live_tests.rs:11500-11519` +- `a_reverted_owner_carries_from_p0`, `crates/capi/src/runtime/supersede_tests.rs:818-842` +- `upsert_added_source`, `crates/capi/src/runtime/supersede_tests.rs:1267-1286` +- `remove_source_track`, `crates/capi/src/runtime/supersede_tests.rs:1288-1299` +- `FreshSourceCase`, `crates/capi/src/runtime/supersede_tests.rs:1301-1313` +- `fresh_source_cases`, `crates/capi/src/runtime/supersede_tests.rs:1315-1354` +- `FRAMES`, `crates/compressor/tests/lane_identity.rs:24-24` +- `QUANTUM`, `crates/compressor/tests/lane_identity.rs:25-25` +- `track_values`, `crates/compressor/tests/lane_identity.rs:27-40` +- `every_parameter`, `crates/compressor/tests/partition.rs:26-45` +- `OVERFLOWING_KNEES`, `crates/effect-runtime/tests/dynamics.rs:237-246` +- `NARROWEST_SOFT_KNEES`, `crates/effect-runtime/tests/dynamics.rs:248-255` +- `track_values`, `crates/gate-expander/tests/identity.rs:12-29` +- `render_bank_native`, `crates/gate-expander/tests/identity.rs:31-70` +- `compile_bank_and_per_node`, `crates/graph-compiler/src/lib.rs:1141-1196` +- `taps`, `crates/graph-compiler/tests/compile_shapes.rs:376-386` +- `representative_console`, `crates/graph-compiler/tests/compile_shapes.rs:388-469` +- `assert_estimate_moves_by_the_route_activity_charge`, `crates/graph-compiler/tests/route_coefficients.rs:544-578` +- `assert_width_matches_reference`, `crates/graph/src/runtime.rs:12313-12427` +- `compare_holey_population`, `crates/lane/tests/fader_matrix.rs:430-502` +- `run_scalar`, `crates/lane/tests/fader_matrix.rs:510-543` +- `pair_cases`, `crates/lane/tests/g4_flush.rs:262-350` +- `invalid_lane_at`, `crates/lane/tests/meter_peak.rs:178-220` +- `F1_SHAPER_LEVEL_MIN`, `crates/math/tests/f1_fast_db_bounds.rs:561-561` +- `worst_over_run`, `crates/math/tests/f1_fast_db_bounds.rs:866-901` +- `crossing_worst_db`, `crates/math/tests/f1_fast_db_bounds.rs:903-925` +- `original_four`, `crates/parametric-eq/src/lib.rs:4238-4248` +- `process_original_four`, `crates/parametric-eq/src/lib.rs:4250-4261` +- `process_original_four_ramped`, `crates/parametric-eq/src/lib.rs:4263-4303` +- `all_high_pass_channel`, `crates/parametric-eq/src/lib.rs:4305-4330` +- `original_state_bits`, `crates/parametric-eq/src/lib.rs:4332-4346` +- `compare_disabled_cuts_to_original_four`, `crates/parametric-eq/src/lib.rs:4348-4456` +- `compare_signed_zero_refusal`, `crates/parametric-eq/src/lib.rs:4458-4548` +- `disabled_cuts_general_ramp_parity`, `crates/parametric-eq/src/lib.rs:4828-4894` +- `tiny_disabled_cut_state`, `crates/parametric-eq/src/lib.rs:4906-4944` +- `TAIL`, `crates/parametric-eq/tests/carry.rs:34-35` +- `bank_tail`, `crates/parametric-eq/tests/carry.rs:130-188` +- `refusal_codes`, `crates/protocol/tests/vca_edits.rs:278-297` +- `Refusal`, `crates/protocol/tests/vca_edits.rs:299-304` +- `Rendered`, `crates/transient-shaper/tests/partition.rs:34-35` +- `FADER_RAMP`, `hosts/host-web/src/tests.rs:7063-7065` +- `live_fader`, `hosts/host-web/src/tests.rs:7067-7097` +- `seek_ride`, `hosts/host-web/src/tests.rs:10269-10297` +- `seek_ride_blocks`, `hosts/host-web/src/tests.rs:10299-10317` +- `MEMBER_DB`, `hosts/host-web/src/tests.rs:10545-10546` +- `OFFSET_DB`, `hosts/host-web/src/tests.rs:10547-10547` +- `MEMBER`, `hosts/host-web/src/tests.rs:10548-10549` +- `CURVE_DB`, `hosts/host-web/src/tests.rs:10550-10554` +- `VCA_DB`, `hosts/host-web/src/tests.rs:10555-10555` +- `HAND_DB`, `hosts/host-web/src/tests.rs:10556-10556` +- `PRIOR_HAND_DB`, `hosts/host-web/src/tests.rs:10557-10557` +- `model`, `hosts/host-web/src/tests.rs:10559-10567` +- `set`, `hosts/host-web/src/tests.rs:10569-10581` +- `frame`, `hosts/host-web/src/tests.rs:10583-10599` +- `applied`, `hosts/host-web/src/tests.rs:10601-10614` +- `live_move_under_hostile_word`, `hosts/host-web/src/tests.rs:10616-10683` +- `automated`, `hosts/host-web/src/tests.rs:10766-10792` +- `benchmark_text_mutation`, `tools/audit/src/fixture_builtins.rs:5752-5763` + +Also: the `parametric-eq` +`carry.rs` `Ramp::name` field (read only by deleted tests; each ramp keeps its name as a comment); +the emptied `host-web` `tests::canonical_live` module. + +Lead for a successor, not fixed here (the compiler does not report it): `builtins` +`MATRIX_SELECT_FREE_BLOCKS` and `FUSED_SELECT_FREE_BLOCKS` (`crates/builtins/src/lib.rs`) are +`#[cfg(test)]` counters that are now written and never read. Their readers were the deleted +`settled_matrix_takes_the_select_free_arm_only_without_an_identity_lane` and +`fused_fader_matrix_takes_the_select_free_arm_only_without_an_identity_lane`. + +### Restored after review + +The TA4 verifier (READY WITH FIXES) restored these exactly as at `b9135008d`: + +- `graph` `program::tests::a_bank_window_never_recycles_a_physical_slot` (the #169 minimal + reproduction; a regression reproducer is never-delete) and + `no_slot_is_recycled_inside_a_merged_bank_window`, with their helpers `dynamic_track` and + `dynamic_effect` (`crates/graph/src/program/tests.rs`), and the `program.rs` doc line that cites + the first. +- `rack` `tests::prepared_slot_dispatch_uses_constant_activity_checks` (a count claim: the dispatch + makes a constant number of activity checks, which mutation cannot see), with the `#[cfg(test)]` + `TEST_PREPARED_ACTIVITY_QUERIES` counter, its increment in `PreparedSlot::has_active_lanes` and + its readers `reset_prepared_activity_observation` and `prepared_activity_observation`. + +### The browser hostile-FP live gate + +TA4 deleted host-web `tests::canonical_live::a_live_fader_and_vca_move_under_a_hostile_caller_word_render_the_canonical_bits` +(#1709 D2). The capi test of the same name stays (`crates/capi/src/runtime/live_tests.rs:8158`), +so the browser side of that check is gone. `1729-test-the-fp-environment-refusal.md` +records it in case the owner wants the browser side back. + +### Skipped + +- `graph-compiler` `live_routes.rs` `route_control_resources_cover_the_allocation` and + `gate-expander` `contract.rs` `bypass_is_exact_identity_at_all_rates`: TA1 trimmed the first and + TA2 rewrote the second after the measurement, so the measured test no longer exists. Both stay. +- The cover's kept `audit` `rust_disambiguator_suffix_is_narrowly_supported` and `parametric-eq` + `malformed_requests_preserve_output_sentinels_and_opaque_ids`. + +## Survivor gaps + +Batch 1 left 21 survivors: viable mutants that no candidate and no covering KEEP test turned red. +Agent T4S classified each one (branch `codex/batch-test-gaps-ta4`, merged here): + +- EQUIVALENT 6: m38090 (rack `BankStage::begin_block` default body), m26403 (lane + `scheduling_barrier`, an empty `asm!`), m26693 (lane scalar select: disjoint bits, so `|` is `^`), + m4419 (audit `vectorization.rs:336`, the next clause catches it), m35318 and m6786 + (`Complex::is_finite` in parametric-eq and builtins responses: a later finite check catches + every non-finite value). +- UNREACHABLE 3: m17240 and m17239 (effect-contract `ExactDecimal::parse`; its one product caller + passes canonical digits only) and m26408 (lane `attest_fp_environment` refusals, which need a + control word that does not read back). m26408 goes to + `1729-test-the-fp-environment-refusal.md` (a pure decision seam and its test). +- DEAD CODE 7: m9108, m9109, m9111, m9118 (`conformance` `PlanarBlock`, `compare_f32_to_f64`) and + m16329, m16330 (`effect-contract` `map_stepped_normalized`) are in code that item 4 deleted. + m42034 (`source` `validate_output_shape`, reached only through the test-only `read_block`) goes + to `1730-remove-test-only-public-functions.md`. +- REAL GAP 5, closed by 4 new tests. Each was red with its mutant applied and is green on the branch: + - m18792, gate-expander `tests/state.rs::a_subnormal_gain_word_is_refused` (red at + `state.rs:886`). A restore that stops refusing a subnormal gain word (`normal_or_zero` + dropped or weakened) turns it red; no other test feeds a gain word outside the normal/zero set. + - m41330 and m41333, session-validator + `tests/validate.rs::the_report_labels_each_stage_and_prints_every_message_line` (red at the + label assertion, `validate.rs:487`, and at the multi-line assertion, `:512`). A report that + loses its stage labels or drops message lines turns it red; the other tests only compare two + renders or search stderr for the result line. + - m39691, realtime-policy `tests/policy/drain/forms.rs` row `count-in-an-expression-macro` (red in + `a_count_that_the_rule_cannot_prove_is_refused`). A D7 check that stops seeing a count used + inside a non-assert macro in expression position turns it red. + - m39758, realtime-policy `tests/policy/drain/outer.rs` row + `array-from-fn-after-a-field-named-std` (red in + `a_constructor_that_loops_is_refused_anywhere_in_a_region`). An `array::from_fn` exemption that + matches a path with a single `:` turns it red. + +Successors: `1729-test-the-fp-environment-refusal.md` and +`1730-remove-test-only-public-functions.md` (now only the `source` `read_block` item). diff --git a/.github/ISSUE_SPECS/TBD-TA4-delete-the-measured-redundant-tests.md b/.github/ISSUE_SPECS/TBD-TA4-delete-the-measured-redundant-tests.md deleted file mode 100644 index afae0573c..000000000 --- a/.github/ISSUE_SPECS/TBD-TA4-delete-the-measured-redundant-tests.md +++ /dev/null @@ -1,521 +0,0 @@ -# Delete the tests that mutation measurement found redundant (test audit TA4) - -Owner approval: option A, relayed by root on 2026-10-20: delete what batch 1 measured redundant now, -sample batch 2, and end the audit with one PR (TA5) from that sample. Branch: -`codex/batch-test-policy-3`, from `main` at `b9135008d` (TA1 #1722, TA2 #1724 and TA3 #1726 merged). -Phase B PR 4 of the 2026-10 test audit. - -## Method (batch 1) - -Batch 1 is the 2026-10-19 stage 3 run at base `81a3074fc` (6.0 h; method and data kept with the -audit's working notes, `m/README.md`). Its candidates were the 180 reading-agent DELETE/UNSURE rows -outside the policy classes and the never-delete classes. cargo-mutants 27.1.0 mutants were drawn -from functions each candidate covers (stage 1 coverage map), up to 4 catches or 12 tries per -candidate; each viable mutant ran every candidate that covers its function and then the covering -KEEP tests. 392 mutants, 292 viable, 21 survivors. - -- MEASURED-REDUNDANT: every mutant the candidate caught was also red in a KEEP test. -- REDUNDANT-IF-PEER-KEPT: some catches were made only by candidates; a greedy cover over those - catches keeps 4 tests and drops the rest. -- UNIQUE: at least one mutant only this test caught. THIN, WEAK, NO-COVERAGE: too few tries or - catches to judge. - -MEASURED-REDUNDANT cannot see allocation, count or ceiling claims; tests whose claim is one of these -are kept or restored. The verifier's review restored three such tests (below, "Restored"). The -deleted capi `set_control::automated_vca` tests (`a_vca_move_over_an_automated_member_is_live_and_renders_the_prepared_plan`, -`vca_reach_and_count_changes_over_an_automated_member_are_live`, through the deleted helper `case`), -`set_control::automated_hand_move::a_hand_move_on_an_automated_fader_is_live_and_renders_the_stored_offset` -(through the deleted helper `leg`) and `set_control::automated_carry::an_exact_unmute_that_frees_a_held_lane_discharges_the_owed_move` -also asserted that every render block after the live edit makes 0 allocations and 0 frees on the -C ABI (`bench_support::alloc` thread counters). The same render path still has its allocation -counts in host-core: `tests/stored_vca_automation.rs` (`rig.allocations == (0, 0)` on the render -thread in its VCA ride, mute and carry tests) and `tests/stored_fader_automation.rs` -(`rendering_fader_events_allocates_nothing`, and the carry runs' swap-block counts). - -"Redundant" means: no mutant of the sample needs this test. It is not a proof over all mutants, -and the KEEP catchers below are the recorded catchers of the sampled mutants, not of every row -mutation that a `MUTATIONS.md` names. - -## What this change does - -1. Deletes 137 of the 142 MEASURED-REDUNDANT tests: 2 no longer exist as measured and 3 are - restored after review (both below, "Skipped" and "Restored"). -2. Deletes the 8 REDUNDANT-IF-PEER-KEPT tests that the greedy cover drops. The cover keeps 4: - `audit` `vectorization::tests::rust_disambiguator_suffix_is_narrowly_supported` and - `parametric-eq` `malformed_requests_preserve_output_sentinels_and_opaque_ids` stay; - `conformance` `tolerance_boundary_tie_and_snr_cases_are_explicit` and `effect-runtime` - `the_mapping_inverse_round_trips` are UNIQUE only on test-only code and go with it (item 4). - Deviation from root's brief, which said "delete 6": the data has 10 IF-PEER-KEPT rows. The - cover keeps 2 of them; its other 2 kept tests are UNIQUE rows, not IF-PEER-KEPT. So the cover - drops 8, and all 8 are deleted. Evidence per test (its candidate-only mutants, and who still - catches them): - - `conformance` `scaled_sum_squares_handles_extreme_finite_values` (m9174, m9175, m9176, - m9193) and `block_metrics_and_repeat_bits_cover_boundaries` (m9120, m9121, m9122): every - mutant is in `compare.rs`, which item 4 deletes; `tolerance_boundary_tie_and_snr_cases_are_explicit` - also caught each one. - - `effect-runtime` `mapping_is_exact_at_the_ends_and_monotone`, - `a_logarithmic_mapping_is_constant_ratio` (m17453, m17454) and - `a_degenerate_range_has_no_position` (m17453, m17454, m17480): every mutant is in - `params::map_normalized`/`inverse_map_normalized`, which item 4 deletes; - `the_mapping_inverse_round_trips` also caught each one. - - `audit` `near_name_impostor_does_not_satisfy_probe` and - `exact_probe_path_and_body_boundaries_are_preserved` (m4430): also red in the kept - `rust_disambiguator_suffix_is_narrowly_supported`. - - `parametric-eq` `common_eq_adapter_preserves_input_ownership_capacity_and_refusal_sentinels` - (m35416): also red in the kept `malformed_requests_preserve_output_sentinels_and_opaque_ids`. -3. Keeps every UNIQUE (except item 4), THIN, WEAK and NO-COVERAGE test. -4. Deletes code that only tests call, with its UNIQUE tests. Proof: `git grep` over `crates/`, - `hosts/` and `tools/` outside test code finds no caller, and the workspace builds warning-free - without it (`cargo clippy --workspace --all-targets --all-features -- -D warnings`). - - `conformance` `PlanarBlock`/`BlockError` (`src/block.rs`, 68 lines), `compare_f32_to_f64` and - its report types (`src/compare.rs`, 235), `verify_bit_exact_repeat`/`DeterminismError` - (`src/determinism.rs`, 34): only the crate's own tests used them. Deleted with - `tests/api_metrics.rs` (100; UNIQUE `tolerance_boundary_tie_and_snr_cases_are_explicit` and - `invalid_rates_shapes_tolerances_and_nonfinite_values_are_typed`), the lib test - `block_metrics_and_repeat_bits_cover_boundaries`, and the two `PlanarBlock` assertions of - the KEEP test `fixtures.rs` `planar_blocks_and_fixtures_accept_only_launch_rates`, renamed - `fixtures_accept_only_launch_rates` (its fixture assertions stay). - - `effect-contract` `map_normalized`, `inverse_map_normalized`, `map_stepped_normalized`, - `inverse_map_stepped_normalized` (`src/lib.rs:1220-1285`): no product caller. Deleted with - UNIQUE `conformance` `normalized_mapping_endpoints_ties_and_round_trips_are_stable`. - - `effect-runtime` `params::map_normalized`, `params::inverse_map_normalized` - (`src/params.rs:182-229`): no product caller. Deleted with UNIQUE - `the_mapping_inverse_round_trips` and its three IF-PEER-KEPT peers. The - `check-effect-runtime-policy.sh` ratchet rows for the pair go to 0. - - `lane` `CanonicalFpEnv::saved_word` (`src/fpenv.rs:533-538` and `:590-593`): no product - caller. Deleted with UNIQUE `fp_env.rs` `the_canonical_word_is_the_word_inside_the_guard` - (its install and restore assertions are the KEEP tests' catches). - - Kept: `controls` `ControlDescriptor::range_contains` (UNIQUE `domain_boundaries`), - `audit` `is_encoding_token` and `symbol_header` (UNIQUE `call_inside_kernel_body_is_red`, - `malformed_prose_and_instruction_prefixes_do_not_own_probe_body`) and `builtins` - `PreparedInputFilterResponse::retained_bytes` (UNIQUE - `common_builtin_adapter_preserves_resource_and_refusal_contract`; host-core `response.rs` - calls it through the trait): product code calls each of them. -5. Deletes helpers only after the compiler reported them unused (dead_code or unused imports under - clippy `--all-targets --all-features`), looped until it reported nothing. No - `#[allow(dead_code)]` was added. Test files left with no test are deleted whole. -6. Updates the references: each `MUTATIONS.md` row or doc line that names a deleted test now says - "deleted by TA4". It names a KEEP catcher only where batch 1 recorded that catcher red on the - deleted test's mutants in the same crate and it can plausibly see the row's mutation; otherwise - it names none. Each such `MUTATIONS.md` ends with a "TA4 deletions" list. Open specs that name a deleted test or file - (#1290, #1350, #1406, #1654, #1696, #1722) say so in place. - -## Non-goals - -- No product render, prepare or control path changes. Item 4 deletes only code no product path - calls. -- No new tests. The 21 survivors are TA4's other half (agent T4S, merged in later). -- Dated records under `docs/handoffs`, `docs/audits` and `artifacts/` and the rename table in - `docs/rulings/de-versioning-inventory.md` are history and are not edited. - -## Objective gates - -Every `run:` step of the qualification `lint` job (fmt, workspace clippy `-D warnings`, -`RUSTDOCFLAGS='-D warnings' cargo doc --locked --workspace --no-deps`, the hermetic policy gates), -and `cargo test --locked --all-features -p ` for every touched package. - -## Evidence - -Line numbers are at `b9135008d`. Each test lists the number of sampled mutants it caught and the -KEEP tests that were also red on them (count per catcher; "other candidates only" are the cover's -peers, "timeout" is a 20-minute KEEP run counted as caught). - -### Deleted tests (150, 6,905 lines) - -#### audit - -- `fixture_builtins::tests::check_rejects_benchmark_identity_parameter_and_pcm_hash_mutations`, `tools/audit/src/fixture_builtins.rs:5623-5669`; 16 caught: `graph lib program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers` (4); timeout in engine lib (2); `builtins-compiler lib tests::cutoff_boundaries_match_compiler_diagnostics_at_every_launch_rate_and_section` (1); `graph lib runtime::tests::a_plan_that_reads_the_session_output_is_refused_at_bind` (1); `engine lib realtime::spsc::tests::peek_returns_each_queued_item_in_order_across_wraps_and_changes_nothing` (1); `engine lib realtime::spsc::tests::available_at_entry_is_bounded_and_handles_wrapped_cursors` (1); `graph lib runtime::tests::a_banked_source_gathers_the_played_block_bit_for_bit_with_the_copy` (1); `session json_grammar::u64_decimal_strings_cover_full_domain_and_reject_noncanonical_forms` (1); `graph lib program::tests::delayed_edge_gets_staging_buffer_and_blocks_in_place` (1); `graph-compiler track_delay::a_ring_is_a_named_allocation` (1); `graph lib program::tests::a_delayed_stage_boundary_is_not_elided` (1); `graph-compiler track_delay::the_pdc_counts_are_untouched` (1) -- `vectorization::tests::near_name_impostor_does_not_satisfy_probe` [REDUNDANT-IF-PEER-KEPT], `tools/audit/src/vectorization.rs:722-741`; 4 caught: `audit bin vectorization::tests::scalar_fallback_is_red` (2); other candidates only (1); `audit bin vectorization::tests::missing_vector_family_is_red` (1) -- `vectorization::tests::ordinary_instruction_annotations_do_not_terminate_probe_body`, `tools/audit/src/vectorization.rs:768-783`; 4 caught: `audit bin vectorization::tests::scalar_fallback_is_red` (3); `audit bin vectorization::tests::missing_vector_family_is_red` (1) -- `vectorization::tests::repeated_probe_bodies_are_ambiguous_before_requirements_are_checked`, `tools/audit/src/vectorization.rs:785-809`; 5 caught: `audit bin vectorization::tests::scalar_fallback_is_red` (4); `audit bin vectorization::tests::missing_vector_family_is_red` (1) -- `vectorization::tests::independently_valid_repeated_probe_bodies_are_ambiguous`, `tools/audit/src/vectorization.rs:811-849`; 5 caught: `audit bin vectorization::tests::scalar_fallback_is_red` (4); `audit bin vectorization::tests::missing_vector_family_is_red` (1) -- `vectorization::tests::exact_probe_path_and_body_boundaries_are_preserved` [REDUNDANT-IF-PEER-KEPT], `tools/audit/src/vectorization.rs:851-870`; 5 caught: `audit bin vectorization::tests::scalar_fallback_is_red` (3); other candidates only (1); `audit bin vectorization::tests::missing_vector_family_is_red` (1) -- `vectorization::tests::probe_bodies_remain_green_when_listing_order_changes`, `tools/audit/src/vectorization.rs:872-881`; 4 caught: `audit bin vectorization::tests::scalar_fallback_is_red` (3); `audit bin vectorization::tests::missing_vector_family_is_red` (1) - -#### bench - -- `floor::tests::the_current_effect_recount_keeps_fractional_link_work_and_composes_the_strip`, `tools/bench/src/floor.rs:647-665`; 4 caught: `bench bin floor::tests::the_driver_fed_gain_pan_row_is_costed_at_the_identity_inventory_and_isolates_nothing` (2); `bench bin floor::tests::every_derived_row_names_its_ruling_and_composes_a_positive_floor` (1); `bench bin floor::tests::a_control_row_is_always_cheaper_than_the_row_it_isolates` (1) - -#### builtins - -- `tests::settled_matrix_takes_the_select_free_arm_only_without_an_identity_lane`, `crates/builtins/src/tests.rs:847-1008`; 3 caught: `builtins randomized::the_banks_render_their_scalar_sections_under_random_retargets` (1); `lane g1_op_identity::g1_exp2_int_is_exact_on_the_integer_range` (1); `lane sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` (1) -- `tests::fused_fader_matrix_takes_the_select_free_arm_only_without_an_identity_lane`, `crates/builtins/src/tests.rs:1010-1195`; 6 caught: `builtins lib tests::full_public_chain_matches_the_three_section_reference` (1); `builtins randomized::the_banks_render_their_scalar_sections_under_random_retargets` (1); `lane g1_op_identity::g1_exp2_int_is_exact_on_the_integer_range` (1); `lane sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` (1); `graph-compiler track_delay::a_ring_is_a_named_allocation` (1); `graph-compiler track_delay::the_pdc_counts_are_untouched` (1) -- `common_builtin_adapter_matches_direct_owner_for_all_launch_rates_and_sections`, `crates/builtins/tests/filter_response.rs:870-998`; 3 caught: `builtins filter_response::every_launch_rate_checks_exact_maximum_successors_and_equal_order` (2); `builtins filter_response::common_builtin_trait_object_query_is_allocation_free` (1) -- `matrix_ramp_tracks_the_f64_interpolation`, `crates/builtins/tests/matrix.rs:115-148`; 5 caught: `lane fader_matrix::select_free_fused_fader_matrix_matches_both_oracles_when_no_lane_is_identity` (2); `builtins matrix::explicit_window_retarget_ramps_over_the_requested_window_and_is_adopted` (1); `lane g1_op_identity::g1_exp2_int_is_exact_on_the_integer_range` (1); `lane sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` (1) -- `matrix_ramp_reaches_target`, `crates/builtins/tests/matrix.rs:184-206`; 6 caught: `lane fader_matrix::select_free_fused_fader_matrix_matches_both_oracles_when_no_lane_is_identity` (2); `lane sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` (2); `builtins matrix::explicit_window_retarget_ramps_over_the_requested_window_and_is_adopted` (1); `lane g1_op_identity::g1_exp2_int_is_exact_on_the_integer_range` (1) -- `launch_and_extended_compatibility_rate_sweeps_match_f64_magnitude`, `crates/builtins/tests/response.rs:221-291`; 5 caught: `builtins response::launch_and_extended_compatibility_rates_match_the_independent_f64_rbj_oracle` (1); `lane g4_flush::g4_flush_law_holds_at_every_width` (1); `lane sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` (1); `graph-compiler track_delay::a_zero_delay_session_lowers_no_delay_node` (1); `graph-compiler track_delay::an_oversized_delay_is_rejected_by_the_caps` (1) -- `banked_fader_and_matrix_are_bit_identical_to_the_per_track_sections`, `crates/builtins/tests/stage.rs:1119-1164`; 13 caught: `builtins randomized::the_banks_render_their_scalar_sections_under_random_retargets` (3); `lane sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` (3); `lane fader_matrix::select_free_fused_fader_matrix_matches_both_oracles_when_no_lane_is_identity` (2); `lane fader_matrix::select_free_matrix_matches_the_select_form_when_no_lane_is_identity` (1); `lane g1_op_identity::g1_exp2_int_is_exact_on_the_integer_range` (1); `lane fader_matrix::settled_fader_matrix_matches_the_two_primitive_oracle` (1); `graph-compiler track_delay::a_ring_is_a_named_allocation` (1); `graph-compiler track_delay::the_pdc_counts_are_untouched` (1) - -#### builtins-compiler - -- `tests::resource_estimate_enforces_the_actual_largest_retained_payload`, `crates/builtins-compiler/src/lib.rs:14682-14710`; 3 caught: `builtins-compiler lib tests::cutoff_boundaries_match_compiler_diagnostics_at_every_launch_rate_and_section` (1); `session json_grammar::u64_decimal_strings_cover_full_domain_and_reject_noncanonical_forms` (1); `graph-compiler track_delay::the_pdc_counts_are_untouched` (1) -- `tests::retained_payload_boundaries_reject_in_phase_one`, `crates/builtins-compiler/src/lib.rs:14712-14748`; 3 caught: `builtins-compiler lib tests::cutoff_boundaries_match_compiler_diagnostics_at_every_launch_rate_and_section` (1); `session json_grammar::u64_decimal_strings_cover_full_domain_and_reject_noncanonical_forms` (1); `graph-compiler track_delay::the_pdc_counts_are_untouched` (1) - -#### capi - -- `runtime::live_tests::a_live_edit_while_a_candidate_is_pending_reaches_the_candidate`, `crates/capi/src/runtime/live_tests.rs:1485-1561`; 28 caught: `graph lib program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers` (4); `math scalar_accuracy::extreme_scaling_paths` (2); `graph-compiler track_delay::a_ring_is_a_named_allocation` (2); timeout in engine lib (2); `graph lib program::tests::delayed_edge_gets_staging_buffer_and_blocks_in_place` (2); `graph lib runtime::tests::a_plan_that_reads_the_session_output_is_refused_at_bind` (1); `math scalar_accuracy::exact_anchors` (1); `engine lib realtime::spsc::tests::peek_returns_each_queued_item_in_order_across_wraps_and_changes_nothing` (1); `engine lib realtime::spsc::tests::available_at_entry_is_bounded_and_handles_wrapped_cursors` (1); `host-web lib tests::structural_apply::a_master_designated_after_an_empty_boot_reads_as_a_boot_designation` (1); `graph lib runtime::tests::a_banked_source_gathers_the_played_block_bit_for_bit_with_the_copy` (1); `protocol console_session_edits::a_slot_set_change_that_skips_a_track_refuses_whole` (1); `graph-compiler track_delay::a_zero_delay_session_lowers_no_delay_node` (1); `graph-compiler track_delay::an_oversized_delay_is_rejected_by_the_caps` (1); `parametric-eq response::asymmetric_cascade_sections_are_independent_and_bypass_is_total_identity` (1); `rack lib tests::a_fully_folded_full_bank_offers_its_resident_block_before_writing_staging` (1); `capi lib runtime::live_tests::a_live_fader_left_undrained_before_a_carrying_structural_commit_is_baked` (1); `controls domain::a_value_a_valid_session_holds_is_inside_its_row` (1); `graph lib program::tests::a_delayed_stage_boundary_is_not_elided` (1); `graph-compiler track_delay::the_pdc_counts_are_untouched` (1); `rack lib tests::a_partial_agreement_slot_declines_the_collapse` (1) -- `runtime::live_tests::set_control::a_mode_switch_under_a_stored_pan_entry_is_refused_before_any_commit`, `crates/capi/src/runtime/live_tests.rs:8006-8082`; 20 caught: `graph lib program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers` (4); `graph-compiler track_delay::a_ring_is_a_named_allocation` (2); timeout in engine lib (2); `graph lib runtime::tests::a_plan_that_reads_the_session_output_is_refused_at_bind` (1); `engine lib realtime::spsc::tests::peek_returns_each_queued_item_in_order_across_wraps_and_changes_nothing` (1); `engine lib realtime::spsc::tests::available_at_entry_is_bounded_and_handles_wrapped_cursors` (1); `host-web lib tests::structural_apply::a_master_designated_after_an_empty_boot_reads_as_a_boot_designation` (1); `graph lib runtime::tests::a_banked_source_gathers_the_played_block_bit_for_bit_with_the_copy` (1); `protocol console_session_edits::a_slot_set_change_that_skips_a_track_refuses_whole` (1); `graph-compiler track_delay::a_zero_delay_session_lowers_no_delay_node` (1); `graph-compiler track_delay::an_oversized_delay_is_rejected_by_the_caps` (1); `parametric-eq response::asymmetric_cascade_sections_are_independent_and_bypass_is_total_identity` (1); `graph lib program::tests::delayed_edge_gets_staging_buffer_and_blocks_in_place` (1); `graph lib program::tests::a_delayed_stage_boundary_is_not_elided` (1); `graph-compiler track_delay::the_pdc_counts_are_untouched` (1) -- `runtime::live_tests::set_control::automated_vca::a_vca_move_over_an_automated_member_is_live_and_renders_the_prepared_plan`, `crates/capi/src/runtime/live_tests.rs:8527-8580`; 38 caught: `capi lib runtime::live_tests::a_live_edits_own_ramp_length_overrides_the_session_and_does_not_outlive_its_transaction` (4); `capi lib runtime::live_tests::a_rebuild_that_drops_a_following_route_to_six_words_reports_a_fallback` (4); `graph lib program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers` (4); `session json_grammar::insignificant_whitespace_and_shuffled_keys_canonicalize` (3); `math scalar_accuracy::extreme_scaling_paths` (2); `graph-compiler track_delay::a_ring_is_a_named_allocation` (2); timeout in engine lib (2); `graph lib program::tests::delayed_edge_gets_staging_buffer_and_blocks_in_place` (2); `builtins-compiler lib tests::cutoff_boundaries_match_compiler_diagnostics_at_every_launch_rate_and_section` (1); `graph lib runtime::tests::a_plan_that_reads_the_session_output_is_refused_at_bind` (1); `math scalar_accuracy::exact_anchors` (1); `host-web control_parity::a_vca_move_over_an_automated_member_is_live_alike_on_both_hosts` (1); `engine lib realtime::spsc::tests::peek_returns_each_queued_item_in_order_across_wraps_and_changes_nothing` (1); `engine lib realtime::spsc::tests::available_at_entry_is_bounded_and_handles_wrapped_cursors` (1); `graph lib runtime::tests::a_banked_source_gathers_the_played_block_bit_for_bit_with_the_copy` (1); `graph-compiler track_delay::a_zero_delay_session_lowers_no_delay_node` (1); `graph-compiler track_delay::an_oversized_delay_is_rejected_by_the_caps` (1); `parametric-eq response::asymmetric_cascade_sections_are_independent_and_bypass_is_total_identity` (1); `rack lib tests::a_fully_folded_full_bank_offers_its_resident_block_before_writing_staging` (1); `capi lib runtime::live_tests::a_live_fader_left_undrained_before_a_carrying_structural_commit_is_baked` (1); `graph lib program::tests::a_delayed_stage_boundary_is_not_elided` (1); `graph-compiler track_delay::the_pdc_counts_are_untouched` (1); `rack lib tests::a_partial_agreement_slot_declines_the_collapse` (1) -- `runtime::live_tests::set_control::automated_vca::vca_reach_and_count_changes_over_an_automated_member_are_live`, `crates/capi/src/runtime/live_tests.rs:8582-8636`; 36 caught: `capi lib runtime::live_tests::a_rebuild_that_drops_a_following_route_to_six_words_reports_a_fallback` (4); `graph lib program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers` (4); `session json_grammar::insignificant_whitespace_and_shuffled_keys_canonicalize` (3); `math scalar_accuracy::extreme_scaling_paths` (2); `graph-compiler track_delay::a_ring_is_a_named_allocation` (2); timeout in engine lib (2); `graph lib program::tests::delayed_edge_gets_staging_buffer_and_blocks_in_place` (2); `builtins-compiler lib tests::cutoff_boundaries_match_compiler_diagnostics_at_every_launch_rate_and_section` (1); `graph lib runtime::tests::a_plan_that_reads_the_session_output_is_refused_at_bind` (1); `math scalar_accuracy::exact_anchors` (1); `host-web control_parity::a_vca_move_over_an_automated_member_is_live_alike_on_both_hosts` (1); `engine lib realtime::spsc::tests::peek_returns_each_queued_item_in_order_across_wraps_and_changes_nothing` (1); `engine lib realtime::spsc::tests::available_at_entry_is_bounded_and_handles_wrapped_cursors` (1); `host-web lib tests::structural_apply::a_master_designated_after_an_empty_boot_reads_as_a_boot_designation` (1); `graph lib runtime::tests::a_banked_source_gathers_the_played_block_bit_for_bit_with_the_copy` (1); `protocol console_session_edits::a_slot_set_change_that_skips_a_track_refuses_whole` (1); `graph-compiler track_delay::a_zero_delay_session_lowers_no_delay_node` (1); `graph-compiler track_delay::an_oversized_delay_is_rejected_by_the_caps` (1); `parametric-eq response::asymmetric_cascade_sections_are_independent_and_bypass_is_total_identity` (1); `rack lib tests::a_fully_folded_full_bank_offers_its_resident_block_before_writing_staging` (1); `capi lib runtime::live_tests::a_live_fader_left_undrained_before_a_carrying_structural_commit_is_baked` (1); `graph lib program::tests::a_delayed_stage_boundary_is_not_elided` (1); `graph-compiler track_delay::the_pdc_counts_are_untouched` (1); `rack lib tests::a_partial_agreement_slot_declines_the_collapse` (1) -- `runtime::live_tests::set_control::automated_vca::a_second_vca_move_over_an_automated_member_is_heard`, `crates/capi/src/runtime/live_tests.rs:8638-8674`; 24 caught: `capi lib runtime::live_tests::a_rebuild_that_drops_a_following_route_to_six_words_reports_a_fallback` (4); `graph lib program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers` (4); `graph-compiler track_delay::a_ring_is_a_named_allocation` (2); timeout in engine lib (2); `builtins-compiler lib tests::cutoff_boundaries_match_compiler_diagnostics_at_every_launch_rate_and_section` (1); `graph lib runtime::tests::a_plan_that_reads_the_session_output_is_refused_at_bind` (1); `host-web control_parity::a_vca_move_over_an_automated_member_is_live_alike_on_both_hosts` (1); `engine lib realtime::spsc::tests::peek_returns_each_queued_item_in_order_across_wraps_and_changes_nothing` (1); `engine lib realtime::spsc::tests::available_at_entry_is_bounded_and_handles_wrapped_cursors` (1); `graph lib runtime::tests::a_banked_source_gathers_the_played_block_bit_for_bit_with_the_copy` (1); `graph-compiler track_delay::a_zero_delay_session_lowers_no_delay_node` (1); `graph-compiler track_delay::an_oversized_delay_is_rejected_by_the_caps` (1); `parametric-eq response::asymmetric_cascade_sections_are_independent_and_bypass_is_total_identity` (1); `graph lib program::tests::delayed_edge_gets_staging_buffer_and_blocks_in_place` (1); `graph lib program::tests::a_delayed_stage_boundary_is_not_elided` (1); `graph-compiler track_delay::the_pdc_counts_are_untouched` (1) -- `runtime::live_tests::set_control::automated_carry::an_offset_only_upsert_inside_a_rebuild_renders_as_it_does_alone`, `crates/capi/src/runtime/live_tests.rs:9621-9648`; 24 caught: `capi lib runtime::live_tests::a_rebuild_that_drops_a_following_route_to_six_words_reports_a_fallback` (4); `graph lib program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers` (4); `session json_grammar::insignificant_whitespace_and_shuffled_keys_canonicalize` (3); `math scalar_accuracy::extreme_scaling_paths` (2); timeout in engine lib (2); `graph lib runtime::tests::a_plan_that_reads_the_session_output_is_refused_at_bind` (1); `math scalar_accuracy::exact_anchors` (1); `engine lib realtime::spsc::tests::peek_returns_each_queued_item_in_order_across_wraps_and_changes_nothing` (1); `engine lib realtime::spsc::tests::available_at_entry_is_bounded_and_handles_wrapped_cursors` (1); `host-web lib tests::structural_apply::a_master_designated_after_an_empty_boot_reads_as_a_boot_designation` (1); `graph lib runtime::tests::a_banked_source_gathers_the_played_block_bit_for_bit_with_the_copy` (1); `protocol console_session_edits::a_slot_set_change_that_skips_a_track_refuses_whole` (1); `graph lib program::tests::delayed_edge_gets_staging_buffer_and_blocks_in_place` (1); `graph lib program::tests::a_delayed_stage_boundary_is_not_elided` (1) -- `runtime::live_tests::set_control::automated_carry::an_exact_unmute_that_frees_a_held_lane_discharges_the_owed_move`, `crates/capi/src/runtime/live_tests.rs:9705-9767`; 21 caught: `capi lib runtime::live_tests::a_live_edits_own_ramp_length_overrides_the_session_and_does_not_outlive_its_transaction` (4); `capi lib runtime::live_tests::a_rebuild_that_drops_a_following_route_to_six_words_reports_a_fallback` (4); `graph lib program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers` (4); timeout in engine lib (2); `graph lib runtime::tests::a_plan_that_reads_the_session_output_is_refused_at_bind` (1); `engine lib realtime::spsc::tests::peek_returns_each_queued_item_in_order_across_wraps_and_changes_nothing` (1); `engine lib realtime::spsc::tests::available_at_entry_is_bounded_and_handles_wrapped_cursors` (1); `graph lib runtime::tests::a_banked_source_gathers_the_played_block_bit_for_bit_with_the_copy` (1); `graph lib program::tests::delayed_edge_gets_staging_buffer_and_blocks_in_place` (1); `host-web control_parity::a_follows_mute_toggle_on_a_following_route_is_live_on_both_hosts` (1); `graph lib program::tests::a_delayed_stage_boundary_is_not_elided` (1) -- `runtime::live_tests::set_control::automated_hand_move::a_hand_move_on_an_automated_fader_is_live_and_renders_the_stored_offset`, `crates/capi/src/runtime/live_tests.rs:9933-10033`; 34 caught: `capi lib runtime::live_tests::a_rebuild_that_drops_a_following_route_to_six_words_reports_a_fallback` (4); `graph lib program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers` (4); `session json_grammar::insignificant_whitespace_and_shuffled_keys_canonicalize` (3); `graph-compiler track_delay::a_ring_is_a_named_allocation` (2); timeout in engine lib (2); `graph lib program::tests::delayed_edge_gets_staging_buffer_and_blocks_in_place` (2); `builtins-compiler lib tests::cutoff_boundaries_match_compiler_diagnostics_at_every_launch_rate_and_section` (1); `graph lib runtime::tests::a_plan_that_reads_the_session_output_is_refused_at_bind` (1); `host-web control_parity::a_vca_move_over_an_automated_member_is_live_alike_on_both_hosts` (1); `engine lib realtime::spsc::tests::peek_returns_each_queued_item_in_order_across_wraps_and_changes_nothing` (1); `engine lib realtime::spsc::tests::available_at_entry_is_bounded_and_handles_wrapped_cursors` (1); `host-web lib tests::structural_apply::a_master_designated_after_an_empty_boot_reads_as_a_boot_designation` (1); `graph lib runtime::tests::a_banked_source_gathers_the_played_block_bit_for_bit_with_the_copy` (1); `protocol console_session_edits::a_slot_set_change_that_skips_a_track_refuses_whole` (1); `graph-compiler track_delay::a_zero_delay_session_lowers_no_delay_node` (1); `graph-compiler track_delay::an_oversized_delay_is_rejected_by_the_caps` (1); `parametric-eq response::asymmetric_cascade_sections_are_independent_and_bypass_is_total_identity` (1); `rack lib tests::a_fully_folded_full_bank_offers_its_resident_block_before_writing_staging` (1); `capi lib runtime::live_tests::a_live_fader_left_undrained_before_a_carrying_structural_commit_is_baked` (1); `graph lib program::tests::a_delayed_stage_boundary_is_not_elided` (1); `graph-compiler track_delay::the_pdc_counts_are_untouched` (1); `capi lib runtime::live_tests::set_control::automated_carry::a_hand_move_pending_at_a_swap_keeps_its_length` (1); `rack lib tests::a_partial_agreement_slot_declines_the_collapse` (1) -- `runtime::live_tests::set_control::automated_hand_move::re_authoring_keeps_the_hand_offset_and_removal_ends_it`, `crates/capi/src/runtime/live_tests.rs:10093-10160`; 28 caught: `capi lib runtime::live_tests::a_rebuild_that_drops_a_following_route_to_six_words_reports_a_fallback` (4); `graph lib program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers` (4); `session json_grammar::insignificant_whitespace_and_shuffled_keys_canonicalize` (3); `graph-compiler track_delay::a_ring_is_a_named_allocation` (2); timeout in engine lib (2); `graph lib runtime::tests::a_plan_that_reads_the_session_output_is_refused_at_bind` (1); `host-web control_parity::a_vca_move_over_an_automated_member_is_live_alike_on_both_hosts` (1); `engine lib realtime::spsc::tests::peek_returns_each_queued_item_in_order_across_wraps_and_changes_nothing` (1); `engine lib realtime::spsc::tests::available_at_entry_is_bounded_and_handles_wrapped_cursors` (1); `host-web lib tests::structural_apply::a_master_designated_after_an_empty_boot_reads_as_a_boot_designation` (1); `graph lib runtime::tests::a_banked_source_gathers_the_played_block_bit_for_bit_with_the_copy` (1); `protocol console_session_edits::a_slot_set_change_that_skips_a_track_refuses_whole` (1); `graph-compiler track_delay::a_zero_delay_session_lowers_no_delay_node` (1); `graph-compiler track_delay::an_oversized_delay_is_rejected_by_the_caps` (1); `parametric-eq response::asymmetric_cascade_sections_are_independent_and_bypass_is_total_identity` (1); `graph lib program::tests::delayed_edge_gets_staging_buffer_and_blocks_in_place` (1); `graph lib program::tests::a_delayed_stage_boundary_is_not_elided` (1); `graph-compiler track_delay::the_pdc_counts_are_untouched` (1) -- `runtime::live_tests::a_following_send_leaks_nothing_of_a_stored_mute`, `crates/capi/src/runtime/live_tests.rs:11172-11222`; 25 caught: `capi lib runtime::live_tests::a_rebuild_that_drops_a_following_route_to_six_words_reports_a_fallback` (4); `graph lib program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers` (4); `session json_grammar::insignificant_whitespace_and_shuffled_keys_canonicalize` (3); `math scalar_accuracy::extreme_scaling_paths` (2); timeout in engine lib (2); `graph lib program::tests::delayed_edge_gets_staging_buffer_and_blocks_in_place` (2); `graph lib runtime::tests::a_plan_that_reads_the_session_output_is_refused_at_bind` (1); `math scalar_accuracy::exact_anchors` (1); `engine lib realtime::spsc::tests::peek_returns_each_queued_item_in_order_across_wraps_and_changes_nothing` (1); `engine lib realtime::spsc::tests::available_at_entry_is_bounded_and_handles_wrapped_cursors` (1); `graph lib runtime::tests::a_banked_source_gathers_the_played_block_bit_for_bit_with_the_copy` (1); `graph-compiler track_delay::a_zero_delay_session_lowers_no_delay_node` (1); `graph-compiler track_delay::an_oversized_delay_is_rejected_by_the_caps` (1); `graph lib program::tests::a_delayed_stage_boundary_is_not_elided` (1) -- `runtime::live_tests::a_follows_mute_toggle_on_a_following_route_is_live`, `crates/capi/src/runtime/live_tests.rs:11396-11455`; 27 caught: `capi lib runtime::live_tests::a_rebuild_that_drops_a_following_route_to_six_words_reports_a_fallback` (4); `graph lib program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers` (4); `session json_grammar::insignificant_whitespace_and_shuffled_keys_canonicalize` (3); `math scalar_accuracy::extreme_scaling_paths` (2); timeout in engine lib (2); `graph lib program::tests::delayed_edge_gets_staging_buffer_and_blocks_in_place` (2); `graph lib runtime::tests::a_plan_that_reads_the_session_output_is_refused_at_bind` (1); `math scalar_accuracy::exact_anchors` (1); `host-web control_parity::a_vca_move_over_an_automated_member_is_live_alike_on_both_hosts` (1); `engine lib realtime::spsc::tests::peek_returns_each_queued_item_in_order_across_wraps_and_changes_nothing` (1); `engine lib realtime::spsc::tests::available_at_entry_is_bounded_and_handles_wrapped_cursors` (1); `graph lib runtime::tests::a_banked_source_gathers_the_played_block_bit_for_bit_with_the_copy` (1); `graph-compiler track_delay::a_zero_delay_session_lowers_no_delay_node` (1); `graph-compiler track_delay::an_oversized_delay_is_rejected_by_the_caps` (1); `host-web control_parity::a_follows_mute_toggle_on_a_following_route_is_live_on_both_hosts` (1); `graph lib program::tests::a_delayed_stage_boundary_is_not_elided` (1) -- `runtime::live_tests::an_output_route_entry_is_refused_on_the_c_abi`, `crates/capi/src/runtime/live_tests.rs:11607-11632`; 14 caught: `graph lib program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers` (4); timeout in engine lib (2); `graph lib runtime::tests::a_plan_that_reads_the_session_output_is_refused_at_bind` (1); `engine lib realtime::spsc::tests::peek_returns_each_queued_item_in_order_across_wraps_and_changes_nothing` (1); `engine lib realtime::spsc::tests::available_at_entry_is_bounded_and_handles_wrapped_cursors` (1); `host-web lib tests::structural_apply::a_master_designated_after_an_empty_boot_reads_as_a_boot_designation` (1); `graph lib runtime::tests::a_banked_source_gathers_the_played_block_bit_for_bit_with_the_copy` (1); `protocol console_session_edits::a_slot_set_change_that_skips_a_track_refuses_whole` (1); `graph lib program::tests::delayed_edge_gets_staging_buffer_and_blocks_in_place` (1); `graph lib program::tests::a_delayed_stage_boundary_is_not_elided` (1) -- `runtime::supersede_tests::a_donated_source_keeps_its_pcm_and_its_held_seek`, `crates/capi/src/runtime/supersede_tests.rs:246-306`; 20 caught: `graph lib program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers` (4); `math scalar_accuracy::extreme_scaling_paths` (2); timeout in engine lib (2); `graph lib program::tests::delayed_edge_gets_staging_buffer_and_blocks_in_place` (2); `graph lib runtime::tests::a_plan_that_reads_the_session_output_is_refused_at_bind` (1); `math scalar_accuracy::exact_anchors` (1); `engine lib realtime::spsc::tests::peek_returns_each_queued_item_in_order_across_wraps_and_changes_nothing` (1); `engine lib realtime::spsc::tests::available_at_entry_is_bounded_and_handles_wrapped_cursors` (1); `host-web lib tests::structural_apply::a_master_designated_after_an_empty_boot_reads_as_a_boot_designation` (1); `graph lib runtime::tests::a_banked_source_gathers_the_played_block_bit_for_bit_with_the_copy` (1); `protocol console_session_edits::a_slot_set_change_that_skips_a_track_refuses_whole` (1); `graph-compiler track_delay::a_zero_delay_session_lowers_no_delay_node` (1); `graph-compiler track_delay::an_oversized_delay_is_rejected_by_the_caps` (1); `graph lib program::tests::a_delayed_stage_boundary_is_not_elided` (1) -- `runtime::supersede_tests::an_owner_the_candidate_restarts_and_the_replacement_reverts_carries_from_p0`, `crates/capi/src/runtime/supersede_tests.rs:844-851`; 20 caught: `graph lib program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers` (4); `math scalar_accuracy::extreme_scaling_paths` (2); timeout in engine lib (2); `graph lib program::tests::delayed_edge_gets_staging_buffer_and_blocks_in_place` (2); `graph lib runtime::tests::a_plan_that_reads_the_session_output_is_refused_at_bind` (1); `math scalar_accuracy::exact_anchors` (1); `engine lib realtime::spsc::tests::peek_returns_each_queued_item_in_order_across_wraps_and_changes_nothing` (1); `engine lib realtime::spsc::tests::available_at_entry_is_bounded_and_handles_wrapped_cursors` (1); `host-web lib tests::structural_apply::a_master_designated_after_an_empty_boot_reads_as_a_boot_designation` (1); `graph lib runtime::tests::a_banked_source_gathers_the_played_block_bit_for_bit_with_the_copy` (1); `protocol console_session_edits::a_slot_set_change_that_skips_a_track_refuses_whole` (1); `graph-compiler track_delay::a_zero_delay_session_lowers_no_delay_node` (1); `graph-compiler track_delay::an_oversized_delay_is_rejected_by_the_caps` (1); `graph lib program::tests::a_delayed_stage_boundary_is_not_elided` (1) -- `runtime::supersede_tests::an_owner_the_candidate_removes_and_the_replacement_restores_carries_from_p0`, `crates/capi/src/runtime/supersede_tests.rs:853-859`; 20 caught: `graph lib program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers` (4); `math scalar_accuracy::extreme_scaling_paths` (2); timeout in engine lib (2); `graph lib program::tests::delayed_edge_gets_staging_buffer_and_blocks_in_place` (2); `graph lib runtime::tests::a_plan_that_reads_the_session_output_is_refused_at_bind` (1); `math scalar_accuracy::exact_anchors` (1); `engine lib realtime::spsc::tests::peek_returns_each_queued_item_in_order_across_wraps_and_changes_nothing` (1); `engine lib realtime::spsc::tests::available_at_entry_is_bounded_and_handles_wrapped_cursors` (1); `host-web lib tests::structural_apply::a_master_designated_after_an_empty_boot_reads_as_a_boot_designation` (1); `graph lib runtime::tests::a_banked_source_gathers_the_played_block_bit_for_bit_with_the_copy` (1); `protocol console_session_edits::a_slot_set_change_that_skips_a_track_refuses_whole` (1); `graph-compiler track_delay::a_zero_delay_session_lowers_no_delay_node` (1); `graph-compiler track_delay::an_oversized_delay_is_rejected_by_the_caps` (1); `graph lib program::tests::a_delayed_stage_boundary_is_not_elided` (1) -- `runtime::supersede_tests::a_supersession_that_would_drop_acked_pcm_on_a_fresh_source_is_backpressure`, `crates/capi/src/runtime/supersede_tests.rs:1356-1456`; 17 caught: `graph lib program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers` (4); timeout in engine lib (2); `graph lib program::tests::delayed_edge_gets_staging_buffer_and_blocks_in_place` (2); `graph lib runtime::tests::a_plan_that_reads_the_session_output_is_refused_at_bind` (1); `engine lib realtime::spsc::tests::peek_returns_each_queued_item_in_order_across_wraps_and_changes_nothing` (1); `engine lib realtime::spsc::tests::available_at_entry_is_bounded_and_handles_wrapped_cursors` (1); `host-web lib tests::structural_apply::a_master_designated_after_an_empty_boot_reads_as_a_boot_designation` (1); `graph lib runtime::tests::a_banked_source_gathers_the_played_block_bit_for_bit_with_the_copy` (1); `protocol console_session_edits::a_slot_set_change_that_skips_a_track_refuses_whole` (1); `graph-compiler track_delay::a_zero_delay_session_lowers_no_delay_node` (1); `graph-compiler track_delay::an_oversized_delay_is_rejected_by_the_caps` (1); `graph lib program::tests::a_delayed_stage_boundary_is_not_elided` (1) -- `runtime::tests::a_plain_seek_is_reported_at_the_block_that_applied_it`, `crates/capi/src/runtime/tests.rs:1467-1501`; 12 caught: `graph lib program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers` (4); timeout in engine lib (2); `graph lib runtime::tests::a_plan_that_reads_the_session_output_is_refused_at_bind` (1); `engine lib realtime::spsc::tests::peek_returns_each_queued_item_in_order_across_wraps_and_changes_nothing` (1); `engine lib realtime::spsc::tests::available_at_entry_is_bounded_and_handles_wrapped_cursors` (1); `graph lib runtime::tests::a_banked_source_gathers_the_played_block_bit_for_bit_with_the_copy` (1); `graph lib program::tests::delayed_edge_gets_staging_buffer_and_blocks_in_place` (1); `graph lib program::tests::a_delayed_stage_boundary_is_not_elided` (1) -- `runtime::tests::a_late_anchored_seek_reports_its_frame_plus_the_lateness`, `crates/capi/src/runtime/tests.rs:1503-1531`; 18 caught: `graph lib program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers` (4); `math scalar_accuracy::extreme_scaling_paths` (2); timeout in engine lib (2); `graph lib program::tests::delayed_edge_gets_staging_buffer_and_blocks_in_place` (2); `graph lib runtime::tests::a_plan_that_reads_the_session_output_is_refused_at_bind` (1); `math scalar_accuracy::exact_anchors` (1); `engine lib realtime::spsc::tests::peek_returns_each_queued_item_in_order_across_wraps_and_changes_nothing` (1); `engine lib realtime::spsc::tests::available_at_entry_is_bounded_and_handles_wrapped_cursors` (1); `graph lib runtime::tests::a_banked_source_gathers_the_played_block_bit_for_bit_with_the_copy` (1); `graph-compiler track_delay::a_zero_delay_session_lowers_no_delay_node` (1); `graph-compiler track_delay::an_oversized_delay_is_rejected_by_the_caps` (1); `graph lib program::tests::a_delayed_stage_boundary_is_not_elided` (1) - -#### compressor - -- `bypass_preserves_exact_dry_bits_at_sample_zero`, `crates/compressor/tests/identity.rs:24-37`; 6 caught: `lane sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` (3); `lane fader_matrix::select_free_fused_fader_matrix_matches_both_oracles_when_no_lane_is_identity` (2); `lane g4_flush::g4_pair_law_holds_at_every_width` (1) -- `bank_matches_scalar_per_lane_bits`, `crates/compressor/tests/lane_identity.rs:42-152`; 10 caught: `lane sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` (4); `lane fader_matrix::select_free_fused_fader_matrix_matches_both_oracles_when_no_lane_is_identity` (2); `builtins randomized::the_banks_render_their_scalar_sections_under_random_retargets` (1); `lane g4_flush::g4_pair_law_holds_at_every_width` (1); `lane g1_op_identity::g1_exp2_int_is_exact_on_the_integer_range` (1); `lane g4_flush::g4_flush_law_holds_at_every_width` (1) -- `the_collapsed_body_renders_the_dual_bodys_left_plane`, `crates/compressor/tests/mono_collapse.rs:150-233`; 4 caught: `compressor mono_collapse::mono_reopen_drives_the_next_render_from_the_copied_state` (3); `compressor mono_collapse::a_desymmetrized_bank_is_a_never_collapsed_bank` (1) -- `the_boundary_limit_rejects_a_finite_but_absurd_value`, `crates/compressor/tests/nonfinite.rs:228-280`; 11 caught: `lane sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` (4); `effect-runtime lane_identity::the_lane_mask_agrees_across_widths` (2); `lane fader_matrix::select_free_fused_fader_matrix_matches_both_oracles_when_no_lane_is_identity` (2); `effect-runtime lane_identity::the_boundary_check_is_width_independent` (1); `lane g4_flush::g4_flush_law_holds_at_every_width` (1); `effect-runtime bank::a_rejected_block_is_zeroed_reset_and_counted` (1) -- `block_partitions_are_invariant`, `crates/compressor/tests/partition.rs:47-103`; 4 caught: `lane fader_matrix::select_free_fused_fader_matrix_matches_both_oracles_when_no_lane_is_identity` (2); `lane sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` (2) -- `an_idle_restore_is_bit_exact`, `crates/compressor/tests/payload.rs:29-91`; 3 caught: `lane sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` (2); `host-web lib tests::selected_observation_reads_keep_same_track_owner_windows_and_sequences` (1) -- `a_mid_ramp_restore_continues_the_ramp_exactly`, `crates/compressor/tests/payload.rs:261-308`; 9 caught: `lane sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` (3); `lane fader_matrix::select_free_fused_fader_matrix_matches_both_oracles_when_no_lane_is_identity` (2); `effect-runtime contract_ramp_identity::linear_smoother_is_bit_identical_to_the_linear_ramp` (2); `lane g1_op_identity::g1_exp2_int_is_exact_on_the_integer_range` (1); `host-web lib tests::selected_observation_reads_keep_same_track_owner_windows_and_sequences` (1) - -#### conformance - -- `compare::tests::scaled_sum_squares_handles_extreme_finite_values` [REDUNDANT-IF-PEER-KEPT], `crates/conformance/src/compare.rs:228-234`; 4 caught: other candidates only (4) -- `tests::block_metrics_and_repeat_bits_cover_boundaries` [REDUNDANT-IF-PEER-KEPT], `crates/conformance/src/lib.rs:94-121`; 3 caught: other candidates only (3) -- `tolerance_boundary_tie_and_snr_cases_are_explicit` [UNIQUE (test-only code)], `crates/conformance/tests/api_metrics.rs:14-62`; 8 caught: other candidates only (8) -- `invalid_rates_shapes_tolerances_and_nonfinite_values_are_typed` [UNIQUE (test-only code)], `crates/conformance/tests/api_metrics.rs:64-100`; 4 caught: other candidates only (4) -- `normalized_mapping_endpoints_ties_and_round_trips_are_stable` [UNIQUE (test-only code)], `crates/conformance/tests/effect_contract.rs:123-142`; 4 caught: other candidates only (4) -- `smoothers_finish_on_the_exact_update`, `crates/conformance/tests/effect_contract.rs:144-163`; 5 caught: `lane fader_matrix::select_free_fused_fader_matrix_matches_both_oracles_when_no_lane_is_identity` (2); `lane sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` (2); `effect-runtime contract_ramp_identity::no_smoothing_snaps_and_one_pole_uses_a_precomputed_coefficient` (1) - -#### console-workload - -- `tests::the_driver_fed_gain_pan_row_dispatches_every_unit_but_its_inputs`, `tools/console-workload/src/lib.rs:2533-2577`; 13 caught: `graph lib program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers` (4); `builtins-compiler lib tests::cutoff_boundaries_match_compiler_diagnostics_at_every_launch_rate_and_section` (1); `graph lib runtime::tests::a_plan_that_reads_the_session_output_is_refused_at_bind` (1); `graph lib runtime::tests::a_banked_source_gathers_the_played_block_bit_for_bit_with_the_copy` (1); `graph-compiler track_delay::a_zero_delay_session_lowers_no_delay_node` (1); `graph-compiler track_delay::an_oversized_delay_is_rejected_by_the_caps` (1); `graph lib program::tests::delayed_edge_gets_staging_buffer_and_blocks_in_place` (1); `graph-compiler track_delay::a_ring_is_a_named_allocation` (1); `graph lib program::tests::a_delayed_stage_boundary_is_not_elided` (1); `graph-compiler track_delay::the_pdc_counts_are_untouched` (1) -- `mixing::restating_the_held_values_moves_no_rendered_bit`, `tools/console-workload/tests/automation.rs:295-322`; 18 caught: `graph lib program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers` (4); `graph-compiler track_delay::a_ring_is_a_named_allocation` (2); `console-workload automation::mixing::the_eq_lowering_keeps_the_collapse_when_a_pair_lands_in_one_block` (2); `builtins-compiler lib tests::cutoff_boundaries_match_compiler_diagnostics_at_every_launch_rate_and_section` (1); `graph lib runtime::tests::a_plan_that_reads_the_session_output_is_refused_at_bind` (1); `console-workload automation::mixing::a_plan_without_a_control_channel_refuses_the_row` (1); `graph lib runtime::tests::a_banked_source_gathers_the_played_block_bit_for_bit_with_the_copy` (1); `graph-compiler track_delay::a_zero_delay_session_lowers_no_delay_node` (1); `graph-compiler track_delay::an_oversized_delay_is_rejected_by_the_caps` (1); `parametric-eq response::asymmetric_cascade_sections_are_independent_and_bypass_is_total_identity` (1); `graph lib program::tests::delayed_edge_gets_staging_buffer_and_blocks_in_place` (1); `graph lib program::tests::a_delayed_stage_boundary_is_not_elided` (1); `graph-compiler track_delay::the_pdc_counts_are_untouched` (1) -- `mono_console_both_rides_move_bits_and_agree_between_supported_widths`, `tools/console-workload/tests/eq_ramping_scenario.rs:159-162`; 44 caught: `console-workload paired_spans::the_limiter_bank_renders_the_dual_bits_in_every_scenario` (5); `graph lib program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers` (4); `effect-contract live_window::one_block_applies_every_live_cell_of_one_transaction` (3); `lane fader_matrix::select_free_fused_fader_matrix_matches_both_oracles_when_no_lane_is_identity` (2); `math scalar_accuracy::extreme_scaling_paths` (2); `graph-compiler track_delay::a_ring_is_a_named_allocation` (2); `lane sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` (2); `graph lib program::tests::delayed_edge_gets_staging_buffer_and_blocks_in_place` (2); `parametric-eq lib randomized_restores::the_stationary_cascade_renders_the_full_cascade_after_random_restores` (2); `console-workload automation::mixing::the_eq_lowering_keeps_the_collapse_when_a_pair_lands_in_one_block` (2); `builtins-compiler lib tests::cutoff_boundaries_match_compiler_diagnostics_at_every_launch_rate_and_section` (1); `graph lib runtime::tests::a_plan_that_reads_the_session_output_is_refused_at_bind` (1); `math scalar_accuracy::exact_anchors` (1); `builtins randomized::the_banks_render_their_scalar_sections_under_random_retargets` (1); `console-workload automation::mixing::a_plan_without_a_control_channel_refuses_the_row` (1); `lane g4_flush::g4_pair_law_holds_at_every_width` (1); `lane g1_op_identity::g1_exp2_int_is_exact_on_the_integer_range` (1); `effect-contract paired_spans::bypass_and_observe_records_fold_in_place_around_a_pair` (1); `lane g4_flush::g4_flush_law_holds_at_every_width` (1); `graph lib runtime::tests::a_banked_source_gathers_the_played_block_bit_for_bit_with_the_copy` (1); `graph-compiler track_delay::a_zero_delay_session_lowers_no_delay_node` (1); `graph-compiler track_delay::an_oversized_delay_is_rejected_by_the_caps` (1); `parametric-eq response::asymmetric_cascade_sections_are_independent_and_bypass_is_total_identity` (1); `rack lib tests::a_fully_folded_full_bank_offers_its_resident_block_before_writing_staging` (1); `capi lib runtime::live_tests::a_live_fader_left_undrained_before_a_carrying_structural_commit_is_baked` (1); `graph lib program::tests::a_delayed_stage_boundary_is_not_elided` (1); `graph-compiler track_delay::the_pdc_counts_are_untouched` (1); `rack lib tests::a_partial_agreement_slot_declines_the_collapse` (1) -- `the_eq_bank_renders_the_dual_bits_in_every_scenario`, `tools/console-workload/tests/paired_spans.rs:1408-1411`; 24 caught: `effect-contract live_window::one_block_applies_every_live_cell_of_one_transaction` (4); `effect-runtime lane_identity::the_lane_mask_agrees_across_widths` (3); `console-workload paired_spans::the_limiter_bank_renders_the_dual_bits_in_every_scenario` (3); `effect-contract paired_spans::a_pair_whose_second_half_never_arrives_clears_live` (2); `graph-compiler track_delay::a_ring_is_a_named_allocation` (2); `effect-contract paired_spans::bypass_and_observe_records_fold_in_place_around_a_pair` (1); `host-web lib tests::selected_observation_reads_keep_same_track_owner_windows_and_sequences` (1); `graph-compiler track_delay::a_zero_delay_session_lowers_no_delay_node` (1); `rack mono_reengage::a_bypass_episode_re_engages_because_it_never_moved_the_channels_apart` (1); `graph-compiler track_delay::an_oversized_delay_is_rejected_by_the_caps` (1); `effect-runtime bank::a_rejected_block_is_zeroed_reset_and_counted` (1); `parametric-eq response::asymmetric_cascade_sections_are_independent_and_bypass_is_total_identity` (1); `effect-runtime lane_identity::the_boundary_check_is_width_independent` (1); `graph-compiler track_delay::the_pdc_counts_are_untouched` (1); `rack lib tests::a_partial_agreement_slot_declines_the_collapse` (1) -- `the_compressor_bank_renders_the_dual_bits_in_every_scenario`, `tools/console-workload/tests/paired_spans.rs:1413-1416`; 19 caught: `effect-contract live_window::one_block_applies_every_live_cell_of_one_transaction` (4); `console-workload paired_spans::the_limiter_bank_renders_the_dual_bits_in_every_scenario` (3); `compressor mono_collapse::mono_reopen_drives_the_next_render_from_the_copied_state` (3); `effect-contract paired_spans::bypass_and_observe_records_fold_in_place_around_a_pair` (2); `effect-contract paired_spans::a_pair_whose_second_half_never_arrives_clears_live` (2); `host-web lib tests::selected_observation_reads_keep_same_track_owner_windows_and_sequences` (1); `rack mono_reengage::a_bypass_episode_re_engages_because_it_never_moved_the_channels_apart` (1); `compressor mono_collapse::a_desymmetrized_bank_is_a_never_collapsed_bank` (1); `effect-runtime contract_ramp_identity::linear_smoother_is_bit_identical_to_the_linear_ramp` (1); `rack lib tests::a_partial_agreement_slot_declines_the_collapse` (1) -- `an_eq_only_both_channel_ride_keeps_every_cohort_collapsed`, `tools/console-workload/tests/paired_spans.rs:2233-2249`; 25 caught: `console-workload paired_spans::the_limiter_bank_renders_the_dual_bits_in_every_scenario` (5); `graph lib program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers` (4); `graph-compiler track_delay::a_ring_is_a_named_allocation` (2); `console-workload automation::mixing::the_eq_lowering_keeps_the_collapse_when_a_pair_lands_in_one_block` (2); `builtins-compiler lib tests::cutoff_boundaries_match_compiler_diagnostics_at_every_launch_rate_and_section` (1); `graph lib runtime::tests::a_plan_that_reads_the_session_output_is_refused_at_bind` (1); `console-workload automation::mixing::a_plan_without_a_control_channel_refuses_the_row` (1); `effect-contract paired_spans::bypass_and_observe_records_fold_in_place_around_a_pair` (1); `graph lib runtime::tests::a_banked_source_gathers_the_played_block_bit_for_bit_with_the_copy` (1); `graph-compiler track_delay::a_zero_delay_session_lowers_no_delay_node` (1); `graph-compiler track_delay::an_oversized_delay_is_rejected_by_the_caps` (1); `parametric-eq response::asymmetric_cascade_sections_are_independent_and_bypass_is_total_identity` (1); `graph lib program::tests::delayed_edge_gets_staging_buffer_and_blocks_in_place` (1); `graph lib program::tests::a_delayed_stage_boundary_is_not_elided` (1); `graph-compiler track_delay::the_pdc_counts_are_untouched` (1); `rack lib tests::a_partial_agreement_slot_declines_the_collapse` (1) -- `the_two_placements_agree_block_by_block`, `tools/console-workload/tests/placement.rs:50-70`; 18 caught: `graph lib program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers` (4); `graph-compiler track_delay::a_ring_is_a_named_allocation` (2); `console-workload automation::mixing::the_eq_lowering_keeps_the_collapse_when_a_pair_lands_in_one_block` (2); `builtins-compiler lib tests::cutoff_boundaries_match_compiler_diagnostics_at_every_launch_rate_and_section` (1); `graph lib runtime::tests::a_plan_that_reads_the_session_output_is_refused_at_bind` (1); `console-workload automation::mixing::a_plan_without_a_control_channel_refuses_the_row` (1); `graph lib runtime::tests::a_banked_source_gathers_the_played_block_bit_for_bit_with_the_copy` (1); `graph-compiler track_delay::a_zero_delay_session_lowers_no_delay_node` (1); `graph-compiler track_delay::an_oversized_delay_is_rejected_by_the_caps` (1); `parametric-eq response::asymmetric_cascade_sections_are_independent_and_bypass_is_total_identity` (1); `graph lib program::tests::delayed_edge_gets_staging_buffer_and_blocks_in_place` (1); `graph lib program::tests::a_delayed_stage_boundary_is_not_elided` (1); `graph-compiler track_delay::the_pdc_counts_are_untouched` (1) - -#### delay - -- `tests::a_mid_ramp_restore_continues_bit_identically`, `crates/delay/src/lib.rs:2699-2792`; 9 caught: `effect-runtime contract_ramp_identity::linear_smoother_is_bit_identical_to_the_linear_ramp` (5); `lane sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` (2); `lane g1_op_identity::g1_exp2_int_is_exact_on_the_integer_range` (1); `host-web lib tests::selected_observation_reads_keep_same_track_owner_windows_and_sequences` (1) - -#### effect-contract - -- `an_enumeration_lattice_is_spelled_in_choice_values_and_indexed_by_ordinal`, `crates/effect-contract/tests/lattice.rs:311-363`; 4 caught: `effect-contract lib step::tests::an_index_lattice_is_ordinal_indexed_and_choice_value_spelled` (4) -- `a_drained_cell_stages_nothing_on_the_next_block`, `crates/effect-contract/tests/live_control.rs:218-225`; 4 caught: `effect-contract live_window::one_block_applies_every_live_cell_of_one_transaction` (4) -- `a_lone_one_channel_write_clears_live`, `crates/effect-contract/tests/paired_spans.rs:109-115`; 6 caught: `effect-contract live_window::one_block_applies_every_live_cell_of_one_transaction` (4); `effect-contract paired_spans::a_pair_whose_second_half_never_arrives_clears_live` (2) -- `last_wins_decides_the_pair`, `crates/effect-contract/tests/paired_spans.rs:145-162`; 8 caught: `effect-contract live_window::one_block_applies_every_live_cell_of_one_transaction` (4); `effect-contract paired_spans::bypass_and_observe_records_fold_in_place_around_a_pair` (2); `effect-contract paired_spans::a_pair_whose_second_half_never_arrives_clears_live` (2) -- `a_shared_parameters_both_cell_needs_no_twin_and_does_not_break_a_pair`, `crates/effect-contract/tests/paired_spans.rs:164-169`; 8 caught: `effect-contract live_window::one_block_applies_every_live_cell_of_one_transaction` (4); `effect-contract paired_spans::bypass_and_observe_records_fold_in_place_around_a_pair` (2); `effect-contract paired_spans::a_pair_whose_second_half_never_arrives_clears_live` (2) -- `a_pair_split_across_two_blocks_clears_live`, `crates/effect-contract/tests/paired_spans.rs:171-193`; 8 caught: `effect-contract live_window::one_block_applies_every_live_cell_of_one_transaction` (4); `effect-contract paired_spans::bypass_and_observe_records_fold_in_place_around_a_pair` (2); `effect-contract paired_spans::a_pair_whose_second_half_never_arrives_clears_live` (2) - -#### effect-runtime - -- `a_finite_block_is_accepted`, `crates/effect-runtime/tests/bank.rs:9-15`; 4 caught: `effect-runtime bank::a_rejected_block_is_zeroed_reset_and_counted` (2); `lane sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` (1); `effect-runtime lane_identity::the_boundary_check_is_width_independent` (1) -- `the_precomputed_increment_is_the_declared_one_and_the_last_update_assigns`, `crates/effect-runtime/tests/contract_ramp_identity.rs:67-94`; 5 caught: `lane fader_matrix::select_free_fused_fader_matrix_matches_both_oracles_when_no_lane_is_identity` (2); `lane sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` (2); `effect-runtime contract_ramp_identity::no_smoothing_snaps_and_one_pole_uses_a_precomputed_coefficient` (1) -- `the_curve_matches_the_paper`, `crates/effect-runtime/tests/dynamics.rs:39-76`; 10 caught: `effect-runtime dynamics::knee_words_follow_the_finite_reciprocal_rule` (3); `lane sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` (3); `lane fader_matrix::select_free_fused_fader_matrix_matches_both_oracles_when_no_lane_is_identity` (2); `builtins randomized::the_banks_render_their_scalar_sections_under_random_retargets` (1); `lane g1_op_identity::g1_exp2_int_is_exact_on_the_integer_range` (1) -- `a_knee_whose_reciprocal_overflows_is_a_hard_knee`, `crates/effect-runtime/tests/dynamics.rs:321-364`; 6 caught: `lane sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` (3); `effect-runtime dynamics::knee_words_follow_the_finite_reciprocal_rule` (2); `builtins randomized::the_banks_render_their_scalar_sections_under_random_retargets` (1) -- `the_narrowest_soft_knees_are_finite_at_the_threshold`, `crates/effect-runtime/tests/dynamics.rs:366-396`; 4 caught: `effect-runtime dynamics::knee_words_follow_the_finite_reciprocal_rule` (2); `lane sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` (2) -- `the_corpus_is_width_independent`, `crates/effect-runtime/tests/lane_identity.rs:26-45`; 8 caught: `lane sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` (3); `lane fader_matrix::select_free_fused_fader_matrix_matches_both_oracles_when_no_lane_is_identity` (2); `builtins randomized::the_banks_render_their_scalar_sections_under_random_retargets` (1); `lane g1_op_identity::g1_exp2_int_is_exact_on_the_integer_range` (1); `lane g4_flush::g4_flush_law_holds_at_every_width` (1) -- `mapping_is_exact_at_the_ends_and_monotone` [REDUNDANT-IF-PEER-KEPT], `crates/effect-runtime/tests/params.rs:100-123`; 4 caught: other candidates only (2); `effect-runtime params::clamping_always_lands_in_the_domain` (1); `host-web lib tests::selected_observation_reads_keep_same_track_owner_windows_and_sequences` (1) -- `a_logarithmic_mapping_is_constant_ratio` [REDUNDANT-IF-PEER-KEPT], `crates/effect-runtime/tests/params.rs:125-136`; 6 caught: other candidates only (2); `math scalar_accuracy::extreme_scaling_paths` (2); `effect-runtime params::clamping_always_lands_in_the_domain` (1); `host-web lib tests::selected_observation_reads_keep_same_track_owner_windows_and_sequences` (1) -- `the_mapping_inverse_round_trips` [UNIQUE (test-only code)], `crates/effect-runtime/tests/params.rs:138-151`; 8 caught: other candidates only (4); `math scalar_accuracy::extreme_scaling_paths` (2); `effect-runtime params::clamping_always_lands_in_the_domain` (1); `host-web lib tests::selected_observation_reads_keep_same_track_owner_windows_and_sequences` (1) -- `a_degenerate_range_has_no_position` [REDUNDANT-IF-PEER-KEPT], `crates/effect-runtime/tests/params.rs:153-159`; 5 caught: other candidates only (3); `effect-runtime params::clamping_always_lands_in_the_domain` (1); `host-web lib tests::selected_observation_reads_keep_same_track_owner_windows_and_sequences` (1) -- `the_step_is_computed_once`, `crates/effect-runtime/tests/ramp.rs:47-72`; 9 caught: `effect-runtime contract_ramp_identity::linear_smoother_is_bit_identical_to_the_linear_ramp` (5); `lane fader_matrix::select_free_fused_fader_matrix_matches_both_oracles_when_no_lane_is_identity` (2); `lane sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` (2) -- `the_last_sample_is_exactly_the_target`, `crates/effect-runtime/tests/ramp.rs:74-90`; 4 caught: `effect-runtime contract_ramp_identity::linear_smoother_is_bit_identical_to_the_linear_ramp` (4) - -#### engine - -- `realtime::tests::native_spsc_preserves_value_on_full_and_fifo_wrap`, `crates/engine/src/realtime/mod.rs:361-391`; 5 caught: timeout in engine lib (2); `engine lib realtime::spsc::tests::producer_available_capacity_is_acquired_once_and_wrap_safe` (1); `engine lib realtime::spsc::tests::peek_returns_each_queued_item_in_order_across_wraps_and_changes_nothing` (1); `engine lib realtime::spsc::tests::available_at_entry_is_bounded_and_handles_wrapped_cursors` (1) -- `realtime::tests::move_only_spsc_preserves_full_value_and_transfers_to_consumer`, `crates/engine/src/realtime/mod.rs:393-406`; 4 caught: timeout in engine lib (2); `engine lib realtime::spsc::tests::peek_returns_each_queued_item_in_order_across_wraps_and_changes_nothing` (1); `engine lib realtime::spsc::tests::available_at_entry_is_bounded_and_handles_wrapped_cursors` (1) - -#### gate-expander - -- `scalar_and_native_bank_are_bit_exact_for_all_link_modes_and_ramps`, `crates/gate-expander/tests/identity.rs:72-127`; 11 caught: `lane sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` (4); `lane fader_matrix::select_free_fused_fader_matrix_matches_both_oracles_when_no_lane_is_identity` (2); `lane input_chain_arming::any_state_word_in_the_band_arms_the_block` (1); `lane g4_flush::g4_pair_law_holds_at_every_width` (1); `lane g1_op_identity::g1_exp2_int_is_exact_on_the_integer_range` (1); `lane g4_flush::g4_flush_law_holds_at_every_width` (1); `gate-expander ramp_endpoint::every_ramped_word_of_a_bank_lane_follows_its_own_target` (1) -- `active_state_restore_continues_an_uninterrupted_donor`, `crates/gate-expander/tests/state.rs:151-208`; 12 caught: `lane sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` (3); `lane fader_matrix::select_free_fused_fader_matrix_matches_both_oracles_when_no_lane_is_identity` (2); `effect-runtime contract_ramp_identity::linear_smoother_is_bit_identical_to_the_linear_ramp` (2); `gate-expander lib tests::internal_w4_pcm_and_serialized_continuation_are_bit_exact` (1); `lane g1_op_identity::g1_exp2_int_is_exact_on_the_integer_range` (1); `host-web lib tests::selected_observation_reads_keep_same_track_owner_windows_and_sequences` (1); `gate-expander contract::payload_header_is_version_one_and_forty_four_words_and_restore_is_transactional` (1); `gate-expander identity::bypass_preserves_current_signed_zero_and_advances_state` (1) -- `scalar_and_bank_state_payloads_interchange_without_changing_audio`, `crates/gate-expander/tests/state.rs:605-726`; 15 caught: `lane sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` (4); `lane fader_matrix::select_free_fused_fader_matrix_matches_both_oracles_when_no_lane_is_identity` (2); `lane input_chain_arming::any_state_word_in_the_band_arms_the_block` (1); `gate-expander lib tests::internal_w4_pcm_and_serialized_continuation_are_bit_exact` (1); `lane g4_flush::g4_pair_law_holds_at_every_width` (1); `lane g1_op_identity::g1_exp2_int_is_exact_on_the_integer_range` (1); `lane g4_flush::g4_flush_law_holds_at_every_width` (1); `host-web lib tests::selected_observation_reads_keep_same_track_owner_windows_and_sequences` (1); `gate-expander contract::payload_header_is_version_one_and_forty_four_words_and_restore_is_transactional` (1); `gate-expander ramp_endpoint::every_ramped_word_of_a_bank_lane_follows_its_own_target` (1); `gate-expander identity::bypass_preserves_current_signed_zero_and_advances_state` (1) -- `bank_restore_of_one_track_does_not_mutate_peers`, `crates/gate-expander/tests/state.rs:728-752`; 3 caught: `host-web lib tests::selected_observation_reads_keep_same_track_owner_windows_and_sequences` (1); `gate-expander ramp_endpoint::every_ramped_word_of_a_bank_lane_follows_its_own_target` (1); `gate-expander identity::bypass_preserves_current_signed_zero_and_advances_state` (1) - -#### graph - -- `tests::delay_is_exact_and_lane_independent`, `crates/graph/src/lib.rs:7412-7420`; 4 caught: `graph lib runtime::tests::a_successor_line_continues_the_predecessors_pending_samples_head_aligned` (4) -- `tests::binding_rejects_duplicates_and_returns_all_ownership`, `crates/graph/src/lib.rs:7421-7434`; 3 caught: `graph lib program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers` (2); `graph lib program::tests::delayed_edge_gets_staging_buffer_and_blocks_in_place` (1) -- `runtime::tests::every_lane_width_matches_the_scalar_reference_on_hostile_values`, `crates/graph/src/runtime.rs:12429-12432`; 4 caught: `graph lib runtime::tests::a_host_plane_reduction_is_the_arena_reduction_bit_for_bit` (3); `graph lib runtime::tests::negative_zero_survives_every_reduction_group_edge` (1) - -#### graph-compiler - -- `tests::direct_graph_report_exposes_zero_output_latency_and_tail_without_identity_change`, `crates/graph-compiler/src/lib.rs:2785-2803`; 7 caught: `graph lib program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers` (2); `builtins-compiler lib tests::cutoff_boundaries_match_compiler_diagnostics_at_every_launch_rate_and_section` (1); `session json_grammar::u64_decimal_strings_cover_full_domain_and_reject_noncanonical_forms` (1); `graph-compiler track_delay::a_zero_delay_session_lowers_no_delay_node` (1); `graph-compiler track_delay::an_oversized_delay_is_rejected_by_the_caps` (1); `graph lib program::tests::delayed_edge_gets_staging_buffer_and_blocks_in_place` (1) -- `tests::dynamic_rack_compressors_bank_and_render_bit_identically_to_the_per_node_path`, `crates/graph-compiler/src/lib.rs:6921-7007`; 29 caught: `graph lib program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers` (4); `lane sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` (3); `graph-compiler lib tests::launch_compressor_fixture_retains_bank_tail_and_connected_scalar_with_zero_pdc` (2); `lane fader_matrix::select_free_fused_fader_matrix_matches_both_oracles_when_no_lane_is_identity` (2); `math scalar_accuracy::extreme_scaling_paths` (2); `graph lib program::tests::delayed_edge_gets_staging_buffer_and_blocks_in_place` (2); `builtins-compiler lib tests::cutoff_boundaries_match_compiler_diagnostics_at_every_launch_rate_and_section` (1); `graph lib runtime::tests::a_plan_that_reads_the_session_output_is_refused_at_bind` (1); `math scalar_accuracy::exact_anchors` (1); `builtins randomized::the_banks_render_their_scalar_sections_under_random_retargets` (1); `lane g1_op_identity::g1_exp2_int_is_exact_on_the_integer_range` (1); `lane g4_flush::g4_flush_law_holds_at_every_width` (1); `host-web lib tests::selected_observation_reads_keep_same_track_owner_windows_and_sequences` (1); `graph lib runtime::tests::a_banked_source_gathers_the_played_block_bit_for_bit_with_the_copy` (1); `graph-compiler track_delay::a_zero_delay_session_lowers_no_delay_node` (1); `graph-compiler track_delay::an_oversized_delay_is_rejected_by_the_caps` (1); `graph lib program::tests::bank_window_hoisting_preserves_dataflow_on_random_graphs` (1); `rack lib tests::a_fully_folded_full_bank_offers_its_resident_block_before_writing_staging` (1); `graph lib runtime::tests::a_host_plane_reduction_is_the_arena_reduction_bit_for_bit` (1); `graph lib program::tests::a_delayed_stage_boundary_is_not_elided` (1) -- `tests::console_sixty_four_track_fixture_banks_its_dynamic_compressor_bit_identically`, `crates/graph-compiler/src/lib.rs:7338-7529`; 33 caught: `graph lib program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers` (4); `lane sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` (3); `lane fader_matrix::select_free_fused_fader_matrix_matches_both_oracles_when_no_lane_is_identity` (2); `math scalar_accuracy::extreme_scaling_paths` (2); `graph-compiler track_delay::a_ring_is_a_named_allocation` (2); `graph lib program::tests::delayed_edge_gets_staging_buffer_and_blocks_in_place` (2); `console-workload automation::mixing::the_eq_lowering_keeps_the_collapse_when_a_pair_lands_in_one_block` (2); `builtins-compiler lib tests::cutoff_boundaries_match_compiler_diagnostics_at_every_launch_rate_and_section` (1); `graph lib runtime::tests::a_plan_that_reads_the_session_output_is_refused_at_bind` (1); `math scalar_accuracy::exact_anchors` (1); `builtins randomized::the_banks_render_their_scalar_sections_under_random_retargets` (1); `console-workload automation::mixing::a_plan_without_a_control_channel_refuses_the_row` (1); `lane g1_op_identity::g1_exp2_int_is_exact_on_the_integer_range` (1); `graph-compiler lib tests::add_a_track_keeps_existing_track_bits_and_one_transpose_per_chain` (1); `lane g4_flush::g4_flush_law_holds_at_every_width` (1); `graph lib runtime::tests::a_banked_source_gathers_the_played_block_bit_for_bit_with_the_copy` (1); `graph-compiler track_delay::a_zero_delay_session_lowers_no_delay_node` (1); `graph-compiler track_delay::an_oversized_delay_is_rejected_by_the_caps` (1); `parametric-eq response::asymmetric_cascade_sections_are_independent_and_bypass_is_total_identity` (1); `rack lib tests::a_fully_folded_full_bank_offers_its_resident_block_before_writing_staging` (1); `graph lib program::tests::a_delayed_stage_boundary_is_not_elided` (1); `graph-compiler track_delay::the_pdc_counts_are_untouched` (1); `rack lib tests::a_partial_agreement_slot_declines_the_collapse` (1) -- `representative_console_compiles_with_builtins_and_reports_its_shape`, `crates/graph-compiler/tests/compile_shapes.rs:471-509`; 9 caught: `graph lib program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers` (2); `builtins-compiler lib tests::cutoff_boundaries_match_compiler_diagnostics_at_every_launch_rate_and_section` (1); `graph rt1_direct_bank_alloc::direct_bank_graph_render_is_allocation_free_and_bit_exact` (1); `session json_grammar::u64_decimal_strings_cover_full_domain_and_reject_noncanonical_forms` (1); `graph-compiler track_delay::a_zero_delay_session_lowers_no_delay_node` (1); `graph-compiler track_delay::an_oversized_delay_is_rejected_by_the_caps` (1); `graph lib program::tests::delayed_edge_gets_staging_buffer_and_blocks_in_place` (1); `graph-compiler track_delay::the_pdc_counts_are_untouched` (1) -- `a_muted_route_seals_one_route_mute_row_after_its_transform`, `crates/graph-compiler/tests/route_coefficients.rs:475-542`; 10 caught: `graph-compiler track_delay::a_ring_is_a_named_allocation` (2); `graph lib program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers` (2); `builtins-compiler lib tests::cutoff_boundaries_match_compiler_diagnostics_at_every_launch_rate_and_section` (1); `graph-compiler track_delay::a_zero_delay_session_lowers_no_delay_node` (1); `graph-compiler track_delay::an_oversized_delay_is_rejected_by_the_caps` (1); `parametric-eq response::asymmetric_cascade_sections_are_independent_and_bypass_is_total_identity` (1); `graph lib program::tests::delayed_edge_gets_staging_buffer_and_blocks_in_place` (1); `graph-compiler track_delay::the_pdc_counts_are_untouched` (1) -- `a_following_send_seals_one_route_follow_zeroed_row`, `crates/graph-compiler/tests/route_coefficients.rs:580-678`; 10 caught: `graph-compiler track_delay::a_ring_is_a_named_allocation` (2); `graph lib program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers` (2); `builtins-compiler lib tests::cutoff_boundaries_match_compiler_diagnostics_at_every_launch_rate_and_section` (1); `graph-compiler track_delay::a_zero_delay_session_lowers_no_delay_node` (1); `graph-compiler track_delay::an_oversized_delay_is_rejected_by_the_caps` (1); `parametric-eq response::asymmetric_cascade_sections_are_independent_and_bypass_is_total_identity` (1); `graph lib program::tests::delayed_edge_gets_staging_buffer_and_blocks_in_place` (1); `graph-compiler track_delay::the_pdc_counts_are_untouched` (1) -- `unity_route_gain_is_exactly_one`, `crates/graph-compiler/tests/route_gain.rs:73-79`; 4 caught: `math scalar_accuracy::exact_anchors` (2); `math scalar_accuracy::extreme_scaling_paths` (2) -- `the_estimate_charges_each_lane_its_own_ring`, `crates/graph-compiler/tests/track_delay.rs:294-322`; 10 caught: `graph-compiler track_delay::a_ring_is_a_named_allocation` (2); `graph lib program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers` (2); `builtins-compiler lib tests::cutoff_boundaries_match_compiler_diagnostics_at_every_launch_rate_and_section` (1); `graph-compiler track_delay::a_zero_delay_session_lowers_no_delay_node` (1); `graph-compiler track_delay::an_oversized_delay_is_rejected_by_the_caps` (1); `parametric-eq response::asymmetric_cascade_sections_are_independent_and_bypass_is_total_identity` (1); `graph lib program::tests::delayed_edge_gets_staging_buffer_and_blocks_in_place` (1); `graph-compiler track_delay::the_pdc_counts_are_untouched` (1) - -#### host-web - -- `tests::default_ring_covers_stall_tolerance`, `hosts/host-web/src/tests.rs:1676-1706`; 4 caught: `host-core prepare::default_ring_derivation_covers_the_stall_and_two_in_flight_quanta` (4) -- `tests::structural_apply::a_live_edit_is_part_of_the_base_the_successor_is_prepared_from`, `hosts/host-web/src/tests.rs:7099-7166`; 34 caught: `capi lib runtime::live_tests::a_live_edits_own_ramp_length_overrides_the_session_and_does_not_outlive_its_transaction` (4); `graph lib program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers` (4); `host-core prepare::default_ring_derivation_covers_the_stall_and_two_in_flight_quanta` (3); `host-web lib tests::structural_apply::a_master_designated_after_an_empty_boot_reads_as_a_boot_designation` (2); `math scalar_accuracy::extreme_scaling_paths` (2); timeout in engine lib (2); `graph lib program::tests::delayed_edge_gets_staging_buffer_and_blocks_in_place` (2); `graph lib runtime::tests::a_plan_that_reads_the_session_output_is_refused_at_bind` (1); `math scalar_accuracy::exact_anchors` (1); `engine lib realtime::spsc::tests::peek_returns_each_queued_item_in_order_across_wraps_and_changes_nothing` (1); `engine lib realtime::spsc::tests::available_at_entry_is_bounded_and_handles_wrapped_cursors` (1); `lane fader_matrix::select_free_matrix_matches_the_select_form_when_no_lane_is_identity` (1); `graph lib runtime::tests::a_banked_source_gathers_the_played_block_bit_for_bit_with_the_copy` (1); `protocol console_session_edits::a_slot_set_change_that_skips_a_track_refuses_whole` (1); `graph-compiler track_delay::a_zero_delay_session_lowers_no_delay_node` (1); `graph-compiler track_delay::an_oversized_delay_is_rejected_by_the_caps` (1); `lane fader_matrix::settled_fader_matrix_matches_the_two_primitive_oracle` (1); `capi lib runtime::live_tests::a_live_fader_left_undrained_before_a_carrying_structural_commit_is_baked` (1); `graph-compiler track_delay::a_ring_is_a_named_allocation` (1); `graph lib program::tests::a_delayed_stage_boundary_is_not_elided` (1); `graph-compiler track_delay::the_pdc_counts_are_untouched` (1); `rack lib tests::a_partial_agreement_slot_declines_the_collapse` (1) -- `tests::structural_apply::a_structural_edit_behind_an_unadopted_candidate_supersedes_it`, `hosts/host-web/src/tests.rs:7736-7794`; 21 caught: `graph lib program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers` (4); `host-core prepare::default_ring_derivation_covers_the_stall_and_two_in_flight_quanta` (3); `host-web lib tests::structural_apply::a_master_designated_after_an_empty_boot_reads_as_a_boot_designation` (2); timeout in engine lib (2); `graph lib runtime::tests::a_plan_that_reads_the_session_output_is_refused_at_bind` (1); `engine lib realtime::spsc::tests::peek_returns_each_queued_item_in_order_across_wraps_and_changes_nothing` (1); `engine lib realtime::spsc::tests::available_at_entry_is_bounded_and_handles_wrapped_cursors` (1); `graph lib runtime::tests::a_banked_source_gathers_the_played_block_bit_for_bit_with_the_copy` (1); `protocol console_session_edits::a_slot_set_change_that_skips_a_track_refuses_whole` (1); `graph-compiler track_delay::a_zero_delay_session_lowers_no_delay_node` (1); `graph-compiler track_delay::an_oversized_delay_is_rejected_by_the_caps` (1); `parametric-eq response::asymmetric_cascade_sections_are_independent_and_bypass_is_total_identity` (1); `graph lib program::tests::delayed_edge_gets_staging_buffer_and_blocks_in_place` (1); `graph lib program::tests::a_delayed_stage_boundary_is_not_elided` (1) -- `tests::session_seek::a_session_seek_sets_an_automated_fader_exactly_in_the_browser`, `hosts/host-web/src/tests.rs:10319-10338`; 27 caught: `capi lib runtime::live_tests::a_rebuild_that_drops_a_following_route_to_six_words_reports_a_fallback` (4); `session json_grammar::insignificant_whitespace_and_shuffled_keys_canonicalize` (3); `math scalar_accuracy::extreme_scaling_paths` (2); timeout in engine lib (2); `graph lib program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers` (2); `host-web lib tests::session_seek::the_session_seek_exports_refuse_a_sticky_failed_host_and_change_nothing` (1); `graph lib runtime::tests::a_plan_that_reads_the_session_output_is_refused_at_bind` (1); `math scalar_accuracy::exact_anchors` (1); `engine lib realtime::spsc::tests::peek_returns_each_queued_item_in_order_across_wraps_and_changes_nothing` (1); `engine lib realtime::spsc::tests::available_at_entry_is_bounded_and_handles_wrapped_cursors` (1); `graph lib runtime::tests::a_banked_source_gathers_the_played_block_bit_for_bit_with_the_copy` (1); `graph lib program::tests::delayed_edge_gets_staging_buffer_and_blocks_in_place` (1); `source lib tests::timeline::a_seek_in_the_oldest_entry_is_still_a_step` (1); `source lib tests::timeline::a_node_block_reports_the_step_of_a_seek_inside_it_or_at_its_first_sample` (1); `graph-compiler track_delay::a_zero_delay_session_lowers_no_delay_node` (1); `graph-compiler track_delay::an_oversized_delay_is_rejected_by_the_caps` (1); `lane fader_matrix::settled_fader_matrix_matches_the_two_primitive_oracle` (1); `capi lib runtime::live_tests::a_live_fader_left_undrained_before_a_carrying_structural_commit_is_baked` (1); `graph lib program::tests::a_delayed_stage_boundary_is_not_elided` (1) -- `tests::canonical_live::a_live_fader_and_vca_move_under_a_hostile_caller_word_render_the_canonical_bits`, `hosts/host-web/src/tests.rs:10685-10764`; 34 caught: `capi lib runtime::live_tests::a_rebuild_that_drops_a_following_route_to_six_words_reports_a_fallback` (4); `graph lib program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers` (4); `session json_grammar::insignificant_whitespace_and_shuffled_keys_canonicalize` (3); `math scalar_accuracy::extreme_scaling_paths` (2); `graph-compiler track_delay::a_ring_is_a_named_allocation` (2); timeout in engine lib (2); `graph lib program::tests::delayed_edge_gets_staging_buffer_and_blocks_in_place` (2); `console-workload automation::mixing::the_eq_lowering_keeps_the_collapse_when_a_pair_lands_in_one_block` (2); `host-web lib tests::structural_apply::a_master_designated_after_an_empty_boot_reads_as_a_boot_designation` (1); `graph lib runtime::tests::a_plan_that_reads_the_session_output_is_refused_at_bind` (1); `math scalar_accuracy::exact_anchors` (1); `engine lib realtime::spsc::tests::peek_returns_each_queued_item_in_order_across_wraps_and_changes_nothing` (1); `console-workload automation::mixing::a_plan_without_a_control_channel_refuses_the_row` (1); `engine lib realtime::spsc::tests::available_at_entry_is_bounded_and_handles_wrapped_cursors` (1); `graph lib runtime::tests::a_banked_source_gathers_the_played_block_bit_for_bit_with_the_copy` (1); `graph-compiler track_delay::a_zero_delay_session_lowers_no_delay_node` (1); `graph-compiler track_delay::an_oversized_delay_is_rejected_by_the_caps` (1); `capi lib runtime::live_tests::a_live_fader_left_undrained_before_a_carrying_structural_commit_is_baked` (1); `graph lib program::tests::a_delayed_stage_boundary_is_not_elided` (1); `graph-compiler track_delay::the_pdc_counts_are_untouched` (1); `capi lib runtime::live_tests::set_control::automated_carry::a_hand_move_pending_at_a_swap_keeps_its_length` (1) -- `paused_structural_edits_commit_alike_on_both_hosts`, `hosts/host-web/tests/control_parity.rs:4068-4139`; 26 caught: `graph lib program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers` (4); `host-web lib tests::structural_apply::a_master_designated_after_an_empty_boot_reads_as_a_boot_designation` (2); `graph lib program::tests::delayed_edge_gets_staging_buffer_and_blocks_in_place` (2); timeout in engine lib (2); `lane sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` (2); `graph lib runtime::tests::a_plan_that_reads_the_session_output_is_refused_at_bind` (1); `engine lib realtime::spsc::tests::peek_returns_each_queued_item_in_order_across_wraps_and_changes_nothing` (1); `engine lib realtime::spsc::tests::available_at_entry_is_bounded_and_handles_wrapped_cursors` (1); `host-web lib tests::selected_observation_reads_keep_same_track_owner_windows_and_sequences` (1); `graph lib runtime::tests::a_banked_source_gathers_the_played_block_bit_for_bit_with_the_copy` (1); `protocol console_session_edits::a_slot_set_change_that_skips_a_track_refuses_whole` (1); `graph-compiler track_delay::a_zero_delay_session_lowers_no_delay_node` (1); `graph-compiler track_delay::an_oversized_delay_is_rejected_by_the_caps` (1); `parametric-eq response::asymmetric_cascade_sections_are_independent_and_bypass_is_total_identity` (1); `graph lib runtime::tests::a_host_plane_reduction_is_the_arena_reduction_bit_for_bit` (1); `effect-runtime lane_identity::the_boundary_check_is_width_independent` (1); `graph-compiler track_delay::a_ring_is_a_named_allocation` (1); `graph lib program::tests::a_delayed_stage_boundary_is_not_elided` (1); `graph-compiler track_delay::the_pdc_counts_are_untouched` (1) -- `a_declared_discontinuity_resets_the_floors_alike_on_both_hosts`, `hosts/host-web/tests/control_parity.rs:4409-4480`; 26 caught: `graph lib program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers` (4); `host-web lib tests::structural_apply::a_master_designated_after_an_empty_boot_reads_as_a_boot_designation` (2); `graph lib program::tests::delayed_edge_gets_staging_buffer_and_blocks_in_place` (2); timeout in engine lib (2); `lane sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` (2); `graph lib runtime::tests::a_plan_that_reads_the_session_output_is_refused_at_bind` (1); `engine lib realtime::spsc::tests::peek_returns_each_queued_item_in_order_across_wraps_and_changes_nothing` (1); `engine lib realtime::spsc::tests::available_at_entry_is_bounded_and_handles_wrapped_cursors` (1); `host-web lib tests::selected_observation_reads_keep_same_track_owner_windows_and_sequences` (1); `graph lib runtime::tests::a_banked_source_gathers_the_played_block_bit_for_bit_with_the_copy` (1); `protocol console_session_edits::a_slot_set_change_that_skips_a_track_refuses_whole` (1); `graph-compiler track_delay::a_zero_delay_session_lowers_no_delay_node` (1); `graph-compiler track_delay::an_oversized_delay_is_rejected_by_the_caps` (1); `parametric-eq response::asymmetric_cascade_sections_are_independent_and_bypass_is_total_identity` (1); `graph lib runtime::tests::a_host_plane_reduction_is_the_arena_reduction_bit_for_bit` (1); `effect-runtime lane_identity::the_boundary_check_is_width_independent` (1); `graph-compiler track_delay::a_ring_is_a_named_allocation` (1); `graph lib program::tests::a_delayed_stage_boundary_is_not_elided` (1); `graph-compiler track_delay::the_pdc_counts_are_untouched` (1) -- `browser_identity_fixture_retained_rows_stay_within_their_budgets`, `hosts/host-web/tests/retained_ceilings.rs:208-268`; 11 caught: `graph lib program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers` (4); timeout in engine lib (2); `host-web boot_transient_budget::pinned_multiplier_bounds_the_worst_accepted_parse_and_model_build_peak` (1); `graph lib runtime::tests::a_plan_that_reads_the_session_output_is_refused_at_bind` (1); `graph lib runtime::tests::a_banked_source_gathers_the_played_block_bit_for_bit_with_the_copy` (1); `graph lib program::tests::delayed_edge_gets_staging_buffer_and_blocks_in_place` (1); `graph lib program::tests::a_delayed_stage_boundary_is_not_elided` (1) -- `the_graph_row_charges_the_plans_gate_and_not_the_sessions_superseded_count`, `hosts/host-web/tests/retained_ceilings.rs:270-294`; 10 caught: `graph lib program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers` (4); timeout in engine lib (2); `graph lib runtime::tests::a_plan_that_reads_the_session_output_is_refused_at_bind` (1); `graph lib runtime::tests::a_banked_source_gathers_the_played_block_bit_for_bit_with_the_copy` (1); `graph lib program::tests::delayed_edge_gets_staging_buffer_and_blocks_in_place` (1); `graph lib program::tests::a_delayed_stage_boundary_is_not_elided` (1) - -#### lane - -- `holey_populations_keep_neutral_wide_padding`, `crates/lane/tests/fader_matrix.rs:504-508`; 3 caught: `lane fader_matrix::select_free_fused_fader_matrix_matches_both_oracles_when_no_lane_is_identity` (1); `lane fader_matrix::select_free_matrix_matches_the_select_form_when_no_lane_is_identity` (1); `lane fader_matrix::settled_fader_matrix_matches_the_two_primitive_oracle` (1) -- `wrong_equations_are_distinguished_before_the_dut_is_checked`, `crates/lane/tests/fader_matrix.rs:545-593`; 5 caught: `lane fader_matrix::select_free_fused_fader_matrix_matches_both_oracles_when_no_lane_is_identity` (3); `lane fader_matrix::select_free_matrix_matches_the_select_form_when_no_lane_is_identity` (1); `lane fader_matrix::settled_fader_matrix_matches_the_two_primitive_oracle` (1) -- `attestation_passes_on_this_thread`, `crates/lane/tests/fp_env.rs:22-25`; 4 caught: `lane fp_env::` (2); `lane fp_env::x86::a_hostile_caller_word_is_normalised_and_returned_bit_exactly` (1); `lane fp_env::x86::attestation_passes_from_a_hostile_caller_word` (1) -- `the_canonical_word_is_the_word_inside_the_guard` [UNIQUE (test-only code)], `crates/lane/tests/fp_env.rs:27-48`; 4 caught: `lane fp_env::` (2); other candidates only (1); `lane fp_env::x86::a_hostile_caller_word_is_normalised_and_returned_bit_exactly` (1) -- `g4_pair_law_cases_at_every_width`, `crates/lane/tests/g4_flush.rs:352-355`; 4 caught: `lane g4_flush::g4_pair_law_holds_at_every_width` (2); `lane g4_flush::g4_flush_law_holds_at_every_width` (1); `lane sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` (1) -- `g1_a_lane_fed_only_invalid_values_ends_at_positive_zero`, `crates/lane/tests/meter_peak.rs:222-225`; 8 caught: `lane sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` (3); `lane fader_matrix::select_free_fused_fader_matrix_matches_both_oracles_when_no_lane_is_identity` (2); `lane input_chain_arming::any_state_word_in_the_band_arms_the_block` (1); `lane g1_op_identity::g1_exp2_int_is_exact_on_the_integer_range` (1); `lane g4_flush::g4_flush_law_holds_at_every_width` (1) -- `g1_select_max_is_order_free_only_on_the_sanitized_domain`, `crates/lane/tests/meter_peak.rs:262-302`; 4 caught: `lane sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` (3); `lane g1_op_identity::g1_exp2_int_is_exact_on_the_integer_range` (1) -- `the_and_form_is_the_select_form_on_every_lane_subset`, `crates/lane/tests/sanitise_counter.rs:247-308`; 7 caught: `lane sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` (4); `lane fader_matrix::select_free_fused_fader_matrix_matches_both_oracles_when_no_lane_is_identity` (2); `lane g4_flush::g4_flush_law_holds_at_every_width` (1) - -#### math - -- `f1_shaper_x7_x8_domains_are_covered`, `crates/math/tests/f1_fast_db_bounds.rs:575-596`; 4 caught: `graph-compiler track_delay::a_ring_is_a_named_allocation` (1); `graph-compiler track_delay::a_zero_delay_session_lowers_no_delay_node` (1); `graph-compiler track_delay::an_oversized_delay_is_rejected_by_the_caps` (1); `graph-compiler track_delay::the_pdc_counts_are_untouched` (1) -- `f1_crossing_domains_match_independent_definitions`, `crates/math/tests/f1_fast_db_bounds.rs:927-952`; 8 caught: `lane sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` (3); `lane fader_matrix::select_free_fused_fader_matrix_matches_both_oracles_when_no_lane_is_identity` (2); `lane g1_op_identity::g1_exp2_int_is_exact_on_the_integer_range` (1); `capi lib runtime::live_tests::a_live_fader_left_undrained_before_a_carrying_structural_commit_is_baked` (1); `graph-compiler track_delay::a_ring_is_a_named_allocation` (1) - -#### multiband-compressor - -- `scalar_and_bank_state_interchange_continues`, `crates/multiband-compressor/tests/identity.rs:578-704`; 10 caught: `lane sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` (3); `lane fader_matrix::select_free_fused_fader_matrix_matches_both_oracles_when_no_lane_is_identity` (2); `builtins randomized::the_banks_render_their_scalar_sections_under_random_retargets` (1); `lane g1_op_identity::g1_exp2_int_is_exact_on_the_integer_range` (1); `lane g4_flush::g4_flush_law_holds_at_every_width` (1); `host-web lib tests::selected_observation_reads_keep_same_track_owner_windows_and_sequences` (1); `effect-runtime lane_identity::the_boundary_check_is_width_independent` (1) - -#### parametric-eq - -- `interleave_identity::disabled_cuts_with_an_original_band_ramp_match_the_four_section_oracle`, `crates/parametric-eq/src/lib.rs:4896-4899`; 15 caught: `parametric-eq lib elision::a_discontinuity_reset_mid_ramp_refreshes_the_identity_flag` (4); `graph-compiler track_delay::a_ring_is_a_named_allocation` (2); `console-workload automation::mixing::the_eq_lowering_keeps_the_collapse_when_a_pair_lands_in_one_block` (2); `console-workload automation::mixing::a_plan_without_a_control_channel_refuses_the_row` (1); `lane g4_flush::g4_pair_law_holds_at_every_width` (1); `graph-compiler track_delay::a_zero_delay_session_lowers_no_delay_node` (1); `graph-compiler track_delay::an_oversized_delay_is_rejected_by_the_caps` (1); `lane sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` (1); `effect-runtime contract_ramp_identity::linear_smoother_is_bit_identical_to_the_linear_ramp` (1); `graph-compiler track_delay::the_pdc_counts_are_untouched` (1) -- `interleave_identity::a_tiny_restored_disabled_cut_state_refuses_elision_but_preserves_old_bands`, `crates/parametric-eq/src/lib.rs:4901-4904`; 18 caught: `parametric-eq lib elision::a_discontinuity_reset_mid_ramp_refreshes_the_identity_flag` (4); `lane sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` (3); `graph-compiler track_delay::a_ring_is_a_named_allocation` (2); `parametric-eq lib randomized_restores::the_stationary_cascade_renders_the_full_cascade_after_random_restores` (2); `console-workload automation::mixing::the_eq_lowering_keeps_the_collapse_when_a_pair_lands_in_one_block` (2); `console-workload automation::mixing::a_plan_without_a_control_channel_refuses_the_row` (1); `lane g4_flush::g4_pair_law_holds_at_every_width` (1); `graph-compiler track_delay::a_zero_delay_session_lowers_no_delay_node` (1); `graph-compiler track_delay::an_oversized_delay_is_rejected_by_the_caps` (1); `graph-compiler track_delay::the_pdc_counts_are_untouched` (1) -- `interleave_identity::disabled_cuts_preserve_original_band_bits_against_a_direct_four_section_oracle`, `crates/parametric-eq/src/lib.rs:4946-4968`; 15 caught: `parametric-eq lib elision::a_discontinuity_reset_mid_ramp_refreshes_the_identity_flag` (4); `graph-compiler track_delay::a_ring_is_a_named_allocation` (2); `parametric-eq lib randomized_restores::the_stationary_cascade_renders_the_full_cascade_after_random_restores` (2); `console-workload automation::mixing::the_eq_lowering_keeps_the_collapse_when_a_pair_lands_in_one_block` (2); `console-workload automation::mixing::a_plan_without_a_control_channel_refuses_the_row` (1); `graph-compiler track_delay::a_zero_delay_session_lowers_no_delay_node` (1); `graph-compiler track_delay::an_oversized_delay_is_rejected_by_the_caps` (1); `lane sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` (1); `graph-compiler track_delay::the_pdc_counts_are_untouched` (1) -- `interleave_identity::disabled_cuts_preserve_all_high_pass_signed_zero_against_four_section_oracle`, `crates/parametric-eq/src/lib.rs:4970-4992`; 5 caught: `parametric-eq lib elision::a_discontinuity_reset_mid_ramp_refreshes_the_identity_flag` (4); `lane sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` (1) -- `interleave_identity::signed_zero_refusal_preserves_the_full_six_section_bits`, `crates/parametric-eq/src/lib.rs:4994-5008`; 14 caught: `parametric-eq lib elision::a_discontinuity_reset_mid_ramp_refreshes_the_identity_flag` (4); `graph-compiler track_delay::a_ring_is_a_named_allocation` (2); `parametric-eq lib randomized_restores::the_stationary_cascade_renders_the_full_cascade_after_random_restores` (2); `console-workload automation::mixing::the_eq_lowering_keeps_the_collapse_when_a_pair_lands_in_one_block` (2); `console-workload automation::mixing::a_plan_without_a_control_channel_refuses_the_row` (1); `graph-compiler track_delay::a_zero_delay_session_lowers_no_delay_node` (1); `graph-compiler track_delay::an_oversized_delay_is_rejected_by_the_caps` (1); `graph-compiler track_delay::the_pdc_counts_are_untouched` (1) -- `every_width_matches_the_scalar_instantiation`, `crates/parametric-eq/tests/bank.rs:183-334`; 17 caught: `lane sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` (3); `lane fader_matrix::select_free_fused_fader_matrix_matches_both_oracles_when_no_lane_is_identity` (2); `graph-compiler track_delay::a_ring_is_a_named_allocation` (2); `parametric-eq lib randomized_restores::the_stationary_cascade_renders_the_full_cascade_after_random_restores` (2); `lane g4_flush::g4_pair_law_holds_at_every_width` (1); `lane g4_flush::g4_flush_law_holds_at_every_width` (1); `host-web lib tests::selected_observation_reads_keep_same_track_owner_windows_and_sequences` (1); `graph-compiler track_delay::a_zero_delay_session_lowers_no_delay_node` (1); `graph-compiler track_delay::an_oversized_delay_is_rejected_by_the_caps` (1); `parametric-eq response::asymmetric_cascade_sections_are_independent_and_bypass_is_total_identity` (1); `effect-runtime lane_identity::the_boundary_check_is_width_independent` (1); `graph-compiler track_delay::the_pdc_counts_are_untouched` (1) -- `a_mid_ramp_restore_continues_bit_for_bit_at_every_sample`, `crates/parametric-eq/tests/carry.rs:194-261`; 18 caught: `lane sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` (3); `lane fader_matrix::select_free_fused_fader_matrix_matches_both_oracles_when_no_lane_is_identity` (2); `graph-compiler track_delay::a_ring_is_a_named_allocation` (2); `console-workload automation::mixing::the_eq_lowering_keeps_the_collapse_when_a_pair_lands_in_one_block` (2); `console-workload automation::mixing::a_plan_without_a_control_channel_refuses_the_row` (1); `lane g4_flush::g4_pair_law_holds_at_every_width` (1); `lane g4_flush::g4_flush_law_holds_at_every_width` (1); `host-web lib tests::selected_observation_reads_keep_same_track_owner_windows_and_sequences` (1); `graph-compiler track_delay::a_zero_delay_session_lowers_no_delay_node` (1); `graph-compiler track_delay::an_oversized_delay_is_rejected_by_the_caps` (1); `parametric-eq response::asymmetric_cascade_sections_are_independent_and_bypass_is_total_identity` (1); `effect-runtime lane_identity::the_boundary_check_is_width_independent` (1); `graph-compiler track_delay::the_pdc_counts_are_untouched` (1) -- `automation_is_partition_invariant`, `crates/parametric-eq/tests/contract.rs:336-437`; 9 caught: `graph-compiler track_delay::a_ring_is_a_named_allocation` (2); `parametric-eq lib randomized_restores::the_stationary_cascade_renders_the_full_cascade_after_random_restores` (2); `graph-compiler track_delay::a_zero_delay_session_lowers_no_delay_node` (1); `graph-compiler track_delay::an_oversized_delay_is_rejected_by_the_caps` (1); `parametric-eq response::asymmetric_cascade_sections_are_independent_and_bypass_is_total_identity` (1); `effect-runtime lane_identity::the_boundary_check_is_width_independent` (1); `graph-compiler track_delay::the_pdc_counts_are_untouched` (1) -- `the_collapsed_body_renders_the_dual_bodys_left_plane`, `crates/parametric-eq/tests/mono_collapse.rs:177-226`; 7 caught: `graph-compiler track_delay::a_ring_is_a_named_allocation` (2); `graph-compiler track_delay::a_zero_delay_session_lowers_no_delay_node` (1); `graph-compiler track_delay::an_oversized_delay_is_rejected_by_the_caps` (1); `parametric-eq response::asymmetric_cascade_sections_are_independent_and_bypass_is_total_identity` (1); `effect-runtime lane_identity::the_boundary_check_is_width_independent` (1); `graph-compiler track_delay::the_pdc_counts_are_untouched` (1) -- `common_eq_adapter_preserves_input_ownership_capacity_and_refusal_sentinels` [REDUNDANT-IF-PEER-KEPT], `crates/parametric-eq/tests/response.rs:1765-1984`; 9 caught: `graph-compiler track_delay::a_ring_is_a_named_allocation` (2); `parametric-eq response::asymmetric_cascade_sections_are_independent_and_bypass_is_total_identity` (2); `parametric-eq response::common_eq_trait_object_query_is_allocation_free` (1); other candidates only (1); `graph-compiler track_delay::a_zero_delay_session_lowers_no_delay_node` (1); `graph-compiler track_delay::an_oversized_delay_is_rejected_by_the_caps` (1); `graph-compiler track_delay::the_pdc_counts_are_untouched` (1) - -#### protocol - -- `controller::tests::a_slot_set_change_that_skips_a_track_is_never_acknowledged`, `crates/protocol/src/controller/tests.rs:2364-2455`; 5 caught: timeout in engine lib (2); `protocol lib controller::tests::edit_path_is_written_at_commit_and_replayed_byte_for_byte` (1); `protocol console_session_edits::a_slot_set_change_that_skips_a_track_refuses_whole` (1); `session json_grammar::u64_decimal_strings_cover_full_domain_and_reject_noncanonical_forms` (1) -- `controller::tests::decoded_track_edit_reaches_same_atomic_session_store`, `crates/protocol/src/controller/tests.rs:2761-2796`; 4 caught: timeout in engine lib (2); `protocol console_session_edits::a_slot_set_change_that_skips_a_track_refuses_whole` (1); `session json_grammar::u64_decimal_strings_cover_full_domain_and_reject_noncanonical_forms` (1) -- `controller::tests::decoded_route_edit_reaches_same_atomic_session_store`, `crates/protocol/src/controller/tests.rs:2798-2835`; 4 caught: timeout in engine lib (2); `protocol console_session_edits::a_slot_set_change_that_skips_a_track_refuses_whole` (1); `session json_grammar::u64_decimal_strings_cover_full_domain_and_reject_noncanonical_forms` (1) -- `set_control_writes_exactly_the_field_its_address_names`, `crates/protocol/tests/edit_ramps.rs:776-814`; 3 caught: `host-web lib tests::structural_apply::a_master_designated_after_an_empty_boot_reads_as_a_boot_designation` (1); `protocol console_session_edits::a_slot_set_change_that_skips_a_track_refuses_whole` (1); `session json_grammar::u64_decimal_strings_cover_full_domain_and_reject_noncanonical_forms` (1) -- `vca_refusals_commit_nothing`, `crates/protocol/tests/vca_edits.rs:306-526`; 3 caught: `host-web control_parity::a_vca_move_over_an_automated_member_is_live_alike_on_both_hosts` (1); `protocol console_session_edits::a_slot_set_change_that_skips_a_track_refuses_whole` (1); `protocol submix_strip_edits::every_strip_opcode_edits_a_submix` (1) - -#### realtime-policy - -- `binary::two_arguments_exit_two`, `tools/realtime-policy/tests/policy/binary.rs:29-37`; 4 caught: `realtime-policy policy::binary::a_root_with_a_missing_scan_root_exits_one` (1); `realtime-policy policy::run::a_valid_tree_exits_zero_and_prints_the_success_line` (1); `realtime-policy policy::boundary::a_boundary_finding_names_the_marker_line` (1); `realtime-policy policy::boundary::a_marker_inside_an_attribute_is_refused` (1) -- `drain::indirect::a_proc_macro_named_debug_assert_is_refused`, `tools/realtime-policy/tests/policy/drain/indirect.rs:249-263`; 3 caught: `realtime-policy policy::boundary::a_region_that_ends_in_another_block_is_refused` (1); `realtime-policy policy::boundary::a_boundary_finding_names_the_marker_line` (1); `realtime-policy policy::boundary::a_marker_inside_an_attribute_is_refused` (1) -- `unsafe_ownership::unsafe_code_outside_the_allowlist_is_a_finding`, `tools/realtime-policy/tests/policy/unsafe_ownership.rs:13-94`; 4 caught: `realtime-policy policy::boundary::a_region_that_ends_in_another_block_is_refused` (1); `realtime-policy policy::boundary::a_boundary_finding_names_the_marker_line` (1); `realtime-policy policy::boundary::a_marker_inside_an_attribute_is_refused` (1); `realtime-policy policy::boundary::a_region_inside_a_macro_body_is_tokens_and_passes` (1) -- `unsafe_ownership::the_dropped_allowlist_entries_are_findings`, `tools/realtime-policy/tests/policy/unsafe_ownership.rs:100-118`; 4 caught: `realtime-policy policy::boundary::a_region_that_ends_in_another_block_is_refused` (1); `realtime-policy policy::boundary::a_boundary_finding_names_the_marker_line` (1); `realtime-policy policy::boundary::a_marker_inside_an_attribute_is_refused` (1); `realtime-policy policy::boundary::a_region_inside_a_macro_body_is_tokens_and_passes` (1) - -#### session - -- `edit_ramp::tests::clearing_a_target_drops_its_rows_and_nothing_else`, `crates/session/src/edit_ramp.rs:254-274`; 4 caught: `protocol edit_ramps::an_edit_that_rewrites_or_removes_a_target_clears_its_earlier_lengths` (2); `protocol edit_ramps::set_control_records_the_row_its_address_names` (1); `protocol edit_ramps::the_last_edit_to_write_a_row_decides_its_length` (1) -- `u64_model_fields_accept_the_full_unsigned_domain`, `crates/session/tests/invalid_matrix.rs:56-86`; 4 caught: `session json_grammar::insignificant_whitespace_and_shuffled_keys_canonicalize` (3); `session json_grammar::u64_decimal_strings_cover_full_domain_and_reject_noncanonical_forms` (1) - -#### session-validator - -- `the_shipped_skill_validator_commands_run_verbatim`, `tools/session-validator/tests/skill.rs:61-111`; 5 caught: `session-validator validate::effect_preparation_matches_engine_and_cli_refuses_without_canonical_output` (3); `session-validator validate::each_mutation_is_attributed_to_the_stage_that_rejects_it` (2) -- `the_duplicate_key_fixture_fails_the_grammar_stage`, `tools/session-validator/tests/validate.rs:137-151`; 7 caught: `session-validator validate::each_mutation_is_attributed_to_the_stage_that_rejects_it` (7) -- `canonical_output_reproduces_the_checked_in_canonical_fixtures`, `tools/session-validator/tests/validate.rs:430-440`; 4 caught: `session-validator validate::effect_preparation_matches_engine_and_cli_refuses_without_canonical_output` (2); `session-validator validate::each_mutation_is_attributed_to_the_stage_that_rejects_it` (2) - -#### soft-clip - -- `a_finite_but_out_of_range_block_also_fails`, `crates/soft-clip/tests/boundary_check.rs:69-83`; 10 caught: `effect-runtime lane_identity::the_lane_mask_agrees_across_widths` (2); `lane fader_matrix::select_free_fused_fader_matrix_matches_both_oracles_when_no_lane_is_identity` (2); `math scalar_accuracy::extreme_scaling_paths` (2); `math scalar_accuracy::exact_anchors` (1); `effect-runtime lane_identity::the_boundary_check_is_width_independent` (1); `lane sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` (1); `lane g4_flush::g4_flush_law_holds_at_every_width` (1) -- `every_partition_renders_the_one_shot_bits_and_state`, `crates/soft-clip/tests/partition_invariance.rs:88-118`; 14 caught: `lane sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` (3); `math scalar_accuracy::exact_anchors` (2); `lane fader_matrix::select_free_fused_fader_matrix_matches_both_oracles_when_no_lane_is_identity` (2); `math scalar_accuracy::extreme_scaling_paths` (2); `effect-runtime contract_ramp_identity::linear_smoother_is_bit_identical_to_the_linear_ramp` (2); `lane g4_flush::g4_flush_law_holds_at_every_width` (1); `host-web lib tests::selected_observation_reads_keep_same_track_owner_windows_and_sequences` (1); `math m3_determinism::m3_corpus_digests_match_pins` (1) -- `a_snapshot_restores_into_a_fresh_instance_and_continues_bit_for_bit`, `crates/soft-clip/tests/state_roundtrip.rs:41-83`; 13 caught: `lane sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` (3); `math scalar_accuracy::exact_anchors` (2); `lane fader_matrix::select_free_fused_fader_matrix_matches_both_oracles_when_no_lane_is_identity` (2); `math scalar_accuracy::extreme_scaling_paths` (2); `effect-runtime contract_ramp_identity::linear_smoother_is_bit_identical_to_the_linear_ramp` (2); `host-web lib tests::selected_observation_reads_keep_same_track_owner_windows_and_sequences` (1); `math m3_determinism::m3_corpus_digests_match_pins` (1) - -#### source - -- `tests::host_submission_is_fifo_wraparound_and_never_accepts_a_prefix`, `crates/source/src/lib.rs:4162-4195`; 4 caught: timeout in engine lib (2); `engine lib realtime::spsc::tests::peek_returns_each_queued_item_in_order_across_wraps_and_changes_nothing` (1); `engine lib realtime::spsc::tests::available_at_entry_is_bounded_and_handles_wrapped_cursors` (1) -- `tests::underrun_is_positive_zero_and_eof_is_not_an_underrun`, `crates/source/src/lib.rs:4197-4236`; 5 caught: timeout in engine lib (2); `source randomized::random_schedules_match_the_independent_ring_model` (1); `engine lib realtime::spsc::tests::peek_returns_each_queued_item_in_order_across_wraps_and_changes_nothing` (1); `engine lib realtime::spsc::tests::available_at_entry_is_bounded_and_handles_wrapped_cursors` (1) -- `tests::copy_channel_preserves_pcm_and_zeroes_missing_frames`, `crates/source/src/lib.rs:4332-4368`; 4 caught: timeout in engine lib (2); `engine lib realtime::spsc::tests::peek_returns_each_queued_item_in_order_across_wraps_and_changes_nothing` (1); `engine lib realtime::spsc::tests::available_at_entry_is_bounded_and_handles_wrapped_cursors` (1) -- `tests::seek_switches_at_boundary_and_discards_older_queued_audio`, `crates/source/src/lib.rs:4752-4784`; 4 caught: timeout in engine lib (2); `engine lib realtime::spsc::tests::peek_returns_each_queued_item_in_order_across_wraps_and_changes_nothing` (1); `engine lib realtime::spsc::tests::available_at_entry_is_bounded_and_handles_wrapped_cursors` (1) -- `tests::rejected_host_submission_publishes_nothing_and_leaves_the_producer_untouched`, `crates/source/src/lib.rs:4844-4885`; 4 caught: timeout in engine lib (2); `engine lib realtime::spsc::tests::peek_returns_each_queued_item_in_order_across_wraps_and_changes_nothing` (1); `engine lib realtime::spsc::tests::available_at_entry_is_bounded_and_handles_wrapped_cursors` (1) -- `tests::one_four_channel_source_fans_out_to_three_inputs_in_the_sequential_executor`, `crates/source/src/lib.rs:4887-5133`; 12 caught: `graph lib program::tests::chain_of_seven_stages_lowers_to_six_ops_three_taps_and_two_buffers` (3); timeout in engine lib (2); `graph lib program::tests::delayed_edge_gets_staging_buffer_and_blocks_in_place` (2); `graph lib runtime::tests::a_plan_that_reads_the_session_output_is_refused_at_bind` (1); `engine lib realtime::spsc::tests::peek_returns_each_queued_item_in_order_across_wraps_and_changes_nothing` (1); `engine lib realtime::spsc::tests::available_at_entry_is_bounded_and_handles_wrapped_cursors` (1); `graph lib runtime::tests::a_banked_source_gathers_the_played_block_bit_for_bit_with_the_copy` (1); `graph lib program::tests::a_delayed_stage_boundary_is_not_elided` (1) -- `tests::timeline::a_node_block_reports_the_steps_of_a_source_read_step_back`, `crates/source/src/lib.rs:6936-6980`; 4 caught: `source lib tests::timeline::a_node_block_reports_the_step_of_a_seek_inside_it_or_at_its_first_sample` (2); `source lib tests::published::an_unpublished_seek_and_its_pcm_wait_in_their_slots_until_published` (1); `source lib tests::timeline::a_seek_in_the_oldest_entry_is_still_a_step` (1) -- `tests::timeline::a_step_back_steps_where_no_held_entry_starts_before_it`, `crates/source/src/lib.rs:6982-7021`; 4 caught: `source lib tests::timeline::a_node_block_reports_the_step_of_a_seek_inside_it_or_at_its_first_sample` (2); `source lib tests::published::an_unpublished_seek_and_its_pcm_wait_in_their_slots_until_published` (1); `source lib tests::timeline::a_seek_in_the_oldest_entry_is_still_a_step` (1) -- `frozen_seek_schedules_match_the_independent_ring_model`, `crates/source/tests/seek_schedule_model.rs:22-25`; 4 caught: timeout in engine lib (2); `engine lib realtime::spsc::tests::peek_returns_each_queued_item_in_order_across_wraps_and_changes_nothing` (1); `engine lib realtime::spsc::tests::available_at_entry_is_bounded_and_handles_wrapped_cursors` (1) - -#### transient-shaper - -- `the_scalar_product_is_partition_invariant`, `crates/transient-shaper/tests/partition.rs:40-119`; 7 caught: `effect-runtime contract_ramp_identity::linear_smoother_is_bit_identical_to_the_linear_ramp` (3); `lane sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` (2); `lane g4_flush::g4_flush_law_holds_at_every_width` (1); `host-web lib tests::selected_observation_reads_keep_same_track_owner_windows_and_sequences` (1) - -#### true-peak-limiter - -- `tests::partition_invariance_holds_over_block_sizes`, `crates/true-peak-limiter/src/lib.rs:7541-7584`; 3 caught: `lane sanitise_counter::every_copy_of_the_sanitise_prologue_counts_what_the_policy_counts` (2); `effect-runtime lane_identity::the_boundary_check_is_width_independent` (1) -- `the_collapsed_body_renders_the_dual_bodys_left_plane`, `crates/true-peak-limiter/tests/mono_collapse.rs:249-308`; 5 caught: `true-peak-limiter mono_collapse::a_desymmetrized_bank_is_a_never_collapsed_bank` (2); `console-workload paired_spans::the_limiter_bank_renders_the_dual_bits_in_every_scenario` (2); `effect-runtime lane_identity::the_boundary_check_is_width_independent` (1) - -### Deleted test files (whole) - -- `crates/conformance/src/block.rs` (68), `src/compare.rs` (235), `src/determinism.rs` (34), - `tests/api_metrics.rs` (100): item 4. -- `crates/soft-clip/tests/partition_invariance.rs` (118), `crates/source/tests/seek_schedule_model.rs` - (533), `hosts/host-web/tests/retained_ceilings.rs` (294), `tools/session-validator/tests/skill.rs` - (111): every test in them is listed above; their helpers go with them. `retained_ceilings.rs` - held the native budgets of the browser identity fixture: the shipped wasm32 artifact's ceilings - stay in `expected.json` (checked by `check-browser-expected-resources.py`); the deleted file - ceilinged only the native 8- and 4-lane builds, which do not ship. host-web's `lane` - dev-dependency served only it and the deleted `canonical_live` module, so it goes too - (`Cargo.lock` loses that edge). - -### Deleted helpers (compiler-reported, 71 items, 2,041 lines) - -- `Command`, `crates/builtins/tests/stage.rs:860-883` -- `automation_script`, `crates/builtins/tests/stage.rs:885-960` -- `render_banked`, `crates/builtins/tests/stage.rs:962-1054` -- `render_per_track`, `crates/builtins/tests/stage.rs:1056-1117` -- `document`, `crates/capi/src/runtime/live_tests.rs:8409-8417` -- `vca_at`, `crates/capi/src/runtime/live_tests.rs:8419-8425` -- `writes`, `crates/capi/src/runtime/live_tests.rs:8427-8445` -- `case`, `crates/capi/src/runtime/live_tests.rs:8447-8516` -- `fader_length`, `crates/capi/src/runtime/live_tests.rs:8518-8525` -- `fader_rows`, `crates/capi/src/runtime/live_tests.rs:9867-9879` -- `Leg`, `crates/capi/src/runtime/live_tests.rs:9881-9888` -- `leg`, `crates/capi/src/runtime/live_tests.rs:9890-9931` -- `follows_mute_edit`, `crates/capi/src/runtime/live_tests.rs:11380-11394` -- `route_entry`, `crates/capi/src/runtime/live_tests.rs:11500-11519` -- `a_reverted_owner_carries_from_p0`, `crates/capi/src/runtime/supersede_tests.rs:818-842` -- `upsert_added_source`, `crates/capi/src/runtime/supersede_tests.rs:1267-1286` -- `remove_source_track`, `crates/capi/src/runtime/supersede_tests.rs:1288-1299` -- `FreshSourceCase`, `crates/capi/src/runtime/supersede_tests.rs:1301-1313` -- `fresh_source_cases`, `crates/capi/src/runtime/supersede_tests.rs:1315-1354` -- `FRAMES`, `crates/compressor/tests/lane_identity.rs:24-24` -- `QUANTUM`, `crates/compressor/tests/lane_identity.rs:25-25` -- `track_values`, `crates/compressor/tests/lane_identity.rs:27-40` -- `every_parameter`, `crates/compressor/tests/partition.rs:26-45` -- `OVERFLOWING_KNEES`, `crates/effect-runtime/tests/dynamics.rs:237-246` -- `NARROWEST_SOFT_KNEES`, `crates/effect-runtime/tests/dynamics.rs:248-255` -- `track_values`, `crates/gate-expander/tests/identity.rs:12-29` -- `render_bank_native`, `crates/gate-expander/tests/identity.rs:31-70` -- `compile_bank_and_per_node`, `crates/graph-compiler/src/lib.rs:1141-1196` -- `taps`, `crates/graph-compiler/tests/compile_shapes.rs:376-386` -- `representative_console`, `crates/graph-compiler/tests/compile_shapes.rs:388-469` -- `assert_estimate_moves_by_the_route_activity_charge`, `crates/graph-compiler/tests/route_coefficients.rs:544-578` -- `assert_width_matches_reference`, `crates/graph/src/runtime.rs:12313-12427` -- `compare_holey_population`, `crates/lane/tests/fader_matrix.rs:430-502` -- `run_scalar`, `crates/lane/tests/fader_matrix.rs:510-543` -- `pair_cases`, `crates/lane/tests/g4_flush.rs:262-350` -- `invalid_lane_at`, `crates/lane/tests/meter_peak.rs:178-220` -- `F1_SHAPER_LEVEL_MIN`, `crates/math/tests/f1_fast_db_bounds.rs:561-561` -- `worst_over_run`, `crates/math/tests/f1_fast_db_bounds.rs:866-901` -- `crossing_worst_db`, `crates/math/tests/f1_fast_db_bounds.rs:903-925` -- `original_four`, `crates/parametric-eq/src/lib.rs:4238-4248` -- `process_original_four`, `crates/parametric-eq/src/lib.rs:4250-4261` -- `process_original_four_ramped`, `crates/parametric-eq/src/lib.rs:4263-4303` -- `all_high_pass_channel`, `crates/parametric-eq/src/lib.rs:4305-4330` -- `original_state_bits`, `crates/parametric-eq/src/lib.rs:4332-4346` -- `compare_disabled_cuts_to_original_four`, `crates/parametric-eq/src/lib.rs:4348-4456` -- `compare_signed_zero_refusal`, `crates/parametric-eq/src/lib.rs:4458-4548` -- `disabled_cuts_general_ramp_parity`, `crates/parametric-eq/src/lib.rs:4828-4894` -- `tiny_disabled_cut_state`, `crates/parametric-eq/src/lib.rs:4906-4944` -- `TAIL`, `crates/parametric-eq/tests/carry.rs:34-35` -- `bank_tail`, `crates/parametric-eq/tests/carry.rs:130-188` -- `refusal_codes`, `crates/protocol/tests/vca_edits.rs:278-297` -- `Refusal`, `crates/protocol/tests/vca_edits.rs:299-304` -- `Rendered`, `crates/transient-shaper/tests/partition.rs:34-35` -- `FADER_RAMP`, `hosts/host-web/src/tests.rs:7063-7065` -- `live_fader`, `hosts/host-web/src/tests.rs:7067-7097` -- `seek_ride`, `hosts/host-web/src/tests.rs:10269-10297` -- `seek_ride_blocks`, `hosts/host-web/src/tests.rs:10299-10317` -- `MEMBER_DB`, `hosts/host-web/src/tests.rs:10545-10546` -- `OFFSET_DB`, `hosts/host-web/src/tests.rs:10547-10547` -- `MEMBER`, `hosts/host-web/src/tests.rs:10548-10549` -- `CURVE_DB`, `hosts/host-web/src/tests.rs:10550-10554` -- `VCA_DB`, `hosts/host-web/src/tests.rs:10555-10555` -- `HAND_DB`, `hosts/host-web/src/tests.rs:10556-10556` -- `PRIOR_HAND_DB`, `hosts/host-web/src/tests.rs:10557-10557` -- `model`, `hosts/host-web/src/tests.rs:10559-10567` -- `set`, `hosts/host-web/src/tests.rs:10569-10581` -- `frame`, `hosts/host-web/src/tests.rs:10583-10599` -- `applied`, `hosts/host-web/src/tests.rs:10601-10614` -- `live_move_under_hostile_word`, `hosts/host-web/src/tests.rs:10616-10683` -- `automated`, `hosts/host-web/src/tests.rs:10766-10792` -- `benchmark_text_mutation`, `tools/audit/src/fixture_builtins.rs:5752-5763` - -Also: the `parametric-eq` -`carry.rs` `Ramp::name` field (read only by deleted tests; each ramp keeps its name as a comment); -the emptied `host-web` `tests::canonical_live` module. - -Lead for a successor, not fixed here (the compiler does not report it): `builtins` -`MATRIX_SELECT_FREE_BLOCKS` and `FUSED_SELECT_FREE_BLOCKS` (`crates/builtins/src/lib.rs`) are -`#[cfg(test)]` counters that are now written and never read. Their readers were the deleted -`settled_matrix_takes_the_select_free_arm_only_without_an_identity_lane` and -`fused_fader_matrix_takes_the_select_free_arm_only_without_an_identity_lane`. - -### Restored after review - -The TA4 verifier (READY WITH FIXES) restored these exactly as at `b9135008d`: - -- `graph` `program::tests::a_bank_window_never_recycles_a_physical_slot` (the #169 minimal - reproduction; a regression reproducer is never-delete) and - `no_slot_is_recycled_inside_a_merged_bank_window`, with their helpers `dynamic_track` and - `dynamic_effect` (`crates/graph/src/program/tests.rs`), and the `program.rs` doc line that cites - the first. -- `rack` `tests::prepared_slot_dispatch_uses_constant_activity_checks` (a count claim: the dispatch - makes a constant number of activity checks, which mutation cannot see), with the `#[cfg(test)]` - `TEST_PREPARED_ACTIVITY_QUERIES` counter, its increment in `PreparedSlot::has_active_lanes` and - its readers `reset_prepared_activity_observation` and `prepared_activity_observation`. - -### The browser hostile-FP live gate - -TA4 deleted host-web `tests::canonical_live::a_live_fader_and_vca_move_under_a_hostile_caller_word_render_the_canonical_bits` -(#1709 D2). The capi test of the same name stays (`crates/capi/src/runtime/live_tests.rs:8158`), -so the browser side of that check is gone. `TBD-TA4-gap-1-test-the-fp-environment-refusal.md` -records it in case the owner wants the browser side back. - -### Skipped - -- `graph-compiler` `live_routes.rs` `route_control_resources_cover_the_allocation` and - `gate-expander` `contract.rs` `bypass_is_exact_identity_at_all_rates`: TA1 trimmed the first and - TA2 rewrote the second after the measurement, so the measured test no longer exists. Both stay. -- The cover's kept `audit` `rust_disambiguator_suffix_is_narrowly_supported` and `parametric-eq` - `malformed_requests_preserve_output_sentinels_and_opaque_ids`. - -## Survivor gaps - -Batch 1 left 21 survivors: viable mutants that no candidate and no covering KEEP test turned red. -Agent T4S classified each one (branch `codex/batch-test-gaps-ta4`, merged here): - -- EQUIVALENT 6: m38090 (rack `BankStage::begin_block` default body), m26403 (lane - `scheduling_barrier`, an empty `asm!`), m26693 (lane scalar select: disjoint bits, so `|` is `^`), - m4419 (audit `vectorization.rs:336`, the next clause catches it), m35318 and m6786 - (`Complex::is_finite` in parametric-eq and builtins responses: a later finite check catches - every non-finite value). -- UNREACHABLE 3: m17240 and m17239 (effect-contract `ExactDecimal::parse`; its one product caller - passes canonical digits only) and m26408 (lane `attest_fp_environment` refusals, which need a - control word that does not read back). m26408 goes to - `TBD-TA4-gap-1-test-the-fp-environment-refusal.md` (a pure decision seam and its test). -- DEAD CODE 7: m9108, m9109, m9111, m9118 (`conformance` `PlanarBlock`, `compare_f32_to_f64`) and - m16329, m16330 (`effect-contract` `map_stepped_normalized`) are in code that item 4 deleted. - m42034 (`source` `validate_output_shape`, reached only through the test-only `read_block`) goes - to `TBD-TA4-gap-2-remove-test-only-public-functions.md`. -- REAL GAP 5, closed by 4 new tests. Each was red with its mutant applied and is green on the branch: - - m18792, gate-expander `tests/state.rs::a_subnormal_gain_word_is_refused` (red at - `state.rs:886`). A restore that stops refusing a subnormal gain word (`normal_or_zero` - dropped or weakened) turns it red; no other test feeds a gain word outside the normal/zero set. - - m41330 and m41333, session-validator - `tests/validate.rs::the_report_labels_each_stage_and_prints_every_message_line` (red at the - label assertion, `validate.rs:487`, and at the multi-line assertion, `:512`). A report that - loses its stage labels or drops message lines turns it red; the other tests only compare two - renders or search stderr for the result line. - - m39691, realtime-policy `tests/policy/drain/forms.rs` row `count-in-an-expression-macro` (red in - `a_count_that_the_rule_cannot_prove_is_refused`). A D7 check that stops seeing a count used - inside a non-assert macro in expression position turns it red. - - m39758, realtime-policy `tests/policy/drain/outer.rs` row - `array-from-fn-after-a-field-named-std` (red in - `a_constructor_that_loops_is_refused_anywhere_in_a_region`). An `array::from_fn` exemption that - matches a path with a single `:` turns it red. - -Successors: `TBD-TA4-gap-1-test-the-fp-environment-refusal.md` and -`TBD-TA4-gap-2-remove-test-only-public-functions.md` (now only the `source` `read_block` item).