Skip to content

fix(cli): include nested skills in catalog validation - #210

Merged
rng1995 merged 7 commits into
NVIDIA:mainfrom
YMuskrat:fix/catalog-discovery
Oct 22, 2026
Merged

rng1995 merged 7 commits into
NVIDIA:mainfrom
YMuskrat:fix/catalog-discovery

Conversation

@YMuskrat

@YMuskrat YMuskrat commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Fix catalog validation skipping broken nested skills

A catalog could return PASS even though it contained a broken nested skill.

The issue was in validate() and _validate_catalog(). Both used glob("*/SKILL.md"), which only looks one folder down. When a valid first-level skill was present, catalog mode checked that skill and skipped the nested one, even though checking the nested skill directly returned FAIL.

This PR uses recursive discovery so those nested skills get checked too. Existing ignored directories are preserved, and skills with the same name keep separate reports.

All 12 new regression tests, lint and build pass. Full-suite validation remains incomplete locally because external API access was blocked.

@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.

Automated review: 5 findings (0 P1, 4 P2, 1 P3); 5 posted inline.

Comment thread src/skillevaluator/utils/helpers.py Resolved
Comment thread src/skillevaluator/utils/helpers.py Resolved
Comment thread src/skillevaluator/cli.py Resolved
Comment thread src/skillevaluator/utils/helpers.py Resolved
Comment thread CHANGELOG.md Resolved
@YMuskrat

Copy link
Copy Markdown
Contributor Author

@rng1995, thanks for the review. Commit 6bfd683 addresses all five findings:

  • P2: Templates: discovery stops at skill boundaries.
  • P2: Linked directories: skipped skills appear as failed catalog entries.
  • P2: Catalog aborts: manifest links retain existing behavior; unreadable directories are reported while other skills finish.
  • P2: Plugin crashes: discovery errors produce PLUGIN_SCHEMA findings.
  • P3: Results collisions: external Tier 3 results preserve catalog-relative paths.

Added regression coverage for serial and parallel catalog runs. All 345 relevant tests, lint, and build pass.

@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.

Automated review: 1 findings (0 P1, 0 P2, 1 P3); 1 posted inline.

Comment thread src/skillevaluator/utils/helpers.py Resolved
Report linked grouping folders containing nested skills as failed catalog entries.
Preserve exclusions, avoid nested directory links, and stop at the first manifest.
Add regression coverage for serial and parallel catalogs, errors, and traversal.

Signed-off-by: YMuskrat <[email protected]>

@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.

Follow-up at 35a445e. The linked grouping folder fix works: a linked folder that only holds nested skills is now a failed entry, and the catalog fails. I re-ran the earlier repros and none of the round-1 fixes regressed. The merge of main inside 35a445e kept main's changes.

One new problem, inline: a link that points back into the catalog now fails it. A repository root with skills/ and .claude/skills -> ../skills passed at 12c4446 and fails at 35a445e. I will approve once that is fixed.

Merge note: the branch conflicts with main again, in CHANGELOG.md only. Main has released 0.6.0, so when you merge main, put this entry under a new ### Fixed heading in ## Unreleased.

Comment thread src/skillevaluator/utils/helpers.py Resolved
Skip internal directory aliases before probing linked skills. Cover agent aliases, version aliases, and self-links with serial and parallel catalog tests.

Merge upstream main and keep the catalog fix under Unreleased in the changelog.

Signed-off-by: YMuskrat <[email protected]>
@YMuskrat

YMuskrat commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor Author

@rng1995 , I Fixed in 518e34b. Internal directory aliases are now skipped; external linked skills remain failed entries.

Added regression coverage for .claude/skills -> ../skills, latest -> v2, and loop -> ., with 1 and 2 workers. All 88 focused tests pass with network access disabled; lint and build pass. Full-suite validation remains incomplete locally because a test attempted a live external API request.

Merged current main and placed the changelog entry under Unreleased / Fixed.

@rng1995
rng1995 enabled auto-merge October 22, 2026 13:56

@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.

Approving at 518e34b. The link fix works:

  • Aliases back into the catalog now pass: .claude/skills -> ../skills, latest -> v2, and loop -> ..
  • Linked folders outside the catalog that hold skills are still failed entries, including a sibling that only shares a name prefix.
  • Innocuous and dangling links are still ignored.

I re-ran the round-1 repros with 1 and 2 workers and nothing regressed. A trial merge with current main (#220) is clean, and the catalog, CLI and validator tests pass on it.

One small, non-blocking note: the new comment says aliases are "already covered through their real paths". That is not true for an alias into a skipped directory such as node_modules, which is now ignored silently, as on main.

@YMuskrat the branch is now behind main after #220 merged, and main requires it to be up to date. Since maintainer edits are off here, could you click "Update branch"? It merges cleanly.

@rng1995
rng1995 disabled auto-merge October 22, 2026 15:08
@rng1995
rng1995 enabled auto-merge October 22, 2026 15:08
@rng1995

rng1995 commented Oct 22, 2026

Copy link
Copy Markdown
Collaborator

@YMuskrat thanks for updating the branch. #213 merged right after, so it is behind main again. Could you click "Update branch" once more? It merges cleanly, and I will merge this PR as soon as CI passes, before anything else lands.

@rng1995
rng1995 merged commit 3aa6214 into NVIDIA:main Oct 22, 2026
17 checks passed
rng1995 added a commit that referenced this pull request Oct 22, 2026
Brings in main up to 87f49e2: #213 --quality-config, #210 nested catalog
discovery with linked-directory handling, #224 docs refresh.

Conflicts:
- src/skillevaluator/utils/helpers.py: find_skills_in_directory follows
  #210 (recursive walk that stops at skill boundaries, prunes scan
  exclusions, skips in-catalog aliases, reports external linked or
  unreadable directories through the problems dict, else raises). It
  keeps the branch's lstat-first root handling: an unreadable root is a
  problem rather than an empty catalog, and a linked root directory is
  refused without querying its target, while a selected manifest file,
  linked or not, still names its skill as on main. The branch's secure
  plugin discovery (find_bundled_plugin_skill_manifests and
  find_bundled_plugin_skills) is unchanged and does not use this function.
