Repository navigation
fix(skills): lyria-recipe replaces a link at its --output instead of writing through it - #8838
WaterrrForever wants to merge 1 commit into
Conversation
…writing through it (SECOPS-3949) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Reviewed at ef52bf0.
The fix itself is the right shape. The temp file is created exclusively (open(temp, "xb")) beside --output, and os.replace swaps it in, so the name is replaced rather than written through. Both link tests fail on main and pass here.
#8830 rewrites write_wav in this same file, and its version covers everything this one does, plus a few things this one changes from today's behaviour:
- A file already at
--outputkeeps its permissions. Here the new file gets0o666 & ~umask(lyria-recipe.py:58), so a WAV someone kept at0600comes back group- and world-readable under a common umask. - A read-only file at
--outputis still refused. Today the truncating open fails on it. Hereos.replacereplaces it whenever the folder is writable, with no check on the file itself. - A failed cleanup doesn't hide the original error. The bare
os.unlink(temp)in theexcept(:67) can raise and mask the exception that got there. - A brief hold on Windows is retried around
os.replace.
Its tests include both link cases here, plus three more: permissions kept, read-only refused, and an owner-only temp file. So this PR has no case of its own. As noted in the thread, I'd hold this until #8830 lands, then rebase to any remaining delta or close it.
The title, body and commit messages also carry an internal tracker ID. Please drop it from all three, since this is a public repo.
CI at ef52bf0: Skills: manifest in sync is red, and it's a required check. Build is still running.
Verdict: COMMENT
Reasoning: The fix is correct, but #8830 already covers it with stronger guarantees on the same file. A required check is also red.
miguel-heygen
left a comment
There was a problem hiding this comment.
Requesting changes; details sent to you directly.
|
Closing in favour of #8830, which rewrites the same |
Closed in favour of #8830, which covers this change.