mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 23:35:53 +01:00
[PR #881] mesh_compute_vs: restore write mode before unlink on replace failure and publish mode (MESH-COMPUTE-VS-STAGE-CLEANUP) #919
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#919
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/881
Author: @trigger337
Created: 11/24/2026
Status: 🔄 Open
Base:
main← Head:fix/mesh-compute-vs-stage-cleanup📝 Commits (1)
235e5e5mesh_compute_vs: restore write mode before unlink on replace failure and publish mode (MESH-COMPUTE-VS-STAGE-CLEANUP)📊 Changes
2 files changed (+38 additions, -1 deletions)
View changed files
📝
tests/test_mesh_compute_vs.py(+26 -0)📝
tools/mesh_compute_vs.py(+12 -1)📄 Description
Overview
In
tools/mesh_compute_vs.py, applypublished_mode(spv)to the staged temporary SPV file beforeos.replace, and ensure write mode (0o600) is restored before temporary directory cleanup in the exception block if replacement fails.On Windows, unlinking a read-only staged file or cleaning up on
os.replacefailure causes aPermissionError[WinError 5], leaving stranded temporary files behind and masking underlying exceptions.Changes
tools/mesh_compute_vs.py: Importpublished_mode, apply it to staged SPV before replacement, and restore write mode before directory cleanup inexcept BaseException:.tests/test_mesh_compute_vs.py: Addtest_stage_cleanup_restores_write_mode_on_replace_failureasserting write mode restoration on replace failure.agent: yes
AI-assisted: yes
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.