Repository navigation
fix(frontmatter): isolate root identity and hub index tags - #901
Merged
Merged
Conversation
Preserve root indentation in the tolerant identity readers so nested name and description fields cannot shadow a skill or create audit claims. Keep each reader's locator, scalar conversion and streaming policies intact. Prove existing structured provenance preservation and the namespace fix with regressions, bounded fuzzing, and global/project CLI integration. Document nested metadata and native-client compatibility in all format page locales. Fixes runkids#894
Use one root-line predicate for the tolerant identity readers and ParseSkillName so their metadata namespace boundary has one owner. Keep each caller's whitespace policy, locator, scalar handling and early-stop behavior intact. Retain the existing namespace regressions, fuzz invariant and CLI flow coverage without adding a duplicate helper test harness.
Apply the shared root-line predicate to the hub index scalar tag reader so custom metadata tags cannot replace root tags or create absent root tags. Extend the existing namespace table rows to assert exact index tags while preserving the separate structured-list metadata precedence policy.
Contributor
Author
|
@codex review |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
salmonumbrella
marked this pull request as ready for review
November 14, 2026 10:16
This was referenced Nov 14, 2026
runkids
added a commit
that referenced
this pull request
Nov 14, 2026
…field docs (#908) Follow-up to #901. IsRootFrontmatterLine took the caller's trimmed line only to test for blank and comment lines, and its callers disagreed on how they trimmed it (ParseSkillName trimmed spaces and tabs on the left, the rest trimmed all whitespace). The helper now trims the raw line itself, so there is one definition of a blank line and one argument fewer to get wrong. Two tests added in #901 covered behaviour that change did not touch. The ParseFrontmatterFields row is removed, and the ParseFrontmatterMap test is reduced to the one case that guards what the skill format page promises: nested metadata mappings and lists are kept. Docs: the skill format page now recommends metadata for custom fields, but the "Version tracking" example in creating-skills still showed top-level version and author. It now matches. The sentence saying sync preserves existing last_edited values is shortened, because skillshare has no such field and the wording suggested it does. Both edits are applied to en, ja, ko, zh-Hans and zh-Hant.
runkids
added a commit
that referenced
this pull request
Nov 14, 2026
The index and the draft builder read a skill's tags with different readers, so the same SKILL.md could publish different tags depending on the path: - The index accepted only the comma form (tags: git, workflow). A YAML list became "[git" and "review]", and a block list produced nothing. - Drafts accepted only a YAML list, so the documented comma form produced no tags, and metadata.tags replaced the root field. After #901 the index ignores metadata, which made the two disagree there as well. Both now call readSkillTags. It reads the root field only, in either form: a list comes from the decoded frontmatter, and the comma form from the existing line scan. The scan also unwraps a one-line list, so a skill whose frontmatter YAML rejects on another line (for example an unquoted colon in the description) no longer publishes bracketed fragments. Tags under metadata are custom data and are not read by either path. The skill format page says so in all five locales.
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.
Type
proposals/only — see CONTRIBUTING.md)approvedlabel)Linked Issue
#894
What changed
nameanddescriptionno longer replace root values or fill in a missing root description. Hub indexing also reads scalartagsonly at the root;metadata.tagscannot supply or replace index tags.metadata.typeand the hub's installation source type.Why
The complete-map parser already preserves nested metadata, including
generated,sources, and unknown keys. Some legacy readers instead scan individual lines and could mistake fields insidemetadatafor root fields. That could put a nested description or nested tags in the hub index, or trigger audit findings from metadata rather than the root description.fix-frontmatter-isolate-root-identity-and-hub-index-tags.mp4
Usage
No usage change. Keep custom fields under
metadata; rootnameanddescriptionidentify the skill. Native clients retain their own metadata restrictions.Validation
Passed in a devcontainer built from the repository Dockerfile:
internal/utils,internal/hub,internal/audit, andinternal/search, including frontmatter entry points and early-stop behavior.fmt-check,go vet, and CLI build.en,ja,ko,zh-Hans, andzh-Hant.Also passed:
ai-contextcheck andgit diff --check. Fullmake checkand broad race/platform checks have not run locally; hosted CI for the final head passed unit tests, Linux/macOS integration, Windows, offline Docker, redteam, and Nix checks (7 successful, 2 conditionally skipped, none pending).Automated Codex review could not complete because the account's review quota was exhausted.
Checklist
make check) — for code changesThe
make checkbox remains unchecked because validation was limited to the checks listed above.Closes #894