Repository navigation
Conversation
Signed-off-by: Afloat <ShuffleMonkey@163.com>
Signed-off-by: Afloat <ShuffleMonkey@163.com>
chrisknvidia
left a comment
There was a problem hiding this comment.
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>
Summary
Reading a skill manifest can raise
UnicodeDecodeErroror 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
could not read the manifest as UTF-8 text, with the precommit assertion updated to match.git diff --checkpassed.make build; wheel and source distribution built successfully.uv sync --all-extras --locked --python 3.12:make lint,make test, andmake build, using the checkout’s.venv/bin/python. Full validation run checked exact contribution head3a82406152888bd296f22d832c8ead22a408d5f5; 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.Release Impact
CHANGELOG.md.