Skip to content

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

Comment 1, line 1

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

//! V06 daily-to-weekly/monthly sums, weighted 18% ratio, distinct sessions and partial-period flags.

Comment 2, line 2

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

//! Do not average daily percentages or sum daily distinct counts.

Comment 3, line 32

desktop/src-tauri/crates/core/tests/rollup_v06.rs:32

/// Weekly/monthly sums agree; weighted cross-day ratio is 18%, unlike the 50% daily-percentage average.

Comment 4, line 36

desktop/src-tauri/crates/core/tests/rollup_v06.rs:36

// Day one: input 100/cache read 90; day two: input 900/cache read 90.

Comment 5, line 63

desktop/src-tauri/crates/core/tests/rollup_v06.rs:63

// Daily ratios are 90% and 10%.

Comment 6, line 82

desktop/src-tauri/crates/core/tests/rollup_v06.rs:82

// Recalculate from summed values: 180/1000 = 18%.

Comment 7, line 92

desktop/src-tauri/crates/core/tests/rollup_v06.rs:92

/// Zero denominator yields no valid ratio, displayed as — rather than 0%.

Comment 8, line 119

desktop/src-tauri/crates/core/tests/rollup_v06.rs:119

// Fields are known but the denominator is zero.

Comment 9, line 122

desktop/src-tauri/crates/core/tests/rollup_v06.rs:122

/// One session over two days counts once weekly; another session brings the total to two.

Comment 10, line 170

desktop/src-tauri/crates/core/tests/rollup_v06.rs:170

// Weekly DISTINCT is two, unlike the daily-count sum 1+2=3.

Comment 11, line 175

desktop/src-tauri/crates/core/tests/rollup_v06.rs:175

/// Current week is in progress; the earliest retention-truncated week has partial history.

Comment 12, line 180

desktop/src-tauri/crates/core/tests/rollup_v06.rs:180

// ISO week 2026-W32.

Comment 13, line 181

desktop/src-tauri/crates/core/tests/rollup_v06.rs:181

// ISO week 2026-W39.

Comment 14, line 190

desktop/src-tauri/crates/core/tests/rollup_v06.rs:190

// Thursday.

Comment 15, line 199

desktop/src-tauri/crates/core/tests/rollup_v06.rs:199

// Retention cutoff: periods before August 20 have truncated history.

Comment 16, line 210

desktop/src-tauri/crates/core/tests/rollup_v06.rs:210

// Today remains inside this week.

Comment 17, line 213

desktop/src-tauri/crates/core/tests/rollup_v06.rs:213

// A completed period is not in progress.