Skip to content

fix(skill-curator): promote only the reviewed draft, safe restore - #1264

Merged
tieubao merged 3 commits into
masterfrom
l312-promote
Dec 2, 2026
Merged

tieubao merged 3 commits into
masterfrom
l312-promote

Conversation

@tieubao

@tieubao tieubao commented Dec 2, 2026

Copy link
Copy Markdown
Collaborator

What

Skill promote installs exactly the draft that was reviewed, and restore cannot reach outside the skills folder.

  1. lib/skill-curator promote moves the reviewed draft atomically inside proposals/ under a content digest over files, symlinks (raw target), file modes and odd names; an unknown file type (fifo, socket) is refused. A draft changed after review is refused.
  2. No recursive delete and no inherited temp variable; the post-promote retire step that hid a newer draft is gone.
  3. curate_restore refuses a slug with a slash, "..", a leading dash or empty, and will not overwrite a live skill it did not install; its manifest row is cleaned up.

Demo

Edit a draft after review (or chmod +x a file, or swap a symlink target): promoted before, refused after.

Proof

docs/verification/skill-promote-reviewed-digest.md

  • Verdict: works: only reviewed bytes are promoted and no path deletes outside the intended folder.
  • Proof: test-promote-digest 17/17 and test-promote 11/11 on bash 3.2 and 5, every run in a temp HOME with the real skills folder unchanged; red on master; a fresh review ran decoy-delete, odd-slug, symlink and restore cases, and its blocker and the restore slug check were fixed.
  • Risk: a draft holding a fifo or socket is now refused; undo with a revert.
  • Needs Han: nothing.

Bookkeeping

no-board-row: leftover audit slice tracked on the devkit leftovers item

@tieubao
tieubao merged commit c0a1492 into master Dec 2, 2026
8 checks passed
@tieubao
tieubao deleted the l312-promote branch December 2, 2026 10:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant