FireMUD Delivery Status

PR data refreshed

PR #3231 review history

Review rounds

Three-number pills mean: found (raw) / accepted here (useful) / routed

Hosted CodeRabbit8 completed
5/3/06/6/02/2/02/2/01/1/0
CLI CodeRabbit6 completed
3/3/04/4/03/2/03/3/02/0/0

Recorded review history

Reviews and findings

  1. Hosted Review 1 CompletedRuntime 8m 50s
    Found: 7 Accepted: 2/3/2 Routed: 0
    1. Use the base-class init/closed state instead of a second copy.Trivial

      AbstractReloadingBlockingGrpcClient already provides initOnce(closedMessage, unavailableMessage) and requireInitializedStub(unavailableMessage). Both use synchronized closed/explicitlyInitialized state, and the base close() resets that state. This client keeps its own volatile initialized/closed flags and overrides close() only to reset them. Two sets of lifecycle flags can drift apart. For example, the base explicitlyInitialized stays false for this client.

      ♻️ Proposed refactor

      -  private volatile boolean initialized;
      -  private volatile boolean closed;
       ...
         public synchronized void init() throws SSLException, IOException {
      -    if (closed) {
      -      throw new IllegalStateException("Canonical World preparation client is closed");
      -    }
      -    if (initialized) {
      -      return;
      -    }
      -    initReloadingClient();
      -    if (stub() == null) {
      -      throw new IllegalStateException("Canonical World preparation client has no gRPC stub");
      -    }
      -    initialized = true;
      +    initOnce(
      +        "Canonical World preparation client is closed",
      +        "Canonical World preparation client has no gRPC stub");
         }
       ...
      -  @Override
      -  public void close() throws IOException {
      -    synchronized (this) {
      -      closed = true;
      -      initialized = false;
      -    }
      -    super.close();
      -  }
      -
         private ... requireStub() {
      -    var currentStub = stub();
      -    if (closed || !initialized || currentStub == null) {
      -      throw new IllegalStateException(
      -          "Canonical World preparation client is not initialized and available");
      -    }
      -    return currentStub;
      +    return requireInitializedStub(
      +        "Canonical World preparation client is not initialized and available");
         }
      

      Also applies to: 120-138

      • Accepted Verified duplicate lifecycle state; use existing base initOnce and requireInitializedStub preserving messages and behavior.
    2. Remove "digest" from the documented settlement response.Minor

      This paragraph says the receiver "returns the retained terminal bytes, digest and settlement time". SettleOriginalStartSessionWorldParticipationResponse has no digest field. It carries the schema version, settlement request ID, participation ID/fence, settled_at, and terminal_evidence_canonical_bytes. The proto comment also says the response is "never a digest-only substitute". Name only the fields that the wire contract actually returns.

      📝 Proposed fix

      -... and returns the retained terminal bytes, digest and settlement time.
      +... and returns the echoed lookup identity, the complete retained canonical terminal bytes and the settlement time.
      
      • Accepted Verified response proto has no digest; correct canonical API wording only.
    3. Remove the wall-clock dependency from the lease liveness assertion.Minor

      Lines 647-654 require original_lease_expires_at > clock_timestamp(). The lease is Instant.now() + 240s, and the test runs a full Flyway upgrade before that check. A slow CI host can push the upgrade past 240 seconds. The assertion then fails for a timing reason and not for a migration-contract reason. The 2^53 test also uses Duration.ofMinutes(5) for issuance, so that test has a similar timing margin. Use a lease margin that clearly exceeds the upgrade time, for example 30 minutes. The other option is to drop the liveness assertion, because the current-read rejection is already the property under test.

      Proposed fix

      --- "a/services/account-service/src/test/java/integration/net/firedevops/firemud/accountservice/service/session/AccountStartSessionWorldParticipationPostgresIntegrationTest.java"
      +++ "b/services/account-service/src/test/java/integration/net/firedevops/firemud/accountservice/service/session/AccountStartSessionWorldParticipationPostgresIntegrationTest.java"
      @@ -595,7 +595,7 @@
                     original.attempt(),
                     UUID.randomUUID(),
                     original.ownerFence());
      -      Instant lease = Instant.now().truncatedTo(ChronoUnit.MICROS).plusSeconds(240);
      +      Instant lease = Instant.now().truncatedTo(ChronoUnit.MICROS).plus(Duration.ofMinutes(30));
             byte[] scalar = predecessorScalarProjection(original.tuple());
             var observation =
                 new OriginalStartSessionCurrentAttemptEvidence.Result(request, lease, scalar);
      
      • Accepted Verified real wall-clock assertions after full migration; increase two fixture lease margins while preserving assertions.
    4. Release the client monitor before calling super.close().Major

      close() is synchronized, and super.close() closes the TlsCertificateWatcher while this override still holds the monitor. AbstractReloadingBlockingGrpcClient.close() releases its monitor before it drains the watcher, because the watcher callback safeReload → reloadChannel() is synchronized on the same object. If a reload callback is queued, shutdown can deadlock. The callback waits for the monitor, and close() waits for the callback.

      The 2026-10-15 entry in design/project-management/ai-observations.md records this same mechanism in the World terminal completion client. Stack layer 7 fixes the same pattern in two other clients.

      Also consider dropping the duplicated initialized/closed flags. The base class already provides initOnce and requireInitializedStub.

      🔒️ Proposed fix

      --- "a/services/common-platform-core/src/main/java/net/firedevops/firemud/common/account/startsession/GrpcAccountStartSessionWorldParticipationSettlementClient.java"
      +++ "b/services/common-platform-core/src/main/java/net/firedevops/firemud/common/account/startsession/GrpcAccountStartSessionWorldParticipationSettlementClient.java"
      @@ -112,12 +112,14 @@
               .withCompression("gzip");
         }
       
         @Override
      -  public synchronized void close() throws IOException {
      -    closed = true;
      -    initialized = false;
      -    super.close();
      +  public void close() throws IOException {
      +    synchronized (this) {
      +      closed = true;
      +      initialized = false;
      +    }
      +    super.close();
         }
       
         private AccountStartSessionWorldParticipationSettlementServiceGrpc
                 .AccountStartSessionWorldParticipationSettlementServiceBlockingStub
      

      Add a queued-callback shutdown test to cover this override, as the observation entry recommends.

      • Accepted Verified synchronized override holds monitor through watcher drain; consolidate into existing base lifecycle and prove queued callback shutdown.
    5. Reuse sourceReceipt() instead of copying the receipt construction.Trivial

      Lines 806-835 build the same AuthoredWorldSourceEvidence and WorldAuthoredSourceIntakeReceipt as sourceReceipt() at lines 959-989. If a field mapping changes in only one copy, the two checks stop agreeing.

      Lines 844 and 845 also repeat the versionIdentityOperationId check from lines 840-841. Remove the repeated condition.

      ♻️ Proposed refactor

      -      JsonNode sourceEvidence = requiredSourceEvidence();
      -      AuthoredWorldSourceEvidence source =
      -          new AuthoredWorldSourceEvidence(
      -              ...);
      -      WorldAuthoredSourceIntakeReceipt receipt =
      -          new WorldAuthoredSourceIntakeReceipt(
      -              ...
      -              source);
      +      JsonNode sourceEvidence = requiredSourceEvidence();
      +      WorldAuthoredSourceIntakeReceipt receipt = sourceReceipt();
      
      • Accepted Verified receipt helper duplicates exact construction and operation guard; reuse helper and remove duplicate condition only.
    6. Compare the boxed room IDs by value, not by reference.Major

      required(..., Long.class) returns Long objects. Lines 687-692 compare two Long objects with !=, so Java compares references. The Long cache covers only -128 to 127. If a runtime_room_instance_id value is outside that range, the two reads return different objects. The check is then always true, and requireMappedRoom throws InvalidLifecycleEvidenceException.

      Production room row IDs will soon go past 127. After that, every valid lifecycle read returns FAILED_PRECONDITION. Fixtures with small IDs hide the defect. PMD reports CompareObjectsWithEquals on these lines.

      🐛 Proposed fix

      --- "a/services/world-management-service/src/main/java/net/firedevops/firemud/worldmanagement/tenant/WorldCanonicalInstanceLifecycleReadRepository.java"
      +++ "b/services/world-management-service/src/main/java/net/firedevops/firemud/worldmanagement/tenant/WorldCanonicalInstanceLifecycleReadRepository.java"
      @@ -684,12 +684,12 @@
               || !startLocation
                   .roomTemplateId()
                   .equals(required(selected, "room_template_id", UUID.class))
      -        || required(selected, "runtime_room_instance_id", Long.class)
      -            != required(selected, "mapped_room_instance_id", Long.class)
      -        || required(selected, "runtime_room_instance_id", Long.class)
      -            != required(selected, "mapped_room_row_id", Long.class)
      -        || required(selected, "runtime_room_instance_id", Long.class)
      -            != required(selected, "actual_room_instance_id", Long.class)
      +        || required(selected, "runtime_room_instance_id", Long.class).longValue()
      +            != required(selected, "mapped_room_instance_id", Long.class).longValue()
      +        || required(selected, "runtime_room_instance_id", Long.class).longValue()
      +            != required(selected, "mapped_room_row_id", Long.class).longValue()
      +        || required(selected, "runtime_room_instance_id", Long.class).longValue()
      +            != required(selected, "actual_room_instance_id", Long.class).longValue()
               || !startLocation
                   .roomTemplateId()
                   .equals(required(selected, "mapped_template_id", UUID.class))
      
      • Accepted Verified three boxed Long reference comparisons; use numeric equality and prove valid room IDs outside cache.
    7. Preserve retryable statuses from historical owner reads.Minor

      The Account and Game Session blocking clients can propagate StatusRuntimeException. The generic catch maps these failures to INTERNAL. Handle owner RPC statuses first. Preserve retryable codes, including RESOURCE_EXHAUSTED, as UNAVAILABLE, and retain distinct non-retryable mappings.

      +import io.grpc.StatusRuntimeException;
      @@
      +    } catch (StatusRuntimeException ownerRead) {
      +      failForOwnerRpcFailure(responseObserver, ownerRead);
      +      return;
           } catch (RuntimeException failure) {
      @@
      +  private static void failForOwnerRpcFailure(
      +      StreamObserver<?> responseObserver, StatusRuntimeException ownerFailure) {
      +    switch (Status.fromThrowable(ownerFailure).getCode()) {
      +      case UNAVAILABLE, DEADLINE_EXCEEDED, RESOURCE_EXHAUSTED ->
      +          fail(
      +              responseObserver,
      +              Status.UNAVAILABLE,
      +              "Historical owner evidence is temporarily unavailable");
      +      case PERMISSION_DENIED, UNAUTHENTICATED ->
      +          fail(
      +              responseObserver,
      +              Status.PERMISSION_DENIED,
      +              "Historical owner denied the authenticated recovery request");
      +      case INVALID_ARGUMENT ->
      +          fail(
      +              responseObserver,
      +              Status.INVALID_ARGUMENT,
      +              "Historical owner rejected the recovery request");
      +      case FAILED_PRECONDITION, NOT_FOUND, ALREADY_EXISTS, ABORTED ->
      +          fail(
      +              responseObserver,
      +              Status.FAILED_PRECONDITION,
      +              "Historical owner evidence is unavailable or inconsistent");
      +      default -> fail(responseObserver, Status.INTERNAL, "Historical owner read failed");
      +    }
      +  }
      +
         private static void fail(StreamObserver<?> responseObserver, Status status, String description) {
      
      • Accepted Verified historical clients can propagate gRPC status and generic catch hides retryability; follow existing sibling owner-read mapping.
  2. Hosted Review 2 CompletedRuntime 9m 16s
    Found: 5 Accepted: 0/2/3 Routed: 0
    1. Use the documented entry format for both new AI observations.Minor

      Lines 11-16 define the required entry format: a backticked date, a title, then Context, Observation, and Expected pattern sub-bullets. Neither new entry follows it.

      • design/project-management/ai-observations.md#L139-L141: change 2026-10-17 — to ` 2026-10-17: and add a Context` sub-bullet. Confirm that the Pacific/Auckland date is correct, because the date is one day later than the surrounding entries.
      • design/project-management/ai-observations.md#L94-L94: split the single SpotBugs paragraph into a title plus Context, Observation, and Expected pattern sub-bullets.

      📍 Affects 1 file

      • design/project-management/ai-observations.md#L139-L141 (this comment)
      • design/project-management/ai-observations.md#L94-L94
      • Accepted Main verified current source and owning contracts; bounded correction improves status correctness or focused proof/contract consistency. Fix delegated without expansion.
    2. Assert the refusal cause in the negative composition cases.Trivial

      The MISMATCHED_ATTEMPT and EXPIRED_ATTEMPT cases assert only two things: some StatusRuntimeException occurs, and rows do not change. Any unrelated failure also satisfies these assertions. Examples are a peer mismatch, a fixture error, a deadline, or an exception in requireMatches. The test already captures the owner exception in ownerRefusal, but it never checks it. Assert the exception type and message for each refusal. Then each test proves that the attempt or lease check is the rejection path.

      ♻️ Proposed assertion

                         .isInstanceOf(StatusRuntimeException.class);
                     assertThat(result.get()).isNull();
      +              assertThat(ownerRefusal.get())
      +                  .as("refusal must come from the intended owner check")
      +                  .isNotNull()
      +                  .satisfies(
      +                      denied ->
      +                          assertThat(denied.getMessage())
      +                              .contains(
      +                                  refusal == Refusal.MISMATCHED_ATTEMPT
      +                                      ? "owner attempt differs"
      +                                      : /* expected expiry diagnostic */ "expired"));
      

      Confirm the exact expiry diagnostic in the Account acquisition path before you finalize the message.

      • Accepted Main verified current source and owning contracts; bounded correction improves status correctness or focused proof/contract consistency. Fix delegated without expansion.
    3. Use the shared tuple size constant instead of 262_144.Trivial

      WorldCanonicalInstancePreparation.OriginalStartSessionOperationInput checks the same tuple against StartSessionPostAuthorizationExecutionTuple.MAX_CANONICAL_TUPLE_BYTES. This codec repeats the limit as a literal. If the shared bound changes, the transport and the World owner stop agreeing on which tuples are valid.

      ♻️ Proposed refactor

      --- "a/services/common-platform-core/src/main/java/net/firedevops/firemud/common/world/CanonicalWorldInstancePreparationGrpcCodec.java"
      +++ "b/services/common-platform-core/src/main/java/net/firedevops/firemud/common/world/CanonicalWorldInstancePreparationGrpcCodec.java"
      @@ -199,8 +199,9 @@
               UUID gameSessionOwnerAttemptId,
               long gameSessionOwnerFence) {
             Objects.requireNonNull(originalPostAuthorizationTuple, "originalPostAuthorizationTuple");
             if (originalPostAuthorizationTuple.length == 0
      -          || originalPostAuthorizationTuple.length > 262_144) {
      +          || originalPostAuthorizationTuple.length
      +              > StartSessionPostAuthorizationExecutionTuple.MAX_CANONICAL_TUPLE_BYTES) {
               throw new IllegalArgumentException("Original StartSession tuple is empty or oversized");
             }
             var decoded =
      
      • Accepted Main verified current source and owning contracts; bounded correction improves status correctness or focused proof/contract consistency. Fix delegated without expansion.
    4. The "noncanonical" wire case does not reach the canonical-bytes comparison.Trivial

      The test appends one 0 byte to valid request bytes. Protobuf rejects tag 0 as invalid, so parseFrom throws InvalidProtocolBufferException. fromRequestWireBytes then reports "malformed". The branch that compares wireBytes with toRequest(input).toByteArray() never runs. The assertion checks only IllegalArgumentException, so the test passes for the wrong reason.

      Use bytes that parse successfully but are not canonical. One example is a valid field encoded out of order. Then assert the "not canonical" message. Add the same case for fromResponseWireBytes, which currently has no noncanonical test.

      ♻️ Proposed change

      --- "a/services/common-platform-core/src/test/java/net/firedevops/firemud/common/account/startsession/AccountStartSessionWorldParticipationSettlementGrpcCodecTest.java"
      +++ "b/services/common-platform-core/src/test/java/net/firedevops/firemud/common/account/startsession/AccountStartSessionWorldParticipationSettlementGrpcCodecTest.java"
      @@ -127,16 +127,19 @@
               .isInstanceOf(IllegalArgumentException.class)
               .hasMessageContaining("canonical non-nil UUID");
       
      -    byte[] noncanonicalWire =
      -        java.util.Arrays.copyOf(
      -            AccountStartSessionWorldParticipationSettlementGrpcCodec.toRequest(input).toByteArray(),
      -            request.getSerializedSize() + 1);
      -    noncanonicalWire[noncanonicalWire.length - 1] = 0;
      +    // Re-encode one field ahead of the others so the bytes parse but are not canonical.
      +    var out = new java.io.ByteArrayOutputStream();
      +    var last = request.toBuilder().clear().addAllSettlementRequestId(request.getSettlementRequestIdList()).build();
      +    var rest = request.toBuilder().clearSettlementRequestId().build();
      +    last.writeTo(out);
      +    rest.writeTo(out);
      +    byte[] noncanonicalWire = out.toByteArray();
           assertThatThrownBy(
                   () ->
                       AccountStartSessionWorldParticipationSettlementGrpcCodec.fromRequestWireBytes(
                           noncanonicalWire, NAMESPACE))
      -        .isInstanceOf(IllegalArgumentException.class);
      +        .isInstanceOf(IllegalArgumentException.class)
      +        .hasMessageContaining("not canonical");
         }
       
         @Test
      
      • Accepted Main verified current source and owning contracts; bounded correction improves status correctness or focused proof/contract consistency. Fix delegated without expansion.
    5. Map retained-evidence failures to FAILED_PRECONDITION.Minor

      The repository uses plain IllegalStateException for immutable-binding conflicts and unavailable retained evidence. The receiver maps every such exception to UNAVAILABLE, which misclassifies deterministic evidence failures as transient.

      Introduce dedicated exception types, or another explicit classifier, for these repository outcomes. Map only those exceptions to FAILED_PRECONDITION. Keep storage and transaction failures on UNAVAILABLE. Do not catch every IllegalStateException, because the repository also uses it for transaction-contract failures.

      • Accepted Main verified current source and owning contracts; bounded correction improves status correctness or focused proof/contract consistency. Fix delegated without expansion.
  3. Hosted Review 3 CompletedRuntime 10m 01s
    Found: 3 Accepted: 0/2/1 Routed: 0
    1. Map translated storage failures to UNAVAILABLE.Minor

      Game Session applies the jOOQ convention, which adds Spring Boot's jOOQ starter. Its exception translator can return Spring DataAccessException subtypes for connection and lock failures. These exceptions bypass the jOOQ-only catch and reach the generic RuntimeException branch, which reports FAILED_PRECONDITION instead of allowing a retry.

      Catch the transient and resource-failure subtypes while preserving FAILED_PRECONDITION for evidence errors.

      --- "a/services/game-session-service/src/main/java/net/firedevops/firemud/gamesession/service/impl/CanonicalGameInstanceLaunchAssociationReadGrpcService.java"
      +++ "b/services/game-session-service/src/main/java/net/firedevops/firemud/gamesession/service/impl/CanonicalGameInstanceLaunchAssociationReadGrpcService.java"
      @@ -121,9 +121,11 @@
                     original.catalogRevision(),
                     association.launchBindingEvidence());
             response = CanonicalGameInstanceLaunchAssociationReadGrpcCodec.toResponse(result);
      -    } catch (DataAccessException unavailable) {
      +    } catch (DataAccessException
      +        | org.springframework.dao.TransientDataAccessException
      +        | org.springframework.dao.DataAccessResourceFailureException unavailable) {
             observer.onError(
                 Status.UNAVAILABLE
                     .withDescription("Game Session launch owner storage unavailable")
                     .asRuntimeException());
             return;
      
      • Accepted Spring-translated transient and resource storage errors bypass the jOOQ catch. Preserve retryable UNAVAILABLE while deterministic evidence stays FAILED_PRECONDITION.
    2. Map retained-evidence conflicts to FAILED_PRECONDITION, not INTERNAL.Minor

      recoverExactTerminal reaches WorldCanonicalInstancePreparationRepository.readExactExecution. That method throws ConflictingPreparationException when the retained row differs from the supplied identity. It throws InvalidPreparationEvidenceException when a terminal row is incomplete. Both classes extend IllegalStateException, not IllegalArgumentException. This handler catches only IllegalArgumentException at Line 103, so both conflicts fall through to the generic RuntimeException branch and return INTERNAL.

      Account therefore cannot tell a deterministic identity mismatch from an unexpected server fault. A retrying caller can keep resubmitting a request that will never succeed. The sibling WorldCanonicalInstancePreparationGrpcService already maps IllegalStateException to FAILED_PRECONDITION. PreparationDeniedException is already caught earlier, at Line 88, so widening this catch does not change denial handling.

      🐛 Proposed fix

      --- "a/services/world-management-service/src/main/java/net/firedevops/firemud/worldmanagement/tenant/WorldStartSessionExecutionTerminalReadGrpcService.java"
      +++ "b/services/world-management-service/src/main/java/net/firedevops/firemud/worldmanagement/tenant/WorldStartSessionExecutionTerminalReadGrpcService.java"
      @@ -100,12 +100,12 @@
           } catch (StatusRuntimeException ownerFailure) {
             failForOwnerRpcFailure(responseObserver, ownerFailure);
             return;
      -    } catch (IllegalArgumentException inconsistent) {
      +    } catch (IllegalArgumentException | IllegalStateException inconsistent) {
             fail(
                 responseObserver,
                 Status.FAILED_PRECONDITION,
                 "Exact World StartSession terminal owner evidence is inconsistent");
             return;
           } catch (RuntimeException failure) {
             fail(responseObserver, Status.INTERNAL, "World StartSession terminal recovery failed");
             return;
      
      • Accepted Retained World conflict and incomplete-terminal exceptions extend IllegalStateException. Preserve deterministic FAILED_PRECONDITION and earlier denial/storage/RPC handling.
    3. Test each predicate of hasExactGameSessionBinding that the comparator enforces.Trivial

      The new test changes only readRequestId and checks a null result. The comparator also checks playableStateScope == SHARED, publicProduction, and equality of the launch binding evidence. The descriptor and release attestation are part of that evidence. If any of these clauses is removed, this test still passes. Only the pair-mismatch clause has indirect coverage, through committedLaunchRejectsGameSessionPairThatDiffersFromGameDesignBeforeSourceOrWrite. These fields decide whether the World accepts the Game Session binding. Add negative cases for a non-SHARED scope and for publicProduction == false.

      Proposed additional assertions

      +    var nonShared = mock(CanonicalGameInstanceLaunchAssociationReadEvidence.Result.class);
      +    when(nonShared.request()).thenReturn(fixture.request());
      +    when(nonShared.playableStateScope()).thenReturn(RealmEntryPolicy.StateScope.PRIVATE);
      +    when(nonShared.publicProduction()).thenReturn(true);
      +    when(nonShared.launchBindingEvidence()).thenReturn(fixture.evidence());
      +    assertThat(
      +            WorldCompleteLaunchBindingService.hasExactGameSessionBinding(
      +                fixture.request(), nonShared, fixture.evidence()))
      +        .isFalse();
      +    var nonPublic = mock(CanonicalGameInstanceLaunchAssociationReadEvidence.Result.class);
      +    when(nonPublic.request()).thenReturn(fixture.request());
      +    when(nonPublic.playableStateScope()).thenReturn(RealmEntryPolicy.StateScope.SHARED);
      +    when(nonPublic.publicProduction()).thenReturn(false);
      +    when(nonPublic.launchBindingEvidence()).thenReturn(fixture.evidence());
      +    assertThat(
      +            WorldCompleteLaunchBindingService.hasExactGameSessionBinding(
      +                fixture.request(), nonPublic, fixture.evidence()))
      +        .isFalse();
      

      Check the exact name of the non-SHARED StateScope constant before you apply this change. Based on learnings: "check that the test asserts the actual field(s) that determine the resulting identity/authorization outcome."

      • Accepted Comparator lacks direct rejection proof for ISOLATED and non-public association results; add focused negative cases with matching selector and binding evidence.
  4. CLI Review 1 CompletedRuntime 3m 07s
    Found: 8 Accepted: 1/4/1 Routed: 0
    1. Add a reconsideration trigger, or keep these entries out of the inbox.Minor

      The SpotBugs entry (Lines 94-98) and the early-metadata entry (Lines 142-146) do not have a Reconsideration trigger. The early-metadata entry also says that the report and observer guidance "were corrected", so its immediate issue appears resolved in the same work. The file contract keeps an entry only when "a genuine blocker or deliberate postponement remains, recording the reason and reconsideration trigger."

      Do one of the following for each entry:

      • Add a trigger. For SpotBugs, the trigger could be enabling XML/HTML reports in the canonical SpotBugs task. For observer reporting, the trigger could be an observer or CI guard that classifies pending source selection.
      • If no postponement remains, record the lesson in the owning review or workflow record.

      Line 143 also repeats the Pacific/Auckland date convention that Line 5 already states. Remove that clause.

      As per coding guidelines: "Retain an entry only when a genuine blocker or deliberate postponement remains, recording the reason and reconsideration trigger."

      Also applies to: 142-146

      • Accepted Add concrete reconsideration triggers to retained SpotBugs and early-metadata entries; remove only the newly authored redundant date clause.
    2. Reuse FileBackedGrpcMtlsPolicy instead of a fourth copy of the file-backed mTLS validator.Trivial

      CanonicalGameInstanceLaunchAssociationClient already delegates to FileBackedGrpcMtlsPolicy.require(...). This class copies the plaintext, blank, classpath:, and readable-file checks inline. CanonicalWorldInstancePreparationClient and AccountStartSessionWorldParticipationAcquisitionClient copy the same checks. The copies already differ in their messages, and they can also differ in their checks. An earlier Common review correction in this repository moved authoring clients to the shared helper for this reason.

      ♻️ Proposed refactor

         private static CommonGrpcClientProperties requireFileBackedMtls(
             CommonGrpcClientProperties tlsProperties) {
      -    if (tlsProperties == null || tlsProperties.isPlaintext()) {
      -      throw new IllegalArgumentException(
      -          "Account World participation settlement requires workload mTLS");
      -    }
      -    requireReadableFile(tlsProperties.getCertChain(), "certificate chain");
      -    requireReadableFile(tlsProperties.getPrivateKey(), "private key");
      -    requireReadableFile(tlsProperties.getCaCert(), "CA certificate");
      -    return tlsProperties;
      +    return FileBackedGrpcMtlsPolicy.require(
      +        tlsProperties,
      +        "Account World participation settlement",
      +        "Account World participation settlement requires workload mTLS",
      +        "Account World participation settlement requires workload mTLS");
         }
      

      Apply the same change in CanonicalWorldInstancePreparationClient. Check the helper's message wording against the existing hasMessageContaining("file-backed") assertions.

      • Accepted Reuse existing FileBackedGrpcMtlsPolicy in three owned clients, preserving caller messages, file-only credentials and peer checks.
    3. Avoid reference comparison of boxed world instance IDs.Major

      terminal.worldInstanceId() returns Long. required(row, "world_instance_id", Long.class) and required(selected, "world_instance_id", Long.class) also return Long. Each one is compared with association.worldInstanceId() using !=. If WorldCanonicalInstanceAssociation.worldInstanceId() returns Long, these are identity comparisons. Every committed preparation with a world instance ID above 127 would then fail with InvalidPreparationEvidenceException. That covers fresh readback, COMMITTED retry and lifecycle-adjacent readback.

      The cross-service test does not catch this. A fresh schema allocates small world_instance IDs, and that test raises only the room_instance sequence above 127.

      Confirm the declared return type of WorldCanonicalInstanceAssociation.worldInstanceId(). Whatever that type is, compare explicitly so the check does not depend on it.

      🐛 Proposed fix

      -    if (result.association().worldInstanceId() != terminal.worldInstanceId()) {
      +    if (!Objects.equals(result.association().worldInstanceId(), terminal.worldInstanceId())) {
      
      -        || association.worldInstanceId() != required(row, "world_instance_id", Long.class)) {
      +        || !Objects.equals(
      +            association.worldInstanceId(), required(row, "world_instance_id", Long.class))) {
      
      -          || required(selected, "world_instance_id", Long.class) != association.worldInstanceId()) {
      +          || !Objects.equals(
      +              required(selected, "world_instance_id", Long.class), association.worldInstanceId())) {
      

      Also applies to: 644-644, 705-705

      • Rejected WorldCanonicalInstanceAssociation declares primitive long worldInstanceId. Comparisons unbox retained Long and compare values, so no reference-identity defect; extra boxing via Objects.equals adds no useful correction.
    4. Merge this entry into the existing selector observation.Major

      This entry repeats the lesson of the 2026-10-16 entry "Derive focused Gradle selectors from declared Java packages" (Lines 136-140). That entry already says that a categorized source-root segment is not part of the Java package. It also says to verify fresh testcase counts and to archive reports before a filtered rerun. The 2026-10-15 entry at Lines 76-80 already says that "a successful mixed selector does not prove every required suite ran."

      The repository rule requires a check for an equivalent entry first. Append a dated recurrence note to the existing entry, for example a second occurrence on #3231. Do not add a parallel entry. A recurrence also supports a CI or tool guard, so add a reconsideration trigger for that guard.

      As per coding guidelines: "check for an equivalent existing entry first, record the consequence and unknowns, update the outcome after recovery".

      • Accepted Fold only the newly authored duplicate selector lesson into the existing dated observation; preserve facts and add a reconsideration trigger.
    5. Correct the recorded case count for the association-read adapter.Minor

      Line 43 says that R82 ran "eight fresh cases". CanonicalGameInstanceLaunchAssociationReadGrpcServiceTest defines 10 @Test methods:

      1. missing peer and wrong workload
      2. Human context
      3. malformed and wrong-namespace selectors
      4. ambient SQL
      5. current owner success
      6. missing or null rows
      7. wrong tuple, status, or identity
      8. jOOQ unavailable
      9. transient Spring failure
      10. Spring resource failure

      The tracker is the reader-facing proof record. Either the count is wrong, or R82 predates the two Spring storage-failure cases. If R82 predates them, state that those two cases have no fresh execution attribution. Otherwise, update the count to ten.

      • Accepted Current association-read suite has ten cases. Preserve historical R82 attribution and qualify current focused coverage.
    6. Map deterministic owner SQL refusals to a non-retryable gRPC status.Minor

      This catch maps every org.jooq.exception.DataAccessException to UNAVAILABLE. That includes owner-guard rejections from the World SQL functions, such as check violations (23514), raised exceptions (P0001), and unique violations (23505). For example, an expired original Game Session lease rejected by world_begin_canonical_instance_execution_with_original_attempt is a deterministic refusal. The materialize recovery path rethrows the original exception when the row is still PENDING, so the caller gets "temporarily unavailable" for a permanent refusal. The caller then retries. Only a later attempt surfaces FAILED_PRECONDITION, through the PENDING conflict.

      There is a second gap. If the DSLContext runs with Spring exception translation, non-transient errors become Spring DataIntegrityViolationException. This catch does not handle that type, so those errors fall through to INTERNAL.

      Check the SQLState of the root cause. Classify SQLState classes 23, P0 and 40 as FAILED_PRECONDITION, or as ABORTED for serialization failures. Keep connection and timeout classes (08, 57, 55P03) as UNAVAILABLE. Apply the same classification in WorldStartSessionExecutionTerminalReadGrpcService.

      Confirm which exception family the production DSLContext for this adapter raises: jOOQ or Spring-translated.

      • Accepted Owner SQL guard/integrity refusals currently become retryable UNAVAILABLE (or translated INTERNAL). Fix narrow deterministic/transaction versus connectivity classification at both World adapters; retain unexpected-error handling and prove exact statuses.
    7. Verify that the include path matches the compiled package of CanonicalHumanPublicationOwnerTestFixtures.Major

      The jar includes integration/net/firedevops/firemud/gamesession/repository/CanonicalHumanPublicationOwnerTestFixtures*.class. A class file path follows the declared Java package, not the source directory. Game Session integration tests in this PR declare package net.firedevops.firemud.gamesession.repository;, for example GameSessionFreshTenantHistoryPostgresIntegrationTest. GameSessionRunOwnedCanonicalLaunchRepositoryPostgresIntegrationTest uses CanonicalHumanPublicationOwnerTestFixtures without a qualifier. The new AI observation (Lines 136-140) records the same integration. versus net. mismatch for Gameplay selectors.

      If the fixture declares net.firedevops..., the pattern matches nothing. Jar produces an empty-filtered archive without an error. World's crossServiceTest then has no fixture classes, which causes a compile failure or a runtime NoClassDefFoundError.

      Check the declared package of the fixture and the jar contents: unzip -l services/game-session-service/build/libs/*-classes-proof.jar | grep CanonicalHuman. If the package starts with net., apply this change:

      -        include("integration/net/firedevops/firemud/gamesession/repository/CanonicalHumanPublicationOwnerTestFixtures*.class")
      +        include("net/firedevops/firemud/gamesession/repository/CanonicalHumanPublicationOwnerTestFixtures*.class")
      
      • Rejected CanonicalHumanPublicationOwnerTestFixtures explicitly declares package integration.net.firedevops.firemud.gamesession.repository; the integration/ jar include matches its actual class path. Removing it would break the export.
    8. Reconcile the "seven passing units" claim with the checked-in receiver tests.Minor

      The text says that the new receiver and loopback mTLS tests "account for seven passing units". The checked-in sources define nine cases:

      • AccountStartSessionWorldParticipationSettlementGrpcServiceTest: 5 cases, including retainedEvidenceConflictAndUnavailableMapToFailedPrecondition and transactionContractFailureRemainsUnavailable.
      • AccountStartSessionWorldParticipationSettlementGrpcMtlsTest: 4 cases.

      If R80 predates the two retained-evidence mapping cases, state that those cases and the RetainedEvidenceException mapping have no fresh execution attribution. Otherwise, correct the count.

      • Accepted Current receiver suites contain nine cases. Preserve historical R80 proof attribution, clarify later additions and record fresh current focused coverage.
  5. Hosted Review 4 CompletedRuntime 11m 38s
    Found: 5 Accepted: 0/3/0 Routed: 0
    1. Correct the adapter case count in the tracker.Minor

      The tracker says the focused adapter gate passed "eight fresh cases" with a mocked repository. CanonicalGameInstanceLaunchAssociationReadGrpcServiceTest now has ten @Test methods. The two added cases cover the Spring transient storage failure and the Spring resource storage failure. The earlier fix thread also reported 10 passing handler tests.

      The recorded proof scope is therefore stale. A reader can conclude that the Spring-failure UNAVAILABLE mapping has no focused proof. Update the count and the run attribution. If the ten-case run used a different gate or revision, cite that run instead of R82.

      As per coding guidelines: "Keep its status, implementation record, validation, gaps, decisions, and service-map sections aligned when a domain boundary changes."

      • Rejected Duplicate of accepted CLI finding5; local3a8 clarifies historical R82 eight versus current ten and fresh55-case qualification includes all ten.
    2. Stop converting Spring resource-failure storage errors into lifecycle-evidence conflicts.Minor

      readMaterialized rethrows only jOOQ DataAccessException and Spring TransientDataAccessException. Spring's DataAccessResourceFailureException is neither type. If a connection fails during one of the selector, room, or lifecycle queries, the generic RuntimeException branch wraps that exception in InvalidLifecycleEvidenceException.

      WorldCanonicalInstanceLifecycleReadGrpcService then returns FAILED_PRECONDITION ("source evidence is inconsistent") instead of UNAVAILABLE. A caller cannot tell a temporary outage from corrupt retained evidence and can stop retrying. The same rethrow list appears at line 142. The gRPC service catch at line 79 has the same gap.

      Add the Spring resource-failure type to all three places.

      🩺 Proposed fix

      --- "a/services/world-management-service/src/main/java/net/firedevops/firemud/worldmanagement/tenant/WorldCanonicalInstanceLifecycleReadRepository.java"
      +++ "b/services/world-management-service/src/main/java/net/firedevops/firemud/worldmanagement/tenant/WorldCanonicalInstanceLifecycleReadRepository.java"
      @@ -230,9 +230,11 @@
                 operationalRegionAssignments);
           } catch (InvalidLifecycleEvidenceException invalid) {
             throw invalid;
      -    } catch (TransientDataAccessException | DataAccessException unavailable) {
      +    } catch (TransientDataAccessException
      +        | org.springframework.dao.DataAccessResourceFailureException
      +        | DataAccessException unavailable) {
             throw unavailable;
           } catch (RuntimeException invalid) {
             throw new InvalidLifecycleEvidenceException(
                 "Retained canonical World lifecycle source evidence is inconsistent", invalid);
           }
      

      Make the same change in readInCurrentOwnerTransaction and in the gRPC service UNAVAILABLE catch.

      • Accepted Spring resource failures bypass both lifecycle repository rethrow lists and adapter retry mapping; retain storage exception and return sanitized UNAVAILABLE.
    3. Map Spring resource-failure storage errors to UNAVAILABLE.Minor

      The handler treats only jOOQ DataAccessException and Spring TransientDataAccessException as unavailable storage. Spring's DataAccessResourceFailureException is a non-transient subtype, so it is in neither branch. It is also not an IllegalStateException. A connection failure translated to that type therefore reaches the generic RuntimeException branch and returns INTERNAL.

      WorldCanonicalInstancePreparationRepository.materialize catches the failure for recovery and then rethrows the original exception, so the type stays unchanged. A transaction-start failure raises CannotCreateTransactionException, which also ends as INTERNAL.

      The Game Session association reader in this PR already maps DataAccessResourceFailureException to UNAVAILABLE. Use the same classification here so that Game Session retries the exact original operation.

      🩺 Proposed fix

      --- "a/services/world-management-service/src/main/java/net/firedevops/firemud/worldmanagement/tenant/WorldCanonicalInstancePreparationGrpcService.java"
      +++ "b/services/world-management-service/src/main/java/net/firedevops/firemud/worldmanagement/tenant/WorldCanonicalInstancePreparationGrpcService.java"
      @@ -138,11 +138,14 @@
                 responseObserver,
                 Status.PERMISSION_DENIED,
                 "Canonical World preparation authority was denied");
      -    } catch (TransientDataAccessException | DataAccessException unavailable) {
      +    } catch (TransientDataAccessException
      +        | org.springframework.dao.DataAccessResourceFailureException
      +        | org.springframework.transaction.CannotCreateTransactionException
      +        | DataAccessException unavailable) {
             fail(
                 responseObserver,
                 Status.UNAVAILABLE,
                 "Canonical World preparation storage is temporarily unavailable");
           } catch (StatusRuntimeException ownerFailure) {
             failForOwnerRpcFailure(responseObserver, ownerFailure);
           } catch (IllegalArgumentException | IllegalStateException inconsistent) {
      
      • Accepted Local CLI classifier covers Spring resource DAO but CannotCreateTransactionException remains outside DAO and maps INTERNAL; add narrow retryable handling.
    4. Update the receiver unit-case count or record the later typed-failure proof.Minor

      This paragraph says the new receiver and loopback mTLS tests "account for seven passing units". The current sources have nine cases:

      • AccountStartSessionWorldParticipationSettlementGrpcServiceTest has five.
      • AccountStartSessionWorldParticipationSettlementGrpcMtlsTest has four.

      The two extra cases are retainedEvidenceConflictAndUnavailableMapToFailedPrecondition and transactionContractFailureRemainsUnavailable. They were added in bb18961a to cover the typed RetainedEvidenceException mapping. If R80 predates that commit, the seven-case figure is correct for R80. In that case, the tracker gives no proof result for the current FAILED_PRECONDITION/UNAVAILABLE classification. Either record the later focused run that covers those cases, or state that R80 does not cover them.

      The tracker README requires trackers to "Keep its status, implementation record, validation, gaps... aligned when a domain boundary changes." The coding guidelines include this requirement.

      • Rejected Duplicate of accepted CLI finding4; local3a8 qualifies historical R80 seven separately from current nine, all nine freshly passed in focused gate.
    5. Check the retained playableStateScope against SHARED.Minor

      Line 167 requires association.playableStateScope() to be SHARED. No check compares the retained identity scope with that value. requireCrossOwnerReadSelectors() at lines 783-790 only compares retained identity.playableStateScope with retained gameSessionReadEvidence.playableStateScope. Both values come from the same retained input.

      Suppose the retained input says "ISOLATED" in both places and Game Session returns SHARED. In that case the verifier accepts the pair, but the two values differ. Lines 168-169 already require publicProduction to be true on both sides. Scope should follow the same pattern so that this recovery verifier fails closed on the full retained identity.

      🛡️ Proposed fix

               || !RealmEntryPolicy.StateScope.SHARED.equals(association.playableStateScope())
      +        || !RealmEntryPolicy.StateScope.SHARED
      +            .name()
      +            .equals(text(savedIdentity, "playableStateScope"))
               || !bool(savedIdentity, "publicProduction")
               || !association.publicProduction()) {
      

      Add a negative case to WorldCanonicalInstanceOriginalOperationRecoveryVerifierTest. The case keeps a non-SHARED retained scope while Game Session returns SHARED.

      • Accepted Retained identity and GS read scope can agree as non-SHARED while actual association is SHARED; require retained SHARED and prove mismatch denial.
  6. CLI Review 2 CompletedRuntime 3m 45s
    Found: 3 Accepted: 0/3/0 Routed: 0
    1. Return UNAUTHENTICATED when no peer identity is present.Minor

      requireAuthenticatedGameSessionPeer returns PERMISSION_DENIED when GrpcPeerIdentity.current() is null. The sibling receivers in this PR return UNAUTHENTICATED for a missing peer and PERMISSION_DENIED for a wrong peer. Examples are CanonicalGameInstanceLaunchAssociationReadGrpcService and AccountStartSessionWorldParticipationSettlementGrpcService. With this receiver, callers and tests cannot tell a missing mTLS identity from a wrong workload.

      Proposed fix

         private boolean requireAuthenticatedGameSessionPeer(StreamObserver<?> responseObserver) {
           GrpcPeerIdentity peer = GrpcPeerIdentity.current();
      +    if (peer == null) {
      +      responseObserver.onError(
      +          Status.UNAUTHENTICATED
      +              .withDescription("Verified Game Session workload required")
      +              .asRuntimeException());
      +      return false;
      +    }
      -    if (peer != null
      -        && peer.isService("game-session-service")
      +    if (peer.isService("game-session-service")
               && peer.isInNamespace(trustedNamespace)
               && !SessionContext.hasAuthenticatedCallerContext()) {
      
      • Accepted Accepted: distinguish absent workload identity as UNAUTHENTICATED while preserving PERMISSION_DENIED for present wrong peers/namespace/caller context and no storage access.
    2. Reject a null gameSessionOwnerMutationId before the observation branch uses it.Minor

      The public 10-argument constructor does not require gameSessionOwnerMutationId. The 9-argument overload has that check, but the 10-argument constructor does not. If a caller passes a non-null originalAttemptEvidence with a null mutation ID, Line 139 calls gameSessionOwnerMutationId.equals(...) and throws NullPointerException. In every other malformed case, the constructor reports IllegalArgumentException. Callers that classify IllegalArgumentException as invalid evidence will treat the NullPointerException as an unexpected internal failure.

      Proposed fix

           } else {
      +      if (gameSessionOwnerMutationId == null) {
      +        throw new IllegalArgumentException("Account original-attempt observation is incomplete");
      +      }
             var observationRequest = originalAttemptEvidence.request();
      
      • Accepted Accepted: complete ten-argument execution identity can dereference null owner mutation UUID with retained observation; reject malformed evidence with IllegalArgumentException, preserve legacy observation-free forms.
    3. Do not map deterministic SQL failures to UNAVAILABLE.Minor

      jOOQ wraps every SQL error in org.jooq.exception.DataAccessException. When fromSqlState returns null, Line 28 maps that error to UNAVAILABLE. This includes errors that will fail again on every retry:

      • SQLSTATE class 22, such as invalid input or data that is too long.
      • SQLSTATE class 42, such as an undefined function or column after a missing or out-of-order migration.
      • SQLSTATE class XX, which covers internal database errors.

      Both WorldCanonicalInstancePreparationGrpcService and WorldStartSessionExecutionTerminalReadGrpcService then return UNAVAILABLE. Game Session and Account treat UNAVAILABLE as a retryable code, so they retry a failure that does not clear. A schema or input defect then looks like a short outage.

      Classify these deterministic classes explicitly. Keep 40003 and connection-class states as UNAVAILABLE.

      🐛 Proposed fix

           if (sqlState.startsWith("08") || sqlState.startsWith("57") || "55P03".equals(sqlState)) {
             return Status.Code.UNAVAILABLE;
           }
      +    if (sqlState.startsWith("22") || sqlState.startsWith("42") || sqlState.startsWith("XX")) {
      +      return Status.Code.INTERNAL;
      +    }
           return null;
      

      Add cases for 22P02 and 42883 to the two storage-failure mapping tests.

      Also applies to: 34-46

      • Accepted Accepted: explicit SQLSTATE22/42/XX defects should map INTERNAL, preserving40003/connection ambiguity as UNAVAILABLE; add both adapter seam cases.
  7. Hosted Review 5 CompletedRuntime 12m 52s
    Found: 6 Accepted: 0/3/3 Routed: 0
    1. The method count in the original-catalog paragraph is out of date.Minor

      Line 31 says that "the other four methods in that class retain their preceding execution attribution." GameSessionRunOwnedCanonicalLaunchRepositoryPostgresIntegrationTest now has six @Test methods:

      • allocatesOneStartingLaunchWithExactPolicyAndIndependentOwnerReadback
      • retriesCanonicalLaunchAfterAdvisoryWaitWithRepeatableReadDatasourceDefault
      • originalV1003CatalogRetainsPhysicalOwnerRowsWithoutAcquiringMissingPublishedPolicy
      • originalV1004LaunchRetainsPhysicalRowsWithoutAcquiringTupleOrCatalogCapture
      • forwardHumanPolicyGuardPreservesActualV1011HistoryAndRejectsLegacyCatalogReuse
      • forwardHumanPolicyGuardAcceptsCompletePublishedCatalog

      Line 37 records that the V1004 case and the V1011 guard case passed freshly in a later run. With that later attribution, "four other methods" is ambiguous. A reader cannot tell which methods still use the earlier run as proof. Name the methods that keep the preceding attribution, or state that line 31 describes the class before the V1004 case was added.

      As per coding guidelines: "Keep its status, implementation record, validation, gaps, decisions, and service-map sections aligned when a domain boundary changes."

      • Accepted Accepted Minor: original-catalog paragraph has stale relative method count; qualify its historical before-V1004 attribution without crediting later cases to earlier proof.
    2. Add direct coverage for UNAVAILABLE.Trivial

      The production switch already maps UNAVAILABLE to UNAVAILABLE, but this test does not pass that input. Add it to the status table. Keep the ABORTED mapping unchanged; the inspected Game Session path uses ABORTED for durable admission outcomes, not as a retryable owner RPC status.

      Suggested test fix

      -        Map.of(
      -                Status.Code.RESOURCE_EXHAUSTED,
      -                Status.Code.UNAVAILABLE,
      -                Status.Code.DEADLINE_EXCEEDED,
      -                Status.Code.UNAVAILABLE,
      -                Status.Code.PERMISSION_DENIED,
      -                Status.Code.PERMISSION_DENIED,
      -                Status.Code.UNAUTHENTICATED,
      -                Status.Code.PERMISSION_DENIED,
      -                Status.Code.INVALID_ARGUMENT,
      -                Status.Code.INVALID_ARGUMENT,
      -                Status.Code.FAILED_PRECONDITION,
      -                Status.Code.FAILED_PRECONDITION,
      -                Status.Code.NOT_FOUND,
      -                Status.Code.FAILED_PRECONDITION,
      -                Status.Code.ALREADY_EXISTS,
      -                Status.Code.FAILED_PRECONDITION,
      -                Status.Code.ABORTED,
      -                Status.Code.FAILED_PRECONDITION,
      -                Status.Code.UNKNOWN,
      -                Status.Code.INTERNAL)
      +        Map.ofEntries(
      +            Map.entry(Status.Code.UNAVAILABLE, Status.Code.UNAVAILABLE),
      +            Map.entry(Status.Code.RESOURCE_EXHAUSTED, Status.Code.UNAVAILABLE),
      +            Map.entry(Status.Code.DEADLINE_EXCEEDED, Status.Code.UNAVAILABLE),
      +            Map.entry(Status.Code.PERMISSION_DENIED, Status.Code.PERMISSION_DENIED),
      +            Map.entry(Status.Code.UNAUTHENTICATED, Status.Code.PERMISSION_DENIED),
      +            Map.entry(Status.Code.INVALID_ARGUMENT, Status.Code.INVALID_ARGUMENT),
      +            Map.entry(Status.Code.FAILED_PRECONDITION, Status.Code.FAILED_PRECONDITION),
      +            Map.entry(Status.Code.NOT_FOUND, Status.Code.FAILED_PRECONDITION),
      +            Map.entry(Status.Code.ALREADY_EXISTS, Status.Code.FAILED_PRECONDITION),
      +            Map.entry(Status.Code.ABORTED, Status.Code.FAILED_PRECONDITION),
      +            Map.entry(Status.Code.UNKNOWN, Status.Code.INTERNAL))
      
      • Accepted Accepted Trivial: directly exercise UNAVAILABLE owner-RPC mapping, retaining all existing mappings including ABORTED unchanged.
    3. Move the duplicated watcher-shutdown test helpers into shared test fixtures.Trivial

      awaitBlockedReloadCallback, hasFrame, awaitCondition, awaitLatch, watcher, setWatcher, and activeCallbacks are copied verbatim into four test classes:

      • CanonicalGameInstanceLaunchAssociationClientTest
      • AccountStartSessionWorldParticipationAcquisitionClientMtlsTest
      • GrpcAccountStartSessionWorldParticipationSettlementClientTest
      • DraftCommitOrderReadClientTest

      The reflective helpers depend on the private field names AbstractReloadingBlockingGrpcClient.watcher and TlsCertificateWatcher.activeCallbacks, and on the method name reloadChannel. If one of those names changes, all four copies break. Put the helpers in one class in the common-platform-core test fixtures, which common-security already consumes. Each client test then keeps only its client-specific assertions.

      • Accepted Accepted Trivial: duplicated watcher-close reflection/poll helpers have one shared test-fixture owner; preserve per-client assertions and lifecycle behavior.
    4. Assert the Game Session selector fields that set the historical identity.Trivial

      The mock at Lines 1162 returns result.request() as the same request object that the verifier sent. The check expectedRequest.equals(actual.request()) therefore always passes. The current assertions cover only readRequestId inequality, the attempt, and the fence. Suppose RetainedPreparation.gameSessionRequest builds its selector from the wrong tenant, game instance, descriptor ID, or digests. This test still passes.

      Line 224 also asserts a value on the fixture's own LaunchAssociation. That assertion does not test the verifier.

      Assert the selector fields against the retained values. Also assert that the Account and Game Session read IDs differ.

      ♻️ Proposed assertions

           verify(gameSession).read(gameSessionRequest.capture());
      -    assertThat(gameSessionRequest.getValue().associationSelector().readRequestId())
      +    var selector = gameSessionRequest.getValue().associationSelector();
      +    assertThat(selector.readRequestId())
               .isNotEqualTo(GAME_INSTANCE)
               .isNotEqualTo(PARTICIPATION_ID)
      -        .isNotEqualTo(ATTEMPT_ID);
      +        .isNotEqualTo(ATTEMPT_ID)
      +        .isNotEqualTo(accountRequest.getValue().readRequestId());
      +    var binding = fixture.launchAssociation().launchBindingEvidence();
      +    assertThat(selector.targetNamespace()).isEqualTo(NAMESPACE);
      +    assertThat(selector.canonicalTenantId()).isEqualTo(TENANT);
      +    assertThat(selector.gameInstanceUuid()).isEqualTo(GAME_INSTANCE);
      +    assertThat(selector.controlPlaneRequestId()).isEqualTo("start-session-control-request");
      +    assertThat(selector.launchDescriptorId()).isEqualTo(binding.descriptor().launchDescriptorId());
      +    assertThat(selector.expectedDescriptorResultDigest())
      +        .isEqualTo(binding.descriptor().resultDigest());
      +    assertThat(selector.expectedReleaseAttestationEvidenceDigest())
      +        .isEqualTo(binding.releaseAttestation().evidenceDigest());
           assertThat(gameSessionRequest.getValue().expectedOwnerAttemptId()).isEqualTo(ATTEMPT_ID);
           assertThat(gameSessionRequest.getValue().expectedOwnerFence()).isEqualTo(GAME_SESSION_FENCE);
      -    assertThat(fixture.launchAssociation().capturedStartingRowVersion()).isEqualTo(9_999L);
      

      Based on learnings: "check that the test asserts the actual field(s) that determine the resulting identity/authorization outcome (not just adjacent metadata or presence/hash checks)".

      • Accepted Accepted Trivial: assert captured historical selector identity/digests and independent Account/GS read IDs, replacing fixture-only assertion.
    5. Validate the assembly selector before you commit the launch binding.Minor

      CanonicalGameInstanceLaunchAssociationReadEvidence.Request accepts a controlPlaneRequestId of up to 256 characters. WorldCanonicalInstancePreparationAssemblyService.Selector accepts at most 128 characters.

      Line 89 calls bindCommittedLaunch(selector) before Line 91 constructs the Selector. For a request ID of 129 to 256 characters, the call fails as follows:

      1. The request passes fromRequest.
      2. bindCommittedLaunch runs the Game Design and Game Session owner reads.
      3. bindCommittedLaunch commits a durable World launch binding in its owner transaction.
      4. The Selector constructor throws IllegalArgumentException, and the client gets FAILED_PRECONDITION.

      Every retry fails the same way, but the retained binding stays. Construct the Selector first so that the length check runs before any owner read or write. Separately, align the two bounds on the canonical limit for controlPlaneRequestId.

      🐛 Proposed fix

      --- "a/services/world-management-service/src/main/java/net/firedevops/firemud/worldmanagement/tenant/WorldCanonicalInstancePreparationGrpcService.java"
      +++ "b/services/world-management-service/src/main/java/net/firedevops/firemud/worldmanagement/tenant/WorldCanonicalInstancePreparationGrpcService.java"
      @@ -85,14 +85,14 @@
             return;
           }
       
           try {
      -      WorldCompleteLaunchBindingReceipt bound = launchBindingService.bindCommittedLaunch(selector);
             WorldCanonicalInstancePreparationAssemblyService.Selector assemblySelector =
                 new WorldCanonicalInstancePreparationAssemblyService.Selector(
                     selector.canonicalTenantId(),
                     selector.gameInstanceUuid(),
                     selector.controlPlaneRequestId());
      +      WorldCompleteLaunchBindingReceipt bound = launchBindingService.bindCommittedLaunch(selector);
             Input input = assemblyService.assemble(assemblySelector);
             requireAssembledInputMatches(selector, bound, input);
       
             // This independent read proves only that the exact immutable input was previously retained.
      
      • Accepted Accepted Minor: validate assembly selector before any owner binding effects and reuse canonical StartSession request-id validator (128 UTF-8 bytes, exact NFC) in both selectors.
    6. Preserve invalid World evidence as FAILED_PRECONDITION.Minor

      WorldStartSessionExecutionTerminalReadGrpcCodec.fromResponse rejects invalid or mismatched terminal evidence with IllegalArgumentException. WorldStartSessionExecutionTerminalReadClient.read wraps that failure in IllegalStateException. The Account receiver then maps it to UNAVAILABLE.

      The receiver tests classify retained-evidence conflicts as FAILED_PRECONDITION, while transaction-contract IllegalStateException remains UNAVAILABLE. Add a dedicated World evidence exception at the client boundary and catch only that type in the receiver.

      diff --git a/services/common-platform-core/src/main/java/net/firedevops/firemud/common/world/WorldStartSessionExecutionTerminalReadClient.java b/services/common-platform-core/src/main/java/net/firedevops/firemud/common/world/WorldStartSessionExecutionTerminalReadClient.java
      @@
       public final class WorldStartSessionExecutionTerminalReadClient
           extends AbstractReloadingBlockingGrpcClient<
      @@
                   .WorldStartSessionExecutionTerminalReadServiceBlockingStub> {
      +  public static final class InvalidTerminalEvidenceException extends IllegalStateException {
      +    public InvalidTerminalEvidenceException(String message, Throwable cause) {
      +      super(message, cause);
      +    }
      +  }
      +
      @@
      -      throw new IllegalStateException(
      +      throw new InvalidTerminalEvidenceException(
                 "World returned invalid original StartSession terminal evidence", invalid);
      diff --git a/services/account-service/src/main/java/net/firedevops/firemud/accountservice/service/session/AccountStartSessionWorldParticipationSettlementGrpcService.java b/services/account-service/src/main/java/net/firedevops/firemud/accountservice/service/session/AccountStartSessionWorldParticipationSettlementGrpcService.java
      @@
       import net.firedevops.firemud.common.world.WorldStartSessionExecutionTerminal;
      +import net.firedevops.firemud.common.world.WorldStartSessionExecutionTerminalReadClient.InvalidTerminalEvidenceException;
      @@
           } catch (RetainedEvidenceException invalidRetainedEvidence) {
             observer.onError(Status.FAILED_PRECONDITION.asRuntimeException());
      +    } catch (InvalidTerminalEvidenceException invalidWorldEvidence) {
      +      observer.onError(Status.FAILED_PRECONDITION.asRuntimeException());
           } catch (RuntimeException unavailable) {
             observer.onError(Status.UNAVAILABLE.asRuntimeException());
           }
      
      • Accepted Accepted Minor: typed invalid World terminal evidence must remain FAILED_PRECONDITION; preserve unrelated client-state/transaction failures as UNAVAILABLE.
  8. Hosted Review 6 CompletedRuntime 8m 01s
    Found: 2 Accepted: 1/1/0 Routed: 0
    1. CodeRabbit summary-only outside-diff finding 1 of 1 (aggregate; no individual detail)Major

      summary-only aggregate; provider supplied no individual detail

      • Accepted Major: current terminal client synchronized close holds monitor across super.close watcher drain, blocking queued reload. Accept release monitor before drain plus shared-fixture real watcher lifecycle regression; preserve existing init/read contract.
    2. Map transaction-start failures to UNAVAILABLE.Minor

      repository.read() opens a REQUIRES_NEW transaction through TransactionTemplate.execute. Suppose the connection pool or PostgreSQL is unreachable. DataSourceTransactionManager.doBegin then throws CannotCreateTransactionException. That exception is a TransactionException. It is neither a Spring DataAccessException subtype nor a jOOQ DataAccessException. It therefore reaches the generic RuntimeException branch, and the RPC returns INTERNAL for a transient storage outage.

      The earlier resolved finding made storage outages retryable UNAVAILABLE. This path still violates that contract at transaction start. Add CannotCreateTransactionException (or TransactionSystemException/TransactionException as appropriate) to the UNAVAILABLE catch.

      🩺 Proposed fix

      --- "a/services/world-management-service/src/main/java/net/firedevops/firemud/worldmanagement/tenant/WorldCanonicalInstanceLifecycleReadGrpcService.java"
      +++ "b/services/world-management-service/src/main/java/net/firedevops/firemud/worldmanagement/tenant/WorldCanonicalInstanceLifecycleReadGrpcService.java"
      @@ -77,9 +77,10 @@
                     .withDescription("Canonical World lifecycle source evidence is inconsistent")
                     .asRuntimeException());
             return;
      -    } catch (DataAccessResourceFailureException
      -        | TransientDataAccessException
      -        | DataAccessException unavailable) {
      +    } catch (DataAccessResourceFailureException
      +        | TransientDataAccessException
      +        | DataAccessException
      +        | org.springframework.transaction.CannotCreateTransactionException unavailable) {
             responseObserver.onError(
                 Status.UNAVAILABLE
                     .withDescription("Canonical World lifecycle storage is temporarily unavailable")
      
      • Accepted Minor: CannotCreateTransactionException escapes REQUIRES_NEW repository.read into generic INTERNAL; accept narrow sanitized UNAVAILABLE mapping and exact authenticated request regression.
  9. CLI Review 3 CompletedRuntime 3m 08s
    Found: 4 Accepted: 0/4/0 Routed: 0
    1. Confirm that the conflict translation can receive a DuplicateKeyException.Minor

      fetchCanonicalPreparation translates only Spring DuplicateKeyException. jOOQ throws that type only when the DSLContext has Spring's exception translator. A plain DSL.using(dataSource, …) throws org.jooq.exception.DataAccessException with SQLState 23505. For example, the cross-service test constructs its DSLContext that way. In that configuration, the canonical-identity conflict is never changed to ConflictingPreparationException. It then reaches recoverAfterUncertainWrite as a raw storage failure. This repository is not a Spring component, so the caller decides which DSLContext it receives.

      Check that the production DSLContext has the translator configured. Otherwise, also handle jOOQ DataAccessException with the same SQLState and message check.

      ♻️ Possible change

      -    } catch (DuplicateKeyException exception) {
      +    } catch (DuplicateKeyException exception) {
             throw translateCanonicalPreparationConflict(exception);
      +    } catch (org.jooq.exception.DataAccessException exception) {
      +      throw translateCanonicalPreparationConflict(exception);
           }
      

      Widen translateCanonicalPreparationConflict to accept RuntimeException.

      • Accepted Valid: supplied DSLContext can surface raw jOOQ SQLSTATE23505; narrowly preserve existing exact conflict-message predicate across both translator forms.
    2. Correct the count of receiver cases added after R80.Minor

      The paragraph says R80 "predates the two retained-evidence and transaction-failure cases now present in the receiver suite." The visible receiver suite AccountStartSessionWorldParticipationSettlementGrpcServiceTest has six cases. The mTLS suite has four cases. R80 attributed seven passing units to these suites, so three cases are later additions:

      • retainedEvidenceConflictAndUnavailableMapToFailedPrecondition
      • invalidWorldTerminalEvidenceRemainsFailedPrecondition
      • transactionContractFailureRemainsUnavailable

      The InvalidTerminalEvidenceException type that the invalid-World-terminal case uses is new in this change. Count that case as post-R80 evidence, or name it explicitly, so that the proof attribution stays exact.

      📝 Proposed wording

      -R80 predates the two retained-evidence and transaction-failure cases now present in the receiver suite, so its historical total does not qualify those later cases.
      +R80 predates the three retained-evidence, invalid-World-terminal and transaction-failure cases now present in the receiver suite, so its historical total does not qualify those later cases.
      
      • Accepted Valid attribution correction: receiver now has six cases versus original three plus four mTLS units. Name three post-R80 receiver cases; historical seven-unit proof remains unchanged.
    3. Do not report non-transient Spring storage failures as inconsistent lifecycle evidence.Minor

      The multi-catch passes through only DataAccessResourceFailureException, TransientDataAccessException, and jOOQ DataAccessException. Spring's jOOQ exception translator can also throw non-transient Spring DataAccessException subtypes, such as BadSqlGrammarException or DataIntegrityViolationException. The final catch (RuntimeException invalid) catches those exceptions and wraps them in InvalidLifecycleEvidenceException. This changes a storage failure into an evidence-inconsistency signal, so callers and the gRPC adapter classify it wrongly.

      The outer readInCurrentOwnerTransaction lets the same exceptions propagate unchanged, so the two read boundaries behave differently. Pass through the full Spring DataAccessException hierarchy before the generic wrap.

      🐛 Proposed fix

           } catch (InvalidLifecycleEvidenceException invalid) {
             throw invalid;
      -    } catch (DataAccessResourceFailureException
      -        | TransientDataAccessException
      -        | DataAccessException unavailable) {
      +    } catch (org.springframework.dao.DataAccessException | DataAccessException unavailable) {
             throw unavailable;
           } catch (RuntimeException invalid) {
      

      Make the same change at Lines 143-146 so both read boundaries stay consistent.

      • Accepted Valid: inner evidence catch wraps nontransient Spring storage failures as inconsistent evidence. Pass through full Spring DataAccessException hierarchy at both boundaries; preserve gRPC SQLState classification.
    4. Confirm that the 5-second deadline covers the nested owner calls.Minor

      prepare applies CALL_DEADLINE_SECONDS = 5L to the complete World preparation. According to the World tracker, World performs the following work inside this RPC before it commits PREPARING:

      • It acquires Account participation. AccountStartSessionWorldParticipationAcquisitionClient has its own 5-second deadline.
      • It reads the Game Session association. CanonicalGameInstanceLaunchAssociationClient has its own 5-second deadline.
      • It materializes the topology in SQL.

      gRPC Java can carry the inbound server deadline into nested calls through Context. If it does, every nested call shares this single 5-second budget. On a slow but healthy path, the outer call can then return DEADLINE_EXCEEDED while World continues or commits. The caller then gets an ambiguous outcome and must reconcile it through replay.

      Verify that World's server handler propagates or forks the inbound Context for its nested clients. If it propagates the deadline, size the outer deadline to cover the nested calls plus materialization. Alternatively, document the reconciliation path that applies after DEADLINE_EXCEEDED.

      • Accepted Valid documentation gap: synchronous World handler does not fork inbound Context; five seconds is one bounded RPC, not sum of owner budgets or commit proof. Document ambiguous deadline and existing exact retained recovery; do not invent a larger timeout or automatic retry.
  10. CLI Review 4 CompletedRuntime 2m 40s
    Found: 3 Accepted: 0/1/1 Routed: 0
    1. Map transaction-creation failures to UNAVAILABLE.Minor

      The handler maps only jOOQ DataAccessException, TransientDataAccessException, and DataAccessResourceFailureException to UNAVAILABLE. Every other RuntimeException becomes FAILED_PRECONDITION.

      The handler rejects ambient transactions, so the repository must start its own transaction. A DataSourceTransactionManager wraps a connection failure at doBegin in CannotCreateTransactionException. That type is a TransactionException. It is not a DataAccessException. A database outage at transaction start therefore returns FAILED_PRECONDITION with "Complete exact original StartSession owner evidence is unavailable". The World consumer can then classify a retryable storage outage as deterministic missing evidence.

      The sibling WorldCanonicalInstanceLifecycleReadGrpcService already includes CannotCreateTransactionException in its UNAVAILABLE group. Add the same type here, and add a unit case next to the two Spring storage-failure cases.

      Confirm that CanonicalGameInstanceLaunchAssociationRepository.readOriginalStartSessionAssociation opens its transaction through a Spring PlatformTransactionManager or TransactionTemplate.

      🐛 Proposed fix

           } catch (DataAccessException
               | TransientDataAccessException
      -        | DataAccessResourceFailureException unavailable) {
      +        | DataAccessResourceFailureException
      +        | org.springframework.transaction.CannotCreateTransactionException unavailable) {
      
      • Rejected Premise disproved: readOriginalStartSessionAssociation requires no ambient transaction and executes one SQL read via supplied DSLContext; repository has no PlatformTransactionManager/TransactionTemplate or doBegin path. Existing Spring resource/translator storage failures are already caught.
    2. Return UNAUTHENTICATED when the verified peer identity is missing.Minor

      If GrpcPeerIdentity.current() returns null, this adapter returns PERMISSION_DENIED. The sibling owner adapters return UNAUTHENTICATED in this case:

      • WorldStartSessionExecutionTerminalReadGrpcService.requireAuthenticatedAccountPeer (Lines 137-143).
      • WorldCanonicalInstanceLifecycleReadGrpcService, as asserted by rejectsMissingPeerIdentityAsUnauthenticatedBeforeStorageAccess.

      A Game Session caller that classifies failures by status code cannot tell a missing mTLS identity from a wrong workload on this RPC. Use one status-code contract across the three adapters. Keep PERMISSION_DENIED for a wrong service, a wrong namespace, or an end-user context. Also update WorldCanonicalInstancePreparationGrpcServiceTest Line 95.

      Proposed fix

         private boolean requireAuthenticatedGameSessionPeer(StreamObserver<?> responseObserver) {
           GrpcPeerIdentity peer = GrpcPeerIdentity.current();
      -    if (peer != null
      -        && peer.isService("game-session-service")
      +    if (peer == null) {
      +      fail(
      +          responseObserver,
      +          Status.UNAUTHENTICATED,
      +          "Verified same-namespace Game Session workload identity is required");
      +      return false;
      +    }
      +    if (peer.isService("game-session-service")
               && peer.isInNamespace(trustedNamespace)
               && !SessionContext.hasAuthenticatedCallerContext()) {
             return true;
           }
      
      • Accepted Valid canonical authentication alignment: absent verified workload identity must be UNAUTHENTICATED before reads; wrong service/namespace and end-user context remain PERMISSION_DENIED.
    3. Share the original-selector and mapped-room checks with the preparation repository.Trivial

      requireOriginalSelector (Lines 620-651) repeats the SQL and byte comparisons in WorldCanonicalInstancePreparationRepository.requireExactOriginalSelector (Lines 756-789 of that file). The ROOM-mapping reads have already diverged:

      • Lifecycle read (`requireMappedRoom`, Lines 653-716):
      • It compares the room and region tenant keys with association.worldPrepareFields().privateTenantKey().
      • It checks region_instance tenant, game instance, and world_instance_id.
      • It checks mapped_room_row_id and mapped_template_id.
      • Preparation readback (`readOwnerPreparation`, Lines 667-708 of the repository):
      • It compares the room tenant key with input.versionIdentity().sourceIntakeReceipt().localTenantKey().
      • It does not join or check region_instance.

      The two readers therefore accept different sets of rows as "the exact mapped scoped World runtime room". Extract one package-private helper for the selector receipt and the scoped ROOM mapping, and call it from both repositories. Then any later fix to the scope rules applies to both readers.

      • Accepted Valid useful consolidation with correctness effect: preparation readback omits retained ROOM region/world and mapped-row/template checks enforced by lifecycle reader. Share exact selector and scoped ROOM validation, preserve each caller typed invalid-evidence classification and fail-closed scope.
  11. CLI Review 5 CompletedRuntime 2m 35s
    Found: 3 Accepted: 1/1/1 Routed: 0
    1. Scope both sides of the REGION FULL OUTER JOIN before the join.Major

      The query joins the complete world_canonical_instance_topology_identity and region_instance tables. All instance-scope predicates are in the outer WHERE clause. The WHERE predicates reference both nullable sides of a FULL OUTER JOIN. PostgreSQL therefore cannot apply them before the join.

      Each lifecycle read can join the complete REGION mapping set and the complete region_instance table across all instances, and only filters them afterward. The cost of each read grows with the total number of instances, not with the instance being read. Every successful PrepareCanonicalWorldInstance performs this read, and so does every external lifecycle read.

      Filter each side in a subquery before the join. The rejection behavior stays the same:

      • If a foreign mapping points to an in-scope region, that region appears without a mapping. The mapping_id == null check rejects it.
      • If an in-scope mapping points to a foreign region, that mapping appears without a region row. The region_row_id == null check rejects it.
      • The row-count check and the coverage check do not change.

      ⚡ Proposed scoped join

      -                + "FROM world_canonical_instance_topology_identity m FULL OUTER JOIN region_instance ri "
      -                + "ON m.family='REGION' AND m.runtime_row_id=ri.id "
      -                + "WHERE (m.world_instance_id=? AND m.family='REGION') OR ri.world_instance_id=? "
      -                + "OR (ri.tenant_id=? AND ri.game_instance_id=?)",
      +                + "FROM (SELECT * FROM world_canonical_instance_topology_identity "
      +                + "WHERE world_instance_id=? AND family='REGION') m "
      +                + "FULL OUTER JOIN (SELECT * FROM region_instance "
      +                + "WHERE world_instance_id=? OR (tenant_id=? AND game_instance_id=?)) ri "
      +                + "ON m.runtime_row_id=ri.id",
      

      Run EXPLAIN against a populated schema. Confirm that both sides use their scoped indexes.

      • Accepted Valid scoped-query improvement: restrict mapping and region inputs before FULL OUTER JOIN while preserving unmatched-row, scope/count and coverage rejection. Verify actual PostgreSQL query/EXPLAIN with focused proof before making planner-performance claims.
    2. Add a reconsideration trigger to the review-allocation provenance entry.Minor

      The other retained entries in this file record a Reconsideration trigger. This entry ends after Expected pattern and has no trigger. The applicable rule requires a retained entry to record "the reason and reconsideration trigger." Without a trigger, a later health check cannot tell when to remove this tooling suggestion.

      📝 Proposed addition

         - Expected pattern: expose the controlling grant decision, timestamp, actor, original reason and baseline beside its additional-result count through an existing read-only controller command, so a worker can distinguish lifetime history from the current allowance without guessing. This is a tooling suggestion; existing counting and authorization rules stay unchanged.
      +  - Reconsideration trigger: when a read-only controller command reports the controlling grant decision and baseline beside the remaining allowance, qualify it against a PR with separate lifetime and current allowances and revisit this manual readback step.
      

      As per coding guidelines: "Retain only genuine blockers or deliberate postponements with their reason and reconsideration trigger."

      • Accepted Valid retained-observation hygiene: add the concrete reconsideration trigger for allocation provenance so later stewardship can verify and retire it; no new process requirement or controller implementation.
    3. Read the keytool output before waiting for the process to exit.Trivial

      This runKeytool calls process.waitFor(30, TimeUnit.SECONDS) before it reads stdout. If keytool writes more output than the pipe buffer holds, the process blocks on the write. The test then times out with "keytool timed out", and the diagnostic output is lost. The other PKI helpers in this PR read the stream first and then wait. Use the same order here.

      🐛 Proposed fix

             Process process = new ProcessBuilder(command).redirectErrorStream(true).start();
      -      if (!process.waitFor(30, TimeUnit.SECONDS)) {
      -        process.destroyForcibly();
      -        throw new IllegalStateException("keytool timed out");
      -      }
             String output;
             try (var stream = process.getInputStream()) {
               output = new String(stream.readAllBytes(), StandardCharsets.UTF_8);
             }
      -      if (process.exitValue() != 0) {
      +      if (!process.waitFor(30, TimeUnit.SECONDS) || process.exitValue() != 0) {
      +        process.destroyForcibly();
               throw new IllegalStateException("keytool failed: " + output);
             }
      
      • Accepted Valid bounded fixture issue: waiting before draining can fill keytool pipe. Preserve the real timeout by redirecting merged output to an owned temporary file (or bounded concurrent drain), then read diagnostics after exit/termination; do not adopt blocking readAllBytes before timed wait.
  12. CLI Review 6 CompletedRuntime 2m 46s
    Found: 2 Accepted: 0/0/0 Routed: 0
    1. Check that the classes-proof include pattern matches the fixture's declared Java package.Minor

      The include pattern requires the class file under integration/net/firedevops/firemud/gamesession/repository/. Class output paths follow the declared Java package, not the source-root folder. In the same integration/ source root, GameSessionFreshTenantHistoryPostgresIntegrationTest declares package net.firedevops.firemud.gamesession.repository;, without an integration. prefix. GameSessionRunOwnedCanonicalLaunchRepositoryPostgresIntegrationTest uses CanonicalHumanPublicationOwnerTestFixtures without an import, so the fixture shares that test's package.

      • If the fixture declares net.firedevops.firemud.gamesession.repository, the pattern matches no file.
      • In that case, the jar has no fixture class.
      • World crossServiceTestImplementation code that uses the fixture then fails to compile.

      The repository's AI observations log a related selector mistake caused by the same assumption.

      Confirm the package line of CanonicalHumanPublicationOwnerTestFixtures.java. Then confirm the class is in the jar, for example with jar tf build/libs/*-classes-proof.jar | grep CanonicalHumanPublicationOwnerTestFixtures. If the class is missing, use a pattern that matches either layout:

      Proposed pattern correction

           from(sourceSets["integrationTest"].output.classesDirs) {
      -        include("integration/net/firedevops/firemud/gamesession/repository/CanonicalHumanPublicationOwnerTestFixtures*.class")
      +        include("**/net/firedevops/firemud/gamesession/repository/CanonicalHumanPublicationOwnerTestFixtures*.class")
           }
      
      • Rejected Actual fixture declares package integration.net.firedevops.firemud.gamesession.repository, matching the include exactly. Main verified the real classes-proof jar contains its class and nested classes; the physical World compilation/proof passed.
    2. Require the exact SPIFFE URI before the binding write and the owner reads.Minor

      requireAuthenticatedGameSessionPeer checks only isService("game-session-service") and isInNamespace(trustedNamespace). Two other entry points also check the exact URI spiffe://firemud/ns/<ns>/sa/<service>: WorldStartSessionAccountParticipationVerifier.requireAuthenticatedGameSessionPeer and WorldStartSessionExecutionTerminalReadGrpcService.requireAuthenticatedAccountPeer.

      In this adapter, the stricter verifier runs only after these calls:

      • launchBindingService.bindCommittedLaunch(selector), which can call acceptFresh and write a launch binding.
      • assemblyService.assemble(...), which performs Game Design and Game Session reads.

      Assume GrpcPeerIdentity derives service and namespace without enforcing the firemud trust domain. Then a peer from another trust domain with the same namespace/service path passes this guard. That peer can trigger the owner write and the remote reads before the verifier refuses it. Confirm whether GrpcPeerIdentity already enforces the trust domain. If it does not, apply the same exact-URI check here.

      🔒️ Proposed alignment

           if (peer.isService("game-session-service")
               && peer.isInNamespace(trustedNamespace)
      +        && ("spiffe://firemud/ns/" + trustedNamespace + "/sa/game-session-service")
      +            .equals(peer.uri())
               && !SessionContext.hasAuthenticatedCallerContext()) {
             return true;
           }
      
      • Rejected GrpcPeerIdentity constructor and parseUri already enforce anchored spiffe://firemud/ns/<namespace>/sa/<service>, matching fields, canonical URI and allowed service. Exact service+namespace therefore enforces the expected URI; a foreign trust domain cannot construct this identity.
  13. Hosted Review 7 CompletedRuntime 16m 47s
    Found: 2 Accepted: 0/2/0 Routed: 0
    1. Classify SQLSTATE-bearing lifecycle storage failures with the shared classifier.Minor

      WorldCanonicalInstanceLifecycleReadRepository.read rethrows jOOQ and Spring data-access exceptions. The gRPC adapter currently maps all jOOQ DataAccessException instances to UNAVAILABLE, including deterministic SQLSTATE failures. Route these exceptions through WorldPreparationStorageFailureStatus.from(...).

      Non-transient Spring DataAccessException subtypes also reach the generic INTERNAL branch. Include them in the classifier catch.

      The classifier does not change a TooManyRowsException that has no SQLException cause. Its jOOQ type fallback still returns UNAVAILABLE, so add a separate lifecycle case and mapping if that failure must be non-retryable.

      --- "a/services/world-management-service/src/main/java/net/firedevops/firemud/worldmanagement/tenant/WorldCanonicalInstanceLifecycleReadGrpcService.java"
      +++ "b/services/world-management-service/src/main/java/net/firedevops/firemud/worldmanagement/tenant/WorldCanonicalInstanceLifecycleReadGrpcService.java"
      @@ -78,16 +78,19 @@
                     .withDescription("Canonical World lifecycle source evidence is inconsistent")
                     .asRuntimeException());
             return;
      -    } catch (DataAccessResourceFailureException
      -        | TransientDataAccessException
      -        | DataAccessException
      -        | CannotCreateTransactionException unavailable) {
      +    } catch (CannotCreateTransactionException unavailable) {
             responseObserver.onError(
                 Status.UNAVAILABLE
                     .withDescription("Canonical World lifecycle storage is temporarily unavailable")
                     .asRuntimeException());
             return;
      +    } catch (DataAccessException | org.springframework.dao.DataAccessException storageFailure) {
      +      responseObserver.onError(
      +          Status.fromCode(WorldPreparationStorageFailureStatus.from(storageFailure))
      +              .withDescription("Canonical World lifecycle storage operation failed")
      +              .asRuntimeException());
      +      return;
           } catch (RuntimeException failure) {
             responseObserver.onError(
                 Status.INTERNAL
                     .withDescription("Canonical World lifecycle read failed")
      

      Add lifecycle RPC cases for one deterministic SQLSTATE and one serialization SQLSTATE.

      • Accepted Verified lifecycle forwards jOOQ and Spring storage failures but adapter loses deterministic SQLSTATE classification. Reuse existing classifier; preserve transaction-start UNAVAILABLE and make TooManyRows nonretryable.
    2. Make the keytool timeout effective.Minor

      runKeytool calls stream.readAllBytes() before process.waitFor(30, TimeUnit.SECONDS). readAllBytes() blocks until keytool closes its output. If keytool hangs, the read never returns and the 30-second timeout never runs. The test JVM then blocks without a bound.

      The sibling HistoricalOriginalStartSessionOwnerEvidenceReadGrpcMtlsTest.runKeytool sends output to a file, waits with the timeout, and force-stops the process. Use the same pattern here. You can also move that helper into shared test support.

      🐛 Proposed fix

      -      Process process = new ProcessBuilder(command).redirectErrorStream(true).start();
      -      String output;
      -      try (var stream = process.getInputStream()) {
      -        output = new String(stream.readAllBytes(), StandardCharsets.UTF_8);
      -      }
      -      if (!process.waitFor(30, TimeUnit.SECONDS) || process.exitValue() != 0) {
      -        process.destroyForcibly();
      -        throw new IllegalStateException("keytool failed: " + output);
      -      }
      +      Path outputFile = Files.createTempFile(tempDirectory, "keytool-", ".log");
      +      Process process =
      +          new ProcessBuilder(command)
      +              .redirectErrorStream(true)
      +              .redirectOutput(outputFile.toFile())
      +              .start();
      +      try {
      +        if (!process.waitFor(30, TimeUnit.SECONDS)) {
      +          process.destroyForcibly();
      +          process.waitFor(5, TimeUnit.SECONDS);
      +          throw new IllegalStateException(
      +              "keytool timed out: " + Files.readString(outputFile, StandardCharsets.UTF_8));
      +        }
      +        if (process.exitValue() != 0) {
      +          throw new IllegalStateException(
      +              "keytool failed: " + Files.readString(outputFile, StandardCharsets.UTF_8));
      +        }
      +      } finally {
      +        if (process.isAlive()) process.destroyForcibly();
      +        Files.deleteIfExists(outputFile);
      +      }
      
      • Accepted Verified Common fixture blocks on pipe output before its timed wait. Use bounded file-backed capture, retain30s timeout, bounded force-stop cleanup and interruption semantics.
  14. Hosted Review 8 CompletedRuntime 10m 45s
    Found: 1 Accepted: 0/1/0 Routed: 0
    1. Map transaction-start failures to UNAVAILABLE in the terminal read adapter.Minor

      readExactExecution starts a new Spring transaction through readTransaction.execute(...). A CannotCreateTransactionException can bypass the storage-failure catch and reach the generic RuntimeException branch, which returns INTERNAL. Map this retryable transaction-start failure to UNAVAILABLE, and add a focused test.

      🩺 Proposed fix

      +import org.springframework.transaction.CannotCreateTransactionException;
      @@
           } catch (WorldCanonicalInstancePreparationService.PreparationDeniedException denied) {
             fail(
                 responseObserver,
                 Status.FAILED_PRECONDITION,
                 "The exact original World StartSession operation is not authenticated for recovery");
             return;
      +    } catch (CannotCreateTransactionException transactionFailure) {
      +      fail(
      +          responseObserver,
      +          Status.UNAVAILABLE,
      +          "World StartSession terminal storage is temporarily unavailable");
      +      return;
           } catch (DataAccessException | org.springframework.dao.DataAccessException storageFailure) {
      
      • Accepted Verified recoverExactTerminal propagates readTransaction start failure; CannotCreateTransactionException bypasses DAOcatch and genericbranch returnsINTERNAL. CatchsanitizedUNAVAILABLE and focusedtest, no auth/evidence change.

Routed Findings

0 Open0 Accepted/Fixed0 Rejected

No routes recorded

Unlinked items

no items unlinked