pe: validate intake_exe CLI build, candidate, metadata, and report paths upfront #2678
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2686"
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 R0Y00/Xbox2Windows. Originally posted by Ammmae0x on 2026-11-26T02:03:27Z.
Change
Validate
tools/intake_exe.pyCLI paths upfront inmain()before callingcollect(), and add a pure-Python CLI test suite (tests/intake_exe_cli_check.py) registered inCMakeLists.txtaspe_intake_exe_cli_check(TIMEOUT 60).--buildexists and is a directory before resolving paths.--reportsis not a symlink or regular file, and has no non-directory parent, beforecollect()runs.candidateis a regular file (preserving missing-candidate error-report exit code2intests/intake_exe_check.py), and that--baselineand--integrityexist as regular files (not directories or missing), exiting cleanly with code1and zero raw tracebacks or stray.tmpfiles.Verification
e5297bb8(based onupstream/mainb2564017)out\pe-env\Scripts\python.exe -B tests\intake_exe_cli_check.py->Ran 6 tests in 2.613s / OK(exit 0)out\pe-env\Scripts\python.exe -B tests\intake_exe_check.py->Ran 5 tests in 2.949s / OK(exit 0)out\pe-env\Scripts\python.exe -B tests\form_coverage_check.py->form coverage checks passed(exit 0)out\pe-env\Scripts\python.exe -B tests\docs_links_check.py->Self-test passed. Checked 19 Markdown files and 515 links.(exit 0)out\pe-env\Scripts\python.exe -B tests\bidi_controls_check.py->Self-test passed. Checked 1906 tracked source, script and build/CI files: no bidirectional controls.(exit 0)args.build.is_dir(),args.reports.is_symlink(),args.baseline.is_file()).--build, directory candidate, missing/directory--baselineand--integrity,--reportsas regular file / file parent / symlink / inside--build(verifyingcollect()is never called),--require-routingunsupported import exit1, simulatedos.replacefailure leaving zero.tmpfiles, and Python 3.14-safe argparse checks.Evidence and follow-up
All packages and PE32+ executables in
tests/intake_exe_cli_check.pyare synthetically constructed using the helpers intests/intake_exe_check.pyunder the repository MIT license; no external binaries or game files are used. Existingtests/intake_exe_check.pybehavior and report schemas remain unchanged.Checklist
AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-26T03:07:56Z.
Review: COMMENTED
Review of head
6764c85e(after update with main).Looks sound.
main()now validates--build,--reports, candidate,--baselineand--integritybeforecollect()and exits 1 with a clean message. Missing-candidate exit code 2 is preserved. The newpe_intake_exe_cli_checktest is registered in CMake next tope_intake_checks. No other open PR covers this slice (#2358 is merged and covers the unit/atomic-cleanup side).Commands run (Linux, pefile in a venv):
tests/intake_exe_cli_check.py-> Ran 6 tests, OKtests/intake_exe_check.py-> 4 of 5 pass;test_inside_rejects_traversal_root_and_absolute_paths(drive-letter path) fails on Linux, and fails identically on origin/main, so it is a platform difference and not from this PRtests/docs_links_check.pyOK,tests/bidi_controls_check.pyOK,git diff --check origin/main...HEADclean--build is_dircheck): new suite fails (1 failure)--baseline is_filecheck): new suite fails (1 failure)Windows WARP run follows separately.
AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-26T03:24:07Z.
Win2025 WARP receipt for head
6764c85eafter updating with main.Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit
6764c85ed9cd77c2cd23f713a44732a5f8a26c22:--preset dev):cmake --build --preset dev -- -j 2):427.67s(configure4.12s)ctest --preset dev -R 'pe_intake' --parallel 2 --no-tests=error --output-on-failure): 2/2 passed (9.08s:pe_intake_checks4.67s,pe_intake_exe_cli_check8.72s)/O2(--preset release):cmake --build --preset release -- -j 2):495.06s(configure5.14s)ctest --preset release -R 'pe_intake' --parallel 2 --no-tests=error --output-on-failure): 2/2 passed (5.76s:pe_intake_checks4.06s,pe_intake_exe_cli_check5.55s)tests/intake/import_forms_check.pyok (0.5s),tests/intake/routing_check.pyok (0.8s)sccache: 2196/2510 hits; wall954.9sAI-assisted; commands listed were executed locally.