fix: accept UTF-8 BOM in SKILL.md frontmatter - #99
Conversation
Schema read utf-8 and anchored frontmatter at ^---, so a Notepad BOM made a valid skill fail HIGH while unicode called the same BOM benign. Read utf-8-sig and allow an optional BOM before the opening fence. Fixes NVIDIA#91 Signed-off-by: mimran-khan <mohammed_imran.khan@outlook.com>
rng1995
left a comment
There was a problem hiding this comment.
The focused parser/schema suites pass (46 tests), with Ruff and diff checks clean. One Tier 1 consumer still fails to parse the newly accepted BOM form, leaving inconsistent results; details are inline. The shared Gitleaks failure is unrelated branch history.
Schema already accepted a BOM-prefixed SKILL.md, but quality still matched ^--- and skipped XML-tag checks. Read utf-8-sig and reuse the shared FRONTMATTER_PATTERN. Fixes NVIDIA#91 Signed-off-by: mimran-khan <mohammed_imran.khan@outlook.com>
# Conflicts: # CHANGELOG.md
|
Merged main. BOM handling in the quality parser should be covered now. Ready for re-review. |
rng1995
left a comment
There was a problem hiding this comment.
Re-reviewed the current head. BOM-prefixed frontmatter is now handled consistently by schema and quality parsing, so the original quality-gate mismatch is fixed. The focused frontmatter, schema, and quality suite passed (181 tests), with Ruff and diff checks clean. Approved. GitHub currently reports a CHANGELOG-only merge conflict, so the branch still needs an update before it can merge.
Summary
A valid SKILL.md that only differs by a UTF-8 BOM failed schema with HIGH frontmatter_format, while the unicode check called that BOM benign.
I read manifests with utf-8-sig (same as plugin JSON) and allow an optional BOM before the opening ---. Fixes #91.
Verification
make lintmake testmake buildRelease Impact
CHANGELOG.md