tests: awc_manifest refuses a read-only manifest before it stages one #6
No reviewers
Labels
No labels
accessibility
area: ci
area: d3d12
area: docs
area: launcher
area: runtime (legacy)
area: shader translator
area: tools
area: viewer
bug
dependencies
documentation
duplicate
enhancement
good first issue
help wanted
invalid
missing claim
needs in-game run
needs rebase
needs-triage
question
ready-for-agent
submodules
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/ubiquitarianism--leonida!6
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/6/head"
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?
@wavehs on GitHub · 2026-11-24 01:29 UTC · original
wavehs:test-awc-readonly-manifest→main· +14 −1 · 1 files · 1 commits · merged 2026-11-24 01:40 UTCClaimed 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.)