Skip to main content

aggregate_candidate_data

Function aggregate_candidate_data 

Source
pub fn aggregate_candidate_data(
    engine: &Engine,
    index_store: &AsgIndexStore<'_>,
    ledger_store: &AsgLedgerStore<'_>,
    effect_store: &AsgEffectStore<'_>,
    candidates: &[(f64, String)],
    tokens: &[String],
    recency: &HashMap<String, FileRecency>,
    layer_overrides: &[(String, String)],
) -> CandidateAggregates
Expand description

Main candidate-scan pass. Iterates the ranked candidate list once, populating all six parallel accumulators:

  • by_layer — entry-point JSON grouped by classified layer
  • design_invariants — Invariant ledger entries, deduped on summary
  • known_hazards — Hazard ledger entries
  • validation_scenarios_ledger — ValidationScenario entries, deduped
  • effects_summary — declared effects (low-signal suppressed unless sole)
  • file_scores — per-file score row used by likely_edit_files

Plan M t-004 (1.0.98): lifted from CLI commands/prepare_change.rs and the MCP prepare_change handler. Both surfaces now call this directly, closing the Plan F TODO that flagged the duplication.