Repository navigation
Fail validation when a pattern number repeats - #342
Merged
blader merged 1 commit intoNov 19, 2026
Merged
Conversation
validate-package.py read the SKILL.md headings and README table rows into a dict keyed by pattern number, so a second '### 7.' heading or '| 7 |' row replaced the first and the numbering check still passed. Check for repeated numbers before building the dict, for both files. Fixes blader#340
blader
force-pushed
the
fix/340-duplicate-pattern-numbers
branch
from
November 19, 2026 10:05
2baccde to
1d09f33
Compare
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.
Fixes #340.
scripts/validate-package.pyread the### N.headings in SKILL.md and the| N | **Name**rows in the README tables into dicts keyed by pattern number. A repeated number replaced the earlier entry, so the numbering check never saw it and the package passed.This adds a small helper,
numbered_patterns, that checks for repeated numbers before building the dict, and uses it for both files. A repeat now stops validation withUse each pattern number once in SKILL.md: [7](orin the README tables). A repeated heading with a different name now reports the repeat instead of a README name mismatch.I also added a short
## Unreleasednote to CHANGELOG.md. Rename or move it at release time as you prefer.Validation:
python3 scripts/validate-package.pyon the current tree: passes (v4.0.0).### 7.heading with a new name, and a repeated README row 7 (verbatim and renamed) passed or gave a misleading message before, and now fail with the repeat message. Gap, missing-row and renamed-row cases fail with the same messages as before.