feat(libcairo): implement eleven owned path-data and current-point exports #15324

Merged
hyvvs merged 36 commits from upstream-pr/15324 into main 2026-11-10 04:24:15 +00:00
hyvvs commented 2026-11-02 23:58:47 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by hyvvs on 2026-11-02T23:58:47Z.


What

Implement 11 Cairo path-data lifecycle/current-point exports, guest-visible owned path ABI, fixed-point quantization and error propagation. Merge after #15317, not a renderer.

Tested

Windows MinGW C++20 -DNDEBUG DLL-linked guest path PASS (2,048 loops); Ubuntu WSL -DNDEBUG ASan+UBSan/leak check PASS; 1,024 randomized native Cairo1.18 path sequences PASS; headers/progress/conventions PASS. Full integrated CMake/CTest and PS5 console not tested.

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: #15317 (with upstream dependencies #15315/#14327/#14328/#14329)
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes

Detailed implementation and verification notes

Summary

Implement eleven additional real Cairo path-data exports: cairo_new_path, new_sub_path, move_to, line_to, curve_to, close_path, has_current_point, get_current_point, copy_path, append_path and path_destroy.

This is device-space 24.8 fixed-grid path storage, with Cairo-compatible move/line/cubic/close records, current/subpath points, real guest-visible CairoPath/CairoPathData layout and owned arrays. cairo_copy_path converts device points through the current inverse CTM; cairo_append_path applies the destination CTM. cairo_save/restore does not rewind the path.

Independent native Cairo 1.18.0 review identified and prompted fixes for nonfinite/saturated fixed-point conversion, redundant line/degenerate cubic canonicalization, extended path record lengths, propagation of incoming error path status and get_current_point on errored contexts. These are now covered by focused guest regression tests.

Verification

  • Windows MinGW GCC C++20 -O2 -Wall -Wextra -Werror -pedantic: compiled actual DLL/import library with linked SysV ABI guest test PASS (2,048 context/path loops and path ownership).
  • Ubuntu WSL GCC ASan+UBSan with leak checking: focused linked guest test PASS.
  • Native Cairo 1.18.0 differential: 1,024 randomized path construction, current-point, copy/append, CTM and save/restore sequences PASS.
  • Public declaration/header audit 405 libraries / 27,906 exports PASS; 59 progress tests PASS (one skipped); strict conventions PASS; git diff --check PASS.
  • Full stacked Cairo scanner 61/161 -> 72/161, exactly +11 new named exports.

Dependency order

#14327 (surfaces) -> #15315 (context/CTM) -> #15317 (graphics state) -> this PR (path data); #14258 matrix has already merged. This branch includes ancestor commits; refresh review/merge base after parents land. Existing #14328/#14329 Cairo font options/regions and another contributor's #15208 gradient patterns share Export/inventory/CMake/debt and may need coordinated merge, but no path exports are duplicated.

