Runs the bounded commit-attribution sweep against the correlation store. For each `(branch, worktree)` pair touched since the last sweep, scans that branch's git log inside the pair's span window (widened by the merge gap) and attributes overlapping commits to their sessions. Fail-open.
(db: &GlobalDb)
| 106 | /// branch's git log inside the pair's span window (widened by the merge gap) |
| 107 | /// and attributes overlapping commits to their sessions. Fail-open. |
| 108 | async fn attribute_commits_after_ingest(db: &GlobalDb) { |
| 109 | let gap = git_correlation::DEFAULT_SPAN_MERGE_GAP_SECS; |
| 110 | let result = db |
| 111 | .git_run_commit_attribution_sweep(gap, |target| git_scan_commits(target, gap)) |
| 112 | .await; |
| 113 | if let Err(err) = result { |
| 114 | tracing::debug!(error = %err, "commit attribution sweep skipped"); |
| 115 | } |
| 116 | } |
| 117 | |
| 118 | /// Reads commits on one span target's branch within its (gap-widened) window |
| 119 | /// via `git log`. Returns an empty list on any error so the sweep simply |
no test coverage detected