@@ -352,6 +352,43 @@ def test_full_body_reference_resolver_handles_markdown_and_unique_basename(
352352 assert all (record ["status" ] == "resolved" for record in records )
353353
354354
355+ def test_plain_slash_separated_prose_is_not_a_reference (tmp_path : Path ) -> None :
356+ records = resolve_bundle_references (
357+ tmp_path ,
358+ source_path = "SKILL.md" ,
359+ source_text = (
360+ "Compare reads/writes, environment/profile settings, operation/node behavior, "
361+ "and model/provider options. SkillSpector 2.10.0 supports node.js; see example.com."
362+ ),
363+ known_paths = ["SKILL.md" ],
364+ )
365+
366+ assert records == []
367+
368+
369+ @pytest .mark .parametrize (
370+ ("source_text" , "target_path" ),
371+ [
372+ ("Read references/guide.md before continuing." , "references/guide.md" ),
373+ ("Read ./guide before continuing." , "guide" ),
374+ ("Read ./references/guide before continuing." , "references/guide" ),
375+ ],
376+ )
377+ def test_plain_local_reference_requires_an_explicit_path_signal (
378+ tmp_path : Path , source_text : str , target_path : str
379+ ) -> None :
380+ records = resolve_bundle_references (
381+ tmp_path ,
382+ source_path = "SKILL.md" ,
383+ source_text = source_text ,
384+ known_paths = ["SKILL.md" , target_path ],
385+ )
386+
387+ assert len (records ) == 1
388+ assert records [0 ]["status" ] == "resolved"
389+ assert records [0 ]["target_path" ] == target_path
390+
391+
355392def test_reference_resolver_rejects_external_and_parent_escape (tmp_path : Path ) -> None :
356393 records = resolve_bundle_references (
357394 tmp_path ,
0 commit comments