FireMUD Delivery Status

PR data refreshed

PR #3220 review history

Implement selected World owners and retained GDS terminal producer

Unit 1A · identity, Account and public JOIN

Review rounds

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

Hosted CodeRabbit3 completed
4/4/01/1/04/2/0
CLI CodeRabbit6 completed
1/0/03/2/02/1/04/3/03/0/0

Recorded review history

Reviews and findings

  1. Hosted Review 1 CompletedRuntime 10m 00s
    Found: 4 Accepted: 0/4/0 Routed: 0
    1. Map transient Account COMMIT_ORDER read failures to UNAVAILABLE.Minor

      DraftCommitOrderReadClient.read performs a blocking Account gRPC call. A transient StatusRuntimeException(UNAVAILABLE) therefore reaches the handler's generic RuntimeException branch, which returns FAILED_PRECONDITION instead of a retryable status.

      --- "a/services/world-management-service/src/main/java/net/firedevops/firemud/worldmanagement/tenant/WorldOriginalDraftGraphApplyGrpcService.java"
      +++ "b/services/world-management-service/src/main/java/net/firedevops/firemud/worldmanagement/tenant/WorldOriginalDraftGraphApplyGrpcService.java"
      @@ -70,10 +70,18 @@
                 observer,
                 Status.FAILED_PRECONDITION,
                 "World original apply conflicts with retained evidence");
           } catch (org.springframework.dao.DataAccessException
               | org.jooq.exception.DataAccessException unavailable) {
             deny(observer, Status.UNAVAILABLE, "World original apply storage unavailable");
      +    } catch (io.grpc.StatusRuntimeException upstream) {
      +      Status.Code code = upstream.getStatus().getCode();
      +      deny(
      +          observer,
      +          code == Status.Code.UNAVAILABLE || code == Status.Code.DEADLINE_EXCEEDED
      +              ? Status.UNAVAILABLE
      +              : Status.FAILED_PRECONDITION,
      +          "World original apply upstream Account evidence unavailable");
           } catch (RuntimeException failure) {
             LOGGER.error(
                 "World original graph application failed to establish committed evidence; "
                     + "failureType={} trace={}",
      
      • Accepted Upstream Account UNAVAILABLE and DEADLINE_EXCEEDED currently fall through to FAILED_PRECONDITION. Preserve retryable UNAVAILABLE with safe fixed descriptions; other upstream codes remain fail closed.
    2. Catch Spring DataAccessException, not only TransientDataAccessException, so storage outages return UNAVAILABLE.Minor

      This catch handles only Spring TransientDataAccessException and jOOQ DataAccessException. Some Spring storage failures are non-transient types. Examples are CannotGetJdbcConnectionException and DataAccessResourceFailureException. Those exceptions go to the RuntimeException branch on Line 74 and return INTERNAL. A caller then cannot tell a temporary storage outage from a permanent fault.

      The other adapters in this PR catch org.springframework.dao.DataAccessException here: WorldSelectedDraftPublicationFreezeGrpcService (Lines 98-99) and WorldPublicationTerminalCompletionGrpcService. Use the same type in this adapter. Spring's TransientDataAccessException is a subclass of Spring DataAccessException, so the new catch also covers it.

      Proposed fix

      --- "a/services/world-management-service/src/main/java/net/firedevops/firemud/worldmanagement/tenant/WorldPublishedStartLocationReadGrpcService.java"
      +++ "b/services/world-management-service/src/main/java/net/firedevops/firemud/worldmanagement/tenant/WorldPublishedStartLocationReadGrpcService.java"
      @@ -65,7 +65,7 @@
                     .withDescription("World selector conflicts with exact frozen or APPLIED evidence")
                     .asRuntimeException());
             return;
      -    } catch (TransientDataAccessException | DataAccessException unavailable) {
      +    } catch (org.springframework.dao.DataAccessException | DataAccessException unavailable) {
             responseObserver.onError(
                 Status.UNAVAILABLE
                     .withDescription("World published selector storage is temporarily unavailable")
      

      After this change, the org.springframework.dao.TransientDataAccessException import is unused. Remove it.

      • Accepted Non-transient Spring storage failures currently become INTERNAL. Match sibling owner adapters by catching all Spring DataAccessException alongside jOOQ, retaining guards and unexpected-failure behavior.
    3. Use the documented entry format for the two new observations.Minor

      The file defines an entry format. Each entry has a dated title and Context, Observation, and Expected pattern sub-bullets. All other entries use this format. The two new 2026-10-15 entries are single prose paragraphs. Split each paragraph into the sub-bullets. Keep the existing wording. If an entry stays because a genuine postponement remains, add a Reconsideration trigger.

      Proposed structure for the first entry

      -- `2026-10-15`: Diagnose effective migration guards before proposing repairs. A World APPLIED diagnosis read V1012 without following V1014, ...
      +- `2026-10-15`: Diagnose effective migration guards before proposing repairs
      +  - Context: a World APPLIED diagnosis read V1012 without following V1014.
      +  - Observation: V1014 had already replaced the six-populated-family predicate with complete explicit counts and owner-proved zeros; a historical definition alone is not live behavior.
      +  - Expected pattern: locate every later function/trigger replacement and related mapping/receipt constraints at the pinned receiving head; preserve migration history and propose a forward repair only for a demonstrated current gap.
      

      As per coding guidelines, the file states "Entry format: - YYYY-MM-DD: short title - Context ... - Observation ... - Expected pattern ...".

      • Accepted Both new owned observations violate the documented entry format. Reformat only these entries, preserving all text and proof attribution.
    4. Avoid serializing all World reconciliations on lifecycleLock.Minor

      reconcile holds lifecycleLock while it reads the owner and calls completion.complete(request). A slow World call can therefore delay every other reconciliation on the same producer instance. close() also waits for that call to finish.

      The completion client already applies a 5-second gRPC deadline, so the call is bounded. Remove the indefinite-block claim, but keep the lock-scope concern.

      ♻️ Suggested direction

      Use a read/write lifecycle guard, or track in-flight reconciliations under the lock. Check closed under the guard, run the owner read and World call without an exclusive lock, and make close() mark the producer closed before waiting for in-flight calls to drain and closing the client.

      • Accepted Exclusive lifecycle monitor currently covers owner read and bounded World RPC, serializing independent reconciliations. Admit/drain briefly under monitor and close outside it with focused concurrency proof.
  2. Hosted Review 2 CompletedRuntime 7m 14s
    Found: 1 Accepted: 0/1/0 Routed: 0
    1. Move the post-commit selection read inside the pending-reconciliation try, and use the recovered request.Minor

      completeSelectedWorldTerminal runs after the local Game Design seal has already committed. The method contract converts every handoff failure to PendingReconciliationException. Line 177 calls requireSelectedIntent(request) outside the try. A transient authoredSelections.readByPublishRequest failure therefore escapes as a raw exception, not as pending reconciliation. Callers that classify only PendingReconciliationException as pending, such as the Temporal activity, then see a different failure class for a terminal that has already committed.

      reconcileFullVersionPublishMechanics (Lines 165-169) also passes the original request to the wrapper. The recovered value from recoverMissingPublishRequestId() exists only inside reconcileFullVersionPublishMechanicsLocal. If publishRequestId was absent, the wrapper calls requireSelectedIntent with a null id and throws PUBLISH_ATTEMPT_IDENTITY_CONFLICT after the seal has committed.

      🐛 Proposed fix

         private PublishWorkflowSnapshot completeSelectedWorldTerminal(
             PublishWorkflowRequest request, PublishWorkflowSnapshot snapshot) {
           if (request.intent() == null || !snapshot.isTerminal()) return snapshot;
           var producer = worldTerminalProducer.getIfAvailable();
           if (producer == null)
             throw pendingReconciliation("World publication terminal producer unavailable");
      -    var selection = requireSelectedIntent(request);
           try {
      +      var selection = requireSelectedIntent(request);
             producer.reconcile(
      
         PublishWorkflowSnapshot reconcileFullVersionPublishMechanics(PublishWorkflowRequest request) {
      +    request = request.recoverMissingPublishRequestId();
           // Complete only after all local commit/exception classification has left its owner boundary.
           return completeSelectedWorldTerminal(
               request, reconcileFullVersionPublishMechanicsLocal(request));
         }
      
      • Accepted Post-commit selection read outside try can escape pending classification; accept that fix. Missing-id handoff claim invalid: recovery skips selected requests and null-intent bypasses handoff. Move selection read only; test pending failure without new writes.
  3. CLI Review 1 CompletedRuntime 2m 35s
    Found: 3 Accepted: 0/1/0 Routed: 0
    1. Confirm that the verifier creates CommitOrderProof only for a held Account result.Major

      The class documentation says that it creates a World proof "only after the mTLS client returns its validated HELD result". The method checks only request.equals(evidence.request()). It then creates new CommitOrderProof(operation).

      WorldDraftGraphApplicationService.apply treats that proof as authority for a new APPLIED write. Assume DraftCommitOrderReadClient.read can return evidence for a released, unknown or otherwise non-held order without throwing. In that case, World writes APPLIED topology without the held COMMIT_ORDER guarantee.

      Confirm that the client or codec rejects every non-held status. If it does not, check the status explicitly here before the proof is created.

      • Rejected DraftCommitOrderReadClient.read uses DraftCommitOrderReadGrpcCodec.fromResponse, which rejects every status other than HELD before creating typed evidence. No non-held result reaches the World verifier; no duplicate guard needed.
    2. Confirm that versionStateEpoch can never be 0 before the inventory requires a positive value.Major

      requireCanonicalLongFields sends freeze.versionStateEpoch() to parsePositiveCanonicalLong. That method accepts only [1-9][0-9]*. capture calls requireEnvelopeBinding with the value Long.toString(request.versionStateEpoch()), and requireEnvelopeBinding calls this check.

      If Game Design can report a DRAFT Version with state epoch 0, the result is as follows:

      • capture throws ConflictException inside the owner transaction.
      • The first freeze for that Version rolls back.
      • The publication cannot proceed for that Version.

      The supplied fixtures use only epochs 1, 5, and 9. The supplied files do not establish a lower bound. If 0 is a valid epoch, use a non-negative canonical decimal check for this field only, for example 0|[1-9][0-9]*. Keep the positive check for the row keys and the Game Design Version id.

      Verify these two points:

      • The minimum value that AuthoredWorldVersionStateEvidence.versionStateEpoch can carry for a DRAFT Version.
      • The minimum value that the freeze request accepts for expectedVersionStateEpoch.
      • Rejected Both AuthoredWorldVersionStateEvidence and selected-freeze Request explicitly reject epoch<=0; Game Design Version starts at1. Inventory positive canonical-long check matches these contracts, so zero is not a valid input.
    3. Reject end-user caller context in both Account terminal-read checks.Minor

      Both Account peer checks verify the URI, service and namespace, but neither checks SessionContext.hasAuthenticatedCallerContext(). The other new owner adapters reject end-user context, so these two checks are inconsistent with them.

      • services/world-management-service/src/main/java/net/firedevops/firemud/worldmanagement/tenant/WorldPublicationTerminalReadService.java#L100-L115: add || SessionContext.hasAuthenticatedCallerContext() to the PERMISSION_DENIED condition.
      • services/world-management-service/src/main/java/net/firedevops/firemud/worldmanagement/tenant/WorldPublicationTerminalReadGrpcService.java#L85-L99: add the same condition to requireAuthenticatedAccountPeer.
      • Accepted Both exact Account terminal-read checks omit the end-user caller-context denial already required by neighboring service-only owner adapters. Add existing SessionContext guard before decoding/storage with focused refusals.
  4. Hosted Review 3 CompletedRuntime 7m 15s
    Found: 4 Accepted: 0/2/0 Routed: 0
    1. Do not forward the upstream Game Design status and trailers to the World caller.Minor

      owner.complete reaches the Game Design terminal read through WorldGameDesignPublicationTerminalVerifier. The World terminal service and repository do not throw StatusRuntimeException themselves, so every StatusRuntimeException caught here comes from the remote Game Design read. observer.onError(failure) sends the upstream status code, description and trailers unchanged. The World tracker records a different repository pattern for owner-read adapters: "safe RPC errors without upstream descriptions or trailers". Keep the status code so the producer can still classify retries, but replace the description with a fixed World-owned message and send no trailers.

      🔒️ Proposed fix

      --- "a/services/world-management-service/src/main/java/net/firedevops/firemud/worldmanagement/tenant/WorldPublicationTerminalCompletionGrpcService.java"
      +++ "b/services/world-management-service/src/main/java/net/firedevops/firemud/worldmanagement/tenant/WorldPublicationTerminalCompletionGrpcService.java"
      @@ -67,9 +67,12 @@
           final GameDesignPublicationTerminalEvidence committed;
           try {
             committed = owner.complete(decoded.originalOperation(), decoded.gameDesignTerminalEvidence());
           } catch (StatusRuntimeException failure) {
      -      observer.onError(failure);
      +      fail(
      +          observer,
      +          Status.fromCode(failure.getStatus().getCode()),
      +          "World could not complete the exact Game Design terminal verification");
             return;
           } catch (DataAccessException | org.springframework.dao.DataAccessException unavailable) {
             fail(observer, Status.UNAVAILABLE, "World publication terminal storage is unavailable");
             return;
      
      • Accepted Completion adapter forwards upstream GDS status description/trailers. Preserve only status code through fresh World-owned safe error; regression checks no upstream description/trailers leak.
    2. Pass the schema-4 closure through canonical() before hashing it.Minor

      The comment on tables() says that every nested object is field-sorted. The new inboundSourceClosure entry is added after tables() runs, so it skips canonical(). The hash input therefore keeps insertion order: schemaVersion before familyCounts, and family before count. Every other nested object is sorted by key.

      The selectedEmptyDigestVector test fixes this unsorted order. Any later refactor that applies the documented sort rule will silently change every schema-4 digest. The selected path is unregistered today, so you can align it with the documented rule now at low cost. If you prefer to keep insertion order, update the comment to state the exception explicitly.

      ♻️ Proposed fix

             if (inboundSourceClosure != null) {
      -        digestInput.put("inboundSourceClosure", inboundSourceClosureContent(inboundSourceClosure));
      +        digestInput.put(
      +            "inboundSourceClosure", canonical(inboundSourceClosureContent(inboundSourceClosure)));
               schemaVersion = SELECTED_DIGEST_SCHEMA_VERSION;
             }
      

      Then update selectedEmptyDigestVector() to the sorted form: {"familyCounts":[{"count":0,"family":"..."},...],"schemaVersion":1}.

      • Accepted Selected closure bypasses existing recursive canonical sorting. Correct the new unreleased schema4 closure and existing golden vector; ordinary3 and all top-level/family ordering remain.
    3. Pass the recovered request to the World terminal handoff.Minor

      reconcileFullVersionPublishMechanicsLocal calls request.recoverMissingPublishRequestId() and uses the recovered value only inside that method. This wrapper still passes the original request to completeSelectedWorldTerminal. After the local seal commits, requireSelectedIntent therefore runs against the unrecovered publishRequestId. If that value is absent, every retry ends in PendingReconciliationException and never reaches World. The earlier review raised this second point. The fix commit moved requireSelectedIntent inside the try but did not change this call. Verify whether PublishWorkflowRequest allows a selected intent with a null publishRequestId. If it does, recover the request here.

      🐛 Proposed fix

      --- "a/services/game-design-service/src/main/java/net/firedevops/firemud/gamedesign/service/impl/VersionPublishCommandServiceImpl.java"
      +++ "b/services/game-design-service/src/main/java/net/firedevops/firemud/gamedesign/service/impl/VersionPublishCommandServiceImpl.java"
      @@ -162,11 +162,12 @@
          * Package-private non-ingress seam retained for mechanics proof until a production Draft source
          * exists.
          */
         PublishWorkflowSnapshot reconcileFullVersionPublishMechanics(PublishWorkflowRequest request) {
      +    PublishWorkflowRequest recovered = request.recoverMissingPublishRequestId();
           // Complete only after all local commit/exception classification has left its owner boundary.
           return completeSelectedWorldTerminal(
      -        request, reconcileFullVersionPublishMechanicsLocal(request));
      +        recovered, reconcileFullVersionPublishMechanicsLocal(recovered));
         }
       
         private PublishWorkflowSnapshot completeSelectedWorldTerminal(
             PublishWorkflowRequest request, PublishWorkflowSnapshot snapshot) {
      
      #!/bin/bash
      fd -e java PublishWorkflowRequest.java --exec cat -n {}
      
      • Rejected Recovery explicitly noops when intent!=null; null selected request-id fails existing identity/selection validation before writes. With null intent, terminal handoff returns immediately. Moving legacy recovery cannot fix claimed selected path.
    4. Reject a null version-state read before requireValid().Minor

      requireSelectedDraft rejects a null selection read on Line 317. requireAccountHeld rejects a null Account read on Line 393. requireCurrentDraftState does not check current for null.

      If versionStateClient.read(request) returns null, Line 371 throws a NullPointerException outside the try scope that maps to ConflictException. WorldSelectedDraftPublicationFreezeGrpcService then maps it to INTERNAL through its RuntimeException branch. The caller does not receive FAILED_PRECONDITION for missing Game Design evidence. The freeze still fails closed, so the impact is limited to the wrong status code.

      Treat a null read the same way as the other two remote reads.

      Proposed fix

      --- "a/services/world-management-service/src/main/java/net/firedevops/firemud/worldmanagement/tenant/WorldSelectedDraftPublicationFreezeService.java"
      +++ "b/services/world-management-service/src/main/java/net/firedevops/firemud/worldmanagement/tenant/WorldSelectedDraftPublicationFreezeService.java"
      @@ -366,9 +366,12 @@
                   intake.sourceOperationId(),
                   intake.sourceEvidenceDigest(),
                   selection.target().gameDesignVersionRowId());
           AuthoredWorldVersionStateEvidence current = versionStateClient.read(request);
      +    if (current == null) {
      +      throw conflict("Game Design returned no current World version-state evidence");
      +    }
           try {
             current.requireValid();
           } catch (RuntimeException invalid) {
             throw new WorldDesignPublicationFenceRepository.ConflictException(
                 "Game Design returned invalid current World version-state evidence");
      
      • Rejected current.requireValid() already runs inside catch(RuntimeException) which converts null dereference to ConflictException; freeze Grpc explicitly maps that exception to FAILED_PRECONDITION. Claimed raw INTERNAL path is absent; no redundant null guard needed.
  5. CLI Review 2 CompletedRuntime 2m 51s
    Found: 1 Accepted: 0/0/0 Routed: 0
    1. Check the Account HELD status at both Account-read sites.Minor

      Both World components accept the Account read evidence after they check only the echoed request identity. Neither site checks that the returned status is HELD. If the Account read clients can return a released or unknown status without throwing, World creates write authority from a non-HELD order. Confirm that DraftCommitOrderReadClient.read and AccountPublicationAuthorizationReadClient.read reject every non-HELD outcome. If either evidence type exposes a status, assert HELD explicitly.

      • services/world-management-service/src/main/java/net/firedevops/firemud/worldmanagement/tenant/WorldDraftCommitOrderVerifier.java#L36-L43: require a HELD status on DraftCommitOrderReadEvidence before you return new CommitOrderProof(operation).
      • services/world-management-service/src/main/java/net/firedevops/firemud/worldmanagement/tenant/WorldSelectedDraftPublicationFreezeService.java#L389-L405: require a HELD status on AccountPublicationAuthorizationReadEvidence in requireAccountHeld before the freeze transaction starts.
      • Rejected Both final read clients call their closed fromResponse codecs before returning evidence. Each codec explicitly rejects status != HELD and constructs evidence only afterward; callers cannot receive non-HELD results. No extra status property/check needed.
  6. CLI Review 3 CompletedRuntime 2m 48s
    Found: 3 Accepted: 0/1/1 Routed: 0
    1. Use one shared encoder for the inbound-closure content.Trivial

      inboundSourceClosureContent is a copy of WorldDraftTopologyCommitRepository.inboundSourceClosureContent. The selected schema-4 digest and the graph-3 bytes must encode the closure the same way. The graph-3 bytes are what WorldCanonicalAuthoredGraphReader checks against. If one copy changes, the selected digest and the retained graph will stop matching, and nothing will detect it at compile time.

      Move the encoding to one public place, such as a content() method on InboundSourceClosureDeclaration, and call it from both classes.

      ♻️ Proposed refactor

      -  private Map<String, Object> inboundSourceClosureContent(
      -      InboundSourceClosureDeclaration declaration) {
      -    Map<String, Object> content = new LinkedHashMap<>();
      -    ...
      -    return content;
      -  }
      +  // Use InboundSourceClosureDeclaration.content(), shared with WorldDraftTopologyCommitRepository.
      
      • Accepted Two identical closure encoders govern graph3/digest4 bytes; share the existing order-preserving content encoder on the existing declaration, retaining digest recursive canonicalization and byte semantics.
    2. Confirm that the HELD status is checked before the proof is created.Minor

      The verifier builds CommitOrderProof after one check: the Account response echoes the exact request. It never reads any state from DraftCommitOrderReadEvidence. The class Javadoc says the proof exists only after a "validated HELD result". The visible code relies on DraftCommitOrderReadClient.read or the evidence constructor to enforce that.

      Suppose DraftCommitOrderReadEvidence can represent a non-held state (for example UNKNOWN, RELEASED or SETTLED) without throwing. Then WorldDraftGraphApplicationService.apply would write an APPLIED fresh graph while the original COMMIT_ORDER is not held. The component is unregistered and denied by default, but this class is the production-shaped verifier.

      Check whether DraftCommitOrderReadEvidence has a status or outcome field, and whether the client or codec rejects every non-HELD value. If it does not, add an explicit HELD check here before new CommitOrderProof(operation), and add a unit test with a non-HELD response.

      • Rejected Duplicate verified HELD hypothesis: final DraftCommitOrderReadClient.read always calls fromResponse, which rejects every nonHELD status before constructing evidence. No nonHELD proof can reach the verifier.
    3. Make the snapshot record agree with CaptureRequest on schema 4.Minor

      CaptureRequest now accepts digestSchemaVersion == 4. The canonical constructor of WorldAuthoredGraphSnapshot (Line 71) still accepts only 2 or 3. Any capture path that builds a snapshot from a schema-4 CaptureRequest will throw IllegalArgumentException after the request has passed validation.

      The visible frozen-topology path only passes the request to owner.lockAndResolve. Confirm whether WorldAuthoredGraphSnapshotCapture or WorldAuthoredGraphSnapshotRepository.lockAndResolve creates a WorldAuthoredGraphSnapshot from request.digestSchemaVersion().

      • If one of them does, decide whether schema 4 is valid for snapshots, then either accept it in the record or reject it at that capture boundary.
      • If neither does, add a comment saying schema 4 is valid only for frozen-topology requests.
      • Accepted Ordinary capture already refuses new non3 and record allows retained2/3; shared CaptureRequest also serves selected frozen4. Clarify this boundary in its Javadoc; do not widen snapshot acceptance.
  7. CLI Review 4 CompletedRuntime 2m 35s
    Found: 2 Accepted: 0/0/1 Routed: 0
    1. Check that the Account read reports a HELD original COMMITORDER before you create CommitOrderProof.Major

      Check that the Account read reports a HELD original COMMIT_ORDER before you create `CommitOrderProof`.

      The class comment says that a proof is created "only after the mTLS client returns its validated HELD result." The code checks only that evidence.request() equals the request that was sent. It does not inspect any status or outcome field of DraftCommitOrderReadEvidence.

      Suppose DraftCommitOrderReadClient.read can return valid evidence for a released, settled, or unknown order without throwing. In that case, WorldDraftGraphApplicationService.apply receives a CommitOrderProof and commits APPLIED topology without the held-order guarantee that CommitOrderVerifier requires. The component is unregistered today, so the exposure is limited to its future wiring.

      Confirm one of these facts:

      • DraftCommitOrderReadClient.read throws for every non-HELD result.
      • DraftCommitOrderReadEvidence represents only HELD results.

      If neither fact holds, add an explicit HELD check before return new CommitOrderProof(operation).

      • Rejected Repeated verified hypothesis: final DraftCommitOrderReadClient always calls closed fromResponse, which rejects every nonHELD status before constructing package-private HELD evidence. No released/settled/unknown proof reaches verifier.
    2. Narrow the rejection assertions so that only the reader's own denials pass.Trivial

      These rejection loops assert isInstanceOf(RuntimeException.class). A NullPointerException or IndexOutOfBoundsException from a broken fixture or a reader regression also satisfies that assertion. In that case the test reports a rejection that never happened. For example, a fixture replace(...) that matches nothing leaves good unchanged, and the test then fails. But a mutation that makes the reader dereference a missing node also passes the test, even though no closed-schema check ran.

      Assert the exception type that the reader throws on purpose. Use IllegalArgumentException or ConflictException, whichever the reader declares. You can also assert a message fragment for each case. As an extra guard, add assertThat(bad).isNotEqualTo(good) so that each replace changes the input.

      ♻️ Proposed tightening

      -      assertThatThrownBy(() -> new WorldCanonicalAuthoredGraphReader().read(plan(), bytes(bad)))
      -          .isInstanceOf(RuntimeException.class);
      +      assertThat(bad).isNotEqualTo(good);
      +      assertThatThrownBy(() -> new WorldCanonicalAuthoredGraphReader().read(plan(), bytes(bad)))
      +          .isInstanceOf(IllegalArgumentException.class);
      

      Also applies to: 113-124

      • Accepted Broad RuntimeException admits NPE/index failures. Preserve all negative inputs but require exact semantic ConflictException; separately require JacksonException for duplicate/trailing parser denials, plus mutation-not-equal guards.
  8. CLI Review 5 CompletedRuntime 3m 15s
    Found: 4 Accepted: 0/2/1 Routed: 0
    1. Do not persist and exact-compare JsonNode.toString() output.Trivial

      WorldPublicationTerminalRepository.insertTerminal stores worldRequestJson() in world_request_json. exactReadback then recomputes worldRequestJson() and requires string equality with the stored column. JsonNode.toString() is a debug rendering. Jackson does not guarantee that its byte form stays stable across releases. If a Jackson upgrade changes escaping, number rendering, or whitespace, every retained terminal row fails exactReadback with InvalidPublicationTerminalEvidenceException. Exact completion replay and the Account terminal read then fail closed permanently for already-committed publications. The repository received Jackson upgrades recently.

      Use a defined canonical encoding, for example Rfc8785CanonicalJson. Alternatively, compare the parsed trees semantically in exactReadback.

      ♻️ Proposed change

      -        return request.toString();
      +        return new String(
      +            net.firedevops.firemud.common.json.Rfc8785CanonicalJson.canonicalizeUtf8(
      +                JSON.writeValueAsString(request)),
      +            java.nio.charset.StandardCharsets.UTF_8);
      
      • Accepted Durable request JSON is debug-rendered and text-compared; define encoding and compare parsed request objects while preserving exact canonical evidence and every owner-column check.
    2. Sanitize upstream StatusRuntimeException before you send it to the Game Design caller.Minor

      freezeService.begin(...) makes remote reads through AuthoredDraftPublishSelectionReadClient, AuthoredWorldVersionStateClient and AccountPublicationAuthorizationReadClient. If one of these clients throws a StatusRuntimeException, Line 83 forwards it unchanged. As a result:

      • The caller receives the upstream description and trailers, which can contain Account or Game Design details.
      • An upstream PERMISSION_DENIED reaches the caller as if World denied the request.

      Other receivers in this PR remove upstream detail:

      • WorldPublicationTerminalCompletionGrpcService returns a fixed description and no trailers. sanitizesUpstreamGameDesignStatusAndTrailersForValidRequest asserts this.
      • WorldOriginalDraftGraphApplyGrpcService converts UNAVAILABLE and DEADLINE_EXCEEDED to UNAVAILABLE, and all other upstream codes to FAILED_PRECONDITION, each with a fixed description.

      The path instructions require reviewers to flag violations of "gRPC application-error handling" invariants. Apply the same conversion here and add a unit test.

      🛡️ Proposed fix

           } catch (StatusRuntimeException failure) {
      -      responseObserver.onError(failure);
      +      Status.Code code = failure.getStatus().getCode();
      +      boolean retryable =
      +          code == Status.Code.UNAVAILABLE || code == Status.Code.DEADLINE_EXCEEDED;
      +      responseObserver.onError(
      +          (retryable ? Status.UNAVAILABLE : Status.FAILED_PRECONDITION)
      +              .withDescription(
      +                  retryable
      +                      ? "World selected-freeze upstream owner is temporarily unavailable"
      +                      : "World selected-freeze upstream owner did not accept the request")
      +              .asRuntimeException());
             return;
      
      • Accepted Verified raw upstream status/trailers escape selected freeze ingress; sanitize retryable/unaccepted owner failures using existing World adapter mapping and focused tests.
    3. Confirm that a non-HELD Account read cannot produce a CommitOrderProof.Major

      The Javadoc says the verifier creates a World proof "only after the mTLS client returns its validated HELD result". The code checks only that evidence.request() equals the derived request. It never inspects the evidence status or the HELD outcome. If DraftCommitOrderReadEvidence can represent a released, unknown, or definitively denied COMMIT_ORDER state without an exception from accountClient.read, verifyHeldOriginalCommitOrder still returns a CommitOrderProof. WorldDraftGraphApplicationService.apply then commits an APPLIED World graph that has no held Account order. That breaks the Account-authority boundary that this component exists to enforce.

      Verify one of these two facts:

      • DraftCommitOrderReadClient.read throws for every non-HELD outcome.
      • DraftCommitOrderReadEvidence can carry only HELD.

      If neither fact holds, require the HELD status before you construct the proof:

      🔒️ Proposed guard

           if (!request.equals(Objects.requireNonNull(evidence.request()))) {
             throw new ConflictException("Account changed the exact original COMMIT_ORDER read request");
           }
      +    if (!evidence.isHeld()) { // use the actual typed status accessor
      +      throw new ConflictException("Account original COMMIT_ORDER is not held");
      +    }
           return new CommitOrderProof(operation);
      
      • Rejected Already guaranteed: final DraftCommitOrderReadEvidence represents HELD only; read client calls codec fromResponse, which rejects every non-HELD enum before its package-private constructor. Exact request equality remains checked.
    4. Classify Spring transaction-acquisition failures as UNAVAILABLE in the new World owner adapters.Minor

      Each adapter catches only jOOQ and Spring DataAccessException as storage-unavailable. Each underlying owner uses TransactionTemplate. That template raises CannotCreateTransactionException on connection acquisition failure and TransactionTimedOutException on timeout. Both are org.springframework.transaction.TransactionException subtypes, not DataAccessException subtypes. These transient failures therefore return the non-retryable FAILED_PRECONDITION or INTERNAL. The Game Design owner adapters return UNAVAILABLE for connection acquisition and transaction timeouts.

      • services/world-management-service/src/main/java/net/firedevops/firemud/worldmanagement/tenant/WorldPublicationTerminalCompletionGrpcService.java#L76-L87: add CannotCreateTransactionException and TransactionTimedOutException to the UNAVAILABLE catch before the generic RuntimeException branch.
      • services/world-management-service/src/main/java/net/firedevops/firemud/worldmanagement/tenant/WorldOriginalDraftGraphApplyGrpcService.java#L74-L97: add the same two types to the storage-unavailable catch so these failures are neither logged as errors nor returned as FAILED_PRECONDITION.
      • services/world-management-service/src/main/java/net/firedevops/firemud/worldmanagement/tenant/WorldPublicationTerminalReadService.java#L86-L97: add the same two types to the UNAVAILABLE catch before the INTERNAL fallback.

      As per path instructions: "Flag changes that violate documented FireMUD invariants, especially gRPC application-error handling".

      • Accepted Verified TransactionTemplate failures escape DataAccessException catches. Classify only CannotCreateTransactionException and TransactionTimedOutException as storage UNAVAILABLE, with focused regressions.
  9. CLI Review 6 CompletedRuntime 2m 53s
    Found: 3 Accepted: 0/0/0 Routed: 0
    1. Confirm that the Account read cannot return a non-HELD result.Minor

      The class contract says a World proof is created "only after the mTLS client returns its validated HELD result". The verifier checks only that evidence.request() equals the request it sent. It never checks a status or held-state field on the DraftCommitOrderReadEvidence it gets back. Under one condition this gate would accept the wrong state. If DraftCommitOrderReadClient.read can return evidence that reports a released, unknown, or not-held order without throwing, the verifier still returns a CommitOrderProof. WorldDraftGraphApplicationService.apply would then write APPLIED topology without held COMMIT_ORDER authority.

      Check DraftCommitOrderReadClient.read and DraftCommitOrderReadEvidence. If the evidence carries a status or outcome, require the held value here before you create the proof.

      Possible guard if the evidence exposes a status

           if (!request.equals(Objects.requireNonNull(evidence.request()))) {
             throw new ConflictException("Account changed the exact original COMMIT_ORDER read request");
           }
      +    if (!evidence.isHeld()) {
      +      throw new ConflictException("Account original COMMIT_ORDER is not held");
      +    }
           return new CommitOrderProof(operation);
      
      • Rejected Duplicate invalid hypothesis: final DraftCommitOrderReadEvidence is HELD-only; fromResponse rejects every non-HELD status before constructing it. Client validates exact peer and codec response. There is no non-HELD evidence outcome/status to recheck here.
    2. Move the shutdown-lock entry's proof attribution to the tracker, or drop the entry.Minor

      This entry records a defect that the same work fixed and qualified. The file excludes ordinary fixes that were completed in the same piece of work. The "Expected pattern" bullet also carries gate counts ("546-case Common gate", "one shutdown per constructed channel"). Proof attribution belongs to the implementation tracker, not to this inbox.

      Use one of these corrections:

      • Keep only the reusable lesson. Do not lock the client monitor while draining callbacks in subclass overrides. Move the test and gate evidence to the Common/World tracker entry.
      • Remove the entry if the lesson already exists in the shared client contract.

      The two new entries (lines 66-75) are also inserted before existing entries from the same date, not after the last entry. Append them at the end of the file to keep the documented append-only order.

      As per coding guidelines: "Only keep entries whose lesson still matters after the immediate task is done. Do not use this file as a bug log for ordinary fixes that were completed in the same piece of work." and "During ordinary autonomous work, append dated entries".

      • Rejected The monitor-release lesson remains reusable and tracker already attributes proof. Reordering/deleting inherited observation history is optional cleanup, contrary to ordinary append-only authority absent assigned stewardship/health check; no live defect identified.
    3. Replace the hard-coded frame skip with a named decoder or constant.Trivial

      operation() skips exactly 12 frames of world-district-terminal-operation/v1 and then reads the intake request ID as text. The fixture depends on the private frame layout of WorldDraftTerminalOperation. A frame added or reordered in that encoding makes the test read the wrong field. Several test classes share this fixture, so the failure would spread across those suites.

      Expose a test-visible accessor that decodes the intake request ID. If an accessor is not possible, add a named constant for the frame index next to the encoder.

      • Rejected Optional fixture refactor: v1 schema is explicitly checked and frame13 matches the current encoder. Adding a production accessor/constant only for this fixture adds no correctness or coverage; a schema change must update its fixture deliberately.

Routed Findings

0 Open0 Accepted/Fixed0 Rejected

No routes recorded

Unlinked items

no items unlinked