PR #2973 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: gpt-6-luna · XhighFound: 1 Accepted: 1 Routed: 0
- Immutable retained tenant receipt payload lacks finite retention and erasure contractMinor
- Accepted V12 stores account-linked raw snapshot in immutable receipts with no finite retention registry/compaction path. Preserve mapping integrity and keep materialization inactive until owning retention policy/proof is established.
- CLI Review 1 CompletedRuntime 4m 39sFound: 3 Accepted: 1/2/0 Routed: 0
- Major
Update prepareRealmEntryPolicies to reject duplicate realmSlug values across worlds and require exactly one policy with both visible and publicProduction true; retain the existing selector-pair validation. Add the matching uniqueness constraint on canonical_tenant_id, version_id, and realm_slug in V31, and update VALID_REALM_ENTRY_POLICY in PublishedReleaseBundleServiceImplTest to represent a valid single public-production policy set.
- Accepted Producer prepare only checks selector pairs; shared evidence later rejects repeated realmSlug and missing/duplicate visible public realm. Reject before publication mutation and enforce owner uniqueness, with regression proof.
- Minor
Update the validation-status sentence in the architecture contract to remove the stale test counts, or replace them with the latest verified counts; keep validation-status ownership in the tracker and preserve the existing distinction that PostgreSQL execution remains unproved.
- Accepted Stale exact test counts belong in tracker; remove from architecture status while preserving unavailable PostgreSQL proof.
- Minor
Update the README overview and status paragraph to reflect the live closed-v1 realm-entry policy producer described by
published-realm-entry-policy-owner-read, rather than saying policy production is incomplete. Clearly separate that implemented work from incomplete descriptor/template production, Game Session/Entity composition, and runtime activation; report the current proof counts or link to the tracker without repeating them.- Accepted README still says realm policy producer is missing despite this PR implementing closed-v1 producer. Narrow status convergence and retain downstream descriptor/runtime limitations.
- CLI Review 2 CompletedRuntime 4m 47sFound: 6 Accepted: 3/2/1 Routed: 0
- Minor
Update resolveLegacyGameSessionTenantAssociation to handle Spring-translated DataAccessResourceFailureException as UNAVAILABLE, alongside the existing jOOQ DataAccessException mapping. Add a final RuntimeException handler that maps unexpected failures to INTERNAL, matching the sibling handlers in TenantIdentityGrpcService.
- Accepted Accepted: translated Spring resource failures and unexpected repository errors lack deterministic gRPC statuses; match sibling UNAVAILABLE/INTERNAL handling with regression proof.
- Trivial
In InitialAdmissionBindPostgresIntegrationTest, repeat the zero-row assertion for gameplay_initial_admission_bind_catalog after service.commit(binding) and the committed-outcome assertion, so the test verifies the catalog remains empty through the full bind flow.
- Accepted Accepted: add the missing final zero-row V9 fixture-catalog assertion after published bind commits.
- Major
Update the immutability and contradictory-source assertions in the integration test to use only columns present after V32. In the update, change an existing column such as source_game_tenant_key; in the insert, remove assignments to columns dropped by V32 while preserving the values needed to exercise the trigger and its expected error.
- Accepted Accepted: V32 removed columns still used in tamper assertions; current local CI fixture batch already repairs them, pending validation/publication.
- Major
Update both tests in InitialAdmissionBindPostgresIntegrationTest to use an isolated, uniquely named schema per test: configure each data source with its test schema and set Flyway’s schemas and defaultSchema to match. Keep the existing service-scoped filesystem migration location.
- Accepted Accepted: both PostgreSQL tests share public schema and retained rows; isolate each test schema while preserving the canonical migration location.
- Minor
Clarify the publication summary in the README so the exactly-one-visible-public-production-policy requirement applies only when a version has authored REALM_ENTRY_POLICY revisions; versions without such revisions may publish without policy evidence. Keep the summary consistent with the API contract and implementation tracker.
- Accepted Accepted: README cardinality summary must distinguish authored policy publication from unrelated no-policy versions.
- Major
Revise the tracker entries around the Game Design policy producer and Game Session tenant-association prerequisite, including the related entry near line 185, to summarize implementation status, validation proof, gaps, and decisions. Replace repeated schema, behavior, retention, and cardinality details with concise summaries and links to the canonical API contracts and owning service documentation.
- Accepted Accepted: tracker repeats normative policy/retention details; replace with capability/proof/gaps summaries and canonical owner links.
- Hosted Review 1 CompletedRuntime 11m 35sFound: 12 Accepted: 5/7/0 Routed: 0
- Use the latest policy revision for each selector.Major
SaveRevisioncan store retries and edits as new rows. Publication reads every policy revision and throws on a repeated(worldSlug, realmSlug)before saving the release bundle. Resolve each selector to its highest-ID revision first, then apply the uniqueness and set-size checks to that effective set.- if (revisions.size() > PublishedRealmEntryPolicySetEvidence.MAX_POLICIES) { - throw new IllegalStateException("Realm-entry policy set exceeds the v1 complete-read bound"); - } if (version.scriptOnly()) { throw new IllegalStateException("Script-only publication cannot freeze realm-entry policy"); } @@ - Set<String> selectorPairs = new HashSet<>(); Set<String> realmSlugs = new HashSet<>(); List<RealmEntryPolicySource> sources = new java.util.ArrayList<>(); + Map<String, RealmEntryPolicySource> effectivePolicies = new java.util.LinkedHashMap<>(); int visiblePublicProductionCount = 0; for (Revision revision : revisions) { @@ } RealmEntryPolicy policy = RealmEntryPolicy.parse(revision.getData(), objectMapper); String pair = policy.worldSlug() + "\^@" + policy.realmSlug(); - if (!selectorPairs.add(pair)) { - throw new IllegalStateException("Duplicate published realm-entry policy selector"); - } + effectivePolicies.put(pair, new RealmEntryPolicySource(revision, policy)); + } + if (effectivePolicies.size() > PublishedRealmEntryPolicySetEvidence.MAX_POLICIES) { + throw new IllegalStateException("Realm-entry policy set exceeds the v1 complete-read bound"); + } + for (RealmEntryPolicySource source : effectivePolicies.values()) { + RealmEntryPolicy policy = source.policy(); if (!realmSlugs.add(policy.realmSlug())) { throw new IllegalStateException("Duplicate published realm-entry policy realm slug"); } if (policy.visible() && policy.publicProduction()) { visiblePublicProductionCount++; } - sources.add(new RealmEntryPolicySource(revision, policy)); + sources.add(source); }- Accepted Accepted current-PR correctness: SaveRevision appends history; publication currently rejects repeated selectors rather than freezing latest persisted policy per selector. Validate source scope, normalize latest IDs before effective-set bounds and uniqueness.
- Use the module's filesystem migration location, as the sibling test does.Minor
This test loads Flyway migrations from
classpath:db/migration.GameSessionTenantAssociationRepositoryIntegrationTestin the same module loads them fromfilesystem:src/main/resources/db/migration. A shared classpath location can contain other services' migrations with the same version numbers. In that case Flyway fails on duplicate versions. Align this test with the filesystem location.♻️ Proposed fix
- .locations("classpath:db/migration"); + .locations( + "filesystem:" + + java.nio.file.Path.of("src/main/resources/db/migration") + .toAbsolutePath() + .normalize());Based on learnings: a learning recorded for Game Session integration tests says to use the "service-scoped filesystem migration directory … rather than
classpath:db/migration" to avoid "duplicate-version failures". The same risk applies to this module's integration runtime.- Accepted Accepted current-PR fixture isolation: module filesystem migration source avoids shared duplicate Flyway versions.
- Remove the stale proof-status claim. The tracker contradicts it.Minor
Line 17 says: "The new composition and focused proof have not yet been run in this worktree." The Game Session runtime tracker (
design/project-management/implementation-tracking/game-session-runtime-and-tick-coordination.md, line 19) says: "Ten focused Game Session tests passed on 2026-10-04" for the same bind, decoding, launch-denial, and owner-read composition.The tracker owns current proof status. Two canonical documents now disagree, so a reader cannot tell which statement is current. Replace the sentence with a link to the tracker's proof record. Do not restate a proof status that can go stale.
📝 Proposed fix
-... V9 fixture attempts remain separately identified historical evidence. The new composition and focused proof have not yet been run in this worktree. It does not establish ... +... V9 fixture attempts remain separately identified historical evidence. Focused proof status and PostgreSQL limits are recorded in the [Game Session runtime tracker](../../../project-management/implementation-tracking/game-session-runtime-and-tick-coordination.md). It does not establish ...As per path instructions: "Review docs for canonical-current-state consistency. Flag obsolete transitional guidance, conflicts between architecture docs".
- Accepted Accepted current-PR status correction: API currently contradicts the tracker; link authoritative focused proof with PostgreSQL/live limits.
- Fix the immutability test. It writes columns that V32 drops.Major
V32 drops
schema_version,signer_key_id,approved_by,approval_reference,signed_at,game_session_evidence_digest,manifest_digest, andsignaturefromgame_design_game_session_tenant_association_operations. The test migrates to the latest version, so those columns do not exist.- The
UPDATE … SET approved_byat lines 421-430 fails with "column does not exist". The immutability trigger never runs, so.hasStackTraceContaining("evidence is immutable")fails. - The contradictory-source
INSERTat lines 448-482 sets the same dropped columns. It fails with a column error, not with "does not match its Game Design row".
When Docker is available, this test fails. It also no longer proves the trigger behavior. Update a column that still exists on the operations table, for example
source_game_tenant_key. Insert only the V32 operations columns, includingcaptured_atandterminal_outcome.🐛 Proposed fix
- .update(ASSOCIATIONS) - .set(APPROVED_BY, "changed-owner") + .update(ASSOCIATIONS) + .set(DSL.field(DSL.name("source_game_tenant_key"), String.class), "changed-key") .where(OPERATION_ID.eq(receipt.manifest().operationId())).set(OPERATION_ID, uuid(81)) - .set(DSL.field(DSL.name("schema_version"), Integer.class), 1) .set(DSL.field(DSL.name("target_namespace"), String.class), NAMESPACE) - .set(DSL.field(DSL.name("signer_key_id"), String.class), SIGNER_KEY_ID) - .set(DSL.field(DSL.name("approved_by"), String.class), "owner@example.test") - .set( - DSL.field(DSL.name("approval_reference"), String.class), - "source-contradiction-test") - .set(DSL.field(DSL.name("signed_at"), String.class), "2026-10-01T00:00:00Z") .set(DSL.field(DSL.name("legacy_game_session_tenant_id"), Long.class), 981L) ... .set(DSL.field(DSL.name("provenance_kind"), String.class), "NEW_GAME_ROW") - .set( - DSL.field(DSL.name("game_session_evidence_digest"), String.class), - GAME_SESSION_EVIDENCE_DIGEST) - .set( - DSL.field(DSL.name("manifest_digest"), String.class), - receipt.manifestDigest()) - .set(DSL.field(DSL.name("signature"), String.class), receipt.ed25519Signature()) + .set( + DSL.field(DSL.name("captured_at"), java.time.OffsetDateTime.class), + java.time.OffsetDateTime.now(java.time.ZoneOffset.UTC).minusMinutes(1)) .execute())Also applies to: 448-482
- Accepted Accepted current-PR regression repair, overlapping local CLI finding5: V32 dropped payload columns; exercise surviving immutable source field and minimal valid insert.
- The
- Use byte-order collation for the entry readback.Minor
If the database collation ignores punctuation, it can sort
mainabeforemain-b, while Java sortsmain-bfirst.toPublishedSnapshotthen builds the policy set in database order, and the policy-set constructor rejects it as noncanonical. Materialization can fail withPUBLISHED_REALM_CATALOG_SNAPSHOT_INVALID.- .orderBy(WORLD_SLUG.asc(), REALM_SLUG.asc()) + .orderBy(WORLD_SLUG.collate("C").asc(), REALM_SLUG.collate("C").asc())- Accepted Accepted current-PR readback correctness: locale-sensitive SQL ordering can violate ASCII Java canonical order; use explicit C collation and punctuation proof.
- Widen this column to store the generated workflow ID.Major
For a 36-character tenant ID and request ID, the generated ID is 97 characters.
freezeRealmEntryPoliciesinserts it into this 64-character column, so full-version publication with realm-entry policies can fail and roll back. Match the existing release-bundle column width.- publish_workflow_id VARCHAR(64) NOT NULL CHECK (publish_workflow_id <> ''), + publish_workflow_id VARCHAR(1024) NOT NULL CHECK (publish_workflow_id <> ''),- Accepted Accepted current-PR schema correctness: V31 VARCHAR64 contradicts release workflow VARCHAR1024 and rejects valid generated identities; align width with proof.
- Update the integration tests to the post-V13 association schema.Major
V13 moves the approval and raw-snapshot columns from
game_session_retained_tenant_associationtogame_session_retained_tenant_association_payload. Two tests still write these dropped columns. Their SQL fails with SQLState42703(undefined column), so both tests fail when Docker is available.services/game-session-service/src/test/java/integration/net/firedevops/firemud/gamesession/repository/PublishedRealmCatalogRepositoryIntegrationTest.java#L381-L408: Insert only the mapping columns (operation_id,target_namespace,association_request_id,legacy_game_session_tenant_id,canonical_tenant_id,source_game_row_id,source_game_tenant_key,provenance_kind,terminal_outcome). Drop the approval, digest, signature, and snapshot columns from the insert.services/game-session-service/src/test/java/integration/net/firedevops/firemud/gamesession/repository/GameSessionRetainedTenantAssociationRepositoryIntegrationTest.java#L546-L552: ReplaceSET approved_by = ?with a column that still exists on the mapping table, for examplesource_game_tenant_key. The immutability trigger then raises SQLState23514.
📍 Affects 2 files
services/game-session-service/src/test/java/integration/net/firedevops/firemud/gamesession/repository/PublishedRealmCatalogRepositoryIntegrationTest.java#L381-L408(this comment)services/game-session-service/src/test/java/integration/net/firedevops/firemud/gamesession/repository/GameSessionRetainedTenantAssociationRepositoryIntegrationTest.java#L546-L552
- Accepted Accepted current-PR retained-schema proof: two fixtures still reference dropped V13 columns; use surviving mapping fields without weakening immutable triggers.
- Update the
AR-1.5status row for the new producer work.MinorThe tenant-identity and
REALM_ENTRY_POLICYwork appears in Current Status and Active Gaps, but the scan-first row does not reflect it. Add the relevant production anchors and proof status, and keep the PostgreSQL migration/readback limitation explicit.- Accepted Accepted current-PR tracker correction: AR-1.5 must expose implemented tenant/policy producer anchors without overstating database/runtime proof.
- Update the reported test counts. They no longer match the test files.Minor
Line 38 reports
TenantIdentityGrpcServiceTestpassed 6/6 andTenantIdentityGrpcAuthWiringTestpassed 3/3. In this PR,TenantIdentityGrpcServiceTestcontains 11@Testmethods.TenantIdentityGrpcAuthWiringTestcontains 7@Testmethods. The new published-policy and complete-set tests are therefore missing from these counts. Readers cannot tell which proof covers the policy reads. Restate the counts from the latest focused run, or remove the counts and keep only the scope statement.As per path instructions: "Review docs for canonical-current-state consistency. Flag obsolete transitional guidance…"
- Accepted Accepted current-PR documentation correction: remove stale numeric focused-test counts and retain exact proof scope.
- Begin the canonical intent first. The conflict assertion runs before any attempt exists.Major
The first
beginIntentcall (digest"c".repeat(64)) runs before any attempt has been persisted.findByTenantAndRequestIdForUpdatereturns empty, sorequireSameRequestnever runs. All published-catalog and launch checks pass, and the call inserts aPENDINGattempt with digestc. NoIDEMPOTENCY_CONFLICTis raised, soassertThatThrownByfails.If that assertion were removed, the next
beginIntent(request)call (digestb) would find thecattempt and throw the conflict instead. Swap the order: persist the canonical request first, then assert the changed-digest retry.🐛 Proposed fix
assertThat(dsl.fetchCount(DSL.table("gameplay_initial_admission_bind_catalog"))).isZero(); + var attempt = transactionTemplate.execute(status -> service.beginIntent(request)); assertThatThrownBy( () -> transactionTemplate.execute( status -> service.beginIntent( new InitialAdmissionBindRequest( ... "c".repeat(64), ...)))) .isInstanceOf(IllegalArgumentException.class) .hasMessageContaining("IDEMPOTENCY_CONFLICT"); assertThat(dsl.fetchCount(DSL.table("gameplay_admission_pointer"))).isZero(); assertThat(dsl.fetchCount(DSL.table("gameplay_admission_pointer_event"))).isZero(); - var attempt = transactionTemplate.execute(status -> service.beginIntent(request)); assertThat(attempt.catalogSourceKind()).isEqualTo("V14_PUBLISHED");- Accepted Accepted current-PR regression correctness: changed-digest conflict must follow canonical persisted intent; preserve zero pointer/audit before owner bind.
- Map Spring data-access exceptions in
resolveLegacyGameSessionTenantAssociation.MinorThis handler catches only
org.jooq.exception.DataAccessExceptionas a storage failure. The Spring Boot jOOQ starter installs an exception translator by default. That translator converts SQL failures into Springorg.springframework.dao.DataAccessExceptionsubclasses, such asDataAccessResourceFailureException. This handler has no catch for those types and noRuntimeExceptionfallback. A database outage therefore escapes the handler, and gRPC closes the call withUNKNOWN. The documented contract says unavailable storage returnsUNAVAILABLE. The Game Session client then cannot classify the failure as retryable. The sibling handlers already catchDataAccessResourceFailureExceptionandRuntimeException; this handler is inconsistent with them.One related gap: in the other handlers, other Spring transient exceptions (for example
QueryTimeoutException) fall through toINTERNAL.🐛 Proposed fix
} catch (IllegalArgumentException | IllegalStateException | TooManyRowsException ex) { responseObserver.onError( Status.FAILED_PRECONDITION .withDescription("Retained Game Session association evidence is inconsistent") .asRuntimeException()); return; - } catch (DataAccessException ex) { + } catch (DataAccessException + | org.springframework.dao.DataAccessResourceFailureException + | org.springframework.dao.TransientDataAccessException ex) { responseObserver.onError( Status.UNAVAILABLE .withDescription("Retained Game Session association could not be read") .asRuntimeException()); return; + } catch (RuntimeException ex) { + responseObserver.onError( + Status.INTERNAL + .withDescription("Retained Game Session association could not be read") + .asRuntimeException()); + return; }As per path instructions: "Flag changes that violate documented FireMUD invariants, especially gRPC application-error handling…"
- Accepted Accepted current-PR availability: Spring translated resource/transient failures require UNAVAILABLE, unexpected failures INTERNAL. CLI batch partly implements it; extend focused transient proof.
- Shorten this constraint name. PostgreSQL truncates it, and the integration test assertion then fails.Minor
chk_gs_retained_tenant_association_payload_approval_operation_idis 64 bytes long. PostgreSQL limits identifiers to 63 bytes. It silently stores the name as..._approval_operation_i. Squawk also reportsidentifier-too-longfor this line.The violation message therefore shows the truncated name.
GameSessionRetainedTenantAssociationRepositoryIntegrationTest.migrationPreservesNonNilAssociationAndApprovalOperationIdsAfterPayloadSplit(Line 154) asserts the full 64-byte name withhasMessageContaining. That assertion fails when Docker is available.Rename the constraint to fit in 63 bytes, and update the test string to match.
🐛 Proposed fix
- CONSTRAINT chk_gs_retained_tenant_association_payload_approval_operation_id CHECK ( + CONSTRAINT chk_gs_retained_tenant_payload_approval_operation_id CHECK (In
services/game-session-service/src/test/java/integration/net/firedevops/firemud/gamesession/repository/GameSessionRetainedTenantAssociationRepositoryIntegrationTest.java:- .hasMessageContaining("chk_gs_retained_tenant_association_payload_approval_operation_id"); + .hasMessageContaining("chk_gs_retained_tenant_payload_approval_operation_id");- Accepted Accepted current-PR PostgreSQL proof: identifier exceeds63bytes and silently truncates; shorten schema and exact test assertion.
- CLI Review 3 CompletedRuntime 6m 19sFound: 5 Accepted: 0/4/1 Routed: 0
- Minor
Update the implementation-status paragraph to state that the 42 focused producer, tenant-read, and association tests passed, while the PostgreSQL workflow-capacity case and migration/readback remain unproved. Keep its status consistent with the AR-1.5 tracker entry.
- Accepted Accepted: README incorrectly calls executed focused producer tests unrun; link owning AR-1.5 proof while retaining PostgreSQL limits.
- Minor
Update
requireCanonicalInstantto accept a field label and passsignedAtorsourceCapturedAtat each call site. Reject parsed instants whose nanoseconds are not divisible by 1,000, and use the supplied label in validation errors so both fields are validated before signature checks or writes.- Accepted Accepted: signed timestamps may exceed PostgreSQL microsecond precision and wrong-field errors obscure capture failures; reject submicrosecond inputs and use field labels before signatures/writes.
- Trivial
Update gameplay_initial_admission_bind_attempt_published_entry_fk to include playable_state_namespace_id in both the foreign-key columns and referenced columns, and ensure gameplay_published_realm_catalog_entry has a matching unique key for that composite identity.
- Accepted Accepted: published attempt FK omits namespace identity; include playable namespace in composite reference and prove mismatch denied.
- Minor
Update the production-profile branch in InitialAdmissionOwnerReadAuthWiringTest to insert the loaded production property source before the base source named game-session-application, so production overrides take precedence when resolving conflicting properties.
- Accepted Accepted: production source is appended after base and loses override precedence; insert before base and test conflicting value.
- Minor
Update the transaction propagation on InitialAdmissionBindCatalogRepository.findPublishedSnapshot from NOT_SUPPORTED to SUPPORTS so reads reuse an active caller transaction and connection while remaining available without a transaction.
- Accepted Accepted: exact immutable snapshot reader suspends bind caller transaction unnecessarily; SUPPORTS reuses caller transaction without requiring one.
- CLI Review 4 CompletedRuntime 6m 04sFound: 6 Accepted: 1/1/3 Routed: 0
- Minor
Update the
insertRawPayloadtest helper to truncateInstant.now()to microsecond precision before serializing the seededsigned_atvalue, matching the precision used byevidence().- Accepted Accepted: raw payload fixture serializes nano-precision Instant but closed shared evidence requires microsecond precision. Truncate fixture timestamp, preserve strict evidence parser and positive/negative PG proof.
- Trivial
Revise the tracker section describing published-catalog preparation and initial-bind composition to remove duplicated behavioral rules, lifecycle gates, and launch/World evidence details. Keep implementation-specific status, proof results, decisions, and links to the canonical Game Session API contract and related definitions; use that contract as the source for technical behavior.
- Accepted Accepted: tracker duplicates canonical policy and lifecycle rules. Retain actual implementation/proof limits and owner links; remove normative copy and align stale transport status with existing proved receiver.
- Major
Update the fixture’s storedByRequest query to join game_session_retained_tenant_association_payload on operation_id and select the payload columns used by the test, while retaining association fields such as target_namespace and operation_id.
- Accepted Accepted: fixture queries only immutable association although test reads erased/moved approval and snapshot columns. Join owner payload by operation_id and preserve exact association columns/replay assertions.
- Trivial
Update the implementation-tracking section to summarize implementation status, outstanding work, and proof limits rather than restating normative identity, policy, payload-expiry, and hold behavior. Link to the canonical Game Design API contract and owning service documentation for those details, retaining only tracker-specific decisions and status such as unproved migration/readback, missing retention policy, and validation evidence.
- Accepted Accepted: authoring tracker repeats owner identity/policy/retention technical rules. Keep capability status, recorded decision and unproved PG/hold/activation limits, linking canonical owner.
- Minor
Update the latest-revision map in the policy-selection logic to use realmSlug alone as its key, changing its type to Map<String, RealmEntryPolicySource> and preserving the existing newest-revision comparison so the latest entry wins across world changes.
- Rejected Rejected: GD API explicitly selects latest per (worldSlug,realmSlug) and rejects repeated realmSlug across effective worlds. RealmSlug-only selection silently drops conflicting-world policy and changes that publication contract; no approved world-retarget behavior supplied.
- Trivial
Replace the technical-detail paragraph in the retained-tenant section with a brief status sentence and a link to the owning tracker or architecture section; remove duplicated migration, schema, lifetime, and API-signature details, and retain the statement that AA-2.1 status is unchanged.
- Accepted Accepted: player access tracker repeats retained association schema/retention/API details. Replace with bounded status and canonical owner/tracker links; preserve unchanged AA-2.1 and all missing PLAY/runtime proof.
- Hosted Review 2 CompletedRuntime 10m 17sFound: 5 Accepted: 3/1/1 Routed: 0
- Resolve
SHAREDentries after a scope change.MajorresolveNamespacechecks only the latest entry. AfterSHARED → ISOLATED → SHAREDorISOLATED → SHARED, the latest entry is unresolved, so each laterSHAREDsnapshot also remainsAWAITING_LIFECYCLE_PROOF.requirePublishedCatalogrejects entries that are notRESOLVED, so an admission bind against those snapshots fails. ADR 0122 requires selecting or allocating the appropriate namespace before exposing a changed scope.When the current policy is
SHARED, use the canonical tenant shared namespace if the prior entry is not a resolvedSHAREDentry. Preserve the prior namespace for a resolved, same-scope entry. Add tests for both sequences.- if (!previousScope.equals(policy.stateScope().name()) - || previousResolution != NamespaceResolution.RESOLVED - || policy.stateScope() != RealmEntryPolicy.StateScope.SHARED) { - return new NamespaceAssignment(null, NamespaceResolution.AWAITING_LIFECYCLE_PROOF); - } - UUID previousNamespace = Objects.requireNonNull(previous.get(PLAYABLE_STATE_NAMESPACE_ID)); - if (previousNamespace.equals(NIL_UUID)) { - throw new IllegalStateException( - "PUBLISHED_REALM_CATALOG_NAMESPACE_INVALID: prior namespace is nil"); - } - return new NamespaceAssignment(previousNamespace, NamespaceResolution.RESOLVED); + if (policy.stateScope() == RealmEntryPolicy.StateScope.SHARED + && previousScope.equals(RealmEntryPolicy.StateScope.SHARED.name()) + && previousResolution == NamespaceResolution.RESOLVED) { + UUID previousNamespace = Objects.requireNonNull(previous.get(PLAYABLE_STATE_NAMESPACE_ID)); + if (previousNamespace.equals(NIL_UUID)) { + throw new IllegalStateException( + "PUBLISHED_REALM_CATALOG_NAMESPACE_INVALID: prior namespace is nil"); + } + return new NamespaceAssignment(previousNamespace, NamespaceResolution.RESOLVED); + } + if (policy.stateScope() == RealmEntryPolicy.StateScope.SHARED) { + return new NamespaceAssignment( + getOrCreateCanonicalTenantSharedNamespace(exactNamespace, canonicalTenantId), + NamespaceResolution.RESOLVED); + } + return new NamespaceAssignment(null, NamespaceResolution.AWAITING_LIFECYCLE_PROOF);- Accepted Accepted: latest unresolved ISOLATED snapshot prevents later SHARED selection forever. Select canonical tenant SHARED namespace when prior entry is not resolved SHARED; retain scope immutability and ISOLATED lifecycle hold; prove both transition sequences.
- Stop seeding
captured_atwithclock_timestamp(). The insert violates the V13 capture-time check.MajorV13 adds
chk_gs_retained_tenant_association_capture_time CHECK (captured_at IS NULL OR captured_at <= created_at). Thecreated_atdefault isCURRENT_TIMESTAMP. In PostgreSQL that value is the transaction start time.clock_timestamp()is evaluated later in the same statement, so it is almost always strictly greater. The seed insert therefore fails with SQLState23514.Both tests in this class call
seedAssociationfirst. Both fail whenever Docker is available.The other fixtures are not affected:
GameSessionRetainedTenantAssociationRepositoryIntegrationTestusesclock_timestamp() - INTERVAL '31 days'.InitialAdmissionBindPostgresIntegrationTestleavescaptured_atNULL.
🐛 Proposed fix
- + "VALUES (?, ?, ?, ?, ?, ?, ?, ?, clock_timestamp(), 'ASSOCIATED')", + + "VALUES (?, ?, ?, ?, ?, ?, ?, ?, CURRENT_TIMESTAMP, 'ASSOCIATED')",Based on learnings: none applied.
- Accepted Accepted: fixture capturedAt wall clock exceeds transaction-start createdAt and violates V13. Seed CURRENT_TIMESTAMP for consistent transaction-time proof; preserve constraint and PG assertions.
- Truncate the fixture
signed_atvalue to microseconds. Without this, the "expired" assertion fails on Linux.MajorinsertRawPayloadstoresjava.time.Instant.now().toString()assigned_at. On Linux with JDK 15 or later,Instant.now()has nanosecond precision, so the value usually has a fraction that is not a whole number of microseconds.toValidatedReceiptconstructsGameSessionTenantAssociationEvidencebefore it callsrequireCaptureStillUsable. The constructor rejectssignedAtwith "must have microsecond precision". The repository wraps that error as "persisted Game Session tenant association evidence is invalid". As a result, the assertion at Lines 191-198,.hasMessageContaining("expired"), fails on almost every run where Docker is available. That assertion is meant to prove the expiry path. The same fixture can also hide the expiry check from the read at Lines 183-189.🐛 Proposed fix
- java.time.Instant.now().toString(), + java.time.Instant.now().truncatedTo(ChronoUnit.MICROS).toString(),- Accepted Accepted: GD raw payload test creates submicrosecond signedAt rejected before expiry. Truncate valid fixture to MICROS; preserve strict precision and expiry assertions; same obligation as current CLI5.
- Remove the stale "authenticated receiving transport remains unwired" claim.Minor
Line 19 says "authenticated receiving transport remains unwired." The Game Session API contract (
design/architecture/microservices/game-session-service/api-contracts.md, Lines 19-21) documents a different state:GetPublishedRealmAdmissionOwnerReadis an internal RPC.- An exact Entity Management SPIFFE peer guard protects it.
- It has an exact bearer-token interceptor exception.
GameSessionControlPlaneGrpcService.getPublishedRealmAdmissionOwnerReadimplements that receiving path. The two canonical documents now disagree about whether the receiving transport exists.Two fixes are needed:
- Replace the sentence with the actual remaining gap: the Entity client and end-to-end admission are pending.
- Align the focused-test count ("Ten focused Game Session tests") with the proof record that the API contract references.
📝 Proposed fix
-... it is not fresh World ACTIVE proof or a validation-through-commit gate, and authenticated receiving transport remains unwired. ... +... it is not fresh World ACTIVE proof or a validation-through-commit gate. The authenticated `GetPublishedRealmAdmissionOwnerRead` receiver is wired with an exact Entity Management peer guard; the Entity client and end-to-end admission remain pending. ...As per path instructions: "Review docs for canonical-current-state consistency. Flag obsolete transitional guidance, conflicts between architecture docs". As per coding guidelines: "Keep its status, implementation record, validation, gaps, decisions, and service-map sections aligned when a domain boundary changes".
- Accepted Accepted: tracker falsely calls proved exact Entity-peer GS owner-read receiver unwired. Correct status/proof links without claiming pending Entity consumer or live admission complete; overlaps current CLI tracker correction.
- Add tests for the coordinator’s hold and terminal-proof branches.Trivial
When the source and local tenant IDs match,
coordinatecan proceed past the identity guard, but this test stops at that guard. Add focused tests for terminal and retryable hold statuses, unknown statuses, mismatched hold tuples, lifecycle-epoch mismatches, and accepted or rejected terminal proofs. Assert theownerServicecalls and returned outcome.- Accepted Accepted: published bind coordinator hold, epoch, tuple and terminal-proof branches lack direct regression coverage. Add bounded matching-source/local positive and negative orchestration tests without weakening distinct-source denial.
- CLI Review 5 CompletedRuntime 7m 48sFound: 1 Accepted: 0/1/0 Routed: 0
- Minor
Update the bearer-token exemption description around AuthTokenInterceptor to enumerate all four exempt TenantIdentityService methods: ResolveRuntimeTenantIdentity, ResolveLegacyGameSessionTenantAssociation, ResolvePublishedRealmEntryPolicy, and ListPublishedRealmEntryPolicies. Preserve the mTLS and verified-workload-identity context, and clarify that no other Game Design RPC is exempted.
- Accepted Current owner doc incorrectly says only ResolveRuntimeTenantIdentity is exempt; configured exact TenantIdentityService allowlist has all four workload-only reads. Accept a single-paragraph doc correction preserving mTLS/exact peer guard.
- CLI Review 6 CompletedRuntime 6m 32sFound: 2 Accepted: 0/0/0 Routed: 0
- Trivial
Update LOCK_SOURCE_FAMILIES and the registration lock path to use tenant-scoped row locks plus an advisory lock keyed by tenant instead of locking whole tables. Add bounded backoff retries for SQLSTATE 55P03, and keep the owner transaction short.
- Rejected Row/advisory locks cannot fence phantom inserts by ordinary writers that do not take that advisory lock. Existing short caller-owned SHARE NOWAIT fence protects all six source families and aborts safely on contention. Removing it weakens capture integrity; caller retries are separate.
- Major
Update prepareRealmEntryPolicies to key the effective policy map by realmSlug rather than the worldSlug/realmSlug PolicySelector, so a newer revision replaces the prior policy when a realm moves or is renamed. Update the API contract and tests to reflect that behavior.
- Rejected Repeat of49c finding4: canonical latest revision selection is the worldSlug/realmSlug pair; duplicate realm slugs across worlds fail closed. A realm move/rename cannot silently alias or erase another selector. No demonstrated defect warrants changing that owning identity contract.
Routed Findings
No routes recorded
Unlinked items
no items unlinked