Skip to content

Fix: report symlinked recursive skill skips in completeness (GH-495) - #595

Open
bniladridas wants to merge 1 commit into
NVIDIA:mainfrom
bniladridas:bniladridas/symlink-omission
Open

bniladridas wants to merge 1 commit into
NVIDIA:mainfrom
bniladridas:bniladridas/symlink-omission

Conversation

@bniladridas

Copy link
Copy Markdown

Description

Fixes #495.

detect_skills deliberately refuses to follow symlinked entries during
recursive discovery, but those skips were never counted. As a result a multi
skill scan whose tree contains symlinked skill directories reported
skills_omitted: 0, analysis_completeness.is_complete: true, and full
coverage, although part of the tree was not scanned. That understates the
coverage that install gates and CI rely on.

This change keeps the existing behavior of not following directory symlinks
(there is an existing test asserting that skip is deliberate) but makes the
omission visible and truthful:

  1. MultiSkillDetectionResult gains omitted_symlink_entries, incremented
    wherever a symlink (or junction/reparse point) is skipped by
    detect_skills.
  2. The recursive scan threads that count into omitted_skill_count, so it is
    reflected in skills_omitted, analysis_completeness.is_complete,
    coverage, and the aggregate limitations.
  3. A terminal warning lists how many symlinked skill directories were skipped.
  4. Tests cover both the detection counter and the combined JSON report
    (skills_omitted == 1, is_complete is False, and a "symlinked recursive
    skill(s) omitted" limitation).

Changes

  • src/skillspector/multi_skill.py: count skipped symlink entries in
    detect_skills and expose them on MultiSkillDetectionResult.
  • src/skillspector/cli.py: account for omitted_symlink_entries when
    computing the aggregate omitted count, completeness, and limitations, and
    warn in the terminal when symlinked skill directories were skipped.

Validation summary

  • Detection counter verified in tests/test_multi_skill.py for the existing
    symlink skip paths.
  • Combined JSON report verified in tests/unit/test_cli.py with
    omitted_symlink_entries=1: skills_omitted == 1, is_complete is False,
    and the symlink limitation text is present.
  • Full non-integration suite: 5975 passed, 17 skipped (live provider tests
    requiring API keys), 4 xfailed.
  • make lint and make format clean on changed files. mypy reports only
    pre-existing errors that are unchanged from main.

Signed-off-by: Niladri Das <125604915+bniladridas@users.noreply.github.com>
Comment thread src/skillspector/cli.py
Comment thread src/skillspector/cli.py
Comment thread src/skillspector/multi_skill.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Recursive scan silently skips symlinked skill directories while reporting skills_omitted: 0 and analysis_completeness: complete (100%)

1 participant