PR #3220 review history
Unit 1A · identity, Account and public JOIN
Review rounds
Three-number pills mean: found (raw) / accepted here (useful) / routed
Recorded review history
Reviews and findings
- Hosted Review 1 CompletedRuntime 10m 00sFound: 4 Accepted: 0/4/0 Routed: 0
- Map transient Account COMMIT_ORDER read failures to
UNAVAILABLE.MinorDraftCommitOrderReadClient.readperforms a blocking Account gRPC call. A transientStatusRuntimeException(UNAVAILABLE)therefore reaches the handler's genericRuntimeExceptionbranch, which returnsFAILED_PRECONDITIONinstead 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.
- Catch Spring
DataAccessException, not onlyTransientDataAccessException, so storage outages returnUNAVAILABLE.MinorThis catch handles only Spring
TransientDataAccessExceptionand jOOQDataAccessException. Some Spring storage failures are non-transient types. Examples areCannotGetJdbcConnectionExceptionandDataAccessResourceFailureException. Those exceptions go to theRuntimeExceptionbranch on Line 74 and returnINTERNAL. A caller then cannot tell a temporary storage outage from a permanent fault.The other adapters in this PR catch
org.springframework.dao.DataAccessExceptionhere:WorldSelectedDraftPublicationFreezeGrpcService(Lines 98-99) andWorldPublicationTerminalCompletionGrpcService. Use the same type in this adapter. Spring'sTransientDataAccessExceptionis a subclass of SpringDataAccessException, 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.TransientDataAccessExceptionimport 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.
- 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, andExpected patternsub-bullets. All other entries use this format. The two new2026-10-15entries 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 aReconsideration 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.
- Avoid serializing all World reconciliations on
lifecycleLock.MinorreconcileholdslifecycleLockwhile it reads the owner and callscompletion.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
closedunder the guard, run the owner read and World call without an exclusive lock, and makeclose()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.
- Hosted Review 2 CompletedRuntime 7m 14sFound: 1 Accepted: 0/1/0 Routed: 0
- Move the post-commit selection read inside the pending-reconciliation
try, and use the recovered request.MinorcompleteSelectedWorldTerminalruns after the local Game Design seal has already committed. The method contract converts every handoff failure toPendingReconciliationException. Line 177 callsrequireSelectedIntent(request)outside thetry. A transientauthoredSelections.readByPublishRequestfailure therefore escapes as a raw exception, not as pending reconciliation. Callers that classify onlyPendingReconciliationExceptionas 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 originalrequestto the wrapper. The recovered value fromrecoverMissingPublishRequestId()exists only insidereconcileFullVersionPublishMechanicsLocal. IfpublishRequestIdwas absent, the wrapper callsrequireSelectedIntentwith a null id and throwsPUBLISH_ATTEMPT_IDENTITY_CONFLICTafter 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.
- CLI Review 1 CompletedRuntime 2m 35sFound: 3 Accepted: 0/1/0 Routed: 0
- Confirm that the verifier creates
CommitOrderProofonly for a held Account result.MajorThe 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 createsnew CommitOrderProof(operation).WorldDraftGraphApplicationService.applytreats that proof as authority for a new APPLIED write. AssumeDraftCommitOrderReadClient.readcan return evidence for a released, unknown or otherwise non-held order without throwing. In that case, World writes APPLIED topology without the heldCOMMIT_ORDERguarantee.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.
- Confirm that
versionStateEpochcan never be0before the inventory requires a positive value.MajorrequireCanonicalLongFieldssendsfreeze.versionStateEpoch()toparsePositiveCanonicalLong. That method accepts only[1-9][0-9]*.capturecallsrequireEnvelopeBindingwith the valueLong.toString(request.versionStateEpoch()), andrequireEnvelopeBindingcalls this check.If Game Design can report a DRAFT Version with state epoch
0, the result is as follows:capturethrowsConflictExceptioninside 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, and9. The supplied files do not establish a lower bound. If0is a valid epoch, use a non-negative canonical decimal check for this field only, for example0|[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.versionStateEpochcan 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.
- 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 thePERMISSION_DENIEDcondition.services/world-management-service/src/main/java/net/firedevops/firemud/worldmanagement/tenant/WorldPublicationTerminalReadGrpcService.java#L85-L99: add the same condition torequireAuthenticatedAccountPeer.
- 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.
- Hosted Review 3 CompletedRuntime 7m 15sFound: 4 Accepted: 0/2/0 Routed: 0
- Do not forward the upstream Game Design status and trailers to the World caller.Minor
owner.completereaches the Game Design terminal read throughWorldGameDesignPublicationTerminalVerifier. The World terminal service and repository do not throwStatusRuntimeExceptionthemselves, so everyStatusRuntimeExceptioncaught 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.
- Pass the schema-4 closure through
canonical()before hashing it.MinorThe comment on
tables()says that every nested object is field-sorted. The newinboundSourceClosureentry is added aftertables()runs, so it skipscanonical(). The hash input therefore keeps insertion order:schemaVersionbeforefamilyCounts, andfamilybeforecount. Every other nested object is sorted by key.The
selectedEmptyDigestVectortest 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.
- Pass the recovered request to the World terminal handoff.Minor
reconcileFullVersionPublishMechanicsLocalcallsrequest.recoverMissingPublishRequestId()and uses the recovered value only inside that method. This wrapper still passes the originalrequesttocompleteSelectedWorldTerminal. After the local seal commits,requireSelectedIntenttherefore runs against the unrecoveredpublishRequestId. If that value is absent, every retry ends inPendingReconciliationExceptionand never reaches World. The earlier review raised this second point. The fix commit movedrequireSelectedIntentinside thetrybut did not change this call. Verify whetherPublishWorkflowRequestallows a selected intent with a nullpublishRequestId. 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.
- Reject a null version-state read before
requireValid().MinorrequireSelectedDraftrejects anullselection read on Line 317.requireAccountHeldrejects anullAccount read on Line 393.requireCurrentDraftStatedoes not checkcurrentfornull.If
versionStateClient.read(request)returnsnull, Line 371 throws aNullPointerExceptionoutside thetryscope that maps toConflictException.WorldSelectedDraftPublicationFreezeGrpcServicethen maps it toINTERNALthrough itsRuntimeExceptionbranch. The caller does not receiveFAILED_PRECONDITIONfor missing Game Design evidence. The freeze still fails closed, so the impact is limited to the wrong status code.Treat a
nullread 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.
- CLI Review 2 CompletedRuntime 2m 51sFound: 1 Accepted: 0/0/0 Routed: 0
- 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.readandAccountPublicationAuthorizationReadClient.readreject 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 onDraftCommitOrderReadEvidencebefore you returnnew CommitOrderProof(operation).services/world-management-service/src/main/java/net/firedevops/firemud/worldmanagement/tenant/WorldSelectedDraftPublicationFreezeService.java#L389-L405: require a HELD status onAccountPublicationAuthorizationReadEvidenceinrequireAccountHeldbefore 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.
- CLI Review 3 CompletedRuntime 2m 48sFound: 3 Accepted: 0/1/1 Routed: 0
- Use one shared encoder for the inbound-closure content.Trivial
inboundSourceClosureContentis a copy ofWorldDraftTopologyCommitRepository.inboundSourceClosureContent. The selected schema-4 digest and the graph-3 bytes must encode the closure the same way. The graph-3 bytes are whatWorldCanonicalAuthoredGraphReaderchecks 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 onInboundSourceClosureDeclaration, 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.
- Confirm that the HELD status is checked before the proof is created.Minor
The verifier builds
CommitOrderProofafter one check: the Account response echoes the exact request. It never reads any state fromDraftCommitOrderReadEvidence. The class Javadoc says the proof exists only after a "validated HELD result". The visible code relies onDraftCommitOrderReadClient.reador the evidence constructor to enforce that.Suppose
DraftCommitOrderReadEvidencecan represent a non-held state (for example UNKNOWN, RELEASED or SETTLED) without throwing. ThenWorldDraftGraphApplicationService.applywould 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
DraftCommitOrderReadEvidencehas 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 beforenew 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.
- Make the snapshot record agree with
CaptureRequeston schema 4.MinorCaptureRequestnow acceptsdigestSchemaVersion == 4. The canonical constructor ofWorldAuthoredGraphSnapshot(Line 71) still accepts only 2 or 3. Any capture path that builds a snapshot from a schema-4CaptureRequestwill throwIllegalArgumentExceptionafter the request has passed validation.The visible frozen-topology path only passes the request to
owner.lockAndResolve. Confirm whetherWorldAuthoredGraphSnapshotCaptureorWorldAuthoredGraphSnapshotRepository.lockAndResolvecreates aWorldAuthoredGraphSnapshotfromrequest.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.
- CLI Review 4 CompletedRuntime 2m 35sFound: 2 Accepted: 0/0/1 Routed: 0
- Check that the Account read reports a HELD original COMMITORDER before you create
CommitOrderProof.MajorCheck 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 ofDraftCommitOrderReadEvidence.Suppose
DraftCommitOrderReadClient.readcan return valid evidence for a released, settled, or unknown order without throwing. In that case,WorldDraftGraphApplicationService.applyreceives aCommitOrderProofand commits APPLIED topology without the held-order guarantee thatCommitOrderVerifierrequires. The component is unregistered today, so the exposure is limited to its future wiring.Confirm one of these facts:
DraftCommitOrderReadClient.readthrows for every non-HELD result.DraftCommitOrderReadEvidencerepresents 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.
- Narrow the rejection assertions so that only the reader's own denials pass.Trivial
These rejection loops assert
isInstanceOf(RuntimeException.class). ANullPointerExceptionorIndexOutOfBoundsExceptionfrom 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 fixturereplace(...)that matches nothing leavesgoodunchanged, 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
IllegalArgumentExceptionorConflictException, whichever the reader declares. You can also assert a message fragment for each case. As an extra guard, addassertThat(bad).isNotEqualTo(good)so that eachreplacechanges 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.
- CLI Review 5 CompletedRuntime 3m 15sFound: 4 Accepted: 0/2/1 Routed: 0
- Do not persist and exact-compare
JsonNode.toString()output.TrivialWorldPublicationTerminalRepository.insertTerminalstoresworldRequestJson()inworld_request_json.exactReadbackthen recomputesworldRequestJson()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 failsexactReadbackwithInvalidPublicationTerminalEvidenceException. 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 inexactReadback.♻️ 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.
- Sanitize upstream
StatusRuntimeExceptionbefore you send it to the Game Design caller.MinorfreezeService.begin(...)makes remote reads throughAuthoredDraftPublishSelectionReadClient,AuthoredWorldVersionStateClientandAccountPublicationAuthorizationReadClient. If one of these clients throws aStatusRuntimeException, 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_DENIEDreaches the caller as if World denied the request.
Other receivers in this PR remove upstream detail:
WorldPublicationTerminalCompletionGrpcServicereturns a fixed description and no trailers.sanitizesUpstreamGameDesignStatusAndTrailersForValidRequestasserts this.WorldOriginalDraftGraphApplyGrpcServiceconvertsUNAVAILABLEandDEADLINE_EXCEEDEDtoUNAVAILABLE, and all other upstream codes toFAILED_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.
- Confirm that a non-HELD Account read cannot produce a
CommitOrderProof.MajorThe 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. IfDraftCommitOrderReadEvidencecan represent a released, unknown, or definitively denied COMMIT_ORDER state without an exception fromaccountClient.read,verifyHeldOriginalCommitOrderstill returns aCommitOrderProof.WorldDraftGraphApplicationService.applythen 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.readthrows for every non-HELD outcome.DraftCommitOrderReadEvidencecan 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.
- Classify Spring transaction-acquisition failures as
UNAVAILABLEin the new World owner adapters.MinorEach adapter catches only jOOQ and Spring
DataAccessExceptionas storage-unavailable. Each underlying owner usesTransactionTemplate. That template raisesCannotCreateTransactionExceptionon connection acquisition failure andTransactionTimedOutExceptionon timeout. Both areorg.springframework.transaction.TransactionExceptionsubtypes, notDataAccessExceptionsubtypes. These transient failures therefore return the non-retryableFAILED_PRECONDITIONorINTERNAL. The Game Design owner adapters returnUNAVAILABLEfor connection acquisition and transaction timeouts.services/world-management-service/src/main/java/net/firedevops/firemud/worldmanagement/tenant/WorldPublicationTerminalCompletionGrpcService.java#L76-L87: addCannotCreateTransactionExceptionandTransactionTimedOutExceptionto theUNAVAILABLEcatch before the genericRuntimeExceptionbranch.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 asFAILED_PRECONDITION.services/world-management-service/src/main/java/net/firedevops/firemud/worldmanagement/tenant/WorldPublicationTerminalReadService.java#L86-L97: add the same two types to theUNAVAILABLEcatch before theINTERNALfallback.
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.
- CLI Review 6 CompletedRuntime 2m 53sFound: 3 Accepted: 0/0/0 Routed: 0
- 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 theDraftCommitOrderReadEvidenceit gets back. Under one condition this gate would accept the wrong state. IfDraftCommitOrderReadClient.readcan return evidence that reports a released, unknown, or not-held order without throwing, the verifier still returns aCommitOrderProof.WorldDraftGraphApplicationService.applywould then write APPLIED topology without heldCOMMIT_ORDERauthority.Check
DraftCommitOrderReadClient.readandDraftCommitOrderReadEvidence. 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.
- 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.
- Replace the hard-coded frame skip with a named decoder or constant.Trivial
operation()skips exactly 12 frames ofworld-district-terminal-operation/v1and then reads the intake request ID as text. The fixture depends on the private frame layout ofWorldDraftTerminalOperation. 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
No routes recorded
Unlinked items
no items unlinked