pub struct ResidualProjectionFixture {
pub fixture_sha256_hex: String,
pub metadata: BTreeMap<String, String>,
pub declared_num_windows: u32,
pub declared_num_signals: u32,
pub declared_healthy_window_end: u32,
pub rows: Vec<Vec<Option<f64>>>,
}Expand description
Parsed # residual-projection v2 fixture.
WHY: The TSV header carries provenance metadata (DOI, URL, archive
SHA-256, num_windows, num_signals, healthy_window_end, license) that the
audit’s dataset_manifest.toml must cite verbatim, and the data rows
are the residual projection that the event-lowering rule consumes.
Carrying both in one struct keeps the metadata + data co-located so the
audit report cannot accidentally claim metadata from one fixture against
data from another.
Eq is intentionally not derived because cell values are f64 (NaN is
already collapsed to None by the parser, so the remaining floats are
finite, but f64 still rejects Eq at the type level). PartialEq is
sufficient for the byte-replay determinism we test.
Fields§
§fixture_sha256_hex: StringSHA-256 of the input file bytes (hex lowercase, 64 chars). This is the load-bearing provenance pin: the loader rejects mismatched bytes before parsing, so a corrupted fixture cannot silently produce a valid-looking CaseFile.
metadata: BTreeMap<String, String>Every # key=value comment line collected in encounter order then
re-sorted into a BTreeMap for deterministic iteration. Keys without
= (e.g. raw comment text) are NOT recorded; the audit’s
dataset_manifest.toml mirrors only key=value entries.
declared_num_windows: u32Declared row count from the # num_windows= header. May not equal
rows.len(): some fixtures publish a num_windows < observed rows
(extra metadata-noise rows past the declared count). The loader
reports both; the lowering uses the observed rows.len().
declared_num_signals: u32Declared column count from the # num_signals= header. Must equal
every data row’s column count; the parser rejects rows that diverge.
declared_healthy_window_end: u32Declared healthy-window boundary from # healthy_window_end=.
Recorded for the audit report; the loader does NOT use it to split
the data (the dispatcher’s bank stage performs admission, not
pre-classification by the loader).
rows: Vec<Vec<Option<f64>>>Window-major × signal-minor matrix of cell values. None represents
a nan token in the TSV — the lowering rule skips these cells.
Trait Implementations§
Source§impl Clone for ResidualProjectionFixture
impl Clone for ResidualProjectionFixture
Source§fn clone(&self) -> ResidualProjectionFixture
fn clone(&self) -> ResidualProjectionFixture
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ResidualProjectionFixture
impl Debug for ResidualProjectionFixture
Source§impl Default for ResidualProjectionFixture
impl Default for ResidualProjectionFixture
Source§fn default() -> ResidualProjectionFixture
fn default() -> ResidualProjectionFixture
Source§impl PartialEq for ResidualProjectionFixture
impl PartialEq for ResidualProjectionFixture
Source§fn eq(&self, other: &ResidualProjectionFixture) -> bool
fn eq(&self, other: &ResidualProjectionFixture) -> bool
self and other values to be equal, and is used by ==.