feat(libSceNKWebKit): implement WebCore::LoggedInStatus #20304

Closed
RiverWhy wants to merge 13 commits from upstream-pr/20304 into main
RiverWhy commented 2026-11-15 00:53:47 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by RiverWhy on 2026-11-15T00:53:47Z.


What

Implements WebCore::LoggedInStatus, following the pinned LoggedInStatus.cpp:

  • create(domain, username, tokenType, authType) and create(..., Seconds timeToLive): in the source's order, an empty registrable domain returns SecurityError (14), an empty username or one over 64 characters SyntaxError (9), and whitespace InvalidCharacterError (3), each with the source's message. Otherwise the object is created with loggedInTime = WallTime::now(). The first overload's time to live is 7 days for Unmanaged and 90 days otherwise.
  • setTimeToLive: clamps to that same cap with the source's std::min argument order, so a NaN is kept.
  • hasExpired: now > loggedInTime + timeToLive. expiry: now + timeToLive, as the source computes it (not from loggedInTime).

Layouts are in LoggedInStatusAbi.hpp with static_asserts: the 40-byte object (domain, username, token type at 0x10, auth type at 0x11, times at 0x18 and 0x20) and the 24-byte ExceptionOr<UniqueRef<LoggedInStatus>> (pointer or Exception, has-value byte at 0x10, the same shape as the existing ExceptionOr<double>). Both, and the exception code values, were measured on the pinned headers compiled against a JSCOnly build of the same tree.

  • Allocation: the PS5 port builds with USE_ISO_MALLOC off (OptionsPlayStation.cmake), so WTF_MAKE_ISO_ALLOCATED is WTF_MAKE_FAST_ALLOCATED; the object is fastMalloc'd and the guest's inline delete frees it with fastFree.
  • Whitespace: deprecatedIsSpaceOrNewline is ASCII whitespace plus \v for Latin-1, so U+00A0 is accepted, and u_charDirection == U_WHITE_SPACE_NEUTRAL above it, through libSceIcu as WtfStringIcu.cpp already does.
  • Null references and a null object throw.

Debt: a fragment, docs/dev/debt/changes/feat-nkwebkit-logged-in-status.md, adds the entry and removes the 5 inventory rows. #19704 and #20296 add includes on the same line of libSceNKWebKit.hpp.

Tested

