Skip to content

fix(tools): find export body edits in function overlap lookups - #20394

Merged
oneandonlydean merged 1 commit into
boykopovar:mainfrom
JJenkx:fix/tools-overlap-export-body-edits-20261115
Nov 16, 2026
Merged

oneandonlydean merged 1 commit into
boykopovar:mainfrom
JJenkx:fix/tools-overlap-export-body-edits-20261115

Conversation

@JJenkx

@JJenkx JJenkx commented Nov 15, 2026

Copy link
Copy Markdown
Contributor

What

pr_overlap.py --names missed an existing export when a PR changed only its multiline body. For example, open #19194 changes sceAgcDcbSetIndexBuffer and sceAgcDcbSetIndexSize, but the lookup reports open: none for both.

Include body edits in names mode by mapping requested names/NIDs to base definitions and intersecting changed line ranges with balanced C++ function extents. Existing NID aliases are included. Comments and literals are masked, insertion boundaries are distinguished from edits after a function, and trailing function-try handlers remain part of the function. Only relevant production-library files are inspected. Added-export detection and the normal branch overlap path are unchanged.

Tested

Linux, Python 3.14.10; base 99d68050465c, change c1ade43d887a.

  • Full overlap-tool suite: 171 tests pass, python3 -m unittest discover -s tools/tests -p 'test_pr_overlap*.py' -v.
  • Exact final names regressions on unchanged main: 9 cases, 4 expected failures, 0 errors. The change passes all nine. New coverage checks body edits with literal braces, unrelated exports/helpers/test files, edits to a following global, insertions inside and outside a function, existing NID aliases and function-try handlers.
  • Real fix(libSceAgc): encode index buffer state for the arguments the console encodes #19194 head 6d5410a5eb13: main misses both index-buffer functions; change reports fix(libSceAgc): encode index buffer state for the arguments the console encodes #19194 for each. The normal branch probe returns identical export data before/after. This comparison inspected Git source/diffs without executing that PR's code.
  • Conventions pass. Final official branch scan: 1500 open PRs, four shared-file candidates compared, no overlap or uncompared branches.
  • Clean merge-tree against later main b824546ced5e; that later tree was not executed. No native-title/GPU or Windows testing.

Test logs, main negative control, real-PR comparison and source patch, SHA-256 4a2e6b9ab4a9ed39ec63d989b1a48db5df9be474a481fa05eb8bf4120821bdcd; downloaded archive and all 12 members verified.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt and the licence notice of code adapted from upstream (see AGENTS.md)
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a (Python tooling only)
  • AI-assisted: yes

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — looks good

Nothing blocks this change; the implementation and added regression tests support the stated fix.

What I ran

Reviewed head c1ade43d887af61daa5e30b9d70a7e309f8f0cab. No commands or tests were run during this review; the author reports 171 passing overlap-tool tests on Linux with Python 3.14.10.

Results

Check Result Note
Changed code review passed Both changed files read
Test execution not run Author reports 171 passing tests
Console and Windows behavior not run Python tooling change

Findings

Blocking

None.

Non-blocking

None.

Not verified

I read tools/pr_overlap.py and tools/tests/test_pr_overlap_names.py, including all changed lines, and reviewed the prepared diff, description, commits, and manifest. files.json was not available in the prepared review folder. Tests and the author's validation report were not independently verified; physical-console and Windows behavior were not tested.

To get this to a good state

Nothing is required.

@ycbuzi

ycbuzi commented Nov 15, 2026

Copy link
Copy Markdown
Contributor

Tested c1ade43d88 merged into main, with the whole ctest suite on each machine below. Nothing fails that does not also fail on main on the same machine.

  • Linux: Debian 13 in ChromeOS's Linux environment on a Pentium Silver N6000 (4 cores, SSE4.2, no AVX), GCC 14.2.0, relinker-only build (-DANYPS5_RELINKER_ONLY=ON): run 1: 99% tests passed, 5 tests failed out of 921; run 2: 99% tests passed, 5 tests failed out of 921; run 3: 99% tests passed, 5 tests failed out of 921. 5 of the failing tests fail on main too.

AI-assisted: yes (Claude Code); the runs are automated, this summary was written from their reports.

@oneandonlydean
oneandonlydean merged commit e61f669 into boykopovar:main Nov 16, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants