PR #2963 review history
Unit 1A · identity, Account and public JOIN
Review rounds
Three-number pills mean: found (raw) / accepted here (useful) / routed
Recorded review history
Reviews and findings
- Hosted Review 1 CompletedRuntime 17m 17sFound: 2 Accepted: 1/1/0 Routed: 0
- Add the carrier status to the capability table.Minor
Line 11 records opaque Account-carrier preparation, but the
AA-2.1Capability Status row at Line 41 does not mention it. Update that row with the relevant production anchors and proof limits.As per coding guidelines, “the capability rows are the complete scan-first status surface.”
- Accepted Accept AA-2.1 carrier anchors and honest proof limits in the capability row. The status paragraph alone does not expose this preparation in the scan-first table.
- Guard mismatched session aliases before deleting indexes.Major
Gateway paths derive transport IDs from request or WebSocket identity, not tenant identity, so a different-tenant live owner is not an expected valid allocation. However, if Redis contains a mismatched alias,
deleteBySessionIdstill callsdeleteIndexes(operations, existingSessionContext). That deletes the alias owner's tenant context and gameplay-identity indexes.Only delete
existingSessionContextwhen itstenantIdandsessionIdmatch the requested values.- if (!Objects.equals(existing, existingSessionContext)) { + if (existingSessionContext != null + && existingSessionContext.tenantId() == tenantId + && existingSessionContext.sessionId() == sessionId + && !Objects.equals(existing, existingSessionContext)) { deleteIndexes(operations, existingSessionContext); }- Accepted Accept tenant/session identity guards before deleting alias-owned indexes. A mismatched Redis alias must not remove another tenant or session context; add both mismatch fixtures and valid cleanup proof.
- CLI Review 1 CompletedRuntime 3m 01sFound: 0 Accepted: 0/0/0 Routed: 0
- No findings recorded for this run
- Subagent Review 1 CompletedModel not recordedFound: 1 Accepted: 1 Routed: 0
- Clarify prepared internal carriers versus absent UUID valuesMinor
Reviewed the whole 95-file ca2dc20bf boundary. Remaining proof: genuine pre-change Redis payload deserialization and same-session recovery; live Redis/runtime unrun.
- Accepted The published diff changes internal Account-ID carrier types while numeric producers remain; clarify that UUID values and Entity activation are not implemented.
- CLI Review 2 CompletedRuntime 2m 52sFound: 2 Accepted: 0/0/1 Routed: 0
- Trivial
Document in the write flow of RedisAccountRecentPresenceService that the retained-value check before valueOps.set is best-effort: it adds a Redis read, is not atomic with the write, and cannot prevent a concurrent writer from replacing the value.
- Accepted Add the requested comment: the retained-value read is best-effort, adds a read, and is not atomic with set. Do not claim concurrent-write retention proof.
- Trivial
Normalize accountId to its canonical long-string form in the SessionContext compact constructor so sameGameplayIdentity treats numerically equivalent values such as "077" and "77" as equal; preserve existing handling of absent or invalid account IDs.
- Rejected Account IDs are intentionally opaque internal carriers with exact string identity. Numeric producers already stringify validated longs canonically; adding long coercion here creates aliases and conflicts with the approved UUID carrier direction.
- Subagent Review 2 CompletedModel not recordedFound: 0 Accepted: 0 Routed: 0
- No findings recorded for this run
- CLI Review 3 CompletedRuntime 3m 00sFound: 4 Accepted: 0/0/2 Routed: 0
- Minor
Normalize accountId with normalizeText in SessionContext’s compact constructor, alongside the other text fields, so whitespace is trimmed before identity comparisons.
- Rejected Account identity is opaque exact evidence, not display text. Trimming makes distinct malformed carriers aliases; current numeric producers already stringify validated values. No canonical contract authorizes normalization.
- Trivial
Update the SESSION_CONTEXT fixture in EntityManagementClientTest to use a non-null accountId, replacing the null third argument with a realistic value; keep the existing test behavior unchanged.
- Accepted Use a realistic non-null Account carrier in the routing-negative fixture so tests isolate the intended missing/legacy routing guard without accidentally introducing an unauthenticated context.
- Trivial
Remove the non-atomic Redis GET and its exception handling from the write path in RedisAccountRecentPresenceService, which runs for every recordActivity call. Preserve the existing SET behavior unless unreadable-value preservation is an explicit requirement; if it is, use an atomic Redis operation rather than a read-then-write check.
- Accepted Unreadable retained-value preservation is explicit. Replace the non-atomic read-before-write with a watched Redis transaction/retry and deterministic abort/no-overwrite proof; retain the existing TTL/value semantics.
- Minor
Update the account ownership check in PlayCommandHandler to compare normalized positive-long account IDs using the same parsing approach as the membership check, rather than comparing raw strings; preserve the existing rejection behavior when the IDs differ or cannot be parsed.
- Rejected Exact persisted Account ownership must match the trusted opaque carrier. Long coercion aliases distinct strings (077/77) and conflicts with UUID convergence; numeric producers already emit canonical decimal values.
- CLI Review 4 CompletedRuntime 3m 28sFound: 3 Accepted: 1/1/0 Routed: 0
- Minor
Update validateModerationPolicy to handle IllegalArgumentException from PositiveLongParsing.requireOptionalText when accountId is missing or non-positive, returning a bounded failure result such as AUTH_UNAVAILABLE instead of letting the exception escape through handle.
- Rejected Rejected: validateRuntimeAdmission already verifies membership and context Account as positive numeric with caught parse errors before character lookup or moderation. Invalid text cannot reach this seam.
- Major
Update account ID parsing in persistAcceptedCommand to use the lenient PositiveLongParsing API and take its optional value, so malformed or non-positive text leaves the account column null instead of throwing from enqueue.
- Accepted Partially accepted: contain the staging parse failure with a bounded result before any durable command write. Reject lenient omission, which would discard Account evidence.
- Minor
Update numericAccountId and the FRIENDS command handling path so an invalid or non-positive session accountId returns the appropriate bounded FRIEND_*_UNAVAILABLE result instead of allowing IllegalArgumentException to escape. Preserve the existing long-ID behavior for valid account IDs.
- Accepted Accepted: invalid or unsupported Account text must yield the action-specific FRIEND_*_UNAVAILABLE without Social mutation, while preserving valid numeric behavior.
- Hosted Review 2 CompletedRuntime 12m 31sFound: 3 Accepted: 2/0/1 Routed: 0
- Omit invalid optional account IDs when staging commands.Major
enqueuecallspersistAcceptedCommandbefore thetryblock that handlesIllegalArgumentException. A retained nonblank account ID is considered an identity bySessionContext, even when it is not numeric.requireOptionalTextcan therefore escapeenqueueand prevent the command result from being returned.The
account_idcolumn is nullable numeric evidence. Omit invalid text instead of rejecting the command:- .flatMap(id -> PositiveLongParsing.requireOptionalText(id, "accountId")) + .flatMap(id -> PositiveLongParsing.parseOptionalText(id, "accountId").optionalValue())- Accepted Partially accepted: return a bounded failure for unsupported Account text before durable staging; do not silently omit Account evidence or activate UUID command ownership.
- Test account-index lookup with a nonnumeric Account ID.Trivial
The current
"102"fixture cannot detect a regression that converts the opaque String Account ID to a number and back. Add one nonnumeric ID and assert the exact ID in both the Redis account-index key and the result map key.- Accepted Accepted: prove account-index lookup preserves a nonnumeric opaque Account string in both the Redis key and returned map.
- Save deletes indexes of a mismatched alias owner.Major
savedeletes indexes forexistingSessionContextwhenever it differs fromexistingContext. UnlikedeleteBySessionId, it does not check that tenant and session IDs match. A mismatched alias would remove another tenant's context and identity indexes. This repeats the earlier review finding for the save path. Add the same guard.Proposed fix
- if (!Objects.equals(existingContext, existingSessionContext)) { + if (existingSessionContext != null + && existingSessionContext.tenantId() == context.tenantId() + && existingSessionContext.sessionId() == context.sessionId() + && !Objects.equals(existingContext, existingSessionContext)) {Also applies to: 86-88
- Accepted Accepted: save must verify the prior session alias tenant/session ownership before deleting indexes. Add cross-tenant and mismatched-session regressions.
- CLI Review 5 CompletedRuntime 2m 22sFound: 4 Accepted: 0/3/0 Routed: 0
- Minor
In LoginCommandHandler, validate verifiedContext.accountId() before passing it to PositiveLongParsing.requireOptionalText; if it is non-numeric, return the bounded CONNECT_CONTEXT_INVALID result instead of allowing IllegalArgumentException to escape.
- Accepted Accept bounded CONNECT_CONTEXT_INVALID for absent/non-positive/non-numeric verified account before login persistence; preserve retained/session cleanup and current numeric authentication boundary. Focused no-mutation denial proof pending.
- Minor
Update register in RedisFirstPartyConnectContextRegistry so it does not silently return when the retained value is unreadable; either log the preserved conflict and throw an explicit error, or overwrite the unreadable record with the freshly verified connectContext.
- Accepted Partially accepted: register must explicitly fail when retained bytes/type are unreadable, preserving them; WebSocket bootstrap must deny without a new shell. Overwriting retained evidence is rejected. Focused registry and bootstrap proof pending.
- Minor
In GameLogicClient, guard each accountId value read from SessionContext.accountId() before passing it to a protobuf setter, including all three affected call sites; use an empty string for null so the setter never receives null.
- Accepted Accept null-safe absent Account protobuf fields at all three GameLogic call sites; preserve opaque non-null values, attestation and routing checks. Prove no null setter failure without weakening identity authorization.
- Trivial
Guard the account-ID parsing in PlayCommandHandler.handle so a non-numeric ID cannot escape as an exception; return the existing bounded identity-unavailable failure when parsing fails. Keep the roster membership validation flow unchanged, since it should reject invalid IDs first.
- Rejected Duplicate unreachable parse: PLAY first calls isSafeMembershipAuthorityResponse, which parses both immutable session and response account IDs inside its caught block before roster lookup or final parsing. Invalid identity already returns the bounded denial.
- Hosted Review 3 CompletedRuntime 13m 15sFound: 0 Accepted: 0/0/0 Routed: 0
- No findings recorded for this run
- CLI Review 6 CompletedRuntime 2m 05sFound: 1 Accepted: 0/0/0 Routed: 0
- Minor
In validateModerationPolicy, handle IllegalArgumentException from parsing context.accountId() and return the established PLAY_IDENTITY_UNAVAILABLE failure instead of allowing it to escape; alternatively, parse once before admission begins and reuse the validated numeric ID for the moderation call.
- Rejected Duplicate unreachable parse: validateRuntimeAdmission runs first; isSafeMembershipAuthorityResponse parses both immutable account IDs inside a caught IllegalArgumentException boundary, returning before roster/moderation on malformed input.
- CLI Review 7 CompletedRuntime 3m 42sFound: 3 Accepted: 1/1/0 Routed: 0
- Minor
Narrow the incompatible-record claim in the tracking entry: do not state that all retained JDK-serialized carrier records fail closed. Clarify that handling is only verified on covered paths and that RedisGameplayPresenceService.removeBySessionId, setExplicitAfk, and recordCommandActivity, plus RedisSessionContextService.readContext, save, and deleteBySessionId, may still throw SerializationException.
- Accepted Narrow tracker claims to tested paths. Explicitly distinguish no-mutation preservation from bounded handling, and disclose raw SessionContext mutation decode exceptions and unavailable live retained-record recovery proof.
- Minor
In PlayCommandHandler.handle, validate the account ID before calling validateModerationPolicy and return the existing identity-unavailable failure when it is opaque or malformed. Pass the validated ID through to moderation validation so this path cannot throw an uncaught IllegalArgumentException.
- Rejected Duplicate unreachable parse: validateRuntimeAdmission precedes roster and moderation; membership validation parses both immutable account IDs in a caught IllegalArgumentException boundary and returns failure for malformed values.
- Major
Update removeBySessionId, setExplicitAfk, and recordCommandActivity to guard reads of retained presence values against SerializationException and ClassCastException. When a value is unreadable, skip using it and deliberately overwrite or delete the relevant key so registration and activity updates can proceed.
- Accepted Partially accept bounded retained-value guards and regression coverage on presence mutation reads. Preserve unreadable keys/indexes and reject before mutation; explicitly reject the suggested destructive overwrite/delete because provenance is unresolved.
- CLI Review 8 CompletedRuntime 2m 47sFound: 1 Accepted: 0/0/0 Routed: 0
- Minor
Handle account ID parsing in the moderation admission flow in handle so an opaque or non-positive context.accountId() does not let IllegalArgumentException escape; map the parse failure to characterIdentityUnavailableFailure or authorityUnavailableFailure and return it as a typed PlayerOutput error.
- Rejected Repeated unreachable parse: immutable SessionContext is first checked by validateRuntimeAdmission; membership validation rejects malformed/opaque/nonpositive Account IDs inside its caught parser boundary before moderation can execute.
- CLI Review 9 CompletedRuntime 2m 46sFound: 1 Accepted: 0/0/0 Routed: 0
- Minor
Update the PLAY moderation-policy validation in validateModerationPolicy to parse context.accountId() before any remote calls; on invalid or non-positive input, return the existing bounded typed failure instead of allowing IllegalArgumentException to escape. Pass the validated numeric ID to evaluateGameplayAdmission and preserve the established failure pattern used by FriendsCommandHandler or CommandServiceImpl.
- Rejected Duplicate unreachable parse claim: validateRuntimeAdmission validates membership identity via PositiveLongParsing inside caught IllegalArgumentException before moderation. Malformed/nonpositive immutable context already returns bounded denial; no mutation or remote moderation call.
- CLI Review 10 CompletedRuntime 3m 07sFound: 1 Accepted: 0/1/0 Routed: 0
- Minor
Update the exhausted-retry path in
writeto log the failed recent-presence update and return instead of throwingIllegalStateException. KeeprecordConnectedandrecordActivitybest-effort so retry exhaustion does not fail gameplay commands, matching the existing handling for unreadable evidence.- Accepted Accepted: recent presence is a best-effort projection, yet eight WATCH conflicts currently throw through connected/activity lifecycle. Exhaustion should warn and return without committed replacement, deletion or authority changes; add bounded retry regression for callers.
- CLI Review 11 CompletedRuntime 2m 14sFound: 1 Accepted: 0/1/0 Routed: 0
- Minor
Update the self-link guards in FriendsCommandHandler to compare target.friendAccountId() with the parsed numeric session account ID from numericAccountId(context), rather than comparing decimal strings; apply this to both guards so accepted forms such as leading-zero or explicitly signed IDs cannot bypass the check.
- Accepted Minor: Friends guards compare decimal text although the numeric Social boundary accepts leading-zero or plus-prefixed session IDs. Compare parsed numeric values in both guards and prove self-add/remove performs no mutation; no UUID activation.
- CLI Review 12 CompletedRuntime 4m 09sFound: 0 Accepted: 0/0/0 Routed: 0
- No findings recorded for this run
- CLI Review 13 CompletedRuntime 2m 03sFound: 1 Accepted: 0/0/0 Routed: 0
- Minor
Parse the account ID once before gameplay admission in PlayCommandHandler and handle parsing failure as a bounded PLAY failure using the existing characterIdentityUnavailableFailure or AUTH_UNAVAILABLE path, following FriendsCommandHandler.accountIdUnavailable. Pass the parsed numeric ID to evaluateGameplayAdmission so parse exceptions cannot escape handle().
- Rejected Repeated unreachable parse failure: validateRuntimeAdmission validates the matching positive Account identity before moderation, isSuccessfulAdmission catches malformed identity, and immutable SessionContext cannot change between these gates. Verified lines232,915; prior5971544997.
Routed Findings
No routes recorded
Unlinked items
no items unlinked