Repository navigation
fix(hub): read the same tags for drafts and the index - #909
Merged
Merged
Conversation
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.
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. |
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
Follow-up to #901. No issue.
What changed
skillshare hub indexand the dashboard hub builder's draft candidates now read a skill's tags with one reader,readSkillTags.tags: git, reviewgit,reviewgit,reviewtags: [git, review][git,review]git,reviewgit,reviewtags:block listgit,reviewgit,reviewmetadata.tags: [hidden]onlyhiddentags: [git, review]with another line YAML rejects[git,review]git,reviewtagsfield only. A list comes from the decoded frontmatter; the comma form comes from the existing line scan, which now also unwraps a one-line list.skill-format.mdgains one sentence in en, ja, ko, zh-Hans and zh-Hant: a YAML list works too, andtagsundermetadatais custom data.Why
The same skill could publish different tags depending on whether it went through
hub indexor a draft. The documented comma form did not reach drafts at all. After #901 the index ignoresmetadata, while drafts still letmetadata.tagsreplace the root field.Behaviour change
A draft no longer takes tags from
metadata.tags. That placement was never documented. Move such tags to the top-leveltagsfield.Validation
In a temporary container from the devcontainer image, mounted on this branch's worktree:
TestDraftAndIndexReadSameTagsfailed on every row before the change and passes after it.make checkpassed on the committed tree.python3 scripts/ai-context.py checkpassed on the host.Not run: the website production build (one added sentence per locale) and a manual check in the dashboard hub builder.
Not covered
---. Drafts used to read a tag list from it; the index never did, and now neither does. The Agent Skills format requires the file to begin with the frontmatter.internal/search/preview.go) reads the comma form and a one-line list, not a block list. Unchanged here.# commentkeeps the comment in the last tag. Unchanged here.Checklist
make check) — for code changes