PR #2942 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
- CLI Review 1 CompletedRuntime 3m 03sFound: 3 Accepted: 0/3/0 Routed: 0
- Minor
Update the “Realm-catalog identity status” passage to link readers to the implementation tracker for test status instead of claiming that unit tests passed or restating any test-execution result. Keep the tracker as the reader-facing source of implementation status and ensure it records the actual executed-run result.
- Accepted Accepted: keep execution evidence in tracker, link from API contract rather than duplicating run claims. Prepared locally until Hosted terminal.
- Minor
Update the Admission-catalog foundation status to reflect the actual focused-test execution state, including the command and result if run; otherwise, align the API contract’s test claim with the unrun status. Keep both records consistent and avoid claiming proof without execution evidence.
- Accepted Accepted: align tracker with executed foundation unit/compile checks; retain unrun PostgreSQL/runtime limit. Prepared locally until Hosted terminal.
- Minor
Update GameplayAdmissionPointerAuditEntry and DatabaseGameplayAdmissionPointerAuthorityService.listPointerAudit to carry and map catalogRevision, realmId, and playableStateNamespaceId; then update GameSessionAdmissionPointerControlPlaneService.toEntry to populate the corresponding response fields. Set catalog_revision only when catalogRevision is non-null, and set each identity string only when its source value is non-null.
- Accepted Accepted: carry persisted catalog revision and UUIDs through existing audit DTO and public projections, preserving historical absence; bounded implementation delegated.
- Hosted Review 1 CompletedRuntime 7m 41sFound: 5 Accepted: 5 Routed: 0
- CodeRabbit summary-only outside-diff finding 1 of 1 (aggregate; no individual detail)
summary-only aggregate; provider supplied no individual detail
- Accepted Accepted and published: audit DTO/proto preserve persisted catalog revision and realm/namespace IDs, historical nulls stay absent.
- Remove the cutover code that can no longer run.Trivial
rejectPreparedCutoverUntilCatalogRevisionPreconditionsAreSupported()always throws. As a result, Lines 107-159 never run.validatePreparedUpgradeForPointerChangeandcurrentExecutedCutoverEntryIfSameRequestare now reachable only from this dead path. The dead path also still callsupsertPointerwithout a catalog revision precondition. A later change that removes the guard would silently re-enable the unsafe mutation. Delete the unreachable body, or add a comment that points to the follow-up PR (#2939) that restores it with a catalog revision.- Accepted Accepted and published: remove unreachable cutover implementation; preserve authenticated fail-closed writer guard.
- Correct the proof statement. It conflicts with the API contract.Minor
Line 11 says the focused catalog, repository, authority, and migration tests "have been added but have not run at this handoff."
api-contracts.mdline 13 says the focused repository, authority, catalog, and control-plane unit tests pass, and that only the PostgreSQL migration test sources compile. The PR description reports the same result.The tracker is the reader-facing record of status and validation. Replace the stale sentence with the actual status: focused unit tests pass; the PostgreSQL migration test compiles but has not executed; no runtime proof is claimed.
Proposed fix
-... not World lifecycle proof. Focused catalog, repository, authority, and migration tests have been added but have not run at this handoff; no PostgreSQL/runtime proof is claimed. +... not World lifecycle proof. Focused catalog, repository, authority, and control-plane unit tests pass; the PostgreSQL migration integration test sources compile but have not executed, and no PostgreSQL/runtime proof is claimed.As per coding guidelines: "Keep its status, implementation record, validation, gaps, decisions, and service-map sections aligned when a domain boundary changes". As per path instructions: "Flag obsolete transitional guidance, conflicts between architecture docs".
- Accepted Accepted and published: tracker owns executed unit/source-compile evidence; no PostgreSQL/live proof claim.
- Move the authority-service revision test to its own test class.Trivial
catalogPolicyRevisionAdvancesIndependentlyFromPointerVersionexercisesDatabaseGameplayAdmissionPointerAuthorityServicedirectly. It does not call anyGameSessionGrpcServicecode. The PR also changesDatabaseGameplayAdmissionPointerAuthorityServiceTest, so put this test and thepointerMutationfixture there. That keeps service-level revision coverage in one place.- Accepted Accepted and published: revision invariant and fixture moved to database authority tests without loss.
- Add a catalog-revision precondition to
upsertPointer.MajorWhen a catalog-only mutation keeps the same
gameInstanceId,upsertPointerkeepspointerVersionunchanged. A stale mutation can therefore passexpectedPointerVersionafter another catalog update and overwrite fields such asvisible. The repository compare-and-set cannot detect this because the service computes the nextcatalogRevisionfrom its fresh row read.Add
expectedCatalogRevisiontoGameplayAdmissionPointerMutationand the control-plane request. Reject mismatches alongsideexpectedPointerVersionbefore re-enabling pointer mutations.- Accepted Accepted and published: stale catalog-only mutation requires matching positive catalog revision plus pointer version; public writers remain disabled.
- Subagent Review 1 CompletedModel not recordedFound: 2 Accepted: 2 Routed: 0
- Audit projection drops persisted catalog revision and UUIDsMinor
- Accepted Accepted at canonical foundation owner; matches CLI and Hosted audit observation. DTO and proto projections are prepared locally with nullable historical identity proof; not yet published.
- Direct text catalog filters malformed rows instead of suppressing tenantMajor
- Accepted Accepted: production text WORLDS/PLAY must share gRPC tenant snapshot health gate. Mixed incomplete same-tenant authority cannot expose a valid public target; independent healthy tenant must remain available.
- Subagent Review 2 CompletedModel not recordedFound: 1 Accepted: 1 Routed: 0
- Current pointer inventory loses migrated identity from historical auditMinor
- Accepted Current listing must project current snapshot identity and routing; latest historical event may retain null identity. Preserve historical audit absence; add migration-shaped regression.
- CLI Review 2 CompletedRuntime 3m 33sFound: 2 Accepted: 1/0/1 Routed: 0
- Major
Update websocketActiveGameplaySessionFallsBackToPlayRequiredWhenPointerAdvances so bumpProductionAdmissionPointer changes the runtime target to a different gameInstanceId, then stub the follow-up CHARS demo roster for that instance; do not rely on catalog-only changes to trigger session rerouting.
- Accepted Accepted: session reroute test currently mutates same runtime target, a catalog-only change; use a distinct target and matching roster to prove pointer-version displacement.
- Trivial
Update requireUniqueVisiblePublicProductionRealm to load authority pointers scoped to expectedPointer.tenantId() instead of calling loadAuthorityPointers for a cross-tenant scan; add or reuse a tenant-scoped read such as listPointersByTenant and validate only the returned tenant rows.
- Accepted Accepted: direct tenant admission check should use scoped owner read, not depend on unrelated tenant authority; keep global discovery gates and fail-closed scoped validation.
- Hosted Review 2 CompletedRuntime 8m 15sFound: 2 Accepted: 0/0/2 Routed: 0
- Document the whole-response fail-closed behavior.Trivial
A persisted pointer with a non-positive
catalogRevision, a nullrealmId, or a nullplayableStateNamespaceIdcan reachtoControlPlaneEntry. That method throws beforeGameInstanceRuntimeStateis built, soGetGameInstanceRuntimeStatecan returnADMISSION_POINTER_AUTHORITY_UNAVAILABLEinstead of pin metadata, version metadata, and pointer entries. This matches the fail-closed runtime pointer contract. Record this legacy-row consequence in the game-session runtime tracker.- Accepted Accepted: tracker should explicitly report whole-response fail-closed runtime read on missing durable pointer identity, without claiming runtime migration proof.
- Remove the duplicate guard in the public
resolveDefaultRealm.TrivialThe public
resolveDefaultRealm(WorldView)checksworld == nullandvisibleRealms.isEmpty(). The private overload repeats both checks. Keep the early return only if it is meant to skiploadWorldSnapshot(). In that case, add a comment that says so. If not, delegate directly to the private overload.- Accepted Accepted: retain null/empty early guards to avoid owner snapshot reads; document their purpose in same catalog fix batch.
- CLI Review 3 CompletedRuntime 3m 10sFound: 0 Accepted: 0/0/0 Routed: 0
- No findings recorded for this run
- Subagent Review 3 CompletedModel not recordedFound: 4 Accepted: 3 Routed: 1
- Global world selector merges disjoint realms from separate tenantsMajor
GameplayWorldCatalog.toWorlds groups worldSlug and then distinct realmSlug across tenants.
- Accepted Current selector has no tenant key. Fail closed on cross-tenant selector collision; preserve unrelated healthy worlds and defer full selector redesign.
- Direct private admission pointer bypasses tenant catalog healthMajor
GameSessionGrpcService getAdmissionPointer currently guards only visible public target.
- Accepted Player-addressable private pointer should use same scoped complete/unique public tenant catalog invariant; implement scoped health guard without claiming hidden reads are admission.
- Account connect scope and PLAY omit catalog-revision snapshot comparisonMajor
AccountServiceImpl918/1030 and PlayCommandHandler383 compare pointer version only. Foundation does not claim complete snapshot admission contract.
Route · PR #2942 → Unassigned target OpenKnown wider Account/Game Session connect-snapshot propagation boundary, not catalog persistence foundation; route unassigned to Account/Game Session admission-snapshot owner for independent triage. View routed finding - Original expected revisions not preserved through locked convergent writeMajor
Repository save lines120-197 and Database authority upsert; add same-field winner regression.
- Accepted Service precheck can race with a same-field winner; locked repository derived revisions accept stale convergence. Preserve original expected revisions at persistence.
- CLI Review 4 CompletedRuntime 3m 23sFound: 2 Accepted: 0/0/2 Routed: 0
- Trivial
Simplify the nextPointerVersion calculation in the method containing runtimeTargetChanged: handle a null pointer ID once by assigning version 1, then increment with Math.addExact when runtimeTargetChanged is true, otherwise retain the current pointer version.
- Accepted Accepted: simplify redundant nested creation/version ternary while preserving independent counter and overflow semantics.
- Trivial
Remove the unused target-instance setup and
gameInstanceRepository.findById(7L)stub fromsetAdmissionPointerRejectsMutationOfExistingPointerUntilCatalogRevisionIsSupported, since the test verifies there are no repository interactions. Apply the same cleanup to the companion fail-closed test: remove stubs forfindPointer,listPointerAudit, andgetPreparedVersionUpgradewhen those interactions are verified as never called, while preserving the response and interaction assertions.- Accepted Accepted: remove unused mocks/setup from fail-closed mutation tests, preserving response and no-interaction proof.
- Subagent Review 4 CompletedModel not recordedFound: 2 Accepted: 2 Routed: 0
- Case-folded world and realm selectors resolve ambiguouslyMajor
- Accepted Owned catalog groups exact strings but resolves case-insensitively. Fail closed for folded aliases, preserving valid selectors and unrelated tenants.
- Callerless discovery exposes non-public realm metadataMajor
- Accepted Keep public discovery public-production-only. Explicit private admission remains grant-gated; caller-authorized private discovery is a separate incomplete integration.
- CLI Review 5 CompletedRuntime 3m 05sFound: 0 Accepted: 0/0/0 Routed: 0
- No findings recorded for this run
- Subagent Review 5 CompletedModel not recordedFound: 1 Accepted: 1 Routed: 0
- Direct visible pointer read bypasses folded selector collision gateMinor
- Accepted Accepted internal authority invariant: direct pointer projections must fail closed on folded world/realm aliases independently of prior discovery. Extend existing health guards; external-user exploit not claimed.
- Hosted Review 3 CompletedRuntime 7m 23sFound: 2 Accepted: 1/0/1 Routed: 0
- Add a migration for legacy public-production rows.Major
The YAML change affects only empty-database bootstrap. Existing databases seeded with the previous YAML retain both
demoandsandboxas public-production realms for tenant 1.GameplayWorldCatalogrequires exactly one visible public-production realm per tenant. Multiple realms remove the tenant from discovery and cause direct lookup to returnADMISSION_POINTER_UNAVAILABLE.SetAdmissionPointeralso fails closed when the required catalog-revision and durable-identity preconditions are missing, so the API cannot reliably repair these rows.Add a migration that matches the exact legacy sandbox seed, clears its public flag, advances the pointer and catalog revisions, updates the migration metadata, and records the matching audit event.
Suggested migration
+-- V8__repair_legacy_public_production_realm.sql +UPDATE gameplay_admission_pointer AS sandbox +SET public_production_realm = false, + pointer_version = sandbox.pointer_version + 1, + catalog_revision = sandbox.catalog_revision + 1, + last_updated_by = 'system/migration', + last_update_reason = 'Repair legacy public-production bootstrap realm', + updated_at = CURRENT_TIMESTAMP +WHERE sandbox.world_slug = 'sandbox' + AND sandbox.realm_slug = 'production' + AND sandbox.public_production_realm = true + AND sandbox.last_updated_by = 'system/bootstrap' + AND EXISTS ( + SELECT 1 + FROM gameplay_admission_pointer AS demo + WHERE demo.tenant_id = sandbox.tenant_id + AND demo.world_slug = 'demo' + AND demo.realm_slug = 'production' + AND demo.public_production_realm = true + AND demo.last_updated_by = 'system/bootstrap' + );Insert an audit event for each updated row with the resulting pointer version, catalog revision, realm identity, namespace identity, and public-realm value.
- Accepted Partially accepted: repair only provenance-verified unchanged canonical demo/sandbox bootstrap pair with an audited migration. Catalog-only repair advances catalogRevision, not pointerVersion; operator-modified or ambiguous rows remain untouched and fail closed.
- Remove the unused pointer lookup or make the two rejections intentional.Trivial
setAdmissionPointercallsfindPointeronly to choose between twoAdmissionPointerMutationPreconditionExceptionmessages. Both branches reject the request. The DB read adds a dependency failure mode: iffindPointerthrows, the RPC returnsINTERNALinstead ofFAILED_PRECONDITION. If the distinct messages are required, keep the lookup. Otherwise, throw one precondition error without the read.- Accepted Accepted, same obligation as latest CLI finding3: deterministic disabled mutation gate with zero unnecessary authority reads; bounded implementation assigned.
- CLI Review 6 CompletedRuntime 3m 12sFound: 3 Accepted: 0/0/3 Routed: 0
- Trivial
Remove the
findPointerlookup and conditional fromsetAdmissionPointer; reject every request directly withAdmissionPointerMutationPreconditionException. Use one message describing the disabled mutation gate, so the closed path performs no repository read.- Accepted Accepted: disabled SetAdmissionPointer must fail deterministically without an unnecessary repository lookup or outage-induced INTERNAL; preserve caller checks.
- Trivial
Update the identity-guard test around
repository.updateExistingto keepcreated.pointerVersionat 1 and assert the identity-specific exception message. This ensures the test verifies rejection for the changedrealmId, not for a version mismatch.- Accepted Accepted proof hygiene: keep candidate revision otherwise valid and assert immutable identity error; existing code already checks identity before version.
- Trivial
Rename setAdmissionPointerRejectsCreateWithoutExplicitZeroVersion to describe that it verifies the creation gate’s temporary-disabled error; keep its existing assertions unchanged unless the zero-version guard is intended to run first, in which case assert that guard’s specific error instead.
- Accepted Accepted: name the test for its actual disabled mutation gate, without claiming zero-version proof.
Routed Findings
Route 1 · PR #2942 → Unassigned target OpenMajorAccount connect scope and PLAY omit catalog-revision snapshot comparison
AccountServiceImpl918/1030 and PlayCommandHandler383 compare pointer version only. Foundation does not claim complete snapshot admission contract.
Outcome: Known wider Account/Game Session connect-snapshot propagation boundary, not catalog persistence foundation; route unassigned to Account/Game Session admission-snapshot owner for independent triage.
Unlinked items
no items unlinked