Skip to content

Commit 84318f9

Browse files
coderabbitai[bot]CodeRabbit
andauthored
fix: apply CodeRabbit auto-fixes
Fixed 2 file(s) based on 2 unresolved review comments. Co-authored-by: CodeRabbit <noreply@coderabbit.ai>
1 parent 10a9de4 commit 84318f9

2 files changed

Lines changed: 22 additions & 4 deletions

File tree

src/skills/catalog.v1.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2740,7 +2740,7 @@ enabled = true
27402740
[[combos]]
27412741
id = "node-express"
27422742
name = "Node.js + Express"
2743-
requires = ["node", "express"]
2743+
requires = ["express"]
27442744
skills = ["aj-geddes/useful-ai-prompts/nodejs-express-server"]
27452745
enabled = true
27462746

tests/integration/skill_suggest.rs

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -514,15 +514,33 @@ fn skill_suggest_recommends_autoskills_frontend_parity_combos() {
514514
let response: serde_json::Value = serde_json::from_slice(&output.stdout).unwrap();
515515
let recommendations = response["recommendations"].as_array().unwrap();
516516
for expected_skill in case.expected_skills {
517+
// Find the recommendation with the expected skill_id
518+
let matching_recommendation = recommendations
519+
.iter()
520+
.find(|recommendation| recommendation["skill_id"] == *expected_skill);
521+
517522
assert!(
518-
recommendations
519-
.iter()
520-
.any(|recommendation| recommendation["skill_id"] == *expected_skill),
523+
matching_recommendation.is_some(),
521524
"{} should recommend {}. response: {}",
522525
case.name,
523526
expected_skill,
524527
response
525528
);
529+
530+
// Verify that the recommendation came from a combo (has "combination" in reasons)
531+
let recommendation = matching_recommendation.unwrap();
532+
let reasons = recommendation["reasons"].as_array().unwrap();
533+
let has_combo_reason = reasons
534+
.iter()
535+
.any(|reason| reason.as_str().unwrap().contains("combination"));
536+
537+
assert!(
538+
has_combo_reason,
539+
"{} should have combo reason for skill {}. recommendation: {}",
540+
case.name,
541+
expected_skill,
542+
recommendation
543+
);
526544
}
527545
}
528546
}

0 commit comments

Comments
 (0)