PR #2840 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
- Subagent Review 1 CompletedModel not recordedFound: 4 Accepted: 2 Routed: 0
- Malformed discovery stateScope escapes as client input error
- Accepted Reachable malformed routing authority must return ADMISSION_POINTER_UNAVAILABLE; fixed with Account discovery negatives in 1f42f38b3.
- PLAY may classify missing membership before public joining policy
- Rejected Not a new #2840 obligation: #2873's published Unit 1B scope already explicitly corrects PLAY entitlement and public-join ordering.
- Non-public connect-token grant check remains incomplete against target contract
- Rejected The owning architecture and tracker already disclose this target-state gap; it was not introduced by the reviewed #2840 unique patch.
- Blank tenantless email OTP request lacks stable INVALID_ARGUMENT result
- Accepted Blank input escaped EmailCanonicalization as an unclassified exception; fixed with no-service-interaction gRPC proof in 1f42f38b3.
- Subagent Review 2 CompletedModel not recordedFound: 8 Accepted: 6 Routed: 0
- OpenAPI advertised success for 501-only login-auth-modes PUT
- Accepted Removed fictional 200 response and validated OpenAPI parse in 4e1de6d59.
- Successful different-account LOGIN retained prior gameplay presence
- Accepted Fixed with clear-before-replace and same-account preservation proof in 4e1de6d59.
- Second lens repeated public recovery mail-failure observation
- Rejected Duplicate of public-recovery-mail-failure-oracle in the same three-lens pass; no second obligation.
- CHARS classified membership before fresh entitlement and public joining policy
- Accepted Fixed public/private classification and entitlement ordering with negative tests in 4e1de6d59.
- Tenantless Account Authenticate contract test still asserted tenant_id
- Accepted Removed stale TCP Proxy cross-service assertion in 4e1de6d59.
- Public recovery initiation leaked delivery failure after commit
- Accepted Contained post-commit SMTP exceptions with neutral response tests in 4e1de6d59; synchronous latency gap remains disclosed.
- Tracker misstated shared-runtime entitlement-row behavior
- Accepted Aligned implementation-tracker and player-access status wording in 4e1de6d59.
- Second lens repeated CHARS entitlement and membership ordering
- Rejected Duplicate of chars-entitlement-membership-order in the same three-lens pass; no second obligation.
- Subagent Review 3 CompletedModel not recordedFound: 2 Accepted: 2 Routed: 0
- Present but non-admitting membership returned false JOIN_REQUIRED
- Accepted Fixed connect-token and character-discovery classification with public/private negative tests in 2c12c135e.
- Successful LOGIN enqueued gameplay against the previous account
- Accepted Fixed credential and OTP LOGIN account-context update with interpreter LOGIN to PLAY to LOOK proof in 2c12c135e.
- Subagent Review 4 CompletedModel not recordedFound: 1 Accepted: 1 Routed: 0
- Four bootstrap/connect OpenAPI operations omit reachable retryable 503 responses
- Accepted AuthenticationExceptionHandler maps AUTH_UNAVAILABLE and ENTITLEMENT_UNAVAILABLE to structured 503; added a shared response and four operation references, with YAML and Redocly validation.
- Subagent Review 5 CompletedModel not recordedFound: 0 Accepted: 0 Routed: 0
- No findings recorded for this run
- Subagent Review 6 CompletedModel not recordedFound: 4 Accepted: 3 Routed: 0
- Strict entitlement read has no first-row provisioning source
- Rejected Real rollout/design gate, but the owning tracker already says authoritative initial billing-owner source is undefined and creation is disabled; no safe backfill/provisioning can be inferred in this PR. Reported to Overseer for the owner decision, without weakening fail-closed reads.
- Neutral recovery email failure gives operators no failure class
- Accepted Failure log now records safe exception class without recipient, token, or SMTP message and a focused test proves this while retaining neutral public response; durable delivery remains a separate target gap; publication commit pending.
- Admission pointer owner failure can become a client 401
- Accepted INTERNAL and availability failures now map to AUTH_UNAVAILABLE while known invalid selectors retain ADMISSION_POINTER_UNAVAILABLE; focused client tests passed; publication commit pending.
- Subscription repository outage escapes retryable entitlement classification
- Accepted Account entitlement authority now maps DataAccessException to ENTITLEMENT_UNAVAILABLE without changing exactly-one-row or billing-denial semantics; focused test passed; publication commit pending.
- Subagent Review 7 CompletedModel not recordedFound: 2 Accepted: 2 Routed: 0
- Malformed retained stateScope can reach successful PLAY despite writer validation
- Accepted Legacy varchar rows can pass current bundle completeness and become UNSPECIFIED during character lookup; exact-value consumer validation and no-binding proof are required.
- Different-account credential LOGIN can leave prior first-party identity recoverable
- Accepted Registry-first bare LOGIN can restore prior account A after credential LOGIN changes the session to B; delegated a scoped invalidation and negative sequence test.
- Subagent Review 8 CompletedModel not recordedFound: 5 Accepted: 1 Routed: 0
- Generated gRPC reference still documents removed Account login fields and omits email OTP messages
- Accepted The changed Account proto and checked-in generated reference disagree; regenerate and prove the reference from exact proto sources.
- Possible Game Session client application-error suppression
- Rejected Low-confidence, pre-existing observation without a demonstrated changed-path failure or exact contract violation.
- Global registration creates an admitting membership in the reviewed parent
- Rejected Pre-existing Account gap already tracked in the source PR; downstream #2848 head 8f724357 has global account creation without membership mutation and owns the explicit JOIN boundary.
- Possible raw-path Gateway split bypass
- Rejected No reachable broad route or concrete bypass through the changed Gateway path was demonstrated.
- PLAY membership and entitlement order remains incomplete at reviewed parent
- Rejected Existing Unit 1B tracked gap with downstream #2898 admission proof; not introduced by this 63-path Account patch.
- Subagent Review 9 CompletedModel not recordedFound: 3 Accepted: 0 Routed: 0
- Public email-verification issuance flood
- Rejected Existing email-selected password-reset and username-recovery sends expose the same flood. ADR 0034 and Account runtime already mark layered abuse/durable delivery unimplemented. Report the Account activation gap to Overseer; this patch creates no distinct new authority boundary.
- Connect-token replay is not atomic
- Rejected Inherited and explicitly tracked durable replay gap, not introduced by this unique patch. Requires separate operation-claim and database proof.
- Private realm grant omitted at connect-token issuance
- Rejected Inherited and explicitly tracked Account issuance gap, not introduced by this unique patch. Requires separate fresh-grant authority convergence.
- Subagent Review 10 CompletedModel not recordedFound: 6 Accepted: 0 Routed: 0
- List response errors can be suppressed
- Rejected Inherited documented response-level gRPC classification gap, not introduced by this patch.
- Connect-token replay freshness and JTI
- Rejected Inherited documented replay/response drift, not introduced by this patch.
- PLAY admission ordering
- Rejected Inherited player-stage ordering gap, already owned and corrected in downstream #2898; not a #2840 unique-diff defect.
- Runtime gRPC caller binding incomplete
- Rejected Inherited documented workload/caller-bound interface gap, not introduced by this patch.
- Entitlement version lacks authority evidence
- Rejected Inherited documented target-state gap; current subscription-ID projection predates this patch.
- Private realm grant omitted at issuance
- Rejected Duplicate of the independent authority-lens observation and inherited documented issuance gap; no second source-owned obligation.
- CLI Review 1 CompletedRuntime 4m 48sFound: 3 Accepted: 0/2/1 Routed: 0
- Minor
Update the French error.play.entitlement-unavailable message to describe gameplay entitlement as temporarily unavailable, without implying a subscription or billing-specific cause; retain the existing instruction to retry PLAY shortly.
- Accepted French retry message must describe gameplay entitlement authority, not subscription/billing; align with owning English presentation contract.
- Trivial
Update routingAuthorityUnavailable to return RuntimeException and return the original StatusRuntimeException for non-retryable statuses instead of throwing inside the helper. Keep returning AuthenticationException for UNAVAILABLE and DEADLINE_EXCEEDED so callers can consistently throw the helper’s result.
- Accepted Return original non-retryable exception from helper for consistent caller throw style; retain retryable AUTH_UNAVAILABLE mapping.
- Minor
Replace the in-place sed cleanup of grpc-api.md with a portable temporary-file workflow, trimming trailing whitespace and removing all trailing blank lines before replacing the original file.
- Accepted Portable temporary-file cleanup removes all trailing blank lines and whitespace, preserving generated documentation content.
- CLI Review 2 CompletedRuntime 6m 08sFound: 4 Accepted: 1/3/0 Routed: 0
- Major
Isolate discovery failures at the per-realm boundary in hasAdmissibleRealm and listBootstrapRealms so entitlement and malformed admission-pointer faults omit only the affected realm instead of failing the request. Keep strict fail-closed behavior in selected-target connect-token and character-discovery paths. Reuse a per-request memo keyed by tenant for subscriptionRepository.findByTenantId lookups to avoid repeated reads across realms.
- Accepted Partially accepted: request-local tenant entitlement memo avoids repeated discovery reads. Reject fault omission: canonical REALMS reports malformed/unavailable authority; preserve those errors and strict selected-target checks.
- Minor
Update the Cycle 8 paragraph to scope its membership and JOIN_REQUIRED ordering claims explicitly to Account bootstrap character discovery and connect-token issuance; state that text PLAY ordering remains the open 1B gap recorded under AA-2.1, keeping the tracker’s status, implementation record, and gap sections aligned.
- Accepted Accepted tracker correction: scope Account ordering proof explicitly and retain the open text PLAY gap.
- Minor
Keep the complete
session_iddescription within its table row in the generated gRPC API documentation; update the source.protocomment or generator output to include an explicit line break so the opaque-identifier sentence does not render as plain text outside the table.- Accepted Accepted source-owned generated table correction; fix the proto comment and regenerate, preserving protocol semantics.
- Minor
Update the runtime-status text for connect-token issuance and text PLAY to state each surface’s current result separately when membership exists but gameplayAdmissionAllowed is false. Align the connect-token result with the Account API contract, and preserve that this case is not classified as INACTIVE and does not make explicit JOIN available.
- Accepted Accepted current-status correction: non-admitting membership yields Account CONNECT_TOKEN_REJECTED, not an implemented universal JOIN_REQUIRED.
- Hosted Review 1 CompletedRuntime 10m 00sFound: 6 Accepted: 1/3/1 Routed: 0
- Make the current
JOIN_REQUIREDmapping endpoint-specific.MinorThe text at Lines 23 and 142 groups connect-token issuance, character discovery, and text
PLAYbefore saying a present non-admitting membership may produceJOIN_REQUIRED. Line 271 says connect-token issuance and character discovery return it only when membership is absent; only textPLAYalso returns it for present non-admitting membership. State that split consistently and keep targetINACTIVEbehavior separate.As per path instructions, “Review docs for canonical-current-state consistency.”
Also applies to: 142-142
- Accepted Fixed endpoint-specific Account versus text PLAY status in e9df29afb, preserved in ec396b2a8; canonical documentation checks pass.
- Remove LOGIN enqueue verifications that now contradict
LoginCommandHandler.MajorLoginCommandHandlerno longer callsCommandService.enqueuefor LOGIN. Two assertions still require that call:- Line 491:
verify(commandService).enqueue("41", "LOGIN demo@example.com swordfish", false). - Line 864: the same verification.
TextCommandInterpreterTestLine 980 now assertsnever()for the same call. These Docker-gated tests will fail when Docker is available. Change both assertions tonever()or delete them. Also remove the dead LOGIN stubs on Lines 310, 317 and 329.🐛 Proposed fix
- verify(commandService).enqueue("41", "LOGIN demo@example.com swordfish", false); + verify(commandService, never()).enqueue("41", "LOGIN demo@example.com swordfish", false);Also applies to: 1162-1162
- Accepted Removed stale LOGIN enqueue stubs and asserted never-enqueue in e9df29afb; integration compiles, 27 Docker cases skipped locally; focused behavior tests pass.
- Line 491:
- Add a discovery test for a tenant whose entitlement is unavailable.Trivial
The new tests cover
ENTITLEMENT_UNAVAILABLEfor the direct read, for connect-token retry, and for character discovery. No test coverslistBootstrapWorldsorlistBootstrapRealmswhen a different tenant's realm has zero or multiple subscription rows. Add a case with two public realms in one world: tenant 7 has an active subscription and tenant 8 hasList.of(). Assert that the tenant-7 realm is still returned. This test protects the fix proposed forAccountServiceImpl.javaLine 820.- Rejected Silent omission contradicts canonical REALMS malformed/unavailable authority errors. Existing and new regression tests preserve explicit failure; unauthorized realms remain separately omitted.
- Map retryable discovery response errors the same way as
getAdmissionPointer.MinorgetAdmissionPointermaps the application error codesINTERNAL,UNAVAILABLE, andDEADLINE_EXCEEDEDtoAUTH_UNAVAILABLE.listGameplayWorldsandlistGameplayRealmsraiseIllegalStateExceptionfor every response error. This causes two different results for the same outage:listBootstrapRealmspropagates theIllegalStateException, so the caller gets a non-retryable 500 instead of the documented 503RetryableAuthenticationUnavailable.hasAdmissibleRealmcatchesIllegalStateExceptionand returnsfalse.listBootstrapWorldsthen omits the world silently and does not report an authority outage.
Apply the same code classification to both discovery methods.
Proposed fix
if (response.hasError()) { - throw new IllegalStateException( - "Gameplay world discovery failed: " + response.getError().getCode()); + throw discoveryFailure("Gameplay world discovery failed: ", response.getError().getCode()); }private static RuntimeException discoveryFailure(String prefix, String code) { if ("INTERNAL".equals(code) || "UNAVAILABLE".equals(code) || "DEADLINE_EXCEEDED".equals(code)) { return new AuthenticationException("AUTH_UNAVAILABLE", ROUTING_AUTHORITY_UNAVAILABLE_MESSAGE); } return new IllegalStateException(prefix + code); }Also applies to: 84-87
- Accepted Fixed retryable application-error classification in e9df29afb; 14 GameSessionClient tests and full Account check passed.
- Separate the corrected discovery behavior from the unresolved
PLAYbehavior.MinorLine 41 describes eligibility checks before
JOIN_REQUIREDas part of the current correction. TheAA-2.1row at Line 37 states that current textPLAYcan returnJOIN_REQUIREDbefore entitlement andallowPublicJoinchecks.Limit the implemented claim to the corrected Account discovery path. State that text
PLAYstill requires the Unit 1B correction. Otherwise, this implementation record makes the unresolved admission-outcome defect appear fixed.As per coding guidelines, “Keep its status, implementation record, validation, gaps, decisions, and service-map sections aligned.”
- Accepted Fixed Account-only ordering claim and explicit Unit1B PLAY gap in e9df29afb; linked tracker remains aligned.
- Remove the unused
commandparameter fromhandleVerifiedFirstPartyLogin.TrivialThis change removed
requiresSoloTickand the command enqueue. After that removal, the method body does not readcommand. PMD reportsUnusedFormalParameteron Line 200. Remove the parameter and update the call on Line 105.♻️ Proposed fix
- private LoginCommandHandlingResult handleVerifiedFirstPartyLogin( - String sessionId, TextCommand command) { + private LoginCommandHandlingResult handleVerifiedFirstPartyLogin(String sessionId) {- Accepted Removed unused first-party login parameter/callsite in e9df29afb; 79 focused login/interpreter tests pass.
- CLI Review 3 CompletedRuntime 8m 40sFound: 2 Accepted: 0/0/2 Routed: 0
- Trivial
Update credentialLoginAsDifferentAccountInvalidatesFirstPartyContextBeforeBareLogin to verify that unregister(1L) occurs before the subsequent bare-login registry lookup, rather than relying on the stub’s third-call Optional.empty() to produce rejection. Use an ordered interaction check tied to the handler’s save and registry calls, or make the stub return the context until unregister occurs.
- Accepted Accepted focused regression-proof correction: replace the call-count-based empty registry stub with state tied to unregister, proving a different-account credential login invalidates the first-party context before the next bare LOGIN; production semantics remain unchanged.
- Trivial
Extend listBootstrapWorldsKeepsEntitlementMemoIsolatedByTenant to cover tenant 8 having no entitlement rows while tenant 7 has an active row. Assert the intended behavior for the missing-row case—whether the demo world remains listed or the call fails—while preserving the existing tenant-isolation assertions.
- Accepted Accepted focused regression-proof extension: after the canceled-row tenant-isolation case, prove a fresh invocation with active tenant 7 and zero-row tenant 8 throws ENTITLEMENT_UNAVAILABLE rather than reusing tenant 7 authority or returning partial success; no discovery-error suppression.
- Hosted Review 2 CompletedRuntime 10m 23sFound: 4 Accepted: 1/1/0 Routed: 2
- Map authorization denials to 403, not 401.Minor
The new branch separates unavailable-authority codes from other codes. Every other code still returns
UNAUTHORIZED. Several codes that reach this handler are denials for a caller whose identity is already verified:CONNECT_TOKEN_REJECTEDNON_PUBLIC_ENROLLMENT_REQUIREDPUBLIC_PRODUCTION_ADMISSION_DENIEDJOIN_REQUIREDTENANT_BILLING_BLOCKED
For these codes, a 401 tells clients to authenticate again. Authenticating again cannot fix any of them. Return 403 for admission and policy denials. Keep 401 for identity and token failures, such as
INVALID_CREDENTIALSandCONNECT_CONTEXT_INVALID.Based on learnings: "use an 'unauthenticated' error … only when identity verification fails … When a permission/role check on an already-identified user fails … use … FORBIDDEN, 403."
🐛 Proposed fix
- HttpStatus status = - "AUTH_UNAVAILABLE".equals(ex.getCode()) || "ENTITLEMENT_UNAVAILABLE".equals(ex.getCode()) - ? HttpStatus.SERVICE_UNAVAILABLE - : HttpStatus.UNAUTHORIZED; + HttpStatus status = + switch (ex.getCode()) { + case "AUTH_UNAVAILABLE", "ENTITLEMENT_UNAVAILABLE" -> HttpStatus.SERVICE_UNAVAILABLE; + case "CONNECT_TOKEN_REJECTED", + "NON_PUBLIC_ENROLLMENT_REQUIRED", + "PUBLIC_PRODUCTION_ADMISSION_DENIED", + "JOIN_REQUIRED", + "TENANT_BILLING_BLOCKED" -> HttpStatus.FORBIDDEN; + default -> HttpStatus.UNAUTHORIZED; + };Before you change this, confirm that no client or the OpenAPI contract depends on 401 for these codes.
- Accepted Map authenticated authorization denials to HTTP 403 with unchanged error bodies; retain credential/token 401 and authority-outage 503. Focused handler and OpenAPI proof pending.
- Define the subscription cardinality before rejecting entitlement lookups.Major
The schema permits multiple subscription rows per tenant. If terminal rows remain as history,
subscriptions.size() != 1can reject a valid current subscription and returnENTITLEMENT_UNAVAILABLE. A retry does not resolve that data state.If each tenant must have one row, enforce that invariant with a migration and the subscription write path. If subscription history is valid, select the authoritative nonterminal row and report ambiguity only when multiple current rows exist.
Route · PR #2840 → Unassigned target OpenUnassigned Account Unit 1B entitlement-authority owner: prove current-row selector and writer/schema/history invariant. No live writer establishes history; raw-cardinality guard is documented fail-closed. Filtering nonterminal rows invents authority; receiving owner adjudicates. View routed finding - Clear the projected gameplay binding before replacing a cross-tenant session context.Major
existingbecomesnullwhen the projected context belongs to another tenant. The account-change cleanup then does not run. Saving the new T1 context overwrites the shared session key but leaves the T2 context and gameplay indexes in place.Do not require
projected.hasGameplayBinding(). Normalization can clear those fields before returning the projection, whileclearGameplayBindingstill removes presence by session ID.Proposed fix
- SessionContext existing = + SessionContext projected = sessionRoutingNormalizationService .resolveProjectedSessionContext(Long.toString(sessionId)) - .filter(context -> context.tenantId() == tenantId) .orElse(null); + SessionContext existing = + projected != null && projected.tenantId() == tenantId ? projected : null; boolean sameAuthenticatedAccount = existing != null && existing.accountId() == accountId; @@ - if (!sameAuthenticatedAccount && existing != null) { - gameplayPresenceLifecycleService.clearGameplayBinding(existing, "LOGIN_ACCOUNT_CHANGED"); + if (projected != null && projected.accountId() != accountId) { + gameplayPresenceLifecycleService.clearGameplayBinding( + projected, "LOGIN_ACCOUNT_CHANGED"); }- Accepted Retain full projected session context for different-account presence cleanup before saving; use tenant-matched context only for gameplay preservation. Add cross-tenant and normalized-context regression proof. No old-tenant key deletion or wider policy change.
- Throttle public verification requests and skip verified accounts.Major
The public endpoint creates and saves a new 24-hour
EmailVerificationTokenfor every matching account, without checkingaccount.isEmailVerified(). It then runs the SMTP call synchronously from theafterCommitcallback, so registered addresses can have higher response latency.A gateway-wide limiter exists, but no per-account or per-email suppression is visible. Apply a uniform client/email limit before account-specific work, return without issuing a token for verified accounts, and enqueue email delivery instead of performing SMTP on the request thread.
Skip verified accounts
if (accountOptional.isEmpty()) { return; } - issueEmailVerification(accountOptional.get(), true); + Account account = accountOptional.get(); + if (account.isEmailVerified()) { + return; + } + issueEmailVerification(account, true);Route · PR #2840 → Unassigned target OpenUnassigned Account credential-abuse/durable-mail owner: adjudicate uniform throttling, verified-address resend and durable delivery. Inherited gap is documented; ADR 0034 defines ownership, not limiter/resend policy. Receiving owner adjudicates; do not invent policy here. View routed finding
- CLI Review 4 CompletedRuntime 7m 03sFound: 2 Accepted: 0/2/0 Routed: 0
- Minor
Update the Unit 1A Cycle 8 section to track implementation status and the open AA-2.1 / Unit 1B gap, linking to the canonical architecture contract for the JOIN_REQUIRED eligibility order instead of defining that rule here. Move any missing contract detail to the canonical architecture source.
- Accepted Keep Unit1A Cycle8 implementation/proof status and text PLAY gap in the tracker, link canonical JOIN_REQUIRED eligibility instead of redefining the architecture rule. Focused documentation fix pending.
- Minor
Update the status notes to distinguish missing caller-supplied wire inputs from Account-side work: identify requestId as caller-supplied, requestDigest as computed by Account, and billing-owner resolution as Account responsibility rather than a request field. Keep the existing implementation-status details intact.
- Accepted Clarify caller-supplied requestId versus Account-computed digest and Account-resolved billing owner; preserve all unavailable CreateSubscription status gates. Focused documentation fix pending.
- CLI Review 5 CompletedRuntime 6m 11sFound: 3 Accepted: 0/1/1 Routed: 1
- Major
Add resend throttling to the public requestEmailVerification flow in AccountServiceImpl, using an established resendAvailableAt mechanism or reusing an unexpired verification token so repeated requests do not create new tokens or send additional email during the window. Preserve the neutral response for unknown addresses and the existing post-commit email behavior.
Route · PR #2840 → Unassigned target OpenUnassigned Account verification-abuse owner, same policy/delivery boundary as Hosted route55183898e0e5bd8a6bd3896fccee6132e4c2683a2a7267f7e5145e6a9673f686. Receiving owner judges resend/reuse window; OTP throttling is not an approved verification policy. Preserve neutral responses. View routed finding - Trivial
Remove the redundant setGameplayAdmissionAllowed(true) call in issueConnectTokenRejectsPresentNonAdmittingMembership; rely on membership()’s existing admitting default and retain the flip to false after discovery.
- Accepted Remove redundant admitting=true fixture assignment; retain the later false transition and nonadmitting membership rejection proof.
- Minor
Update the CreateSubscription description to identify the missing caller-supplied requestId, not a caller retry pair; preserve that Account computes requestDigest and leave the rest of the contract unchanged.
- Accepted Stripe CreateSubscription status must name missing caller requestId, not a caller retry pair; Account-computed digest and existing fail-closed gates stay intact.
- Hosted Review 3 CompletedRuntime 11m 03sFound: 10 Accepted: 10 Routed: 0
- Limit the revalidation claim to fresh issuance.Minor
Line 33 states that cached-success replay returns before fresh pointer, visibility, and membership reads. Line 62 describes connect-token revalidation without this exception. Add the fresh-issuance/cache-miss qualification so the implementation record does not imply current-authority checks on replay.
As per coding guidelines, “Keep its status, implementation record, validation, gaps, decisions, and service-map sections aligned.”
- Accepted Qualify tracked connect-token authority rechecks as fresh cache-miss issuance; retain documented cached-success replay and grant-validation gaps.
- Fix the vacuous
verify(..., never())assertion.MinorThe
never()verification uses a specific argument. It passes ifupdateLoginAuthModesis called with any other argument. Useany()matchers orverify(accountService, never()).updateLoginAuthModes(anyLong(), any()). Otherwise the test cannot detect a regression that calls the service with different arguments. Also, the earliergetLoginAuthModescall meansverifyNoInteractionsis not usable here, so the matcher form is the right fix.🐛 Proposed fix
- verify(accountService, never()) - .updateLoginAuthModes( - 42L, - new UpdateAccountLoginAuthModesRequest( - java.util.Set.of(AccountLoginAuthMode.EMAIL_OTP))); + verify(accountService, never()) + .updateLoginAuthModes( + org.mockito.ArgumentMatchers.anyLong(), org.mockito.ArgumentMatchers.any());- Accepted Use broad matchers for never-updateLoginAuthModes so unexpected arguments cannot make the no-dispatch assertion vacuous.
- Describe the envelope as proxy-owned transport metadata.Minor
design/project-management/implementation-tracking/player-access-and-session.md, Line 76, identifies bootstrap metadata as proxy-owned hidden transport context, not a player-visible attach command. “Client-provided SESSION envelope values” reintroduces the obsolete client attach model. Describe the canonical proxy-owned envelope and retain the advisory-value validation requirement.As per path instructions, “Flag obsolete transitional guidance” in the related design record; the supplied record establishes the current transport model.
- Accepted Describe SESSION as proxy-owned hidden transport metadata with mandatory advisory-value validation; no protocol behavior change.
- CodeRabbit summary-only outside-diff finding 1 of 1 (aggregate; no individual detail)
summary-only aggregate; provider supplied no individual detail
- Accepted Partially accepted: document intentional request validation before fail-closed 501. Retain distinct controller and service ingress gates; removing either creates misleading dispatch or an unguarded alternate ingress.
- Enforce exact mTLS authorization before generic payment mutations.Major
AuthTokenInterceptorrequires only a [redacted credential] for non-public RPCs.GrpcPeerIdentityInterceptorexposes the TLS identity but does not enforce authorization. The generic handlers then call Stripe. Add an explicit workload-and-method guard before each service call, or disable these RPCs until they are converged.- Accepted Disable unsupported generic payment intent, donation and refund RPCs before provider calls, as ADR0143 requires; do not alter typed hosting billing.
- Clear the projected binding whenever LOGIN discards it, not only when the account changes.Minor
persistSessionContextdrops gameplay fields when the projected tenant differs from the bootstrapGameInstancetenant. The current cleanup condition does not clear presence when the account remains the same. A reassigned bootstrap instance can leave the old session presence entry behind.🐛 Proposed fix
- if (projectedExisting != null && projectedExisting.accountId() != accountId) { + if (projectedExisting != null && !sameAuthenticatedAccount) { gameplayPresenceLifecycleService.clearGameplayBinding( - projectedExisting, "LOGIN_ACCOUNT_CHANGED"); + projectedExisting, + projectedExisting.accountId() != accountId + ? "LOGIN_ACCOUNT_CHANGED" + : "LOGIN_TENANT_CHANGED"); }- Accepted Clear discarded cross-tenant projected gameplay presence even for the same account; preserve account-change reason and add tenant-change regression.
- Strengthen the 404 assertion.Trivial
The test asserts only status 404. A 404 would also occur if the route never existed or if a security filter returned 404. The retrieved learning requires asserting more than the status code. Add an assertion on the response body (for example the error envelope or an empty body) so the test distinguishes the removed route from other failures.
Based on learnings: "do not rely solely on HTTP status code assertions. Also assert response body content".
- Accepted Strengthen removed-route integration proof with the attributable missing-route response body; preserve authentication and 404 semantics.
- Simplify the duplicated null-registry error construction.Trivial
The code builds
ErrorDetailtwice with ameterRegistry == nullbranch. This duplicates logic. It also bypassesGrpcAppErrorslogging and metrics when the registry is null. Other methods in this class always callGrpcAppErrors.error(meterRegistry, ...). Extract a small helper to keep one construction path.♻️ Proposed refactor
+ private net.firedevops.firemud.shared.v1.ErrorDetail errorDetail( + String code, String message) { + if (meterRegistry == null) { + return net.firedevops.firemud.shared.v1.ErrorDetail.newBuilder() + .setCode(code) + .setMessage(message) + .build(); + } + return GrpcAppErrors.error(meterRegistry, logger, "CreateSubscription", code, message); + }Then call
errorDetail("INVALID_ARGUMENT", ex.getMessage())anderrorDetail("FAILED_PRECONDITION", message).- Accepted Centralize PaymentGrpcService error construction including existing null-registry fallback, preserving error codes and fail-closed responses.
- Assert the identity fields of the credential-login save, not only
accountId.TrivialThe test checks that the second save has
accountId77. It does not checkloginNameorjwt. A regression could keep stale first-party fields while it switches the account. The test would still pass. AssertloginName"demo@example.com" andjwtAUTH_TOKENoncaptor.getAllValues().get(1). Based on learnings: "check that the test asserts the actual field(s) that determine the resulting identity/authorization outcome".Proposed assertions
assertEquals(77L, captor.getAllValues().get(1).accountId()); + assertEquals("demo@example.com", captor.getAllValues().get(1).loginName()); + assertEquals(AUTH_TOKEN, captor.getAllValues().get(1).jwt()); assertEquals(0L, captor.getAllValues().get(2).accountId());- Accepted Assert credential-login saved loginName and JWT as well as accountId in existing stateful invalidation regression.
- Keep billing-owner resolution out of the request-field list.Minor
Line 176 groups “billing-owner resolution” with inputs missing from the proto.
design/architecture/microservices/account-service/subscription-management.mdLines 16 and 18 state that Account resolves the owner and that owner resolution is not a request field. This wording can be read as requiring caller-supplied owner data. State that the proto lacks the caller-suppliedrequestIdand instrument-selection input; Account computes the digest and resolves and authorizes the owner server-side.As per path instructions, “Review docs for canonical-current-state consistency.”
- Accepted Correct local Stripe API consequence: caller requestId and instrument selection are absent; owner resolution and digest remain server-side.
- Hosted Review 4 CompletedRuntime 9m 17sFound: 5 Accepted: 5 Routed: 0
- Keep entitlement outages local to bootstrap discovery.Major
getTenantEntitlementsForRuntimethrowsAuthenticationException("ENTITLEMENT_UNAVAILABLE")when the subscription lookup fails or returns zero or multiple rows.hasAdmissibleRealmcatches onlyIllegalStateException, andlistBootstrapRealmshas no surrounding catch. One tenant can therefore make discovery fail for unrelated tenants.Handle
ENTITLEMENT_UNAVAILABLEas an unavailable discovery realm. Continue evaluating other realms. Keep fail-closed behavior for selected-target admission,listBootstrapCharacters, andissueConnectToken.- return isDiscoveryRealmAdmissible(bootstrapContext, target, discoveryEntitlementMemo) - ? Optional.of(target) - : Optional.empty(); + try { + return isDiscoveryRealmAdmissible(bootstrapContext, target, discoveryEntitlementMemo) + ? Optional.of(target) + : Optional.empty(); + } catch (AuthenticationException ex) { + if ("ENTITLEMENT_UNAVAILABLE".equals(ex.getCode())) { + return Optional.empty(); + } + throw ex; + }- Accepted Fix discovery-only ENTITLEMENT_UNAVAILABLE isolation across targets, retaining successful memoization and fail-closed selected-target admission; add regression proof.
- Remove the stale "provider-mutating drift" claim for the generic RPCs.Minor
Line 37 says that the current implementation still has provider-mutating drift for the generic PaymentIntent, refund, donation, and creator-share surfaces. This PR changes
PaymentGrpcServiceso thatCreatePaymentIntent,CreateDonation, andRefundPaymentreturnFAILED_PRECONDITIONbefore anyPaymentServicecall. ADR 0143 Line 9,api-contracts.mdLines 119-122, andstripe-integration.mdLine 22 already describe this fail-closed state. Update this README sentence to match those documents. Keep the remaining gap: the underlyingPaymentServicesubstrate is still present but unsupported.As per path instructions, review docs for "canonical-current-state consistency" and flag "conflicts between architecture docs."
📝 Proposed fix
-The target containment contract also requires generic PaymentIntent, refund, donation, and creator-share surfaces to reject before any provider mutation, but the current implementation retains provider-mutating drift; see +The generic `CreatePaymentIntent`, `CreateDonation`, and `RefundPayment` RPCs now reject with `FAILED_PRECONDITION` before `PaymentService` or provider invocation; the underlying generic service substrate remains present but unsupported; see- Accepted Correct stale README: generic payment RPCs fail before provider calls; retain unsupported service substrate gap.
- CodeRabbit summary-only outside-diff finding 1 of 1 (aggregate; no individual detail)
summary-only aggregate; provider supplied no individual detail
- Accepted Fix SessionResumption/TextInterpreter bootstrap roster tenant/account/playable-state/name and actor-ID fixtures; verify full focused suites. Outside-diff comment be364c05d3e465b78e9c3534.
- Update
ACCOUNT_MISMATCHto match the current first-partyLOGINbehavior.MinorLine 166 says bootstrap-backed
LOGINreturnsACCOUNT_MISMATCHwhen the resolved account differs from the validated connect-context subject.LoginCommandHandler.handleVerifiedFirstPartyLogin(lines 230-235) now does something else. If the projected session account differs from the connect-context account, the handler unregisters the connect context and returnsCONNECT_CONTEXT_INVALID.accountMismatchFailurewas removed.staleFirstPartyRegistryCannotReplacePersistedCredentialIdentityassertsCONNECT_CONTEXT_INVALID. The example in the "First-party/ws/game/**account-mismatch example" section (ERROR ACCOUNT_MISMATCH Bootstrap identity does not match ...) is also stale.Pick one of these fixes:
- Change the code-list entry and the example to
CONNECT_CONTEXT_INVALID. - Retire
ACCOUNT_MISMATCHas an emitted code. - Restore the
ACCOUNT_MISMATCHemission in the handler.
As per path instructions, this change must avoid conflicts between the architecture docs and the current state.
- Accepted Align protocol mismatch code and example with implemented CONNECT_CONTEXT_INVALID cleanup; do not restore obsolete ACCOUNT_MISMATCH.
- Change the code-list entry and the example to
- Non-identity workloads share one leaf key copied from the authority client.Minor
Eight services receive copies of
authority/client.crtandauthority/client.key. UnderGRPC_SERVER_CLIENT_AUTH: REQUIRE, each of these services presents the same identity. Any of these containers can authenticate as any of the others. Account, Game Session, and Entity Management bind authorization to SPIFFE identity. Those three services have distinct leaves, so this does not break their receiver checks. It does weaken the overlay comment that each workload "receives only its own leaf". It also weakens any future identity-based check on the other services. If those services are meant to have their own identities, generate a--workloadleaf for every service. Otherwise, change the overlay comment so it states that the leaf is shared.- Accepted Partially accepted: clarify local overlay shared leaves for eight non-identity workloads and three distinct authorized identities; no all-workload issuance expansion.
- Hosted Review 5 CompletedRuntime 15m 37sFound: 5 Accepted: 0/2/2 Routed: 1
- Assert the roster entry, not the bare string
demo.TrivialThis change renamed the fixture character from
Emberlinetodemo. The assertion now checkscontains("demo")against theCHARS demoresponse. The response already containsdemoas the world selector, so the assertion passes even when the roster is empty. Assert the rendered roster line instead.Proposed fix
- assertTrue(renderedResponse("CHARS demo", interpretation).contains("demo")); + assertTrue(renderedResponse("CHARS demo", interpretation).contains("demo [lvl 12]"));- Accepted Assert full rendered demo level-12 roster entry, not world selector substring; closes false-positive CHARS proof.
- Bound the generator subprocess execution.Trivial
If the generator hangs,
subprocess.run()waits indefinitely and blocks the test suite. Add a timeout sounittestreportsTimeoutExpiredinstead of waiting without a limit.Proposed change
check=False, + timeout=30,Based on learnings: “In Python code using subprocess.run()/subprocess.Popen() … flag missing timeout arguments.”
- Accepted Bound generator subprocess execution with finite timeout and focused harness proof; no generator output change.
- Prevent public registration from granting tenant membership.Major
POST /accountsaccepts a caller-suppliedtenantId. Account creation persists an admission-enabled membership for that tenant. Connect-token issuance checksallowPublicJoinonly when membership is absent, so this membership grants access even when public joining is disabled. Use global-only registration and require the explicit JOIN flow, or authorize the tenant before creating the membership. Keep deployment gated until this path is removed.Route · PR #2840 → PR #2847 Accepted/FixedRoute legacy tenant-selecting registration to canonical #2847 global-registration/JOIN owner. Current source retains the unsafe legacy seam; deployment must remain gated until replacement is published/proved. View routed finding - Propagate entitlement failures from REALMS discovery.Minor
REALMSrequires current entitlement evaluation. WhengetTenantEntitlementsForRuntimeraisesENTITLEMENT_UNAVAILABLE, the current code converts that authority failure intoOptional.empty(). The caller then returns a successful list that omits the realm. Update both discovery tests to assertENTITLEMENT_UNAVAILABLE, and remove this exception-to-empty conversion.Suggested production fix
- try { - return isDiscoveryRealmAdmissible(bootstrapContext, target, discoveryEntitlementMemo) - ? Optional.of(target) - : Optional.empty(); - } catch (AuthenticationException ex) { - if (!"ENTITLEMENT_UNAVAILABLE".equals(ex.getCode())) { - throw ex; - } - return Optional.empty(); - } + return isDiscoveryRealmAdmissible(bootstrapContext, target, discoveryEntitlementMemo) + ? Optional.of(target) + : Optional.empty();- Accepted Surface ENTITLEMENT_UNAVAILABLE from selected-world REALMS discovery as canonical authenticated REALMS authority failure; retain WORLDS cross-world outage isolation. Correct prior shared-helper omission, not all-world fail-fast.
- Document the
RefundPaymentfailure response.Minordesign/architecture/microservices/account-service/stripe-integration.mdLine 175 states that the rejected RPC preservessuccess=false. This API entry only documentsFAILED_PRECONDITIONbefore dispatch. Add the response-levelsuccess=falseandErrorDetailbehavior so clients do not interpret the unsupported refund as successful.- Accepted Document actual RefundPayment success=false and ErrorDetail alongside pre-dispatch FAILED_PRECONDITION; no runtime dispatch change.
- CLI Review 6 CompletedRuntime 4m 37sFound: 1 Accepted: 0/0/1 Routed: 0
- Trivial
Wrap the body of listCharactersByAccountRequiresCertificateEvenWhenInternalJwtIsPresent in try/finally and call SessionContext.clear() in the finally block so cleanup runs even if an assertion fails; apply the same pattern to the adjacent affected test.
- Accepted Ensure SessionContext cleanup in finally for both certificate-denial tests, including assertion failures.
- CLI Review 7 CompletedRuntime 3m 28sFound: 3 Accepted: 0/2/1 Routed: 0
- Minor
Update the JOIN_REQUIRED description to label the missing-or-INACTIVE membership predicate as target-state, and record that current PLAY also returns JOIN_REQUIRED when gameplayAdmissionAllowed is false. Keep the current and target behavior clearly distinguished in the API contract.
- Accepted API contract must label missing-or-INACTIVE as target state; current PLAY also maps present non-admitting membership to JOIN_REQUIRED.
- Trivial
Wrap the test body after SessionContext.setContext in a try/finally and move SessionContext.clear() into the finally block, ensuring the thread-local context is cleared even if invokeCharacterRosterWithPeer or an assertion fails.
- Accepted Ensure finally cleanup in remaining malformed-current-account claim test; assertion failures must not leak thread-local caller context.
- Minor
Update the
resolveCharactererror handling so deterministic selection failures—empty roster, unmatched or ambiguous name, or missing selector with multiple characters—return a selection error usingcharacterSelectionMessage(...)and the"error.play.character-selection-required"key. ReservecharacterIdentityUnavailableFailure(...)andPLAY_IDENTITY_UNAVAILABLEfor unavailable or malformed rosters; distinguish the cases with a dedicated exception or equivalent classification.- Accepted Classify deterministic roster selection misses/ambiguity as PLAY_SELECTION_REQUIRED guidance; reserve identity-unavailable for authority errors or malformed roster. Add negative-side-effect proof.
- Hosted Review 6 CompletedRuntime 8m 33sFound: 4 Accepted: 0/3/1 Routed: 0
- Check that
workloads_diris not a symlink before you validate it.TrivialLine 115 uses
stat -Lbut does not check-L. The guard at lines 86-89 runs only on the pre-existing path. For freshly staged workloads, themvat Line 109 creates the path, so this is low risk. The other directories already get an explicit-Lcheck. Add the same check at Line 115 for consistency. The parent directory is mode 0700 and owner-owned, so another user cannot exploit this gap.♻️ Proposed change
- if [[ "$(stat -Lc '%u %a %F' "$workloads_dir")" != "$owner_id 755 directory" ]]; then + if [[ -L "$workloads_dir" || "$(stat -Lc '%u %a %F' "$workloads_dir")" != "$owner_id 755 directory" ]]; then- Accepted Add explicit workloads-root symlink rejection consistently with other fixture directories; retain private-owner checks.
- Clear presence after a same-account tenant change even when the gameplay binding was already normalized away.Minor
The account-change branch calls
clearGameplayBindingon any projected context. The tenant-change branch also requiresprojectedExisting.hasGameplayBinding().Session-routing normalization can return a cross-tenant projection after it removes the binding fields.
clearGameplayBindingstill removes presence by session ID in that case. For the same account, a normalized projection therefore skips cleanup. LOGIN then saves the new-tenant context and leaves the old session presence in place.loginAsDifferentAccountClearsCrossTenantPresenceAfterProjectionNormalizationcovers only the account-change case.Proposed fix
} else if (projectedExisting != null - && projectedExisting.tenantId() != tenantId - && projectedExisting.hasGameplayBinding()) { + && projectedExisting.tenantId() != tenantId) { gameplayPresenceLifecycleService.clearGameplayBinding( projectedExisting, "LOGIN_TENANT_CHANGED"); }Add a same-account test that uses
staleGameplayContext(0L)with a bootstrap instance in a different tenant.- Accepted Same-account tenant changes must clear old presence even after projection normalized gameplay identity away; add regression.
- Update the stale "provider-mutating drift" claim in
AA-1.4.MinorThe gap cell says that generic payment scaffolds still retain provider-mutating drift.
PaymentGrpcServicenow returnsFAILED_PRECONDITIONforCreatePaymentIntent,CreateDonationandRefundPaymentbefore it callsPaymentService. ADR 0143 line 9, the Account README line 37 andstripe-integration.mdline 22 already state this. Align the tracker. Keep the remaining gap: the underlyingPaymentServicesubstrate is still present but unsupported.📝 Proposed wording
-Generic payment scaffolds still retain provider-mutating drift. +The generic `CreatePaymentIntent`, `CreateDonation` and `RefundPayment` RPCs now fail with `FAILED_PRECONDITION` before `PaymentService` or provider dispatch; the underlying generic payment service substrate remains present but unsupported.As per coding guidelines, "Keep its status, implementation record, validation, gaps, decisions, and service-map sections aligned when a domain boundary changes."
- Accepted Align AA-1.4 with proved fail-closed generic payment RPCs; unsupported underlying substrate remains.
- Do not hide
ENTITLEMENT_UNAVAILABLEas an absent world.MinorhasAdmissibleRealmconverts an entitlement-authority failure intofalse.listBootstrapWorldsthen returns a successful, incomplete list. ReturnENTITLEMENT_UNAVAILABLEso the client receives an explicit availability failure, and update the test to expect that response.} catch (IllegalStateException ex) { return false; } catch (AuthenticationException ex) { - if ("ENTITLEMENT_UNAVAILABLE".equals(ex.getCode())) { - return false; - } throw ex; }- Accepted Do not report successful missing-world discovery when entitlement availability is unknown. Propagate retryable authority failure; explicit availability-unknown schema is not implemented.
- CLI Review 8 CompletedRuntime 7m 56sFound: 2 Accepted: 1/1/0 Routed: 0
- Minor
Update the
--workloaddescription to include Entity Management alongside Account and Game Session as requiring distinct leaves for the canonical local Compose gameplay proof; leave the shared-development-leaf description for the remaining services unchanged.- Accepted Pending source-owned documentation correction: Entity Management has a distinct local Compose gameplay SPIFFE leaf and must be included alongside Account and Game Session in the workload description.
- Major
Update targetsBlockedInternalPath to inspect pathWithinApplication elements via PathContainer.PathSegment.valueToMatch() instead of splitting the raw path, and adjust its caller accordingly. Match the canonical segment values for the API prefix, public family, and blocked service-local root so matrix parameters and repeated slashes cannot bypass the check; add tests for both described paths.
- Accepted Pending source-owned fix: the internal/actuator guard splits raw paths while Spring matches canonical PathSegments; matrix parameters and duplicate separators can evade the edge block. Use canonical segment values with focused bypass and legitimate-path regression proof.
- CLI Review 9 CompletedRuntime 5m 37sFound: 3 Accepted: 0/1/1 Routed: 0
- Minor
Update the status mapping in AuthenticationExceptionHandler so ADMISSION_POINTER_UNAVAILABLE and CONNECT_SCOPE_MISMATCH return HTTP 409 Conflict rather than falling through to HTTP 401; preserve the existing outage and forbidden mappings. Document the 409 response in openapi.yaml for the affected bootstrap endpoints, indicating that clients should rerun discovery.
- Accepted Pending source-owned REST correction: reachable invalid pointer/scope conflict retains authentication and requires discovery retry; map ADMISSION_POINTER_UNAVAILABLE and CONNECT_SCOPE_MISMATCH to409 and align handler proof/OpenAPI without changing403/503 semantics.
- Major
Update readAdmissibleDiscoveryRealm to omit malformed realm rows by logging and metering the validation failure, then returning Optional.empty without checking reachability or throwing. Keep malformed-target rejection in the explicit selection paths unchanged, and update the affected discovery tests to expect malformed rows to be omitted rather than failing the whole listing.
- Rejected Rejected: Multi-Tenancy realm-catalog contract maps reachable malformed catalog/pointer evidence to ADMISSION_POINTER_UNAVAILABLE during bootstrap discovery. Omitting a malformed public realm conceals invalid authority. Unreachable private rows remain filtered.
- Trivial
Update the verification in PlayCommandHandlerTest to assert that entityManagementClient never calls listCharactersByAccount for the unknown-scope pointer, replacing the obsolete findCharacterByName check. Use the listCharactersByAccount arguments appropriate to the handler’s roster lookup.
- Accepted Pending source-owned focused proof correction: unknown-scope rejection must assert no listCharactersByAccount roster lookup, rather than only obsolete findCharacterByName.
- CLI Review 10 CompletedRuntime 6m 42sFound: 1 Accepted: 0/0/0 Routed: 0
- Major
Update isDiscoveryRealmAdmissible to treat only ENTITLEMENT_UNAVAILABLE as an inadmissible realm while recording that exception; rethrow other AuthenticationExceptions. Track the recorded outage per discovery request, and have listBootstrapWorlds and listBootstrapRealms rethrow it only when filtering leaves no admissible result, preserving the retry signal when entitlement unavailability is the sole cause.
- Rejected Would restore partial-success discovery hiding an entitlement outage as an omitted realm. Account error contract keeps unavailable authority retryable and distinct from known billing denial; mixed-tenant regressions cover both ordering positions.
- Hosted Review 7 CompletedRuntime 6m 25sFound: 1 Accepted: 1 Routed: 0
- CodeRabbit summary-only outside-diff finding 1 of 1 (aggregate; no individual detail)
summary-only aggregate; provider supplied no individual detail
- Accepted Both PLAY success notices used raw selector rather than resolved persisted characterName; accepted and implemented in 1f772d7e1 with focused missing/case-varied/resume proof.
Routed Findings
Route 1 · PR #2840 → Unassigned target OpenMajorAdd resend throttling to the public requestEmailVerification flow in AccountServiceImpl, using an established resendAvailableAt mechanism or reusing an unexpired verification token
Add resend throttling to the public requestEmailVerification flow in AccountServiceImpl, using an established resendAvailableAt mechanism or reusing an unexpired verification token so repeated requests do not create new tokens or send additional email during the window. Preserve the neutral response for unknown addresses and the existing post-commit email behavior.
Outcome: Unassigned Account verification-abuse owner, same policy/delivery boundary as Hosted route55183898e0e5bd8a6bd3896fccee6132e4c2683a2a7267f7e5145e6a9673f686. Receiving owner judges resend/reuse window; OTP throttling is not an approved verification policy. Preserve neutral responses.
Route 2 · PR #2840 → Unassigned target OpenMajorThrottle public verification requests and skip verified accounts.
The public endpoint creates and saves a new 24-hour
EmailVerificationTokenfor every matching account, without checkingaccount.isEmailVerified(). It then runs the SMTP call synchronously from theafterCommitcallback, so registered addresses can have higher response latency.A gateway-wide limiter exists, but no per-account or per-email suppression is visible. Apply a uniform client/email limit before account-specific work, return without issuing a token for verified accounts, and enqueue email delivery instead of performing SMTP on the request thread.
Skip verified accounts
if (accountOptional.isEmpty()) { return; } - issueEmailVerification(accountOptional.get(), true); + Account account = accountOptional.get(); + if (account.isEmailVerified()) { + return; + } + issueEmailVerification(account, true);Outcome: Unassigned Account credential-abuse/durable-mail owner: adjudicate uniform throttling, verified-address resend and durable delivery. Inherited gap is documented; ADR 0034 defines ownership, not limiter/resend policy. Receiving owner adjudicates; do not invent policy here.
Route 3 · PR #2840 → PR #2847 Accepted/FixedMajorPrevent public registration from granting tenant membership.
POST /accountsaccepts a caller-suppliedtenantId. Account creation persists an admission-enabled membership for that tenant. Connect-token issuance checksallowPublicJoinonly when membership is absent, so this membership grants access even when public joining is disabled. Use global-only registration and require the explicit JOIN flow, or authorize the tenant before creating the membership. Keep deployment gated until this path is removed.Outcome: Published #2847 90cad5cb7: global-only registration cannot select tenant/create membership. 346 Account and 317 focused Game Session cases passed. Gateway JOIN stays denied; PostgreSQL and end-to-end proof remain open.
Earlier routing and proof
Earlier decisions
- Accepted Global-only registration must not grant caller-selected tenant membership. Preserved2847 core removes that unsafe writer and requires explicitJOIN/outbox proof. Final parent reconciliation/testing is underway; not yet published or resolved.
- Routed Route legacy tenant-selecting registration to canonical #2847 global-registration/JOIN owner. Current source retains the unsafe legacy seam; deployment must remain gated until replacement is published/proved.
Route 4 · PR #2840 → Unassigned target OpenMajorDefine the subscription cardinality before rejecting entitlement lookups.
The schema permits multiple subscription rows per tenant. If terminal rows remain as history,
subscriptions.size() != 1can reject a valid current subscription and returnENTITLEMENT_UNAVAILABLE. A retry does not resolve that data state.If each tenant must have one row, enforce that invariant with a migration and the subscription write path. If subscription history is valid, select the authoritative nonterminal row and report ambiguity only when multiple current rows exist.
Outcome: Unassigned Account Unit 1B entitlement-authority owner: prove current-row selector and writer/schema/history invariant. No live writer establishes history; raw-cardinality guard is documented fail-closed. Filtering nonterminal rows invents authority; receiving owner adjudicates.
Unlinked items
no items unlinked