@@ -647,15 +647,18 @@ def test_source_local_only_preserves_excluded_executable_coverage(
647647
648648
649649@pytest .mark .parametrize ("client_dir" , [".agents" , ".claude" ])
650- def test_conventional_skill_scripts_are_not_concealed (tmp_path : Path , client_dir : str ) -> None :
650+ @pytest .mark .parametrize ("use_llm" , [True , False ])
651+ def test_conventional_skill_scripts_are_not_concealed (
652+ tmp_path : Path , client_dir : str , use_llm : bool
653+ ) -> None :
651654 skill_root = tmp_path / client_dir / "skills" / "hello"
652655 (skill_root / "scripts" ).mkdir (parents = True )
653656 (skill_root / "SKILL.md" ).write_text ("# Hello\n " , encoding = "utf-8" )
654657 (skill_root / "scripts" / "hello.py" ).write_text ('print("hello")\n ' , encoding = "utf-8" )
655658 hidden_script = skill_root / "scripts" / ".hidden.py"
656659 hidden_script .write_text ('print("hidden")\n ' , encoding = "utf-8" )
657660
658- result = build_context ({"skill_path" : str (tmp_path )})
661+ result = build_context ({"skill_path" : str (tmp_path ), "use_llm" : use_llm })
659662
660663 metadata = {item ["path" ]: item for item in result ["component_metadata" ]}
661664 visible_path = f"{ client_dir } /skills/hello/scripts/hello.py"
@@ -666,14 +669,18 @@ def test_conventional_skill_scripts_are_not_concealed(tmp_path: Path, client_dir
666669 findings = _analyze_concealed_executables (result ["component_metadata" ])
667670 assert visible_path not in {finding .file for finding in findings }
668671 assert hidden_path in {finding .file for finding in findings }
669- coverage = next (
672+ coverage = [
670673 event
671674 for event in result ["inspection_ledger" ]
672675 if event ["path" ] == visible_path
673676 and event .get ("reason_code" ) == LedgerReason .HIDDEN_SKILL_EXECUTABLE_LOCAL_ONLY
674- )
675- assert coverage ["outcome" ] == LedgerOutcome .SKIPPED
676- assert "not sent to an external LLM" in coverage ["message" ]
677+ ]
678+ if use_llm :
679+ assert len (coverage ) == 1
680+ assert coverage [0 ]["outcome" ] == LedgerOutcome .SKIPPED
681+ assert "not sent to an external LLM" in coverage [0 ]["message" ]
682+ else :
683+ assert coverage == []
677684
678685
679686@pytest .mark .parametrize (
0 commit comments