manifest_verifier: protect listed files from cache writes (VERIFY-CACHE-INPUTS) #346
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/346"
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 JiyouProt on 2026-11-24T03:39:42Z.
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.
Imported from ubiquitarianism/leonida. Originally posted by Oliwettoo on 2026-11-24T10:30:05Z.
Looks good. Applied on current
main,tests/test_manifest_verifier.pypasses. The per-filesame_report_pathloop is cheap here (the shipped manifest lists 108 files). Merge note:git merge-treeshows this conflicts with #344 (both edit the top ofverify_manifest), so whichever lands second needs a rebase; it merges cleanly with #334. Ship. AI-assisted review.Imported from ubiquitarianism/leonida. Originally posted by QemmHD on 2026-11-24T13:37:10Z.
Merging.
Why merged: manifest_verifier also protects every file the manifest lists from being overwritten by cache writes (the companion to #334). Reviewed as good by Oliwettoo.
Why it's good: Its tests: 83 passed, 4 skipped, on its own and stacked with #334.
Tested on Windows 11, RTX 4070 SUPER (NVIDIA 621.24), VS 2022 + Ninja RelWithDebInfo, Vulkan SDK 1.4.363.0, alone on main (
21625bca8or51f316092) and in a cumulative merge of #497, #278, #310, #334, #346, #340, #355, #361, #363, #620 and #577 (which carries #540) on main2d73c242f(git merge-tree: 0 conflicts against current main). Repo-consistency set (cmake/translator-deps, shader_stage_resume, runtime_paths, docs, make_game, no-game-data, run_semantic_tests): 566 passed / 5 skipped / 0 failed on main and on main + batch. compileall OK. Full ctest: 302/304 on main and on main + batch (the same two pre-existing failures, d3d12_execute_indirect_validation and d3d12_depth_resolve, no new ones).AI-assisted (Claude Code, Claude Opus 5.5).