Linux Mint 22.3:

  • New nkwebkit_loggedinstatus test: default and explicit lifetimes, clamping and NaN, the four refusals with codes and messages, the 64/65-character boundary, ASCII and U+3000 whitespace against U+00A0 and other non-ASCII letters, setTimeToLive, hasExpired before and after expiry, expiry, and null refusals.
  • ctest -R nkwebkit: 87 tests passed. progress.py --module libSceNKWebKit: 3072 to 3077 implemented.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt and the licence notice of code adapted from upstream (see AGENTS.md)
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5318036512 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/20304). Originally posted by [RiverWhy](https://github.com/RiverWhy) on 2026-11-15T00:53:47Z. --- ### What Implements `WebCore::LoggedInStatus`, following the pinned [LoggedInStatus.cpp](https://github.com/neonmodder123/PS5-WebKit-11.x/blob/80f77e94c63ee7202eec3d4b5b1a021dd89011ba/Source/WebCore/page/LoggedInStatus.cpp): - `create(domain, username, tokenType, authType)` and `create(..., Seconds timeToLive)`: in the source's order, an empty registrable domain returns `SecurityError` (14), an empty username or one over 64 characters `SyntaxError` (9), and whitespace `InvalidCharacterError` (3), each with the source's message. Otherwise the object is created with `loggedInTime = WallTime::now()`. The first overload's time to live is 7 days for `Unmanaged` and 90 days otherwise. - `setTimeToLive`: clamps to that same cap with the source's `std::min` argument order, so a NaN is kept. - `hasExpired`: `now > loggedInTime + timeToLive`. `expiry`: `now + timeToLive`, as the source computes it (not from `loggedInTime`). Layouts are in `LoggedInStatusAbi.hpp` with `static_assert`s: the 40-byte object (domain, username, token type at 0x10, auth type at 0x11, times at 0x18 and 0x20) and the 24-byte `ExceptionOr<UniqueRef<LoggedInStatus>>` (pointer or `Exception`, has-value byte at 0x10, the same shape as the existing `ExceptionOr<double>`). Both, and the exception code values, were measured on the pinned headers compiled against a JSCOnly build of the same tree. - Allocation: the PS5 port builds with `USE_ISO_MALLOC` off ([OptionsPlayStation.cmake](https://github.com/neonmodder123/PS5-WebKit-11.x/blob/80f77e94c63ee7202eec3d4b5b1a021dd89011ba/Source/cmake/OptionsPlayStation.cmake#L206)), so `WTF_MAKE_ISO_ALLOCATED` is `WTF_MAKE_FAST_ALLOCATED`; the object is `fastMalloc`'d and the guest's inline `delete` frees it with `fastFree`. - Whitespace: `deprecatedIsSpaceOrNewline` is ASCII whitespace plus `\v` for Latin-1, so U+00A0 is accepted, and `u_charDirection == U_WHITE_SPACE_NEUTRAL` above it, through `libSceIcu` as `WtfStringIcu.cpp` already does. - Null references and a null object throw. Debt: a fragment, `docs/dev/debt/changes/feat-nkwebkit-logged-in-status.md`, adds the entry and removes the 5 inventory rows. #19704 and #20296 add includes on the same line of `libSceNKWebKit.hpp`. ### Tested Linux Mint 22.3: - New `nkwebkit_loggedinstatus` test: default and explicit lifetimes, clamping and NaN, the four refusals with codes and messages, the 64/65-character boundary, ASCII and U+3000 whitespace against U+00A0 and other non-ASCII letters, `setTimeToLive`, `hasExpired` before and after expiry, `expiry`, and null refusals. - `ctest -R nkwebkit`: 87 tests passed. `progress.py --module libSceNKWebKit`: 3072 to 3077 implemented. ### Checklist - [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) and the licence notice of code adapted from upstream (see AGENTS.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: none - [x] GPUs tested: n/a - [x] AI-assisted: yes
PrivacyOnion commented 2026-11-15 01:49:37 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-15T01:49:37Z.

Review: APPROVED


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

  • Conventions: tools/check_conventions.py passed; git diff --check clean.
  • Build: nkwebkit_loggedinstatus_tests built cleanly.
  • CTest (nkwebkit_loggedinstatus):
    1/1 Test #4065: nkwebkit_loggedinstatus ..........   Passed    0.02 sec
    100% tests passed, 0 tests failed out of 1
    
  • Negative control: with core/libs/prx/libSceNKWebKit/Export.cpp, core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp, core/libs/prx/libSceNKWebKit/libSceNKWebKit.hpp reverted to main, the new tests do not build/link without the change; restoring it makes them build and pass.
  • Code reading:
    • ABI layouts and alignment in LoggedInStatusAbi.hpp: verified sizeof(RegistrableDomain) == 8, sizeof(LoggedInStatus) == 40, field offsets for domain (0x00), username (0x08), tokenType (0x10), authType (0x11), loggedInTime (0x18), timeToLive (0x20), and sizeof(LoggedInStatusOrException) == 24 with hasValue at offset 0x10 matching WebCore ExceptionOr<UniqueRef>.
    • Exception codes and validation sequence in LoggedInStatus.cpp::Create: verified domain emptiness returns SecurityError (14), username emptiness and length > 64 return SyntaxError (9), and whitespace checks return InvalidCharacterError (3) with matching upstream WebCore diagnostic strings.
    • Whitespace character handling in LoggedInStatus.cpp::IsSpaceOrNewline: verified ASCII whitespace characters (' ', '\t', '\n', '\v', '\f', '\r') and ICU u_charDirection_nid_postfix matching WhiteSpaceNeutral (9) for characters above Latin-1 while correctly accepting non-breaking space (U+00A0).
    • Lifetime calculations and NaN handling in LoggedInStatus.cpp::SetTimeToLive: verified 7-day cap for Unmanaged (2) and 90-day cap for managed authentication types, correctly clamping explicit lifetimes while preserving NaN.
    • Null pointer safety across all entrypoints: verified null domain, username, and self pointers reliably throw std::invalid_argument with descriptive prefixes in create, setTimeToLive, hasExpired, and expiry.
    • Export signatures and debt tracking: verified all 5 mangled symbols in LoggedInStatusExports.hpp match the removed stubs in Export.cpp and InventoryExports.hpp, and docs/dev/debt/libSceNKWebKit.md decrements remaining inventory from 5934 to 5929.
  • Note: the AI-assisted checkbox can stay.

Looks Good To Me

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5908492855 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/20304#pullrequestreview-5908492855). Originally posted by [PrivacyOnion](https://github.com/PrivacyOnion) on 2026-11-15T01:49:37Z. **Review:** APPROVED --- Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against `72d20051dd`: - **Conventions**: `tools/check_conventions.py` passed; `git diff --check` clean. - **Build**: `nkwebkit_loggedinstatus_tests` built cleanly. - **CTest** (`nkwebkit_loggedinstatus`): ``` 1/1 Test #4065: nkwebkit_loggedinstatus .......... Passed 0.02 sec 100% tests passed, 0 tests failed out of 1 ``` - **Negative control**: with `core/libs/prx/libSceNKWebKit/Export.cpp`, `core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp`, `core/libs/prx/libSceNKWebKit/libSceNKWebKit.hpp` reverted to `main`, the new tests do not build/link without the change; restoring it makes them build and pass. - **Code reading**: - ABI layouts and alignment in LoggedInStatusAbi.hpp: verified sizeof(RegistrableDomain) == 8, sizeof(LoggedInStatus) == 40, field offsets for domain (0x00), username (0x08), tokenType (0x10), authType (0x11), loggedInTime (0x18), timeToLive (0x20), and sizeof(LoggedInStatusOrException) == 24 with hasValue at offset 0x10 matching WebCore ExceptionOr<UniqueRef<LoggedInStatus>>. - Exception codes and validation sequence in LoggedInStatus.cpp::Create: verified domain emptiness returns SecurityError (14), username emptiness and length > 64 return SyntaxError (9), and whitespace checks return InvalidCharacterError (3) with matching upstream WebCore diagnostic strings. - Whitespace character handling in LoggedInStatus.cpp::IsSpaceOrNewline: verified ASCII whitespace characters (' ', '\t', '\n', '\v', '\f', '\r') and ICU u_charDirection_nid_postfix matching WhiteSpaceNeutral (9) for characters above Latin-1 while correctly accepting non-breaking space (U+00A0). - Lifetime calculations and NaN handling in LoggedInStatus.cpp::SetTimeToLive: verified 7-day cap for Unmanaged (2) and 90-day cap for managed authentication types, correctly clamping explicit lifetimes while preserving NaN. - Null pointer safety across all entrypoints: verified null domain, username, and self pointers reliably throw std::invalid_argument with descriptive prefixes in create, setTimeToLive, hasExpired, and expiry. - Export signatures and debt tracking: verified all 5 mangled symbols in LoggedInStatusExports.hpp match the removed stubs in Export.cpp and InventoryExports.hpp, and docs/dev/debt/libSceNKWebKit.md decrements remaining inventory from 5934 to 5929. - Note: the AI-assisted checkbox can stay. Looks Good To Me
PrivacyOnion commented 2026-11-15 02:49:08 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-15T02:49:08Z.

Review: CHANGES_REQUESTED


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

  • Conventions: tools/check_conventions.py passed; git diff --check clean.
  • Build: nkwebkit_loggedinstatus_tests built cleanly.
  • CTest (nkwebkit_loggedinstatus):
    1/1 Test #4076: nkwebkit_loggedinstatus ..........   Passed    0.02 sec
    100% tests passed, 0 tests failed out of 1
    
  • Negative control: with core/libs/prx/libSceNKWebKit/Export.cpp, core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp, core/libs/prx/libSceNKWebKit/libSceNKWebKit.hpp reverted to main, the new tests do not build/link without the change; restoring it makes them build and pass.
  • Code reading:
    • Verified struct layouts and alignment static asserts in core/libs/prx/libSceNKWebKit/src/LoggedInStatusAbi.hpp: sizeof(RegistrableDomain) == 8, sizeof(LoggedInStatus) == 40 with member offsets matching WebCore (domain at 0x00, username at 0x08, tokenType at 0x10, authType at 0x11, loggedInTime at 0x18, timeToLive at 0x20), and sizeof(LoggedInStatusOrException) == 24 with hasValue at offset 0x10.
    • Verified null input handling and argument validation in core/libs/prx/libSceNKWebKit/src/LoggedInStatus.cpp: null domain or username pointers in create overloads and null self pointers in setTimeToLive, hasExpired, and expiry throw std::invalid_argument.
    • Verified error codes and order of validation checks in core/libs/prx/libSceNKWebKit/src/LoggedInStatus.cpp: empty registrable domain returns SecurityError (14), empty username returns SyntaxError (9), username length exceeding 64 returns SyntaxError (9), and whitespace returns InvalidCharacterError (3).
    • Verified lifetime caps and NaN propagation in SetTimeToLive in core/libs/prx/libSceNKWebKit/src/LoggedInStatus.cpp: authType Unmanaged (2) caps at 7 days (604800.0s), other auth types cap at 90 days (7776000.0s), and NaN lifetimes are preserved.
    • Verified export removals and declarations across core/libs/prx/libSceNKWebKit/Export.cpp, core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp, and core/libs/prx/libSceNKWebKit/include/LoggedInStatusExports.hpp, confirming all 5 NID symbols match their demangled WebCore signatures.
  • Concerns:
    • core/libs/prx/libSceNKWebKit/src/LoggedInStatus.cpp:108: _ZNK7WebCore14LoggedInStatus6expiryEv calculates expiry as WTF::WallTime{_ZN3WTF8WallTime3nowEv().m_value + status.timeToLive.m_value} instead of status.loggedInTime.m_value + status.timeToLive.m_value. For an object created at time T0 with lifetime TTL, calling expiry() at time T0 + dt returns T0 + dt + TTL instead of the fixed expiration timestamp T0 + TTL. Furthermore, for an expired status where WallTime::now() > loggedInTime + timeToLive, _ZNK7WebCore14LoggedInStatus10hasExpiredEv returns true, but _ZNK7WebCore14LoggedInStatus6expiryEv returns a future timestamp WallTime::now() + timeToLive. In core/libs/prx/libSceNKWebKit/tests/LoggedInStatus.cpp:123-125, this inverted behavior is asserted by checking that an expired status returns an expiry time 90 days in the future rather than 90 days in the past.
  • Note: the AI-assisted checkbox can stay.

Requesting changes for the points above.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5908724029 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/20304#pullrequestreview-5908724029). Originally posted by [PrivacyOnion](https://github.com/PrivacyOnion) on 2026-11-15T02:49:08Z. **Review:** CHANGES_REQUESTED --- Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against `bf410aba75`: - **Conventions**: `tools/check_conventions.py` passed; `git diff --check` clean. - **Build**: `nkwebkit_loggedinstatus_tests` built cleanly. - **CTest** (`nkwebkit_loggedinstatus`): ``` 1/1 Test #4076: nkwebkit_loggedinstatus .......... Passed 0.02 sec 100% tests passed, 0 tests failed out of 1 ``` - **Negative control**: with `core/libs/prx/libSceNKWebKit/Export.cpp`, `core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp`, `core/libs/prx/libSceNKWebKit/libSceNKWebKit.hpp` reverted to `main`, the new tests do not build/link without the change; restoring it makes them build and pass. - **Code reading**: - Verified struct layouts and alignment static asserts in core/libs/prx/libSceNKWebKit/src/LoggedInStatusAbi.hpp: sizeof(RegistrableDomain) == 8, sizeof(LoggedInStatus) == 40 with member offsets matching WebCore (domain at 0x00, username at 0x08, tokenType at 0x10, authType at 0x11, loggedInTime at 0x18, timeToLive at 0x20), and sizeof(LoggedInStatusOrException) == 24 with hasValue at offset 0x10. - Verified null input handling and argument validation in core/libs/prx/libSceNKWebKit/src/LoggedInStatus.cpp: null domain or username pointers in create overloads and null self pointers in setTimeToLive, hasExpired, and expiry throw std::invalid_argument. - Verified error codes and order of validation checks in core/libs/prx/libSceNKWebKit/src/LoggedInStatus.cpp: empty registrable domain returns SecurityError (14), empty username returns SyntaxError (9), username length exceeding 64 returns SyntaxError (9), and whitespace returns InvalidCharacterError (3). - Verified lifetime caps and NaN propagation in SetTimeToLive in core/libs/prx/libSceNKWebKit/src/LoggedInStatus.cpp: authType Unmanaged (2) caps at 7 days (604800.0s), other auth types cap at 90 days (7776000.0s), and NaN lifetimes are preserved. - Verified export removals and declarations across core/libs/prx/libSceNKWebKit/Export.cpp, core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp, and core/libs/prx/libSceNKWebKit/include/LoggedInStatusExports.hpp, confirming all 5 NID symbols match their demangled WebCore signatures. - **Concerns**: - core/libs/prx/libSceNKWebKit/src/LoggedInStatus.cpp:108: `_ZNK7WebCore14LoggedInStatus6expiryEv` calculates expiry as `WTF::WallTime{_ZN3WTF8WallTime3nowEv().m_value + status.timeToLive.m_value}` instead of `status.loggedInTime.m_value + status.timeToLive.m_value`. For an object created at time T0 with lifetime TTL, calling `expiry()` at time T0 + dt returns T0 + dt + TTL instead of the fixed expiration timestamp T0 + TTL. Furthermore, for an expired status where `WallTime::now() > loggedInTime + timeToLive`, `_ZNK7WebCore14LoggedInStatus10hasExpiredEv` returns `true`, but `_ZNK7WebCore14LoggedInStatus6expiryEv` returns a future timestamp `WallTime::now() + timeToLive`. In core/libs/prx/libSceNKWebKit/tests/LoggedInStatus.cpp:123-125, this inverted behavior is asserted by checking that an expired status returns an expiry time 90 days in the future rather than 90 days in the past. - Note: the AI-assisted checkbox can stay. Requesting changes for the points above.
PrivacyOnion commented 2026-11-15 05:01:28 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-15T05:01:28Z.

Review: APPROVED


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

  • Conventions: tools/check_conventions.py passed; git diff --check clean.
  • Build: nkwebkit_loggedinstatus_tests built cleanly.
  • CTest (nkwebkit_loggedinstatus):
    1/1 Test #4079: nkwebkit_loggedinstatus ..........   Passed    0.01 sec
    100% tests passed, 0 tests failed out of 1
    
  • Negative control: with core/libs/prx/libSceNKWebKit/Export.cpp, core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp, core/libs/prx/libSceNKWebKit/libSceNKWebKit.hpp reverted to main, the new tests do not build/link without the change; restoring it makes them build and pass.
  • Code reading:
    • Verified error code values and validation ordering in Create (core/libs/prx/libSceNKWebKit/src/LoggedInStatus.cpp:66-77): SecurityError (14), SyntaxError (9), and InvalidCharacterError (3) are checked in the exact upstream order (empty domain, empty username, length > 64, whitespace), rejecting invalid inputs with exact WebKit exception messages.
    • Verified whitespace classification in IsSpaceOrNewline (core/libs/prx/libSceNKWebKit/src/LoggedInStatus.cpp:48-55): Latin-1 ASCII whitespaces (' ', '\t', '\n', '\v', '\f', '\r') are rejected while U+00A0 is accepted, and non-ASCII code points (such as U+3000) are checked via u_charDirection_nid_postfix == WhiteSpaceNeutral (9) matching deprecatedIsSpaceOrNewline.
    • Verified null safety across all exported entry points (core/libs/prx/libSceNKWebKit/src/LoggedInStatus.cpp:67, 79-82): null domain and username pointers in Create throw std::invalid_argument, and null self pointers in setTimeToLive, hasExpired, and expiry throw std::invalid_argument before dereference.
    • Verified ABI layout and memory management in NKWebKit::WebCoreAbi (core/libs/prx/libSceNKWebKit/src/LoggedInStatusAbi.hpp:11-51): static_asserts guarantee sizeof(LoggedInStatus) == 40, sizeof(LoggedInStatusOrException) == 24, offsetof(hasValue) == 0x10, tokenType at 0x10, authType at 0x11, loggedInTime at 0x18, timeToLive at 0x20, and fastMalloc/fastFree allocation.
    • Verified lifetime clamping and expiration calculation (core/libs/prx/libSceNKWebKit/src/LoggedInStatus.cpp:57-64, 101-109): default lifetime uses 7 days for Unmanaged (2) and 90 days for managed types, clamping preserves NaN, hasExpired compares against loggedInTime + timeToLive, and expiry evaluates now + timeToLive per pinned WebKit source.
    • Verified repository rules and technical debt tracking (AGENTS.md): no forbidden code comments are present in new files, the technical debt fragment docs/dev/debt/changes/feat-nkwebkit-logged-in-status.md accurately documents gaps and removes the 5 implemented NIDs from InventoryExports.hpp and Export.cpp.
  • Note: the AI-assisted checkbox can stay.

Looks Good To Me

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5909185299 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/20304#pullrequestreview-5909185299). Originally posted by [PrivacyOnion](https://github.com/PrivacyOnion) on 2026-11-15T05:01:28Z. **Review:** APPROVED --- Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against `907f6dba83`: - **Conventions**: `tools/check_conventions.py` passed; `git diff --check` clean. - **Build**: `nkwebkit_loggedinstatus_tests` built cleanly. - **CTest** (`nkwebkit_loggedinstatus`): ``` 1/1 Test #4079: nkwebkit_loggedinstatus .......... Passed 0.01 sec 100% tests passed, 0 tests failed out of 1 ``` - **Negative control**: with `core/libs/prx/libSceNKWebKit/Export.cpp`, `core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp`, `core/libs/prx/libSceNKWebKit/libSceNKWebKit.hpp` reverted to `main`, the new tests do not build/link without the change; restoring it makes them build and pass. - **Code reading**: - Verified error code values and validation ordering in Create (core/libs/prx/libSceNKWebKit/src/LoggedInStatus.cpp:66-77): SecurityError (14), SyntaxError (9), and InvalidCharacterError (3) are checked in the exact upstream order (empty domain, empty username, length > 64, whitespace), rejecting invalid inputs with exact WebKit exception messages. - Verified whitespace classification in IsSpaceOrNewline (core/libs/prx/libSceNKWebKit/src/LoggedInStatus.cpp:48-55): Latin-1 ASCII whitespaces (' ', '\t', '\n', '\v', '\f', '\r') are rejected while U+00A0 is accepted, and non-ASCII code points (such as U+3000) are checked via u_charDirection_nid_postfix == WhiteSpaceNeutral (9) matching deprecatedIsSpaceOrNewline. - Verified null safety across all exported entry points (core/libs/prx/libSceNKWebKit/src/LoggedInStatus.cpp:67, 79-82): null domain and username pointers in Create throw std::invalid_argument, and null self pointers in setTimeToLive, hasExpired, and expiry throw std::invalid_argument before dereference. - Verified ABI layout and memory management in NKWebKit::WebCoreAbi (core/libs/prx/libSceNKWebKit/src/LoggedInStatusAbi.hpp:11-51): static_asserts guarantee sizeof(LoggedInStatus) == 40, sizeof(LoggedInStatusOrException) == 24, offsetof(hasValue) == 0x10, tokenType at 0x10, authType at 0x11, loggedInTime at 0x18, timeToLive at 0x20, and fastMalloc/fastFree allocation. - Verified lifetime clamping and expiration calculation (core/libs/prx/libSceNKWebKit/src/LoggedInStatus.cpp:57-64, 101-109): default lifetime uses 7 days for Unmanaged (2) and 90 days for managed types, clamping preserves NaN, hasExpired compares against loggedInTime + timeToLive, and expiry evaluates now + timeToLive per pinned WebKit source. - Verified repository rules and technical debt tracking (AGENTS.md): no forbidden code comments are present in new files, the technical debt fragment docs/dev/debt/changes/feat-nkwebkit-logged-in-status.md accurately documents gaps and removes the 5 implemented NIDs from InventoryExports.hpp and Export.cpp. - Note: the AI-assisted checkbox can stay. Looks Good To Me
PrivacyOnion commented 2026-11-15 06:10:16 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-15T06:10:16Z.

Review: APPROVED


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

  • Conventions: tools/check_conventions.py passed; git diff --check clean.
  • Build: nkwebkit_loggedinstatus_tests built cleanly.
  • CTest (nkwebkit_loggedinstatus):
    1/1 Test #4092: nkwebkit_loggedinstatus ..........   Passed    0.02 sec
    100% tests passed, 0 tests failed out of 1
    
  • Negative control: with core/libs/prx/libSceNKWebKit/Export.cpp, core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp, core/libs/prx/libSceNKWebKit/libSceNKWebKit.hpp reverted to main, the new tests do not build/link without the change; restoring it makes them build and pass.
  • Code reading:
    • core/libs/prx/libSceNKWebKit/src/LoggedInStatus.cpp: Checked Create validation order and exception codes (SecurityError 14 for empty registrable domain, SyntaxError 9 for empty username or length > 64, InvalidCharacterError 3 for ASCII and Unicode whitespace).
    • core/libs/prx/libSceNKWebKit/src/LoggedInStatus.cpp: Verified SetTimeToLive and Cap TTL limits (7 days for Unmanaged vs 90 days for other auth types), argument order preserving NaN, and checked that loggedInTime is captured via WallTime::now().
    • core/libs/prx/libSceNKWebKit/src/LoggedInStatus.cpp: Verified null-pointer safety in Checked() throwing std::invalid_argument for null self and null domain/username in create(), matching documented debt.
    • core/libs/prx/libSceNKWebKit/src/LoggedInStatusAbi.hpp: Verified ABI layout, sizeof(LoggedInStatus) == 40, sizeof(LoggedInStatusOrException) == 24, offsetof(hasValue) == 0x10, and memory cleanup via fastMalloc/fastFree.
    • core/libs/prx/libSceNKWebKit/tests/LoggedInStatus.cpp: Verified unit test coverage for lifetime caps, NaN preservation, boundary checks at 64/65 characters, whitespace classification, and expiry calculation.
    • core/libs/prx/libSceNKWebKit/src/LoggedInStatus.cpp: Verified zero forbidden comments compliance with AGENTS.md, correct namespace endings, and proper debt tracking in docs/dev/debt/changes/feat-nkwebkit-logged-in-status.md.
  • Note: the AI-assisted checkbox can stay.

Looks Good To Me

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5909386006 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/20304#pullrequestreview-5909386006). Originally posted by [PrivacyOnion](https://github.com/PrivacyOnion) on 2026-11-15T06:10:16Z. **Review:** APPROVED --- Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against `7df7d53927`: - **Conventions**: `tools/check_conventions.py` passed; `git diff --check` clean. - **Build**: `nkwebkit_loggedinstatus_tests` built cleanly. - **CTest** (`nkwebkit_loggedinstatus`): ``` 1/1 Test #4092: nkwebkit_loggedinstatus .......... Passed 0.02 sec 100% tests passed, 0 tests failed out of 1 ``` - **Negative control**: with `core/libs/prx/libSceNKWebKit/Export.cpp`, `core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp`, `core/libs/prx/libSceNKWebKit/libSceNKWebKit.hpp` reverted to `main`, the new tests do not build/link without the change; restoring it makes them build and pass. - **Code reading**: - core/libs/prx/libSceNKWebKit/src/LoggedInStatus.cpp: Checked Create validation order and exception codes (SecurityError 14 for empty registrable domain, SyntaxError 9 for empty username or length > 64, InvalidCharacterError 3 for ASCII and Unicode whitespace). - core/libs/prx/libSceNKWebKit/src/LoggedInStatus.cpp: Verified SetTimeToLive and Cap TTL limits (7 days for Unmanaged vs 90 days for other auth types), argument order preserving NaN, and checked that loggedInTime is captured via WallTime::now(). - core/libs/prx/libSceNKWebKit/src/LoggedInStatus.cpp: Verified null-pointer safety in Checked() throwing std::invalid_argument for null self and null domain/username in create(), matching documented debt. - core/libs/prx/libSceNKWebKit/src/LoggedInStatusAbi.hpp: Verified ABI layout, sizeof(LoggedInStatus) == 40, sizeof(LoggedInStatusOrException) == 24, offsetof(hasValue) == 0x10, and memory cleanup via fastMalloc/fastFree. - core/libs/prx/libSceNKWebKit/tests/LoggedInStatus.cpp: Verified unit test coverage for lifetime caps, NaN preservation, boundary checks at 64/65 characters, whitespace classification, and expiry calculation. - core/libs/prx/libSceNKWebKit/src/LoggedInStatus.cpp: Verified zero forbidden comments compliance with AGENTS.md, correct namespace endings, and proper debt tracking in docs/dev/debt/changes/feat-nkwebkit-logged-in-status.md. - Note: the AI-assisted checkbox can stay. Looks Good To Me
MarcZX10 commented 2026-11-16 22:38:52 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-16T22:38:52Z.

Review: COMMENTED


Reviewed — no blocking findings

Nothing blocks this change; the review is incomplete because two oversized changed files could not be read and no checks were run.

What I ran

Reviewed head 57c5368145f86ade15c6297cf41201e757f94a86. No build or tests were run. repo_read.py was unavailable as a shell command in this review session; I used the review reader to inspect the prepared diff and repository files at the pinned head.

Results

Check Result Note
Diff and included changed files passed Six changed files read
Oversized changed files not run Two files could not be read
Build and tests not run No commands run

Findings

Blocking

None found in the code inspected.

Non-blocking

None.

Not verified

core/libs/prx/libSceNKWebKit/Export.cpp and core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp were excluded from the review folder as too large and were not read. The changed test was read, but not executed. No build, ABI check, or console behavior was verified.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5929123100 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/20304#pullrequestreview-5929123100). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-16T22:38:52Z. **Review:** COMMENTED --- # Reviewed — no blocking findings Nothing blocks this change; the review is incomplete because two oversized changed files could not be read and no checks were run. ## What I ran Reviewed head `57c5368145f86ade15c6297cf41201e757f94a86`. No build or tests were run. `repo_read.py` was unavailable as a shell command in this review session; I used the review reader to inspect the prepared diff and repository files at the pinned head. ## Results | Check | Result | Note | |---|---|---| | Diff and included changed files | passed | Six changed files read | | Oversized changed files | not run | Two files could not be read | | Build and tests | not run | No commands run | ## Findings ### Blocking None found in the code inspected. ### Non-blocking None. ## Not verified `core/libs/prx/libSceNKWebKit/Export.cpp` and `core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp` were excluded from the review folder as too large and were not read. The changed test was read, but not executed. No build, ABI check, or console behavior was verified. ## To get this to a good state Nothing is required.
MarcZX10 commented 2026-11-21 05:56:41 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-21T05:56:41Z.

Review: COMMENTED


Reviewed — no blocking findings

Nothing blocks this change; the points below are optional.

What I ran

Reviewed head 397620161240fcb88a07e7aae459350c6501c067 using the prepared description, commits, manifest, and diff, plus targeted source reads through repo_read.py. No commands or tests were run by me.

Read all added lines in include/LoggedInStatusExports.hpp, libSceNKWebKit.hpp, src/LoggedInStatus.cpp, src/LoggedInStatusAbi.hpp, tests/LoggedInStatus.cpp, and docs/dev/debt/changes/feat-nkwebkit-logged-in-status.md; also read relevant MediaTypes.hpp lines and review/README.md. Export.cpp and include/InventoryExports.hpp were excluded from the prepared folder as too large; their changed hunks were inspected in diff.patch.

Results

Check Result Note
Source review passed Reviewed included changed lines
Excluded changed files not run Not read at the pinned head
Tests not run Author reports 87 tests passed

Findings

Blocking

None identified in the source inspected. A complete approval is not justified because two changed files were not read at the pinned head.

Non-blocking

None.

Not verified

The full contents of core/libs/prx/libSceNKWebKit/Export.cpp and core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp were not read; only their changed hunks in diff.patch were reviewed. Tests reported in the PR description were not run by me. Console behavior and the ABI measurements described by the author were not independently verified.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6003345187 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/20304#pullrequestreview-6003345187). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-21T05:56:41Z. **Review:** COMMENTED --- # Reviewed — no blocking findings Nothing blocks this change; the points below are optional. ## What I ran Reviewed head `397620161240fcb88a07e7aae459350c6501c067` using the prepared description, commits, manifest, and diff, plus targeted source reads through `repo_read.py`. No commands or tests were run by me. Read all added lines in `include/LoggedInStatusExports.hpp`, `libSceNKWebKit.hpp`, `src/LoggedInStatus.cpp`, `src/LoggedInStatusAbi.hpp`, `tests/LoggedInStatus.cpp`, and `docs/dev/debt/changes/feat-nkwebkit-logged-in-status.md`; also read relevant `MediaTypes.hpp` lines and `review/README.md`. `Export.cpp` and `include/InventoryExports.hpp` were excluded from the prepared folder as too large; their changed hunks were inspected in `diff.patch`. ## Results | Check | Result | Note | |---|---|---| | Source review | passed | Reviewed included changed lines | | Excluded changed files | not run | Not read at the pinned head | | Tests | not run | Author reports 87 tests passed | ## Findings ### Blocking None identified in the source inspected. A complete approval is not justified because two changed files were not read at the pinned head. ### Non-blocking None. ## Not verified The full contents of `core/libs/prx/libSceNKWebKit/Export.cpp` and `core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp` were not read; only their changed hunks in `diff.patch` were reviewed. Tests reported in the PR description were not run by me. Console behavior and the ABI measurements described by the author were not independently verified. ## To get this to a good state Nothing is required.
MarcZX10 commented 2026-11-25 12:45:31 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-25T12:45:31Z.

Review: COMMENTED


Reviewed — comments

The review folder and pinned repository sources could not be read in this session, so no code findings are verified.

What I ran

Not run. No reader command or repository checks were available.

Results

Check Result Note
Source review not run Review materials unavailable
Programmatic checks not run No checks run

Findings

Blocking

None verified.

Non-blocking

None.

Not verified

Could not read description.md, commits.md, diff.patch, manifest.json, files.json, or any repository files. Files read: none. Files listed for review: not verified.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6057847403 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/20304#pullrequestreview-6057847403). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-25T12:45:31Z. **Review:** COMMENTED --- # Reviewed — comments The review folder and pinned repository sources could not be read in this session, so no code findings are verified. ## What I ran Not run. No reader command or repository checks were available. ## Results | Check | Result | Note | |---|---|---| | Source review | not run | Review materials unavailable | | Programmatic checks | not run | No checks run | ## Findings ### Blocking None verified. ### Non-blocking None. ## Not verified Could not read `description.md`, `commits.md`, `diff.patch`, `manifest.json`, `files.json`, or any repository files. Files read: none. Files listed for review: not verified. ## To get this to a good state Nothing is required.
ligmaSec commented 2026-12-03 12:05:18 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by ligmaSec on 2026-12-03T12:05:18Z.

Review: COMMENTED


Compiled the changed LoggedInStatus implementation and branch fixture against the existing Linux PRXs, including the ICU dependency. The fixture passed.

AI-assisted: yes.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6169422027 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/20304#pullrequestreview-6169422027). Originally posted by [ligmaSec](https://github.com/ligmaSec) on 2026-12-03T12:05:18Z. **Review:** COMMENTED --- Compiled the changed LoggedInStatus implementation and branch fixture against the existing Linux PRXs, including the ICU dependency. The fixture passed. AI-assisted: yes.

Pull request closed

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!20304
No description provided.