PR #3246 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 50sFound: 8 Accepted: 0/5/3 Routed: 0
- Map a deterministic invalid result to
INTERNAL, notUNAVAILABLE.MinorAuthoredInitialActorCoreReadGrpcCodec.toResponsecan throwIllegalArgumentExceptionin two cases. The first case is an oversize wire response. The second case is a failed self-check infromResponse. Either error repeats on every call with the same retained owner rows. This catch block reports the error asUNAVAILABLE, and gRPC callers treatUNAVAILABLEas transient and retryable. A Game Session or Entity caller with retry policy then retries a permanent failure. The siblingGameDesignStartSessionLaunchDescriptorGrpcServicealready mapsIllegalArgumentExceptiontoINTERNAL(Lines 92-96). Use the same contract here.🐛 Proposed fix
--- "a/services/game-design-service/src/main/java/net/firedevops/firemud/gamedesign/publication/GrpcAuthoredInitialActorCoreReadService.java" +++ "b/services/game-design-service/src/main/java/net/firedevops/firemud/gamedesign/publication/GrpcAuthoredInitialActorCoreReadService.java" @@ -72,12 +72,17 @@ try { observer.onNext(AuthoredInitialActorCoreReadGrpcCodec.toResponse(service.read(decoded))); observer.onCompleted(); } catch (StatusRuntimeException failure) { observer.onError( Status.fromCode(Status.fromThrowable(failure).getCode()) .withDescription("Exact authored-core owner read denied or unavailable") .asRuntimeException()); + } catch (IllegalArgumentException invalidResult) { + observer.onError( + Status.INTERNAL + .withDescription("Game Design produced an invalid authored-core result") + .asRuntimeException()); } catch (RuntimeException unavailable) { observer.onError( Status.UNAVAILABLE .withDescription("Game Design authored-core owner read unavailable")- Accepted Accepted Minor: deterministic invalid owner/encoding results require sanitized INTERNAL; retain foreign status and infrastructure handling.
- Use the base-class lifecycle helpers instead of duplicating
initializedandclosedstate.TrivialAbstractReloadingBlockingGrpcClientalready providesinitOnce(closedMessage, unavailableMessage)andrequireInitializedStub(unavailableMessage). These methods keepclosedandexplicitlyInitializedunder the same monitor as the channel. This class keeps a second, parallel copy of that state in the volatile fields on Line 28 and Line 29. It also reimplements the same checks ininit(),close(), andrequireStub(). Two state machines can drift apart if either one changes later. The other standalone clients inAuthoredCoreAndSpawnReadClientLifecycleTestprobably use the shared helpers.♻️ Proposed refactor
--- "a/services/common-platform-core/src/main/java/net/firedevops/firemud/common/gamedesign/GrpcAuthoredInitialActorCoreReadClient.java" +++ "b/services/common-platform-core/src/main/java/net/firedevops/firemud/common/gamedesign/GrpcAuthoredInitialActorCoreReadClient.java" @@ -44,13 +44,10 @@ this.workloadNamespace = workloadNamespace; } - public synchronized void init() throws SSLException, IOException { - if (closed) throw new IllegalStateException("Authored-core read client is closed"); - if (initialized) return; - initReloadingClient(); - if (stub() == null) throw new IllegalStateException("Authored-core read client has no stub"); - initialized = true; - } + public void init() throws SSLException, IOException { + initOnce( + "Authored-core read client is closed", "Authored-core read client has no stub"); + } @Override public AuthoredInitialActorCoreReadEvidence.ReadResult read(Then replace
requireStub()withrequireInitializedStub("Authored-core read client is not initialized"). Remove theclose()override and the two volatile fields.- Accepted Accepted Trivial: use existing shared lifecycle helpers and remove parallel local state while preserving TLS, request and close-drain behavior.
- Add a
Capability Statusrow for the published spawn-requirements read.MinorThe tracker contains the required table, but it has no row for this new capability. Add a row with:
- Design:
world-management-service/api-contracts.md#implementation-status - Implementation anchors:
WorldPublishedSpawnRequirementsReadOwnerandWorldPublishedSpawnRequirementsReadGrpcService - Proof anchors:
WorldPublishedSpawnRequirementsReadOwnerTestandWorldPublishedSpawnRequirementsClientMtlsTest - Gaps: unregistered transport, the denied Game Design complete-launch producer, and no genuine upstream authority
- Accepted Accepted Minor: record the standalone published spawn-read capability and actual owner/client proof anchors with remaining authority and registration gaps.
- Design:
- Split the new tenant-predicate observation into the required entry fields.Minor
This entry puts the title, context, observation and expected pattern in one sentence block. The file defines a required entry format with a short title and
Context,ObservationandExpected patternsub-bullets. Every other entry in this file uses that format. A health-check pass needs the fields kept apart to decide later whether to keep or remove the entry.📝 Proposed restructure
--- "a/design/project-management/ai-observations.md" +++ "b/design/project-management/ai-observations.md" @@ -140,7 +140,10 @@ - Recovery: the next foreground canonical attempt on `3c71c8c24379af623ca66550a4f4acaadd0ffd81` completed at 05:27:42 UTC with exit zero, full terminal capture, held-edge and backend proof, authenticated teardown and independently absent project resources. This does not establish why the earlier owner ended. - Reconsideration trigger: a subsequent canonical attempt completes with terminal capture, or bounded process evidence identifies why the previous owner ended. -- `2026-10-16`: Qualify tenant mutation predicates before relying on filtered readback or later owner guards. The template repository's global-ID update could rewrite a retained row's tenant before returning it under the supplied tenant; a tenant-filtered readback did not protect the original row. Test controlled pre-phase rows as well as later guarded owners: the native counterexample changed the complete row and `xmin`, while the restored exact tenant predicate preserves both owner rows and their versions. Keep the create-only ID refusal before mapper/repository access, and separate this owner-local SQL proof from authenticated creator or hosted-content readiness. +- `2026-10-16`: Qualify tenant mutation predicates before relying on filtered readback or later owner guards + - Context: the template repository's global-ID update path. + - Observation: the update could rewrite a retained row's tenant before it returned the row under the supplied tenant. A tenant-filtered readback did not protect the original row. The native counterexample changed the complete row and `xmin`. + - Expected pattern: test controlled pre-phase rows as well as later guarded owners. Keep the exact tenant predicate, which preserves both owner rows and their versions. Keep the create-only ID refusal before mapper/repository access. Separate this owner-local SQL proof from authenticated creator or hosted-content readiness. - `2026-10-16`: Derive focused Gradle selectors from declared Java packages - Context: a Gameplay capture proof supplied `integration.net...` as the selector, and Gradle executed no tests before failing discovery.As per coding guidelines: "Entry format: -
YYYY-MM-DD: short title - Context: where it appeared - Observation: what was surprising or wasteful - Expected pattern: what should happen instead".- Accepted Accepted Minor: restructure only this PR-owned tenant-predicate observation into existing required fields, preserving every technical statement.
- Call
requireExactVersionIdentityor remove it.TrivialPMD reports that
requireExactVersionIdentityis an unused private method. The method checks one thing thatapplyFreezeAndCapture(lines 135-142) does not check: whetherintake.operationId()equalsversion.sourceIntakeReceipt().operationId(). As written, a caller can supply anAppliedGraphwhose Version receipt belongs to a different source intake. The freeze then proceeds against that mismatched pair. The tracker also records an earlier full-gate failure caused by an unused fixture local. Call the guard after the existing target check.🛡️ Proposed fix
long expectedStateEpoch = Long.parseLong(selection.intent().expectedVersionStateEpoch()); var intake = worldGraph.sourceIntake(); var version = worldGraph.versionIdentity(); + requireExactVersionIdentity(selection, intake, version); var controlledWorldSource = worldGraph.controlledWorldSource();- Accepted Accepted Trivial: invoke the existing exact Version/intake identity guard before any freeze SQL or controlled Account callback; add focused refusal proof.
- Update the stale status bullets on normalized references and tenant phase.Minor
This PR makes two Implementation Status bullets inaccurate:
- Line 23 says there are "no normalized reference tables, create/update derivation and atomic synchronization, one-time backfill/validation marker". The PR adds each of these:
TemplateReferenceRepository.synchronizeCurrentProjectionwritesgame_template_version_refinside the source application transaction.validateAndEnforceperforms the persistedBACKFILLING → VALIDATED → ENFORCEDcutover.GameTenantCreationRepository.createCandidateinitializesBACKFILLING.- Line 22 says current launch resolution does not consume the durable tenant phase.
StartSessionTemplateAssociationReadServiceandStartSessionLaunchDescriptorProducernow requirePhase.ENFORCEDwith an exactphaseEpoch.
The tracker (lines 55 and 67) already records these facts. Line 24 of this file was updated, but lines 22–23 still say the work is target-only. Edit both bullets to state the actual position:
- The repository-local projection, the phase storage and the cutover primitive exist.
- The new StartSession reads consume the persisted phase.
- The
GetTemplateReferencePhaseRPC, a registered cutover owner, retirement/reference-query tooling and production launch enforcement are still unimplemented.
As per path instructions: "Review docs for canonical-current-state consistency. Flag obsolete transitional guidance, conflicts between architecture docs…"
- Accepted Accepted Minor: current base-reference projection, persisted phase and passive phase consumers exist; correct stale status without claiming registration or all normalized tables.
- Use the inherited
initOnceandrequireInitializedStubhelpers instead of duplicate lifecycle state.TrivialAbstractReloadingBlockingGrpcClientalready providesinitOnce(closedMessage, unavailableMessage)andrequireInitializedStub(unavailableMessage). Both use the base class's synchronizedclosedandexplicitlyInitializedstate. This client adds its ownvolatileinitializedandclosedfields. It also re-implements the same checks and overridesclose()only to reset those fields. The two sets of flags can drift if one of them changes later. Delegate to the base helpers and remove the local fields and theclose()override.♻️ Proposed refactor
- private final String workloadNamespace; - private volatile boolean initialized; - private volatile boolean closed; + private final String workloadNamespace; @@ public synchronized void init() throws SSLException, IOException { - if (closed) { - throw new IllegalStateException("World spawn-requirements client is closed"); - } - if (initialized) { - return; - } - initReloadingClient(); - if (stub() == null) { - throw new IllegalStateException("World spawn-requirements client has no gRPC stub"); - } - initialized = true; + initOnce( + "World spawn-requirements client is closed", + "World spawn-requirements client has no gRPC stub"); } @@ - @Override - public void close() throws IOException { - synchronized (this) { - closed = true; - initialized = false; - } - super.close(); - } - private WorldPublishedSpawnRequirementsReadServiceGrpc .WorldPublishedSpawnRequirementsReadServiceBlockingStub requireStub() { - var currentStub = stub(); - if (closed || !initialized || currentStub == null) { - throw new IllegalStateException( - "World spawn-requirements client is not initialized and available"); - } - return currentStub; + return requireInitializedStub( + "World spawn-requirements client is not initialized and available"); }Also applies to: 108-126
- Accepted Accepted Trivial: use existing shared lifecycle helpers and remove parallel local state while preserving workload identity and transport behavior.
- Move the focused test-pass count to the authoring tracker.Minor
Line 115 records a point-in-time result in an architecture contract: "All fourteen focused
RevisionServiceImplTestcases pass". This text goes stale when someone adds or removes a test case. It also makes the architecture document a second record of proof status. Keep the contract statement here, which says thatGAMEPLAY_RULEis rejected before repository or World client access. Move the case count and the mock-scope limit to the linked authoring tracker.📝 Proposed wording change
-... Other ordinary revision requests without a World mutation retain their local save path. All fourteen focused `RevisionServiceImplTest` cases pass, including both early gameplay-rule refusals and the existing ordinary and World-call ordering cases. These controlled repository and client mocks do not establish coordinated rule authoring, an authenticated creator flow or a successful registered handoff. See ... +... Other ordinary revision requests without a World mutation retain their local save path. Focused proof and its controlled-mock limits are recorded in [the authoring tracker](../../../project-management/implementation-tracking/game-authoring-publishing-and-activation.md#current-status); they do not establish coordinated rule authoring, an authenticated creator flow or a successful registered handoff. See ...As per path instructions, "Architecture owns technical target state". As per coding guidelines, "The domain implementation trackers record capability, code, and proof status".
- Accepted Accepted Minor: proof counts belong in the owning authoring tracker; preserve the API refusal contract and controlled-scope limitations.
- CLI Review 1 CompletedRuntime 3m 06sFound: 6 Accepted: 0/3/1 Routed: 0
- Confirm that the new Capability Status row passes the tracker contract checks.Minor
The new row has no capability identifier. Every other row in this table uses one, for example
GR-2.1. The Capability Allocation ledger is the exhaustive handoff ledger. A row without an allocation ID may therefore faildev-tools/tests/architecture-doc-contracts.sh, or it may leave the capability unallocated.The Secondary handoffs cell links to
../../architecture/microservices/game-design-service/api-contracts.md#authored-world-launch-binding. The supplied excerpts of that file do not include this heading. The link may be broken.Do these steps:
- Add or reuse an allocated capability ID for this row.
- Confirm that the
#authored-world-launch-bindinganchor resolves. If it does not resolve, link to an existing section, such as#implementation-status. - Run
./gradlew linkCheck lintMarkdownandbash dev-tools/tests/architecture-doc-contracts.sh.
As per coding guidelines: "Each tracker contains one
Capability Statusrow for every capability it primarily owns… Evidence targets must be repository-local and resolvable." As per path instructions: "Flag … broken repo links."- Accepted Unallocated standalone CapabilityStatus row should fold into existing allocated World GR-2.1 row preserving all source/proof anchors. Claimed broken link is valid: GameDesign has Authored-World Launch Binding heading.
- Confirm that consumers of
worldSelectedPublicationProofalso receive the World main classes.MajorThe proof JAR contains only the
WorldSelectedFullPublicationEvidenceFixture*.classfiles from theintegrationTestoutput. The fixture calls many World main-source types, for exampleWorldDesignPublicationFenceRepository,WorldDraftGraphApplicationService,WorldCanonicalFrozenTopologyService, andWorldPublishedStartLocationRepository.extendsFrom(configurations.implementation.get())exposes only the declared external and project dependencies. It does not expose this project's ownmainoutput, and it does not exposeruntimeOnlydependencies.The consumer is the GDS schema-4 proof. If that consumer does not get
:world-management-servicemain classes through another dependency, the fixture compiles against an incomplete classpath or fails at runtime withNoClassDefFoundError.Check the consuming
build.gradle.kts. If it does not add World's main output separately, add the main JAR to the outgoing artifacts:Possible fix
val worldSelectedPublicationProof by configurations.creating { isCanBeConsumed = true isCanBeResolved = false extendsFrom(configurations.implementation.get()) + extendsFrom(configurations.runtimeOnly.get()) + outgoing.artifact(tasks.named("jar")) outgoing.artifact(worldSelectedPublicationProofJar) }- Rejected Existing published consumer caa149577173 GameDesign build lines46-52 explicitly adds BOTH worldClassesProof and worldSelectedPublicationProof. Separate classes-only artifact supplies World main classes while excluding service resources; existing physical composition qualifies it.
- Replace the unchecked
DescriptorOutcomecast with a closed type check.MinorThe response is built from server-supplied
association_readandlaunch_descriptorfields. SupposeStartSessionLaunchDescriptorGrpcCodec.fromResponsedecodes a failure outcome instead of a descriptor outcome. The cast on Line 102 then throwsClassCastException. That exception is not anIllegalArgumentException.GrpcAuthoredInitialActorCoreReadClient.readcatches onlyIllegalArgumentException. The client therefore leaks a rawClassCastExceptionand does not report its documentedIllegalStateException("Game Design returned invalid authored-core evidence"). Reject a non-descriptor outcome explicitly.🛡️ Proposed fix
var resolved = StartSessionLaunchDescriptorGrpcCodec.fromResponse(expectedRequest, descriptorEnvelope); - var descriptor = - ((StartSessionLaunchDescriptorGrpcCodec.DescriptorOutcome) resolved.outcome()).descriptor(); + if (!(resolved.outcome() + instanceof StartSessionLaunchDescriptorGrpcCodec.DescriptorOutcome descriptorOutcome)) { + throw new IllegalArgumentException("Authored-core read requires a successful descriptor"); + } + var descriptor = descriptorOutcome.descriptor();- Rejected Core decoder requires hasLaunchDescriptor and locally constructs envelope with only setLaunchDescriptor. Descriptor codec branches on that exact field, returning DescriptorOutcome or throwing IllegalArgumentException. ApplicationFailure cannot reach this cast.
- Shorten the identifiers that exceed the PostgreSQL 63-byte limit.Trivial
These identifiers are longer than 63 bytes:
- The table
game_session_original_start_session_authored_actor_core_retentionis 65 bytes. PostgreSQL stores it as..._actor_core_retenti. - The trigger
game_session_original_start_session_actor_core_retention_no_truncateis 68 bytes. PostgreSQL stores it as..._retention_no_tru.
PostgreSQL truncates both names. It emits only a NOTICE. The code continues to work because every lookup is truncated in the same way. These lookups include the
TABLEconstant inGameSessionAuthoredActorCoreRetentionRepository, theregclassandnamecasts inCommunicationWebSocketCrossServiceTest, and therelnamefilters inCanonicalInitialAdmissionRepositoryIntegrationTest.assertV1013RetentionLaunchForeignKeyasserts the truncated name explicitly.The catalog names therefore differ from the names in the source. This causes these problems:
- Catalog queries and generated code that do not truncate can resolve a different name.
- A future name that shares the same first 63 bytes collides with this name.
- jOOQ DDL simulation of the
CREATE TABLEis not inside a[jooq ignore]block. It can keep the full 65-character name.
V1013 is new in this change. Rename the objects now, before any deployment retains the truncated names. Update the Java constant, the test enum, and the test assertions to use the same names.
♻️ Example rename
-CREATE TABLE game_session_original_start_session_authored_actor_core_retention ( +CREATE TABLE gs_original_start_session_authored_actor_core_retention ( ... -CREATE TRIGGER game_session_original_start_session_actor_core_retention_no_truncate - BEFORE TRUNCATE ON game_session_original_start_session_authored_actor_core_retention +CREATE TRIGGER gs_original_start_session_actor_core_retention_no_truncate + BEFORE TRUNCATE ON gs_original_start_session_authored_actor_core_retentionAlso applies to: 178-180
- Accepted New unmerged V1013 uses overlong table/trigger names and tests depend on truncation. Converge identifiers below63 bytes and every exact repository/fixture/catalog reference; retain all guards/history/assertions and prove actual PostgreSQL migration.
- The table
- Stop mapping every Game Design failure to
UNAVAILABLE.MinorreadLaunchBindingcatches everyRuntimeExceptionand returnsUNAVAILABLE. Some of these failures are permanent:- Game Design can return an application
StatusRuntimeExceptionsuch asNOT_FOUND,PERMISSION_DENIED,INVALID_ARGUMENT, orFAILED_PRECONDITION. - The client codec can throw
IllegalArgumentExceptionwhen the returned evidence is inconsistent.
UNAVAILABLEtells the Entity caller that the error is transient and that it can retry. A missing or mismatched launch binding then produces repeated retries and is never reported as a terminal outcome. The path instructions ask for correct gRPC application-error handling.Keep transport-level
UNAVAILABLEandDEADLINE_EXCEEDEDasUNAVAILABLE. MapNOT_FOUNDtoNOT_FOUND. Map invalid or inconsistent evidence toFAILED_PRECONDITION. Add a test that covers a non-transient Game Design status.Proposed fix
private CompleteLaunchBindingEvidence readLaunchBinding(Request request) { try { return gameDesignClient.getComplete(request.launchBindingRequest()); + } catch (io.grpc.StatusRuntimeException failure) { + switch (failure.getStatus().getCode()) { + case UNAVAILABLE, DEADLINE_EXCEEDED, RESOURCE_EXHAUSTED, ABORTED -> + throw rejected( + Status.Code.UNAVAILABLE, "Authenticated Game Design release read did not complete"); + case NOT_FOUND -> + throw rejected(Status.Code.NOT_FOUND, "No exact Game Design release matches the selector"); + default -> + throw rejected( + Status.Code.FAILED_PRECONDITION, + "Authenticated Game Design release evidence was rejected"); + } + } catch (IllegalArgumentException | IllegalStateException inconsistent) { + throw rejected( + Status.Code.FAILED_PRECONDITION, + "Authenticated Game Design release evidence is inconsistent"); } catch (RuntimeException unavailable) { throw rejected( Status.Code.UNAVAILABLE, "Authenticated Game Design release read did not complete"); } }- Accepted World launch dependency maps every failure to UNAVAILABLE. Preserve canonical six infrastructure codes, sanitize deterministic foreign refusals to local FAILED_PRECONDITION and invalid/unexpected responses to INTERNAL; focused privacy/status proof.
- Game Design can return an application
- Write each identity's credentials to its own files.Minor
clientPropertieswrites every identity to the same fixed paths:entity-client.crt,entity-client.keyandclient-trust-ca.crt. These paths are under the shared static@TempDir.rejectsWrongLocalWorkloadPlaintextAndNonFileBackedTlswriteswrongClientcredentials to these paths. Other tests write the Entity credentials to the same paths. The tests stay correct only if they run sequentially. The sibling lifecycle test uses@ResourceLock, which suggests that JUnit parallel execution can be enabled. If parallel execution is on, one test can overwrite the certificate that another test's client is about to load. The result is a nondeterministic identity-check failure.Confirm the module's
junit.jupiter.execution.parallelsettings. Derive the file names from the identity regardless of the result, because this fix is cheap.♻️ Proposed fix
private CommonGrpcClientProperties clientProperties(Path directory, TestIdentity identity) throws Exception { + String prefix = Integer.toHexString(identity.certificate().getSerialNumber().hashCode()); Path certificate = writePem( - directory.resolve("entity-client.crt"), + directory.resolve(prefix + "-client.crt"), "CERTIFICATE", identity.certificate().getEncoded()); Path privateKey = writePem( - directory.resolve("entity-client.key"), + directory.resolve(prefix + "-client.key"), "PRIVATE KEY", identity.privateKey().getEncoded());- Accepted Distinct test identities overwrite one shared cert/key filename. Use full identity serial for separate file paths while retaining shared CA and all existing PKI/timeouts. Useful fixture isolation regardless of current parallel setting.
- Hosted Review 2 CompletedRuntime 14m 24sFound: 2 Accepted: 1/0/1 Routed: 0
- Assert that no response is delivered on the INTERNAL path.Trivial
The test name says the handler "never masks observer delivery". The test checks only the status code and description. It does not check
observer.valueorobserver.completed. A regression could callonNext/onCompletedafteronError, and this test would still pass. Add the same assertions that the first test uses.♻️ Proposed change
assertThat(observer.error).isEqualTo(Status.Code.INTERNAL); assertThat(observer.description).isEqualTo("Published World source read failed"); assertThat(observer.description).doesNotContain("private exception detail"); + assertThat(observer.value).isNull(); + assertThat(observer.completed).isFalse(); }- Accepted Trivial: bounded INTERNAL regression currently omits no-payload and no-completion assertions. Add the two assertions in the existing test to protect observer error delivery; production behavior unchanged.
- Exclude templates whose latest source revision is
DELETE.MajorTemplateConfigSourceRepository.applykeeps thegame_templatesrow and its qualification row forDELETE. It records an immutable source revision withoperation_kind = 'DELETE'.readCompleteInventoryselects the physical row without checking that latest operation, so the deleted template enterstemplatesByVersionwhile the visible snapshot omits it. The size check then throwsTEMPLATE_REFERENCE_INVENTORY_SOURCE_SET_CONFLICT, which can blockvalidateAndEnforcewhile the template remains deleted.Do not filter on any historical DELETE. Use the same latest-revision ordering as
template_config_current_inventory, so a later active revision remains eligible. Add a PostgreSQL case forCREATE → DELETE → validateAndEnforce.Suggested inventory predicate
+ "FROM game_templates t LEFT JOIN game_design_template_config_source_qualification q " - + "ON q.template_id = t.id WHERE t.tenant_id = ? ORDER BY t.id", + + "ON q.template_id = t.id " + + "LEFT JOIN LATERAL (" + + "SELECT r.operation_kind " + + "FROM game_design_template_config_source_revision r " + + "JOIN game_design_template_config_source_application a " + + "ON a.canonical_tenant_id = r.canonical_tenant_id " + + "AND a.canonical_version_id = r.canonical_version_id " + + "AND a.commit_id = r.commit_id " + + "WHERE r.canonical_tenant_id = q.canonical_tenant_id " + + "AND r.canonical_version_id = q.canonical_version_id " + + "AND r.template_id = t.id " + + "ORDER BY a.expected_epoch::NUMERIC DESC, r.revision_order DESC LIMIT 1" + + ") latest ON TRUE " + + "WHERE t.tenant_id = ? AND latest.operation_kind IS DISTINCT FROM 'DELETE' " + + "ORDER BY t.id",- Accepted Major: physical tombstones remain after DELETE while visible source omits them, so current inventory falsely conflicts. Filter only latest applied DELETE with canonical numeric epoch/revision ordering; retain empty/unqualified denials and prove PostgreSQL deletion/reactivation.
- Hosted Review 3 CompletedRuntime 9m 16sFound: 3 Accepted: 0/3/0 Routed: 0
- Refuse an ambient owner transaction before the blocking World read.Minor
GrpcAuthoredInitialActorCoreReadClient.readrejects an active Spring transaction before it calls the remote owner. This client does not. An Entity caller can therefore callreadwhile it holds an open owner transaction. The blocking call can then keep that transaction open for up to the 5-second deadline.The architecture contracts require the authenticated remote reads to happen before the owner transaction. The World server guard only checks World's own transaction. It does not protect the calling Entity service. The base class already has
requireNoAmbientSql. Call it at the start ofread.🛡️ Proposed fix
--- "a/services/common-platform-core/src/main/java/net/firedevops/firemud/common/world/WorldPublishedSpawnRequirementsClient.java" +++ "b/services/common-platform-core/src/main/java/net/firedevops/firemud/common/world/WorldPublishedSpawnRequirementsClient.java" @@ -54,10 +54,11 @@ } /** Reads and validates the complete immutable source evidence for one exact selector. */ public WorldPublishedSpawnRequirementsEvidence read( WorldPublishedSpawnRequirementsEvidence.Request request) { + requireNoAmbientSql("World spawn-requirements read requires no ambient transaction"); Objects.requireNonNull(request, "request"); if (!workloadNamespace.equals(request.targetNamespace())) { throw new IllegalArgumentException( "World spawn-requirements request must use the configured workload namespace"); }- Accepted Valid missing caller-side no-ambient-SQL guard; reject transaction and synchronization before request validation or blocking World RPC.
- Bind the retained game instance on the exact-retry path.Minor
The first-write path checks the actual launch against
historical.launchAssociation(). That check includesgameInstanceUuid. The retry path inrequireStoredRetryMatchesreturns the stored row without that check. A retry can supply historical evidence whoselaunchAssociation().gameInstanceUuid()differs from the retainedcandidate.gameInstanceUuid(). The method then returns the stored row instead of failing closed. The Game Session runtime contract requires replays to stay bound to the exact original association. Add the instance identity to the retry comparison.🛡️ Proposed fix
|| !candidate.ownerAttemptId().equals(request.expectedOwnerAttemptId()) || !candidate.ownerMutationId().equals(request.expectedOwnerMutationId()) || candidate.ownerFence() != request.expectedOwnerFence() + || !candidate.gameInstanceUuid().equals(historical.launchAssociation().gameInstanceUuid()) || !Arrays.equals(As per path instructions, keep "reads bound to the exact original operation, owner attempt, association, and retained evidence".
- Accepted Valid retained retry omission; historical game instance must equal retained candidate before exact retry returns without new owner work.
- Return
INTERNAL, notUNAVAILABLE, when the response cannot be encoded.Minorservice.readalready converts its own runtime failures toStatusRuntimeException. The only failure that reaches this generic catch isStartSessionTemplateAssociationReadGrpcCodec.toResponse(...)throwingIllegalArgumentExceptionwhile it encodes the result. That failure repeats on every call with the same stored association rows. gRPC callers treatUNAVAILABLEas temporary and retryable, so a Game Session caller with a retry policy retries a permanent failure.GameDesignStartSessionLaunchDescriptorGrpcService(Lines 92-96) already maps this case toINTERNAL. The earlier review ofGrpcAuthoredInitialActorCoreReadServicecorrected the same mapping. Apply the same rule here.🐛 Proposed fix
--- "a/services/game-design-service/src/main/java/net/firedevops/firemud/gamedesign/draft/GameDesignStartSessionTemplateAssociationReadGrpcService.java" +++ "b/services/game-design-service/src/main/java/net/firedevops/firemud/gamedesign/draft/GameDesignStartSessionTemplateAssociationReadGrpcService.java" @@ -61,12 +61,17 @@ observer.onNext( StartSessionTemplateAssociationReadGrpcCodec.toResponse(service.read(decoded))); observer.onCompleted(); } catch (StatusRuntimeException failure) { observer.onError( Status.fromCode(Status.fromThrowable(failure).getCode()) .withDescription("Exact StartSession association read denied or unavailable") .asRuntimeException()); + } catch (IllegalArgumentException invalidResult) { + observer.onError( + Status.INTERNAL + .withDescription("Game Design returned an invalid StartSession association") + .asRuntimeException()); } catch (RuntimeException unavailable) { observer.onError( Status.UNAVAILABLE .withDescription("Game Design template association owner read unavailable")- Accepted Valid permanent result-encoding failure; bound IllegalArgumentException to INTERNAL while preserving generic unavailable handling.
- CLI Review 2 CompletedRuntime 3m 10sFound: 9 Accepted: 2/7/0 Routed: 0
- Use the service-scoped filesystem migration location for consistency.Minor
This test loads migrations from
classpath:db/migration. The other new game-design-service PostgreSQL tests in this change usefilesystem:src/main/resources/db/migration. Examples areGameDesignSourcePostgresIntegrationTest,SelectedDraftGameLogicReceiptPostgresIntegrationTestandGameTemplateRepositoryPostgresIntegrationTest. Another module on the test classpath can contribute migrations at the same location. If that happens, Flyway fails with duplicate-version errors, or it applies foreign migrations. Confirm that the game-design-service test runtime classpath contains no otherdb/migrationresources. Otherwise, switch both Flyway configurations to the filesystem location.🔧 Proposed fix
- .locations("classpath:db/migration"); + .locations( + "filesystem:" + + java.nio.file.Path.of("src/main/resources/db/migration") + .toAbsolutePath() + .normalize());Also applies to: 1564-1564
- Accepted Valid test isolation: both Flyway configurations must use service-scoped migration directory.
- Exempt retained operations from the new template-capture requirement.Major
Line 347 throws
GAME_DESIGN_SOURCE_CAPTURE_INCOMPLETEwhen template genesis is enrolled but no template capture exists. The rule has no exemption for retained operations. Template genesis and storage were enrolled before this change (V1008/V1025), butfreezeonly begins writing a template capture in this change. An operation reserved or sealed before this change can therefore have template genesis without a template capture. This applies to v1 operations and to terminal v2 operations. For that operation,readCapturenow fails where it previously returned the retained capture. Exact terminal readback and replay then fail for that operation, and the failure does not recover.The gameplay check on Line 346 already handles the same transition. It accepts a missing capture when the operation is historical (
historicalOperation) or terminal (historicalGameplay). Apply the equivalent exemption to the template capture. Keep the strict requirement for fresh, pending v2 operations.🐛 Proposed fix
+ boolean historicalTemplate = + historicalOperation || (templateConfig.isEmpty() && operationIsTerminal(operation)); if (command.isEmpty() || policy.isEmpty() || (asset.isEmpty() && !historicalOperation) || (gameplayCapture.isEmpty() && !historicalOperation && !historicalGameplay) - || (templateSourceEnrolled && templateConfig.isEmpty())) { + || (templateSourceEnrolled && templateConfig.isEmpty() && !historicalTemplate)) {Confirm whether any retained operation can have template genesis without a template capture. Check whether
TemplateConfigSourceRepository.freezewas called on any earlier publication path.- Accepted Valid historical readback regression: predecessor had no template capture freeze; preserve v1 and terminal retained captures without new provenance, fresh pending v2 stays strict.
- Do not map non-transient storage failures to
UNAVAILABLE.MinorBoth catch blocks return
UNAVAILABLE. The separateTransientDataAccessExceptionbranch has no effect. As a result, a deterministic failure such asBadSqlGrammarExceptionorDataIntegrityViolationExceptionis reported as "temporarily unavailable". Callers then retry a read that cannot succeed.WorldCanonicalInstanceLifecycleReadRepositorykeeps non-transient failures distinct (seepreservesNontransientSpringAndJooqStorageFailuresAtMaterializedReadBoundary). Map only transient and recoverable failures toUNAVAILABLE, and map otherDataAccessExceptionfailures toINTERNAL.🐛 Proposed fix
- } catch (TransientDataAccessException unavailable) { + } catch (TransientDataAccessException + | org.springframework.dao.RecoverableDataAccessException unavailable) { throw rejected(Status.Code.UNAVAILABLE, "World published source is temporarily unavailable"); - } catch (DataAccessException unavailable) { - throw rejected(Status.Code.UNAVAILABLE, "World published source is temporarily unavailable"); + } catch (DataAccessException storageFailure) { + throw rejected(Status.Code.INTERNAL, "World published source read failed"); } catch (RuntimeException failure) {- Accepted Valid storage classification: transient and recoverable World storage failures are retryable; other Spring DataAccess failures are bounded INTERNAL.
- Narrow the include pattern so the fixture test class stays out of the proof JAR.Minor
The glob
WorldSelectedFullPublicationEvidenceFixture*.classalso matchesWorldSelectedFullPublicationEvidenceFixtureTest.class. That unit test is in the same package and the sameintegrationTestoutput. The proof JAR therefore ships a test class that depends on Mockito and AssertJ. This contradicts the comment on Line 48, which says only the fixture classes cross the proof boundary. Match the top-level class and its nested classes explicitly.🐛 Proposed fix
from(sourceSets["integrationTest"].output.classesDirs) { - include("net/firedevops/firemud/worldmanagement/tenant/WorldSelectedFullPublicationEvidenceFixture*.class") + include("net/firedevops/firemud/worldmanagement/tenant/WorldSelectedFullPublicationEvidenceFixture.class") + include("net/firedevops/firemud/worldmanagement/tenant/WorldSelectedFullPublicationEvidenceFixture$*.class") }- Accepted Valid proof artifact leak: wildcard also selects FixtureTest.class; explicit top-level and nested-class patterns preserve only fixture API.
- Verify which
DataAccessExceptiontype the injectedDSLContextthrows.MinorLine 91 catches only
org.jooq.exception.DataAccessExceptionand maps it toUNAVAILABLE. Spring Boot's jOOQ auto-configuration installs an exception translator. That translator converts jOOQ errors toorg.springframework.dao.DataAccessException, and the code does not catch that type. If the injectedDSLContextuses the translator, connection-acquisition or timeout failures reach theRuntimeExceptionbranch at Line 96. That branch returns permanentFAILED_PRECONDITION. The gRPC adapter keeps that code, so callers treat a transient storage outage as conflicting evidence and do not retry. The sibling owner reads documented in the Game Design API contract return retryableUNAVAILABLEfor these failures.Confirm the exception type for the
DSLContextthat production composition will inject. If it can be the Spring type, also map the transient subclasses oforg.springframework.dao.DataAccessException(for exampleTransientDataAccessExceptionandDataAccessResourceFailureException) toUNAVAILABLE.🛡️ Proposed fix
} catch (StatusRuntimeException failure) { throw failure; - } catch (DataAccessException unavailable) { + } catch (DataAccessException + | org.springframework.dao.TransientDataAccessException + | org.springframework.dao.DataAccessResourceFailureException unavailable) { throw Status.UNAVAILABLE- Accepted Valid translated Spring transient storage classification; fix actual association snapshot catch before status wrapping and preserve unrelated permanent handling.
- Assert the guard failure, not any
RuntimeException.MinorThe UPDATE, DELETE and TRUNCATE checks accept any
RuntimeException. A malformed SQL string, a missing table or a wrong schema also passes these checks, so the test does not prove the append-only guard. Assert the trigger messages. The other pin assertions in this class already do this withhasStackTraceContaining.💚 Proposed fix
- .isInstanceOf(RuntimeException.class); + .isInstanceOf(org.jooq.exception.DataAccessException.class) + .hasStackTraceContaining("authored-core source retention is immutable and append-only"); ... - .isInstanceOf(RuntimeException.class); + .isInstanceOf(org.jooq.exception.DataAccessException.class) + .hasStackTraceContaining("authored-core source retention is immutable and append-only"); ... - .isInstanceOf(RuntimeException.class); + .isInstanceOf(org.jooq.exception.DataAccessException.class) + .hasStackTraceContaining("authored-core source retention cannot be truncated");- Accepted Valid physical guard proof gap: assert actual jOOQ failure and exact append-only/truncate trigger messages so malformed SQL cannot satisfy proof.
- Map a missing publication operation to
FAILEDPRECONDITION.MinorMap a missing publication operation to `FAILED_PRECONDITION`.
publicationOperations.read(...).orElseThrow()throwsNoSuchElementException. All other owner-evidence failures in this method useconflict(...). The exception escapeswriteTransaction.execute, so the gRPC adapter receives a non-status runtime exception. It probably maps it toUNKNOWN, not to the documentedFAILED_PRECONDITIONcontract.🐛 Proposed fix
var readback = - publicationOperations.read(exact.association().publishWorkflowId()).orElseThrow(); + publicationOperations + .read(exact.association().publishWorkflowId()) + .orElseThrow(() -> conflict("Exact selected publication operation is unavailable"));- Accepted Valid absent operation is deterministic owner conflict; use existing FAILED_PRECONDITION. Provider UNKNOWN claim inaccurate: current generic adapter maps UNAVAILABLE.
- Use the service-scoped filesystem migration location.Minor
This test loads migrations from
classpath:db/migration. It has the same exposure described forTemplateConfigSourcePostgresIntegrationTest. Other modules on the test classpath can contribute migrations at that location. Usefilesystem:src/main/resources/db/migration, as the sibling game-design-service PostgreSQL tests do.🔧 Proposed fix
- .locations("classpath:db/migration") + .locations( + "filesystem:" + + java.nio.file.Path.of("src/main/resources/db/migration") + .toAbsolutePath() + .normalize())- Accepted Valid test isolation: scope migration filesystem to owning service, preventing classpath foreign migration discovery.
- Use one shared release-bundle and release-content encoder for the producer and the association reader.Major
toPublishedReleaseBundle(PublishedReleaseBundleDto)andreleaseContent(PublishedReleaseBundleDto)are copied almost exactly fromStartSessionTemplateAssociationReadService(Lines 569-672 in that file). The two copies are not independent.requireReleaseMatchescompares the bundle from the association reader (exact.releaseBundle()) with the bundle that this producer builds (selected.equals(current)). It also compares the canonical bytes of the twoReleaseContentvalues.Suppose one copy changes, for example to add a field or to handle
scriptPatchVersionorabilitySchemaDigestdifferently. Then every valid StartSession fails with "Current release row differs from the exact committed published release". Move both conversions into one package-private helper, for examplePublishedReleaseEvidenceEncoding. Make both classes call it.♻️ Proposed refactor
- private net.firedevops.firemud.gamedesign.v1.PublishedReleaseBundle toPublishedReleaseBundle( - PublishedReleaseBundleDto dto) { - var builder = ... - return builder.build(); - } + private net.firedevops.firemud.gamedesign.v1.PublishedReleaseBundle toPublishedReleaseBundle( + PublishedReleaseBundleDto dto) { + try { + return PublishedReleaseEvidenceEncoding.toPublishedReleaseBundle(dto); + } catch (IllegalStateException failedParticipant) { + throw conflict("Published release participant did not succeed"); + } + }Apply the same delegation in
StartSessionTemplateAssociationReadServiceand forreleaseContent(PublishedReleaseBundleDto).- Accepted Valid byte-equality maintenance risk: canonical package-private encoder for both DTO conversions; preserve all fields, canonical bytes and caller-specific conflict behavior.
- CLI Review 3 CompletedRuntime 3m 52sFound: 4 Accepted: 0/4/0 Routed: 0
- Fail with a clear error when no checkpoint was captured in this transaction.Minor
capturedCheckpointgets a value only whenfence.claimFreezecalls the supplier. A freeze can already exist for the same publication, for example on a replay or a second call in an idempotency proof. In that case, the supplier does not run andcapturedCheckpoint.get()returnsnull. Line 281 then throws anNullPointerExceptionwith no context. The fixture already passescapturedCheckpoint.get()(possiblynull) toinventoryRepository.retainOrRequireExactat Line 226. Line 281 is the first unguarded dereference.Require the captured checkpoint before you build
worldDigest. Alternatively, read the owner keys from the committed checkpoint.🛡️ Proposed fix
+ var checkpoint = + Objects.requireNonNull( + capturedCheckpoint.get(), + "World selected freeze reused an existing checkpoint; fixture requires a fresh capture"); var worldDigest = new WorldDraftDesignDigestService.WorldDraftDesignDigest( - Long.toString(capturedCheckpoint.get().owner().localTenantKey()), - Long.toString(capturedCheckpoint.get().owner().localVersionKey()), + Long.toString(checkpoint.owner().localTenantKey()), + Long.toString(checkpoint.owner().localVersionKey()),- Accepted Valid Minor: replay can bypass checkpoint supplier and dereference null. Add explicit fixture fresh-capture refusal before using owner keys; no production behavior expansion.
- Set an explicit inbound message bound on the spawn-requirements stub.Minor
GrpcAuthoredInitialActorCoreReadClient.buildStubraises its limit withwithMaxInboundMessageSize(MAX_RESPONSE_WIRE_BYTES). This stub keeps the default gRPC inbound limit of 4 MiB. The response carries the completeGetCompleteLaunchBindingResponse, including the World selector receipt, the original Account binding and the applied-result bytes. It also carries unboundedspawn_requirementsandgeneration_requirementslists. If an authored world exceeds 4 MiB, the client fails withRESOURCE_EXHAUSTED, and the wrapper inreaddoes not report it as invalid evidence. The codec also defines no response bound for this read.Confirm the maximum realistic response size for this read. Then define a
MAX_RESPONSE_WIRE_BYTESconstant inWorldPublishedSpawnRequirementsGrpcCodecand apply it in both the stub andfromResponse.🛡️ Proposed bound
return WorldPublishedSpawnRequirementsReadServiceGrpc.newBlockingStub(channel) + .withMaxInboundMessageSize(WorldPublishedSpawnRequirementsGrpcCodec.MAX_RESPONSE_WIRE_BYTES) .withCallCredentials(new GrpcServerPeerIdentityCallCredentials(expectedPeerUri))- Accepted Valid Minor: make existing effective4MiB gRPC response ceiling explicit and consistent in stub/codec, preserving all owner authentication/selector checks; no speculative limit expansion.
- Rewrite the 2026-10-18 entry in the required entry format.Minor
The file defines one entry format: a `
-YYYY-MM-DD: short titlebullet withContext,ObservationandExpected patternsub-bullets. The two other new entries (lines 143–147 and 156–161) follow that format. This entry uses a## 2026-10-18 — ...heading and free prose instead. The entry is harder to scan, and it breaks the dated append-only list that tooling and stewardship reviews depend on. Keep the recovery-status text in aRecovery` sub-bullet, as the 2026-10-17 entry does.📝 Proposed restructure
- -## 2026-10-18 — PR retarget can fail exact merge-parent metadata checks - -After #3237 merged and #3246 was retargeted to `develop`, Runtime Images run `39093729815` and Preview run `39093729854` rejected ... - -Gameplay reported the captured failures to Overseer ... replacement CI has not yet established recovery. +- `2026-10-18`: PR retarget can fail exact merge-parent metadata checks + - Context: After #3237 merged and #3246 was retargeted to `develop`, Runtime Images run `39093729815` and Preview run `39093729854` checked the retargeted head/base pair. + - Observation: Both runs rejected the selected test-merge commit because it lacked its exact parents. Runtime failed before image production; Preview exhausted five merge-computation attempts. The PR Runtime path uses `GITHUB_SHA`; an empty dispatch-only `EVENT_MERGE_SHA` is not the cause. The cause is unconfirmed. + - Expected pattern: Treat green runs on the previous parent as not qualifying a retargeted pair. Do not weaken the guard or rerun blindly. + - Recovery: Reported to Overseer in controller message `64512c73-9fa2-44b5-b2b7-e5b607155777` (Preview evidence in reply `0de28b96-8790-4e5e-b8e5-a915d96de829`). Parent reconciliation and the required correction push are the next recovery boundary; replacement CI has not yet established recovery.As per coding guidelines,
ai-observations.mddefines "Entry format: -YYYY-MM-DD: short title / Context / Observation / Expected pattern", and AGENTS.md requires "append dated entries".- Accepted Valid Minor: own new retarget observation violates established dated bullet format. Preserve all incident facts/recovery unknowns in canonical entry fields.
- Reconcile the conflicting Game Design gate results in the selected-template section.Minor
The same section reports results that cannot all be current:
- Line 59 says the
3ad94e6c…gate passed 624 units and 170 native cases. It also says this result "supersedes the earlier Game Design endpoint gap". - Line 69 says "Game Design's 616 units retain R17". It reports that R21 failed with six Game Design native failures and that "full-native qualification remains held".
- The world-runtime tracker (
world-runtime-and-movement.mdline 11) says "all Game Design native cases skip after Docker discovery fails". That statement also conflicts with line 59.
A reader cannot tell whether Game Design native qualification is complete or held, or which unit count applies. Pick the latest source attribution as the current statement. Label the R17/R21/R22 results explicitly as earlier-source history, or remove them. Update world-runtime line 11 in the same change.
As per path instructions, "Review docs for canonical-current-state consistency. Flag obsolete transitional guidance". The tracker README requires keeping "status, implementation record, validation, gaps … sections aligned".
Also applies to: 69-69
- Accepted Valid Minor: older GDS skipped/failed gate narratives conflict with later qualified3ad source. Separate historical failed attribution from later passing source and current focused-only proof.
- Line 59 says the
- CLI Review 4 CompletedRuntime 3m 54sFound: 4 Accepted: 0/2/2 Routed: 0
- Add the new prepared RPCs to the gRPC API index.Minor
This change adds three standalone Game Design RPC surfaces:
GameDesignAuthoredInitialActorCoreReadService.ReadAuthoredInitialActorCore(protos/game-design/v1/authored_initial_actor_core_read.proto).- The StartSession template-association read.
- The StartSession launch-descriptor resolve.
Implementation Status mentions only the association read. The
## gRPC APIsindex and the### gRPClist have no entries for any of these RPCs. They also do not record the peer allowlist for the authored-core read, which is Game Session or Entity. Line 161 of this document requires the proto contract and these sections to change together.Add one index entry for each RPC. Mark each entry as standalone and unregistered. Record its exact peer allowlist and its bounds. The authored-core bounds are a 128 KiB request and a 16 MiB response, with an 8 MiB canonical result.
- Accepted Verified new standalone authored-core/StartSession RPCs are absent from both API indexes. Record implemented peer/bound constraints and unregistered status at canonical API owner, without new authority or invented limits.
- Add focused tests for the release-to-frozen-graph binding checks.Trivial
requireExactReleaseGraphandactualSelectorEvidencedecide whether frozen World data matches the authenticated Game Design release. These checks include the participant scope, commit, content digest, digest schema, selector request, start ROOM and receipt binding digest.WorldPublishedSpawnRequirementsReadOwnerTestreaches only the steps before these checks or thestatus()rejection. No test runsread()throughrequireExactReleaseGraphon a success path. No test changes one bound field and expectsFAILED_PRECONDITION.The outer
catch (RuntimeException)at Line 125 turns every mismatch into the sameFAILED_PRECONDITION. A regression that removes a single comparison would therefore not fail any current test.Add these tests:
- One test where
read()returns evidence from an exact match. - Parameterized tests that change one field each, for example
world.contentDigest(),freeze.appliedCommitId(),receipt.bindingDigest()and the start-ROOM count. Each test must expectFAILED_PRECONDITION.
The path instructions require it: "Prioritize bugs, regressions, missing tests, cross-service contract drift".
- Accepted Current owner tests exit before requireExactReleaseGraph/actualSelectorEvidence or test projection alone. Add exact success plus independently varied immutable binding refusals in existing test file.
- One test where
- Map a failure to begin the snapshot transaction to
UNAVAILABLE.Minorsnapshot.execute(...)callsPlatformTransactionManager.getTransactionbefore the callback runs. Assume the database is unreachable or the connection pool is exhausted. ThenDataSourceTransactionManagerthrowsCannotCreateTransactionException. That exception is aTransactionException, not aDataAccessException. Neither the jOOQ catch nor the SpringDataAccessExceptioncatches it. The finalcatch (RuntimeException invalid)then reports it asFAILED_PRECONDITIONwith "Exact StartSession template association is unavailable or conflicting".Callers treat
FAILED_PRECONDITIONas a conflict, so they do not retry. The Game Session and the authored-core read callers receive a conflict for a temporary outage. ATransactionSystemExceptionduring the read-only commit takes the same path. The path instructions require correct gRPC application-error handling and failure-mode mapping.🛠️ Proposed fix
} catch (org.springframework.dao.TransientDataAccessException | org.springframework.dao.DataAccessResourceFailureException unavailable) { throw Status.UNAVAILABLE .withDescription("Game Design association owner storage unavailable") .withCause(unavailable) .asRuntimeException(); + } catch (org.springframework.transaction.CannotCreateTransactionException + | org.springframework.transaction.TransactionSystemException unavailable) { + throw Status.UNAVAILABLE + .withDescription("Game Design association owner storage unavailable") + .withCause(unavailable) + .asRuntimeException(); } catch (RuntimeException invalid) {As per path instructions: "Flag changes that violate documented FireMUD invariants, especially gRPC application-error handling, ownership boundaries, and failure-mode expectations."
- Accepted Verified Spring CannotCreateTransactionException and TransactionSystemException fall through to permanent FAILED_PRECONDITION. Map these storage lifecycle failures to existing sanitized UNAVAILABLE and test begin/completion.
- Reuse the existing launch-descriptor encoder.Trivial
toCompleteLaunchBindingResponsebuilds theAuthoredWorldLaunchDescriptorEvidenceprotobuf and theLaunchDescriptormessage field by field. That is about 60 lines.AuthoredWorldLaunchDescriptorGrpcCodec.toLaunchDescriptorMessage(descriptor)already does this encoding, andAuthoredInitialActorCoreReadEvidenceuses it.The copy must track every future descriptor field. If a new optional field is added to the shared codec and not here, the round-trip check at Line 299 fails. Each spawn read then fails with "Encoded complete launch binding differs from its immutable evidence pair", and no compile-time signal shows the cause.
Delegate to the shared encoder and keep the round-trip check.
♻️ Proposed refactor
public static GetCompleteLaunchBindingResponse toCompleteLaunchBindingResponse( GetLaunchDescriptorRequest request, CompleteLaunchBindingEvidence evidence) { Objects.requireNonNull(request, "request"); Objects.requireNonNull(evidence, "evidence"); - AuthoredWorldLaunchDescriptorEvidence descriptor = evidence.descriptor(); - var bindingBuilder = ... - ... - var descriptorBuilder = ... - ... GetCompleteLaunchBindingResponse response = GetCompleteLaunchBindingResponse.newBuilder() .setRequestId(request.getRequestId()) - .setLaunchDescriptor(descriptorBuilder) + .setLaunchDescriptor( + AuthoredWorldLaunchDescriptorGrpcCodec.toLaunchDescriptorMessage( + evidence.descriptor())) .setReleaseAttestation(- Accepted Verified existing canonical encoder covers the same descriptor fields and optional values. Delegate duplicate encoding and retain exact round-trip check to remove drift risk without wire changes.
- CLI Review 5 CompletedRuntime 2m 57sFound: 3 Accepted: 0/0/2 Routed: 0
- Map tuple decode failures to
INVALIDARGUMENTinstead ofUNAVAILABLE.MinorMap tuple decode failures to `INVALID_ARGUMENT` instead of `UNAVAILABLE`.
The class Javadoc says the typed request is untrusted. In this block,
request.decodedTuple()runs inside the sametryas the Account projection call. If the tuple bytes do not decode, the method throws a non-StatusRuntimeException. Thecatch (RuntimeException unavailableOrInvalid)branch then reportsUNAVAILABLEwith "Exact redeemed StartSession projection unavailable".Callers normally retry
UNAVAILABLE. A malformed request can therefore enter a retry loop that cannot succeed. The error also reports a dependency outage that did not happen. Keep theUNAVAILABLEmapping only for the Account projection call. Decode the tuple first in its own block.🐛 Proposed fix
final StartSessionPostAuthorizationExecutionTuple tuple; try { tuple = request.decodedTuple(); + } catch (RuntimeException malformed) { + throw Status.INVALID_ARGUMENT + .withDescription("Malformed StartSession post-authorization tuple") + .withCause(malformed) + .asRuntimeException(); + } + try { requireAuthorizedTarget(request, tuple); ReadRedeemedOperationProjectionResponse projection = accountProjectionReader.read(tuple, request.ownerAttemptId(), request.ownerFence());Check whether
StartSessionTemplateAssociationReadGrpcCodec.fromRequestor theRequestconstructor already rejects tuple bytes that do not decode. If either one does, the malformed-input path is unreachable from the gRPC adapters. Direct callers of the publicread(...)can still reach it.As per path instructions: "Flag changes that violate documented FireMUD invariants, especially gRPC application-error handling".
- Rejected Unreachable malformed typed request: Request constructor decodes and canonical-compares tuple bytes, then stores a private clone and returns clones. Record is final. Direct callers cannot supply undecodable bytes; gRPC codec invokes same constructor.
- Add coverage for non-empty projection correlation.Trivial
Fixture.result()always passesList.of()as projections. As a result, no test reaches the projection checks inReadResult.requirePublicCorrelation. Those checks cover duplicatebindingIdand mismatches inworldSourceOperationId,worldSourceEvidenceDigest,worldSlug,publicationWorkflowId, canonical tenant, canonical Version, and selected commit. They also determine the ordered projection list inencodeCanonical. These checks are the main integrity boundary for this read.Add one positive case with at least one matching
AuthoredInitialActorCoreProjection. Add negative cases for a duplicate binding and for one mismatched correlation field. Add a codec round-trip that keeps projection order.- Accepted Useful missing integrity proof: current fixture always has zero projections. Add matching nonempty projection, duplicate-binding and mismatched-correlation rejection, plus ordered codec roundtrip in existing owning tests.
- Replace the unchecked
DescriptorOutcomecast with a typed check.TrivialfromResponsecastsresolved.outcome()toStartSessionLaunchDescriptorGrpcCodec.DescriptorOutcomewithout aninstanceofcheck. If the decoded outcome is ever a failure outcome, the cast throwsClassCastException.GrpcAuthoredInitialActorCoreReadClient.readcatches onlyIllegalArgumentException. AClassCastExceptionwould therefore skip the client's "invalid authored-core evidence" mapping and escape as a raw runtime error. The read still fails closed, but the error contract becomes inconsistent. ThrowIllegalArgumentExceptionexplicitly.♻️ Proposed refactor
- var descriptor = - ((StartSessionLaunchDescriptorGrpcCodec.DescriptorOutcome) resolved.outcome()).descriptor(); + if (!(resolved.outcome() + instanceof StartSessionLaunchDescriptorGrpcCodec.DescriptorOutcome descriptorOutcome)) { + throw new IllegalArgumentException("Authored-core read requires a successful descriptor"); + } + var descriptor = descriptorOutcome.descriptor();- Accepted Accept explicit typed success-outcome invariant at authored-core boundary. Current descriptor-only envelope already ensures success; checked extraction clarifies rejection contract without claiming a currently reachable ClassCastException.
- CLI Review 6 CompletedRuntime 2m 45sFound: 2 Accepted: 0/1/1 Routed: 0
- Use the documented
Contextfield for location, not instruction.TrivialThe file defines
Contextas "where it appeared". In this entry, theContextline gives a directive ("Before relying on filtered readback ... account for ..."). It does not name the lane, PR or test where the counterexample appeared. The entry therefore mixesContextwithExpected pattern. Move the directive intoExpected pattern. State the template repository update path and the native test that exposed the cross-tenant rewrite inContext.📝 Proposed wording
- - Context: Before relying on filtered readback or later owner guards, account for the template repository's global-ID update, which could rewrite a retained row's tenant before returning it under the supplied tenant; a tenant-filtered readback did not protect the original row. + - Context: Game Design template repository update proof (`GameTemplateRepositoryPostgresIntegrationTest`) on the template create/update correction lane. + - Observation: The global-ID update could rewrite a retained row's tenant before the tenant-filtered readback returned it, so the readback did not protect the original row. The native counterexample changed the complete row and `xmin`, while the restored exact tenant predicate preserves both owner rows and their versions.As per coding guidelines, the AI observations entry format says "
Context: where it appeared".- Accepted Valid small observation-format improvement: Context should name template update path/native counterexample. Preserve changed row/xmin/predicate facts in Observation and guidance in Expected pattern.
- The 128 KiB request bound does not limit transport buffering.Minor
request.getSerializedSize()runs after gRPC has already received, buffered and parsed the complete message. The server'smaxInboundMessageSizeis the only limit at that stage, and the gRPC default is 4 MiB. The check therefore rejects oversized requests only after the read cost is paid. It does not enforce the "request is capped at 128 KiB wire size" contract inapi-contracts.mdlines 133 and 221.The Draft terminal-read adapter documents the same situation as a registration hold: "future server composition must admit the bounded request before this currently unregistered adapter is enabled". Record the same hold for this adapter. When the adapter is registered, configure the inbound size limit for this service at 128 KiB on the receiving server composition. Keep the in-handler check as defense in depth.
- Accepted Valid registration-hold clarification: handler serialized-size rejection occurs after buffering. Keep adapter unregistered and handler guard; document future receiving composition128KiB enforcement, without enabling server or changing limits.
Routed Findings
No routes recorded
Unlinked items
no items unlinked