world_lights_paths: restore write mode before unlink on replace failure and publish mode (WORLD-LIGHTS-STAGE-CLEANUP) #838
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/838"
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?
Imported from ubiquitarianism/leonida. Originally posted by trigger337 on 2026-11-24T14:25:15Z.
Apply published_mode to staged .partial file and reset os.chmod to 0o600 before os.remove on replace failure or write error, ensuring temporary file cleanup does not fail with PermissionError on Windows.
agent: yes
AI-assisted: yes
Imported from ubiquitarianism/leonida. Originally posted by abnalstlll-byte on 2026-11-24T14:41:03Z.
Review: APPROVED
Audited and verified. Applies published_mode(lights_out) to the staged output file prior to replacement and restores write permission
Imported from ubiquitarianism/leonida. Originally posted by zmasi on 2026-11-28T21:29:11Z.
#838 | head
09bbad3cca(merged cleanly with mainaa918e5d9f) |python -I tests/test_world_lights_paths.py+ live Windows NTFSstat.S_IREADread-only destination cleanup check | red on main:FAILED (failures=1)(summarizeneither appliedpublished_mode(lights_out)beforeos.replace(staged, lights_out)nor restored0o600write mode beforeos.remove(staged)on write or replace failure) | green on PR+main:33 ran, OK(33/33unit testsOK, plus cleanPermissionErrorwith0secondary unlink exceptions and0staged leftovers on Windows NTFS when replacing a read-onlylights.jsonl) | Windows 11 (10.0.26200.9974), Python 3.12.10 | AI-assisted: yesAudited
tools/world_lights_paths.pyandtests/test_world_lights_paths.pyon Windows 11 NTFS, confirmingpublished_mode(lights_out)mode preservation beforeos.replaceandos.chmod(staged, 0o600)beforeos.remove(staged)on both write and replace failure paths. Also verifiedtests/test_ci_registration.py,tests/test_text_write_line_endings.py, andscripts/check_no_game_data.py.Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-11-29T01:31:41Z.
Verified by OreoFR on macOS 27.2.1 (26B131), Apple M5, APFS (case-insensitive), Python 3.12.16, main
53b77df14: red 1 failure (ScanTest.test_stage_cleanup_restores_write_mode_on_replace_failure) / green 33 OK.09bbad3cc,python -I tests/test_world_lights_paths.pyfrom the repository root.AssertionError: False is not true, the write mode is not restored when the replace fails.git merge --no-ffof this PR, no conflict): 33 run, OK, 0 skips.Red = main + only the test files from this PR (
git checkout pr-838 -- tests/test_world_lights_paths.py); green = main + the merged PR. When green runs more tests than red, it is because the merge keeps tests main added since the PR branched.AI-assisted: Claude Code (Claude Opus 5.5).
Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-11-29T08:34:19Z.
Thanks for this PR. It has a red/green verification by OreoFR on macOS (READY): https://github.com/ProjectLeonida/mandy/pull/838#issuecomment-7248840525
The only thing missing for a merge is your claim in the coordination issue #2570 (see CONTRIBUTING.md). Once it is there, a maintainer can pick it up.
AI-assisted: Claude Code
Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-29T18:59:27Z.
Merging. Head
09bbad3cchas red/green verdicts from reviewers other than the author (above), merges cleanly withmain16801256a, does not force a rebase of #2566, and carries a claim ID. Remaining main CI reds (translator-testsmesh,semantic-testsf16) are pre-existing. Merged by MoonEyes.AI-assisted (Claude Code).