Skip to content

fix(quality): isolate unreadable skill manifests - #910

Open
Afloat16 wants to merge 3 commits into
NVIDIA:mainfrom
Afloat16:fix/quality-manifest-read-errors-20261126
Open

Afloat16 wants to merge 3 commits into
NVIDIA:mainfrom
Afloat16:fix/quality-manifest-read-errors-20261126

Conversation

@Afloat16

@Afloat16 Afloat16 commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Reading a skill manifest can raise UnicodeDecodeError or an I/O error before quality scoring starts. The exception currently escapes the validator, so one unreadable member aborts a directory's quality evaluation and discards healthy members' results.

Record the read failure as a per-skill gate failure and return no numeric grade for that member. Directory evaluation continues and retains healthy members' existing scores. A directory whose manifests are all unreadable receives no aggregate grade.

Verification

  • Clarified read failures as could not read the manifest as UTF-8 text, with the precommit assertion updated to match.
  • I am familiar with the Contributing Guidelines.
  • All five new validator regressions fail against the base revision: actual invalid UTF-8, permission errors, disappearance after discovery, mixed healthy/unreadable members, and an entirely unreadable collection.
  • Updated the precommit integration test to require the structured unreadable-manifest diagnostic, including the manifest path and decoding failure, with no numeric grade. It still requires the failed exit status and the healthy sibling's valid score.
  • Added an explicit unexpected-exception regression to retain coverage of the precommit caller's outer exception isolation, exact error diagnostic, and continued sibling processing.
  • 621 quality and precommit tests passed locally, with six existing skips.
  • Full-repository Ruff, changed-file formatting, and git diff --check passed.
  • Ran make build; wheel and source distribution built successfully.
  • Required gates passed on Ubuntu 24.04 / Python 3.12 after uv sync --all-extras --locked --python 3.12: make lint, make test, and make build, using the checkout’s .venv/bin/python. Full validation run checked exact contribution head 3a82406152888bd296f22d832c8ead22a408d5f5; pytest reported 45,545 passed, 338 skipped, 19 deselected. Skips and marker exclusions are the repository’s existing defaults; no new skips or filters were added.
  • No credentials, private datasets, or proprietary benchmark content were added.

Release Impact

  • Updated CHANGELOG.md.

Signed-off-by: Afloat <ShuffleMonkey@163.com>
Signed-off-by: Afloat <ShuffleMonkey@163.com>

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

I reproduced the problem on main: a directory with one healthy skill and one latin-1 encoded SKILL.md makes quality-check die with a UnicodeDecodeError traceback (exit 1, no report at all), and a chmod 000 manifest does the same with PermissionError. At this head the same directory reports [latin1] Cannot compute quality score for .../SKILL.md: could not read the UTF-8 manifest (...) as a gate failure, the healthy sibling keeps its score, the run still exits 1, and the aggregate only counts members that were actually scored. A SKILL.md that is a directory or a symlink loop never reaches the read and still goes down the existing "SKILL.md not found" path on both trees, so this change is limited to decode and OS errors on the manifest read, and the except clause is narrow rather than a catch-all. The other file reads in this validator (scripts, references) were already guarded, so the manifest read was the last unguarded one on the folder path.

The five new validator tests and the updated precommit test fail against main's source and pass here, also under Python 3.13. The precommit test change is a tightening (exact message, no numeric grade on the FAIL line, a regex on the PASS line) and the old catch-all path keeps coverage through the new monkeypatched RuntimeError test, so nothing was loosened. The quality, precommit, publication-evidence and reporting suites give the same results on both trees.

One wording nit inline on the new error message. I also tried a trial merge with #885, which edits the same file: the source merges automatically and only CHANGELOG conflicts.

CHANGELOG entry is under Unreleased / Fixed, the commits are signed off, CI is green and the branch merges cleanly into main. The entry sits on the same CHANGELOG line as several other open PRs, so whichever lands second will need a trivial rebase.

Signed-off-by: Afloat <ShuffleMonkey@163.com>

This branch has not been deployed

No deployments
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