Repository navigation
fix(libSceVideoOut): validate open parameters and resolution status outputs - #14106
slopgobblercobbler wants to merge 1 commit into
Conversation
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — changes requested
The parameter-validation paths look consistent with the stated measurements, but the new null-attribute behavior is unmeasured and contradicts the repository rule for unknown behavior.
What I ran
Reviewed head f26371a44f658eea16d5e2382e39d05d98b863e4 against base e30f38577c79f16747eee745a145ff6b37a2dede; both PR-specific merge previews were clean. Environment: Debian Linux x86_64, Python 3.11.2, GCC 12.2.0 (c++). No build or C++ tests were run.
git diff --check e30f38577c79f16747eee745a145ff6b37a2dede...f26371a44f658eea16d5e2382e39d05d98b863e4
python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 14106Results
| Check | Result |
|---|---|
| Diff check | Passed; no whitespace errors. |
| Conventions and PR template | Passed. |
| Dependency and mergeability preview | Passed; #14106 and its declared dependencies preview cleanly against current main. |
| ABI audit and test-quality helper | Could not execute in the isolated PR worktree: these local-only helper scripts are not part of the PR checkout. This is not a product failure. |
| C++ tests/build | Not run; initial review is no-build. |
| Hosted CI | Pending at the final snapshot; no job result is claimed. |
Unedited precheck output
All conventions checks passed.
Findings
Blocking
sceVideoOutSetBufferAttributeandsceVideoOutSetBufferAttribute2now return successfully for null pointers (Buffer.cpp at the reviewed head, second helper). The debt entry calls this behavior unmeasured, while the repository instructs that unknown general behavior must throw and be recorded (AGENTS.md at the reviewed base). The test only invokes these void functions with null and does not establish what the console does. Please keep the throw until console behavior is measured, or add pinned measurement evidence and a regression assertion for the measured behavior.
Non-blocking
None found in the inspected diff.
Not verified
The C++ tests, build, console behavior, and pending hosted CI were not verified locally.
To get this to a good state
Either restore the throw for these unmeasured null cases or provide reproducible console evidence and test the measured result; I will rerun the same checks on the updated head.
|
@slopgobblercobbler thanks, turning the
|
f26371a to
cff4acf
Compare
|
Thank you @MarcZX10 and @oneandonlydean for the review and guidance! I have addressed the feedback and rebased on \upstream/main\ in commit \cff4acf301:
|
✅ NVIDIA GPU test: passedPR head
Failing on main too (2, not counted against this PR)Validation IDs already present on main (5 IDs in 360 tests)ReproduceAutomated build and test on a contributor's NVIDIA machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs. |
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — changes requested
The null-attribute throws are restored as requested, but sceVideoOutOpen and sceVideoOutGetResolutionStatus now return error codes for cases the debt file does not record as measured, which AGENTS.md says must throw and be recorded.
What I ran
- Head
cff4acf301ba1f7a352eec62a4852499d017b3af(the single rebased commit). Base for the precheck:59bd3b677d67cb5cfdb4a0092ffe644d27cf1a56. The live stack check reports the PR as mergeable, and GitHub reports the merge state as clean. - No build, configure or compile.
python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 14106 --output-dir /dev/shm/reviewer-run-20261101-14106
python3 tools/pr_abi_audit.py --repo . --base 59bd3b677d67cb5cfdb4a0092ffe644d27cf1a56 --head cff4acf301ba1f7a352eec62a4852499d017b3af --json
git archive cff4acf301ba1f7a352eec62a4852499d017b3af core/libs | tar -x -C <scratch dir>
python3 -I tools/pr_test_quality.py --root <scratch dir> --json core/libs/tests/GuestVideoOutOutputMode.cpp core/libs/tests/GuestVideoOutResolutionStatus.cpp
git show 59bd3b677d67cb5cfdb4a0092ffe644d27cf1a56:core/libs/prx/libSceVideoOut/src/Output.cpp
git show cff4acf301ba1f7a352eec62a4852499d017b3af:docs/dev/debt/libSceVideoOut.mdThe precheck's ABI and test-quality helpers failed because the head tree has no tools/ directory, so both were run by hand as listed above.
Results
| Check | Result |
|---|---|
| Diff check | Passed (precheck) |
| Conventions and PR template | Passed (precheck) |
| Live dependency and mergeability | Passed (precheck) |
| ABI audit (manual) | Passed. The PR changes no exports; the audit covered 10 symbols with 0 findings |
| Test-quality heuristic (manual) | Two possible-unregistered-cpp-test findings, both false positives: guest_video_out_output_mode_tests and guest_video_out_resolution_status_tests are registered in core/libs/prx/libSceVideoOut/CMakeLists.txt lines 253 and 240 |
Hosted CI at cff4acf301 |
Success: conventions, eligibility, library-portability, labels, report, windows. Skipped: linux, relinker, relinker-asan, write-watch, register-context |
| Build and C++ tests | Not run (no-build rule) |
Test-quality heuristic, unedited output (manual)
{
"findings": [
{
"path": "core/libs/tests/GuestVideoOutOutputMode.cpp",
"line": 1,
"kind": "possible-unregistered-cpp-test",
"message": "Changed C++ test source path was not found literally in CMake files; inspect registration, generated source lists, and workflow coverage."
},
{
"path": "core/libs/tests/GuestVideoOutResolutionStatus.cpp",
"line": 1,
"kind": "possible-unregistered-cpp-test",
"message": "Changed C++ test source path was not found literally in CMake files; inspect registration, generated source lists, and workflow coverage."
}
],
"negative_control_candidates": [],
"limits": [
"Heuristics can miss weak assertions and can flag valid tests; inspect every finding.",
"A test that passes against base is not by itself proof that the PR test is inadequate.",
"Negative controls are only candidates until the test actually runs against base and fails by assertion rather than import/setup error."
]
}
Findings
Blocking
sceVideoOutOpennow returns instead of throwing for unmeasured inputs. At head, an unknownuserId,busTypeorindex(Output.cpplines 95-103) and every open-param check invalidateOpenParam(lines 67-89) returnVIDEO_OUT_ERROR_INVALID_VALUE. Onmainthese paths threwstd::runtime_error(Output.cppin59bd3b677d). The debt entry (docs/dev/debt/libSceVideoOut.mdline 25) gives the return codes but cites no measurement, and it says that whether invalid parameters continue past offset 24 is unknown. AGENTS.md says that when general behaviour is unknown the code must throw and the gap goes in the debt file. Please restore the throws for these cases, or cite a measurement for each return code and pin it in a test.sceVideoOutGetResolutionStatusreturns codes for a null output and an invalid handle, with no source. At head, a null output on an open handle returns0x80290002(line 223) and an invalid handle returns0x8029000B(line 225). The debt entry (line 23) says these were confirmed on a PS5 at firmware 13.40, but unlike the other measurement claims in that file it has no link or capture. Please either link the measurement record for these codes, or restore the throws until it is linked.
Non-blocking
- The null-attribute throws in
sceVideoOutSetBufferAttributeandsceVideoOutSetBufferAttribute2are restored, and their debt entry is removed. This addresses the request in my earlier review of this PR. - The new assertions in
GuestVideoOutResolutionStatus.cpppin the new codes. Whichever way item 2 is resolved, those assertions should follow the decision.
Sources
Permalinks, pinned to commits:
mainbefore this PR,sceVideoOutOpenand its checks threw:AnyPS5/core/libs/prx/libSceVideoOut/src/Output.cpp
Lines 72 to 100 in 59bd3b6
- Head, the same checks now return:
AnyPS5/core/libs/prx/libSceVideoOut/src/Output.cpp
Lines 67 to 103 in cff4acf
- Head,
sceVideoOutGetResolutionStatusreturns for a null output and an invalid handle:AnyPS5/core/libs/prx/libSceVideoOut/src/Output.cpp
Lines 217 to 225 in cff4acf
- Head, the debt entries for both functions:
AnyPS5/docs/dev/debt/libSceVideoOut.md
Lines 23 to 25 in cff4acf
- Rule that unknown behaviour throws and is recorded in the debt file,
AGENTS.md:Line 7 in 59bd3b6
Not verified
- No build and no C++ test run at
cff4acf301. The newGuestVideoOutOutputModeandGuestVideoOutResolutionStatusassertions were not run. - The PS5 measurement described in the debt entry was not checked, because no link or capture is given.
- The ABI audit is lexical and was not confirmed by a compiler or the build.
- Linux and relinker jobs are skipped on this head; the Windows job is the only product-side hosted result.
To get this to a good state
Restore the throws for the unmeasured sceVideoOutOpen and null-output cases, or add the measurement links and keep the returns with the debt text updated to match. I will rerun the same checks on the updated head.
cff4acf to
0a14584
Compare
✅ NVIDIA GPU test: passedPR head
Unstable on main (1, these also failed in recent main runs on this machine; not counted against this PR)Failing on main too (2, not counted against this PR)Validation IDs already present on main (5 IDs in 368 tests)ReproduceAutomated build and test on a contributor's NVIDIA machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs. |
adriadam10
left a comment
There was a problem hiding this comment.
Thanks for the updates; the test coverage of each validateOpenParam branch and the restored debt evidence look good. Two points from the earlier review are still open (same as @MarcZX10's last review):
sceVideoOutOpen(Output.cpp:112-142): onmainthese cases threw because the console's answer isn't known. The debt entry now statesVIDEO_OUT_ERROR_INVALID_VALUEbut cites no measurement for the invalid userId, bus type, bus index or open-param cases, and the references we checked (KytyPS5, shadPS4) don't establish them. Either link a console measurement for each case (title/firmware/capture) and keep the returns, or restore the throws and record the gap indocs/dev/debt/libSceVideoOut.md.sceVideoOutGetResolutionStatus(Output.cpp:276-283): the debt entry says a null output on an open handle returning0x80290002was confirmed on a PS5 (13.40), but gives no link or capture; only0x8029000Bfor handles 0-8 was measured before. Please link the record for the null-output case, or keep the throw for it. The0x8029000Bpath is fine as is, and the test assertions should follow whichever way this goes.
|
Reproduce ( Not covered here: a title, Linux and macOS. AI-assisted: yes. Claude Code ran the builds and tests and drafted this comment; a separate review agent checked it. The numbers are from the runs on this machine, except the hosted job's and the bot's, which are from their logs. |
|
@slopgobblercobbler I reviewed 0a14584. The accepted inputs are unchanged and the earlier test and provenance gaps are fixed, but two things still block it.
Also, the debt entry calls the null output on an open handle returning 0x80290002 "confirmed on PS5 13.40", but links no capture. Please link it. |
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — looks good
The review covers the four changed files at head 0a145847d4a3a3c2f2dbd3753a8f5f6e7814b30c; no checks were run, and no concrete blocking defect was verified.
What I ran
- Read the prepared description, commit summary, manifest and diff for the exact head above.
- Read all changed files listed in the manifest. Read targeted function and test context through
repo_read.py; no build, tests or other checks were run.
Results
| Check | Result | Note |
|---|---|---|
| Changed-file review | passed | All four changed files were read |
| Build and tests | not run | No commands were run |
| Console behavior | not run | Hardware measurements were not confirmed |
Findings
Blocking
None verified.
Non-blocking
None.
Not verified
Build and test results reported in the PR description were not independently confirmed. Console measurements and behavior were not independently confirmed. No files were excluded: all four files marked reviewed in manifest.json were read; files.json was not inspected.
To get this to a good state
Nothing is required.
0a14584 to
f478ad1
Compare
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — changes requested
Changes are required before merge: restore the null-attribute behavior described in the PR, or remove that claim from the scope if it was not intended for this change.
What I ran
Reviewed head f478ad158b80fa1fc6a5a76b4a741c03cd364b7f from the prepared diff and pinned repository source using repo_read.py. No commands or tests were run.
Results
| Check | Result | Note |
|---|---|---|
| Diff and changed files | passed | Four files included and read |
| Tests | not run | No test commands run |
| Reader context | passed | Targeted source ranges read |
Findings
Blocking
- The PR description says
sceVideoOutSetBufferAttributeandsceVideoOutSetBufferAttribute2now return early on null pointers without modifying memory, but the prepared manifest and diff contain noBuffer.cppchange. At this head, both functions still throw on null (Buffer.cpp:127-130,191-194), so the stated behavior is not implemented. Add the guards and suitable coverage, or revise the scope if these changes were not intended. The changed-line citation for the scope mismatch isdocs/dev/debt/libSceVideoOut.md:37, which documents the changedsceVideoOutOpenbehavior; no changed line forBuffer.cppexists in the supplied diff.
Non-blocking
- None.
Sources
- Output.cpp at reviewed head
- Buffer.cpp at reviewed head
- GuestVideoOutOutputMode.cpp at reviewed head
- GuestVideoOutResolutionStatus.cpp at reviewed head
- libSceVideoOut.md at reviewed head
Not verified
- Tests and builds were not run.
files.jsonwas not accessible through the reader; manifest lists four included changed files, all of which were read. The changed-file manifest and diff do not includeBuffer.cpp.- Console behavior beyond the measurements recorded in the repository was not independently verified.
To get this to a good state
Implement and test the null attribute handling described in the PR, or update the PR description and related claims to match the intended scope. Rerun the relevant tests on the updated head.
|
Rebased onto latest
|
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — looks good
The changed resolution status path now returns the invalid handle code for unopened or closed handles, and its null-pointer behavior remains the documented unmeasured exception.
What I ran
Reviewed head 9e98beb1e424264373e0ccbbb4b9b3a02c7a703a using repo_read.py. No tests or prechecks were run; no merged-preview check was performed.
Results
| Check | Result | Note |
|---|---|---|
| Source review | passed | Both changed files read |
| Tests and precheck | not run | Only author-reported in description |
| Merged preview | not run | No merge check performed |
Findings
Blocking
None.
Non-blocking
None.
Not verified
The unit tests and conventions check reported in the PR description were not run during this review. No hardware or console measurements were performed. The review bundle’s files.json was unavailable; the manifest lists both changed files as included, and both full source files were read.
To get this to a good state
Nothing is required.
|
Tested head Setup: Windows 11 Pro 10.0.26200, Ryzen 7 9800X3D, WinLibs GCC 15.2.0 r7, Release,
Whole batch: the full This is one combined tree, not a run of this PR alone. AI-assisted: yes (Claude Code) |
ligmaSec
left a comment
There was a problem hiding this comment.
The trial merge onto c1601e56d5 was clean. HasConfig, IsOpen, and GetConfig acquire and release the driver lock separately, and IsOpen itself calls the throwing GetConfig. A close between the checks can therefore still throw the invalid-handle error this change is meant to return. Please use one lookup that returns the live configuration or the guest error, then check closing under its mutex before filling the output. The current fixture checks handles before and after close sequentially. Paired display-backed controls are pending.
AI-assisted: yes.
What
core/libs/prx/libSceVideoOut/src/Output.cpp, returnVIDEO_OUT_ERROR_INVALID_HANDLEfromsceVideoOutGetResolutionStatusfor unopened or closed handles matching console measurements, while retaining an exception for null status output pointers as unmeasured.core/libs/tests/GuestVideoOutResolutionStatus.cpp, assertVIDEO_OUT_ERROR_INVALID_HANDLEfor unopened and closed handles, and verify null status output pointers reject with an exception.Tested
core/libs/tests/GuestVideoOutResolutionStatus.cppverifyVIDEO_OUT_ERROR_INVALID_HANDLEon unopened and closed handles and exception rejection on null status pointers.python tools/check_conventions.py --base upstream/main --head HEAD: 0 findings.Checklist
NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file