PR #3156 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
- CLI Review 1 CompletedRuntime 3m 46sFound: 7 Accepted: 1/2/4 Routed: 0
- Make every new workload-only RPC reject authenticated caller context.Trivial
The docs describe these RPCs as workload-only with "no caller context".
AuthoredWorldSourceReadGrpcService,WorldAuthoredVersionIdentityGrpcService, and the by-ID intake read rejectSessionContext.hasAuthenticatedCallerContext(). The handlers listed below check only the peer identity.services/game-design-service/src/main/java/net/firedevops/firemud/gamedesign/service/impl/AuthoredWorldVersionStateGrpcService.java#L36-L42: AddSessionContext.hasAuthenticatedCallerContext() ||to the denial condition.services/world-management-service/src/main/java/net/firedevops/firemud/worldmanagement/tenant/WorldAuthoredSourceIntakeGrpcService.java#L271-L283: UserequireAuthenticatedGameDesignPeerWithoutCallerContextforintakeAuthoredWorldSourceandreadAuthoredWorldSourceIntake.
- Accepted Canonical workload-only reads deny player caller context. Version read and two World intake methods currently omit that check; align guards and add no-owner-access negatives.
- Make the "changed" retained pair differ in a real field.Trivial
Both tests build
changedPairwithcommittedPair(fixture.evidence().descriptor(), fixture.request().expectedReleaseAttestationEvidenceDigest()). That call reuses the same descriptor and the same release digest (digest('7')) as the fixture pair. The fixture pair also has the same schema version and the same selectorintakeRequestId. As a result,changedStoredmatchesfixture.stored()in every stored column. The only difference is the object identity of the Mockito mock.The rejection therefore passes only because mock
equalsuses object identity. The tests do not prove that the service detects a changed release pair. Two real records with these values would be equal.Use a different release evidence digest, for example
digest('8'). Then the storedreleaseAttestationEvidenceDigestand the pair both differ from the expected values.♻️ Proposed fix
CompleteLaunchBindingEvidence changedPair = - committedPair( - fixture.evidence().descriptor(), - fixture.request().expectedReleaseAttestationEvidenceDigest()); + committedPair(fixture.evidence().descriptor(), digest('8'));Apply this change in both
committedLaunchRetryRejectsAChangedRetainedReleasePairWithoutReplacementandcommittedLaunchRejectsChangedPairDuringLostCommitAcknowledgmentRecovery.Also applies to: 415-438
- Accepted Two changed-pair fixtures reuse all expected values and only differ in Mockito identity. Use a genuinely different retained release digest in both negative cases.
- Add a Capability Status entry for the authored-world source work, and restore the section structure.Minor
The new authored-world source-retention capability exists only as narrative text. No Capability Status row contains it, and the
GR-2.1anchors do not listWorldAuthoredSourceIntakeRepository,WorldAuthoredVersionIdentityRepository,WorldCompleteLaunchBindingRepository,WorldDesignPublicationFenceRepository, or V23.1–V27.1.The new heading also sits under
## Current Statuswith no text before it. As a result, the general tracker paragraph at Line 13 and the initial-admission paragraph now appear under the authored-world heading.The coding guidelines say that the "capability rows are the complete scan-first status surface". They also require that
implemented/partialrows "name concrete production anchors".- Accepted New retained-source capability is absent from scan-first rows and status heading absorbs unrelated narrative. Add canonical source/proof anchors to GR-2.1 and restore status section hierarchy, retaining partial/activation limits.
- Give the "standalone" Game Design reads their own gRPC services.Trivial
Both new RPCs are part of services that are already registered:
GameDesignServiceandTenantIdentityService. Their standalone handlers extend those same base classes. The registered handlers returnUNIMPLEMENTEDfor the new RPCs. Registering a standalone handler later requires a second implementation with the same full service name, and that replaces or conflicts with the existing service. The World side already avoids this problem with dedicated services.protos/game-design/v1/game_design_service.proto#L34-L36: MoveGetAuthoredWorldVersionStateinto a new service, for exampleAuthoredWorldVersionStateService. Then updateAuthoredWorldVersionStateGrpcServiceandAuthoredWorldVersionStateClientto use it.protos/game-design/v1/tenant_identity_service.proto#L10-L12: MoveResolveAuthoredWorldSourceinto a new service, for exampleAuthoredWorldSourceReadService. Then updateAuthoredWorldSourceReadGrpcServiceandAuthoredWorldSourceClientto use it.
- Accepted Confirmed standalone unregistered reads extend already registered full service identities. Give the two read RPCs distinct service definitions and update clients, handlers and proof without registration/activation.
- Make all documents report the same V27.1 PostgreSQL/mTLS proof status.Minor
The World tracker reports a clean detached proof with 58 integration tests and zero skips, including the mTLS and publication-fence suites. Four other documents say that the V27.1 PostgreSQL migration cases and the mTLS cases were skipped or remain unrun. Choose the current proof status and state it the same way everywhere.
design/project-management/implementation-tracking/world-runtime-and-movement.md#L11-L11: Keep this as the single source of the current proof scope. If the clean proof is authoritative, state that it supersedes the earlier skipped-case result.design/architecture/microservices/world-management-service/api-contracts.md#L7-L7: Replace "skipped locally, so exact physical migration and mTLS proof remains outstanding" with the current status, or link to the tracker.design/architecture/microservices/world-management-service/runtime-and-data.md#L5-L5: Replace "physical PostgreSQL/mTLS migration execution remains unrun" with the current status.design/architecture/microservices/world-management-service/runtime-and-data.md#L29-L29: Update "remain unvalidated against a physical PostgreSQL database" to the current status.design/architecture/microservices/game-design-service/api-contracts.md#L62-L62: Update "which remain unrun" to the current status.design/project-management/implementation-tracking/game-authoring-publishing-and-activation.md#L55-L55: Update "physical mTLS integration execution remains pending" to the current status.
The coding guidelines require that tracker validation sections stay aligned. The path instructions require that architecture documents do not conflict.
- Accepted Clean detached physical proof supersedes earlier skipped local cases. Owning tracker will preserve exact historical scope and all secondary docs will link it without claiming deployment or newer-head execution.
- Stop the reservation trigger from locking a shared per-tenant row on every write.Major
world_claim_legacy_numeric_tenant_key()runsON CONFLICT DO UPDATEon theworld_authored_source_tenant_key_reservationrow for the tenant. That statement takes an exclusive row lock, and the transaction holds it until commit. V24 fires the function on every INSERT and UPDATE of 16 tables, including runtime tables.Two problems follow:
- Writes run one at a time. Concurrent transactions that write rows for the same tenant wait for each other.
- Deadlocks are possible. A BEFORE ROW UPDATE trigger runs after PostgreSQL has locked the target row. Two transactions that update two rows in opposite order therefore deadlock, and PostgreSQL aborts one of them.
The upsert does not protect anything that the code does not already protect:
- The EXISTS checks already reject canonical keys.
- Intake's
SHARElocks on the legacy tables prevent overlap with an in-flight legacy writer. LEGACY_NUMERICrows are immutable.
services/world-management-service/src/main/resources/db/migration/V24__world_canonical_tenant_mutation_guard.sql#L45-L56: Return early when an UPDATE does not changetenant_id. Replace the upsert withON CONFLICT DO NOTHINGplus a plain SELECT ofclaim_kind. Add a concurrent same-tenant PostgreSQL test.services/world-management-service/src/main/resources/db/migration/V23.1__world_authored_source_intake.sql#L75-L81: Keep this definition as it is, because V24 replaces it. If this PR keeps V23.1 as the final definition, apply the sameDO NOTHINGpattern here.
- Accepted V24 upsert takes a shared per-tenant exclusive row lock on every legacy write. Preserve all published SQL; implement additive correction removing ordinary-write serialization while retaining canonical key refusal/intake locks, with concurrent PostgreSQL proof.
- Remove the unused helpers.Trivial
Nothing calls
parseCanonicalNonNilUuidorisCanonicalNonNilUuid.AuthoredWorldSourceGrpcCodec.fromReadRequestalready does all UUID parsing.- Accepted Both private UUID helpers are unused; the shared authored-source codec performs request parsing. Remove only those dead helpers/import.
- CLI Review 2 CompletedRuntime 2m 39sFound: 2 Accepted: 0/1/1 Routed: 0
- Use the proto service names in the gRPC endpoint index.Minor
The other index entries name proto services and RPCs. The World API contract uses proto names such as
WorldAuthoredVersionIdentityService.AssociateAuthoredWorldVersion. These two entries name the Java adapter classes instead. The proto services areAuthoredWorldVersionStateServiceingame_design_service.protoandAuthoredWorldSourceReadServiceintenant_identity_service.proto. A reader who searches the proto forAuthoredWorldVersionStateGrpcServicefinds nothing.Proposed fix
-- `AuthoredWorldVersionStateGrpcService.GetAuthoredWorldVersionState` – standalone, unregistered ... -- `AuthoredWorldSourceReadGrpcService.ResolveAuthoredWorldSource` – standalone, unregistered ... +- `AuthoredWorldVersionStateService.GetAuthoredWorldVersionState` (adapter `AuthoredWorldVersionStateGrpcService`) – standalone, unregistered ... +- `AuthoredWorldSourceReadService.ResolveAuthoredWorldSource` (adapter `AuthoredWorldSourceReadGrpcService`) – standalone, unregistered ...As per path instructions: "Review docs for canonical-current-state consistency."
- Accepted Minor: endpoint index still names Java adapters instead of new proto service identities. Update only two entries to canonical proto names plus adapter notes; preserve passive/unregistered limitations.
- Plan for the lock footprint of fresh tenant-key allocation before this service is wired.Trivial
Each first-time intake runs
LOCK TABLE ... IN SHARE MODEon all 16 tenant-bearing tables. The list includes hot runtime tables such asroom_instance,world_event, andworld_instance. The lock is held until the owner transaction commits. During that time every gameplay and lifecycle writer on those tables blocks.The intake acquires the 16 locks one after another. Assume a concurrent writer already holds
ROW EXCLUSIVEon a table late in the list, such aszone. If that writer then writes to a table that the intake already locked, such asgeneration_rule, the two transactions deadlock. PostgreSQL then aborts one of them. The current code is correct because the service is unregistered and intake is rare.Before production wiring:
- Keep the owner transaction short.
- Set a
lock_timeouton that transaction. - Make the gRPC layer map lock-timeout and deadlock failures to
UNAVAILABLE, so that callers can retry. - Consider replacing the table locks with a dedicated allocator sequence or a single allocator row that legacy writers also check through the reservation trigger. This removes the need to lock gameplay tables.
Also applies to: 266-272
- Accepted Trivial: fresh allocator table waits are unbounded; add a narrow transaction-local lock bound preserving tighter caller limits, prove rollback/retry and existing UNAVAILABLE mapping. Preserve 16-table safety; no allocator replacement or activation.
- CLI Review 3 CompletedRuntime 3m 23sFound: 4 Accepted: 0/2/2 Routed: 0
- Use the required entry format for the follow-up entry.Minor
The follow-up entry uses
Outcomein place ofContextandObservation. The repository guideline requires each entry to containContext,Observation, andExpected pattern. Rename the fields, or merge the correction into aContext/Observationpair that cites the 2026-10-13 compact-output entry it corrects. The existing 2026-10-09 Foojay follow-up uses that pattern.As per coding guidelines: "Entry format: -
YYYY-MM-DD: short title - Context: … - Observation: … - Expected pattern: …".- Accepted Minor: verified new follow-up entry lacks required Context/Observation fields. Add those two fields while preserving prior Outcome/Expected text and append-only historical entries; no broad observation rewrite.
- Change each negative case so that only one input is invalid.Trivial
Some negative cases contain more than one invalid input. In those cases, the test passes even when the guard that the case targets is missing.
- Lines 116-131: the tenant is
new UUID(0L, 0L), butvalidWorkflow()buildspublish:<TENANT_ID>:publish-request:request-7. The workflow-binding check fails for the wrong tenant, so the test does not prove that the nil-tenant guard exists. The same case also usesversionId42. - Lines 60 and 66: these cases pass
binding.requestDigest(). Line 44 shows that this value is not therequestDigestthat the evidence accepts. The constructor can throwIllegalArgumentExceptionfor this digest before it evaluates the wrong ornullworkflow.
Use
FULL_REQUEST_DIGESTand a workflow derived from the same tenant in each case. Then each case has exactly one invalid input.♻️ Proposed change
assertThatIllegalArgumentException() - .isThrownBy(() -> evidence("request-7", binding.requestDigest(), "publish:wrong")); + .isThrownBy(() -> evidence("request-7", FULL_REQUEST_DIGEST, "publish:wrong")); ... assertThatIllegalArgumentException() - .isThrownBy(() -> evidence("request-7", binding.requestDigest(), null)); + .isThrownBy(() -> evidence("request-7", FULL_REQUEST_DIGEST, null));new WorldDesignPublicationFenceEvidence( "firemud", new UUID(0L, 0L), CANONICAL_VERSION_ID, VERSION_IDENTITY_OPERATION_ID, - 42, + GAME_DESIGN_VERSION_ID, ... "request-7", validDigest(), 9, - validWorkflow())); + PublicationDigestRequestBinding.full( + new UUID(0L, 0L).toString(), + Long.toString(GAME_DESIGN_VERSION_ID), + "request-7") + .derivedWorkflowIdentity()));Also applies to: 113-131
- Accepted Trivial: verified workflow-negative cases use invalid digest and nil-tenant case uses other wrong binding, allowing unrelated guard to mask intended proof. Correct only test inputs; preserve production semantics.
- Lines 116-131: the tenant is
- Extract one shared file-backed mTLS guard for the five new opt-in clients.Trivial
Each client repeats the same
requireFileBackedMtls/requireReadableFilelogic, with only the label text changed. Each client also repeats the sameinit/close/requireStublifecycle. A security-relevant check that is copied five times can diverge without notice. Put the logic in one helper incommon.grpc, for exampleFileBackedMtls.require(tlsProperties, label), or in a smallAbstractOptInMtlsClientbase class.services/common-platform-core/src/main/java/net/firedevops/firemud/common/tenant/AuthoredWorldSourceClient.java#L125-L160: Replace the local validators with the shared helper.services/common-platform-core/src/main/java/net/firedevops/firemud/common/authoring/WorldAuthoredVersionIdentityClient.java#L126-L160: Replace the local validators with the shared helper.services/common-platform-core/src/main/java/net/firedevops/firemud/common/gamedesign/AuthoredWorldVersionStateClient.java#L125-L160: Replace the local validators with the shared helper.services/common-platform-core/src/main/java/net/firedevops/firemud/common/gamesession/CanonicalGameInstanceLaunchAssociationClient.java#L120-L154: Replace the local validators with the shared helper.services/common-platform-core/src/main/java/net/firedevops/firemud/common/tenant/WorldAuthoredSourceIntakeClient.java#L159-L195: Replace the local validators with the shared helper.
- Accepted Trivial: five new clients duplicate same readable-file mTLS preflight. Existing common.grpc.FileBackedGrpcMtlsPolicy.require already owns identical guard; reuse it, retain opt-in lifecycle/deadlines/namespace/peer restrictions, no new base class.
- Keep transient Game Design read failures retryable.Minor
This catch wraps every
RuntimeExceptionfromversionStateClient.readinInvalidIdentityEvidenceException. That includesStatusRuntimeExceptionwithUNAVAILABLEorDEADLINE_EXCEEDED.InvalidIdentityEvidenceExceptionextendsIllegalStateException, soWorldAuthoredVersionIdentityGrpcService(lines 95-99) maps it toFAILED_PRECONDITION. A temporary Game Design outage therefore reaches the Game Design caller as a terminal precondition failure, not as a retryable status. Rethrow transportStatusRuntimeExceptionunchanged, or map it toUNAVAILABLE. Wrap only the codec's invalid-evidenceIllegalStateException.Proposed fix
try { current = versionStateClient.read(currentRequest); + } catch (io.grpc.StatusRuntimeException transport) { + throw transport; } catch (RuntimeException exception) {Map
StatusRuntimeExceptionin the gRPC adapter, for example by forwardingUNAVAILABLEandDEADLINE_EXCEEDEDunchanged.- Accepted Minor: version-state transport StatusRuntimeException is wrapped as InvalidIdentityEvidence then mapped FAILED_PRECONDITION. Keep transient UNAVAILABLE/DEADLINE retryable without exposing remote descriptions; malformed evidence remains terminal/no writes.
- Hosted Review 1 CompletedRuntime 9m 15sFound: 7 Accepted: 0/4/1 Routed: 0
- Update the Active Gaps entry at Line 205 so it matches the new fail-closed seam.Minor
Line 178 now says the registered WMS handler fails closed, so no caller path applies typed mutations. The unchanged Active Gaps entry at Line 205 still says the "first typed revision-to-World handoff" is current and lists idempotent replay and epoch checks as present. Readers will conclude that the handoff is live. The tracking guideline requires that status, implementation record, and gaps "stay aligned when a domain boundary changes". State at Line 205 that the owner-local algorithm exists but the registered RPC denies every request.
As per coding guidelines: "Keep its status, implementation record, validation, gaps, decisions, and service-map sections aligned when a domain boundary changes."
- Accepted GDS Active Gaps still describes live typed mutation handoff; registered World handler now denies before read/dispatch. Align owning tracker, preserve owner-local algorithm and missing genuine authorization/freeze gaps.
- Correct the
--summary --jsonprojection description.MinorThe projection omits ancestor rows and detailed inventories, but it still returns pending and failed check names, observed checks, optional-check counts, and inventory status. Append a dated correction without rewriting the existing entry.
Suggested correction
+ - `<date>`: Correction to `--summary --json` projection + - Outcome: `--summary --json` retains readiness and verdict fields, omits ancestor rows and detailed check inventories, and retains reduced check data such as pending and failed names, observed checks, optional-check counts, and inventory status. + - Expected pattern: use `--summary --json` for routine identity and readiness; use full status, history, and routes for detailed check and finding/provenance drilldown.- Accepted Verified summary projection retains reduced checks/status counts. Append a dated clarification preserving previous entries and routine-versus-detail distinction.
- CodeRabbit summary-only outside-diff finding 1 of 1 (aggregate; no individual detail)Minor
summary-only aggregate; provider supplied no individual detail
- Accepted Verified WorldGR2.1/AR1.5 old Draft precheck/race bullet contradicts registered ingress denial before any read/dispatch. Align owning tracker to containment and missing durable freeze/epoch/fence/caller authorization, retaining target contract link.
- Do not turn transient Game Design transport failures into
FAILED_PRECONDITION.MinorThis
catch (RuntimeException)wraps every failure fromversionStateClient.readinInvalidIdentityEvidenceException. The wrapped failures includeStatusRuntimeExceptionwithUNAVAILABLEorDEADLINE_EXCEEDED.InvalidIdentityEvidenceExceptionextendsIllegalStateException.WorldAuthoredVersionIdentityGrpcService(Lines 95-99) therefore maps it to the genericFAILED_PRECONDITIONbranch. A Game Design caller sees a transient outage as a permanent precondition failure and has no retry signal.The sibling intake handler forwards
StatusRuntimeExceptionunchanged. The PR also maps lock timeouts toUNAVAILABLE. The association path is inconsistent with both.Fix: let
StatusRuntimeExceptionpropagate from this call. Then map it in the gRPC adapter.🐛 Proposed fix
--- "a/services/world-management-service/src/main/java/net/firedevops/firemud/worldmanagement/tenant/WorldAuthoredVersionIdentityService.java" +++ "b/services/world-management-service/src/main/java/net/firedevops/firemud/worldmanagement/tenant/WorldAuthoredVersionIdentityService.java" @@ -113,11 +113,13 @@ sourceOperationId, sourceEvidenceDigest, gameDesignVersionId); AuthoredWorldVersionStateEvidence current; try { current = versionStateClient.read(currentRequest); + } catch (io.grpc.StatusRuntimeException transportFailure) { + throw transportFailure; } catch (RuntimeException exception) { throw new WorldAuthoredVersionIdentityRepository.InvalidIdentityEvidenceException( "Game Design source-qualified Version identity evidence is unavailable or invalid", exception); }In
WorldAuthoredVersionIdentityGrpcService, add this branch beforecatch (RuntimeException failure):} catch (io.grpc.StatusRuntimeException upstream) { Status.Code code = upstream.getStatus().getCode(); deny( observer, code == Status.Code.UNAVAILABLE || code == Status.Code.DEADLINE_EXCEEDED ? Status.UNAVAILABLE : Status.FAILED_PRECONDITION, "Game Design Version evidence is unavailable");- Rejected Duplicate accepted CLI3 finding2, same version-state transport failure/422 source. Retryable safe-code fix and no-mutation/no-provider-detail tests already prepared; original CLI obligation retained, thread remains until verified fix publication.
- Avoid a full union scan of every tenant table while those tables are share-locked.Trivial
nextUnclaimedTenantKeyrunsMAX(occupied_key)over aUNION ALLof 16 tenant tables, the reservation table, and the association table. PostgreSQL does not push the min/max index optimization through aUNION ALLaggregate. Each fresh intake therefore reads every row ofroom,room_instance,world_event, and the other tenant tables.The scan runs after
LOCK_LEGACY_TENANT_TABLESacquiresSHAREmode. Every legacy writer stays blocked for the whole scan, and those writers have no 1-secondlock_timeoutcap. The blocking time grows with total world size.Two fixes are available:
- Since V23.1 and V27.2, every committed tenant row has a reservation row: V23.1 backfills existing rows and the trigger reserves new ones. While the locks are held,
MAX(tenant_key)on the reservation primary key is therefore sufficient. - If the extra tables are a deliberate defense against trigger bypass, compute
GREATESTover per-table scalarMAXsubqueries. Each subquery can then use itstenant_idindex.
♻️ Index-friendly allocation query
- private static final String MAX_OCCUPIED_TENANT_KEY = - "SELECT COALESCE(MAX(occupied_key), 0) FROM (" - + "SELECT tenant_id AS occupied_key FROM generation_rule UNION ALL " - ... - + ") AS occupied_tenant_keys"; + private static final String MAX_OCCUPIED_TENANT_KEY = + "SELECT GREATEST(0, " + + "(SELECT MAX(tenant_key) FROM world_authored_source_tenant_key_reservation), " + + "(SELECT MAX(local_tenant_key) FROM world_authored_source_tenant_association), " + + "(SELECT MAX(tenant_id) FROM generation_rule), " + // ... one scalar MAX subquery per protected tenant table ... + + "(SELECT MAX(tenant_id) FROM zone_instance))";Also applies to: 349-363
- Accepted MAX over18-table UNIONALL prevents independent MAX optimization while SHARE locks held. Preserve all18 source columns and lock protocol with scalarMAX/GREATEST plus outerCOALESCE; no reservation-only shortcut, negative/null change or allocator replacement.
- Since V23.1 and V27.2, every committed tenant row has a reservation row: V23.1 backfills existing rows and the trigger reserves new ones. While the locks are held,
- Record the final World proof gate and anchor the new focused tests.Minor
Line 13 records the
a9531a9…candidate: 262 World unit cases and 59 PostgreSQL cases, executed onfecf8ef…. The PR objective reports a later final gate on42296c26…with 263 unit cases and 61 freshly executed PostgreSQL cases. Only that gate covers the timeout rollback, the retry after writer commit, and the tighter caller timeout.runtime-and-data.mdLine 25 documents the one-second lock-wait limit and theUNAVAILABLEmapping. The tracker therefore cites no proof for a documented behavior. Update Line 13 with the final revision, the case counts, and the reuse caveats.The Line 37 proof-anchor list also omits
WorldDesignPublicationFenceEvidenceTest.javaandWorldPublicationOwnerBindingMigrationIntegrationTest.java. The second test is the only focused proof of V27.1's schema-0/null retention and its schema-1 check/foreign-key enforcement. Add both anchors.As per coding guidelines, "Keep its status, implementation record, validation, gaps, decisions, and service-map sections aligned" and "a historical broad test run does not substitute for focused proof."
Also applies to: 37-37
- Accepted World tracker lacks final422 263qualifiedunits/61freshPG timeout rollback/retry/tighter-limit proof and two focused test anchors. Add actual attributed proof/reuse limits; no runtime activation claim.
- Move the file-backed mTLS material validation into one shared helper.Trivial
Five new clients copy the same
requireFileBackedMtlsandrequireReadableFilelogic. Only the message prefix differs. A future policy change could be applied to some copies and missed in others. Add one helper, for exampleFileBackedMtlsMaterial.require(CommonGrpcClientProperties, String label), innet.firedevops.firemud.common.grpc, and call it from each constructor.services/common-platform-core/src/main/java/net/firedevops/firemud/common/tenant/AuthoredWorldSourceClient.java#L125-L160: replace both private validators with a call to the shared helper using label"Authored-world source reads".services/common-platform-core/src/main/java/net/firedevops/firemud/common/gamedesign/AuthoredWorldVersionStateClient.java#L125-L160: replace both private validators with the shared helper using label"Version-state reads".services/common-platform-core/src/main/java/net/firedevops/firemud/common/authoring/WorldAuthoredVersionIdentityClient.java#L126-L160: replace both private validators with the shared helper using label"World authored Version association".services/common-platform-core/src/main/java/net/firedevops/firemud/common/tenant/WorldAuthoredSourceIntakeClient.java#L159-L195: replace both private validators with the shared helper using label"World authored-source intake".services/common-platform-core/src/main/java/net/firedevops/firemud/common/gamesession/CanonicalGameInstanceLaunchAssociationClient.java#L120-L154: replace both private validators with the shared helper using label"Canonical launch association reads".
📍 Affects 5 files
services/common-platform-core/src/main/java/net/firedevops/firemud/common/tenant/AuthoredWorldSourceClient.java#L125-L160(this comment)services/common-platform-core/src/main/java/net/firedevops/firemud/common/gamedesign/AuthoredWorldVersionStateClient.java#L125-L160services/common-platform-core/src/main/java/net/firedevops/firemud/common/authoring/WorldAuthoredVersionIdentityClient.java#L126-L160services/common-platform-core/src/main/java/net/firedevops/firemud/common/tenant/WorldAuthoredSourceIntakeClient.java#L159-L195services/common-platform-core/src/main/java/net/firedevops/firemud/common/gamesession/CanonicalGameInstanceLaunchAssociationClient.java#L120-L154
- Rejected Duplicate accepted CLI3 finding4, same fiveclients/same422 source; fix is already prepared using existing FileBackedGrpcMtlsPolicy, Core471freshunits PASS. CLI obligation retained; resolve this thread only after published verified fix.
- CLI Review 4 CompletedRuntime 2m 39sFound: 4 Accepted: 0/3/1 Routed: 0
- Do not relay the upstream
StatusRuntimeExceptionunchanged.MinorintakeService.intakecallsAuthoredWorldSourceClient.read. That client propagates Game Design transport failures unchanged. This branch forwards that exception to the World caller, including the upstream status code, description, and trailers. This causes two problems:- An upstream code such as
PERMISSION_DENIEDorNOT_FOUNDfrom the Game Design read appears to come from the World intake decision. - Upstream descriptions and trailers cross the World boundary.
WorldAuthoredVersionIdentityGrpcService(Lines 96-107) already maps transport failures to fixed World-owned descriptions. The tracker also records "safe RPC errors without upstream descriptions or trailers." Use the same mapping here.🔒️ Proposed fix
- if (exception instanceof StatusRuntimeException statusException) { - responseObserver.onError(statusException); + if (exception instanceof StatusRuntimeException statusException) { + Status.Code code = statusException.getStatus().getCode(); + Status mapped = + code == Status.Code.UNAVAILABLE + ? Status.UNAVAILABLE.withDescription( + "Game Design authored-source read is temporarily unavailable") + : code == Status.Code.DEADLINE_EXCEEDED + ? Status.DEADLINE_EXCEEDED.withDescription( + "Game Design authored-source read timed out") + : Status.FAILED_PRECONDITION.withDescription( + "Game Design authored-source evidence is unavailable for intake"); + responseObserver.onError(mapped.asRuntimeException()); } else if (exception instanceof SecurityException) {As per path instructions: "Flag changes that violate documented FireMUD invariants, especially gRPC application-error handling, ownership boundaries, and failure-mode expectations."
- Accepted Minor: intake forwards upstream StatusRuntimeException descriptions/trailers/code verbatim unlike identity boundary. Map transient UNAVAILABLE/DEADLINE to safeWorld descriptions, othertransportcodesFAILED_PRECONDITION; preserve auth/localSQLmapping.
- An upstream code such as
- Correct the owner-local helper names.Minor
Line 62 states that the reads are "implemented by owner-local
AuthoredWorldVersionStateServiceandAuthoredWorldSourceReadGrpcServicehelpers."AuthoredWorldSourceReadGrpcServiceis the unregistered RPC adapter, not an owner-local helper. It reads directly fromGameAuthoredWorldSourceRepository. Line 159 describes the same class correctly as an adapter. The current wording conflicts with the next sentence about "Their RPC adapters" and with the gRPC index.📝 Proposed wording
-The first authored-world source-retention cut includes passive `GetAuthoredWorldVersionState` and `ResolveAuthoredWorldSource` reads for World Management, implemented by owner-local `AuthoredWorldVersionStateService` and `AuthoredWorldSourceReadGrpcService` helpers. Their RPC adapters are standalone and unregistered, ... +The first authored-world source-retention cut includes passive `GetAuthoredWorldVersionState` and `ResolveAuthoredWorldSource` reads for World Management, implemented by the owner-local `AuthoredWorldVersionStateService` and `GameAuthoredWorldSourceRepository`. Their RPC adapters (`AuthoredWorldVersionStateGrpcService` and `AuthoredWorldSourceReadGrpcService`) are standalone and unregistered, ...As per path instructions: "Review docs for canonical-current-state consistency. Flag ... conflicts between architecture docs."
- Accepted Minor: source-read RPC adapter directly reads GameAuthoredWorldSourceRepository; current doc wrongly calls adapter owner-local helper then mentions adapters separately. Name exactownerrepository/service and their two unregistered adapters.
- Assert exact per-version owner and attempt counts after both freezes.Trivial
The test captures
firstOwnerCount,secondOwnerCount,firstAttemptCount, andsecondAttemptCountafter bothclaimFreezecalls. It then only asserts thatreadAttemptdoes not change those captured values. The test never asserts the values themselves.The test name claims that each request uses only its own resolved World-local key. The second
gameDesignVersionIdintentionally equals the first identity'slocalVersionKey. Suppose a defect writes the second owner or attempt under the raw Game Design id. The rows can then join to the first identity. The counts become 2 forGAME_DESIGN_VERSION_Aand 0 forsecondGameDesignVersionId. This test still passes, because it compares each count only to itself.Line 271 is also tautological.
secondGameDesignVersionIdis assigned fromfirstIdentity.localVersionKey()on line 266.Assert that each count is exactly 1. Keep the read-only non-mutation checks.
♻️ Proposed assertion change
assertThat(secondFrozen.publicationFence()).isNotEqualTo(firstFrozen.publicationFence()); - long firstOwnerCount = ownerCount(canonicalTenantId, GAME_DESIGN_VERSION_A); - long secondOwnerCount = ownerCount(canonicalTenantId, secondGameDesignVersionId); - long firstAttemptCount = attemptCount(canonicalTenantId, GAME_DESIGN_VERSION_A); - long secondAttemptCount = attemptCount(canonicalTenantId, secondGameDesignVersionId); + assertThat(ownerCount(canonicalTenantId, GAME_DESIGN_VERSION_A)).isEqualTo(1L); + assertThat(ownerCount(canonicalTenantId, secondGameDesignVersionId)).isEqualTo(1L); + assertThat(attemptCount(canonicalTenantId, GAME_DESIGN_VERSION_A)).isEqualTo(1L); + assertThat(attemptCount(canonicalTenantId, secondGameDesignVersionId)).isEqualTo(1L); assertThat(repository.readAttempt(firstRequest)).contains(firstFrozen); assertThat(repository.readAttempt(secondRequest)).contains(secondFrozen); - assertThat(ownerCount(canonicalTenantId, GAME_DESIGN_VERSION_A)).isEqualTo(firstOwnerCount); - assertThat(ownerCount(canonicalTenantId, secondGameDesignVersionId)) - .isEqualTo(secondOwnerCount); - assertThat(attemptCount(canonicalTenantId, GAME_DESIGN_VERSION_A)).isEqualTo(firstAttemptCount); - assertThat(attemptCount(canonicalTenantId, secondGameDesignVersionId)) - .isEqualTo(secondAttemptCount); + assertThat(ownerCount(canonicalTenantId, GAME_DESIGN_VERSION_A)).isEqualTo(1L); + assertThat(ownerCount(canonicalTenantId, secondGameDesignVersionId)).isEqualTo(1L); + assertThat(attemptCount(canonicalTenantId, GAME_DESIGN_VERSION_A)).isEqualTo(1L); + assertThat(attemptCount(canonicalTenantId, secondGameDesignVersionId)).isEqualTo(1L);- Accepted Trivial: inspected alias-key collision PG case captures owner/attempt counts without requiring one each, so incorrectcross-version writes can pass. Assert exactoneeach before/afterread and remove tautology, retaining physicalread-only proof.
- Classify owner-storage failures before mapping them to
UNAVAILABLE.MinorBoth new Game Design adapters map permanent data-access failures to
UNAVAILABLE. These include integrity violations, bad SQL, and schema drift. World Management treatsUNAVAILABLEas retryable. A permanent owner-storage defect therefore causes repeated retries and appears as a transient outage. Map only transient failures toUNAVAILABLE:TransientDataAccessException,DataAccessResourceFailureException, and SQLSTATE08xxx. Map all other data-access failures toINTERNALwith a fixed description.services/game-design-service/src/main/java/net/firedevops/firemud/gamedesign/service/impl/AuthoredWorldSourceReadGrpcService.java#L92-L97: applyhasConnectionFailureSqlStateto the jOOQDataAccessExceptionbranch. ReturnINTERNALwhen the SQLSTATE is not class08.services/game-design-service/src/main/java/net/firedevops/firemud/gamedesign/service/impl/AuthoredWorldVersionStateGrpcService.java#L81-L85: split the combined Spring and jOOQDataAccessExceptioncatch. Map transient and08xxxfailures toUNAVAILABLEand other failures toINTERNAL.
As per path instructions: "Flag changes that violate documented FireMUD invariants, especially gRPC application-error handling ... and failure-mode expectations."
- Accepted Minor: both GDS passive read adapters classify permanentSQL/integrity/schema errorsUNAVAILABLE, causingfalse retry signal. Retain Springtransient/resource and SQL08 connection retryability; otherSpring/jOOQ DataAccess failuresINTERNAL withsafeerrors.
- Hosted Review 2 CompletedRuntime 11m 02sFound: 3 Accepted: 0/0/1 Routed: 0
- Do not map every storage failure to
UNAVAILABLE.MinorThis catch maps every Spring and jOOQ
DataAccessExceptiontoUNAVAILABLE. That includes permanent failures such asBadSqlGrammarException(SQLSTATE42P01) andDataIntegrityViolationException. The caller receives a retry signal for a failure that will not clear on retry.The sibling
WorldAuthoredSourceIntakeGrpcService.respondWithOwnerFailurealready makes this distinction. It returnsUNAVAILABLEonly for connection, lock-timeout, and deadlock SQLSTATEs (08*,55P03,40P01) or forTransientDataAccessException/DataAccessResourceFailureException, and it returnsINTERNALfor other storage failures. The Game Design source-read adapter follows the same rule. Use the same classification here so that both World passive adapters return the same status codes.🐛 Proposed fix
--- "a/services/world-management-service/src/main/java/net/firedevops/firemud/worldmanagement/tenant/WorldAuthoredVersionIdentityGrpcService.java" +++ "b/services/world-management-service/src/main/java/net/firedevops/firemud/worldmanagement/tenant/WorldAuthoredVersionIdentityGrpcService.java" @@ -90,9 +90,17 @@ deny(observer, Status.PERMISSION_DENIED, "World Version association authorization denied"); } catch (IllegalArgumentException invalid) { deny(observer, Status.INVALID_ARGUMENT, "World Version association input is invalid"); - } catch (org.springframework.dao.DataAccessException - | org.jooq.exception.DataAccessException unavailable) { - deny(observer, Status.UNAVAILABLE, "World Version association storage unavailable"); + } catch (org.springframework.dao.DataAccessResourceFailureException + | org.springframework.dao.TransientDataAccessException transientFailure) { + deny(observer, Status.UNAVAILABLE, "World Version association storage unavailable"); + } catch (org.springframework.dao.DataAccessException + | org.jooq.exception.DataAccessException storageFailure) { + deny( + observer, + hasUnavailableSqlState(storageFailure) ? Status.UNAVAILABLE : Status.INTERNAL, + hasUnavailableSqlState(storageFailure) + ? "World Version association storage unavailable" + : "World Version association storage could not complete the request"); } catch (StatusRuntimeException transportFailure) { Status.Code code = transportFailure.getStatus().getCode(); if (code == Status.Code.UNAVAILABLE) {Add a
hasUnavailableSqlStatehelper that matches the intake adapter. You can also extract both copies into one shared helper.- Rejected Duplicate accepted CLI5 finding1 same adapter/classification. Two-file fix already prepared and locally passed268unit61PG/static/docs, pending combined publication. No additional useful work; retained source link, resolve this thread only after correction is published.
- Throw
onErrorfailures outside the observer callback.TrivialLine 137 throws
AssertionErrorinsideonError. The handler can callonErrorfrom atryblock that catchesThrowableorRuntimeException. In that case the assertion is lost or becomes a different failure. The digest helper at lines 89-113 records the error and throws it after the call. Use the same pattern here.Proposed fix
AtomicReference<ApplyWorldDesignMutationResponse> ref = new AtomicReference<>(); + AtomicReference<Throwable> error = new AtomicReference<>(); ... public void onError(Throwable t) { - throw new AssertionError("Draft mutation RPC failed", t); + error.set(t); } ... + if (error.get() != null) { + throw new AssertionError("Draft mutation RPC failed", error.get()); + } return ref.get();- Rejected Current applyWorldDesignMutation emits app-error via onNext then completes; never calls onError and has no try/catch to swallow callback AssertionError. Suggested observer style covers hypothetical future handler, no current lost assertion. Existing direct failure remains explicit.
- Use the typed
PlayableStateScopeenum instead of a string field.TrivialGetCanonicalGameInstanceLaunchAssociationResponse.playable_state_scopeis astring. The same service already exposes this concept asentity_management.v1.PlayableStateScopeinGetInitialAdmissionBindProofResponse(field 6). The World consumer (WorldCompleteLaunchBindingService.requireGameSessionBinding) compares the decoded value withRealmEntryPolicy.StateScope.SHARED. A free-form string therefore needs codec-side parsing and can carry casing or spelling variants that a closed enum rejects at the schema level.This message is new and has no registered producer in this change. You can still change field 12 to the enum without a wire-compatibility break. After a producer ships, the change becomes a breaking contract change.
♻️ Proposed change
--- "a/protos/game-session/v1/game_session_service.proto" +++ "b/protos/game-session/v1/game_session_service.proto" @@ -634,7 +634,7 @@ string descriptor_result_digest = 9; string release_attestation_evidence_digest = 10; string playable_state_namespace_id = 11; - string playable_state_scope = 12; + entity_management.v1.PlayableStateScope playable_state_scope = 12; // Current Game Session row projection only; World lifecycle authority remains separate. string current_game_instance_status = 13; int64 current_row_version = 14;Update
CanonicalGameInstanceLaunchAssociationReadGrpcCodecso that it maps the enum. The codec must rejectPLAYABLE_STATE_SCOPE_UNSPECIFIED.- Accepted New unregistered launch-association reply uses string unlike sibling typed PlayableStateScope. Converge field12 to existing enum and strict codec mapping; preserve SHARED-only proof and reject unspecified/unknown/isolated values. Three owned files, no producer/activation/SQL.
- CLI Review 5 CompletedRuntime 3m 44sFound: 3 Accepted: 0/1/0 Routed: 0
- Classify storage failures by SQL state instead of reporting all of them as
UNAVAILABLE.MinorThis catch maps every Spring and jOOQ
DataAccessExceptiontoUNAVAILABLE. That includes permanent failures, such as SQL state23505or42P01, and data-integrity violations. A Game Design caller then treats a permanent failure as retryable and retries a request that cannot succeed. The sibling adapters avoid this.WorldAuthoredSourceIntakeGrpcService,AuthoredWorldSourceReadGrpcService, andAuthoredWorldVersionStateGrpcServicereturnUNAVAILABLEonly for08xxx/55P03/40P01or transient/resource exceptions, and returnINTERNALfor other failures. Use the same classification here.♻️ Proposed fix
- } catch (org.springframework.dao.DataAccessException - | org.jooq.exception.DataAccessException unavailable) { - deny(observer, Status.UNAVAILABLE, "World Version association storage unavailable"); + } catch (org.springframework.dao.DataAccessException + | org.jooq.exception.DataAccessException storageFailure) { + if (storageFailure instanceof org.springframework.dao.TransientDataAccessException + || storageFailure instanceof org.springframework.dao.DataAccessResourceFailureException + || hasUnavailableSqlState(storageFailure)) { + deny(observer, Status.UNAVAILABLE, "World Version association storage unavailable"); + } else { + deny(observer, Status.INTERNAL, "World Version association storage could not complete the request"); + }- Accepted Verified association adapter marks every Spring/jOOQ storage failure retryable. Classify transient/resource and SQL08/55P03/40P01 unavailable, permanent others INTERNAL; preserve safe messages, peer/input/transport guards. Two-file fix with focused regression cases.
- Confirm that
tenantidisNOT NULLin all 16 legacy tables.MajorConfirm that `tenant_id` is `NOT NULL` in all 16 legacy tables.
tenant_keyis the primary key ofworld_authored_source_tenant_key_reservation, so it cannot be NULL. The backfill at lines 46-65 runsSELECT DISTINCT tenant_idover all 16 tables. The trigger at lines 75-81 insertsNEW.tenant_idfor every row write. V24 and V27.2 keep the same insert. Suppose a table allows NULLtenant_idand a retained database has such a row. ThenV23.1fails with a not-null violation and blocks the deployment. Every later insert or tenant update with a NULLtenant_idalso fails. Fresh-schema tests cannot detect this. Check theV1–V23schema for every table in this list. If anytenant_idcolumn is nullable, either filterWHERE tenant_id IS NOT NULLin the backfill and the trigger, or add an explicit fail-closed precheck with a clear error.Also applies to: 75-81
- Rejected Verified all16 tenant_id BIGINT NOT NULL beforeV23.1: regionV1; zone/room/instanceV2; generationV5; exitsV4; instancesV12/14/15; ledger/epochsV19; spawnV20; eventV3 rebuiltV16. No DROP NOT NULL throughV23. Null rows contradict canonical schema. Protected SQL unchanged.
- Merge the compact-output entry and its two same-day corrections into one entry.Minor
The
2026-10-13entry "Compact selected-PR JSON still includes large inventories" is new in this change. Two other new entries in the same change disprove it and then clarify it: "Follow-up to compact selected-PR output" and "Clarification of the summary status projection". The append-only rule protects prior entries. It does not require keeping a disproved entry that was added in the same work. The file instructions say: "Only keep entries whose lesson still matters after the immediate task is done." The reusable lesson here is: "use--summary --jsonfor routine readiness, and use detailed views for drilldown". Replace the three entries with one entry in the standard Context/Observation/Expected pattern format. This keeps the inbox moving toward zero, as the file intends.- Rejected AGENTS and observations require append-only ordinary work. Published entries and corrections retain provenance; no human health check/stewardship assigned. Accurate summary lesson already present. Consolidation violates standing preservation; no contract improvement.
- CLI Review 6 CompletedRuntime 3m 01sFound: 1 Accepted: 0/1/0 Routed: 0
- Remove the remaining claims that
SaveRevisionapplies a World mutation.MinorThe registered
ApplyWorldDesignMutationhandler now returns an error-onlyFAILED_PRECONDITIONbefore it parses the request or dispatches it. No caller path through this RPC applies a World mutation. Several unchanged lines in the canonical contract and in the tracker still describe a live apply path or a proven handoff.design/project-management/implementation-tracking/game-authoring-publishing-and-activation.md#L205-L205: keep this as the authoritative gap statement and make the rows below agree with it.design/project-management/implementation-tracking/game-authoring-publishing-and-activation.md#L49-L49: remove "the bounded current path" for the typed revision-to-World generation mutation. State that the registered ingress fails closed.design/project-management/implementation-tracking/game-authoring-publishing-and-activation.md#L67-L67: requalify theAR-1.1provenclaim and the implementation-anchor wording as owner-local mutation-algorithm proof only.design/project-management/implementation-tracking/game-authoring-publishing-and-activation.md#L199-L199: replace "the first World mutation handoff" with the closed-ingress status.design/architecture/microservices/game-design-service/api-contracts.md#L93-L95: mark the World apply, epoch advance, ledger, andNO_OP_ALREADY_APPLIEDreplay analysis as historical or owner-local. State that the registered ingress currently denies every request.design/architecture/microservices/game-design-service/api-contracts.md#L106-L106: state that the optional World mutation is currently rejected by World Management.design/architecture/microservices/game-design-service/api-contracts.md#L160-L160: remove "can return the typed result of an applied world-design mutation" or qualify it as target-only.
As per path instructions: "Review docs for canonical-current-state consistency. Flag obsolete transitional guidance, conflicts between architecture docs." As per coding guidelines: "Keep its status, implementation record, validation, gaps, decisions, and service-map sections aligned when a domain boundary changes."
- Accepted Verified unqualified SaveRevision/live World mutation claims remain in GDS API and AR1.1 row despite registeredWorld ingress unconditional fail-closed. Align two owned docs to owner-local algorithm proof/current denial; preserve target contract/other domain proof and explicit gaps.
Routed Findings
No routes recorded
Unlinked items
no items unlinked