FireMUD Delivery Status

PR data refreshed

PR #3236 review history

Review rounds

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

Hosted CodeRabbit3 completed
5/5/03/3/01/1/0
CLI CodeRabbit6 completed
1/1/01/1/00/0/01/0/01/1/0

Recorded review history

Reviews and findings

  1. Hosted Review 1 CompletedRuntime 6m 10s
    Found: 5 Accepted: 0/4/1 Routed: 0
    1. Update the stale prerequisite statement that the new section contradicts.Minor

      Line 23 still states: "The actual Game Logic storage/terminal owner and Game Design selected-source/receipt pipeline remain absent from this cut and must qualify before the launch-descriptor producer can consume an intake receipt."

      The new "Selected gameplay-rule retention and receipt composition" section (Lines 15-19) records the following facts:

      • The Game Logic intake owner, V1003 storage, and the Game Design selected-intake and receipt owners are present.
      • These owners qualified in a controlled standalone pipeline.

      The two paragraphs now give conflicting current status. Change Line 23 to state the remaining gaps:

      • The owners are unregistered.
      • The launch-descriptor consumer and genuine release authority are unqualified.

      Remove the claim that the owners are absent. Link to the new section instead of repeating it.

      As per path instructions: "Flag obsolete transitional guidance" and "Review docs for canonical-current-state consistency."

      • Accepted Verified same tracker says qualified controlled owners exist but older prerequisite says absent. Link to composition section, preserve unregistered launch-consumer and genuine-authority gaps.
    2. Keep the gRPC status code when you sanitize producer failures.Trivial

      The catch block correctly removes the message and the cause, so the original creator credential cannot be reflected in the error. It also removes the Status.Code. As a result, the caller cannot tell a transient UNAVAILABLE or DEADLINE_EXCEEDED failure from a definitive denial such as PERMISSION_DENIED or FAILED_PRECONDITION.

      The class contract says that the caller owns recovery through recoverAndRetain after an uncertain acknowledgement. Only the transient codes justify that recovery path. Put the code alone into the sanitized exception, without the description or the cause. The credential cannot leak through the code, and the caller can then choose between recovery and abandonment.

      Possible refactor

           } catch (RuntimeException denied) {
             // The protected original credential must never be reflected by an injected client error.
      -      throw new IllegalStateException("Account intake authorization denied or unavailable");
      +      var code = io.grpc.Status.fromThrowable(denied).getCode();
      +      throw new IllegalStateException(
      +          "Account intake authorization denied or unavailable (" + code + ")");
           }
      

      If you apply this change, update sanitizesProducerFailuresWithoutReflectingProtectedCredential and the composed test's message assertion to match the new message.

      • Accepted Keep existing sanitized IllegalState exception family; retain only safe Status.Code enum in its message for transient-vs-denial diagnosis. Never propagate original descriptions, credentials or causes; update focused unit and composed assertions.
    3. Do not report integrity conflicts as UNAVAILABLE.Minor

      GameLogicGameplayRuleIntakeRepository.findTerminal throws IllegalStateException("GL_GAMEPLAY_RULE_INTAKE_READBACK_CONFLICT") when the stored row differs from its terminal bytes. retain throws IllegalStateException("GL_GAMEPLAY_RULE_INTAKE_COMMIT_READBACK_MISMATCH") on a commit-readback mismatch. This catch maps both exceptions to UNAVAILABLE.

      Clients treat UNAVAILABLE as a transient, retryable status. SelectedDraftGameLogicReceiptService and recovery callers will therefore keep retrying a permanent storage-integrity fault. The Game Design source-read endpoint already maps IllegalArgumentException | IllegalStateException to FAILED_PRECONDITION. Use the same mapping here and in GameLogicGameplayRuleIntakeTerminalReadGrpcService. Keep UNAVAILABLE for other runtime failures, for example DataAccessException.

      Proposed fix

      --- "a/services/game-logic-service/src/main/java/net/firedevops/firemud/gamelogic/sourceintake/GameLogicGameplayRuleIntakeGrpcService.java"
      +++ "b/services/game-logic-service/src/main/java/net/firedevops/firemud/gamelogic/sourceintake/GameLogicGameplayRuleIntakeGrpcService.java"
      @@ -55,11 +55,13 @@
                 GameLogicIntakeRetainProtoCodec.toResponse(
                     new GameLogicIntakeRetainEvidence(decoded, terminal)));
             observer.onCompleted();
           } catch (StatusRuntimeException failure) {
             observer.onError(failure);
      +    } catch (IllegalArgumentException | IllegalStateException conflict) {
      +      observer.onError(Status.FAILED_PRECONDITION.asRuntimeException());
           } catch (RuntimeException unavailable) {
             observer.onError(Status.UNAVAILABLE.asRuntimeException());
           }
         }
       
         private static void requireGameDesignPeer(String namespace) {
      
      • Accepted Verified Game Logic repository throws permanent IllegalState readback/integrity conflicts. Map IllegalArgument/IllegalState to FAILED_PRECONDITION in both intake RPCs, retain real storage/transaction outages UNAVAILABLE; focused transport tests.
    4. Align ADR-0180 with the Account implementation status.Minor

      The ADR states that Account has individual-party persistence, a hosted-terms catalog, and acceptance storage. The Account implementation status states that these capabilities are target-only and that no current Account storage implements them. Update the ADR to describe these as target capabilities until their implementation status changes.

      • Accepted Verified inconsistency; V84/V85 and live owner repositories already provide unregistered party/catalog/acceptance storage. Correct stale Account API implementation status to match factual ADR limits, not erase implemented storage or claim genuine authority.
    5. Restructure this entry into the required format, or remove it.Minor

      The file defines this entry format: "YYYY-MM-DD: short title", followed by "Context", "Observation", and "Expected pattern". This entry is one paragraph with no title and no sub-fields. Every other entry in the file follows the format.

      The entry also records a fix that this same change completes ("Game Design now tracks the foreign Game Logic and World migration directories"). The file states: "Do not use this file as a bug log for ordinary fixes that were completed in the same piece of work."

      • If the reusable lesson applies, keep only that lesson in the required format. The lesson is that classes-only proof artifacts need declared foreign migration inputs.
      • Add a reconsideration trigger if a check or guard should enforce the rule. One option is a check that rejects filesystem migration reads that have no declared task input.

      Proposed restructure

      --- "a/design/project-management/ai-observations.md"
      +++ "b/design/project-management/ai-observations.md"
      @@ -103,7 +103,11 @@
         - Expected pattern: treat the setting as a qualified local choice, not a repository-wide memory guarantee or a change to hosted sizing.
         - Reconsideration trigger: fresh OOM/GC thrashing or a concrete need to measure cold-build memory.
       
      -- `2026-10-15`: Classes-only foreign-owner proof artifacts intentionally omit application and Flyway resources. A composed test that reads another owner’s migrations from disk must declare those directories as task inputs; otherwise a SQL-only change can leave the composition up-to-date. The selected Game Logic proof exposed this after its forward migration was reconciled, and Game Design now tracks the foreign Game Logic and World migration directories.
      +- `2026-10-15`: Declare foreign migration directories read by composed proofs
      +  - Context: the selected Game Logic composed proof reads Game Logic and World migrations from disk through classes-only proof artifacts.
      +  - Observation: classes-only artifacts omit Flyway resources, so a SQL-only change could leave the composed task up-to-date.
      +  - Expected pattern: declare every foreign migration directory that a composed test reads from disk as a named task input.
      +  - Reconsideration trigger: a build check rejects undeclared filesystem migration reads in cross-service suites.
       
       - `2026-10-15`: Verify the complete absolute patch destination after the first write
         - Context: Gameplay’s World digest-guard helper verified its checkout but mistyped the absolute migration path, creating a file in a similarly named sibling directory outside Git. This is distinct from the earlier relative-path incident: an absolute path alone does not identify the intended checkout.
      

      As per coding guidelines: "Entry format: YYYY-MM-DD: short title / Context / Observation / Expected pattern" and "Do not use this file as a bug log for ordinary fixes that were completed in the same piece of work."

      • Accepted The malformed entry is newly introduced by this active unmerged PR, not a prior base observation. Format that one new entry as reusable migration-input lesson plus trigger; preserve every historical entry and avoid completed-fix bug-log detail.
  2. Hosted Review 2 CompletedRuntime 7m 50s
    Found: 3 Accepted: 0/2/1 Routed: 0
    1. Test namespace isolation independently of scope.Trivial

      The other-namespace actor also has a different scope. If either repository read drops its namespace predicate, the scope predicate still excludes this actor and the test passes. Seed the other namespace with shared scope, then use shared in the other-namespace read assertions. Keep the existing isolated reads to test scope separately.

      • Accepted Trivial: Other namespace currently also changes scope, hiding a missing namespace predicate. Use SHARED for that fixture and its positive reads, retaining independent ISOLATED negatives and unchanged-row assertions.
    2. Map client lifecycle failures to UNAVAILABLE.Minor

      The two read clients call requireInitializedStub(...), which throws IllegalStateException when the client is closed or not initialized. retain and abort invoke these readers before persistence. The gRPC handler maps that exception to FAILED_PRECONDITION, so a retryable client lifecycle failure becomes permanent. The underlying StatusRuntimeException path is already forwarded correctly.

      Convert the IllegalStateException raised during each blocking read to Status.UNAVAILABLE:

      +import io.grpc.Status;
       import io.grpc.ManagedChannel;
      
      -    var response =
      -        requireInitializedStub(
      -                "Account GL intake authorization read client is not initialized and available")
      -            .withDeadlineAfter(CALL_DEADLINE_SECONDS, TimeUnit.SECONDS)
      -            .readHeldGameLogicIntakeAuthorization(
      -                GameLogicIntakeAuthorizationReadGrpcCodec.toRequest(request));
      +    final var response;
      +    try {
      +      response =
      +          requireInitializedStub(
      +                  "Account GL intake authorization read client is not initialized and available")
      +              .withDeadlineAfter(CALL_DEADLINE_SECONDS, TimeUnit.SECONDS)
      +              .readHeldGameLogicIntakeAuthorization(
      +                  GameLogicIntakeAuthorizationReadGrpcCodec.toRequest(request));
      +    } catch (IllegalStateException unavailable) {
      +      throw Status.UNAVAILABLE.asRuntimeException();
      +    }
      

      Apply the same narrow conversion around the blocking read in GameplayRuleSourceReadClient.

      • Accepted Minor: Shared requireInitializedStub throws lifecycle IllegalStateException before RPC; the intake handler misclassifies it as permanent. Convert only stub acquisition to sanitized UNAVAILABLE in both read clients; preserve validation, invalid-evidence and existing RPC statuses.
    3. Add the required Expected pattern field.Minor

      The file’s entry format requires an Expected pattern. This entry records an outcome and a reconsideration trigger, but omits that field. Add the reusable action separately from the trigger. This repeats the prior entry-format finding.

      • Accepted Minor: The new PR-owned admission observation lacks the required Expected pattern field. Add the reusable action while preserving Outcome and Reconsideration text; no unrelated historical cleanup.
  3. CLI Review 1 CompletedRuntime 2m 08s
    Found: 0 Accepted: 0/0/0 Routed: 0
    1. No findings recorded for this run
  4. CLI Review 2 CompletedRuntime 2m 06s
    Found: 1 Accepted: 0/1/0 Routed: 0
    1. fetchOne on the selection lock fails if a Version has more than one selection row.Minor

      The lock query filters only by canonical_tenant_id and canonical_version_id. The selection table primary key also contains publish_request_id, so the query can return several rows. If more than one row matches, jOOQ fetchOne throws TooManyRowsException. In that case, every receipt retention for that Version fails, including exact retries. The query only takes locks and discards its result, so fetch keeps the same lock semantics without the cardinality assumption.

      Confirm whether the V43 owner schema allows at most one game_design_authored_draft_publish_selection row per (canonical_tenant_id, canonical_version_id). If it guarantees a single row, document that invariant at this call site.

      🔒️ Proposed fix

      -    dsl.fetchOne(
      +    dsl.fetch(
               "SELECT canonical_tenant_id FROM game_design_authored_draft_publish_selection WHERE canonical_tenant_id = ? AND canonical_version_id = ? FOR UPDATE",
               selection.target().canonicalTenantId(),
               selection.target().canonicalVersionId());
      
      • Accepted Runtime cardinality alarm is false: V50.2 primary key is tenant/version. Accept the conditional invariant-documentation request and align this PR predecessor fixture to that existing owner key; preserve fetchOne and lock order.
  5. Hosted Review 3 CompletedRuntime 8m 06s
    Found: 1 Accepted: 0/1/0 Routed: 0
    1. Map lifecycle failures from the Account permission client to UNAVAILABLE.Minor

      GrpcGameLogicIntakeSourceReadClient.read calls requireInitializedStub(...) without converting its IllegalStateException. A closed or uninitialized client therefore reaches the Game Logic retain service as FAILED_PRECONDITION instead of the retryable UNAVAILABLE required for this read path.

      +import io.grpc.Status;
      +
      -    var stub =
      -        requireInitializedStub(
      -                "Account GL intake source permission client is not initialized and available")
      -            .withDeadlineAfter(CALL_DEADLINE_SECONDS, TimeUnit.SECONDS);
      +    AccountGameLogicIntakeSourceReadServiceGrpc.AccountGameLogicIntakeSourceReadServiceBlockingStub
      +        initializedStub;
      +    try {
      +      initializedStub =
      +          requireInitializedStub(
      +              "Account GL intake source permission client is not initialized and available");
      +    } catch (IllegalStateException unavailable) {
      +      throw Status.UNAVAILABLE.asRuntimeException();
      +    }
      +    var stub = initializedStub.withDeadlineAfter(CALL_DEADLINE_SECONDS, TimeUnit.SECONDS);
      

      Apply the same lifecycle mapping to other unguarded intake clients used by this composition.

      • Accepted Verified lifecycle leakage from source-permission stub acquisition. Same retain/terminal/settlement/authorization composition clients share it. Catch only stub acquisition, sanitize UNAVAILABLE, preserve deadlines and all permanent request/evidence checks.
  6. CLI Review 3 CompletedRuntime 2m 28s
    Found: 1 Accepted: 0/0/1 Routed: 0
    1. Move the duplicated Version-row proof SQL into one helper.Trivial

      readForPublication (lines 89-113) and retain (lines 122-146) each contain the same 14-line Version/Game join predicate. The only differences are FOR UPDATE OF v and where the parameters come from. If one copy changes and the other does not, the publication read and the retention write will accept different Version provenance. Use one private helper that takes the target values and a lock flag. The same file also repeats the AuthoredDraftPublishSelectionRepository(...).read(...) lambda, which also appears in SelectedDraftGameLogicIntakeCommandService.repositoryReader and in the SelectedDraftGameLogicReceiptService constructor. One shared reader would remove those copies as well.

      ♻️ Proposed helper

      private static final String VERSION_PROOF =
          "SELECT v.id FROM version v JOIN game g "
              + "ON g.id = v.identity_source_game_row_id "
              // ... unchanged predicate ...
              + "AND v.version_state_epoch > 0";
      
      private boolean versionProofPresent(
          long versionRowId, String versionTenantKey, UUID tenant, UUID version,
          long sourceGameRowId, String sourceGameTenantKey, String provenance, boolean lock) {
        return dsl.fetchOne(
                VERSION_PROOF + (lock ? " FOR UPDATE OF v" : ""),
                versionRowId, versionTenantKey, tenant, version,
                sourceGameRowId, sourceGameTenantKey, provenance)
            != null;
      }
      

      Also applies to: 122-146

      • Accepted Verified duplicated Version/Game provenance SQL in read/retain and repeated selection read adapters. Consolidate exact predicate/parameters and retained-selection reader without changing lock order, transactions or refusal behavior.
  7. CLI Review 4 CompletedRuntime 2m 04s
    Found: 0 Accepted: 0/0/0 Routed: 0
    1. No findings recorded for this run
  8. CLI Review 5 CompletedRuntime 2m 20s
    Found: 1 Accepted: 0/0/0 Routed: 0
    1. Check the nested deadline budget before any receiver is registered.Trivial

      Game Design calls retainGameplayRuleIntake with a 5-second client deadline. Inside that call, this method makes a blocking Account HELD read and a blocking Game Design source read. The Game Design source read then makes a blocking Account permission read. Each hop sets its own 5-second deadline. gRPC also propagates the inbound Context deadline, so all of these nested hops must finish within the original 5 seconds. Each hop can carry gzip-compressed payloads of up to 24 MiB.

      No durable state exists until the final terminal INSERT. If a large selected source keeps the chain over 5 seconds, every exact retry repeats the same work and returns DEADLINE_EXCEEDED again. The controlled pipeline test uses one admission tag, so it does not cover this case.

      Measure the full chain against a source near the maximum size. Then decide whether the outer CALL_DEADLINE_SECONDS for the retain client needs its own budget, separate from the leaf reads.

      • Rejected No demonstrated deadline violation or intake latency SLO.24MiB is wire cap; full canonical binding is4MiB.Same-identity ambiguous recovery exists. Near-max full-chain measurement is future performance qualification; no justified budget change.
  9. CLI Review 6 CompletedRuntime 2m 30s
    Found: 1 Accepted: 0/1/0 Routed: 0
    1. Do not relay dependency StatusRuntimeExceptions to the Game Design caller unchanged.Minor

      owner.retain calls two dependencies through outbound clients: accountAuthorizationReader.read (Account HELD read) and gameDesignSourceReader.read (Game Design source read). Those clients throw StatusRuntimeException for their own transport results. Examples are UNAUTHENTICATED when the client-side server-identity interceptor rejects a substituted peer, PERMISSION_DENIED from Account, and FAILED_PRECONDITION descriptions from the Game Design endpoint. This catch block forwards those statuses and descriptions to the Game Design caller as if they came from this endpoint.

      Consequences:

      • A correctly authenticated Game Design peer can receive UNAUTHENTICATED or PERMISSION_DENIED, but the failure was in Game Logic's outbound mTLS or Account authorization.
      • The forwarded descriptions are not sanitized. The other branches in this method send no description, and mapsPermanentOwnerFailuresToSanitizedFailedPrecondition tests that behavior.

      The status codes that Game Logic itself raises (ALREADY_EXISTS, FAILED_PRECONDITION from exactTerminal and the HELD/source mismatch checks) are still valid to return. Map dependency transport codes to a caller-relative code (UNAVAILABLE for authentication, permission, deadline and unavailability failures) and drop the description. A dedicated owner exception is one way to do this, or the outbound calls can be wrapped in GameLogicGameplayRuleIntakeService.

      GameDesignGameplayRuleSourceReadGrpcService has the same pattern. Its lines 48-49 forward the StatusRuntimeException from permissions.read (the Account source-permission client) unchanged.

      🔧 Possible mapping at the transport

           } catch (StatusRuntimeException failure) {
      -      observer.onError(failure);
      +      var code = failure.getStatus().getCode();
      +      observer.onError(
      +          (code == Status.Code.ALREADY_EXISTS
      +                  || code == Status.Code.FAILED_PRECONDITION
      +                  || code == Status.Code.INVALID_ARGUMENT)
      +              ? Status.fromCode(code).asRuntimeException()
      +              : Status.UNAVAILABLE.asRuntimeException());
      

      Prefer distinguishing local owner statuses from dependency statuses at the source, because a dependency can also return FAILED_PRECONDITION.

      This follows the path instructions: "Flag changes that violate documented FireMUD invariants, especially gRPC application-error handling."

      • Accepted Foreign auth/precondition statuses can blame valid callers and leak descriptions. Classify at outbound calls; sanitize dependency errors, preserve canonical infrastructure codes and local owner refusals.

Routed Findings

0 Open0 Accepted/Fixed0 Rejected

No routes recorded

Unlinked items

no items unlinked