BVH-REHYDRATE-MODE-FOLLOWUP: mode and read-only destination tests #1995

Merged
fitzypopper merged 1 commit from upstream-pr/1995 into main 2026-11-28 10:59:07 +00:00
fitzypopper commented 2026-11-25 17:46:25 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by fitzypopper on 2026-11-25T17:46:25Z.


Claimed in the current coordination issue (#1608, since #14 hit GitHub's comment limit) as: BVH-REHYDRATE-MODE-FOLLOWUP (claim comment).

Follow-up to the maintainer's note on merged #915: "Worth a follow-up: a test that an output with mode 0640 keeps it, and one for a read-only destination."

Adds three synthetic tests to tests/test_bvh_rehydrate_stage_cleanup.py:

  1. A successful replace over a 0640 destination preserves 0640.
  2. A successful replace over a 0444 (read-only) destination works on POSIX and the new output stays 0444.
  3. A failed replace over a read-only destination keeps the real OSError message, leaves no staged file, and leaves the previous output intact.

Checks: 4 tests in the file pass; existing 18 test_bvh_rehydrate.py tests pass; line-ending test passes; check_no_game_data.py clean. Synthetic bytes only — no game data.

AI-assisted: yes.

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5496288824 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1995). Originally posted by [fitzypopper](https://github.com/fitzypopper) on 2026-11-25T17:46:25Z. --- Claimed in the current coordination issue (#1608, since #14 hit GitHub's comment limit) as: `BVH-REHYDRATE-MODE-FOLLOWUP` ([claim comment](https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7169971735)). Follow-up to the maintainer's note on merged #915: "Worth a follow-up: a test that an output with mode 0640 keeps it, and one for a read-only destination." Adds three synthetic tests to `tests/test_bvh_rehydrate_stage_cleanup.py`: 1. A successful replace over a `0640` destination preserves `0640`. 2. A successful replace over a `0444` (read-only) destination works on POSIX and the new output stays `0444`. 3. A failed replace over a read-only destination keeps the real `OSError` message, leaves no staged file, and leaves the previous output intact. Checks: 4 tests in the file pass; existing 18 `test_bvh_rehydrate.py` tests pass; line-ending test passes; `check_no_game_data.py` clean. Synthetic bytes only — no game data. AI-assisted: yes.
sodove commented 2026-11-28 10:11:20 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by sodove on 2026-11-28T10:11:20Z.


#1995 | head 4225f8209dbcdfdb60a72c9cf1beed5a3253c85b | python3 -I tests/test_bvh_rehydrate_stage_cleanup.py -v | red: 4 passed | green: 4 passed | Green on both trees

This test-only PR adds POSIX file-mode and read-only output cases. All four tests executed successfully on Linux in both phases.

Pinned main 33db04a7010e81c40a7a6a15624525aa0c4a3a58, merged into this PR head. Ubuntu 26.04.1 (WSL2), Python 3.14.4. Full suite: not run. AI-assisted: OpenAI Codex. Batch claim.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7237729925 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1995#issuecomment-7237729925). Originally posted by [sodove](https://github.com/sodove) on 2026-11-28T10:11:20Z. --- #1995 | head `4225f8209dbcdfdb60a72c9cf1beed5a3253c85b` | `python3 -I tests/test_bvh_rehydrate_stage_cleanup.py -v` | red: 4 passed | green: 4 passed | **Green on both trees** This test-only PR adds POSIX file-mode and read-only output cases. All four tests executed successfully on Linux in both phases. Pinned main `33db04a7010e81c40a7a6a15624525aa0c4a3a58`, merged into this PR head. Ubuntu 26.04.1 (WSL2), Python 3.14.4. Full suite: not run. AI-assisted: OpenAI Codex. [Batch claim](https://github.com/ProjectLeonida/mandy/issues/1608#issuecomment-7237628300).
DadaCap commented 2026-11-28 10:59:09 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by DadaCap on 2026-11-28T10:59:09Z.


Merged, thank you @fitzypopper! This PR (BVH-REHYDRATE-MODE-FOLLOWUP: mode and read-only destination tests) was checked by zmasi or sodove and then by our own local run of its tests with main merged in, and it passed cleanly, so it went in with its reviewed batch.

AI-assisted (Claude Code, Claude Opus 5.5), posted for the maintainers.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7238249009 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1995#issuecomment-7238249009). Originally posted by [DadaCap](https://github.com/DadaCap) on 2026-11-28T10:59:09Z. --- Merged, thank you @fitzypopper! This PR (BVH-REHYDRATE-MODE-FOLLOWUP: mode and read-only destination tests) was checked by zmasi or sodove and then by our own local run of its tests with main merged in, and it passed cleanly, so it went in with its reviewed batch. AI-assisted (Claude Code, Claude Opus 5.5), posted for the maintainers.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
ProjectLeonida/mandy!1995
No description provided.