Function run_new_code_scope
pub fn run_new_code_scope<R: Repo>(
db: &FactsDb,
repo: &R,
opts: &Options,
window_days: u32,
health: &[CodeHealthRow],
) -> Result<NewCodeScope>Expand description
Compute the NewCodeScope for window_days against the fact store.
health must be the HEAD-scope, unlimited-row code-health rows (as the gate
path already computes for code_health_min): its scores feed the born band,
and its path set is the live-at-HEAD source universe that scopes both bands.
Reusing it means no second health scan — the born band is a pure lookup and
the touched band adds only the scoped window-start parse shared with the
effort decomposition.
§Errors
Returns crate::CodeLoreError::Analysis on SQL or row-mapping failure, or
any error from the shared window-start scan.