PR #3233 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 11m 55sFound: 3 Accepted: 0/3/0 Routed: 0
- Do not report local credential or request encoding failures as invalid Account evidence.Minor
The
tryblock includescredentials(originalCreatorCredential, operation)andGameLogicIntakeAuthorizationGrpcCodec.toRequest(request). For a malformed credential (for example, whitespace or more than 16 KiB),Credential.ofthrowsIllegalArgumentExceptionbefore any RPC is sent. An oversized local request also throwsIllegalArgumentException. Thecatch (IllegalArgumentException malformed)block converts both intoIllegalStateException("Account returned invalid Game Logic intake authorization evidence"). That message blames Account for a caller defect, and a caller can then retry a request that can never succeed.Build the credentials and wire request before the
try. Then only the RPC call andfromResponsestay inside it.🐛 Proposed fix
--- "a/services/common-platform-core/src/main/java/net/firedevops/firemud/common/gamelogic/GrpcGameLogicIntakeAuthorizationClient.java" +++ "b/services/common-platform-core/src/main/java/net/firedevops/firemud/common/gamelogic/GrpcGameLogicIntakeAuthorizationClient.java" @@ -87,17 +87,17 @@ var current = stub(); if (closed || !initialized || current == null) throw new IllegalStateException("Account intake authorization client unavailable"); - try { - var secured = - current - .withCallCredentials( - new CompositeCallCredentials( - new GrpcServerPeerIdentityCallCredentials( - "spiffe://firemud/ns/" + workloadNamespace + "/sa/account-service"), - credentials(originalCreatorCredential, operation))) - .withDeadlineAfter(CALL_DEADLINE_SECONDS, TimeUnit.SECONDS); - var wireRequest = GameLogicIntakeAuthorizationGrpcCodec.toRequest(request); + var secured = + current + .withCallCredentials( + new CompositeCallCredentials( + new GrpcServerPeerIdentityCallCredentials( + "spiffe://firemud/ns/" + workloadNamespace + "/sa/account-service"), + credentials(originalCreatorCredential, operation))) + .withDeadlineAfter(CALL_DEADLINE_SECONDS, TimeUnit.SECONDS); + var wireRequest = GameLogicIntakeAuthorizationGrpcCodec.toRequest(request); + try { var response = switch (operation) { case AUTHORIZE -> secured.authorizeIntake(wireRequest); case RECOVER -> secured.recoverIntake(wireRequest);- Accepted Local credentials and request encoding must fail before remote-evidence catch; keep only RPC and Account response validation in sanitized mapping.
- Map definitive owner precondition failures to
FAILED_PRECONDITION, notUNAVAILABLE.MinorAccountGameLogicIntakeSettlementService.settlethrows plainIllegalArgumentExceptionfor permanent conditions. The integration test confirms this for "Changed original source namespace" and "Original intake order absent or changed". This handler'scatch (RuntimeException unavailable)maps those exceptions toUNAVAILABLE. Game Design then treats a definitive rejection as a transient outage and keeps retrying a request that cannot succeed.The sibling receivers handle this case differently.
AccountGameLogicIntakeAuthorizationGrpcService.statusOfandAccountGameLogicIntakeAuthorizationReadServicemapIllegalArgumentExceptiontoFAILED_PRECONDITION.Classify only the owner call this way. An invalid receipt from the owner during response construction can stay
UNAVAILABLE, so the existing substituted-receipt test still holds.🐛 Proposed fix
--- "a/services/account-service/src/main/java/net/firedevops/firemud/accountservice/service/session/AccountGameLogicIntakeSettlementGrpcService.java" +++ "b/services/account-service/src/main/java/net/firedevops/firemud/accountservice/service/session/AccountGameLogicIntakeSettlementGrpcService.java" @@ -60,20 +60,29 @@ deny(observer, Status.PERMISSION_DENIED); return; } - final SettleGameLogicIntakeResponse response; - try { - var receipt = owner.settle(request.binding()); - response = - AccountGameLogicIntakeSettlementProtoCodec.toResponse( - new AccountGameLogicIntakeSettlementReadEvidence( - request, new AccountGameLogicIntakeSettlementEvidence(receipt.terminal()))); - } catch (StatusRuntimeException failure) { - deny(observer, Status.fromCode(failure.getStatus().getCode())); - return; - } catch (RuntimeException unavailable) { - deny(observer, Status.UNAVAILABLE); - return; - } + final AccountGameLogicIntakeSettlement receipt; + try { + receipt = owner.settle(request.binding()); + } catch (StatusRuntimeException failure) { + deny(observer, Status.fromCode(failure.getStatus().getCode())); + return; + } catch (IllegalArgumentException changed) { + deny(observer, Status.FAILED_PRECONDITION); + return; + } catch (RuntimeException unavailable) { + deny(observer, Status.UNAVAILABLE); + return; + } + final SettleGameLogicIntakeResponse response; + try { + response = + AccountGameLogicIntakeSettlementProtoCodec.toResponse( + new AccountGameLogicIntakeSettlementReadEvidence( + request, new AccountGameLogicIntakeSettlementEvidence(receipt.terminal()))); + } catch (RuntimeException unavailable) { + deny(observer, Status.UNAVAILABLE); + return; + } observer.onNext(response); observer.onCompleted(); }Based on learnings, only well-defined availability failures should map to "unavailable"; request or precondition defects should keep their own error semantics.
- Accepted Owner precondition IAE is definitive; separate owner invocation from response encoding, preserving sanitized status and UNAVAILABLE for storage or invalid returned receipt.
- Set an explicit inbound message limit on the HELD read stub.Minor
GameLogicIntakeAuthorizationBinding.canonicalBytes()can be up to 4,194,304 bytes.ReadHeldGameLogicIntakeAuthorizationResponseechoes the complete request, which adds the namespace, read UUID, digest,held, and protobuf framing to that binding. A near-limit binding therefore produces a response above the 4 MiB default gRPC inbound limit. The client then fails withRESOURCE_EXHAUSTEDfor a valid order.The other clients in this PR set
withMaxInboundMessageSize. Examples areGrpcGameLogicIntakeAuthorizationClient,GameLogicIntakeTerminalReadClient, andGrpcAccountGameLogicIntakeSettlementReadClient. This stub does not set it.🐛 Proposed fix
return AccountGameLogicIntakeAuthorizationReadServiceGrpc.newBlockingStub(channel) + .withMaxInboundMessageSize(GameLogicIntakeAuthorizationGrpcCodec.MAX_WIRE_BYTES) .withCallCredentials(new GrpcServerPeerIdentityCallCredentials(expectedPeerUri)) .withInterceptors(new GrpcServerPeerIdentityClientInterceptor(expectedPeerUri)) .withCompression("gzip");The standalone server also needs a matching
maxInboundMessageSizewhen it is registered.- Accepted Valid bounded HELD response echo can exceed default 4MiB; apply existing wire maximum on client and specify receiving-server bound without registering the adapter.
- Hosted Review 2 CompletedRuntime 10m 06sFound: 3 Accepted: 0/2/1 Routed: 0
- Use the required entry format for the two new observations.Minor
The file defines one entry format: "-
YYYY-MM-DD: short title", then theContext:,Observation:andExpected pattern:sub-bullets. The other entries in this file follow it.The two new entries differ in three ways:
- They use
2026-10-17 —without backticks and with an em dash instead of the colon form. - They end the title with a period.
- They have no
Context:sub-bullet. The context sits insideObservation:instead.
Rewrite both entries to match the template. Format-aware scans and health-check passes can then parse them the same way as the other entries.
📝 Proposed fix
-- 2026-10-17 — Targeted Controller status can exhaust its deadline on older queue history. - - Observation: `firemud-controller --worker-identity Gameplay reviews status --pr 3224 --json` failed at its 120-second deadline during `target_history_pr_2846_cli`, after eighty prior phases consumed 119.6 seconds. It returned no JSON, delaying current front readiness readback even though publication and direct head/base verification succeeded. +- `2026-10-17`: Targeted Controller status can exhaust its deadline on older queue history + - Context: `firemud-controller --worker-identity Gameplay reviews status --pr 3224 --json` during current-front readiness readback. + - Observation: the command failed at its 120-second deadline during `target_history_pr_2846_cli`, after eighty prior phases consumed 119.6 seconds. It returned no JSON, although publication and direct head/base verification succeeded. - Expected pattern: ... -- 2026-10-17 — Repeated Hosted capture can reject a previously finalized provider comment. - - Observation: Admission of #3231’s second Hosted review reported ... +- `2026-10-17`: Repeated Hosted capture can reject a previously finalized provider comment + - Context: admission of #3231’s second Hosted review. + - Observation: admission reported ...As per path instructions, entries in this file use: "-
YYYY-MM-DD: short title / Context / Observation / Expected pattern".- Accepted The two new observations violate their declared entry template; normalize date/title and separate Context while preserving every diagnostic and expected lesson.
- They use
- Fix the swapped workload URI constants.Trivial
GL_URIholds the account-service URI.ACCOUNT_URIandWRONG_GL_URIboth hold the game-design-service URI. The test still passes because the server checks onlyACCOUNT_URI. The names do not match the identities, so a reader cannot tell what the test proves. This transport is Account's settlement service, so the server should present the account URI and the client should present the Game Logic URI. If that is the intent, rename the constants to match their roles: serverACCOUNT_SERVER_URI(account-service), clientGL_CLIENT_URI(game-logic-service), wrong server a distinct URI. RenamegameLogicServer/accountClientinTestPkito match. With the current values, the client and the wrong server share one SPIFFE URI.♻️ Proposed rename
--- "a/services/common-platform-core/src/test/java/net/firedevops/firemud/common/gamelogic/AccountGameLogicIntakeSettlementReadGrpcTest.java" +++ "b/services/common-platform-core/src/test/java/net/firedevops/firemud/common/gamelogic/AccountGameLogicIntakeSettlementReadGrpcTest.java" @@ -52,9 +52,9 @@ /** Structural and actual loopback-mTLS proof for the closed Account settlement transport. */ class AccountGameLogicIntakeSettlementReadGrpcTest { private static final String NAMESPACE = "test"; - private static final String GL_URI = "spiffe://firemud/ns/test/sa/account-service"; - private static final String WRONG_GL_URI = "spiffe://firemud/ns/test/sa/game-design-service"; - private static final String ACCOUNT_URI = "spiffe://firemud/ns/test/sa/game-design-service"; + private static final String ACCOUNT_SERVER_URI = "spiffe://firemud/ns/test/sa/account-service"; + private static final String WRONG_SERVER_URI = "spiffe://firemud/ns/test/sa/game-design-service"; + private static final String GL_CLIENT_URI = "spiffe://firemud/ns/test/sa/game-logic-service"; private static final String STORE_PASSWORD = "test-only-store-password"; private static final int LARGE_SOURCE_ENTRIES = 1800;- Accepted Accept misleading fixture role names. Preserve canonical Game Design caller: Account receiver requires GD, not proposed GL. Rename Account server/GD client/wrong-server identifiers; no production identity policy change.
- Minor
The linked documents do not establish the selected Game Logic intake contract. Update the tracker to link the canonical intake contract, or state that no target contract exists yet. The Account API contract and ADR 0047 describe Account operator authorization and Logging/Admin ingress, not the Game Logic intake target contract.
- Accepted Current source architecture does not specify a selected Game Logic intake target contract. Correct the tracker authority claim and state that source-checkpoint gap; Account operator references and ADR0047 are not that authority.
- Hosted Review 3 CompletedRuntime 9m 16sFound: 2 Accepted: 0/0/2 Routed: 0
- Fix the copied "authorization read" diagnostics in the source-permission client.Trivial
This class is the Account source-permission confirmation client. Its lifecycle, namespace, and mTLS-material messages still name the "Account GL intake authorization read" client.
GameLogicIntakeAuthorizationReadClientuses that same wording. An operator who reads one of these errors cannot tell which of the two Account clients failed. Examples are Line 49, Line 53, Line 69, Line 122, Line 131 and Line 142.The seven intake clients (
GameLogicIntakeAuthorizationReadClient,GameLogicIntakeTerminalReadClient,GameplayRuleSourceReadClient,GrpcAccountGameLogicIntakeSettlementReadClient,GrpcGameLogicIntakeAuthorizationClient,GrpcGameLogicIntakeRetainClient,GrpcGameLogicIntakeSourceReadClient) duplicate theinit/close/requireStub/requireFileBackedMtls/requireReadableFilecode. The tracker records that the shutdown-monitor correction had to be applied to all seven classes separately. A shared helper with a label parameter would remove this drift. Do the helper extraction in a separate change.♻️ Proposed label fix
- throw new IllegalStateException("Account GL intake authorization read client is closed"); + throw new IllegalStateException("Account GL intake source permission client is closed"); ... - throw new IllegalStateException("Account GL intake authorization read stub unavailable"); + throw new IllegalStateException("Account GL intake source permission stub unavailable"); ... - "Account GL intake authorization read must use the configured workload namespace"); + "Account GL intake source permission read must use the configured workload namespace");Apply the same rename to the
requireStub,requireFileBackedMtls, andrequireReadableFilemessages.Also applies to: 65-69, 119-160
- Accepted Valid operational ambiguity: rename copied authorization-read messages to source-permission labels only; preserve lifecycle and defer optional helper extraction.
- Rename the shared
TestPkiidentities to match the SPIFFE URIs they carry.TrivialTestPki.gameLogicServergetsACCOUNT_URI.TestPki.accountClientgetsGD_URI. The certificate aliases"game-logic-server"and"account-client"have the same mismatch.clientPropertieswritesaccount-client.crt/.keyfor every identity. Three test classes reuse this fixture: this class,GameLogicIntakeAuthorizationReadClientMtlsTest, andGrpcGameLogicIntakeAuthorizationClientMtlsTest. As a result,start(pki.gameLogicServer())actually starts an Account server, andpki.accountClient()is the Game Design caller. The assertions still prove the intended trust boundary. The names, however, state the opposite workload roles. You accepted the same correction forAccountGameLogicIntakeSettlementReadGrpcTest.♻️ Proposed rename
record TestPki( X509Certificate caCertificate, - TestIdentity gameLogicServer, + TestIdentity accountServer, TestIdentity wrongServer, - TestIdentity accountClient) { + TestIdentity gameDesignClient) { ... - issueIdentity(directory, caStore, caFile, "game-logic-server", ACCOUNT_URI, true), + issueIdentity(directory, caStore, caFile, "account-server", ACCOUNT_URI, true), issueIdentity(directory, caStore, caFile, "wrong-server", WRONG_SERVER_URI, true), - issueIdentity(directory, caStore, caFile, "account-client", GD_URI, false)); + issueIdentity(directory, caStore, caFile, "game-design-client", GD_URI, false));Update the accessor calls in the three dependent test classes to match.
- Accepted Valid misleading fixture roles: rename Account server and Game Design caller labels/aliases plus generic client PEM filenames; preserve all workload URIs and test behavior.
- Hosted Review 4 CompletedRuntime 8m 32sFound: 0 Accepted: 0/0/0 Routed: 0
- No findings recorded for this run
- CLI Review 1 CompletedRuntime 3m 24sFound: 3 Accepted: 0/2/1 Routed: 0
- Do not map permanent owner refusals to retryable
UNAVAILABLE.MinorstatusOfmaps everyIllegalStateExceptiontoUNAVAILABLE. The owner path throwsIllegalStateExceptionfor several permanent conditions:AccountGameLogicIntakeAuthorizationRepository.reserveSourceReadandfinalizeSourceReadthrow "Original source-read scope aborted".- The integration test
distinctPendingIntakeRequiresSettledAuthorAndBlocksRealSourceWritersAndDisclosureshows an unsettled original Draft surfacing asIllegalStateException. authorizeWithEnvironmentCapturethrows "Exact authenticated complete GD source required" for a mismatched source.
A Game Design caller can treat
UNAVAILABLEas retryable and resend a request that cannot succeed. The sibling receiverAccountGameLogicIntakeSourceReadGrpcServicemaps the same exception family toFAILED_PRECONDITION, so the two receivers are inconsistent.Throw a distinct type for permanent refusals, for example
Status.FAILED_PRECONDITION.asRuntimeException()from the owner. Alternatively, mapIllegalStateExceptiontoFAILED_PRECONDITIONand keepUNAVAILABLEfor infrastructure failures such asDataAccessExceptionorCannotCreateTransactionException.🐛 Minimal alignment with the source-read receiver
private static Status statusOf(RuntimeException error) { if (error instanceof StatusRuntimeException status) return Status.fromCode(status.getStatus().getCode()); - if (error instanceof IllegalArgumentException) return Status.FAILED_PRECONDITION; + if (error instanceof IllegalArgumentException || error instanceof IllegalStateException) + return Status.FAILED_PRECONDITION; return Status.UNAVAILABLE; }- Accepted Verified permanent aborted scope, missing/current issuance and mismatched exact source throw IllegalStateException. Map to sanitized FAILED_PRECONDITION; preserve explicit StatusRuntimeException codes and infrastructure UNAVAILABLE.
- Add a reconsideration trigger to both new entries.Minor
Both new 2026-10-17 entries record Context, Observation and Expected pattern. Neither entry states when it can be resolved. The first entry describes a status-command deadline that is still unbounded. The second entry describes a trailing-content cause that is still unverified. These are open conditions. Without a trigger, a later health check has no evidence-based rule for removing them.
📝 Proposed addition
- Expected pattern: Keep current-target status bounded while retaining historical review evidence. ... + - Reconsideration trigger: targeted `reviews status --pr` completes within its deadline for a PR with long queue history, or the Controller bounds historical phases separately from current-target readback. ... - Expected pattern: Preserve completed review evidence and surface the exact capture incompatibility ... + - Reconsideration trigger: the trailing-content cause after the final `cr-comment:v1` marker is identified, or a repeated Hosted capture against a finalized predecessor completes without the warning.As per coding guidelines: "Retain an entry only when a genuine blocker or deliberate postponement remains, recording the reason and reconsideration trigger."
- Accepted Verified both Oct17 observation entries leave open conditions without reconsideration triggers. Add bounded evidence-based triggers without changing historical observations.
- Extract the duplicated file-backed mTLS client scaffolding into a shared base.Trivial
Seven new clients repeat the same code with only message text and the target changed:
GameLogicIntakeAuthorizationReadClientGameLogicIntakeTerminalReadClientGameplayRuleSourceReadClientGrpcAccountGameLogicIntakeSettlementReadClientGrpcGameLogicIntakeAuthorizationClientGrpcGameLogicIntakeRetainClientGrpcGameLogicIntakeSourceReadClient
The repeated code is
requireFileBackedMtls,requireReadableFile, theinitialized/closedflags,init(),close(),requireStub()and the outside-SQL guard. This PR already had to apply the monitor-release shutdown correction to all seven classes separately. The tracker records that correction, andGameLogicIntakeTerminalReadGrpcTesttests it once per client kind. One small helper or abstract subclass ofAbstractReloadingBlockingGrpcClientwould keep these lifecycle and TLS-material rules identical. It would also reduce the lifecycle matrix to one implementation.- Accepted Verified seven clients duplicate lifecycle/TLS/SQL guards already supported by canonical base initOnce/requireInitializedStub/close and FileBackedMtls. Reuse those existing helpers plus one opt-in outside-SQL guard, preserving transport semantics.
- CLI Review 2 CompletedRuntime 3m 19sFound: 2 Accepted: 0/1/1 Routed: 0
- Extract the copied keytool PKI fixture into one shared test helper.Trivial
This file has its own copy of the keytool-based
TestPki. The copy coverscreate,clientProperties,issueIdentity,runKeytool,readCertificateandwritePem, about 220 lines. The same block also appears in these files:AccountGameLogicIntakeSettlementReadGrpcTestGameLogicIntakeTerminalReadGrpcTestGameLogicIntakeSourceReadTransportTest
Three other tests already reuse
GameLogicIntakeSourceReadTransportTest.TestPki:GameLogicIntakeAuthorizationReadClientMtlsTestGrpcGameLogicIntakeAuthorizationClientMtlsTestGameLogicIntakeSourceReadTransportTestitself
The copies differ only in role names and file prefixes. A change to certificate extensions, the keytool invocation or the key size must therefore be made in four places.
Move one parameterized fixture into a shared test package, for example
net.firedevops.firemud.common.testing. The fixture should take server and client SPIFFE URIs and a file prefix. All seven mTLS tests can then use it. The repeatedselectedSource(...)snapshot builder in these tests is a similar candidate.- Accepted Verified four copied intake TestPki blocks and existing sibling reuse. Consolidate only these six test classes into one package-local parameterized fixture; preserve identities, assertions and process bounds. No broad snapshot-builder cleanup.
- State the receiver size limit for every Account intake receiver, not only the HELD-read server.Minor
The paragraph requires only the standalone HELD-read server to raise its inbound limit to
GameLogicIntakeAuthorizationGrpcCodec.MAX_WIRE_BYTES. The other Account-owned receivers in this cut have the same need:- A
GameLogicIntakeAuthorizationRequestcan carry up toMAX_SELECTION_BYTES(4 MiB) ofselected_draft_bindingplus envelope fields. - A
SettleGameLogicIntakeRequestand aGameLogicIntakeSourcePermissionRequestcan each carry a full 4 MiB canonical authorization or scope plus framing.
These requests exceed the 4 MiB gRPC default. An operator who follows this text could enable
AccountGameLogicIntakeAuthorizationGrpcService,AccountGameLogicIntakeSourceReadGrpcServiceorAccountGameLogicIntakeSettlementGrpcServicewith the default limit. Valid large intakes would then fail withRESOURCE_EXHAUSTED.📝 Proposed wording
-Before enabling a standalone HELD-read server, its receiving limit must allow the existing `GameLogicIntakeAuthorizationGrpcCodec.MAX_WIRE_BYTES` request bound; this is a required receiver configuration, not a claim about current deployment. +Before enabling any standalone intake receiver (authorization, source read, HELD read, or settlement), its receiving limit must allow the existing 24 MiB codec bounds (`GameLogicIntakeAuthorizationGrpcCodec.MAX_WIRE_BYTES`, `GameLogicIntakeSourceReadProtoCodec.MAX_WIRE_BYTES`, `AccountGameLogicIntakeSettlementEvidence.MAX_WIRE_BYTES`); this is a required receiver configuration, not a claim about current deployment.- Accepted All three codec bounds are24MiB; Account paragraph names only HELD-read despite authorization/source/settlement envelopes exceeding default4MiB. Extend existing receiver requirement only, preserving unregistered/nondeployment limits.
- A
- CLI Review 3 CompletedRuntime 3m 20sFound: 1 Accepted: 0/0/0 Routed: 0
- Remove the duplicate authorization frame so a valid order always fits the 16 MiB terminal bound.Minor
canonicalBytes()framesoperation.canonicalBytes(), and those bytes already contain the full authorization. The method then framesauthorizationBytesa second time. The constructor already requires both copies to be equal, so the second frame adds no information. For an authorization of sizeA, a RETAINED terminal also carries the selected sourceSand the manifestM. The authorization frames the source, soA ≥ S. The snapshot embedsmanifestJson, soS ≥ M. The terminal size is therefore about2A + S + M ≤ 4A.GameLogicIntakeAuthorizationBindingacceptsAup to 4,194,304 bytes. An order whose size is close to that limit, and that consists mostly of source, produces a terminal larger thanMAX_CANONICAL_BYTESafter framing overhead.At that size,
canonicalBytes()throws. The service then cannot produce or settle a RETAINED terminal for an order that Account already finalized. Only an ABORTED terminal can settle that order. This also contradicts theMAX_WIRE_BYTESJavadoc, which states that a response carries at most a 16 MiB terminal.The component is unregistered and has no persisted rows, so a format change is cheap now. After this fix, the terminal is at most about
3A, roughly 12 MiB.🐛 Proposed fix: remove the redundant frame
public byte[] canonicalBytes() { var output = new ByteArrayOutputStream(); DraftAuthorizationFenceBinding.frame(output, SCHEMA); DraftAuthorizationFenceBinding.frame(output, outcome.name()); DraftAuthorizationFenceBinding.frame(output, operation.canonicalBytes()); - DraftAuthorizationFenceBinding.frame(output, authorizationBytes); frameOptional(output, selectedSourceBytes); frameOptional(output, manifestBytes);var operation = GameLogicGameplayRuleIntakeOperation.fromStored(reader.bytes()); - byte[] authorization = reader.bytes(); + byte[] authorization = operation.authorizationBytes(); byte[] source = readOptional(reader);- Rejected Framing gives RETAINED<=4A-222 bytes,A<=4MiB; claimed overflow false. Canonical source embeds manifest. V96 SQLguard and retained migration fixture require duplicate auth frame; removal breaks settlement with no demonstrated failure.
- CLI Review 4 CompletedRuntime 3m 12sFound: 2 Accepted: 0/1/0 Routed: 0
- Map permanent owner refusals to
FAILEDPRECONDITIONconsistently across the intake receivers.MinorMap permanent owner refusals to `FAILED_PRECONDITION` consistently across the intake receivers.
This receiver maps
IllegalArgumentExceptiontoFAILED_PRECONDITION. It maps every otherRuntimeException, includingIllegalStateException, toUNAVAILABLE.The repository throws
IllegalStateExceptionfor permanent invariant failures, for example "Original creator issuance absent" inrequireReservation. Game Design treatsUNAVAILABLEas retryable. A permanent refusal therefore causes retries without limit, and the real failure stays hidden.The sibling receivers use a different rule:
AccountGameLogicIntakeAuthorizationGrpcService.statusOfmaps bothIllegalArgumentExceptionandIllegalStateExceptiontoFAILED_PRECONDITION.AccountGameLogicIntakeSourceReadGrpcService(Line 88) does the same.AccountGameLogicIntakeAuthorizationGrpcServiceTest.distinguishesPermanentOwnerRefusalsFromStorageOutagesasserts that rule. It keepsDataAccessResourceFailureExceptionandCannotCreateTransactionExceptionasUNAVAILABLE.
AccountGameLogicIntakeAuthorizationReadService.requireHeld(lines 52-56) has the same divergence as this receiver.Apply one mapping in all receivers:
IllegalArgumentException→FAILED_PRECONDITION.IllegalStateException→FAILED_PRECONDITION.DataAccessExceptionand transaction-creation failures →UNAVAILABLE.
Update
substitutedReceiptAndOwnerFailuresDenyWithoutLeakingDiagnosticsto match.🐛 Proposed fix
- } catch (IllegalArgumentException changedPrecondition) { + } catch (IllegalArgumentException | IllegalStateException changedPrecondition) { deny(observer, Status.FAILED_PRECONDITION); return; } catch (RuntimeException unavailable) {Apply the same change in
AccountGameLogicIntakeAuthorizationReadService.requireHeld:} catch (IllegalArgumentException | IllegalStateException changed) { throw Status.FAILED_PRECONDITION.asRuntimeException(); } catch (RuntimeException unavailable) { throw Status.UNAVAILABLE.asRuntimeException(); }As per path instructions: "Flag changes that violate documented FireMUD invariants, especially gRPC application-error handling".
- Accepted Verified repository permanent IllegalState owner refusals become retryable UNAVAILABLE in settlement and HELD reads. Align both with sibling FAILED_PRECONDITION mapping; preserve sanitized DAO and transaction-creation outages as UNAVAILABLE with focused tests.
- Align the entry title with the recorded outcome.Minor
The title says the repeated capture "can reject" the finalized provider comment. The Observation says admission reported a nonblocking
predecessor_terminal_capturewarning. It also says the next request posted successfully. A reader who scans titles can conclude that admission failed. Use the same term as the body.📝 Proposed wording
-- `2026-10-17`: Repeated Hosted capture can reject a previously finalized provider comment +- `2026-10-17`: Repeated Hosted capture can warn on a previously finalized provider comment- Rejected Title describes the capture parser rejecting a finalized comment, not review admission. The body explicitly records a nonblocking warning and successful next request. Existing observations are append-only outside assigned stewardship; no incorrect admission outcome is asserted.
- CLI Review 5 CompletedRuntime 3m 11sFound: 1 Accepted: 0/1/0 Routed: 0
- Add the inbound metadata requirement for the intake authorization receiver.Minor
The paragraph requires only an inbound message limit. The authorization receiver also reads the creator credential from the binary
firemud-game-logic-intake-creator-binheader.AccountGameLogicIntakeAuthorizationCredentials.MAX_CREDENTIAL_BYTESallows 16,384 bytes.- On the wire, a binary header is base64 encoded. A credential at the maximum size therefore needs about 21.8 KiB of header space before other headers.
- The default gRPC inbound metadata limit is 8 KiB. If the server keeps that default, a valid creator token larger than about 6 KiB is rejected before
AccountGameLogicIntakeAuthorizationGrpcServiceruns. - The original Draft order paragraph above already handles the same case. It names
AccountOriginalDraftOrderGrpcCodec.MAX_METADATA_BYTESas a required server setting. GrpcGameLogicIntakeAuthorizationClientMtlsTestsends only a short credential to a server with the default metadata limit. The test therefore does not cover this case.
Add a published metadata bound, for example
AccountGameLogicIntakeAuthorizationCredentials.MAX_METADATA_BYTES, and require it here. Optionally, add an mTLS case that sends a credential of 16,384 bytes.📝 Proposed documentation fix
-... or `AccountGameLogicIntakeSettlementEvidence.MAX_WIRE_BYTES`. These are required receiver configurations, not claims about current deployment. +... or `AccountGameLogicIntakeSettlementEvidence.MAX_WIRE_BYTES`. Before enabling the authorization receiver, its inbound metadata limit must also accommodate the protected creator credential of up to 16 KiB in binary metadata (base64 on the wire); binding the service configures neither server limit. These are required receiver configurations, not claims about current deployment.- Accepted Verified16KiB protected binary credential but missing published metadata/server requirement; defaultfixture8KiB cannot carrymax token. Add existing-family base64+1KiB metadata bound, docserver requirement and actualmaxcredentialmTLScase; no registration.
- CLI Review 6 CompletedRuntime 3m 29sFound: 2 Accepted: 0/1/0 Routed: 0
- Use one canonical source order for vector comparison and lock acquisition.Major
The repository uses two different orders for the same source vector:
requireReservation(Line 359-375) compares the issuancesourcespayload vector index by index with rows ordered byaccount_publication_authorization_source_sort_key(source_key).requireExact(Line 535-556) compares the same payload vector index by index withbinding.sources(). TheGameLogicIntakeAuthorizationBindingconstructor sorts that list by JavaStringorder ofSourceEvidence::key.
The two checks agree only when the SQL sort key equals Java natural string order. If the SQL function uses another order, such as a kind priority, the failures are:
requireReservationsucceeds andfinalizeSourceReadinserts the order.- The readback
requireExactthen throws "Changed intake participation" and rolls back. - Every retry gives the same result, so the intake never finalizes for that creator.
The same mismatch affects locking:
lockReservedSources(Line 314-321) acquiresaccount_draft_authorization_source_locksin SQL sort-key order.readHeld(Line 391-395) andsettle(Line 447-451) acquire the same rows in Java key order.
Concurrent recovery and HELD-read or settlement transactions can then deadlock. PostgreSQL aborts one of them, and the caller receives
UNAVAILABLE.The current fixture passes, so the tested source set sorts the same way in both orders. That does not prove the orders agree for every source kind or key format.
Verify whether
account_publication_authorization_source_sort_key(source_key)can order keys differently fromString.compareTo. If it can:- In
requireExact, compare the vector with participation rows ordered by the SQL sort key. - In
readHeldandsettle, acquire source locks with the SQL-ordered query.
🔒️ Proposed fix sketch
- var participation = - dsl - .fetch( - "SELECT source_key, source_evidence FROM account_game_logic_intake_sources WHERE operation_id = ?", - binding.operationId()) - .stream() - .sorted(java.util.Comparator.comparing(v -> v.get("source_key", String.class))) - .toList(); + var participation = + dsl.fetch( + "SELECT source_key, source_evidence FROM account_game_logic_intake_sources WHERE operation_id = ? " + + "ORDER BY account_publication_authorization_source_sort_key(source_key)", + binding.operationId()); if (participation.size() != binding.sources().size()) throw new IllegalArgumentException("Incomplete intake participation"); + var byKey = new java.util.HashMap<String, DraftAuthorizationFenceBinding.SourceEvidence>(); + for (var source : binding.sources()) byKey.put(source.key(), source); for (int i = 0; i < participation.size(); i++) { - var source = binding.sources().get(i); + var source = byKey.get(participation.get(i).get("source_key", String.class)); if (!(vector.get(i) instanceof String encoded) + || source == null || !Arrays.equals(source.canonicalBytes(), java.util.Base64.getDecoder().decode(encoded))In
readHeldandsettle, replace the loop overoriginal.sources()with the SQL-ordered lock query thatlockReservedSourcesuses. Read the keys fromaccount_game_logic_intake_sources.- Rejected V76 defines the SQL sort key as the exact UTF-16 code-unit sequence, including surrogate pairs for supplementary codepoints. PostgreSQL integer-array lexical order therefore matches Java String.compareTo, including prefixes. No later definition replaces it; vector and locks already share one order.
- Map each standalone receiver to exactly one inbound-message constant.Minor
The paragraph lists four receivers: authorization, source read, HELD read, and settlement. It names only three constants. The HELD read receiver has no stated constant. Its client,
GameLogicIntakeAuthorizationReadClient, usesGameLogicIntakeAuthorizationGrpcCodec.MAX_WIRE_BYTES. A HELD request echoes a binding of up to 4 MiB, so the default gRPC server limit rejects large requests. An operator who sets limits per receiver cannot get the HELD value from this text. State the pairing for each receiver.📝 Proposed wording
-Before enabling any standalone intake receiver (authorization, source read, HELD read, or settlement), its inbound message limit must accommodate the applicable 24 MiB codec bound: `GameLogicIntakeAuthorizationGrpcCodec.MAX_WIRE_BYTES`, `GameLogicIntakeSourceReadProtoCodec.MAX_WIRE_BYTES`, or `AccountGameLogicIntakeSettlementEvidence.MAX_WIRE_BYTES`. +Before enabling any standalone intake receiver, its inbound message limit must accommodate its 24 MiB codec bound: authorization and HELD read use `GameLogicIntakeAuthorizationGrpcCodec.MAX_WIRE_BYTES`; source read uses `GameLogicIntakeSourceReadProtoCodec.MAX_WIRE_BYTES`; settlement uses `AccountGameLogicIntakeSettlementEvidence.MAX_WIRE_BYTES`.As per path instructions: "Review docs for canonical-current-state consistency."
- Accepted Receiver setup text names four standalone receivers but leaves HELD ambiguous among three bounds. Explicitly map authorization and HELD to the authorization codec, source read to its codec, and settlement to its evidence bound; retain metadata and unregistered limits.
Routed Findings
No routes recorded
Unlinked items
no items unlinked