Skip to content

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

Comment 1, line 1

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

//! Kimi Code (A12, M4) boundary tests use directories and headers marked synthetic.

Comment 2, line 2

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

//! Cover error steps without usage, unregistered protocol fallback, independently verified

Comment 3, line 3

desktop/src-tauri/crates/core/tests/kimi_code_gaps_synthetic.rs:3

//! 1.4/1.5 selection, echo/completed duplicate prevention,

Comment 4, line 4

desktop/src-tauri/crates/core/tests/kimi_code_gaps_synthetic.rs:4

//! invalid negative values/scopes/second timestamps without guessed conversion, and direct detection.

Comment 5, line 5

desktop/src-tauri/crates/core/tests/kimi_code_gaps_synthetic.rs:5

//! Expected values are calculated manually in each dataset's _expectations.md.

Comment 6, line 34

desktop/src-tauri/crates/core/tests/kimi_code_gaps_synthetic.rs:34

/// Error/retry wire data without usage.record is a valid shape:

Comment 7, line 35

desktop/src-tauri/crates/core/tests/kimi_code_gaps_synthetic.rs:35

/// complete, zero events and zero diagnostics, without invented zero usage.

Comment 8, line 50

desktop/src-tauri/crates/core/tests/kimi_code_gaps_synthetic.rs:50

// No numeric source row is fabricated from absent usage.

Comment 9, line 55

desktop/src-tauri/crates/core/tests/kimi_code_gaps_synthetic.rs:55

/// Unregistered protocol "9.9" tries latest_fallback compatibility;

Comment 10, line 56

desktop/src-tauri/crates/core/tests/kimi_code_gaps_synthetic.rs:56

/// valid usage is retained as unverified, without rejecting the version number alone (V30).

Comment 11, line 83

desktop/src-tauri/crates/core/tests/kimi_code_gaps_synthetic.rs:83

/// step.end echoes equal usage.record fields; subagent.completed.usage snapshots

Comment 12, line 84

desktop/src-tauri/crates/core/tests/kimi_code_gaps_synthetic.rs:84

/// child wire sums. Neither creates events or adds duplicate usage.

Comment 13, line 94

desktop/src-tauri/crates/core/tests/kimi_code_gaps_synthetic.rs:94

// Adding echo/completed usage would inflate these four totals.

Comment 14, line 115

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

// No event may contain completed snapshot values {123,45,678,0}.

Comment 15, line 125

desktop/src-tauri/crates/core/tests/kimi_code_gaps_synthetic.rs:125

// One turn and its echo have equal sums, producing matched reconciliation.

Comment 16, line 136

desktop/src-tauri/crates/core/tests/kimi_code_gaps_synthetic.rs:136

/// Diagnose and skip negative values, unknown usageScope and second timestamps.

Comment 17, line 137

desktop/src-tauri/crates/core/tests/kimi_code_gaps_synthetic.rs:137

/// Valid records remain; do not multiply seconds by 1000. All 82 inspected native files used milliseconds.

Comment 18, line 156

desktop/src-tauri/crates/core/tests/kimi_code_gaps_synthetic.rs:156

// The only valid synthetic record {200,60,800,10} reports cache write 10;

Comment 19, line 157

desktop/src-tauri/crates/core/tests/kimi_code_gaps_synthetic.rs:157

// inspected native cache writes were zero, so this test separately checks the positive mapping.

Comment 20, line 159

desktop/src-tauri/crates/core/tests/kimi_code_gaps_synthetic.rs:159

// Second-scale time 1_767_225_600 is not converted into an event.

Comment 21, line 176

desktop/src-tauri/crates/core/tests/kimi_code_gaps_synthetic.rs:176

/// Same-millisecond usage.record entries use ordinal identity suffixes; this synthetic case was not observed locally.

Comment 22, line 214

desktop/src-tauri/crates/core/tests/kimi_code_gaps_synthetic.rs:214

// Rescanning ordinal identities adds no events.

Comment 23, line 223

desktop/src-tauri/crates/core/tests/kimi_code_gaps_synthetic.rs:223

/// Empty detection is Pending; a non-JSON or nonmetadata first line is UnknownFormat.

Comment 24, line 252

desktop/src-tauri/crates/core/tests/kimi_code_gaps_synthetic.rs:252

/// Independently verified Kimi Code protocol versions 1.5 and 1.4 both select KnownVersion.