Move local ranking test helper into tests

This commit is contained in:
fawney19
2026-04-27 15:04:09 +08:00
parent 2101a4ecc7
commit 517e84e5ae
2 changed files with 53 additions and 50 deletions

View File

@@ -454,8 +454,12 @@ fn ai_pipeline_planner_separates_local_candidate_resolution_from_ranking() {
let candidate_ranking =
read_workspace_file("apps/aether-gateway/src/ai_pipeline/planner/candidate_ranking.rs");
assert!(
candidate_ranking.contains("#[cfg(test)]\nasync fn rank_local_execution_candidates("),
"planner/candidate_ranking.rs should keep raw local ranking as a test-only helper"
candidate_ranking.contains("async fn rank_local_execution_candidates("),
"planner/candidate_ranking.rs should keep raw local ranking helper inside tests"
);
assert!(
!candidate_ranking.contains("#[cfg(test)]\nasync fn rank_local_execution_candidates("),
"planner/candidate_ranking.rs should not keep the test-only ranking helper at module root"
);
for forbidden in [
"struct SkippedLocalExecutionCandidate",