Harden validate-package.py and document agents/openai.yaml - #237
Open
Scott-Emberson wants to merge 1 commit into
Open
Harden validate-package.py and document agents/openai.yaml#237Scott-Emberson wants to merge 1 commit into
Scott-Emberson wants to merge 1 commit into
Conversation
- Missing or unreadable package files exit with a plain-language message instead of a traceback, per the AGENTS.md style rule; malformed plugin.json does the same. - metadata.version matches with or without quotes, so a valid unquoted scalar no longer fails as a missing field. - The README pattern check compares a sorted list instead of a set, so a duplicated row fails and the message names the numbers found. - AGENTS.md Key files now lists agents/openai.yaml, the one tracked file no doc or check mentioned. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Four small robustness fixes to the package checks, found in a full-repo review:
validate-package.pywere the only failures that produced a raw traceback (FileNotFoundError,JSONDecodeError) instead of the plain-languageSystemExitevery other check uses. A missing package file is exactly the condition the validator exists to report. Reads now go through a helper, and malformedplugin.jsongets its own message.metadata.versionno longer fails as missing. The regex required quotes, so valid YAML likeversion: 2.11.2exited with "Add metadata.version to SKILL.md" even though the field was present. Quotes are now optional and the value must be a three-part version.agents/openai.yamldocumented. It was the one tracked file that appeared in no documentation and no check; AGENTS.md's Key files list now includes it. No validator check added for its contents since the repo does not define which loader consumes it.Verified by running the script against the repo (passes, "Humanizer package v2.11.2 is valid") and against four induced failures in a scratch copy: unquoted version (now passes), duplicated row 26 (fails, lists the duplicate), deleted README.md (plain message, exit 1), malformed plugin.json (plain message, exit 1).
🤖 Generated with Claude Code