Repository navigation
feat(relinker): validate conversions without writing outputs - #13926
Conversation
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — looks good
At head b2343e91ec74f477a317a017f6f125ebbced282f, dry-run converts in memory, reports its planned outputs, and returns before the write path; the added fixtures check filesystem contents, permissions, and modification times.
What I ran
Reviewed head b2343e91ec74f477a317a017f6f125ebbced282f against base cd087bd12c258cf6dbb82e203bafd20d9fe2596c; GitHub reports it mergeable. Environment: Linux x86_64, Python 3.11.2, GCC 12.2.0. I did not build or run the C++/relinker tests locally.
python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 13926
git diff --check cd087bd12c258cf6dbb82e203bafd20d9fe2596c...b2343e91ec74f477a317a017f6f125ebbced282f
python3 tools/check_test_registration.py --scripts
python3 tools/pr_test_quality.py --root /marc/AnyPS5 --json core/relinker/cli/tests/CliArgsTests.cpp core/relinker/relinker/tests/test_dry_run.pyResults
| Check | Result |
|---|---|
| Diff and conventions | Passed |
| Python syntax and test registration | Passed; 231 test scripts registered |
| Test-quality heuristic | Its possible-unregistered-test warning for CliArgsTests.cpp is a false positive; the target is registered in CMake |
| Relinker-only build and 217 relinker tests | The author reports these passed on Windows 11/GCC 15.2.0 after rebasing on this base; I did not run them |
| Hosted CI | Eligibility, conventions, intake, labels and relinker ASAN passed; Ubuntu and Windows relinker jobs were running, macOS jobs queued; the unrelated full Linux/Windows jobs were skipped |
Raw local output
All conventions checks passed.
231 test script(s), each run by an add_test or a workflow
git diff --check produced no output. The precheck report is at /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-13926-b2343e91ec74/report.md; its test-quality helper could not run from the isolated PR checkout because that helper is not part of the PR. The local helper reported only the registration heuristic noted above, which I checked against CMake.
Sources
- Dry-run returns before file writes and lists planned outputs.
- Filesystem snapshot and dry-run cases.
- Dry-run CTest registration.
Not verified
I did not independently run the relinker tests or verify behavior on macOS. Hosted Ubuntu and Windows relinker jobs had not completed at the last status refresh.
|
Independent verification at head What I checked
Test runs
Negative control Removed the Limitation No GPU environment was used; not applicable to a relinker CLI change. |
|
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
|
Checked that |
What
Add
--dry-runto validate a full conversion in memory and list its planned outputs before creating artifacts. For example,relinker --dry-run --windows --registry input.elf output.execonverts the executable and bundled modules, analyzes imports and applies/verifies byte patches, then reports the executable, module and sidecar destinations without writing them.The same path also handles additional executables, patch manifests, Windows diagnostics and Linux desktop metadata. It preserves existing files and permissions, rejects
--autorunand--verify-patches, and keeps normal conversion error codes. Read-only input/output collision checks still run; temporary filesystem alias probes are skipped. Help, documentation and the final message state that destination write access and aliases of absent files are not validated.Tested
Windows 11 (10.0.26340), MinGW-w64 GCC 15.2.0, Python 3.10.10; synthetic ELF fixtures, no retail-title or console execution.
main(cd087bd12c) after validation; its only new changes concern libSceLibreSsl3, with no changes to the relinker or usage documentation. Rebuilt and reran the six focused tests on the final branch: all passed.test_registration,test_script_registrationandconventions_doc_linkspassed.python tools/check_conventions.py --base origin/mainandgit diff origin/main --checkpassed.python tools/pr_overlap.py --branch feat/relinker-dry-runchecked 1,610 open PRs and reported no confirmed overlap after the verification-option placement was adjusted. It could not compare 15 branches that already conflict with main. I manually reviewed the shared-file diffs in feat(tools): add a graphical launcher #3786, feat(aot): consolidate native ARM64 compiler, runtime and consumers #5021, perf(agc): build the pipelines of a submission ahead on a compile pool #5925, fix(libkernel): provide default arguments block for DT_INIT on Linux #6149, perf(recompiler): keep runtime-specialized shader modules in the shader disk cache #6924, test(relinker): check ADX guest state preservation #7531, feat(agc): look up table images at run time through a device image table on the GPU heap (APS5_GPU_PATH) #7642, feat(libSceUserService): take the user name from ANYPS5_USER_NAME #9345, fix(relinker): preserve Windows extended-path arguments #9793, feat(relinker): route ps5-payload-dev pathconf stub to libkernel export #10792, fix(relinker): analyze referenced code beyond SCE scan boundaries #10861, feat(videoout): add ANYPS5_FPS_LIMIT to cap the rate the window presents #12536, feat(agc): drop the top mip levels of large BC textures with APS5_TEXTURE_DOWNSCALE #12746, feat(libSceVideoOut): opt-in host pause with a key or on focus loss #12863 and feat(libSceVideoOut): validate ANYPS5_FULLSCREEN, restore the windowed size and hide the cursor in fullscreen #12930: their shared changes concern other documentation sections, packaging, Windows extended paths or unrelated test registrations; none implements this mode or is a dependency.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)