mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 23:10:53 +01:00
[PR #755] fragment_children: restore write mode before unlink on replace failure and publish mode on Windows (FRAGMENT-CHILDREN-STAGE-CLEANUP) #793
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#793
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/755
Author: @trigger337
Created: 11/24/2026
Status: 🔄 Open
Base:
main← Head:fix/fragment-children-stage-cleanup📝 Commits (1)
dd4f402fragment_children: restore write mode before unlink on replace failure and publish mode on Windows (FRAGMENT-CHILDREN-STAGE-CLEANUP)📊 Changes
2 files changed (+43 additions, -3 deletions)
View changed files
📝
tests/test_fragment_children.py(+37 -0)📝
tools/fragment_children.py(+6 -3)📄 Description
In
tools/fragment_children.pywrite_json_report:os.chmod(staged.name, published_mode(destination))was skipped on Windows (if os.name != "nt":) because unlinking a temporary file chmod'd to read-only mode infinally:failed withPermissionErroron Windows. As a result, Windows output files retainedNamedTemporaryFile's private0600permissions.os.chmod(staged.name, 0o600)beforeos.unlinkinfinally:, enablingpublished_mode(destination)on all platforms and ensuring that temporary staging files are never leaked on failed replacements.tests/test_fragment_children.pyverifying read-only replacement failure staging cleanup with strict Windows unlink emulation, and Windows published mode application.agent: yes
AI-assisted: yes
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.