Skip to content

fix(skills): canonical frontmatter parser + per-file diagnostics - #108926

Merged
steipete merged 4 commits into
mainfrom
fix/skill-frontmatter-json5-108432
Jul 16, 2026
Merged

steipete merged 4 commits into
mainfrom
fix/skill-frontmatter-json5-108432

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Workspace skills silently vanish when SKILL.md frontmatter uses JSON5-style syntax (e.g. trailing commas): one parser tolerated it, another rejected it, and the skill disappeared with no diagnostic (#108432).

Why This Change Was Made

Supersedes #108486 (contributor closed it during a maintainer rebase collision; base commit and authorship preserved — thanks @jincheng-xydt). Consolidates every skill-loading entry point onto the canonical markdown-core frontmatter parser and adds per-file diagnostics:

  • Two-pass parse in the single skills-side wrapper: valid YAML untouched; JSON5-style metadata accepted; legacy free-form root descriptions recover only after parse failure; genuine YAML failures reject the skill with the actual parse error.
  • Entry points proven on the canonical parser: workspace/managed/personal/project/plugin, bundled, openclaw skills CLI + gateway status, agent/session loading, snapshots/watchers, node-host, remote nodes, install/workshop readers. Remaining duplicate parser imports deleted.
  • Malformed files now warn with file path + parser code/message via existing loggers; sibling skills keep loading.

User Impact

The issue's repro (trailing-comma metadata) now loads. Genuinely malformed frontmatter is reported with the file name and parse error instead of silently hiding the skill.

Evidence

  • Focused tests: 12 files, 183 tests green (trailing commas, malformed structures, aliases, duplicate keys, indentation, nested-flow metadata, sibling survival, per-entry-point coverage).
  • pnpm plugin-sdk:surface:check — pass (7945 public exports, 0 forbidden subpaths); generated surface report has zero branch diff after rebase.
  • Exact-head CI on the predecessor PR head (identical tree): green (65 success, rest skips/neutral). Autoreview clean.

Fixes #108432

@openclaw-barnacle openclaw-barnacle Bot added size: L maintainer Maintainer-authored PR labels Jul 16, 2026
@steipete
steipete merged commit 0d31fbf into main Jul 16, 2026
244 of 246 checks passed
@steipete
steipete deleted the fix/skill-frontmatter-json5-108432 branch July 16, 2026 11:18
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 17, 2026
…nclaw#108926)

* fix(skills): load JSON5-style metadata frontmatter

* fix(skills): diagnose invalid frontmatter

* test(skills): adapt session loader coverage

* ci: refresh merge ref

---------

Co-authored-by: jincheng-xydt <[email protected]>
zooqueen pushed a commit to zooqueen/openclaw that referenced this pull request Sep 11, 2026
…nclaw#108926)

* fix(skills): load JSON5-style metadata frontmatter

* fix(skills): diagnose invalid frontmatter

* test(skills): adapt session loader coverage

* ci: refresh merge ref

---------

Co-authored-by: jincheng-xydt <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR size: L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Workspace skill silently invisible: JSON5 trailing commas in YAML frontmatter metadata block break discovery with zero log output

2 participants