test: expand validate-pack test coverage from 3 to 20 cases#751
Open
BBridgeers wants to merge 1 commit into
Open
test: expand validate-pack test coverage from 3 to 20 cases#751BBridgeers wants to merge 1 commit into
BBridgeers wants to merge 1 commit into
Conversation
The existing test suite only covered duplicate slug detection (2 cases) and clean pack validation (1 case). The validator checks many more structural invariants — invalid slugs, path traversal, missing SKILL.md, invalid JSON, empty skills, missing manifest, unknown capabilities, non-array capabilities, unknown categories, missing frontmatter fields, orphan on-disk skills, missing license, dot slugs, and the --path flag. This adds 17 new test cases covering every ERROR and WARNING path in validate-pack.sh that was previously untested, plus a --path subdirectory test. Each test creates an isolated temp directory, writes a targeted manifest or skill dir, runs the validator, and checks both the exit code and the expected error/warning message.
|
Triage: DEFER — size (595 lines added+deleted) exceeds the 500-line threshold for first-touch triage. |
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.
What
Expands
scripts/tests/test_validate_pack.shfrom 3 test cases to 20, covering every ERROR and WARNING path inscripts/validate-pack.shthat was previously untested.Why
The existing test suite only verified duplicate slug detection (2 cases) and clean pack validation (1 case). The validator enforces many more structural invariants — invalid slugs, path traversal, missing SKILL.md, invalid JSON, empty skills arrays, missing manifests, unknown capabilities, non-array capabilities, unknown categories, missing frontmatter fields, orphan on-disk skills, missing license files, dot slugs, and the
--pathsubdirectory flag. Without test coverage, regressions in any of these paths would go undetected.New test cases
..).)--pathflag for subdirectory manifestTests 1–3 (duplicate slug, clean pack, triple duplicate) are preserved unchanged.
Each test creates an isolated temp directory, writes a targeted manifest or skill dir, runs the validator, and checks both the exit code and the expected error/warning message.
Testing
bash scripts/tests/test_validate_pack.sh # All 20 validate-pack tests passed.