Actual rendering, fill/stroke, clipping, arc/rectangle, path extents, and firmware hardware differential remain unimplemented. No claim of a finished Cairo rasterizer or upstream coverage before merge.

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5129391018 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/15324). Originally posted by [hyvvs](https://github.com/hyvvs) on 2026-11-02T23:58:47Z. --- ### What Implement 11 Cairo path-data lifecycle/current-point exports, guest-visible owned path ABI, fixed-point quantization and error propagation. Merge after #15317, not a renderer. ### Tested Windows MinGW C++20 -DNDEBUG DLL-linked guest path PASS (2,048 loops); Ubuntu WSL -DNDEBUG ASan+UBSan/leak check PASS; 1,024 randomized native Cairo1.18 path sequences PASS; headers/progress/conventions PASS. Full integrated CMake/CTest and PS5 console not 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. --> ### 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: #15317 (with upstream dependencies #15315/#14327/#14328/#14329) - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes ### Detailed implementation and verification notes ## Summary Implement eleven additional real Cairo path-data exports: cairo_new_path, new_sub_path, move_to, line_to, curve_to, close_path, has_current_point, get_current_point, copy_path, append_path and path_destroy. This is device-space 24.8 fixed-grid path storage, with Cairo-compatible move/line/cubic/close records, current/subpath points, real guest-visible CairoPath/CairoPathData layout and owned arrays. cairo_copy_path converts device points through the current inverse CTM; cairo_append_path applies the destination CTM. cairo_save/restore does not rewind the path. Independent native Cairo 1.18.0 review identified and prompted fixes for nonfinite/saturated fixed-point conversion, redundant line/degenerate cubic canonicalization, extended path record lengths, propagation of incoming error path status and get_current_point on errored contexts. These are now covered by focused guest regression tests. ## Verification - Windows MinGW GCC C++20 -O2 -Wall -Wextra -Werror -pedantic: compiled actual DLL/import library with linked SysV ABI guest test PASS (2,048 context/path loops and path ownership). - Ubuntu WSL GCC ASan+UBSan with leak checking: focused linked guest test PASS. - Native Cairo 1.18.0 differential: 1,024 randomized path construction, current-point, copy/append, CTM and save/restore sequences PASS. - Public declaration/header audit 405 libraries / 27,906 exports PASS; 59 progress tests PASS (one skipped); strict conventions PASS; git diff --check PASS. - Full stacked Cairo scanner 61/161 -> 72/161, **exactly +11 new named exports**. ## Dependency order **#14327 (surfaces) -> #15315 (context/CTM) -> #15317 (graphics state) -> this PR (path data)**; #14258 matrix has already merged. This branch includes ancestor commits; refresh review/merge base after parents land. Existing #14328/#14329 Cairo font options/regions and another contributor's #15208 gradient patterns share Export/inventory/CMake/debt and may need coordinated merge, but no path exports are duplicated. Actual rendering, fill/stroke, clipping, arc/rectangle, path extents, and firmware hardware differential remain unimplemented. No claim of a finished Cairo rasterizer or upstream coverage before merge.
MarcZX10 commented 2026-11-03 01:17:55 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-03T01:17:55Z.

Review: CHANGES_REQUESTED


Reviewed — changes requested

The exact-head review confirms two Cairo path-behavior mismatches: device scaling is omitted from path/current-point conversions, and consecutive forward-collinear lines are not coalesced.

What I ran

Reviewed all 14 changed files at head 6c786800814b5d4cc2e07c65e5e3554069d5f367 against PR base 5cb015caaaaf83f8ee431414ee6a457b5b307d49. The exact-head preview against current main (7feb37ee3e30e10139b483fb4df689d5b5b69ab8) is clean. Environment: Debian Linux x86_64, Python 3.11.2, GCC 12.2.0; native Cairo runtime 1.16.0. No AnyPS5 build was run.

git diff --check 5cb015caaaaf83f8ee431414ee6a457b5b307d49...6c786800814b5d4cc2e07c65e5e3554069d5f367
python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 15324
python3 tools/pr_abi_audit.py --base 5cb015caaaaf83f8ee431414ee6a457b5b307d49 --head 6c786800814b5d4cc2e07c65e5e3554069d5f367 --json
python3 tools/pr_test_quality.py --root /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-15324-6c786800814b/head-6c786800814b-823ae383 --json core/libs/prx/libcairo/Context.cpp core/libs/tests/GuestCairoContext.cpp core/libs/tests/GuestCairoGraphicsState.cpp core/libs/tests/GuestCairoPath.cpp core/libs/tests/GuestCairoSurface.cpp
python3 tools/pr_overlap.py --branch refs/review/15324/20261103-current --repo boykopovar/AnyPS5 --base main --jobs 6
python3 /tmp/15324-native-cairo-check.py
gh pr checks 15324 --repo boykopovar/AnyPS5

Results

Check Result Note
Diff, conventions and PR template passed No diff errors; conventions and required template passed.
Current-main stack preview passed Clean; declared Cairo dependency order remains.
Export ABI audit passed Zero lexical findings; this does not prove binary ABI or runtime version tables.
Test-quality heuristic failed It flagged four test paths; explicit CMake registration makes these false positives.
PR overlap helper failed GitHub response contained invalid JSON escaping; no overlap conclusion from this helper.
Isolated precheck helper coverage failed Two workspace-only scripts are absent from the snapshot.
Native Cairo behavior checks passed Cairo 1.16.0 reproduced the device-scale and line-coalescing results below.
Hosted required checks not run Conventions, eligibility, portability and report checks were pending.
AnyPS5 build, CTest and console tests not run No local build or PS5 environment.
Commands and unedited output
conventions_and_pr_template — stdout
All conventions checks passed.
live_dependency_and_mergeability_check — stack report
Target branch tip: `7feb37ee3e30e10139b483fb4df689d5b5b69ab8`
All heads unchanged: **True**
Dependency order: #14258 → #14327 → #14328 → #14329 → #15315 → #15317 → #15324
- PR #15324: **clean** against current base; head `6c786800814b5d4cc2e07c65e5e3554069d5f367`
ABI findings: 0
ABI limitations: This lexical audit does not parse C++ fully, prove calling-convention or binary ABI correctness, verify runtime version tables, or replace compilation.; An absent source declaration or explicit alias can be intentional for assembly exports, conditional platform code, or generated interfaces; inspect findings before treating them as defects.
pr_overlap: Invalid \\uXXXX escape: line 1 column 1827862 (char 1827861)
$ pkg-config --modversion cairo
1.16.0
$ python3 /tmp/15324-native-cairo-check.py
scale2 path: 0.099609375 0.099609375
scale2 current: 0.099609375 0.099609375
collinear forward: num_data=4, elements=[('M', 0.0, 0.0), ('L', 2.0, 2.0)]
degenerate then line: num_data=4, elements=[('M', 0.0, 0.0), ('L', 1.0, 1.0)]
$ gh pr checks 15324 --repo boykopovar/AnyPS5
conventions	pending	0	https://github.com/boykopovar/AnyPS5/actions/runs/41557515130/job/125659945079
eligibility	pending	0	https://github.com/boykopovar/AnyPS5/actions/runs/41557518069/job/125659906944
library-portability	pending	0	https://github.com/boykopovar/AnyPS5/actions/runs/41557518039/job/125659903538
report	pending	0	https://github.com/boykopovar/AnyPS5/actions/runs/41557518098/job/125659903838

The precheck's ABI and test-quality helper invocations failed because those optional scripts are absent from its isolated snapshot. I ran the ABI audit and test-quality heuristic from the workspace separately; I manually checked the reported test registration flags against the PR's CMake entries.

Negative control

Assertion Change to code under test Did the new test fail?
Device-scaled coordinates and normalized line elements match Cairo output. No PR-code mutation; the AnyPS5 tests require a project build. Not run.

The native Cairo runtime calls are reference-behavior checks, not negative controls for the PR implementation.

Findings

Blocking

  1. Target device transform is omitted. The PR's DevicePoint applies only state->matrix, while cairo_surface_set_device_scale stores a separate scale on the target. cairo_get_current_point and cairo_copy_path invert only the context matrix as well. With identity CTM, scale 2 and move_to(0.1, 0.1), native Cairo returns 0.099609375 from both APIs; the PR's current conversion rounds 0.1 directly to 0.1015625. Apply the target device transform consistently when recording points and its inverse when returning/copying/appending them, or reject non-default device transforms until supported. Add a non-unit-scale regression test.
  2. Line simplification differs from Cairo. AppendLine adds a second line for move_to(0,0); line_to(1,1); line_to(2,2), while Cairo stores only M(0,0), L(2,2). It also retains a degenerate first line for move_to(0,0); line_to(0,0); line_to(1,1), while Cairo replaces it with M(0,0), L(1,1). Implement and test Cairo's forward-collinear merge and degenerate-line replacement rules. If either behavior remains intentionally unsupported, state that gap in the libcairo debt entry; it is not currently recorded there.

Non-blocking

The PR is stacked after #14327, #14328, #14329, #15315 and #15317. The current-main preview is clean; preserve that landing order and revisit integration when the dependency heads settle.

Sources

Not verified

I did not build AnyPS5, run its CTest suites, test on other host operating systems, or test console behavior. I did not run Cairo 1.18.6 locally; its pinned implementation source was read, and the runtime reproduction used installed Cairo 1.16.0. The PR's hosted checks were pending. GPU/console behavior is not relevant to this CPU-side Cairo change.

To get this to a good state

Address both path mismatches with regression coverage, or explicitly record the intentionally unsupported behavior in the debt entry. After the next head, I will rerun the exact-head precheck, diff/convention and ABI audits, the focused Cairo tests when an applicable built test environment is available, and the hosted-check refresh.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5745790788 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/15324#pullrequestreview-5745790788). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-03T01:17:55Z. **Review:** CHANGES_REQUESTED --- # Reviewed — changes requested The exact-head review confirms two Cairo path-behavior mismatches: device scaling is omitted from path/current-point conversions, and consecutive forward-collinear lines are not coalesced. ## What I ran Reviewed all 14 changed files at head `6c786800814b5d4cc2e07c65e5e3554069d5f367` against PR base `5cb015caaaaf83f8ee431414ee6a457b5b307d49`. The exact-head preview against current `main` (`7feb37ee3e30e10139b483fb4df689d5b5b69ab8`) is clean. Environment: Debian Linux x86_64, Python 3.11.2, GCC 12.2.0; native Cairo runtime 1.16.0. No AnyPS5 build was run. ```sh git diff --check 5cb015caaaaf83f8ee431414ee6a457b5b307d49...6c786800814b5d4cc2e07c65e5e3554069d5f367 python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 15324 python3 tools/pr_abi_audit.py --base 5cb015caaaaf83f8ee431414ee6a457b5b307d49 --head 6c786800814b5d4cc2e07c65e5e3554069d5f367 --json python3 tools/pr_test_quality.py --root /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-15324-6c786800814b/head-6c786800814b-823ae383 --json core/libs/prx/libcairo/Context.cpp core/libs/tests/GuestCairoContext.cpp core/libs/tests/GuestCairoGraphicsState.cpp core/libs/tests/GuestCairoPath.cpp core/libs/tests/GuestCairoSurface.cpp python3 tools/pr_overlap.py --branch refs/review/15324/20261103-current --repo boykopovar/AnyPS5 --base main --jobs 6 python3 /tmp/15324-native-cairo-check.py gh pr checks 15324 --repo boykopovar/AnyPS5 ``` ## Results | Check | Result | Note | |---|---|---| | Diff, conventions and PR template | passed | No diff errors; conventions and required template passed. | | Current-main stack preview | passed | Clean; declared Cairo dependency order remains. | | Export ABI audit | passed | Zero lexical findings; this does not prove binary ABI or runtime version tables. | | Test-quality heuristic | failed | It flagged four test paths; explicit CMake registration makes these false positives. | | PR overlap helper | failed | GitHub response contained invalid JSON escaping; no overlap conclusion from this helper. | | Isolated precheck helper coverage | failed | Two workspace-only scripts are absent from the snapshot. | | Native Cairo behavior checks | passed | Cairo 1.16.0 reproduced the device-scale and line-coalescing results below. | | Hosted required checks | not run | Conventions, eligibility, portability and report checks were pending. | | AnyPS5 build, CTest and console tests | not run | No local build or PS5 environment. | <details><summary>Commands and unedited output</summary> ```text conventions_and_pr_template — stdout All conventions checks passed. ``` ```text live_dependency_and_mergeability_check — stack report Target branch tip: `7feb37ee3e30e10139b483fb4df689d5b5b69ab8` All heads unchanged: **True** Dependency order: #14258 → #14327 → #14328 → #14329 → #15315 → #15317 → #15324 - PR #15324: **clean** against current base; head `6c786800814b5d4cc2e07c65e5e3554069d5f367` ``` ```text ABI findings: 0 ABI limitations: This lexical audit does not parse C++ fully, prove calling-convention or binary ABI correctness, verify runtime version tables, or replace compilation.; An absent source declaration or explicit alias can be intentional for assembly exports, conditional platform code, or generated interfaces; inspect findings before treating them as defects. ``` ```text pr_overlap: Invalid \\uXXXX escape: line 1 column 1827862 (char 1827861) ``` ```text $ pkg-config --modversion cairo 1.16.0 $ python3 /tmp/15324-native-cairo-check.py scale2 path: 0.099609375 0.099609375 scale2 current: 0.099609375 0.099609375 collinear forward: num_data=4, elements=[('M', 0.0, 0.0), ('L', 2.0, 2.0)] degenerate then line: num_data=4, elements=[('M', 0.0, 0.0), ('L', 1.0, 1.0)] ``` ```text $ gh pr checks 15324 --repo boykopovar/AnyPS5 conventions pending 0 https://github.com/boykopovar/AnyPS5/actions/runs/41557515130/job/125659945079 eligibility pending 0 https://github.com/boykopovar/AnyPS5/actions/runs/41557518069/job/125659906944 library-portability pending 0 https://github.com/boykopovar/AnyPS5/actions/runs/41557518039/job/125659903538 report pending 0 https://github.com/boykopovar/AnyPS5/actions/runs/41557518098/job/125659903838 ``` The precheck's ABI and test-quality helper invocations failed because those optional scripts are absent from its isolated snapshot. I ran the ABI audit and test-quality heuristic from the workspace separately; I manually checked the reported test registration flags against the PR's CMake entries. </details> ## Negative control | Assertion | Change to code under test | Did the new test fail? | |---|---|---| | Device-scaled coordinates and normalized line elements match Cairo output. | No PR-code mutation; the AnyPS5 tests require a project build. | Not run. | The native Cairo runtime calls are reference-behavior checks, not negative controls for the PR implementation. ## Findings ### Blocking 1. **Target device transform is omitted.** The PR's `DevicePoint` applies only `state->matrix`, while `cairo_surface_set_device_scale` stores a separate scale on the target. `cairo_get_current_point` and `cairo_copy_path` invert only the context matrix as well. With identity CTM, scale 2 and `move_to(0.1, 0.1)`, native Cairo returns `0.099609375` from both APIs; the PR's current conversion rounds `0.1` directly to `0.1015625`. Apply the target device transform consistently when recording points and its inverse when returning/copying/appending them, or reject non-default device transforms until supported. Add a non-unit-scale regression test. 2. **Line simplification differs from Cairo.** `AppendLine` adds a second line for `move_to(0,0); line_to(1,1); line_to(2,2)`, while Cairo stores only `M(0,0), L(2,2)`. It also retains a degenerate first line for `move_to(0,0); line_to(0,0); line_to(1,1)`, while Cairo replaces it with `M(0,0), L(1,1)`. Implement and test Cairo's forward-collinear merge and degenerate-line replacement rules. If either behavior remains intentionally unsupported, state that gap in the libcairo debt entry; it is not currently recorded there. ### Non-blocking The PR is stacked after #14327, #14328, #14329, #15315 and #15317. The current-main preview is clean; preserve that landing order and revisit integration when the dependency heads settle. ## Sources - [PR path conversion and rounding at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/6c786800814b5d4cc2e07c65e5e3554069d5f367/core/libs/prx/libcairo/Context.cpp#L144-L148) - [Target scale stored separately at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/6c786800814b5d4cc2e07c65e5e3554069d5f367/core/libs/prx/libcairo/Surface.cpp#L250-L259) - [Current-point and copied-path inverse conversion at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/6c786800814b5d4cc2e07c65e5e3554069d5f367/core/libs/prx/libcairo/Context.cpp#L531-L579) - [Line append behavior at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/6c786800814b5d4cc2e07c65e5e3554069d5f367/core/libs/prx/libcairo/Context.cpp#L164-L186) - [Cairo 1.18.6 user/backend transforms](https://gitlab.freedesktop.org/cairo/cairo/-/blob/018b3424a10ecd37450360f21454ecf0f3007e17/src/cairo-gstate.c#L832-L850) - [Cairo 1.18.6 device-scale behavior](https://gitlab.freedesktop.org/cairo/cairo/-/blob/018b3424a10ecd37450360f21454ecf0f3007e17/src/cairo-surface.c#L1773-L1822) - [Cairo 1.18.6 degenerate and forward-collinear line handling](https://gitlab.freedesktop.org/cairo/cairo/-/blob/018b3424a10ecd37450360f21454ecf0f3007e17/src/cairo-path-fixed.c#L493-L529) - [Current libcairo path-debt entry](https://github.com/boykopovar/AnyPS5/blob/6c786800814b5d4cc2e07c65e5e3554069d5f367/docs/dev/debt/libcairo.md#L17) ## Not verified I did not build AnyPS5, run its CTest suites, test on other host operating systems, or test console behavior. I did not run Cairo 1.18.6 locally; its pinned implementation source was read, and the runtime reproduction used installed Cairo 1.16.0. The PR's hosted checks were pending. GPU/console behavior is not relevant to this CPU-side Cairo change. ## To get this to a good state Address both path mismatches with regression coverage, or explicitly record the intentionally unsupported behavior in the debt entry. After the next head, I will rerun the exact-head precheck, diff/convention and ABI audits, the focused Cairo tests when an applicable built test environment is available, and the hosted-check refresh.
MarcZX10 commented 2026-11-03 06:23:42 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-03T06:23:42Z.

Review: CHANGES_REQUESTED


Re-checked — new head, changes requested

The two earlier path-behavior findings are addressed, but the exact-head Windows CTest run still fails at startup in the new guest_cairo_surface target.

What I ran

The open PR is at head 35a1879fab9e1ff9ebc3c9e3cfb57075b6ab41a7 against PR base 5cb015caaaaf83f8ee431414ee6a457b5b307d49. My previous full review read all 14 changed files at 6c786800814b5d4cc2e07c65e5e3554069d5f367; this re-check compared that head with the current one and inspected all six files changed since then, including the path-scale/canonicalization changes and their tests. A fresh stack preview against current main d1ae628bc2f62459cce1e9872ba5632c938c71f2 is clean. Environment: Debian Linux 6.1 x86_64, Python 3.11.2, Git 2.39.5 and GCC 12.2.0; no local AnyPS5 build was run.

python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 15324 --output-dir /tmp/anyps5-pr-precheck/15324-session-20261103
python3 tools/pr_abi_audit.py --repo /marc/AnyPS5 --base 5cb015caaaaf83f8ee431414ee6a457b5b307d49 --head 35a1879fab9e1ff9ebc3c9e3cfb57075b6ab41a7 --json
python3 tools/pr_test_quality.py --root /tmp/anyps5-15324-files/head --json core/libs/tests/GuestCairoContext.cpp core/libs/tests/GuestCairoGraphicsState.cpp core/libs/tests/GuestCairoPath.cpp core/libs/tests/GuestCairoSurface.cpp
python3 tools/pr_overlap.py --branch refs/review/15324/20261103-current --repo boykopovar/AnyPS5 --base main --jobs 6
gh pr checks 15324 --repo boykopovar/AnyPS5
gh api repos/boykopovar/AnyPS5/actions/jobs/125729519749/logs > /tmp/15324-windows-job.log
rg -n 'guest_cairo_(matrix|surface|context|graphics_state|path)|The following tests FAILED' /tmp/15324-windows-job.log

Results

Check Result Note
Diff and conventions passed No diff or convention errors.
ABI audit passed 151 symbols; no lexical mismatches.
Stack preview passed Clean; preserve the declared dependency order.
Test-quality heuristic failed Four registration warnings; all four CTest targets are present in CMake.
PR overlap helper failed GitHub response was invalid JSON; overlap is not fully verified.
Windows CTest failed guest_cairo_surface exits with 0xc0000135; the other four Cairo tests pass.
Other applicable hosted checks passed Conventions, labels, eligibility, portability and report checks passed.
Posted AMD GPU report passed The exact-head report says its build/tests passed; I did not reproduce that run.
Local C++ tests and console behavior not run No local build or PS5 console was available.
Full precheck table and selected unedited output
Check Status Command / reason
build_and_compile not_applicable The precheck deliberately does not configure, build, or compile AnyPS5.
diff_check passed git diff --check 5cb015caaaaf83f8ee431414ee6a457b5b307d49...35a1879fab9e1ff9ebc3c9e3cfb57075b6ab41a7
conventions_and_pr_template passed /usr/bin/python3 tools/check_conventions.py --base 5cb015caaaaf83f8ee431414ee6a457b5b307d49 --head 35a1879fab9e1ff9ebc3c9e3cfb57075b6ab41a7 --title feat(libcairo): implement eleven owned path-data and current-point exports --body /tmp/anyps5-pr-precheck/15324-session-20261103/pr-body.md
changed_export_abi_audit failed /usr/bin/python3 tools/pr_abi_audit.py --base 5cb015caaaaf83f8ee431414ee6a457b5b307d49 --head 35a1879fab9e1ff9ebc3c9e3cfb57075b6ab41a7 --json (the helper is absent in the isolated snapshot; I ran it separately from the workspace)
python_syntax not_applicable No changed Python implementation files.
related_python_unit_tests not_applicable No changed tools/ module has a sibling Python unit-test suite.
python_test_registration not_applicable No changed test_*.py files.
live_dependency_and_mergeability_check passed /usr/bin/python3 /marc/AnyPS5/tools/pr_stack_check.py 15324 --repo boykopovar/AnyPS5 --output-dir /tmp/anyps5-pr-precheck/15324-session-20261103/stack
build_dependent_cpp_tests not_applicable Exact-head C++ tests require a build; the precheck does not build.
test_quality_heuristics failed The helper is absent in the isolated snapshot; I ran it separately against the four test files.
negative_controls not_applicable No changed Python test module was eligible for a no-build source control.

The precheck reported the stable exact head/base and conventions result:

Head unchanged at completion: True
Base unchanged at completion: True
All conventions checks passed.

The manual ABI audit result was:

"status": "passed"
"findings": []

The overlap helper's exact error was:

pr_overlap: Invalid \uXXXX escape: line 1 column 1672320 (char 1672319)

Windows CTest excerpts from the exact-head job:

2026-11-03T04:46:34.9791710Z 2668/3036 Test #3264: guest_cairo_matrix ....................................................   Passed    0.02 sec
2026-11-03T04:46:34.9936749Z 2669/3036 Test #3265: guest_cairo_surface ...................................................Exit code 0xc0000135***Exception:   0.01 sec
2026-11-03T04:46:35.0149616Z 2670/3036 Test #3266: guest_cairo_context ...................................................   Passed    0.02 sec
2026-11-03T04:46:35.0365068Z 2671/3036 Test #3267: guest_cairo_graphics_state ............................................   Passed    0.02 sec
2026-11-03T04:46:35.0585466Z 2673/3036 Test #3268: guest_cairo_path ......................................................   Passed    0.02 sec
2026-11-03T04:47:32.5059769Z 99% tests passed, 1 tests failed out of 3036
2026-11-03T04:47:32.5060510Z Total Test time (real) = 143.32 sec
2026-11-03T04:47:32.5522616Z 	3265 - guest_cairo_surface (Exit code 0xc0000135)

The current check summary is:

windows	fail	11m12s	https://github.com/boykopovar/AnyPS5/actions/runs/41579061584/job/125729519749
conventions	pass	20s	https://github.com/boykopovar/AnyPS5/actions/runs/41579057888/job/125729315241
eligibility	pass	5s	https://github.com/boykopovar/AnyPS5/actions/runs/41579061584/job/125729486733
labels	pass	9s	https://github.com/boykopovar/AnyPS5/actions/runs/41579057799/job/125729317803
library-portability	pass	1m4s	https://github.com/boykopovar/AnyPS5/actions/runs/41579061635/job/125729324438
linux	skipping	0	https://github.com/boykopovar/AnyPS5/actions/runs/41579061584/job/125729520934
relinker	skipping	0	https://github.com/boykopovar/AnyPS5/actions/runs/41579061584/job/125729521024
relinker-asan	skipping	0	https://github.com/boykopovar/AnyPS5/actions/runs/41579061584/job/125729521314
edge-watch	skipping	0	https://github.com/boykopovar/AnyPS5/actions/runs/41579061584/job/125729520982
register-context	skipping	0	https://github.com/boykopovar/AnyPS5/actions/runs/41579061584/job/125729521617
write-watch	skipping	0	https://github.com/boykopovar/AnyPS5/actions/runs/41579061584/job/125729521298
report	pass	32s	https://github.com/boykopovar/AnyPS5/actions/runs/41579061403/job/125729323730

Negative control

Not run. The failing surface test exits before its assertions execute, and no local build was run to test a mutation.

Findings

Blocking

The guest_cairo_surface CTest target links the shared libc library but does not add its runtime directory to PATH on Windows. It exits immediately with 0xc0000135; the neighboring tests configure a DLL search path. Please add the required runtime directory to this test's Windows environment (for example, $<TARGET_FILE_DIR:libc>). I attached a line-level CMake suggestion.

Non-blocking

  • The declared Cairo stack remains #14327 → #14328 → #14329 → #15315 → #15317 → #15324. The stack checker reports clean individual previews, but says the current #14328/#14329 heads are not included by dependent #15315; preserve the landing order and refresh integration checks after those dependencies advance.
  • The overlap helper could not parse its GitHub response. I checked the live #15208 title and file list; it implements pattern-state exports, not the path exports in this PR. The helper did not provide a complete overlap result for the full stack.

Sources

Not verified

I did not run a local build or CTest, Linux execution or PS5 console behavior. The repository's Linux and specialized hosted jobs were skipped. The AMD report is a posted result, not a run I performed. The full PR-overlap scan remains unverified because the helper returned malformed JSON.

To get this to a good state

Add the missing Windows DLL search path for guest_cairo_surface, then rerun the Windows test job and the required checks on the new head. I will repeat the exact-head precheck and review the updated results.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5748001092 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/15324#pullrequestreview-5748001092). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-03T06:23:42Z. **Review:** CHANGES_REQUESTED --- # Re-checked — new head, changes requested The two earlier path-behavior findings are addressed, but the exact-head Windows CTest run still fails at startup in the new `guest_cairo_surface` target. ## What I ran The open PR is at head `35a1879fab9e1ff9ebc3c9e3cfb57075b6ab41a7` against PR base `5cb015caaaaf83f8ee431414ee6a457b5b307d49`. My previous full review read all 14 changed files at `6c786800814b5d4cc2e07c65e5e3554069d5f367`; this re-check compared that head with the current one and inspected all six files changed since then, including the path-scale/canonicalization changes and their tests. A fresh stack preview against current `main` `d1ae628bc2f62459cce1e9872ba5632c938c71f2` is clean. Environment: Debian Linux 6.1 x86_64, Python 3.11.2, Git 2.39.5 and GCC 12.2.0; no local AnyPS5 build was run. ```sh python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 15324 --output-dir /tmp/anyps5-pr-precheck/15324-session-20261103 python3 tools/pr_abi_audit.py --repo /marc/AnyPS5 --base 5cb015caaaaf83f8ee431414ee6a457b5b307d49 --head 35a1879fab9e1ff9ebc3c9e3cfb57075b6ab41a7 --json python3 tools/pr_test_quality.py --root /tmp/anyps5-15324-files/head --json core/libs/tests/GuestCairoContext.cpp core/libs/tests/GuestCairoGraphicsState.cpp core/libs/tests/GuestCairoPath.cpp core/libs/tests/GuestCairoSurface.cpp python3 tools/pr_overlap.py --branch refs/review/15324/20261103-current --repo boykopovar/AnyPS5 --base main --jobs 6 gh pr checks 15324 --repo boykopovar/AnyPS5 gh api repos/boykopovar/AnyPS5/actions/jobs/125729519749/logs > /tmp/15324-windows-job.log rg -n 'guest_cairo_(matrix|surface|context|graphics_state|path)|The following tests FAILED' /tmp/15324-windows-job.log ``` ## Results | Check | Result | Note | |---|---|---| | Diff and conventions | passed | No diff or convention errors. | | ABI audit | passed | 151 symbols; no lexical mismatches. | | Stack preview | passed | Clean; preserve the declared dependency order. | | Test-quality heuristic | failed | Four registration warnings; all four CTest targets are present in CMake. | | PR overlap helper | failed | GitHub response was invalid JSON; overlap is not fully verified. | | Windows CTest | failed | `guest_cairo_surface` exits with `0xc0000135`; the other four Cairo tests pass. | | Other applicable hosted checks | passed | Conventions, labels, eligibility, portability and report checks passed. | | Posted AMD GPU report | passed | The exact-head report says its build/tests passed; I did not reproduce that run. | | Local C++ tests and console behavior | not run | No local build or PS5 console was available. | <details><summary>Full precheck table and selected unedited output</summary> | Check | Status | Command / reason | |---|---|---| | build_and_compile | not_applicable | The precheck deliberately does not configure, build, or compile AnyPS5. | | diff_check | passed | `git diff --check 5cb015caaaaf83f8ee431414ee6a457b5b307d49...35a1879fab9e1ff9ebc3c9e3cfb57075b6ab41a7` | | conventions_and_pr_template | passed | `/usr/bin/python3 tools/check_conventions.py --base 5cb015caaaaf83f8ee431414ee6a457b5b307d49 --head 35a1879fab9e1ff9ebc3c9e3cfb57075b6ab41a7 --title feat(libcairo): implement eleven owned path-data and current-point exports --body /tmp/anyps5-pr-precheck/15324-session-20261103/pr-body.md` | | changed_export_abi_audit | failed | `/usr/bin/python3 tools/pr_abi_audit.py --base 5cb015caaaaf83f8ee431414ee6a457b5b307d49 --head 35a1879fab9e1ff9ebc3c9e3cfb57075b6ab41a7 --json` (the helper is absent in the isolated snapshot; I ran it separately from the workspace) | | python_syntax | not_applicable | No changed Python implementation files. | | related_python_unit_tests | not_applicable | No changed `tools/` module has a sibling Python unit-test suite. | | python_test_registration | not_applicable | No changed `test_*.py` files. | | live_dependency_and_mergeability_check | passed | `/usr/bin/python3 /marc/AnyPS5/tools/pr_stack_check.py 15324 --repo boykopovar/AnyPS5 --output-dir /tmp/anyps5-pr-precheck/15324-session-20261103/stack` | | build_dependent_cpp_tests | not_applicable | Exact-head C++ tests require a build; the precheck does not build. | | test_quality_heuristics | failed | The helper is absent in the isolated snapshot; I ran it separately against the four test files. | | negative_controls | not_applicable | No changed Python test module was eligible for a no-build source control. | The precheck reported the stable exact head/base and conventions result: ```text Head unchanged at completion: True Base unchanged at completion: True All conventions checks passed. ``` The manual ABI audit result was: ```text "status": "passed" "findings": [] ``` The overlap helper's exact error was: ```text pr_overlap: Invalid \uXXXX escape: line 1 column 1672320 (char 1672319) ``` Windows CTest excerpts from the exact-head job: ```text 2026-11-03T04:46:34.9791710Z 2668/3036 Test #3264: guest_cairo_matrix .................................................... Passed 0.02 sec 2026-11-03T04:46:34.9936749Z 2669/3036 Test #3265: guest_cairo_surface ...................................................Exit code 0xc0000135***Exception: 0.01 sec 2026-11-03T04:46:35.0149616Z 2670/3036 Test #3266: guest_cairo_context ................................................... Passed 0.02 sec 2026-11-03T04:46:35.0365068Z 2671/3036 Test #3267: guest_cairo_graphics_state ............................................ Passed 0.02 sec 2026-11-03T04:46:35.0585466Z 2673/3036 Test #3268: guest_cairo_path ...................................................... Passed 0.02 sec 2026-11-03T04:47:32.5059769Z 99% tests passed, 1 tests failed out of 3036 2026-11-03T04:47:32.5060510Z Total Test time (real) = 143.32 sec 2026-11-03T04:47:32.5522616Z 3265 - guest_cairo_surface (Exit code 0xc0000135) ``` The current check summary is: ```text windows fail 11m12s https://github.com/boykopovar/AnyPS5/actions/runs/41579061584/job/125729519749 conventions pass 20s https://github.com/boykopovar/AnyPS5/actions/runs/41579057888/job/125729315241 eligibility pass 5s https://github.com/boykopovar/AnyPS5/actions/runs/41579061584/job/125729486733 labels pass 9s https://github.com/boykopovar/AnyPS5/actions/runs/41579057799/job/125729317803 library-portability pass 1m4s https://github.com/boykopovar/AnyPS5/actions/runs/41579061635/job/125729324438 linux skipping 0 https://github.com/boykopovar/AnyPS5/actions/runs/41579061584/job/125729520934 relinker skipping 0 https://github.com/boykopovar/AnyPS5/actions/runs/41579061584/job/125729521024 relinker-asan skipping 0 https://github.com/boykopovar/AnyPS5/actions/runs/41579061584/job/125729521314 edge-watch skipping 0 https://github.com/boykopovar/AnyPS5/actions/runs/41579061584/job/125729520982 register-context skipping 0 https://github.com/boykopovar/AnyPS5/actions/runs/41579061584/job/125729521617 write-watch skipping 0 https://github.com/boykopovar/AnyPS5/actions/runs/41579061584/job/125729521298 report pass 32s https://github.com/boykopovar/AnyPS5/actions/runs/41579061403/job/125729323730 ``` </details> ## Negative control Not run. The failing surface test exits before its assertions execute, and no local build was run to test a mutation. ## Findings ### Blocking The `guest_cairo_surface` CTest target links the shared `libc` library but does not add its runtime directory to `PATH` on Windows. It exits immediately with `0xc0000135`; the neighboring tests configure a DLL search path. Please add the required runtime directory to this test's Windows environment (for example, `$<TARGET_FILE_DIR:libc>`). I attached a line-level CMake suggestion. ### Non-blocking - The declared Cairo stack remains `#14327 → #14328 → #14329 → #15315 → #15317 → #15324`. The stack checker reports clean individual previews, but says the current #14328/#14329 heads are not included by dependent #15315; preserve the landing order and refresh integration checks after those dependencies advance. - The overlap helper could not parse its GitHub response. I checked the live #15208 title and file list; it implements pattern-state exports, not the path exports in this PR. The helper did not provide a complete overlap result for the full stack. ## Sources - [Windows CTest registration and runtime environment for the Cairo targets](https://github.com/boykopovar/AnyPS5/blob/35a1879fab9e1ff9ebc3c9e3cfb57075b6ab41a7/core/libs/prx/libcairo/CMakeLists.txt#L16-L50) - [`libc` shared target and subdirectory](https://github.com/boykopovar/AnyPS5/blob/35a1879fab9e1ff9ebc3c9e3cfb57075b6ab41a7/core/libs/CMakeLists.txt#L106-L115) - [Device-scale conversion and path canonicalization](https://github.com/boykopovar/AnyPS5/blob/35a1879fab9e1ff9ebc3c9efbfdfb883c3494c0283b04/core/libs/prx/libcairo/Context.cpp#L144-L200) - [Regression tests for scaled coordinates and normalized lines](https://github.com/boykopovar/AnyPS5/blob/35a1879fab9e1ff9ebc3c9efbfdfb883c3494c0283b04/core/libs/tests/GuestCairoPath.cpp#L219-L272) - [Windows test job](https://github.com/boykopovar/AnyPS5/actions/runs/41579061584/job/125729519749) - [Posted AMD build/test report for this exact head](https://github.com/boykopovar/AnyPS5/pull/15324#issuecomment-6595868681) ## Not verified I did not run a local build or CTest, Linux execution or PS5 console behavior. The repository's Linux and specialized hosted jobs were skipped. The AMD report is a posted result, not a run I performed. The full PR-overlap scan remains unverified because the helper returned malformed JSON. ## To get this to a good state Add the missing Windows DLL search path for `guest_cairo_surface`, then rerun the Windows test job and the required checks on the new head. I will repeat the exact-head precheck and review the updated results.
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!15324
No description provided.