Repository navigation
Ignore inline YAML comments in skill frontmatter - #2107
Open
time-attack wants to merge 1 commit into
Open
time-attack wants to merge 1 commit into
time-attack wants to merge 1 commit into
Conversation
Collaborator
Author
|
Before (main) / after (this PR), running |
Collaborator
Author
|
In the web UI (Admin → Skills → Skill packs), importing a demo pack whose
|
…c-software#2081) `name: demo # note` was read as the name "demo # note", so `qm check` rejected the skill and the core seed parser stored the wrong name. Strip an unquoted ` #` comment once, before the block-scalar and flow-array branches, in both the CLI and core parsers (kept in sync by the drift-lock test). The scan is linear and leaves `#` inside quotes and `foo#bar` alone. Reported by @javieraldape in yc-software#2081.
16francej
force-pushed
the
fix/skill-frontmatter-inline-comments
branch
from
October 7, 2026 19:16
23477dd to
f7f8903
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.

A skill whose frontmatter has a comment after a value, like
name: demo # note, was read as the namedemo # note.qm checkrejected it, and the core seed parser threw the same name error. Reported by @javieraldape in #2081.cli/src/sandbox-layer.tsand coresrc/skills/frontmatter.ts) now strip an unquoted#comment once, before the>/|and[a, b]branches, so[a, b] # why,> # noteand list items with a comment work too.#inside quotes andfoo#bar(no space) are kept. A value that is only a comment is now empty, as in YAML, so it gives "missing name/description" instead of the literal# note.Tests:
test/frontmatter.test.tsandcli/test/tool-descriptor.test.ts(drift-lock corpus) have new cases that fail on main; the CLItool-descriptor/checksuites (45) and the core frontmatter/normalize/ingest tests pass. Root and CLI typecheck, eslint and prettier are clean. Independently reviewed, including a fuzz against theyamlpackage (347k values, no regressions against main).Before (main) / after on the issue's file:
Fixes #2081