Repository navigation
fix(list): preserve flow-style skill metadata when toggling manual invocation - #970
Conversation
Edit flow flags without rewriting metadata, and verify the resulting map before writing so unusual source forms cannot corrupt the skill. Preserve exact bytes when reversing an inserted flag and keep existing flags operable across multiline layouts and comments.
Count YAML line breaks when translating node positions so valid metadata with Unicode separators does not block toggling or misplace the edit.
|
@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. |
Use the existing first-match helper for flag values and inspect the first entry directly, avoiding a duplicate search without changing toggle behavior.
|
Codex Review: Didn't find any major issues. Can't wait for the next one! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review |
|
Codex Review: Didn't find any major issues. Already looking forward to the next diff. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
Thanks @salmonumbrella. The flow-root edit and the re-parse check hold up: the claims in the description match the code and tests, and nested Could you change a few things before we merge?
Optional, not blocking: |
Show why a safe SKILL.md edit was refused so a direct toggle or a confirmed tracked-repo toggle no longer looks like a no-op. Keep the strict flow delimiter check and tell users how to fix the delimiters without rewriting their files. Cover the visible refusal in the list TUI and consolidate equivalent flow cases with an explicit BOM/CRLF fixture field.
|
Thanks @salmonumbrella, f536ca2 covers items 1-3: the refusal now shows on the note line (direct and after the tracked-repo prompt), the padded or late opener gets a message that says how to fix it, and the flow table uses a One thing left before we merge: please tick the two author boxes in the description yourself (CONTRIBUTING.md and "reviewed every line"); they still say "pending author confirmation". @codex review |
|
Codex Review: Didn't find any major issues. Delightful! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Type
proposals/only — see CONTRIBUTING.md)approvedlabel)What changed
{name: demo, metadata: {...}}), togglingdisable-model-invocation(themkey inskillshare list) now makes one edit inside that mapping. It checks that the parsed result changes only that flag before writing, so nestedmetadata, comments, BOM, CRLF and the body are preserved.disable-model-invocation: trueas the first entry (followed by,unless the mapping is empty). A first entry in that inserted form is removed on the next toggle, so absent -> on -> off restores the original bytes. An existing flag is removed when its current bytes match that first-entry form; otherwise its value is replaced in place. An explicitfalseis therefore not guaranteed to be restored.Why
With a flow-style root, the toggle appended
disable-model-invocation: trueas a separate line after the{...}mapping. A line added outside the flow mapping doesn't set a root flag that the parser can read, and it can make the frontmatter invalid.Not covered
Usage
No usage change.
Testing
make checkwas not run. Only focused tests were run, in the devcontainer, and all four commands passed:Checklist
make check) — for code changesRefs #894