mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 22:45:53 +01:00
[PR #915] [MERGED] BVH-REHYDRATE-STAGE-CLEANUP: harden staged BLAS output and cleanup #953
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#953
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/915
Author: @fitzypopper
Created: 11/24/2026
Status: ✅ Merged
Merged: 11/24/2026
Merged by: @aslan2142
Base:
main← Head:bvh-rehydrate-stage-cleanup📝 Commits (1)
687f51bbvh_rehydrate: harden staged output cleanup (BVH-REHYDRATE-STAGE-CLEANUP)📊 Changes
2 files changed (+47 additions, -0 deletions)
View changed files
➕
tests/test_bvh_rehydrate_stage_cleanup.py(+40 -0)📝
tools/bvh_rehydrate.py(+7 -0)📄 Description
Claimed in the coordination issue as:
BVH-REHYDRATE-STAGE-CLEANUP(claim comment).tools/bvh_rehydrate.py's_publishwrote the staged BLAS withNamedTemporaryFile's mode and unlinked it on failure without making it writable first. On Windows a staged file carrying a read-only destination's mode cannot be unlinked, which masks the original error. This usespublished_mode(dest)for the staged file and, on failure, chmods it to0o600before unlinking, with cleanup errors suppressed so the original exception survives.New
tests/test_bvh_rehydrate_stage_cleanup.pypatchesos.replaceto fail, asserts the staged file is made writable and removed, and checks the previous output is intact. Verified red onorigin/mainand green with this change. The existing 18test_bvh_rehydrate.pytests still pass.No game data: synthetic bytes only.
check_no_game_data.pyand the line-ending test pass.AI-assisted: yes.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.