Repository navigation
fix(cli): remove stale briefs when re-freezing recipes - #5324
Conversation
|
Thanks for this, @user-github-me. This PR now has merge conflicts with |
Preview approval requiredThis pull request comes from a fork, so Mintlify won't build a preview until someone with write access approves commit |
miguel-heygen
left a comment
There was a problem hiding this comment.
Reviewed at 8f3cca7, and thanks for the rebase. It now merges cleanly with main.
The fix is in the right place. The project-tier folder is recreated on every re-freeze, but the user-tier copy is a merge into the existing folder, so a v1 brief-skeleton.md used to survive a v2 freeze that had no BRIEF.md. freezeRecipe only ever writes four files and the brief is the only optional one, so removing it when briefSkeleton is false covers every stale case, including another project freezing the same name. The packaged and skill copies match, and the manifest hash is updated. The new test goes through freezeRecipe and useRecipe into a fresh project, which is the path the recipe commands use. Without the new line, the old brief would be imported and the test would fail. CI on this head is green.
Verdict: APPROVE
Reasoning: Small, correct fix at the one place stale files can survive, with a test on the real freeze/import path; merges cleanly and checks pass.
miguel-heygen
left a comment
There was a problem hiding this comment.
Re-checked at e97fa6e5. Since my approval at 8f3cca70, the new commits are merges from main and a regenerated media-use hash in skills-manifest.json. The fix, the skill copy and the test are byte-identical to what I approved, the branch merges cleanly with current main, and every check on this head passes.
One note for merging: this PR and #5325 both rewrite the same media-use hash line in skills-manifest.json, so whichever lands second will conflict there and need the manifest regenerated once more. Merging the two back to back saves another round of rebases.
Verdict: APPROVE
Reasoning: Only merges and a regenerated manifest hash since the approved head; the fix is unchanged and all checks pass.
Re-freezing a recipe without
BRIEF.mdremoves the previous version's brief skeleton from the personal recipe copy. A fresh project importing version 2 receives no stale version-1 brief; the old project archive retains its brief.The copy keeps
main's safe directory-copy options for non-ASCII Windows paths. Packaged and standalone implementations remain identical, and the media guide explains the versioning behavior.Validation:
main.