mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 22:20:51 +01:00
[PR #6] [MERGED] tests: awc_manifest refuses a read-only manifest before it stages one #64
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#64
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/6
Author: @wavehs
Created: 11/24/2026
Status: ✅ Merged
Merged: 11/24/2026
Merged by: @ubiquitarianism
Base:
main← Head:test-awc-readonly-manifest📝 Commits (1)
1fa0975tests: awc_manifest refuses a read-only manifest before it stages one📊 Changes
1 file changed (+14 additions, -1 deletions)
View changed files
📝
tests/test_awc_manifest.py(+14 -1)📄 Description
Claimed in the coordination issue as: none — the original project's coordination issue was lost with its repository, and this repository has no such issue yet. Fixes the red
tests/test_awc_manifest.pyonmain; no other open pull request touches it.Depends on: none.
What and why
82b87bdd3changedwrite_manifestto open the destination for writing first, keeping the direct writer's permission check, and only then stage the report.test_failed_replace_of_read_only_manifest_removes_writable_tempstill expected the old path — stage, inherit 0444, fail insidereplace_retry, chmod 0600, unlink — and asserted that the chmod happened. Once the pre-open raisesPermissionErrornothing is staged, so the assertion gets 0 != 1 on POSIX and Windows alike.Split into the two behaviours that exist now:
replace_retryfails still leaves no staging file and keeps the previous report.Test file only; no tool code.
Tested
main@30daa6958, macOS 15 arm64 (Apple M3 Pro), CPython 3.15.2, CPU only, no game files:tests/test_awc_manifest.pymain@30daa6958FAILED (failures=1)—AssertionError: 0 != 1intest_failed_replace_of_read_only_manifest_removes_writable_tempRan 23 tests ... OK(22 before, plus the split's read-only case)python -m compileall -q make_game.py tools testsclean,python -I scripts/check_no_game_data.py tests/test_awc_manifest.pyclean.The read-only case relies on
os.open(..., O_WRONLY)failing for a 0444 file, which is the same check the product relies on; not run on Windows here.AI-assisted: yes.
Checklist
docs/design.md, with how it was confirmed. (Not applicable: no translator change.)🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.