mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 22:05:54 +01:00
[PR #855] bvh_slot_check: restore write mode before unlink on replace failure and publish mode (BVH-SLOT-CHECK-STAGE-CLEANUP) #893
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#893
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/855
Author: @trigger337
Created: 11/24/2026
Status: 🔄 Open
Base:
main← Head:fix/bvh-slot-check-stage-cleanup📝 Commits (1)
2bdc69cbvh_slot_check: restore write mode before unlink on replace failure and publish mode (BVH-SLOT-CHECK-STAGE-CLEANUP)📊 Changes
2 files changed (+26 additions, -1 deletions)
View changed files
📝
tests/test_bvh_slot_check.py(+18 -0)📝
tools/bvh_slot_check.py(+8 -1)📄 Description
Overview
In
tools/bvh_slot_check.py, applypublished_mode(path)insave_evidencebeforeos.replace, and ensure write mode (0o600) is restored before unlinking in the finally 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/bvh_slot_check.py: Importpublished_mode, apply it totemporarybeforeos.replace, and restore write mode beforetemporary.unlinkinfinally:.tests/test_bvh_slot_check.py: Addtest_save_evidence_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.