Context
PR #889 (research idea extractor) merged but the verify workflow is failing on cargo clippy --all-targets --all-features --locked -- -D warnings due to clippy::unnecessary_sort_by lints introduced/exposed by the merge. This blocks validation issue #890 which gates the end-to-end smoke of the idea extractor and therefore blocks closure of goal explore-developer-ideas-from-tracked-researchers.
Failing locations
From CI log of run 24597973906 and local grep:
src/cognitive_memory/mod.rs:316 — candidates.sort_by(|a, b| b.0.cmp(&a.0));
src/cognitive_memory/mod.rs:549 — backups.sort_by(|a, b| b.0.cmp(&a.0));
src/knowledge_context.rs:63 — scored.sort_by(|a, b| b.0.cmp(&a.0));
(Verify with full clippy run; there may be more.)
Fix
Replace each with sort_by_key + Reverse per clippy hint:
use std::cmp::Reverse;
candidates.sort_by_key(|x| Reverse(x.0));
Acceptance
Context
PR #889 (research idea extractor) merged but the verify workflow is failing on
cargo clippy --all-targets --all-features --locked -- -D warningsdue toclippy::unnecessary_sort_bylints introduced/exposed by the merge. This blocks validation issue #890 which gates the end-to-end smoke of the idea extractor and therefore blocks closure of goalexplore-developer-ideas-from-tracked-researchers.Failing locations
From CI log of run 24597973906 and local grep:
src/cognitive_memory/mod.rs:316—candidates.sort_by(|a, b| b.0.cmp(&a.0));src/cognitive_memory/mod.rs:549—backups.sort_by(|a, b| b.0.cmp(&a.0));src/knowledge_context.rs:63—scored.sort_by(|a, b| b.0.cmp(&a.0));(Verify with full clippy run; there may be more.)
Fix
Replace each with
sort_by_key+Reverseper clippy hint:Acceptance
cargo clippy --all-targets --all-features --locked -- -D warningspasses locally and in CIcargo test --libpasses (no behavior change)