desktop/src-tauri/crates/core/tests/omp_gaps_synthetic.rs
Comment 1, line 1
desktop/src-tauri/crates/core/tests/omp_gaps_synthetic.rs:1
//! Synthetic oh-my-pi (omp) cases, marked in directory names and file headers, forComment 2, line 2
desktop/src-tauri/crates/core/tests/omp_gaps_synthetic.rs:2
//! V17/V30 version policy. Cover cases without native samples: four auxiliary usage record types,Comment 3, line 3
desktop/src-tauri/crates/core/tests/omp_gaps_synthetic.rs:3
//! assistants without usage, inherited fork deduplication (the same known difference as pi), nested subagent ownership,Comment 4, line 4
desktop/src-tauri/crates/core/tests/omp_gaps_synthetic.rs:4
//! stopReason=error/aborted, cost mapping, first-line detection (title/session/Pending),Comment 5, line 5
desktop/src-tauri/crates/core/tests/omp_gaps_synthetic.rs:5
//! latest_fallback for unknown versions (V30 policy; omp has no known-incompatible-formatComment 6, line 6
desktop/src-tauri/crates/core/tests/omp_gaps_synthetic.rs:6
//! branch), rejection of unknown formats, and unknown entry diagnostics.Comment 7, line 7
desktop/src-tauri/crates/core/tests/omp_gaps_synthetic.rs:7
//! Expected values are calculated manually from test data; see each _expectations.md.Comment 8, line 32
desktop/src-tauri/crates/core/tests/omp_gaps_synthetic.rs:32
// Manual calculation (synthetic-auxiliary-carriers, 9 lines and 6 events):Comment 9, line 33
desktop/src-tauri/crates/core/tests/omp_gaps_synthetic.rs:33
// Primary: syn-a1 (100/50/10/5/165) + syn-a2 (no usage; all tokens unknown).Comment 10, line 34
desktop/src-tauri/crates/core/tests/omp_gaps_synthetic.rs:34
// Auxiliary: syn-u1 (0/0/0/1000/1000), syn-c1 (200/100/0/0/300),Comment 11, line 35
desktop/src-tauri/crates/core/tests/omp_gaps_synthetic.rs:35
// syn-b1 (300/150/0/0/450), and syn-t1 (10/5/0/0/15).Comment 12, line 36
desktop/src-tauri/crates/core/tests/omp_gaps_synthetic.rs:36
// Sum: call_count=6, input_total=1625 (derived), uncached=610, cache_read=10,Comment 13, line 37
desktop/src-tauri/crates/core/tests/omp_gaps_synthetic.rs:37
// cache_write=1005, output=305, total=1930; one usage_shape_deviation (syn-a2).Comment 14, line 61
desktop/src-tauri/crates/core/tests/omp_gaps_synthetic.rs:61
// syn-a2 has no usage (quality_bucket=unknown): count the call without counting unknown fields.Comment 15, line 81
desktop/src-tauri/crates/core/tests/omp_gaps_synthetic.rs:81
// Check ownership and category by record key.Comment 16, line 112
desktop/src-tauri/crates/core/tests/omp_gaps_synthetic.rs:112
// An assistant without usage counts as a call; all tokens remain unknown.Comment 17, line 127
desktop/src-tauri/crates/core/tests/omp_gaps_synthetic.rs:127
// compaction/branch_summary lack model fields; use omp's combined model_change structure.Comment 18, line 150
desktop/src-tauri/crates/core/tests/omp_gaps_synthetic.rs:150
// toolResult usage describes the tool's own consumption: an auxiliary call with an unknown model.Comment 19, line 157
desktop/src-tauri/crates/core/tests/omp_gaps_synthetic.rs:157
// Round omp's fractional milliseconds: syn-a1 duration 200.4→200, ttft 60.6→61;Comment 20, line 158
desktop/src-tauri/crates/core/tests/omp_gaps_synthetic.rs:158
// syn-a2 duration 150.5→151; missing ttft remains None.Comment 21, line 185
desktop/src-tauri/crates/core/tests/omp_gaps_synthetic.rs:185
// Manual calculation (synthetic-fork-inherited): the source has 2 events (150+300); the fork copiesComment 22, line 186
desktop/src-tauri/crates/core/tests/omp_gaps_synthetic.rs:186
// source lines L3–L5 verbatim and adds assistant syn-fa-3 (15). There are 3 calls and input_total=350Comment 23, line 187
desktop/src-tauri/crates/core/tests/omp_gaps_synthetic.rs:187
// (derived input+cacheRead+cacheWrite: (100+0+0)+(200+40+0)+(10+0+0)),Comment 24, line 188
desktop/src-tauri/crates/core/tests/omp_gaps_synthetic.rs:188
// cache_read=40, output=115, total=465. See test _expectations.md for the known difference.Comment 25, line 201
desktop/src-tauri/crates/core/tests/omp_gaps_synthetic.rs:201
// Scan the source alone first, then add the fork; each file is scanned once per round.Comment 26, line 227
desktop/src-tauri/crates/core/tests/omp_gaps_synthetic.rs:227
// Known difference, as in pi: copied entries have the same four-part key, but session_id/Comment 27, line 228
desktop/src-tauri/crates/core/tests/omp_gaps_synthetic.rs:228
// parent_session_id come from the fork header. Stored events with that key have different content: conflictComment 28, line 229
desktop/src-tauri/crates/core/tests/omp_gaps_synthetic.rs:229
// handling keeps the first scanned event, preventing double-counting and preserving source-session ownership.Comment 29, line 241
desktop/src-tauri/crates/core/tests/omp_gaps_synthetic.rs:241
// A new fork entry retains the fork session identity and parentSession.Comment 30, line 254
desktop/src-tauri/crates/core/tests/omp_gaps_synthetic.rs:254
// Copied entries keep the first scanned source session's ownership and are marked as conflicts.Comment 31, line 271
desktop/src-tauri/crates/core/tests/omp_gaps_synthetic.rs:271
// Manual calculation (synthetic-subagent-nested): main-session syn-ma-1 (10/5/0/0/15) is primary;Comment 32, line 272
desktop/src-tauri/crates/core/tests/omp_gaps_synthetic.rs:272
// two-level Research.jsonl syn-sa-1 (100/50/0/0/150) and three-level nestedComment 33, line 273
desktop/src-tauri/crates/core/tests/omp_gaps_synthetic.rs:273
// Research/Research.Compactor.jsonl syn-sa-2 (200/60/40/0/300) are sub_agent.Comment 34, line 274
desktop/src-tauri/crates/core/tests/omp_gaps_synthetic.rs:274
// Both parents are the nearest <ts>_<uuid> ancestor directory d070. Sum: call_count=3,Comment 35, line 275
desktop/src-tauri/crates/core/tests/omp_gaps_synthetic.rs:275
// input_total=350 (derived), cache_read=40, output=115, total=465, distinct sessions=3.Comment 36, line 342
desktop/src-tauri/crates/core/tests/omp_gaps_synthetic.rs:342
// Manual calculation (synthetic-error-aborted): both events are primary; syn-e-1 error,Comment 37, line 343
desktop/src-tauri/crates/core/tests/omp_gaps_synthetic.rs:343
// syn-e-2 aborted (no duration/ttft). Sum: input_total=25, cache_read=5,Comment 38, line 344
desktop/src-tauri/crates/core/tests/omp_gaps_synthetic.rs:344
// cache_write=0, output=25, total=50.Comment 39, line 388
desktop/src-tauri/crates/core/tests/omp_gaps_synthetic.rs:388
// Manual calculation (synthetic-cost-estimated): syn-c1 cost.total=0.058278 maps to 58278 micro-USD,Comment 40, line 389
desktop/src-tauri/crates/core/tests/omp_gaps_synthetic.rs:389
// estimated; syn-c2 cost.total=0 is not mapped. Sum: input_total=105, output=55, total=160.Comment 41, line 430
desktop/src-tauri/crates/core/tests/omp_gaps_synthetic.rs:430
// Manual calculation (synthetic-detect-supported): title (v=1) first, then session v3;Comment 42, line 431
desktop/src-tauri/crates/core/tests/omp_gaps_synthetic.rs:431
// 5 lines and 1 event (syn-a1: 100/10/0/0/110, duration 100.4→100, ttft 50.4→50).Comment 43, line 483
desktop/src-tauri/crates/core/tests/omp_gaps_synthetic.rs:483
// omp detection also accepts a session header first, as pi does; retain that documented limit.Comment 44, line 505
desktop/src-tauri/crates/core/tests/omp_gaps_synthetic.rs:505
// A title without a session header in the first 4 lines may be an incomplete write; retry detection next round.Comment 45, line 528
desktop/src-tauri/crates/core/tests/omp_gaps_synthetic.rs:528
// Manual calculation (synthetic-unsupported-version retains its historical directory name; behavior changed in V30):Comment 46, line 529
desktop/src-tauri/crates/core/tests/omp_gaps_synthetic.rs:529
// both an unlisted numeric version (version=4) and a versionless legacy format useComment 47, line 530
desktop/src-tauri/crates/core/tests/omp_gaps_synthetic.rs:530
// LatestFallback with session_v3. Older omp files have not been checked or identified as incompatible;Comment 48, line 531
desktop/src-tauri/crates/core/tests/omp_gaps_synthetic.rs:531
// do not reject them directly. pi has a separate known-incompatible branch. Each file has one eventComment 49, line 532
desktop/src-tauri/crates/core/tests/omp_gaps_synthetic.rs:532
// (100/10/0/0/110): call_count=2, input_total=200 (derived), output=20,Comment 50, line 533
desktop/src-tauri/crates/core/tests/omp_gaps_synthetic.rs:533
// total=220; events use parse_basis=latest_fallback; files are active_compat;Comment 51, line 534
desktop/src-tauri/crates/core/tests/omp_gaps_synthetic.rs:534
// detection records one latest_fallback diagnostic per file.Comment 52, line 545
desktop/src-tauri/crates/core/tests/omp_gaps_synthetic.rs:545
// Both unlisted numeric versions and missing versions use the latest parser with compatibility markers.Comment 53, line 585
desktop/src-tauri/crates/core/tests/omp_gaps_synthetic.rs:585
// Successfully parsed compatible data contributes to statistics.Comment 54, line 592
desktop/src-tauri/crates/core/tests/omp_gaps_synthetic.rs:592
// Persist compatibility markers in event parse_basis, file active_compat, and detection JSON.Comment 55, line 618
desktop/src-tauri/crates/core/tests/omp_gaps_synthetic.rs:618
// A versionless legacy format has schema_version=unknown and retains the fallback parse basis.Comment 56, line 649
desktop/src-tauri/crates/core/tests/omp_gaps_synthetic.rs:649
// file_id order: d020 (version=4), then d021 (missing version).Comment 57, line 655
desktop/src-tauri/crates/core/tests/omp_gaps_synthetic.rs:655
// A repeated scan adds no events; compatibility markers preserve deduplication.Comment 58, line 685
desktop/src-tauri/crates/core/tests/omp_gaps_synthetic.rs:685
// Manual calculation (synthetic-unknown-record-type): one event (syn-m1: 7/3/0/0/10).Comment 59, line 686
desktop/src-tauri/crates/core/tests/omp_gaps_synthetic.rs:686
// Unknown type brand_new_thing appears twice; diagnose each type once per file.Comment 60, line 704
desktop/src-tauri/crates/core/tests/omp_gaps_synthetic.rs:704
// An unknown entry type does not reject the file; its state remains active.