Repository navigation
Fix shared Python lint failures in Unreal engine-region rewriting - #756
Closed
thehobbit85 wants to merge 1 commit into
Closed
thehobbit85 wants to merge 1 commit into
thehobbit85 wants to merge 1 commit into
Conversation
thehobbit85
force-pushed
the
codex/fix-ue-region-lint
branch
from
October 31, 2026 01:14
d1e7f23 to
39752d5
Compare
This was referenced Oct 31, 2026
seedds
added a commit
that referenced
this pull request
Oct 31, 2026
Bind the current Capstone instruction in the operand helper and assert that a detected engine-region gate has a size register before encoding it. These make the existing invariants explicit without changing valid rewrite behavior or widening the Python lint baseline. Reviewed PR #756. Focused UE-region, lint-ratchet and docs tests pass (28 tests); the pinned lint check has 392 baseline findings, zero new findings and zero stale entries. Regression risk is low: instruction matching and emitted gate encoding are unchanged, so no game regression run was needed. Co-authored-by: Eliran Zach <4012041+thehobbit85@users.noreply.github.com>
Owner
|
Thanks for isolating these shared lint failures. Closing this PR as superseded by 2aae9f8. Main contains the instruction binding in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR is fully superseded by upstream commit
2aae9f8c4e054d2178743a9fbec29075089eddd2, included in fixed main635e8008d67053214ddd302a0196f5ec971b63ea. It adds the same instruction binding inue_region.pyand the same size-register assertion inpatch_nso.py. Both complete files are byte-identical between this PR head and current main. There is no remaining source change to carry forward; closure is recommended. The PR remains open and its branch has not been rebased or rewritten.Fresh verification of those upstream sources: the pinned Python lint ratchet passes with 392 baseline findings, zero new findings and zero stale entries. The focused UE-region/lint/docs tests are also included in the fresh packing validation recorded on #376; historical tests below retain their original tested revisions.
Historical PR content and validation on earlier revisions
Main still has the two Unreal engine-region lint findings: the operand helper captures the loop instruction, and the observation gate shifts a possibly-optional size-register value. Bind the instruction and assert the detector's size-register invariant, without changing the lint baseline or valid rewrite behavior.
Maintenance pass (2026-10-31, 01:10 UTC): rebased onto fixed main
f11018a1f312, producing39752d582c7f. No conflicts; range-diff confirms the patch is unchanged. #376 also includes the same fix as an author-added prerequisite commit; this standalone PR keeps the correction available independently.Fresh validation on
39752d582c7f:python3 -m unittest dm.tools.tests.test_ue_region dm.tools.tests.test_lint_python dm.tools.tests.test_docs— 28 passed.git diff --checkpasses. No game-module execution or iPhone validation was performed.Exact fixed-main
f11018a1f312→39752d582c7fZ-A shader/interface comparison: PASS on chaind1043b780a74. All 28,603 shaders build in both revisions, with 0 changed MSL, new failures or interface issues. The completed shared cache and current reflection hashing were used; this comparison started no shader translation. Z-A has no smoke route, so this is not gameplay or rewritten-module execution coverage.The local Z-A build is not Unreal-based; the focused synthetic UE-region tests remain the detector-specific verification.
Fresh exact-base shader/interface report
regress.py check (full): PASS
Baseline
f11018a1f3125ec3046c30faae6147956a1a7c60f11018a, candidate39752d582c7f24787c9e401e3e2f3be19f79a85639752d5; Apple M2 Max, macOS 26.6, Xcode 27.0; 85.7 s0100F43008C44000LegendsZA
0100F43008C44000: PASSOriginal investigation, wider tool tests and historical regression results
What and why
lint-pythonfails on main at2006d5edwith two findings introduced by the Unreal engine-region detector. The initial audit found the same inherited failures on #221, #376 and #684; their feature changes do not cause either finding.Bind the current Capstone instruction in the operand helper, and assert the detector supplied a size register before encoding the observation gate. This makes the existing invariants explicit and leaves the lint baseline unchanged. Valid rewrite behavior is unchanged.
This is a standalone fix against main so the unrelated PRs do not have to own the underlying correction. Equivalent fixes reached #221 and #684 concurrently; #376 now includes this fix as a separate prerequisite commit. This standalone PR makes the correction available to main and other contributors.
Checked
python3 dm/tools/lint_python.py --against origin/mainpasses with 392 baseline findings, zero new findings and zero stale entries.dm/tools/tests/test_*.pyfiles passed (698 tests reported: 682 passed, 16 skipped), including the seven synthetic Unreal engine-region cases and documentation/lint-ratchet tests.git diff --checkpassed; independent review found no issues.scripts/regress.py impact origin/main..HEADreports broad rewriter reach. Only Pokémon Legends: Z-A (0100F43008C44000, build v393216) is discoverable locally, so the regression check covered that build. Its profile has no smoke route: the report below checks shaders, not gameplay or rewritten-module execution. No five-game or iPhone validation is claimed. The synthetic tests exercise the detector's Unreal-specific instruction patterns.regress.py check (full): PASS
Baseline
2006d5ed8690d79ef4865a60917eb938cdb4c8dc2006d5e, candidateworktree2006d5e (+ uncommitted changes); Apple M2 Max, macOS 26.6, Xcode 27.0; 28.4 s0100F43008C44000LegendsZA
0100F43008C44000: PASSDocs
The existing engine-region mechanism remains documented in memory.md. This is an invariant/lint correction, with no new runtime mechanism or shader-chain change. No game files, keys or extracted data are included.