mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 22:45:53 +01:00
[PR #346] [MERGED] manifest_verifier: protect listed files from cache writes (VERIFY-CACHE-INPUTS) #399
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#399
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/346
Author: @JiyouProt
Created: 11/24/2026
Status: ✅ Merged
Merged: 11/24/2026
Merged by: @QemmHD
Base:
main← Head:codex/verify-cache-inputs📝 Commits (1)
eb348cdmanifest_verifier: refuse caches that alias listed inputs (VERIFY-CACHE-INPUTS)📊 Changes
2 files changed (+62 additions, -0 deletions)
View changed files
📝
tests/test_manifest_verifier.py(+55 -0)📝
tools/manifest_verifier.py(+7 -0)📄 Description
Claimed in the coordination issue as: VERIFY-CACHE-INPUTS
What and why
With two listed files, passing one as
--cacheexcludes it from the scan, reports it MISSING, then overwrites its original bytes with cache JSON when the other file passes. A missing listed file can likewise be created as cache JSON.Check the cache destination against every manifest-listed input before scanning or hashing, using
report_paths.same_report_pathfor normalized paths, case aliases and links. Refuse withManifestError; the CLI exits 2 without a traceback and preserves the input bytes. An ordinary cache inside the target directory remains supported.Six synthetic regression tests cover the CLI, alternate path spelling, case aliases, hard links, symlinks and a missing listed input. The four runnable negative controls fail on unchanged main. Independent of #334 (manifest collision) and #344 (temporary-file staging). Based on main
d478a92.Tested
Windows 11 build 26300, Python 3.14.3:
python -I tests/test_manifest_verifier.py: 63 tests, 59 passed, 4 platform/sandbox skips.python -I tests/test_report_paths.py: 22 tests, 20 passed, 2 platform/sandbox skips.python -m compileall -q make_game.py tools tests, changed-filecheck_no_game_data.py, andgit diff --check: passed.test_sopc_validationandtest_unary_f16_validationfail becausespirv-as/spirv-valare unavailable.GPUs tested: n/a (CPU-only input-preservation fix; synthetic bytes only).
AI-assisted: yes, Codex.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.