Function run_coupling_scoped
pub fn run_coupling_scoped(
db: &FactsDb,
opts: &Options,
changes_source: &str,
) -> Result<Vec<CouplingRow>>Expand description
Scoped variant of run_coupling: reads change history from
changes_source instead of the opt-derived table. Used when a caller has
already materialized a date-filtered view (changes_at_ts) and wants
coupling restricted to that window. Does NOT memoize — the custom source
is not covered by the standard CouplingMemoKey.
The changes_source overrides only the pair-source and Fisher-denominator
tables; the internal good_commits revset is still built from the
opt-derived table. That is equivalent to the primary path (no lineage, no
time-bucket), where the cutoff window’s revset equals the full-history
revset intersected with the window. Combined with --use-canonical-lineage
or --time-bucket, the two diverge (pair paths use pre-rename names /
bucketing reads full history); those combinations are out of scope here.
§Errors
Returns CodeLoreError::Analysis on any SQL error.