Skip to content

desktop/src-tauri/crates/core/tests/mapping_v01.rs

Comment 1, line 1

desktop/src-tauri/crates/core/tests/mapping_v01.rs:1

//! V01 provider cache inclusion, reasoning subsets and cache-TTL subset mapping.

Comment 2, line 2

desktop/src-tauri/crates/core/tests/mapping_v01.rs:2

//! Distinguish missing/zero/invalid negatives/overflow; diagnose contradictions without hiding them with max(0, ...).

Comment 3, line 62

desktop/src-tauri/crates/core/tests/mapping_v01.rs:62

// Negative derived uncached input stays unknown with a diagnostic rather than becoming zero.

Comment 4, line 91

desktop/src-tauri/crates/core/tests/mapping_v01.rs:91

// The same usage (uncached 200, cache read 800, output 100) has different raw fields under these APIs.

Comment 5, line 93

desktop/src-tauri/crates/core/tests/mapping_v01.rs:93

// Includes cache reads.

Comment 6, line 100

desktop/src-tauri/crates/core/tests/mapping_v01.rs:100

// Unknown cache creation cannot be treated as zero to derive uncached input.

Comment 7, line 107

desktop/src-tauri/crates/core/tests/mapping_v01.rs:107

// Excludes cache.

Comment 8, line 115

desktop/src-tauri/crates/core/tests/mapping_v01.rs:115

// Both map to the same values; reported versus derived field quality may differ.

Comment 9, line 160

desktop/src-tauri/crates/core/tests/mapping_v01.rs:160

// Add exclusive reasoning to normalized output_total.

Comment 10, line 172

desktop/src-tauri/crates/core/tests/mapping_v01.rs:172

// Missing stays None/unknown without a zero substitute.

Comment 11, line 183

desktop/src-tauri/crates/core/tests/mapping_v01.rs:183

// This direct mapper treats explicitly reported zero as known; native file default-zero rules are checked separately.

Comment 12, line 187

desktop/src-tauri/crates/core/tests/mapping_v01.rs:187

// Validation rejects records with negative values.

Comment 13, line 194

desktop/src-tauri/crates/core/tests/mapping_v01.rs:194

// Accept MAX_TOKEN_VALUE and reject values above it.