- src/skillevaluator/cli.py: _resolve_validate_target now returns every
  catalog skill, nested ones included, plus the discovery problems, and
  validate passes the resolved root and those problems to main's catalog
  runners. The branch's PREVIOUS_VERSION_ENV guard is kept.
- src/skillevaluator/tier1/commands.py: --quality-config reaches the
  branch's _run_validation, so plugin bundled skills (QualityScoreValidator
  and _ListedSkillsQuality) use it too.
- src/skillevaluator/validators/plugin_schema.py: kept the branch's
  validator, which already turns a bundled-skill discovery failure into a
  HIGH finding (bundled_skill_path_unsafe) and refuses a linked skills
  folder in its tree check (unsafe_plugin_filesystem).
- tests/validators/test_plugin_schema.py: kept the branch's tests. Main's
  two #210 tests now check the branch's findings: a linked skills folder
  is an unsafe_plugin_filesystem finding, and a failing
  find_bundled_plugin_skill_manifests is a bundled_skill_path_unsafe
  finding at skills/.
- CHANGELOG.md: #213's Added entry, #224's Documentation section (between
  Changed and Fixed, as on main) and #210's Fixed entry go into the
  branch's Unreleased sections in main's order. Released sections are
  identical to main.
- docs/reports.mdx, docs/tier3-live-evaluation.mdx: kept the branch's
  shared-dimension Skill Lift text and added main's judge-model exclusion
  note. docs/tier1-validation.mdx: kept the branch's plugin policy note
  and main's note that severity overrides do not waive --min-score.
- docs/plugin-evaluation.mdx: --min-score and --quality-config apply to
  bundled skills.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>
@rng1995 rng1995 mentioned this pull request Oct 30, 2026
15 of 20 tasks
chrisknvidia pushed a commit that referenced this pull request Oct 30, 2026
* Fix catalog discovery for nested skills
* Fix catalog discovery review regressions

Signed-off-by: YMuskrat <[email protected]>
Signed-off-by: YMuskrat <[email protected]>
chrisknvidia pushed a commit that referenced this pull request Oct 30, 2026
Brings in main up to 87f49e2: #213 --quality-config, #210 nested catalog
discovery with linked-directory handling, #224 docs refresh.

Conflicts:
- src/skillevaluator/utils/helpers.py: find_skills_in_directory follows
  #210 (recursive walk that stops at skill boundaries, prunes scan
  exclusions, skips in-catalog aliases, reports external linked or
  unreadable directories through the problems dict, else raises). It
  keeps the branch's lstat-first root handling: an unreadable root is a
  problem rather than an empty catalog, and a linked root directory is
  refused without querying its target, while a selected manifest file,
  linked or not, still names its skill as on main. The branch's secure
  plugin discovery (find_bundled_plugin_skill_manifests and
  find_bundled_plugin_skills) is unchanged and does not use this function.
- src/skillevaluator/cli.py: _resolve_validate_target now returns every
  catalog skill, nested ones included, plus the discovery problems, and
  validate passes the resolved root and those problems to main's catalog
  runners. The branch's PREVIOUS_VERSION_ENV guard is kept.
- src/skillevaluator/tier1/commands.py: --quality-config reaches the
  branch's _run_validation, so plugin bundled skills (QualityScoreValidator
  and _ListedSkillsQuality) use it too.
- src/skillevaluator/validators/plugin_schema.py: kept the branch's
  validator, which already turns a bundled-skill discovery failure into a
  HIGH finding (bundled_skill_path_unsafe) and refuses a linked skills
  folder in its tree check (unsafe_plugin_filesystem).
- tests/validators/test_plugin_schema.py: kept the branch's tests. Main's
  two #210 tests now check the branch's findings: a linked skills folder
  is an unsafe_plugin_filesystem finding, and a failing
  find_bundled_plugin_skill_manifests is a bundled_skill_path_unsafe
  finding at skills/.
- CHANGELOG.md: #213's Added entry, #224's Documentation section (between
  Changed and Fixed, as on main) and #210's Fixed entry go into the
  branch's Unreleased sections in main's order. Released sections are
  identical to main.
- docs/reports.mdx, docs/tier3-live-evaluation.mdx: kept the branch's
  shared-dimension Skill Lift text and added main's judge-model exclusion
  note. docs/tier1-validation.mdx: kept the branch's plugin policy note
  and main's note that severity overrides do not waive --min-score.
- docs/plugin-evaluation.mdx: --min-score and --quality-config apply to
  bundled skills.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>
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.

2 participants