mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 22:15:52 +01:00
[PR #344] manifest_verifier: use unique cache staging files (VERIFY-CACHE-ATOMIC) #396
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#396
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/344
Author: @JiyouProt
Created: 11/24/2026
Status: 🔄 Open
Base:
main← Head:codex/verify-cache-atomic📝 Commits (2)
ec2ff81manifest_verifier: isolate each cache save in a unique temp file (VERIFY-CACHE-ATOMIC)ff42619manifest_verifier: preserve published cache permissions📊 Changes
2 files changed (+127 additions, -6 deletions)
View changed files
📝
tests/test_manifest_verifier.py(+112 -0)📝
tools/manifest_verifier.py(+15 -6)📄 Description
Claimed in the coordination issue as: VERIFY-CACHE-ATOMIC
What and why
The verification cache writer uses the fixed
cache_path + ".tmp"staging name. An existing neighbor is truncated and removed, including when it is the manifest; overlapping saves also share the same file.Use an exclusive, unique temporary file beside the cache, close it before replacement on Windows, and clean up only that save's file on failure. Serialization or replacement failures preserve the old cache. Reuse
file_mode.published_modeto preserve publication permissions rather than changing a readable cache to private mode. Existing manifest/input collision guards remain intact.Synthetic regressions cover an unrelated
.tmpneighbor, a manifest at that path, serialization/replacement failures, deterministically interleaved saves, and permission handling. The original five staging regressions fail without this fix. Only the cache writer and its tests change.Depends on: none. #334 and #346 are already merged; their collision guards are preserved.
Tested
Latest compatibility check, 26 November 2026: Windows 11 build 26300, Python 3.11.9. PR head
ff426194a8c9ca5bcb986b2f55ff31d4d5d1cfdfmerged locally with current main8ff7bc5b23f02d017ab9c33ddc8a043da6e9fc08, without conflicts. No remote history rewrite.python -I tests/test_manifest_verifier.py: 76 tests, 71 passed, 5 skips.python -I tests/test_report_paths.py: 24 tests, 23 passed, 1 skip.python -I tests/test_file_mode.py: 5 tests, 3 passed, 2 POSIX skips.python -I tests/test_text_write_line_endings.py: 3 passed.python -I tests/test_ci_registration.py: 16 passed. Git Bash cannot start in the local sandbox; the same test passed outside it.python -m compileall -q make_game.py tools tests, changed-filecheck_no_game_data.py, and changed-filegit diff --check: passed. Two trailing blank lines introduced by main in unrelated semantic fixtures are outside this diff.GPUs tested: n/a (CPU-only cache fix; synthetic data only).
Limits: Windows validation does not cover POSIX permission behavior. The full translator/runtime suites were not rerun for this compatibility check; neither component changes. Earlier validation details remain in the comments. Upstream CI's functional jobs passed, but the aggregate run was cancelled; this is not a fully green CI claim.
AI-assisted: OpenAI Codex (GPT-6; exact model variant unavailable), implementation, tests and review. Publication and PR maintenance authorized by the user.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.