desktop/src-tauri/src/scanner.rs
Comment 1, line 1
desktop/src-tauri/src/scanner.rs:1
//! Collection runner: built-in adapters, full refresh and interval scheduler (M6).Comment 2, line 2
desktop/src-tauri/src/scanner.rs:2
//! Read enabled local sources only; scheduled tasks run application collection logic.Comment 3, line 3
desktop/src-tauri/src/scanner.rs:3
//! One refresh runs at a time; merge repeated triggers (V12/V23).Comment 4, line 14
desktop/src-tauri/src/scanner.rs:14
/// Built-in registry shares core implementations with probe tools.Comment 5, line 85
desktop/src-tauri/src/scanner.rs:85
/// Refresh enabled sources; return false when already running and retain a pending manual request for later.Comment 6, line 90
desktop/src-tauri/src/scanner.rs:90
/// Full recollection after clearing includes custom-scheduled sources;Comment 7, line 91
desktop/src-tauri/src/scanner.rs:91
/// retain the clearing flag until recollection ends.Comment 8, line 96
desktop/src-tauri/src/scanner.rs:96
/// Filter source schedules:Comment 9, line 97
desktop/src-tauri/src/scanner.rs:97
/// - include selects due instances for FixedTime/Interval triggers;Comment 10, line 98
desktop/src-tauri/src/scanner.rs:98
/// - global automatic refresh with include=None excludes custom schedules not yet due,Comment 11, line 99
desktop/src-tauri/src/scanner.rs:99
/// then advances only schedules with actual completed run outcomes.Comment 12, line 156
desktop/src-tauri/src/scanner.rs:156
// Use the user statistics timezone for daily partitions; historical UTC writes causedComment 13, line 157
desktop/src-tauri/src/scanner.rs:157
// empty local-time queries, fixed on 2026-09-26 and recorded in M6.Comment 14, line 167
desktop/src-tauri/src/scanner.rs:167
// Promote only verified Copilot/Qwen output roots produced by this application.Comment 15, line 168
desktop/src-tauri/src/scanner.rs:168
// Other supplemental exports require separate validation.Comment 16, line 179
desktop/src-tauri/src/scanner.rs:179
// F2 remember the pre-refresh revision; daily rows changed by collection have newer revisions.Comment 17, line 180
desktop/src-tauri/src/scanner.rs:180
// Retention can advance it again, so do not filter using equality to the final revision.Comment 18, line 200
desktop/src-tauri/src/scanner.rs:200
// Global intervals exclude custom schedules that are not due. If loading exclusionsComment 19, line 201
desktop/src-tauri/src/scanner.rs:201
// fails, record the failure and skip this global run to preserve source scheduling,Comment 20, line 202
desktop/src-tauri/src/scanner.rs:202
// instead of reading custom-scheduled sources at the global interval.Comment 21, line 238
desktop/src-tauri/src/scanner.rs:238
// Map instances to actual outcomes before advancing their due schedules.Comment 22, line 241
desktop/src-tauri/src/scanner.rs:241
// Two parsing slots release the writer lock during file reads; metadata, archives and commits share one writer.Comment 23, line 273
desktop/src-tauri/src/scanner.rs:273
// Estimate progress by adapter order; completion reaches 100 percent, while per-fileComment 24, line 274
desktop/src-tauri/src/scanner.rs:274
// progress stays inside adapters and this runner provides a coarse estimate and ETA.Comment 25, line 344
desktop/src-tauri/src/scanner.rs:344
// Record success only for RunStatus::Succeeded.Comment 26, line 345
desktop/src-tauri/src/scanner.rs:345
// Adapter-wide failure leaves instance outcomes absent, so their deadlines remain unchanged.Comment 27, line 380
desktop/src-tauri/src/scanner.rs:380
// Copilot premium quota comes from local copilot-user-cache.json as an account request allowance.Comment 28, line 381
desktop/src-tauri/src/scanner.rs:381
// Display it separately from tokens; a quota read failure does not stop other sources.Comment 29, line 424
desktop/src-tauri/src/scanner.rs:424
// Apply configured tiered retention after collection in one transaction.Comment 30, line 471
desktop/src-tauri/src/scanner.rs:471
// F2 recompute changed, unsealed daily cost rows under current pricing preferencesComment 31, line 472
desktop/src-tauri/src/scanner.rs:472
// when estimation is enabled; skip automatic backfill when disabled.Comment 32, line 521
desktop/src-tauri/src/scanner.rs:521
// F2 models.dev refresh runs in the background only when enabled and stale.Comment 33, line 522
desktop/src-tauri/src/scanner.rs:522
// Failures leave operation diagnostics without blocking collection or repricing existing estimates.Comment 34, line 526
desktop/src-tauri/src/scanner.rs:526
// Advance next_due only for due instances with actual completed outcomes.Comment 35, line 527
desktop/src-tauri/src/scanner.rs:527
// Record running_error for a completed failure; keep unvisited/interrupted/merged deadlines unchanged.Comment 36, line 528
desktop/src-tauri/src/scanner.rs:528
// Leave schedules not yet due alone; resume after missed times with one collection only.Comment 37, line 589
desktop/src-tauri/src/scanner.rs:589
// Record selected completion counts in the operation log.Comment 38, line 620
desktop/src-tauri/src/scanner.rs:620
/// System triggers honor saved user settings and the same source deadlines.Comment 39, line 621
desktop/src-tauri/src/scanner.rs:621
/// Disabled automatic collection remains disabled even if an owned OS task could not be deleted.Comment 40, line 656
desktop/src-tauri/src/scanner.rs:656
/// Run collection on the configured global interval; zero pauses automatic collection.Comment 41, line 657
desktop/src-tauri/src/scanner.rs:657
/// After sleep/missed intervals, run one catch-up scan (V23).Comment 42, line 661
desktop/src-tauri/src/scanner.rs:661
// Start one Startup scan only when automatic collection is allowed.Comment 43, line 723
desktop/src-tauri/src/scanner.rs:723
// When no global refresh runs, collect due instances under FixedTime behavior;Comment 44, line 724
desktop/src-tauri/src/scanner.rs:724
// merge manual/global triggers through the single active refresh to avoid concurrent source reads.Comment 45, line 725
desktop/src-tauri/src/scanner.rs:725
// Due-source detection failures produce diagnostics and retry next run.Comment 46, line 757
desktop/src-tauri/src/scanner.rs:757
/// Scheduling state: zero disables; settings changes reset the deadline;Comment 47, line 758
desktop/src-tauri/src/scanner.rs:758
/// multiple missed intervals after waking produce only one scan.Comment 48, line 1060
desktop/src-tauri/src/scanner.rs:1060
// No discovered usage file means the source was unvisited, without a completed outcome.