Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix(discovery): report skipped symlinked skills - #499

Open
deepujain wants to merge 2 commits into
NVIDIA:mainfrom
deepujain:fix/495-recursive-symlink-coverage
Open

fix(discovery): report skipped symlinked skills#499
deepujain wants to merge 2 commits into
NVIDIA:mainfrom
deepujain:fix/495-recursive-symlink-coverage

Conversation

@deepujain

Copy link
Copy Markdown
Contributor

Summary

  • report recursive discovery as incomplete when a symlinked child skill is skipped
  • preserve the no-follow policy while preventing a false complete-coverage result

Validation

  • python3 -m py_compile src/skillspector/multi_skill.py - passed
  • python3 -m pytest tests/test_multi_skill.py -k symlinked_skill_directory_marks_discovery_incomplete - unavailable locally because pytest is not installed; GitHub CI will run the focused suite

Risk

  • The change fails closed for recursive discovery and does not follow symlinks.

Fixes #495

@deepujain
deepujain force-pushed the fix/495-recursive-symlink-coverage branch from 22c726a to 84b41e2 Compare September 9, 2026 21:54
@MohammedAlkindi

Copy link
Copy Markdown

The coverage-honesty goal makes sense. One question about the blast radius before this lands.

The change turns continue into raise _read_error("multi_skill_symlinked_entry") inside the per-entry loop, and the test's assertions invert accordingly: skill-a and skill-b are real, unlinked skills in the same directory, and the expectation moves from

is_multi_skill is True   skills == {"skill-a", "skill-b"}

to

is_multi_skill is False  skills == []  complete is False

So one symlinked child now discards the sibling skills rather than just marking coverage incomplete. A directory with two ordinary skills and one symlink reports no skills at all. limitations[0] carries the reason, so a caller that reads it is fine, but a caller that only looks at skills sees an empty directory rather than a partially-scanned one, and that is the same shape as #481 where an empty file_cache made the risk score meaningless.

Would returning the real skills with complete = False and the same limitation meet the goal without the drop?

On validation, since the PR notes pytest was unavailable locally: tests/test_multi_skill.py is 30 passed, 3 skipped both before and after on Windows 11. The new test is one of the three skips here, gated on symlink_to raising OSError, so this machine cannot exercise it. It needs Linux or Windows with Developer Mode.

@deepujain

Copy link
Copy Markdown
Contributor Author

Fixed in bc2e83f. A symlinked child is still never traversed and records multi_skill_symlinked_entry, but discovered non-link siblings remain in the result with complete=false. Focused validation passed: tests/test_multi_skill.py (33 passed), tests/unit/test_cli.py (107 passed), and Ruff. CI is rerunning.

@rng1995 rng1995 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[SkillSpector Review]

Changes requested at head bc2e83fc8a2dbd359957ae4b4e4771343f51ae93.

  • src/skillspector/multi_skill.py:281: name-based exclusions are evaluated only after the new symlink check. Consequently, a symlink whose name is intentionally out of discovery scope (for example .git, .cache, .venv, or node_modules) now adds multi_skill_symlinked_entry and makes an otherwise complete scan incomplete. Apply the hidden/_SKIP_DIRS name filter before recording the symlink limitation, and add a regression test for an ignored-name symlink alongside valid skills.

Required CI is green, but the correctness change above and current BEHIND state block approval and merge.

@deepujain
deepujain force-pushed the fix/495-recursive-symlink-coverage branch 2 times, most recently from 36302e2 to 2f8371c Compare September 12, 2026 08:23

@rng1995 rng1995 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[SkillSpector Review]

Re-reviewed current head 2f8371c65bc6bd09a43670c47946070e8e292e40. The rebased author commits retain the same multi_skill.py and regression-test blobs reviewed previously, and the sibling-retention correction is present.

The outstanding blocker remains at src/skillspector/multi_skill.py:281-294: symlink handling runs before the hidden and _SKIP_DIRS name filter, so a symlink whose name is intentionally excluded from discovery still adds multi_skill_symlinked_entry and makes an otherwise complete scan incomplete. Apply the name exclusion before recording the symlink limitation and add a regression with an ignored-name symlink beside valid skills.

All hosted checks pass, but the branch is behind main.

@deepujain
deepujain force-pushed the fix/495-recursive-symlink-coverage branch from 2f8371c to a627f0c Compare September 12, 2026 16:14

@rng1995 rng1995 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[SkillSpector Review]

Re-reviewed current head a627f0c3b0a66eea822dd7fa5cd713c297163b18 after the automated branch resynchronization. Both PR-owned blobs are byte-for-byte identical to the previously reviewed changes-requested head 2f8371c65bc6bd09a43670c47946070e8e292e40.

The discovery-completeness blocker remains: symlink handling runs before the hidden and _SKIP_DIRS name filter, so a symlink whose name is intentionally excluded from discovery still records multi_skill_symlinked_entry and makes an otherwise complete scan incomplete. Apply the name exclusion before recording that limitation and add the requested ignored-name symlink regression.

All hosted checks pass, but the required code change remains and GitHub reports mergeStateStatus=BLOCKED.

@deepujain
deepujain force-pushed the fix/495-recursive-symlink-coverage branch from a627f0c to 573d473 Compare September 13, 2026 18:45
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%)

3 participants