feat(libSceMsgDialog): export sceMsgDialogGetResult for PS4 titles #18207

Merged
puridanish284 merged 3 commits from upstream-pr/18207 into main 2026-11-13 05:41:36 +00:00
puridanish284 commented 2026-11-10 21:05:04 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by puridanish284 on 2026-11-10T21:05:04Z.


What

PS4 titles import sceMsgDialogGetResult (NID Lr8ovHH9l6A) from the libSceMsgDialog module, where a PS4 exports it: shadPS4 registers it under library and module libSceMsgDialog (msgdialog.cpp L154). On main only libSceMsgDialog.native exports it. Grand Theft Auto V (CUSA00419) stops at start on that import: with #18087 its unresolved imports are down to two, sceGnmDrawInitDefaultHardwareState (the gap of #17581) and this one (blocker 4 in #18084).

libSceMsgDialog already kept the button a player picks, or that a dialog without UI picks, "but not returned, as sceMsgDialogGetResult is exported by libSceMsgDialog.native". It now returns it:

  • The function is defined once, as the duplicate-export check requires: it moves unchanged from libSceMsgDialog.native's Export.cpp to libSceMsgDialog.native/Result.cpp, which both modules' Export.cpp include at their end. It reads its dialog through MsgDialogResultStatus, which each Export.cpp defines over its own state, so each module answers for the dialogs it opened.
  • libSceMsgDialog.native's MsgDialogResultStatus polls the dialog first, as its sceMsgDialogGetResult did; guest_msg_dialog_native passes unchanged.
  • libSceMsgDialog's reads the status without polling, so reading the result does not count towards the second status poll at which a dialog without UI finishes there. Its result is the kept button (the picked one, or 2 for YES_NO_FOCUS_NO and 1 otherwise without UI), result 0 and mode 0, as libSceMsgDialog.native returns and as shadPS4 fills it (mode is a FixedValue<u32, 0> there, msgdialog_ui.h L101-L106). Its errors and their order are libSceMsgDialog.native's: NOT_INITIALIZED before any dialog or after terminate, ARG_NULL for a null or unwritable pointer, NOT_FINISHED while a dialog runs.
  • libSceMsgDialog links libc for GuestCopyOut_nid_no_patch, as libSceMsgDialog.native does since eb18c24509, and its Windows test path gains libc's directory.
  • The declaration moves from libSceMsgDialog.native.hpp to the Api.hpp that header includes, so public_headers still finds exactly one.

The progress counts do not change: the definition stays in libSceMsgDialog.native's directory, which keeps its 10 functions, and libSceMsgDialog keeps 9.

Debt: libSceMsgDialog's entry that the button "is kept but not returned" becomes an entry for sceMsgDialogGetResult saying what it returns and what is not measured on a console (the result and button of a dialog the title closed, the order of the errors, the answer for an unwritable pointer). libSceMsgDialog.native's entry now links Result.cpp.

Overlap: tools/pr_overlap.py --branch claude/ps4-msgdialog-get-result against main and the 2009 open pull requests reports three that conflict, none in a function this branch changes, and a merge keeps both sides: #17706 (host message boxes for libSceMsgDialog) changes the same target_link_libraries line and adds a debt entry next to the one this branch rewrites; #17729 (host message boxes for libSceMsgDialog.native) adds a debt entry next to the sceMsgDialogGetResult one; #16362 (shared common dialog codes) replaces the constants of libSceMsgDialog.native's Export.cpp, two of which this branch removes with the function. #17706 and #17729 set g_buttonId from the host box's answer, which sceMsgDialogGetResult then returns. #14212, which puts a blank line between all debt entries, conflicts with main and was not compared.

Tested

