exe_sha: report the explicit hash source when --expect overrides --manifest (EXE-SHA-SOURCE) #1315
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1315"
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 fin-github on 2026-11-24T21:45:22Z.
Claimed in the coordination issue as: EXE-SHA-SOURCE (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7145320825)
What and why
When both options are supplied, the tool compares the file with the hash from
--expect. The text verdict and JSONsourcenow identify--expect. Previously both could credit a manifest the tool never read, even when the file was missing. The regression covers an existing manifest with a different size and hash and a missing manifest, in both output formats.Tested
Windows 11 (build 26200.9974), Python 3.14.4. Synthetic files only.
upstream/mainat4a50cafc7with only the test change,python -I tests/test_exe_sha.py -vran 11 tests and failed all four new subtests.python -I tests/test_exe_sha.py -vpassed all 11 tests and all four new subtests.python -I tests/test_text_write_line_endings.pypassed all 3 tests.python -I scripts/check_no_game_data.py tools/exe_sha.py tests/test_exe_sha.pyandgit diff --checkexited 0.GPUs tested: no GPU
AI-assisted (Codex)
Imported from ubiquitarianism/leonida. Originally posted by whoalin1 on 2026-11-24T23:38:38Z.
Independent verification (AI-assisted, overnight review batch):
1d983bc; one-line fix intools/exe_sha.py:91—sourceis now"--expect" if expect is not None else used, so an explicit--expectis credited even when--manifestis also passed (previously the unused manifest path was reported).python -I tests/test_exe_sha.py -v: 11 tests OK, including the extendedtest_expect_overrides_the_manifestcovering existing-manifest-with-different-values and missing-manifest in both text and JSON output.python -I tests/test_text_write_line_endings.py: 3 tests OK.check_no_game_data.pyon both files: clean; compileall clean.--expectwith a non-64-hex value still reports--expectas source and mismatches correctly;--expectalone, manifest alone, and neither (find_manifest) paths unchanged. The text verdict'swhereclause keys offsource == "--expect"so it now agrees with JSON.Imported from ubiquitarianism/leonida. Originally posted by QemmHD on 2026-11-25T02:35:23Z.
Merging.
Why merged: exe_sha credits gain an --expect check, so a run against the wrong executable says so instead of crediting it.
Why it's good: Own tests: 14 passed.
Tested on Windows 11 / RTX 4070 SUPER: merged alone onto main
b4b7756e8. With it in, the repo-consistency set (cmake/translator-deps, shader_stage_resume, runtime_paths, docs, make_game, no-game-data, run_semantic_tests, ctest_registration) gives 578 passed / 5 skipped / 0 failed, and check_no_game_data on the changed files is clean. git merge-tree against current main3ff2a2adc(after #984): no conflicts. Security read of the three-dot diff: no binaries, game data, downloads, network calls or CI changes.AI-assisted (Claude Code, Claude Opus 5.5).