manifest_verifier: refuse cache aliases of the input manifest (VERIFY-CACHE-COLLISION) #334
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
missing claim
needs rebase
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/ubiquitarianism--leonida!334
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/334/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?
@JiyouProt on GitHub · 2026-11-24 03:14 UTC · original
JiyouProt:codex/verify-cache-collision→main· +57 −0 · 2 files · 1 commits · merged 2026-11-24 13:37 UTCClaimed in the coordination issue as: VERIFY-CACHE-COLLISION
What and why
Passing the same file to
--manifestand--cachereplaces the input manifest with cache JSON after reporting successful verification. Reject this configuration before hashing or writing, usingreport_paths.same_report_pathso alternate path spellings, case aliases and links are also checked. The CLI exits 2 and preserves the original bytes.Adds five synthetic regression tests. On the unchanged base, four fail and the symlink case is skipped on this Windows host. Based on main
84347bb; GitHub reports no merge conflicts.Tested
Windows, Python 3.14.3:
python -I tests/test_manifest_verifier.py: 62 tests, 58 passed, 4 skipped.python -I tests/test_report_paths.py: 22 tests, 20 passed, 2 skipped. The sandbox prevents hard/symbolic link creation; the other verifier skips are platform-specific.python -m compileall -q make_game.py tools tests,python -I make_game.py --help,scripts/check_no_game_data.pyon both changed files, andgit diff --check: passed.python -I scripts/run_semantic_tests.py tests/semantic --jobs 8: completed in 501 s, 463 files and 6,075 tests run; 2 files failed (test_sopc_validation,test_unary_f16_validation) becausespirv-as/spirv-valare unavailable. These translator files are unchanged by this PR.GPUs tested: n/a. No game files used.
AI-assisted: yes, Codex.
Checklist
84347bband merges cleanly at submission.@Oliwettoo on GitHub · 2026-11-24 10:26 UTC · original
Looks good. This prevents real data loss:
--cachepointing at the manifest (another spelling, hard link, symlink or case alias) would otherwise overwrite the input with the cache. It reusessame_report_pathas CONTRIBUTING asks, and the CLI turns theManifestErrorinto exit 2.test_manifest_verifier.pyandtest_report_paths.pypass with the PR on currentmain. Merge note: this conflicts with #344 (git merge-tree), but not with #346, so whichever of #334/#344 lands second needs a rebase. Ship. AI-assisted review.@QemmHD on GitHub · 2026-11-24 13:36 UTC · original
Merging.
Why merged: manifest_verifier refuses a --cache path that aliases the input manifest (another spelling, a hard link, a symlink or a case alias), which would otherwise overwrite the manifest: a real data-loss guard. Reviewed as good by Oliwettoo.
Why it's good: Its tests: 82 passed, 4 skipped. It merges cleanly together with #346, which touches the same tool; the cumulative run includes both. Note from Oliwettoo: this conflicts with #344, which will need a rebase.
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).