Windows 11 (10.0.26200.9711) with WSL2 Ubuntu 24.04.5 LTS (kernel 6.18.54.1-microsoft-standard-WSL2), gcc 13.3.0, -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON, test targets only, on main 865323b2a9; main d66e6aac01 changes none of the files involved and merges cleanly. No title or console.

  • ctest -R 'msg_dialog|^public_headers$': 6 of 6 pass (msg_dialog_param, msg_dialog_text, msg_dialog_request, guest_msg_dialog, guest_msg_dialog_native, public_headers), and public_headers_compile_0 to _63 pass.
  • guest_msg_dialog's new Results case: NOT_INITIALIZED before initialize and after terminate, NOT_FINISHED before any dialog and while one runs, ARG_NULL for null and for 0x10; three reads while a dialog without UI runs leave it running at the next status poll; that YES_NO_FOCUS_NO dialog then returns button 2 with result 0, mode 0 and its 32 reserved bytes cleared over a buffer filled with 0x5a; a shown YES/NO dialog returns 2 after Next and Confirm, and 1 after Confirm.
  • Mutation check: polling the dialog in libSceMsgDialog's MsgDialogResultStatus fails guest_msg_dialog at a result of a running dialog.
  • nm -D of the built libSceMsgDialog.prx and libSceMsgDialog.native.prx lists sceMsgDialogGetResult in both; its NID by tools/nid_names.py's compute_nid formula is Lr8ovHH9l6A, as shadPS4 registers it.
  • python3 tools/check_conventions.py --base upstream/main: all conventions checks passed.
  • Not built for Windows or macOS here (no MinGW toolchain on this machine), and not run on GTA V, which also needs #18087 and sceGnmDrawInitDefaultHardwareState to start.

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
  • 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: CUSA00419 #18084, the sceMsgDialogGetResult import of blocker 4 (not run on the title, which also needs #18087 and sceGnmDrawInitDefaultHardwareState)
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5248892560 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/18207). Originally posted by [puridanish284](https://github.com/puridanish284) on 2026-11-10T21:05:04Z. --- ### What PS4 titles import `sceMsgDialogGetResult` (NID `Lr8ovHH9l6A`) from the libSceMsgDialog module, where a PS4 exports it: shadPS4 registers it under library and module `libSceMsgDialog` ([`msgdialog.cpp` L154](https://github.com/shadps4-emu/shadPS4/blob/4788f0b108a6faaae5105f8ac88ef8e1935e2b22/src/core/libraries/system/msgdialog.cpp#L154)). On `main` only libSceMsgDialog.native exports it. Grand Theft Auto V (CUSA00419) stops at start on that import: with #18087 its unresolved imports are down to two, `sceGnmDrawInitDefaultHardwareState` (the gap of #17581) and this one (blocker 4 in #18084). libSceMsgDialog already kept the button a player picks, or that a dialog without UI picks, "but not returned, as `sceMsgDialogGetResult` is exported by libSceMsgDialog.native". It now returns it: - The function is defined once, as the `duplicate-export` check requires: it moves unchanged from libSceMsgDialog.native's `Export.cpp` to `libSceMsgDialog.native/Result.cpp`, which both modules' `Export.cpp` include at their end. It reads its dialog through `MsgDialogResultStatus`, which each `Export.cpp` defines over its own state, so each module answers for the dialogs it opened. - libSceMsgDialog.native's `MsgDialogResultStatus` polls the dialog first, as its `sceMsgDialogGetResult` did; `guest_msg_dialog_native` passes unchanged. - libSceMsgDialog's reads the status without polling, so reading the result does not count towards the second status poll at which a dialog without UI finishes there. Its result is the kept button (the picked one, or 2 for `YES_NO_FOCUS_NO` and 1 otherwise without UI), result 0 and mode 0, as libSceMsgDialog.native returns and as shadPS4 fills it (`mode` is a `FixedValue<u32, 0>` there, [`msgdialog_ui.h` L101-L106](https://github.com/shadps4-emu/shadPS4/blob/4788f0b108a6faaae5105f8ac88ef8e1935e2b22/src/core/libraries/system/msgdialog_ui.h#L101-L106)). Its errors and their order are libSceMsgDialog.native's: `NOT_INITIALIZED` before any dialog or after terminate, `ARG_NULL` for a null or unwritable pointer, `NOT_FINISHED` while a dialog runs. - libSceMsgDialog links libc for `GuestCopyOut_nid_no_patch`, as libSceMsgDialog.native does since eb18c24509, and its Windows test path gains libc's directory. - The declaration moves from `libSceMsgDialog.native.hpp` to the `Api.hpp` that header includes, so `public_headers` still finds exactly one. The progress counts do not change: the definition stays in libSceMsgDialog.native's directory, which keeps its 10 functions, and libSceMsgDialog keeps 9. Debt: libSceMsgDialog's entry that the button "is kept but not returned" becomes an entry for `sceMsgDialogGetResult` saying what it returns and what is not measured on a console (the result and button of a dialog the title closed, the order of the errors, the answer for an unwritable pointer). libSceMsgDialog.native's entry now links `Result.cpp`. Overlap: `tools/pr_overlap.py --branch claude/ps4-msgdialog-get-result` against `main` and the 2009 open pull requests reports three that conflict, none in a function this branch changes, and a merge keeps both sides: #17706 (host message boxes for libSceMsgDialog) changes the same `target_link_libraries` line and adds a debt entry next to the one this branch rewrites; #17729 (host message boxes for libSceMsgDialog.native) adds a debt entry next to the `sceMsgDialogGetResult` one; #16362 (shared common dialog codes) replaces the constants of libSceMsgDialog.native's `Export.cpp`, two of which this branch removes with the function. #17706 and #17729 set `g_buttonId` from the host box's answer, which `sceMsgDialogGetResult` then returns. #14212, which puts a blank line between all debt entries, conflicts with `main` and was not compared. ### Tested <!-- OS, title or homebrew, what was checked. "Not tested" is a valid answer. A performance change: the summary lines of main and of this PR from the same machine and scene, with the traces attached, captured as the Performance report issue form describes. --> Windows 11 (10.0.26200.9711) with WSL2 Ubuntu 24.04.5 LTS (kernel 6.18.54.1-microsoft-standard-WSL2), gcc 13.3.0, `-DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON`, test targets only, on `main` `865323b2a9`; `main` `d66e6aac01` changes none of the files involved and merges cleanly. No title or console. - `ctest -R 'msg_dialog|^public_headers$'`: 6 of 6 pass (`msg_dialog_param`, `msg_dialog_text`, `msg_dialog_request`, `guest_msg_dialog`, `guest_msg_dialog_native`, `public_headers`), and `public_headers_compile_0` to `_63` pass. - `guest_msg_dialog`'s new `Results` case: `NOT_INITIALIZED` before initialize and after terminate, `NOT_FINISHED` before any dialog and while one runs, `ARG_NULL` for null and for `0x10`; three reads while a dialog without UI runs leave it running at the next status poll; that `YES_NO_FOCUS_NO` dialog then returns button 2 with result 0, mode 0 and its 32 reserved bytes cleared over a buffer filled with `0x5a`; a shown YES/NO dialog returns 2 after Next and Confirm, and 1 after Confirm. - Mutation check: polling the dialog in libSceMsgDialog's `MsgDialogResultStatus` fails `guest_msg_dialog` at `a result of a running dialog`. - `nm -D` of the built `libSceMsgDialog.prx` and `libSceMsgDialog.native.prx` lists `sceMsgDialogGetResult` in both; its NID by `tools/nid_names.py`'s `compute_nid` formula is `Lr8ovHH9l6A`, as shadPS4 registers it. - `python3 tools/check_conventions.py --base upstream/main`: all conventions checks passed. - Not built for Windows or macOS here (no MinGW toolchain on this machine), and not run on GTA V, which also needs #18087 and `sceGnmDrawInitDefaultHardwareState` to start. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: CUSA00419 #18084, the `sceMsgDialogGetResult` import of blocker 4 (not run on the title, which also needs #18087 and `sceGnmDrawInitDefaultHardwareState`) - [x] GPUs tested: n/a - [x] AI-assisted: yes
PrivacyOnion commented 2026-11-10 21:21:00 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-10T21:21:00Z.

Review: CHANGES_REQUESTED


Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against b305987375:

  • Conventions: tools/check_conventions.py passed; git diff --check clean.
  • GitHub CI: failing check(s): windows.
  • Build: guest_msg_dialog_tests built cleanly.
  • CTest (guest_msg_dialog, guest_msg_dialog_native):
    1/2 Test #3585: guest_msg_dialog_native ..........***Not Run   0.00 sec
    2/2 Test #3584: guest_msg_dialog .................   Passed    0.26 sec
    50% tests passed, 1 tests failed out of 2
    
    The following tests FAILED:
    
  • Minor: please drop the Generated with footer from the description; the AI-assisted checkbox can stay.

Requesting changes for the points above.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5849626035 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/18207#pullrequestreview-5849626035). Originally posted by [PrivacyOnion](https://github.com/PrivacyOnion) on 2026-11-10T21:21:00Z. **Review:** CHANGES_REQUESTED --- Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against `b305987375`: - **Conventions**: `tools/check_conventions.py` passed; `git diff --check` clean. - **GitHub CI**: failing check(s): `windows`. - **Build**: `guest_msg_dialog_tests` built cleanly. - **CTest** (`guest_msg_dialog`, `guest_msg_dialog_native`): ``` 1/2 Test #3585: guest_msg_dialog_native ..........***Not Run 0.00 sec 2/2 Test #3584: guest_msg_dialog ................. Passed 0.26 sec 50% tests passed, 1 tests failed out of 2 ``` ``` The following tests FAILED: ``` - Minor: please drop the `Generated with` footer from the description; the AI-assisted checkbox can stay. Requesting changes for the points above.
MarcZX10 commented 2026-11-10 21:36:35 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-10T21:36:35Z.

Review: DISMISSED


Reviewed — changes requested

The hosted Windows job fails its source-registration audit because the new shared implementation is included by path but the audit does not resolve that include path.

What I ran

Reviewed head b3059873759d8e6e547ee0898906773025e18bcc against base 87e33ddae62b078c4ef2d3f4deb10f738e226800; the exact head merged cleanly in the local merge preview. Environment: Linux x86_64, Python 3.11.2, GCC 12.2.0, CMake 3.25.1. I read all nine changed files and inspected the Windows job log and the source-registration audit.

python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 18207 --output-dir /tmp/anyps5-pr-precheck-18207-rerun
gh run view 42901538931 --repo boykopovar/AnyPS5 --job 130128549553 --log-failed
git -C /marc/AnyPS5 grep -n -E '#include ["<][^">]+\\.cpp[">]' 87e33ddae62b078c4ef2d3f4deb10f738e226800 -- '*.cpp' '*.hpp' '*.h'

I did not build or run CTest. A later PR comment reports guest_msg_dialog passed three Windows runs; I did not reproduce that run.

Results

Check Result Note
Diff and conventions passed Clean diff; conventions passed.
Export audit passed The new declaration and computed NID match.
Dependency preview passed Clean merge preview against the checked base.
Windows hosted job failed check_test_registration reports the new shared source as never built.
Focused build and CTest not run Author and reviewer reports are noted separately; I did not reproduce them.
Precheck table and selected unedited output
| Check | Status | Why / command |
|---|---|---|
| build_and_compile | not_run | Builds are intentionally excluded from this fast, no-build check pass. |
| diff_check | passed | Command ran; see raw output below. Command: `git diff --check 87e33ddae62b078c4ef2d3f4deb10f738e226800...b3059873759d8e6e547ee0898906773025e18bcc` |
| conventions_and_pr_template | passed | Command ran; see raw output below. Command: `/usr/bin/python3 tools/check_conventions.py --base 87e33ddae62b078c4ef2d3f4deb10f738e226800 --head b3059873759d8e6e547ee0898906773025e18bcc --title feat(libSceMsgDialog): export sceMsgDialogGetResult for PS4 titles --body /tmp/anyps5-pr-precheck-18207-rerun/pr-body.md` |
| changed_export_abi_audit | passed | Command ran; see raw output below. Command: `/usr/bin/python3 /marc/AnyPS5/tools/pr_abi_audit.py --base 87e33ddae62b078c4ef2d3f4deb10f738e226800 --head b3059873759d8e6e547ee0898906773025e18bcc --json` |
| python_syntax | not_applicable | No changed Python implementation files. |
| related_python_unit_tests | not_applicable | No changed Python tool module has a related tools/tests/test_<module>.py suite. |
| python_test_registration | not_applicable | No changed Python test files need registration. |
| live_dependency_and_mergeability_check | passed | Command ran; see raw output below. Command: `/usr/bin/python3 /marc/AnyPS5/tools/pr_stack_check.py 18207 --repo boykopovar/AnyPS5 --output-dir /tmp/anyps5-pr-precheck-18207-rerun/stack` |
| build_dependent_cpp_tests | not_run | Changed C/C++ source or test files need exact-head binaries; this fast pass does not build. |
| test_quality_heuristics | passed | Command ran; see raw output below. Command: `/usr/bin/python3 /marc/AnyPS5/tools/pr_test_quality.py --root /tmp/anyps5-pr-precheck-18207-rerun/head-b3059873759d-351abf2a --json core/libs/prx/libSceMsgDialog.native/Export.cpp core/libs/prx/libSceMsgDialog.native/Result.cpp core/libs/prx/libSceMsgDialog.native/libSceMsgDialog.native.hpp core/libs/prx/libSceMsgDialog/CMakeLists.txt core/libs/prx/libSceMsgDialog/Export.cpp core/libs/prx/libSceMsgDialog/include/Api.hpp core/libs/tests/GuestMsgDialog.cpp docs/dev/debt/libSceMsgDialog.md docs/dev/debt/libSceMsgDialog.native.md` |
| negative_controls | not_applicable | No changed tools/ Python test module is eligible for a base-source negative control. |

Conventions stdout:

All conventions checks passed.

Windows job log:

windows\tCheck that every test executable is registered with ctest\t2026-11-10T21:07:43.3001679Z error: core/libs/prx/libSceMsgDialog.native/Result.cpp defines APS5_VABI functions but no target compiles it
windows\tCheck that every test executable is registered with ctest\t2026-11-10T21:07:43.3003387Z 1 library source(s) are never built: their exports are counted but never exported; list each in its library's add_library or target_sources

The source-registration audit recognizes textual .cpp includes, but resolves them relative to the including file. Its current regex and resolution are in tools/check_test_registration.py at the base SHA below. The PR includes Result.cpp from both Export.cpp files using a prx/... include-root path, so that check does not find the included file.

Negative control

No mutation was made and no exact-head test binary was built, so no negative control was run.

Findings

Blocking

  • The Windows source-registration check fails on this head. Result.cpp is textually included in both library Export.cpp files, so it is compiled as part of those translation units, but the audit resolves the include relative to each source directory and does not find it. Use includes the audit can resolve (for example, a local Result.cpp include in the native module and a relative ../libSceMsgDialog.native/Result.cpp include in the other module), or update the audit to resolve include directories. Then rerun the Windows job.

Non-blocking

None found in the changed implementation after reading all changed files.

Sources

Not verified

  • I did not build or run the changed tests. The PR description reports six focused tests and public-header tests passing; a later comment reports three Windows runs of guest_msg_dialog. Those are not my runs.
  • No console behavior was tested.

To get this to a good state

Adjust the include paths or the audit so the Windows source-registration check recognizes this shared implementation, then rerun that job. I will rerun the same no-build precheck and review the new head.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5849825488 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/18207#pullrequestreview-5849825488). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-10T21:36:35Z. **Review:** DISMISSED --- # Reviewed — changes requested The hosted Windows job fails its source-registration audit because the new shared implementation is included by path but the audit does not resolve that include path. ## What I ran Reviewed head `b3059873759d8e6e547ee0898906773025e18bcc` against base `87e33ddae62b078c4ef2d3f4deb10f738e226800`; the exact head merged cleanly in the local merge preview. Environment: Linux x86_64, Python 3.11.2, GCC 12.2.0, CMake 3.25.1. I read all nine changed files and inspected the Windows job log and the source-registration audit. ```sh python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 18207 --output-dir /tmp/anyps5-pr-precheck-18207-rerun gh run view 42901538931 --repo boykopovar/AnyPS5 --job 130128549553 --log-failed git -C /marc/AnyPS5 grep -n -E '#include ["<][^">]+\\.cpp[">]' 87e33ddae62b078c4ef2d3f4deb10f738e226800 -- '*.cpp' '*.hpp' '*.h' ``` I did not build or run CTest. A later PR comment reports `guest_msg_dialog` passed three Windows runs; I did not reproduce that run. ## Results | Check | Result | Note | |---|---|---| | Diff and conventions | passed | Clean diff; conventions passed. | | Export audit | passed | The new declaration and computed NID match. | | Dependency preview | passed | Clean merge preview against the checked base. | | Windows hosted job | failed | `check_test_registration` reports the new shared source as never built. | | Focused build and CTest | not run | Author and reviewer reports are noted separately; I did not reproduce them. | <details> <summary>Precheck table and selected unedited output</summary> ```text | Check | Status | Why / command | |---|---|---| | build_and_compile | not_run | Builds are intentionally excluded from this fast, no-build check pass. | | diff_check | passed | Command ran; see raw output below. Command: `git diff --check 87e33ddae62b078c4ef2d3f4deb10f738e226800...b3059873759d8e6e547ee0898906773025e18bcc` | | conventions_and_pr_template | passed | Command ran; see raw output below. Command: `/usr/bin/python3 tools/check_conventions.py --base 87e33ddae62b078c4ef2d3f4deb10f738e226800 --head b3059873759d8e6e547ee0898906773025e18bcc --title feat(libSceMsgDialog): export sceMsgDialogGetResult for PS4 titles --body /tmp/anyps5-pr-precheck-18207-rerun/pr-body.md` | | changed_export_abi_audit | passed | Command ran; see raw output below. Command: `/usr/bin/python3 /marc/AnyPS5/tools/pr_abi_audit.py --base 87e33ddae62b078c4ef2d3f4deb10f738e226800 --head b3059873759d8e6e547ee0898906773025e18bcc --json` | | python_syntax | not_applicable | No changed Python implementation files. | | related_python_unit_tests | not_applicable | No changed Python tool module has a related tools/tests/test_<module>.py suite. | | python_test_registration | not_applicable | No changed Python test files need registration. | | live_dependency_and_mergeability_check | passed | Command ran; see raw output below. Command: `/usr/bin/python3 /marc/AnyPS5/tools/pr_stack_check.py 18207 --repo boykopovar/AnyPS5 --output-dir /tmp/anyps5-pr-precheck-18207-rerun/stack` | | build_dependent_cpp_tests | not_run | Changed C/C++ source or test files need exact-head binaries; this fast pass does not build. | | test_quality_heuristics | passed | Command ran; see raw output below. Command: `/usr/bin/python3 /marc/AnyPS5/tools/pr_test_quality.py --root /tmp/anyps5-pr-precheck-18207-rerun/head-b3059873759d-351abf2a --json core/libs/prx/libSceMsgDialog.native/Export.cpp core/libs/prx/libSceMsgDialog.native/Result.cpp core/libs/prx/libSceMsgDialog.native/libSceMsgDialog.native.hpp core/libs/prx/libSceMsgDialog/CMakeLists.txt core/libs/prx/libSceMsgDialog/Export.cpp core/libs/prx/libSceMsgDialog/include/Api.hpp core/libs/tests/GuestMsgDialog.cpp docs/dev/debt/libSceMsgDialog.md docs/dev/debt/libSceMsgDialog.native.md` | | negative_controls | not_applicable | No changed tools/ Python test module is eligible for a base-source negative control. | ``` Conventions stdout: ```text All conventions checks passed. ``` Windows job log: ```text windows\tCheck that every test executable is registered with ctest\t2026-11-10T21:07:43.3001679Z error: core/libs/prx/libSceMsgDialog.native/Result.cpp defines APS5_VABI functions but no target compiles it windows\tCheck that every test executable is registered with ctest\t2026-11-10T21:07:43.3003387Z 1 library source(s) are never built: their exports are counted but never exported; list each in its library's add_library or target_sources ``` The source-registration audit recognizes textual `.cpp` includes, but resolves them relative to the including file. Its current regex and resolution are in `tools/check_test_registration.py` at the base SHA below. The PR includes `Result.cpp` from both `Export.cpp` files using a `prx/...` include-root path, so that check does not find the included file. </details> ## Negative control No mutation was made and no exact-head test binary was built, so no negative control was run. ## Findings ### Blocking - **The Windows source-registration check fails on this head.** `Result.cpp` is textually included in both library `Export.cpp` files, so it is compiled as part of those translation units, but the audit resolves the include relative to each source directory and does not find it. Use includes the audit can resolve (for example, a local `Result.cpp` include in the native module and a relative `../libSceMsgDialog.native/Result.cpp` include in the other module), or update the audit to resolve include directories. Then rerun the Windows job. ### Non-blocking None found in the changed implementation after reading all changed files. ## Sources - [Shared result implementation](https://github.com/boykopovar/AnyPS5/blob/b3059873759d8e6e547ee0898906773025e18bcc/core/libs/prx/libSceMsgDialog.native/Result.cpp) - [Native module include](https://github.com/boykopovar/AnyPS5/blob/b3059873759d8e6e547ee0898906773025e18bcc/core/libs/prx/libSceMsgDialog.native/Export.cpp#L119) - [Other module include](https://github.com/boykopovar/AnyPS5/blob/b3059873759d8e6e547ee0898906773025e18bcc/core/libs/prx/libSceMsgDialog/Export.cpp#L146) - [Source-registration audit include resolution](https://github.com/boykopovar/AnyPS5/blob/87e33ddae62b078c4ef2d3f4deb10f738e226800/tools/check_test_registration.py#L19-L106) - [Failed Windows job](https://github.com/boykopovar/AnyPS5/actions/runs/42901538931/job/130128549553) - [Windows guest test report](https://github.com/boykopovar/AnyPS5/pull/18207#issuecomment-6779725584) ## Not verified - I did not build or run the changed tests. The PR description reports six focused tests and public-header tests passing; a later comment reports three Windows runs of `guest_msg_dialog`. Those are not my runs. - No console behavior was tested. ## To get this to a good state Adjust the include paths or the audit so the Windows source-registration check recognizes this shared implementation, then rerun that job. I will rerun the same no-build precheck and review the new head.
PrivacyOnion commented 2026-11-11 02:24:46 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-11T02:24:46Z.

Review: CHANGES_REQUESTED


Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against cb0d599e0b:

  • Conventions: tools/check_conventions.py passed; git diff --check clean.
  • Build: guest_msg_dialog_tests built cleanly.
  • CTest (guest_msg_dialog, guest_msg_dialog_native):
    1/2 Test #3585: guest_msg_dialog_native ..........***Not Run   0.00 sec
    2/2 Test #3584: guest_msg_dialog .................   Passed    0.25 sec
    50% tests passed, 1 tests failed out of 2
    
    The following tests FAILED:
    
  • Minor: please drop the Generated with footer from the description; the AI-assisted checkbox can stay.

Requesting changes for the points above.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5852892469 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/18207#pullrequestreview-5852892469). Originally posted by [PrivacyOnion](https://github.com/PrivacyOnion) on 2026-11-11T02:24:46Z. **Review:** CHANGES_REQUESTED --- Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against `cb0d599e0b`: - **Conventions**: `tools/check_conventions.py` passed; `git diff --check` clean. - **Build**: `guest_msg_dialog_tests` built cleanly. - **CTest** (`guest_msg_dialog`, `guest_msg_dialog_native`): ``` 1/2 Test #3585: guest_msg_dialog_native ..........***Not Run 0.00 sec 2/2 Test #3584: guest_msg_dialog ................. Passed 0.25 sec 50% tests passed, 1 tests failed out of 2 ``` ``` The following tests FAILED: ``` - Minor: please drop the `Generated with` footer from the description; the AI-assisted checkbox can stay. Requesting changes for the points above.
PrivacyOnion commented 2026-11-11 18:44:50 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-11T18:44:50Z.

Review: APPROVED


Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against cb0d599e0b:

  • Conventions: tools/check_conventions.py passed; git diff --check clean.
  • Build: guest_msg_dialog_tests built cleanly.
  • CTest (guest_msg_dialog, guest_msg_dialog_native):
    1/2 Test #3584: guest_msg_dialog .................   Passed    0.26 sec
    2/2 Test #3585: guest_msg_dialog_native ..........   Passed   11.24 sec
    100% tests passed, 0 tests failed out of 2
    
  • Negative control: with core/libs/prx/libSceMsgDialog.native/Export.cpp, core/libs/prx/libSceMsgDialog.native/libSceMsgDialog.native.hpp, core/libs/prx/libSceMsgDialog/Export.cpp, core/libs/prx/libSceMsgDialog/include/Api.hpp reverted to main, the new tests do not build/link without the change; restoring it makes them build and pass.
  • Code reading:
    • Verified core/libs/prx/libSceMsgDialog.native/Result.cpp returns exact error codes in order: errorNotInitialized (0x80B80003), errorArgNull (0x80B8000D), and errorNotFinished (0x80B80005), matching Orbis specifications and existing libSceMsgDialog.native behavior.
    • Verified memory safety in Result.cpp: checked result pointer for nullptr before dereference, verified MsgDialogResult value is zero-initialized clearing mode, result, and reserved bytes, and verified GuestCopyOut_nid_no_patch safely handles unwritable guest memory.
    • Verified thread safety in core/libs/prx/libSceMsgDialog/Export.cpp: MsgDialogResultStatus locks g_lock across both g_buttonId and g_status reads without polling, preventing race conditions and preserving headless poll counts.
    • Verified concurrency in core/libs/prx/libSceMsgDialog.native/Export.cpp: MsgDialogResultStatus polls modal dialog presentation state and reads atomic g_buttonId consistently without deadlock risks.
    • Verified AGENTS.md compliance across all modified files: confirmed zero code comments added, accurate debt tracking in docs/dev/debt/libSceMsgDialog.md and libSceMsgDialog.native.md, and no forbidden stubs or extraneous files.
    • Verified test coverage in core/libs/tests/GuestMsgDialog.cpp: Results() exercises pre-init, post-init, null pointer, unwritable pointer (0x10), headless NO button, interactive YES/NO presenter buttons, and post-termination states while resetting global presenter state.
  • Note: the AI-assisted checkbox can stay.

Looks Good To Me

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5863802344 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/18207#pullrequestreview-5863802344). Originally posted by [PrivacyOnion](https://github.com/PrivacyOnion) on 2026-11-11T18:44:50Z. **Review:** APPROVED --- Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against `cb0d599e0b`: - **Conventions**: `tools/check_conventions.py` passed; `git diff --check` clean. - **Build**: `guest_msg_dialog_tests` built cleanly. - **CTest** (`guest_msg_dialog`, `guest_msg_dialog_native`): ``` 1/2 Test #3584: guest_msg_dialog ................. Passed 0.26 sec 2/2 Test #3585: guest_msg_dialog_native .......... Passed 11.24 sec 100% tests passed, 0 tests failed out of 2 ``` - **Negative control**: with `core/libs/prx/libSceMsgDialog.native/Export.cpp`, `core/libs/prx/libSceMsgDialog.native/libSceMsgDialog.native.hpp`, `core/libs/prx/libSceMsgDialog/Export.cpp`, `core/libs/prx/libSceMsgDialog/include/Api.hpp` reverted to `main`, the new tests do not build/link without the change; restoring it makes them build and pass. - **Code reading**: - Verified core/libs/prx/libSceMsgDialog.native/Result.cpp returns exact error codes in order: errorNotInitialized (0x80B80003), errorArgNull (0x80B8000D), and errorNotFinished (0x80B80005), matching Orbis specifications and existing libSceMsgDialog.native behavior. - Verified memory safety in Result.cpp: checked result pointer for nullptr before dereference, verified MsgDialogResult value is zero-initialized clearing mode, result, and reserved bytes, and verified GuestCopyOut_nid_no_patch safely handles unwritable guest memory. - Verified thread safety in core/libs/prx/libSceMsgDialog/Export.cpp: MsgDialogResultStatus locks g_lock across both g_buttonId and g_status reads without polling, preventing race conditions and preserving headless poll counts. - Verified concurrency in core/libs/prx/libSceMsgDialog.native/Export.cpp: MsgDialogResultStatus polls modal dialog presentation state and reads atomic g_buttonId consistently without deadlock risks. - Verified AGENTS.md compliance across all modified files: confirmed zero code comments added, accurate debt tracking in docs/dev/debt/libSceMsgDialog.md and libSceMsgDialog.native.md, and no forbidden stubs or extraneous files. - Verified test coverage in core/libs/tests/GuestMsgDialog.cpp: Results() exercises pre-init, post-init, null pointer, unwritable pointer (0x10), headless NO button, interactive YES/NO presenter buttons, and post-termination states while resetting global presenter state. - Note: the AI-assisted checkbox can stay. Looks Good To Me
PrivacyOnion commented 2026-11-12 23:17:24 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-12T23:17:24Z.

Review: APPROVED


Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against c21e54e802:

  • Conventions: tools/check_conventions.py passed; git diff --check clean.
  • Build: guest_msg_dialog_tests built cleanly.
  • CTest (guest_msg_dialog, guest_msg_dialog_native):
    1/2 Test #3768: guest_msg_dialog .................   Passed    0.26 sec
    2/2 Test #3769: guest_msg_dialog_native ..........   Passed   13.24 sec
    100% tests passed, 0 tests failed out of 2
    
  • Negative control: with core/libs/prx/libSceMsgDialog.native/Export.cpp, core/libs/prx/libSceMsgDialog.native/libSceMsgDialog.native.hpp, core/libs/prx/libSceMsgDialog/Export.cpp, core/libs/prx/libSceMsgDialog/include/Api.hpp reverted to main, the new tests do not build/link without the change; restoring it makes them build and pass.
  • Code reading:
    • Verified pointer safety and error code ordering in core/libs/prx/libSceMsgDialog.native/Result.cpp: sceMsgDialogGetResult validates uninitialized status (0x80B80003), null pointer (0x80B8000D), and non-finished status (0x80B80005), and safely traps unwritable destination buffers via GuestCopyOut_nid_no_patch.
    • Verified buffer zero-initialization in core/libs/prx/libSceMsgDialog.native/Result.cpp: MsgDialogResult value{} value-initializes mode (0), result (0), and the 32 reserved bytes to zero before assigning button_id, matching Orbis OS expectations.
    • Verified thread safety in core/libs/prx/libSceMsgDialog/Export.cpp: MsgDialogResultStatus locks g_lock to read g_buttonId and g_status without calling Poll(), ensuring result queries do not prematurely advance headless dialog status.
    • Verified state handling in core/libs/prx/libSceMsgDialog.native/Export.cpp: MsgDialogResultStatus delegates to Status() and loads atomic g_buttonId, preserving the native module's polling and button resolution semantics.
    • Verified build and runtime link properties in core/libs/prx/libSceMsgDialog/CMakeLists.txt: linked libc for GuestCopyOut_nid_no_patch and prepended libc directory to PATH in guest_msg_dialog test properties on Windows.
    • Verified comprehensive test coverage in core/libs/tests/GuestMsgDialog.cpp: Results() exercises pre-init error, pre-dialog error, null and invalid (0x10) pointer errors, non-advancing status polls during dialog execution, verified result struct members, and modal UI button selections.
    • Verified AGENTS.md rules across all modified files: zero comments in code, technical debt accurately recorded in docs/dev/debt/libSceMsgDialog.md and docs/dev/debt/libSceMsgDialog.native.md, and single shared declaration placed in Api.hpp.
  • Note: the AI-assisted checkbox can stay.

Looks Good To Me

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5883506691 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/18207#pullrequestreview-5883506691). Originally posted by [PrivacyOnion](https://github.com/PrivacyOnion) on 2026-11-12T23:17:24Z. **Review:** APPROVED --- Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against `c21e54e802`: - **Conventions**: `tools/check_conventions.py` passed; `git diff --check` clean. - **Build**: `guest_msg_dialog_tests` built cleanly. - **CTest** (`guest_msg_dialog`, `guest_msg_dialog_native`): ``` 1/2 Test #3768: guest_msg_dialog ................. Passed 0.26 sec 2/2 Test #3769: guest_msg_dialog_native .......... Passed 13.24 sec 100% tests passed, 0 tests failed out of 2 ``` - **Negative control**: with `core/libs/prx/libSceMsgDialog.native/Export.cpp`, `core/libs/prx/libSceMsgDialog.native/libSceMsgDialog.native.hpp`, `core/libs/prx/libSceMsgDialog/Export.cpp`, `core/libs/prx/libSceMsgDialog/include/Api.hpp` reverted to `main`, the new tests do not build/link without the change; restoring it makes them build and pass. - **Code reading**: - Verified pointer safety and error code ordering in core/libs/prx/libSceMsgDialog.native/Result.cpp: sceMsgDialogGetResult validates uninitialized status (0x80B80003), null pointer (0x80B8000D), and non-finished status (0x80B80005), and safely traps unwritable destination buffers via GuestCopyOut_nid_no_patch. - Verified buffer zero-initialization in core/libs/prx/libSceMsgDialog.native/Result.cpp: MsgDialogResult value{} value-initializes mode (0), result (0), and the 32 reserved bytes to zero before assigning button_id, matching Orbis OS expectations. - Verified thread safety in core/libs/prx/libSceMsgDialog/Export.cpp: MsgDialogResultStatus locks g_lock to read g_buttonId and g_status without calling Poll(), ensuring result queries do not prematurely advance headless dialog status. - Verified state handling in core/libs/prx/libSceMsgDialog.native/Export.cpp: MsgDialogResultStatus delegates to Status() and loads atomic g_buttonId, preserving the native module's polling and button resolution semantics. - Verified build and runtime link properties in core/libs/prx/libSceMsgDialog/CMakeLists.txt: linked libc for GuestCopyOut_nid_no_patch and prepended libc directory to PATH in guest_msg_dialog test properties on Windows. - Verified comprehensive test coverage in core/libs/tests/GuestMsgDialog.cpp: Results() exercises pre-init error, pre-dialog error, null and invalid (0x10) pointer errors, non-advancing status polls during dialog execution, verified result struct members, and modal UI button selections. - Verified AGENTS.md rules across all modified files: zero comments in code, technical debt accurately recorded in docs/dev/debt/libSceMsgDialog.md and docs/dev/debt/libSceMsgDialog.native.md, and single shared declaration placed in Api.hpp. - Note: the AI-assisted checkbox can stay. Looks Good To Me
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!18207
No description provided.