Skip to content

fix(cli): remove stale briefs when re-freezing recipes - #5324

Merged
miguel-heygen merged 10 commits into
heygen-com:mainfrom
user-github-me:fix/recipe-brief-replacement
Oct 25, 2026
Merged

miguel-heygen merged 10 commits into
heygen-com:mainfrom
user-github-me:fix/recipe-brief-replacement

Conversation

@user-github-me

@user-github-me user-github-me commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Re-freezing a recipe without BRIEF.md removes 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:

  • CLI rebuild and typecheck passed after updating against current main.
  • All 17 recipe and copy-parity tests passed.
  • Source and packaged recipe commands both passed a freeze/re-freeze/import check with Unicode project and personal-cache paths: version 2 imported no stale brief, and version 1 retained its archived brief.
  • Seven-skill manifest, lint, formatting, reachability, normal hooks and both comment checks passed.
  • Mint documentation validation and broken-link checks passed.

@jrusso1020

Copy link
Copy Markdown
Collaborator

Thanks for this, @user-github-me. This PR now has merge conflicts with main. Could you rebase it onto the latest main? Once it's conflict-free we'll review it and get it into the merge queue.

@mintlify

mintlify Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

Preview approval required

This pull request comes from a fork, so Mintlify won't build a preview until someone with write access approves commit e97fa6e.

Approve preview

@miguel-heygen miguel-heygen left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
miguel-heygen added this pull request to the merge queue Oct 25, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Oct 25, 2026

@miguel-heygen miguel-heygen left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@miguel-heygen
miguel-heygen added this pull request to the merge queue Oct 25, 2026
Merged via the queue into heygen-com:main with commit f5e15b2 Oct 25, 2026
66 checks passed
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.

3 participants