Skip to content

The agent that grows with you

test(skills): a disabled, offer-gated duplicate is refused by path

kshitijk4poor16bc0b6b94be
diff --git a/tests/agent/test_skill_commands.py b/tests/agent/test_skill_commands.py
index a799853aef1..3dd79964506 100644
--- a/tests/agent/test_skill_commands.py
+++ b/tests/agent/test_skill_commands.py
@@ -610,6 +610,12 @@ class TestDuplicateNamesAgreeAcrossSurfaces:
assert "disabled" in json.loads(skill_view(ident))["error"]
assert "UNRELATED OTHER" in json.loads(skill_view("other"))["content"]
assert build_preloaded_skills_prompt(["other"])[1:] == (["other"], [])
+ # Still refused when that copy is also hidden at offer time (requires_apps).
+ a_one = local / "a" / "one" / "SKILL.md"
+ a_one.write_text(a_one.read_text().replace("---\n", "---\nrequires_apps: [no-such-app]\n", 1))
+ monkeypatch.setattr(skills_tool_module, "_SKILLS_CACHE", {})
+ for ident in ("a/one", "one"):
+ assert "disabled" in json.loads(skill_view(ident))["error"]
class TestBuildSkillInvocationMessage: