Skip to content

Fail validation when a pattern number repeats - #342

Merged
blader merged 1 commit into
blader:mainfrom
TanmayShah29:fix/340-duplicate-pattern-numbers
Nov 19, 2026
Merged

blader merged 1 commit into
blader:mainfrom
TanmayShah29:fix/340-duplicate-pattern-numbers

Conversation

@TanmayShah29

Copy link
Copy Markdown
Contributor

Fixes #340.

scripts/validate-package.py read 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 with Use each pattern number once in SKILL.md: [7] (or in 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 ## Unreleased note to CHANGELOG.md. Rename or move it at release time as you prefer.

Validation:

  • python3 scripts/validate-package.py on the current tree: passes (v4.0.0).
  • On temporary copies with one mutation each: a verbatim copy of §7, a copy of §26, a repeated ### 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.

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
blader force-pushed the fix/340-duplicate-pattern-numbers branch from 2baccde to 1d09f33 Compare November 19, 2026 10:05
@blader
blader merged commit 3a06208 into blader:main Nov 19, 2026
1 check passed
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.

validate-package.py: duplicated pattern section in SKILL.md passes validation (dict key collapse defeats the numbering check)

2 participants