desktop/src-tauri/crates/core/tests/codex_gaps_synthetic.rs
Comment 1, line 1
desktop/src-tauri/crates/core/tests/codex_gaps_synthetic.rs:1
//! Codex boundary tests: directories/headers marked synthetic, under V17 rules.Comment 2, line 2
desktop/src-tauri/crates/core/tests/codex_gaps_synthetic.rs:2
//! Cover gaps in M0 real samples: duplicate final records, subagents, positive cache writes,Comment 3, line 3
desktop/src-tauri/crates/core/tests/codex_gaps_synthetic.rs:3
//! tool/user messages without usage and absent response_id. Unknown versions try the latest parserComment 4, line 4
desktop/src-tauri/crates/core/tests/codex_gaps_synthetic.rs:4
//! with V17/V30 compatibility metadata; unknown formats are rejected.Comment 5, line 24
desktop/src-tauri/crates/core/tests/codex_gaps_synthetic.rs:24
// Three scanned events include a duplicate final; ingestion deduplicates them into two calls.Comment 6, line 143
desktop/src-tauri/crates/core/tests/codex_gaps_synthetic.rs:143
// Unregistered version with unchanged shape tries the latest built-in parser, persists usageComment 7, line 144
desktop/src-tauri/crates/core/tests/codex_gaps_synthetic.rs:144
// and compatibility metadata; V17/V30 does not reject an unlisted version alone.Comment 8, line 168
desktop/src-tauri/crates/core/tests/codex_gaps_synthetic.rs:168
// Valid compatibility data counts one call with input=10, output=5, total=15.Comment 9, line 174
desktop/src-tauri/crates/core/tests/codex_gaps_synthetic.rs:174
// Persist compatibility in event parse_basis, file active_compat and detection JSON.Comment 10, line 205
desktop/src-tauri/crates/core/tests/codex_gaps_synthetic.rs:205
// Repeated scans add no usage; compatibility metadata preserves deduplication.Comment 11, line 216
desktop/src-tauri/crates/core/tests/codex_gaps_synthetic.rs:216
// Version is absent but session_meta.id identifies the Agent's session.Comment 12, line 217
desktop/src-tauri/crates/core/tests/codex_gaps_synthetic.rs:217
// V30 selects the latest built-in parser with absent format_version.Comment 13, line 248
desktop/src-tauri/crates/core/tests/codex_gaps_synthetic.rs:248
// Additional optional envelope/payload/usage keys do not break required structure;Comment 14, line 249
desktop/src-tauri/crates/core/tests/codex_gaps_synthetic.rs:249
// valid records are persisted under the V30 optional-field scenario.Comment 15, line 269
desktop/src-tauri/crates/core/tests/codex_gaps_synthetic.rs:269
// An unknown version yielding no events plus structure diagnostics is incompatible;Comment 16, line 270
desktop/src-tauri/crates/core/tests/codex_gaps_synthetic.rs:270
// retain old results without advancing the cursor or committing events/aggregates.Comment 17, line 271
desktop/src-tauri/crates/core/tests/codex_gaps_synthetic.rs:271
// Retry next round, including after parser updates (V30).Comment 18, line 292
desktop/src-tauri/crates/core/tests/codex_gaps_synthetic.rs:292
// Empty ingestion_checkpoints permits a fresh attempt next round.Comment 19, line 305
desktop/src-tauri/crates/core/tests/codex_gaps_synthetic.rs:305
// Show both latest_fallback and structure diagnostics, distinguishing rejection from an empty success.Comment 20, line 325
desktop/src-tauri/crates/core/tests/codex_gaps_synthetic.rs:325
// Partly usable data: one valid usage record and one with an invalid required field type.Comment 21, line 326
desktop/src-tauri/crates/core/tests/codex_gaps_synthetic.rs:326
// Persist independently validated records with compatibility metadata; report the gap (V30).Comment 22, line 395
desktop/src-tauri/crates/core/tests/codex_gaps_synthetic.rs:395
// Synthetic positive cache-write data checks all six mapped fields, as in synthetic-cache-write.Comment 23, line 410
desktop/src-tauri/crates/core/tests/codex_gaps_synthetic.rs:410
// cached+write exceeding input leaves uncached unknown with a diagnostic; do not truncate values.