PR #3125 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
- Subagent Review 1 CompletedModel: gpt-6-luna · XhighFound: 0 Accepted: 0 Routed: 0
- No findings recorded for this run
- Subagent Review 2 CompletedModel: gpt-6-luna · XhighFound: 1 Accepted: 1 Routed: 0
- Distinguish target plugin launch schema from implemented canonical authored-world wireMinor
game-templates.md:223-224; proto request347-359 and LaunchDescriptor595-610. Static doc contract correction, no runtime change.
- Accepted Current illustrative ResolveLaunchDescriptor schema omits required canonical tenant/world/source binding and mixes target-only plugin rollback fields. Clarify implemented wire vs target contract without weakening accepted plugin design.
- Subagent Review 3 CompletedModel: gpt-6-luna · XhighFound: 1 Accepted: 1 Routed: 0
- Ordinal selection can silently select a different actor after the displayed roster changesMinor
Whole 106-path read-only pass covered launch descriptor and release binding, actual Game Session catalog and association/route evidence, Entity roster client/owner-read boundary, ordinal selection and original assignment read, contracts and trackers. No validation executed; default-off non-admitting composition and Account/World/admission/live proof gaps remain.
- Accepted The selection menu must return its exact snapshot identity and later ordinal submission must bind that identity; a changed roster must reject or refresh, never reinterpret the prior ordinal.
- Subagent Review 4 CompletedModel: gpt-6-luna · XhighFound: 1 Accepted: 1 Routed: 0
- Malformed runtime flags can be sealed into a successful launch descriptorMinor
Fresh whole106path static review completed. Requested nonJSON text with empty default currently passes text-only evidence validation. Full Game Design launch/read/release and real Game Session catalog/association/route/roster/ordinal/assignment boundary inspected; no validation executed, no runtime closure claimed.
- Accepted ResolveLaunchDescriptor must reject malformed requested or template runtime-flags JSON before persisting a descriptor; preserve exact source binding and non-admitting behavior.
- Hosted Review 1 CompletedRuntime 6m 50sFound: 10 Accepted: 0/7/3 Routed: 0
- Check the menu identity before you resolve the ordinal.Minor
Right now the service resolves the ordinal before it compares
expectedMenuIdentitywith the refreshed snapshot.Example: a player saw a menu with three actors and submits
"3". The roster now has two actors.CanonicalGameplayActorSelection.selectreturnsSELECTOR_OUT_OF_RANGE, so the service never reaches theSTALE_MENU_IDENTITYcheck. The same thing happens when the ordinal is malformed. The player is told their choice is invalid when the real problem is that the menu is stale.The service already accepts only a menu-bound ordinal. Check
MISSING_MENU_IDENTITYandSTALE_MENU_IDENTITYfirst, then callselect.Proposed reorder
+ if (selector != null && !selector.isBlank()) { + if (expectedMenuIdentity == null) { + return new Denied(Denial.MISSING_MENU_IDENTITY); + } + if (!expectedMenuIdentity.matches(snapshot)) { + return new Denied(Denial.STALE_MENU_IDENTITY); + } + } CanonicalGameplayActorSelection.SelectionResult selection = CanonicalGameplayActorSelection.select(validated.orElseThrow(), selector); @@ - if (selector != null && !selector.isBlank()) { - if (expectedMenuIdentity == null) { - return new Denied(Denial.MISSING_MENU_IDENTITY); - } - if (!expectedMenuIdentity.matches(snapshot)) { - return new Denied(Denial.STALE_MENU_IDENTITY); - } - }If you reorder, update the expected denials in
CanonicalGameplayRosterSelectionServiceTest. The case at Line 252 ("Pilot Two"with anullidentity) and the case at Line 258 ("3"with anullidentity) will then returnMISSING_MENU_IDENTITY. Either pass the menu identity in those cases or change the expected reason.- Accepted Menu identity checked after ordinal parse; stale smaller roster reports out-of-range. Require matching menu identity before resolving nonblank selector.
- Assert the denial reason for the allowed-peer probes.Trivial
For the resolve and descriptor-read calls, the mocks throw probe exceptions. The test only checks that a response exists. A response that carries
PERMISSION_DENIEDafter the owner call still passes, butverify(...)covers that case. The test does not assert that the response error is the mapped probe outcome and notPERMISSION_DENIED. AddassertThat(resolve.response().getError().getCode()).isNotEqualTo("PERMISSION_DENIED")and the same check fordescriptorRead. This change makes the authorization outcome explicit.Based on learnings: tests for identity-sensitive operations must assert the fields that determine the authorization outcome.
- Accepted Allowed-peer probes reach owner mocks but do not assert response authorization outcome; add explicit non-PERMISSION_DENIED evidence.
- Map only transport status codes to the
*_UNAVAILABLEdenials.MinorBoth catch blocks turn every
StatusRuntimeExceptionintoROSTER_UNAVAILABLEorASSIGNMENT_UNAVAILABLE. That includes permanent owner results:- The architecture contract says Entity returns
FAILED_PRECONDITIONwhen the policy is notPRESEEDED_ONLY. CanonicalGameplayRosterClientTestLine 577 usesFAILED_PRECONDITIONwith "roster snapshot changed".PERMISSION_DENIEDandINVALID_ARGUMENTare also caught here.
A caller then sees a retryable unavailable result for a stale or denied state. Retrying with the same snapshot does not help. Map
UNAVAILABLEandDEADLINE_EXCEEDED(and possiblyRESOURCE_EXHAUSTED) to*_UNAVAILABLE. MapFAILED_PRECONDITIONto a stale or changed denial, and map the other codes toINVALID_*_PROOF.routeFailureat Line 155 has the same broad mapping.As per path instructions, the review must flag violations of "gRPC application-error handling … and failure-mode expectations".
Also applies to: 122-126
- Accepted Broad gRPC catch mislabels permanent/stale authority as transient unavailable. Classify transport codes and preserve stale/invalid denials.
- The architecture contract says Entity returns
- Add the selection boundary to the AA-2.1 capability row.Minor
This status entry records a new selection service and focused proof, but the AA-2.1 row does not name the new selection production or test anchors. Add those anchors and the remaining activation gap to that row. Keep its
partialrating.As per coding guidelines, “the capability rows are the complete scan-first status surface,” and “
implementedandpartialrows name concrete production anchors.”- Accepted AA2.1 capability row omits current selection production/test anchors and activation gap; add exact anchors, retain partial rating.
- Handle a roster-bound retry before assignment binding.Minor
The new retry branch assumes
boundAssignmentUuidandboundIntentDigestexist. The new-selection branch binds the roster snapshot before it binds either value. If execution stops between those bindings, a retry enters this branch without an assignment reference to compare. Define separate roster-bound and assignment-bound retry states, or commit the selection bindings as one durable step.As per path instructions, “Review docs for canonical-current-state consistency.”
- Accepted Retry pseudocode requires assignment bindings during a roster-only partial retry. Distinguish roster-bound and assignment-bound stages while retaining original tuple evidence.
- Check stored request ID compatibility.Minor
CanonicalInitialAdmissionRepositoryreconstructsCanonicalInitialAdmissionRequestfrom persisted data. If any storedinitialAdmissionRequestIdvalue contains 121–128 code points, the new 120-code-point validation throwsIllegalArgumentExceptionduring reconstruction.Confirm that every storage column is limited to 120 code points or fewer and that no existing producer can create a longer value.
- Accepted Valid storage-width regression: V9 widens immutable pointer audit to128 and V34.3 widens initial intent to128. New DTO120 guard rejects retained121-128 IDs; align128 and prove bounds/readback.
- Remove or differentiate the duplicate denial test.Trivial
completeLaunchBindingDeniesCandidateBeforeTypedOwnerOutcomedoes not stubcompleteLaunchBindingService. Because of this, it does not set up a typed owner outcome. The test is therefore the same asgetCompleteLaunchBindingDeniesCandidateBeforeOwnerRead(Line 1167). Stub the owner service with a typed outcome to match the test name, or delete the test.- Accepted Duplicate denial test claims typed owner outcome without setting one up. Remove duplicate and retain existing deny-before-owner coverage.
- Separate invalid or rejected Game Design policy reads from unavailability.Minor
The client uses
IllegalStateExceptionfor two cases: an invalid owner response and an uninitialized stub. The reader then treats everyStatusRuntimeExceptionand everyIllegalStateExceptionasGameDesignUnavailableException.CanonicalGameplayRosterOwnerReadGrpcAdaptermaps that exception toStatus.UNAVAILABLE. As a result, Entity gets a retryable status for denied or invalid owner evidence. It does not getFAILED_PRECONDITION.services/game-session-service/src/main/java/net/firedevops/firemud/gamesession/service/CanonicalPublishedPlayerRouteReadService.java#L297-L307: map only the transient gRPC codes (UNAVAILABLE,DEADLINE_EXCEEDED,RESOURCE_EXHAUSTED,ABORTED) and the uninitialized client toGameDesignUnavailableException. Map other status codes and invalid responses toInvalidAuthorityException.services/game-session-service/src/main/java/net/firedevops/firemud/gamesession/client/GameDesignPublishedRealmPolicyClient.java#L87-L92: throw a dedicatedInvalidResponseExceptionfor codec rejections instead of a genericIllegalStateException.
📍 Affects 2 files
services/game-session-service/src/main/java/net/firedevops/firemud/gamesession/service/CanonicalPublishedPlayerRouteReadService.java#L297-L307(this comment)services/game-session-service/src/main/java/net/firedevops/firemud/gamesession/client/GameDesignPublishedRealmPolicyClient.java#L87-L92
- Accepted Malformed/denied policy evidence and uninitialized client share generic ISE/unavailable mapping. Distinguish invalid response and nontransient status from true transport failures.
- Assert the exact denial status and error code.Trivial
isGreaterThanOrEqualTo(400)also passes for a 500 from an unrelated crash. With that assertion, the test cannot show that the numeric selector caused the denial. Assert the specific HTTP status the service returns for thisIllegalArgumentExceptionpath. Also assert that the response body containsFAILED_PRECONDITION.Proposed assertion
--- "a/services/game-session-service/src/test/java/integration/net/firedevops/firemud/gamesession/GameSessionApplicationIntegrationTest.java" +++ "b/services/game-session-service/src/test/java/integration/net/firedevops/firemud/gamesession/GameSessionApplicationIntegrationTest.java" @@ -131,7 +131,8 @@ .build(), HttpResponse.BodyHandlers.ofString(StandardCharsets.UTF_8)); - assertThat(response.statusCode()).isGreaterThanOrEqualTo(400); + assertThat(response.statusCode()).isEqualTo(400); // confirm the mapped status + assertThat(response.body()).contains("FAILED_PRECONDITION"); assertThat(gameInstanceRepository.findAll()).hasSize(existingGameInstances); org.mockito.Mockito.verifyNoInteractions(worldManagementClient); }- Accepted Broad HTTP>=400 assertion accepts unrelated500. Assert intended400/FAILED_PRECONDITION and retain no-world-call/no-mutation proof.
- Align the isolated-selection proof status.Minor
This paragraph says the isolated-selection proof is unrun. The current-status entry in
design/project-management/implementation-tracking/player-access-and-session.mdsays focused local proof passed for the selection composition. State which tests ran and keep any other unrun route, client, or guard proof separate.As per coding guidelines, “Keep its status, implementation record, validation, gaps, decisions, and service-map sections aligned when a domain boundary changes.”
- Accepted Tracker incorrectly labels exercised isolated-selection proof unrun; align bounded proof and its limits with Player Access status.
- CLI Review 1 CompletedRuntime 2m 53sFound: 9 Accepted: 0/4/5 Routed: 0
- Stub the route counters so that the stale-pointer test checks the pointer.Trivial
fixture()does not stubroute.catalogRevision(),route.pointerVersion(), orroute.activeWorldEpoch(). On the Mockito mock, all three return0L.exactRequest(0L, 0L, 0L)sends1Lfor each counter, so even the baseline request mismatches all three counters.tenantSelectorOwnerReadRejectsChangedCanonicalSelectorOrCounterBeforeGameDesigntherefore passes even if the pointer-version comparison is removed. The catalog-revision mismatch and the epoch mismatch still throwStaleAuthorityException. ThereadCurrent(Request)path also has no passing test.Stub the three counters to
1L. Then the exact request matches, and each delta isolates one counter. Add one case per counter, and one positive case that reacheslistPublishedRealmEntryPolicies.♻️ Proposed change
when(route.canonicalVersionId()).thenReturn(VERSION); + when(route.catalogRevision()).thenReturn(1L); + when(route.pointerVersion()).thenReturn(1L); + when(route.activeWorldEpoch()).thenReturn(1L);@Test void tenantSelectorOwnerReadRejectsEachChangedCounterBeforeGameDesign() { for (long[] deltas : new long[][] {{1L, 0L, 0L}, {0L, 1L, 0L}, {0L, 0L, 1L}}) { var f = fixture(); when(f.routeReader().readCurrentTarget(TENANT)).thenReturn(f.route()); assertThatThrownBy( () -> f.service().readCurrent(exactRequest(deltas[0], deltas[1], deltas[2]))) .isInstanceOf(CanonicalPublishedPlayerRouteReadService.StaleAuthorityException.class); verify(f.policyClient(), never()).listPublishedRealmEntryPolicies(TENANT, VERSION); } }Also applies to: 216-226
- Accepted Unstubbed baseline counters0 differ from request1, masking isolated stale-pointer proof. Stub matchingbaseline, independently vary eachcounter and prove positive owner read.
- Fix the "current-contract" examples. They contradict the new wire contract.Minor
Line 226 says
ResolveLaunchDescriptorRequestis source-qualified bycanonical_tenant_id,world_slug,authored_world_source_operation_id, andexpected_authored_world_source_evidence_digest. It also says plugin selection is not part of the current wire contract. The unchanged text at Line 250 still calls the examples below "current-contract examples". Those example requests omit all four source fields. They also includerequestedPluginSelection,pluginSelectionMode, andenabledPluginVersions, which are target-only.Fix one of the two:
- Mark the examples as target-only illustrations.
- Add the source-qualified fields and remove the plugin fields from the current examples.
As per path instructions: "Flag obsolete transitional guidance, conflicts between architecture docs".
- Accepted Examples claim current wire while using target-only plugin/rollback fields and omitting source qualification. Label existing conceptual extension examples target-only and link current wire owner.
- Make the Entity handler status consistent across documents.Minor
Line 78 says the selection composition "consumes the existing Entity methods". Line 39 of this document says the Entity
CanonicalGameplayRosterServicewire "currently has no handler or activation".design/architecture/microservices/entity-management-service/api-contracts.mdLines 9 and 46 say the same. The player-access tracker (Line 9) also refers to "Existing Entity-side owner handling and proof". A reader cannot tell whether an Entity handler exists. State that Game Session calls the Entity wire contract, and that no Entity handler exists yet. Alternatively, if a handler exists, update the Entity contract.Proposed wording
-... It rereads the exact published route after each Entity read and returns only a selection menu, denial, or Entity's original assignment reference. This source-only composition consumes the existing Entity methods but does not establish membership or admission, ... +... It rereads the exact published route after each Entity read and returns only a selection menu, denial, or Entity's original assignment reference. This source-only composition calls the Entity `CanonicalGameplayRosterService` wire contract, which has no Entity handler yet; it does not establish membership or admission, ...As per path instructions: "Flag ... conflicts between architecture docs".
- Accepted GS source wording implies implemented Entity methods while this parent only contains wire. Clarify wire consumer and absent current handler/activation, retain nonadmitting scope.
- Use separate UUIDs for the source registration request, the source operation, and the intake operation.Trivial
sourceReceiptpassessourceOperationIdin the registration-request position ofAuthoredWorldSourceDigest.requestDigestand of theAuthoredWorldSourceEvidenceconstructor. It passesintakeOperationIdin the source-operation position. It then usesintakeOperationIdagain as theIntakeReceiptoperation ID.The source operation ID and the intake operation ID are therefore the same value. If production code compares or swaps these two identifiers by mistake, these tests do not detect it.
CanonicalGameplayRosterSelectionServiceTestuses separate UUIDs for these fields.Add a distinct
sourceRegistrationRequestId. PasssourceOperationIdin the source-operation position.- Accepted Source fixture conflates registration/source/intake operation IDs. Use distinct identities in their canonical digest/constructor roles.
- Make the aborted-proof test use an aborted proof.Trivial
abortedCurrentOwnerProofFailsWithoutReadingLaunchAssociationstubsreadCurrentOpenSnapshotForRealmto throwIllegalStateException.missingCurrentOpenOwnerProofFailsWithoutReadingLaunchAssociationdoes the same thing. Only the message text differs, so both tests run the same failure path.As a result, no test checks that
CanonicalPlayerRouteReadServicerejects these proofs:- a returned proof whose
Outcomeis notCOMMITTED - a returned proof with
positiveDurableAbort == true
If that check regresses, an aborted owner proof can produce a playable route, and these tests still pass. Return a
CurrentOpenSnapshotthat contains an aborted proof. Then assertInvalidAuthorityExceptionand assert that no launch read occurs.♻️ Proposed change
- when(admissionRepository.readCurrentOpenSnapshotForRealm(NAMESPACE, TENANT, REALM)) - .thenThrow(new IllegalStateException("Current OPEN pointer has no committed proof")); + CanonicalInitialAdmissionOwnerProof committed = committedProof(7L); + CanonicalInitialAdmissionOwnerProof aborted = + new CanonicalInitialAdmissionOwnerProof( + CanonicalInitialAdmissionOwnerProof.Outcome.ABORTED, // use the actual non-committed constant + REQUEST_ID, "a".repeat(64), NAMESPACE, TENANT, "demo-world", REALM, + PLAYABLE_NAMESPACE, "SHARED", INSTANCE, VERSION, 82L, 1L, + OriginKind.NO_PRIOR_POINTER, null, + committed.holdId(), committed.holdFence(), committed.holdBindingDigest(), + 7L, 27L, "sha256:" + "f".repeat(64), true, + Instant.parse("2026-10-07T00:00:00Z")); + when(admissionRepository.readCurrentOpenSnapshotForRealm(NAMESPACE, TENANT, REALM)) + .thenReturn(currentOpenSnapshot(aborted));- Accepted Aborted test only throws generic repository error. Prove real valid ABORTED value rejected by existing CurrentOpenSnapshot guard and reader before launch; never fabricate invalid OPEN snapshot.
- a returned proof whose
- Remove the duplicate
PERMISSIONDENIEDroster case.TrivialRemove the duplicate `PERMISSION_DENIED` roster case.
Lines 525-536 check that
PERMISSION_DENIEDfromlistPreseededRostermaps toINVALID_ROSTER_PROOF. The loop at lines 538-550 checks the same status and the same denial again. Delete the separate block so that each status mapping has one owner.- Accepted Standalone PERMISSION_DENIED roster case duplicates the following status-loop proof; retain loop and remove duplicate.
- Use different UUIDs for the default canonical version ID and the route realm ID.Trivial
fixture(PolicySpec...)uses22222222-2222-4222-8222-222222222222as the defaultcanonicalVersionId.canonicalPublishedRoute()uses the same UUID asrealmId(line 248). It then setscanonicalVersionIdfromfixture.target().canonicalVersionId().In every test that uses
canonicalPublishedRoute(), the realm ID and the canonical version ID are therefore equal. Examples areCanonicalGameplayRosterSelectionServiceTestand the roster snapshot target. A swap of these two arguments in route reads, policy reads, or roster target construction passes those tests.Use a unique UUID for the default canonical version.
♻️ Proposed change
return fixture( uuid("11111111-1111-4111-8111-111111111111"), - uuid("22222222-2222-4222-8222-222222222222"), + uuid("55555555-5555-4555-8555-555555555551"), 19L,Also applies to: 239-256
- Accepted Fixture default canonicalVersion equals realm UUID, masking identifier swaps. Use distinct default version identity without changing other fixture defaults.
- State that
GetCompleteLaunchBindingcurrently denies every call.MinorLine 17 says this method authenticates candidate peers and then returns
PERMISSION_DENIEDbefore request validation or owner reads. The index entries at Line 147 and Line 227 describe a working read that returns the descriptor and the release attestation. Other entries in this index mark their target-only status, for exampleCompareAndSetVersionState. Add the same qualifier here so the index matches current state.Proposed wording
-- `GetCompleteLaunchBinding` – returns that exact descriptor together with its matching full-version release attestation and artifact/manifest evidence; it does not infer or authorize runtime admission. +- `GetCompleteLaunchBinding` – **Target state:** returns that exact descriptor together with its matching full-version release attestation and artifact/manifest evidence; it does not infer or authorize runtime admission. The current handler authenticates the candidate peer and then returns `PERMISSION_DENIED` before request validation or owner reads.As per path instructions: "Review docs for canonical-current-state consistency."
Also applies to: 227-227
- Accepted GetCompleteLaunchBinding index entries imply working production read despite current deny-before-owner handler. Mark target behavior and state current exactpeer authentication/denial.
- Define or remove "published A/B/C dependencies".Minor
This is the canonical architecture document, and it does not define "A/B/C". A reader cannot tell which dependencies block validation. Name the dependencies or link the tracker section that defines them. Validation status belongs in the implementation tracker, so a link is the smaller change.
Proposed wording
-The canonical authored-world launch slice includes source-qualified ResolveLaunchDescriptor, exact independent GetLaunchDescriptor, and GetCompleteLaunchBinding returning descriptor and release-attestation evidence separately. Game Session's evidence-only preparation and focused proof sources are present, but validation is deferred until published A/B/C dependencies are integrated. Numeric launch selectors are non-authorizing. +The canonical authored-world launch slice includes source-qualified ResolveLaunchDescriptor, exact independent GetLaunchDescriptor, and GetCompleteLaunchBinding returning descriptor and release-attestation evidence separately. Implementation and proof status is recorded in the [authoring implementation tracker](../../../project-management/implementation-tracking/game-authoring-publishing-and-activation.md#launch-activation-cutover-and-termination). Numeric launch selectors are non-authorizing.As per path instructions: "Review docs for canonical-current-state consistency."
- Accepted Undefined A/B/C proof status is stale canonical README content. Link implementation tracker and preserve RPC/numeric selector consequences.
- Hosted Review 2 CompletedRuntime 6m 44sFound: 2 Accepted: 0/2/0 Routed: 0
- Map Entity
FAILED_PRECONDITIONby call site. The current mapping uses the wrong denial for both calls.MinorrosterFailuremapsFAILED_PRECONDITIONfromListPreseededRostertoSTALE_MENU_IDENTITY. No menu identity takes part in that call. The proto contract usesFAILED_PRECONDITIONfor a non-PRESEEDED_ONLYpolicy or a stale target. A caller that sent no selector therefore gets an incorrect "stale menu" denial. Map this case toROUTE_CHANGED.assignmentFailuremaps every non-transient code toINVALID_ASSIGNMENT_PROOF. The proto saysReadSelectedPreseededAssignmentreturnsFAILED_PRECONDITIONwhen the snapshot is stale or the selected actor is no longer in it. That is a refresh-the-menu condition, not invalid proof. Map it toSTALE_MENU_IDENTITY.
Proposed fix
private static Denial rosterFailure(StatusRuntimeException failure) { Status status = failure.getStatus(); if (isTransient(status)) { return Denial.ROSTER_UNAVAILABLE; } if (status.getCode() == Status.Code.FAILED_PRECONDITION) { - return Denial.STALE_MENU_IDENTITY; + return Denial.ROUTE_CHANGED; } return Denial.INVALID_ROSTER_PROOF; } private static Denial assignmentFailure(StatusRuntimeException failure) { - return isTransient(failure.getStatus()) - ? Denial.ASSIGNMENT_UNAVAILABLE - : Denial.INVALID_ASSIGNMENT_PROOF; + Status status = failure.getStatus(); + if (isTransient(status)) { + return Denial.ASSIGNMENT_UNAVAILABLE; + } + if (status.getCode() == Status.Code.FAILED_PRECONDITION) { + return Denial.STALE_MENU_IDENTITY; + } + return Denial.INVALID_ASSIGNMENT_PROOF; }As per path instructions, flag violations of "gRPC application-error handling … and failure-mode expectations."
- Accepted Canonical Entity proto distinguishes stale roster target from stale selected snapshot. Map roster FAILED_PRECONDITION to ROUTE_CHANGED and selected assignment to STALE_MENU_IDENTITY; preserve other denials.
- Move the roster-read sections out of the initial-admission-bind narrative.Minor
- Line 66 has no blank line after Line 65. Markdown therefore renders the roster-owner read paragraph as part of the initial-bind retry paragraph.
- The new
### Entity preseeded-actor assignment source readheading sits between the initial-bind text and Line 80. - Line 80 starts "The local run-owned Compose fixture path now reaches this owner transaction." After this change, "this owner transaction" refers to the roster selection composition, not the initial admission bind.
Fix: move Lines 66–78 after Line 80, under a separate heading, for example
### Canonical gameplay roster owner reads. Then update the#initial-admission-bindlinks inruntime-and-data.mdand the trackers to the new anchor.As per path instructions, "Review docs for canonical-current-state consistency."
- Accepted Roster source paragraphs split initial-bind narrative and misbind Compose owner transaction. Group reads under their own owner heading; retarget only roster-source links.
- CLI Review 2 CompletedRuntime 2m 58sFound: 5 Accepted: 0/3/1 Routed: 0
- Give the exact enum text for each field in the
intentdigestpreimage.MinorGive the exact enum text for each field in the `intent_digest` preimage.
The preimage says "scope/policy values use their canonical enum names". It also lists "core
actorKind". The proto has two possible forms for each of these values:PLAYABLE_STATE_SCOPE_SHAREDorSHAREDCANONICAL_ROSTER_ACTOR_KIND_PLAYERorPLAYERCANONICAL_ROSTER_ENTRY_POLICY_PRESEEDED_ONLYorPRESEEDED_ONLY
The Game Session roster-snapshot digest v3 already mixes the two forms. In
CanonicalGameplayRosterClient.calculateSnapshotDigest, the scope uses the full proto namePLAYABLE_STATE_SCOPE_SHAREDand the policy uses the short namePRESEEDED_ONLY. If two implementers read this text differently, theirintent_digestvalues will not match, and later placement revalidation will fail closed.Name the exact byte string for each enum field, for example "
SHARED/ISOLATED,PRESEEDED_ONLY,PLAYER(short names, not proto value names)". As per path instructions: "Flag … conflicts between architecture docs."- Accepted Intent-digest enum spelling is ambiguous across full proto versus internal names. Name exact SHARED/ISOLATED, PRESEEDED_ONLY and PLAYER short strings from canonical Entity digest.
- Build one expected target and reuse it in both classes.Trivial
matchesExactPublishedTargetcompares 17 target fields one by one. It also repeats the policy checks andrawDigestfromCanonicalGameplayRosterClient.toExpectedTarget/rawPublishedPolicyDigest/rawOwnerProofDigest. If someone adds a field toCanonicalGameplayRosterTargetand updates only one of these two places, the client sends one target and the selection check compares another. Expose one builder from the client, for example a package-visible or public staticexpectedTarget(route). Then compare the protobuf messages withequals.♻️ Proposed refactor
private static boolean matchesExactPublishedTarget( CanonicalGameplayRosterTarget target, CanonicalPublishedPlayerRoute publishedRoute) { if (target == null || !target.getUnknownFields().asMap().isEmpty()) { return false; } - var route = publishedRoute.route(); - RealmEntryPolicy policy = publishedRoute.entryPolicy(); - ... - && target.getActiveWorldEpoch() == route.activeWorldEpoch(); + return CanonicalGameplayRosterClient.expectedTarget(publishedRoute).equals(target); }- Accepted Selection duplicates the client exact-target builder and digest checks. Reuse one public builder with full protobuf equality, retaining null/unknown-field rejection.
- Replace "implements" with "specifies" for
ListPreseededRoster.MinorLine 253 says the
CanonicalGameplayRosterService.ListPreseededRosterwire "implements only the pre-admissionPRESEEDED_ONLYlookup". The Entity API contract says this proto "is a wire contract only; it has no handler or activation in the current stage". "Implements" suggests a working Entity handler. Use "specifies" so the two documents agree. As per path instructions: "Flag … conflicts between architecture docs."- Accepted Canonical transactions describe wire semantics without claiming an active Entity handler; replace implements with specifies.
- Confirm that the assignment read compares the expected policy digest and release reference.Major
PreseededActorAssignmentOwnerReadEvidence.RequestcarriesexpectedPolicyDigestandexpectedPublishedReleaseBundleRef; the interceptor-chain test sets both. The API contract says the request selects the exact "catalog, policy-digest, and release selectors".requireAssignmentSelectorscompares only namespace, tenant, world, realm, playable-state namespace/scope, instance, version, and catalog revision.readCurrent(sourceRequest)then selects the current policy by world and realm slug only. It does not compare that policy's digest or the set'spublishedReleaseBundleRefwith the request.Assume
new PreseededActorAssignmentOwnerReadEvidence(request, sourceEvidence)does not check these two fields. Then an Entity request that carries a stale or wrong policy digest or release reference still receives successful source evidence. The response does not fail withFAILED_PRECONDITION. Entity could bind an assignment to policy evidence that its request never named.Verify whether the
PreseededActorAssignmentOwnerReadEvidenceconstructor (Common Platform Core) rejects a mismatch betweenrequest.expectedPolicyDigest()/expectedPublishedReleaseBundleRef()and the selected policy evidence. If it does not, add an explicit check here and throwStaleAuthorityException:🛡️ Sketch
CanonicalGameplayRosterOwnerReadEvidence sourceEvidence = readCurrent(sourceRequest); + var selected = + sourceEvidence.policySetEvidence().policies().stream() + .filter(p -> p.policy().worldSlug().equals(request.worldSlug()) + && p.policy().realmSlug().equals(request.realmSlug())) + .reduce((a, b) -> { throw new InvalidAuthorityException("Ambiguous policy"); }) + .orElseThrow(() -> new InvalidAuthorityException("Policy selector missing")); + if (!("sha256:" + request.expectedPolicyDigest()).equals(selected.policyDigest()) + || !request.expectedPublishedReleaseBundleRef() + .equals(sourceEvidence.policySetEvidence().publishedReleaseBundleRef())) { + throw new StaleAuthorityException( + "Current policy differs from the exact actor-assignment policy selectors"); + } return new PreseededActorAssignmentOwnerReadEvidence(request, sourceEvidence);Add a negative unit case for each mismatched selector.
- Rejected Common PreseededActorAssignmentOwnerReadEvidence constructor already compares both exact policy digest and release reference. Its existing rejectsChangedSelectorsPolicyReleaseUnknownFieldsAndPartialSourceEvidence test separately proves both mismatches.
- Update the
AR-3.1Capability Status row to match the new status text.MinorThe new paragraph records two things:
GetCompleteLaunchBindingauthenticates peers and then denies before owner reads.- A focused proof for that boundary now exists.
The
AR-3.1row (line 92) does not show either one:- It does not list
GameDesignService/GetCompleteLaunchBindingdeny-only behavior or its bearer-exempt registration. - Its proof cell does not list the new [
CanonicalLaunchGrpcAuthWiringTest.java](../../../services/game-design-service/src/test/java/unit/net/firedevops/firemud/gamedesign/security/CanonicalLaunchGrpcAuthWiringTest.java).
Add that anchor and a short complete-binding denial note to the gap cell. As per coding guidelines: "Each tracker contains one
Capability Statusrow for every capability it primarily owns… the capability rows are the complete scan-first status surface."- Accepted AR-3.1 scan-first row omits existing complete-binding peer-authentication/deny boundary and exact auth-wiring proof anchor; align row without changing partial status.
- CLI Review 3 CompletedRuntime 2m 30sFound: 4 Accepted: 0/2/2 Routed: 0
- Move the roster bound and actor validation into one helper.Trivial
The same actor rules exist in three places:
validateResponse(Lines 390-417).requireValidSelectedRosterSnapshot(Lines 280-301).CanonicalGameplayActorSelection.validate/isCanonicalDisplayName, together with a separateMAX_ROSTER_SIZE = 100.
Each copy has its own
MAX_ROSTER_SIZE, display-name checks (trim, 100-character limit, ISO control characters), and duplicate-UUID check. These checks mirror Entity's bounded snapshot contract. If one copy changes and the others do not, one layer accepts a snapshot that a later layer rejects. Keep the bound and the predicates in one package-visible or public static helper, for example onRosterActororPreseededRosterSnapshot, and call that helper from all three places.♻️ Sketch
public record RosterActor(UUID characterUuid, String displayName) { public static final int MAX_DISPLAY_NAME_LENGTH = 100; public static boolean isCanonicalDisplayName(String value) { return value != null && !value.isBlank() && value.equals(value.trim()) && value.length() <= MAX_DISPLAY_NAME_LENGTH && value.codePoints().noneMatch(Character::isISOControl); } }Also applies to: 390-417
- Accepted Three layers duplicate typed actor bounds, identity uniqueness and display predicates. One focused typed-roster predicate preserves wire-specific checks and denial categories while preventing drift.
- State the current
GetCompleteLaunchBindingdenial in the README.MinorLine 21 says the slice includes "GetCompleteLaunchBinding returning descriptor and release-attestation evidence separately". It does not say that this is target behavior. The current behavior is different:
api-contracts.mdLines 17 and 147 say the production RPC authenticates the candidate peer and then returnsPERMISSION_DENIEDbefore request validation or owner reads.CanonicalLaunchGrpcAuthWiringTestasserts thatPERMISSION_DENIEDresult.
As written, the README presents a denied RPC as an available read surface.
📝 Proposed wording fix
-The canonical authored-world launch slice includes source-qualified ResolveLaunchDescriptor, exact independent GetLaunchDescriptor, and GetCompleteLaunchBinding returning descriptor and release-attestation evidence separately. +The canonical authored-world launch slice includes source-qualified ResolveLaunchDescriptor and exact independent GetLaunchDescriptor. The target GetCompleteLaunchBinding returns descriptor and release-attestation evidence separately; the current production RPC authenticates exact same-namespace candidate peers and then returns `PERMISSION_DENIED` before request validation or owner reads.As per path instructions, flag "conflicts between architecture docs" and keep docs consistent with the canonical current state.
- Accepted README still presents complete-binding target response as available. Align current exact-peer authentication then PERMISSION_DENIED boundary with owning API and preserve tracker/numeric-selector limits.
- Specify one exact enum encoding in the intent-digest preimage.Minor
This paragraph defines a byte-exact digest preimage, but it gives two enum-encoding rules:
- One sentence requires "the internal short strings
PLAYER,SHAREDorISOLATED, andPRESEEDED_ONLY... not full protobuf enum identifiers." - The next sentence says "scope/policy values use their canonical enum names."
A reader can take "canonical enum names" to mean the protobuf names (
PLAYABLE_STATE_SCOPE_SHARED,CANONICAL_ROSTER_ENTRY_POLICY_PRESEEDED_ONLY). If a producer and a verifier choose different encodings, their digests do not match, and everyReadSelectedPreseededAssignmentreadback fails closed. Keep only the short-string rule.📝 Proposed wording fix
-UUIDs use canonical `UUID.toString()` form, counters use base-10 decimal text, and scope/policy values use their canonical enum names. +UUIDs use canonical `UUID.toString()` form, counters use base-10 decimal text, and actor-kind, scope, and policy values use only the short strings listed above.As per path instructions, docs under
design/**/*.mdare reviewed for "canonical-current-state consistency" and conflicts between architecture docs.- Accepted Intent preimage still has a second ambiguous enum-name clause after the explicit short-string rule. Converge on only the named internal strings.
- One sentence requires "the internal short strings
- Add the missing tenant-mismatch case.Trivial
The method name
deniesTenantNamespaceRealmAndInstanceContextMismatchesBeforeEntityReadincludes a tenant mismatch. The body only changesplayableStateNamespaceId,gameInstanceId, andrealmId. No case changestenantIdin thePlayerExecutionContext. If the service stops checking the caller tenant against the route tenant, this test still passes. Tenant isolation is the boundary that matters most here, so add asetTenantId(...)case. The case must assertROUTE_MISMATCHand confirm that the roster is never read.🧪 Proposed test addition
assertDenied( harness .service() .select( valid.toBuilder() .setRealmId(uuid("12121212-1212-4212-8212-121212121212").toString()) .build(), null, null), CanonicalGameplayRosterSelectionService.Denial.ROUTE_MISMATCH); + assertDenied( + harness + .service() + .select( + valid.toBuilder() + .setTenantId(uuid("12121212-1212-4212-8212-121212121212").toString()) + .build(), + null, + null), + CanonicalGameplayRosterSelectionService.Denial.ROUTE_MISMATCH); verify(harness.stub(), never()).listPreseededRoster(any());If the service rejects a foreign tenant with a different
Denialvalue (for example, during the route read), assert that value instead.- Accepted Missing tenant case leaves the named isolation proof incomplete. Fault-inject an owner catalog returned for another tenant and require ROUTE_MISMATCH before any Entity read.
- CLI Review 4 CompletedRuntime 2m 37sFound: 2 Accepted: 1/1/0 Routed: 0
- Record all three launch RPCs in the bearer-exemption status.Minor
The
AR-3.1row says onlyGetCompleteLaunchBindingis in the gRPC public-method list. This PR also addsResolveLaunchDescriptorandGetLaunchDescriptortofiremud.auth.grpc.public-methodsinservices/game-design-service/src/main/resources/application.ymlandapplication-prod.yml. After this change, those two methods also skip [redacted credential] and depend only on the handler mTLS peer check.The tracker now understates a change to the security boundary. The Game Design API contract also documents [redacted credential] only for the published-policy methods (unchanged line 117 in
design/architecture/microservices/game-design-service/api-contracts.md).State that all three launch methods skip [redacted credential] and keep their exact same-namespace peer checks.
CanonicalLaunchGrpcAuthWiringTestalready proves those peer checks and can serve as the proof anchor. Add the same note to the Game Design API contract implementation status. As per coding guidelines: "Keep its status, implementation record, validation, gaps, decisions, and service-map sections aligned when a domain boundary changes."📝 Proposed wording
-... Production `GetCompleteLaunchBinding` authenticates exact same-namespace candidate peers, then returns `PERMISSION_DENIED` before request validation or owner reads; the RPC is registered in the gRPC public-method list to bypass [redacted credential] while its mTLS peer checks remain active. | +... Production `GetCompleteLaunchBinding` authenticates exact same-namespace candidate peers, then returns `PERMISSION_DENIED` before request validation or owner reads. `ResolveLaunchDescriptor`, `GetLaunchDescriptor`, and `GetCompleteLaunchBinding` are registered in the gRPC public-method list to bypass [redacted credential] while their method-specific mTLS peer checks remain active. |- Accepted Both configured profiles register all three launch RPCs; tracker names only complete-binding method. Align canonical API registration note and secondary status with existing exact peer proof; preserve current deny-only limits.
- Use
doThrow(...).when(source)for the second stub. The currentwhen(...)call throws the first stubbed exception.MajorLine 198 stubs
source.readCurrent(any(...))to throwStaleAuthorityException. At line 208,when(source.readCurrent(any(...)))calls the mock again. Mockito runs the existingthenThrowanswer during that call, so the test throwsStaleAuthorityExceptionbefore it reaches.thenThrow(new InvalidAuthorityException(...)). As a result,staleOrInvalidCurrentSelectorsFailClosedfails with an unexpected exception, and theInvalidAuthorityException→FAILED_PRECONDITIONmapping is never tested.Mockito documents
doThrowas the required form when you override an earlier exception stub.🐛 Proposed fix
- when(source.readCurrent(any(CanonicalGameplayRosterOwnerReadEvidence.Request.class))) - .thenThrow( - new CanonicalPublishedPlayerRouteReadService.InvalidAuthorityException( - "changed policy or source")); + org.mockito.Mockito.doThrow( + new CanonicalPublishedPlayerRouteReadService.InvalidAuthorityException( + "changed policy or source")) + .when(source) + .readCurrent(any(CanonicalGameplayRosterOwnerReadEvidence.Request.class));- Accepted Current test executes and passes; typed any(Request.class) excludes null during when configuration. Accept explicit doThrow restub for clear exception override independent of matcher placeholder behavior, preserving assertions.
- CLI Review 5 CompletedRuntime 2m 41sFound: 2 Accepted: 0/2/0 Routed: 0
- Do not map every Entity
FAILEDPRECONDITIONon the assignment read toSTALEMENUIDENTITY.MinorDo not map every Entity `FAILED_PRECONDITION` on the assignment read to `STALE_MENU_IDENTITY`.
The Entity proto returns
FAILED_PRECONDITIONfor these cases:- The snapshot is stale.
- The selected actor is absent from the snapshot.
- The policy is not
PRESEEDED_ONLY.
assignmentFailuremaps all of them toSTALE_MENU_IDENTITY. This result is wrong in two reachable paths:- The blank selector auto-selects a single-actor roster. That path returns no menu, so the caller has no menu identity to refresh.
- A policy or route change that Entity reports is a route problem, not a menu problem.
rosterFailurealready maps the same status toROUTE_CHANGEDfor the list read.
A caller that acts on
STALE_MENU_IDENTITYcan show the menu again instead of re-resolving the route. Choose the denial from the call context: useSTALE_MENU_IDENTITYonly whenexpectedMenuIdentitywas supplied. In all other cases, useROUTE_CHANGED.🐛 Proposed fix
- private static Denial assignmentFailure(StatusRuntimeException failure) { + private static Denial assignmentFailure( + StatusRuntimeException failure, boolean menuSelection) { Status status = failure.getStatus(); if (isTransient(status)) { return Denial.ASSIGNMENT_UNAVAILABLE; } if (status.getCode() == Status.Code.FAILED_PRECONDITION) { - return Denial.STALE_MENU_IDENTITY; + return menuSelection ? Denial.STALE_MENU_IDENTITY : Denial.ROUTE_CHANGED; } return Denial.INVALID_ASSIGNMENT_PROOF; }Pass
expectedMenuIdentity != nullfrom the call site at line 124.- Accepted Auto-selection supplies no menu identity; FAILED_PRECONDITION on selected assignment must map to ROUTE_CHANGED there, retaining STALE_MENU_IDENTITY for supplied menu selections and preserving transport/invalid mappings.
- Use the proto field names in the normative intent-digest preimage.Minor
This paragraph defines a cross-service SHA-256 preimage. Some value names in it do not match the wire contract in
entity_management_service.proto:frozenPolicyDigesthas no proto field. The target field ispublished_policy_digest.gameInstanceIdandplayableStateNamespaceIdappear where the target fields aregame_instance_uuidandplayable_state_namespace_uuid.realmUuidandcanonicalVersionUuiduse the UUID suffix, so the list mixes two naming styles.
An Entity implementer and a Game Session verifier can read these names differently and serialize different values. The result is a digest mismatch that fails closed. For each preimage element, name the exact source field, or state that
frozenPolicyDigestis a different persisted value frompublished_policy_digest. Also state whether policy digests use the bare 64-hex form or thesha256:-prefixed form. The Game Session client sends the bare form.As per path instructions: "Flag ... conflicts between architecture docs."
- Accepted Normative immutable preimage should identify internal persisted sources and exact wire counterpart names plus bare policy-digest form. Preserve existing v4 encoding/order and original receipt evidence; no algorithm or value-source change.
- CLI Review 6 CompletedRuntime 3m 13sFound: 3 Accepted: 0/0/1 Routed: 1
- Confirm where the assignment read checks the expected policy digest and release reference.Minor
GetPreseededActorAssignmentOwnerReadRequestcarriesexpected_policy_digestandexpected_published_release_bundle_ref.PreseededActorAssignmentOwnerReadInterceptorChainTestsets both fields. The Game Session API contract says the request selects the exact "catalog, policy-digest, and release selectors". It also says Game Session checks the sealed Game Design policy set before it returns evidence.requireAssignmentSelectorscompares namespace, tenant, world, realm, playable-state namespace and scope, instance, version, and catalog revision. It does not compare the expected policy digest or the release bundle reference.readCurrent(sourceRequest)then validates the route against a source request built from route-derived values. Suppose neitherPreseededActorAssignmentOwnerReadEvidence.sourceRequestnor thePreseededActorAssignmentOwnerReadEvidenceconstructor compares these two fields with the returned policy evidence. Then Entity can receive successful source evidence for a policy or release other than the one it requested. The adapter maps this mismatch to a success response, notFAILED_PRECONDITION.Confirm that one of these Common evidence types rejects a mismatch. If neither type checks, add this check after
requirePublishedPreseededPolicyselects the policy:if (!request.expectedPolicyDigest().equals(rawDigest(selected.policyDigest())) || !request.expectedPublishedReleaseBundleRef() .equals(complete.publishedReleaseBundleRef())) { throw new StaleAuthorityException( "Current published policy differs from the requested assignment selectors"); }- Rejected Common PreseededActorAssignmentOwnerReadEvidence constructor already compares both exact expected policy digest and release reference before success; its existing test independently rejects changed digest and changed release. Duplicate CLI2 concern.
- Verify that the display-name length rule matches Entity's rule.Minor
isCanonicalDisplayNamelimitsvalue.length()to 100. That value counts UTF-16 code units, not Unicode code points. Line 58 says the client matches Entity's bounded roster contract. Other canonical limits in this PR count code points; for example,CanonicalInitialAdmissionRequestusescodePointCount.Suppose Entity limits display names to 100 code points. A valid name of 51 or more supplementary characters, such as emoji, then fails here.
validateResponsewould reject the complete roster, andCanonicalGameplayRosterSelectionServicewould returnINVALID_ROSTER_PROOFfor every actor of that account.Confirm whether Entity's
CanonicalGameplayRosterSnapshotDigestcontract counts UTF-16 units or code points. If it counts code points, apply this change:🐛 Proposed fix
- && value.length() <= 100 + && value.codePointCount(0, value.length()) <= 100Route · PR #3125 → PR #2967 Accepted/FixedGS client matches Entity roster UTF16 limit today. Entity assignment core accepts100Unicode code points while its roster guard accepts100UTF16 units; route owner convergence concern to2967 for adjudication before any client-bound change. View routed finding - The test does not prove that the service rejects the canonical tenant UUID.Trivial
The descriptor sets
canonicalTenantIdand leavestenantIdblank. A blanktenantIdcan produce"tenantId must be numeric"without any read ofcanonicalTenantId. The test then passes even when no coercion check exists.Add a second case that sets
setTenantId("123e4567-e89b-12d3-a456-426614174000"). That case covers a UUID that reaches the numeric tenant parser directly. Also confirm the error message for a blanktenantId. If the message differs, the current case is distinguishable and is correct.The
never()checks at Lines 219-221 duplicateverifyNoMoreInteractions(gameDesignClient)at Line 222. Remove them, or keep them only as documentation.♻️ Proposed additional case
net.firedevops.firemud.gamedesign.v1.LaunchDescriptor.newBuilder() .setLaunchDescriptorId("ld-cp-canonical-tenant") + .setTenantId("123e4567-e89b-12d3-a456-426614174000") .setCanonicalTenantId("123e4567-e89b-12d3-a456-426614174000")Use a parameterized test so that both the blank
tenantIdcase and the UUIDtenantIdcase stay covered.- Accepted Existing launch test proves only blank legacy tenant rejection; add UUID-in-legacy-field parameter case while retaining exact diagnostic and no-mutation/no-extra-owner-read assertions.
Routed Findings
Route 1 · PR #3125 → PR #2967 Accepted/FixedMinorVerify that the display-name length rule matches Entity's rule.
isCanonicalDisplayNamelimitsvalue.length()to 100. That value counts UTF-16 code units, not Unicode code points. Line 58 says the client matches Entity's bounded roster contract. Other canonical limits in this PR count code points; for example,CanonicalInitialAdmissionRequestusescodePointCount.Suppose Entity limits display names to 100 code points. A valid name of 51 or more supplementary characters, such as emoji, then fails here.
validateResponsewould reject the complete roster, andCanonicalGameplayRosterSelectionServicewould returnINVALID_ROSTER_PROOFfor every actor of that account.Confirm whether Entity's
CanonicalGameplayRosterSnapshotDigestcontract counts UTF-16 units or code points. If it counts code points, apply this change:🐛 Proposed fix
- && value.length() <= 100 + && value.codePointCount(0, value.length()) <= 100Outcome: Published9526190049a86feef40cd616ec7b5eb931247e8b preserves100-code-point source acceptance through Entity roster and GS client;292unit+27PostgreSQL0skip and21GS cases pass, fullEntity/focusedGS static/format/docs gates pass. PG supplementary100CP assignment/roster case executes.
Earlier routing and proof
Earlier decisions
- Accepted Producer persists a valid100-code-point PRESEEDED display name that the100-UTF16 roster guard rejects. Preserve existing accepted source bound and align Entity roster plus GS consumer; prove supplementary-character assignment-to-roster readback.
- Routed GS client matches Entity roster UTF16 limit today. Entity assignment core accepts100Unicode code points while its roster guard accepts100UTF16 units; route owner convergence concern to2967 for adjudication before any client-bound change.
Unlinked items
no items unlinked