PR #3206 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.1-sol · MediumFound: 0 Accepted: 0 Routed: 0
- No findings recorded for this run
- CLI Review 1 CompletedRuntime 3m 30sFound: 10 Accepted: 1/2/4 Routed: 0
- Check the returned
currentGameInstanceStatusbefore accepting the readback.MinorThe class Javadoc and the method Javadoc describe the accepted readback as the Game Session
STARTINGassociation.requireFixtureReadbackdoes not checkactual.currentGameInstanceStatus(). It also does not check thatgameSessionTenantId()andgameInstanceId()are positive.If the Game Session owner returns a
RUNNINGorSTOPPEDallocation, World accepts it as launch provenance.RunOwnedWorldLaunchEvidence.requireGameSessionAllocationthen binds requests to that allocation.Confirm whether the Game Session
getRunOwnedFixtureLaunchAssociationhandler guaranteesSTARTING. Even if it does, World verifies this owner response and should fail closed on its own.🛡️ Proposed fix
if (!actual.request().fixtureOperationId().toString().equals(capability.operationId()) + || actual.currentGameInstanceStatus() + != CanonicalGameInstanceLaunchAssociationReadEvidence.CurrentGameInstanceStatus.STARTING + || actual.gameSessionTenantId() <= 0L + || actual.gameInstanceId() <= 0L || !actual.request().targetNamespace().equals(receipt.sourceEvidence().targetNamespace())- Rejected FixtureResult canonical constructor already enforces positive tenant/instance IDs and STARTING before any World consumer; proposed invalid typed result cannot exist. No duplicate check added.
- One historical catalog row now blocks realm discovery for the whole namespace.Major
toSnapshotnow requires exactly one policy provenance. The two options arecomplete_policy_set_evidenceandfixture_policy_request_bytes. If neither is present, it throwsInvalidCatalogEvidenceException. It also callsverifyStoredFreshAssociation.Historical V23 rows have neither policy column and may have no complete fresh association. Every read path for such a row fails:
readByRequestreadByRealmreadUniqueVisiblePublicProductionlockExactInitialPublicProductionlockInitialAdmissionTarget
GameSessionCanonicalLaunchPreparationServiceIntegrationTest.requireHistoricalRowsRetainedconfirms this. It expectsreadByRequestto throw for the seeded V23 row.The worst case is
readVisiblePublicProductionSnapshots(Lines 465-476). It maps everyPUBLIC_PRODUCTIONrow in the namespace throughtoSnapshot. A single historical row therefore makes player discovery fail for every realm in that namespace, including fresh, valid ones.The V1004 migration comment says the opposite: "Historical V23 catalog rows remain readable as historical catalog state." The code and the migration comment disagree.
Confirm whether a deployed environment can hold V23 catalog rows created before V1004. If it can, choose one of these fixes:
- Classify rows without provenance as historical and skip them in the discovery list. Do not throw from the list.
- Keep a separate historical snapshot reader that applies the old checks. Exclude those rows from admission authority explicitly.
- Rejected Canonical catalog deliberately fails whole authority-backed discovery closed on incomplete retained provenance; tracker and historical-row regression document this. Retained V23 SQL bytes are not admissible snapshots. Skipping would change health semantics; do not edit historical migration.
- Use one shared codec and validator for creation evidence.Trivial
The following code duplicates
GameSessionFreshTenantAssociationRepository(Lines 373-407 and 617-660 for the query and checks, Lines 747-811 for parsing):verifyStoredFreshAssociationrepeats theASSOCIATION_SELECTquery and the field checks intoAssociation.parseCreationEvidence,requiredText,requiredInt,requiredLong,parseUuidand the closed field set repeatparseEvidence.
Both copies must stay identical to the V1003 trigger shape. A future change to one copy can make the catalog owner and the association owner disagree on whether an association is valid.
Recommended fix:
- Move the closed-JSON codec into a shared
FreshTenantCreationEvidencecodec, for example incommon-platform-core. - Let the catalog repository delegate to the association repository's in-transaction reader.
Note:
sourceRequireNonNil(Lines 1700-1704) is unused.Also applies to: 1625-1689
- Accepted Catalog duplicates closed creation-evidence codec and association claim validation. Reuse owning GS association reader/codec locally, preserving source tuple comparisons, namespace and transaction boundaries; no parallel common validator family.
- Build the seal from the
sourceReceiptJsonparameters, not from the default fixtures.TrivialThe helper encodes the receipt with the
source,bundle,artifactState,versionStateanddescriptorparameters. The seal'sLaunchReadEvidenceusesbundle(),artifactState(),versionState()andlaunchDescriptor()instead. The request digest also usessourceEvidence().For any non-default input, the receipt therefore carries a mismatched seal. The negative descriptor and projection tests then pass even if the projection check were removed, because the seal check rejects the receipt anyway. Use the parameters so that each negative test fails only at its intended check.
♻️ Proposed change
var launch = new LaunchReadEvidence( RunOwnedInitialAdmissionFixtureWireCodec.LAUNCH_READ_EVIDENCE_SCHEMA, 17L, - bundle(), - artifactState(), - versionState(), - launchDescriptor()); + bundle, + artifactState, + versionState, + descriptor); String requestDigest = RunOwnedInitialAdmissionFixtureWireCodec.fixturePolicyRequestDigest( - capability(), creationEvidence(), sourceEvidence(), launch); + capability(), creationEvidence(), source, launch);If
fixturePolicyRequestDigestrejects an intentionally invalid input, catch that rejection. Then let the test assert the receipt parser failure.- Accepted Receipt helper seals default fixtures instead of supplied projection inputs, masking intended negative checks. Build matching seal from actual arguments; explicitly distinguish invalid digest input rejection.
- A reused association operation ID now fails with a raw database error.Minor
Trigger:
associateFreshreceives anassociationOperationIdthat already belongs to an association for a different source.commitAssociationfinds no prior row for the new creation request.- It allocates a reservation and inserts the claim.
- The insert hits the unique key on
association_operation_id, and jOOQ throwsDataAccessException.
Before this change, the code checked
findClaimByOperationfirst and threw the typedFreshTenantAssociationConflictException.GameSessionFreshTenantAssociationRepositoryIntegrationTest(Line 130) was changed to accept the rawDataAccessException.Consequence: callers cannot tell an idempotency conflict from a storage failure. Error mappers send this case to
INTERNAL.Fix: check the operation ID before allocation. Then restore the typed assertion in the test.
Proposed fix
rejectOrphanOrRetainedClaim(sourceEvidence); + if (requestedOperationId != null + && (findClaimByOperation(requestedOperationId) != null + || findAssociationByOperation(requestedOperationId) != null)) { + throw new FreshTenantAssociationConflictException( + "Association operation ID is already owned by another tenant association"); + } long tenantId = allocateFreshTenantId();- Accepted Supplied operation ID collision reaches unique-key raw storage exception after allocation. Restore typed nonmutating owner conflict before allocation and physical regression.
- Use the typed
PlayableStateScopeenum forplayablestatescope.TrivialUse the typed `PlayableStateScope` enum for `playable_state_scope`.
GetCanonicalGameInstanceLaunchAssociationResponse.playable_state_scope(field 12) usesentity_management.v1.PlayableStateScope. The new fixture response uses a free-formstring. The codec then compares against the literal"SHARED". The two sibling association reads now have different scope types. This message is new and has no deployed consumers yet, so the change is cheap now and expensive later.♻️ Proposed change
- string playable_state_scope = 12; + entity_management.v1.PlayableStateScope playable_state_scope = 12;Then update
CanonicalGameInstanceLaunchAssociationReadGrpcCodec.toFixtureResponseandfromFixtureResponseto usePLAYABLE_STATE_SCOPE_SHARED.- Accepted New fixture association response should share typed PlayableStateScope enum with sibling RPC; migrate proto and codec consumers and negative unknown/isolated proof together.
- Make the overlap test fail when the non-overlap guard is missing.Minor
Mockito
MockedStaticstubs apply only to the thread that registered them. The executor thread registers the stubs forRunOwnedInitialAdmissionFixtureCapability.load/loadSourceReceipt. The secondretryRunOwnedFixtureBootstrap()call at Line 332 runs on the test thread, which has no static stubs. On that thread,loadreads the realfixture/capability.jsonpath and fails before it reachescreateVerifiedFixtureStartingLaunch.As a result,
times(1)at Line 334 holds even when the coordinator has no in-progress guard. The test then proves a different thing: a missing file stops the attempt. It does not prove that the coordinator skips a retry while an attempt is in progress.Open a separate
mockStaticon the test thread and stub it with the same loaders before the second call. The second retry then reaches the guard decision. This test then fails if the guard is missing.🧪 Proposed fix
assertThat(enteredOwner.await(5, TimeUnit.SECONDS)).isTrue(); - fixture.coordinator.retryRunOwnedFixtureBootstrap(); + try (MockedStatic<RunOwnedInitialAdmissionFixtureCapability> mainLoader = + mockStatic(RunOwnedInitialAdmissionFixtureCapability.class)) { + stubFixtureLoaders(mainLoader, fixture, fixture.sourceReceipt); + fixture.coordinator.retryRunOwnedFixtureBootstrap(); + } verify(fixture.launchOwner, times(1)).createVerifiedFixtureStartingLaunch(any());- Accepted Thread-local static mock is missing on main test thread, so overlap assertion can pass at file loading. Stub both threads so the second attempt reaches actual guard.
- Remove the three-argument
captureoverload instead of keeping a public method that always throws.TrivialThe old overload now requires a transaction and then always throws
IllegalStateException. Any remaining caller still compiles, and the failure appears only at runtime inside an owner transaction. If you delete the overload, the compiler finds every remaining caller. Then each caller must pass the original StartSession tuple explicitly.♻️ Proposed change
- public CanonicalGameInstanceLaunchAssociation capture( - FreshGameSessionTenantAssociation tenantAssociation, - long gameInstanceId, - CompleteLaunchBindingEvidence launchBindingEvidence) { - requireWritableReadCommittedOwnerTransaction(); - throw new IllegalStateException( - "Original StartSession tuple is required for canonical launch capture"); - }- Accepted Obsolete public three-argument capture always throws; remove it and update sole unit caller to canonical original-tuple overload so missing callers fail compilation.
- Confirm that no path reaches
reservewhilecommitandabortalways throw.Majorreservestill inserts a durablePENDINGattempt.commitandabortnow throwunavailableHumanAdmissionProtection()without any owner effect.Two cases are affected:
- New attempts: If any caller still reaches
reserve, that attempt can never reach a terminal state. Every later request for the realm then fails with "Another initial-admission request already owns the pending realm attempt".readreturnsPENDINGindefinitely, so World termination stays fenced. - Retained attempts: Any
PENDINGattempt from a predecessor revision also loses its abort path.
The design docs say that fresh Human preparation refuses "before intent reservation". This file does not show that guard.
Verify these points:
- Does
DatabaseCanonicalInitialAdmissionServicedeny prepare before it callsCanonicalInitialAdmissionRepository.reserve? - Does any other caller invoke
reserve? - Can a retained
PENDINGrow exist in a supported deployment?
If any answer allows the stuck state, make
reservedeny with the same exception. Alternatively, keepabortoperable for retainedPENDINGrows.Also applies to: 211-211
- Rejected Live DatabaseCanonicalInitialAdmissionService bind/abort denies before any reservation; source search finds no reserve caller. Retained predecessor PENDING stays read-only and fenced until genuine protection/terminal composition. No invented abort authority; docs/tests qualify this boundary.
- New attempts: If any caller still reaches
- Use one implementation of the Game Session association check.Major
Two files repeat the same comparison between the Game Session readback and the immutable receipt, field by field. If someone changes one copy, the provider and the evidence object can accept different owner readbacks.
services/world-management-service/src/main/java/net/firedevops/firemud/worldmanagement/data/RunOwnedWorldLaunchEvidenceProvider.java#L209-L242: deleterequireFixtureReadback. Call the shared static check, or rely on theRunOwnedWorldLaunchEvidenceconstructor to run it.services/world-management-service/src/main/java/net/firedevops/firemud/worldmanagement/data/RunOwnedWorldLaunchEvidence.java#L171-L213: changerequireExactGameSessionFixtureAssociationto a package-level static method that takes(capability, receipt, association). Call it from the constructor and fromrequireMatches.
- Accepted Provider and trusted World carrier repeat complete immutable fixture tuple comparison. Consolidate one World-local checker, called at construction and requireMatches; preserve all checks and exception translation.
- CLI Review 2 CompletedRuntime 3m 49sFound: 10 Accepted: 2/4/2 Routed: 0
- Log the exception for unexpected failures.Minor
logger.error("GetRunOwnedFixtureLaunchAssociation failed")drops the exception. When this RPC returnsINTERNAL, operators then have no cause and no stack trace. The other handlers in this class pass the exception to the logger.Proposed fix
- logger.error("GetRunOwnedFixtureLaunchAssociation failed"); + logger.error("GetRunOwnedFixtureLaunchAssociation failed", failure);- Accepted Unexpected fixture RPC failure discards useful cause. Restore existing handler diagnostic pattern with exception while retaining fixed sanitized transport description and no explicit raw request logging.
- Merge the identical denial tests and remove the unused stubs.Trivial
assertHumanUnavailablechecks two things: there are no interactions withrepositoryandworldClient, and no transaction begins. Each test therefore proves the same single behavior: an early human denial. The stubs forreserve,acquire,attach, and the failing-commit transaction manager (new Fixtures(..., true)) never run.The names
unavailableIntentOwnerCannotMoveDenialAfterReservation,configuredWorldIdentityAndAttachFailureCannotBypassHumanProtection, andattachedOrTerminalReadbackCannotAuthorizeNewHumanPreparationdescribe paths that do not execute. A reader can believe these paths are covered when they are not.Replace the set with one parameterized test over the request and lifecycle variants. Those are the only inputs that reach the code under test. Remove the unreachable stubs and the
failFirstCommitoption.- Accepted Human denial tests use unreachable reserve/acquire/attach stubs and failing-commit paths; consolidate actual request/lifecycle variants, retain early no-owner/no-transaction proof.
- Merge
InvalidCanonicalRealmCatalogExceptionintoInvalidCatalogEvidenceException.MajorThe class now has two parallel exception types for invalid catalog evidence:
selectPolicy,verifyStoredFreshAssociation, andrequired(Record, String, Class)throwInvalidCanonicalRealmCatalogException.- The existing guards throw
InvalidCatalogEvidenceException.
prepareInitialPublicProductioncan throw either one. A caller that mapsInvalidCatalogEvidenceExceptionto a typed application error will treat the new failures as internal errors. Use one type: either throwInvalidCatalogEvidenceException, or make the new type extend it.- Accepted Consolidate duplicate invalid-catalog evidence exceptions into canonical InvalidCatalogEvidenceException with required cause constructor; update all in-scope throw sites/callers, no compatibility alias.
- Align the rest of this tracker with the new refuse-before-effects boundary.Minor
Line 11 states that World bootstrap and fixture prepare/activate refuse before owner effects, and that the Game Session read grants no lifecycle or first-admission authority. Several unchanged sections in the same tracker still describe the removed flow as current:
- Line 39 says the run-owned Compose coordinator "now drives the hold from Game Session's durable initial-bind intent". It also says World persists a binding digest and original preparing epoch, and replays exact
ACTIVE. - The
GR-2.1Capability Status row (Line 59) says "the run-owned local Compose caller are wired". It also says the run-owned launch path "stores their binding digest and original preparing epoch throughRunOwnedWorldLaunchEvidenceProvider". - The Active Gaps entry at Line 150 says "The run-owned local Compose initial-admission coordinator is implemented".
These statements contradict the new status. They also contradict
runtime-and-data.mdLine 19 and the Game Session tracker. Mark the coordinator-driven hold and World fixture lifecycle as historical, or remove those claims. Then restate theGR-2.1implementation and gap cells to match Line 11.As per coding guidelines, "Keep its status, implementation record, validation, gaps, decisions, and service-map sections aligned when a domain boundary changes". As per path instructions, "Flag obsolete transitional guidance, conflicts between architecture docs".
- Accepted World tracker still describes removed fixture lifecycle/holds as current in status row/gaps despite explicit refusal at top. Align those sections to canonical current implementation and honest historical proof attribution.
- Line 39 says the run-owned Compose coordinator "now drives the hold from Game Session's durable initial-bind intent". It also says World persists a binding digest and original preparing epoch, and replays exact
toSnapshotrejects every older catalog row. A single older row breaks discovery for the whole namespace.MajortoSnapshotnow requires exactly one policy source per row (complete_policy_set_evidenceorfixture_policy_request_bytes). It also requires a stored fresh association withcomplete_source_evidence. Rows written before V1004 have nocomplete_policy_set_evidence. V25 associations have nocomplete_source_evidence. The V1003 and V1004 migration comments say these older rows stay nullable on purpose, and V1004 says older catalog rows "remain readable as historical catalog state". This read path contradicts that comment.Every committed read goes through
toSnapshot:readByRequestreadByRealmreadUniqueVisiblePublicProductionlockInitialAdmissionTargetreadVisiblePublicProductionSnapshots
readVisiblePublicProductionSnapshotscalls.map(this::toSnapshot)over all public-production rows in the namespace. If one row is an older row, the whole player-discovery read throwsInvalidCatalogEvidenceException. That blocks discovery for every tenant in that namespace.requireHistoricalRowsRetainedinGameSessionCanonicalLaunchPreparationServiceIntegrationTestasserts thatreadByRequestthrows for such a row, so the rejection is real behavior.Each row also now costs a policy decode and an association query inside
verifyStoredFreshAssociation. That adds an N+1 cost to the discovery listing.Fix options:
- Return older rows as an explicit non-authoritative state, then filter them out of discovery.
- Or skip and log them in
readVisiblePublicProductionSnapshotsinstead of failing the whole list.
Before choosing a fix, confirm whether any deployed environment has
game_session_canonical_realm_catalogrows with both policy columns NULL.- Rejected Same verified CLI1 finding6: retained nullable V23/V25 history is not current admissible catalog authority; canonical health/discovery deliberately whole-response fails closed. Tracker and existing historical-row proof match. No skip/legacy-authority path or migration rewrite.
- Confirm the error contract for the new RPC.Minor
Every other RPC in this service returns failures as
ErrorDetailin the response body throughGrpcAppErrors, then callsonCompleted().GetRunOwnedFixtureLaunchAssociationinstead returnsStatuserrors throughonError. The path instructions require that changes not violate "documented FireMUD invariants, especially gRPC application-error handling".Two facts need checking:
- Whether
GetRunOwnedFixtureLaunchAssociationResponseinprotos/game-session/v1/game_session_service.protohas anerrorfield. - Whether the World Management client for this read expects gRPC status codes.
If the response has an
errorfield, or the World client expects application errors, rewrite these branches to theErrorDetailpattern.As per path instructions: "Flag changes that violate documented FireMUD invariants, especially gRPC application-error handling, ownership boundaries, and failure-mode expectations."
- Rejected Canonical system-architecture-grpc ResultSemantics requires non-OK status when domain result cannot be produced; ErrorDetail is not universal. New response has no error field, World client expects status. Existing OK-error handlers are documented drift.
- Whether
- Confirm that stopping World Management at startup is intended when both flags are on.Major
TestDataSeederis anApplicationRunner. When it throws,SpringApplication.runfails and the World Management process exits. A request-time rejection would leave the service running. This throw does not.The trigger needs two settings:
FIREMUD_SMOKE_INITIAL_ADMISSION_FIXTURE_ENABLED=trueandfiremud.smoke.seed-demo-runtime.enabled=true. If the run-owned compose smoke turns on both, World Management no longer starts. Every scenario in that smoke run then fails, including ordinary scenarios that do not need fixture materialization. Before this change, the seeder created the demo topology in that configuration.Verify which compose and CI environments set both flags. If any do, choose one of these fixes:
- Change the smoke configuration so that seeding is off in fixture mode.
- Skip seeding with a log message instead of throwing.
WorldLifecycleCommandServiceImplalready denies fixture prepare and activation at request time. The startup throw is therefore not needed to block fixture materialization.- Rejected World fixture startup refusal is intentional containment until genuine materialization exists. Canonical bootstrap sets fixture flag false; explicitly requesting unavailable fixture bootstrap fails before owner effects. Do not silently fall back or reopen held runtime phases.
- Pin the fixture write transaction to READ COMMITTED.Minor
createInitialPublicProductioncallsrequireWritableOwnerTransaction, and that method fails unless the connection isolation isTRANSACTION_READ_COMMITTED.associateVerifiedFixtureInOwnerTransactionhas the same requirement. TodaywriteTransactiononly works if the database default happens to be READ COMMITTED. If the pool or database default changes,establishVerifiedFixtureRealmfails every time.Proposed fix
this.writeTransaction = new TransactionTemplate(transactionManager); this.writeTransaction.setPropagationBehavior(TransactionDefinition.PROPAGATION_REQUIRES_NEW); + this.writeTransaction.setIsolationLevel(TransactionDefinition.ISOLATION_READ_COMMITTED);- Accepted Pin fixture write transaction READ_COMMITTED explicitly to match owning repository guard; do not rely on pool default.
- The fallback seal hides which check rejects a negative receipt.Trivial
The helper catches
IllegalArgumentExceptionfromfixturePolicyRequestDigest. It then builds the seal from valid default evidence. In that case the receipt carries mutated evidence and a seal for different evidence.parseSourceReceiptcan then reject the receipt because the seal does not match, not because of the field the test targets.Affected tests include
rejectsArtifactSnapshotMissingTheBundlesRequiredManifestKey,rejectsOwnerReadProjectionScopeAndStateMismatches, andrejectsUnknownProtobufFieldsRecursivelyInOwnerReadEvidence. If digest computation rejects their input, these tests still pass when the targeted validation is removed.Make the fallback explicit for each test. Two options:
- Pass a flag or a precomputed seal from each negative test that needs one.
- Assert the specific rejection reason, so a seal mismatch cannot satisfy the assertion.
At minimum, add a comment that lists the tests that depend on the fallback.
- Accepted GS capability helper substitutes a default seal when actual negative evidence is invalid, masking intended checks. Remove silent fallback and assert rejection at actual input-validation boundary; retain closed owner/projection proof.
- Reject a fixture
ownerAccountIdother than 1 before the first owner write.MinorThe V1031 header guard accepts a fixture policy row only when
fixture_policy_jsonequalsjsonb_build_object(..., 'ownerAccountId', 1).loadFixtureCapabilitycheckstenantId == 1, but it does not checkownerAccountId.RunOwnedInitialAdmissionFixtureWireCodec.requireValidCapabilityaccepts any positiveownerAccountId.If a capability has
ownerAccountId != 1, every Java check passes. The seeder then commits the fresh creation receipt, the source registration, the Version/bundle rows and the descriptor resolution. Only after these commits doesRunOwnedFixturePolicyProducer.sealAndReadfail on thecheck_violation. The committed owner evidence is permanent, and a retry with the same capability fails again in the same way.Add the same fixed-value check to the existing scope check in
loadFixtureCapability:🐛 Proposed fix
if (!fixtureRunId.equals(capability.runId()) || !fixtureComposeProjectName.equals(capability.composeProjectName()) - || capability.tenantId() != 1L) { + || capability.tenantId() != 1L + || capability.ownerAccountId() != 1L) {Confirm that the run-owned capability generator (
dev-tools/smoke/run-owned-compose.shor its helper) always writesownerAccountId: 1. If the generator can write another value, the V1031 constant is the wrong side to change.- Accepted Generator and V1031 fix ownerAccountId=1; seeder must reject other IDs before creation/source/version/descriptor owner writes. Add exact upstream scope guard and early-effect regression.
- Hosted Review 1 CompletedRuntime 11m 35sFound: 11 Accepted: 10 Routed: 0
- Align the
GR-2.1capability row with current fixture behavior.MinorThe
Implementationcell still states that the run-owned Compose caller, launch-evidence provider, and preparing-epoch persistence are wired. The current status text says that the coordinator performs only Game SessionSTARTINGallocation and readback. World fixture bootstrap, prepare, and activate refuse before effects. Earlier binding,ACTIVEreplay, and coordinator-driven hold behavior are predecessor evidence.Rewrite the
Implementationcell to describe those behaviors as predecessor evidence and retain the current refusal boundary.The
Verificationcell starts with “World retains...” and has no classification. Prefix it with the status supported by the retained proof, such asaudited:. If no focused executable proof is claimed, useunverified:and addNo focused executable proof:to the proof cell.- Accepted GR2.1 implementation still mixes predecessor lifecycle with STARTING-only current fixture; correct both cells, preserve audited token and refusal limits.
- Add or track the production caller for authenticated evidence.Minor
requireAuthenticatedEvidence()performs the new Game Session fixture read, but no production entrypoint invokes it. The lifecycle services only callisEnabled()and reject fixture prepare and activate before any provider call. If this phase intentionally has no caller, record the readback as unreachable instead of treating constructor or unit coverage as production evidence.- Accepted Provider authenticated-read capability lacks production caller while lifecycle deliberately refuses: correct owning docs/tracker as unreachable source boundary; do not wire activation or infer authority.
- Use the shared seal constants instead of string literals.Trivial
verified()compares the seal against the literals"firemud.run-owned-fixture-policy-seal.v1"and"game-design-service". Other code in this PR uses the constantsRunOwnedInitialAdmissionFixtureWireCodec.FIXTURE_POLICY_SEAL_SCHEMAandSOURCE_RECEIPT_OWNER_SERVICEfor the same values, for exampleCanonicalGameInstanceLaunchAssociationReadEvidence.FixtureResultandCanonicalGameInstanceLaunchAssociationReadGrpcCodec.fromFixtureResponse. If the codec schema version changes, this check rejects every verified fixture, andfixtureCapability(),creationEvidence(),fixturePolicySeal(), andfixturePolicyRequestBytes()all fail.♻️ Proposed refactor
--- "a/services/game-session-service/src/main/java/net/firedevops/firemud/gamesession/data/RunOwnedInitialAdmissionLaunchEvidence.java" +++ "b/services/game-session-service/src/main/java/net/firedevops/firemud/gamesession/data/RunOwnedInitialAdmissionLaunchEvidence.java" @@ -143,8 +143,9 @@ versionState, launchDescriptor)); var seal = fixture.receipt().fixturePolicySeal(); - if (!"firemud.run-owned-fixture-policy-seal.v1".equals(seal.schema()) - || !"game-design-service".equals(seal.ownerService()) + if (!RunOwnedInitialAdmissionFixtureWireCodec.FIXTURE_POLICY_SEAL_SCHEMA.equals(seal.schema()) + || !RunOwnedInitialAdmissionFixtureWireCodec.SOURCE_RECEIPT_OWNER_SERVICE.equals( + seal.ownerService()) || !java.util.UUID.fromString(fixture.capability().operationId()).equals(seal.operationId()) || !requestDigest.equals(seal.requestDigest()) || !RunOwnedInitialAdmissionFixtureWireCodec.fixturePolicyEvidenceDigest(- Accepted Use existing shared schema/owner constants; preserve exact validation and all binding checks.
- Update the proof status. The tracker still reports a failed whole-service check that the PR reports as passing.Minor
Line 13 says the latest whole-service check "remained failed": 260 fresh integration results with nine failures. It also says "a completely successful current-head Game Session native suite, exact published-source CI … remain separate."
The PR reports a different result for exact published head
e9f026aa49bb49c7635abd0055febf520aa18321in run 38496689054:- 2,202 unit cases passed.
- 39 cross-service cases passed.
- 267 integration cases passed.
Under the tracker contract, this tracker is the reader-facing account of proof status. In its current form it understates the proof and names a failure that the latest run no longer shows.
Fix:
- Record the passing run with its exact head attribution.
- Keep the earlier nine-failure result only as historical attribution for its own revision.
- Keep rebuilt packaged runtime as a separate open gate.
As per coding guidelines: "Keep its status, implementation record, validation, gaps, decisions, and service-map sections aligned when a domain boundary changes."
- Accepted Tracker proof stale: record exact e9/source run38496689054 and qualified39 results, retain older failure attribution and current failed rebuilt runtime.
- Preserve historical catalog readability.Major
toSnapshotrejects any retained pre-V1004 row with neither policy provenance column populated.readVisiblePublicProductionSnapshotsselects all public-production rows and maps every row throughtoSnapshot, so one historical row can abort the complete discovery read. The exact readers and lock methods also calltoSnapshot.This contradicts the V1004 contract that historical rows remain readable. Choose one contract and apply it consistently:
- If historical rows remain readable, exclude them from discovery and return a classified historical result from exact readers instead of throwing.
- If historical rows are intentionally unreadable, update the V1004 documentation and confirm that supported deployments cannot retain those rows.
- Rejected Retained historical SQL rows remain readable and untouched; current authoritative catalog requires exactly one complete provenance and fails closed whole-read. V1004 history retention is not adoption authority; focused migration/denial proof pins this boundary.
- CodeRabbit summary-only outside-diff finding 1 of 1 (aggregate; no individual detail)
summary-only aggregate; provider supplied no individual detail
- Accepted World API paragraphs stale: keep target owner ordering and explicitly qualify currently unreachable fixture lifecycle/readback, with tracker link; no duplicated contract or activation.
- Shorten the trigger name to 63 bytes or fewer.Minor
game_session_canonical_instance_launch_complete_catalog_identityis 64 bytes. PostgreSQL silently cuts it to 63 bytes, so the stored name loses its finaly. Any catalog query or test that looks uppg_triggerorinformation_schema.triggersby the full name finds nothing. Squawk reports the same issue. This migration is new in this change, so you can rename it now without a Flyway checksum problem.Proposed fix
--- "a/services/game-session-service/src/main/resources/db/migration/V1005__canonical_launch_exact_catalog_identity.sql" +++ "b/services/game-session-service/src/main/resources/db/migration/V1005__canonical_launch_exact_catalog_identity.sql" @@ -62,7 +62,7 @@ END; $$; -CREATE TRIGGER game_session_canonical_instance_launch_complete_catalog_identity +CREATE TRIGGER gs_canonical_instance_launch_complete_catalog_identity BEFORE INSERT ON game_session_canonical_instance_launch FOR EACH ROW EXECUTE FUNCTION require_complete_canonical_launch_catalog_identity(); -- [jooq ignore stop]Update every later migration or test that refers to the old name.
- Accepted 64-byte new trigger name is truncated: shorten at original owner and update actual references; fresh migration proof verifies full catalog name.
- Pin the expected rejection reason for the historical catalog read.Trivial
requireHistoricalRowsRetainedexpectsreadByRequestto throwInvalidCatalogEvidenceException. That exception class covers many failure causes.seedHistoricalCatalogrecomputes the catalog request and receipt digests by hand inhistoricalDigest. That hand-written code is a copy of the production digest encoding.If the copy drifts from the production encoding, the read still throws the same exception class, but for a digest mismatch. The test then passes without proving its stated invariant: retained history without complete policy evidence is refused.
Fix: assert on the specific message for missing complete-policy evidence.
♻️ Proposed assertion tightening
--- "a/services/game-session-service/src/test/java/integration/net/firedevops/firemud/gamesession/service/GameSessionCanonicalLaunchPreparationServiceIntegrationTest.java" +++ "b/services/game-session-service/src/test/java/integration/net/firedevops/firemud/gamesession/service/GameSessionCanonicalLaunchPreparationServiceIntegrationTest.java" @@ -1006,10 +1006,11 @@ preV24Catalog.creationRequestId()) .get("complete_policy_set_evidence", byte[].class)) .isNull(); assertThatThrownBy( () -> catalogRepository.readByRequest(NAMESPACE, preV24Catalog.creationRequestId())) .isInstanceOf( - GameSessionCanonicalRealmCatalogRepository.InvalidCatalogEvidenceException.class); + GameSessionCanonicalRealmCatalogRepository.InvalidCatalogEvidenceException.class) + .hasMessageContaining("<exact missing-policy-evidence message>"); } IntakeReceipt registerFreshSource() {Replace the placeholder with the message that the repository emits for absent policy evidence.
- Accepted Historical-read negative must assert exact complete-policy-provenance rejection, not any exception from handwritten digest drift.
- Make
chk_gs_initial_admission_terminal_requires_protectionenforce what its name says.MinorThe expression is
status = 'PENDING' OR version IS NULL OR version = 1.chk_gs_initial_admission_account_protection_evidence_completealready limitsaccount_protection_evidence_versiontoNULLor1, so this new constraint is always true. It does not stop a terminal row that has no protection evidence.Only the trigger at Lines 282-297 enforces that rule. That trigger raises its error with
CONSTRAINT = 'chk_gs_initial_admission_terminal_requires_protection', so operators see a constraint name that enforces nothing. If the trigger is disabled, terminal rows without protection are accepted. The integration tests in this PR already disable owner triggers in other places.Use a
NOT VALIDcheck. It enforces the rule on every new insert and update but does not re-check the historical V28 terminal rows, which are not backfilled.🛡️ Proposed fix
--- "a/services/game-session-service/src/main/resources/db/migration/V1006__canonical_initial_admission_terminal_protection.sql" +++ "b/services/game-session-service/src/main/resources/db/migration/V1006__canonical_initial_admission_terminal_protection.sql" @@ -52,10 +52,8 @@ AND original_owner_fence > 0 AND account_protection_evidence_bytes IS NOT NULL AND octet_length(account_protection_evidence_bytes) BETWEEN 1 AND 8388608)), - ADD CONSTRAINT chk_gs_initial_admission_terminal_requires_protection - CHECK (status = 'PENDING' - OR account_protection_evidence_version IS NULL - OR account_protection_evidence_version = 1); + ADD CONSTRAINT chk_gs_initial_admission_terminal_requires_protection + CHECK (status = 'PENDING' OR account_protection_evidence_version = 1) NOT VALID; CREATE UNIQUE INDEX uq_gs_initial_admission_protected_original_attempt ON game_session_canonical_initial_admission_attempt (target_namespace, original_owner_attempt_id)- Accepted Tautological protection check must enforce nonnull version1 for terminals, NOT VALID preserves pre1006 immutable history. Proposed bare version=1 has SQLNULL hole; explicit nonnull check and real PG denial proof required.
- Update the Javadoc and remove the unreachable descriptor helper.Trivial
startRunOwnedInitialLaunchnow always throwsRUN_OWNED_WORLD_MATERIALIZATION_UNAVAILABLE. The Javadoc at Lines 237-240 still says the method "Starts or resumes a local fixture launch under a durable, tenant/request-bound owner identity". That text contradicts the refusal-before-effects boundary. The privaterequireExactAuthoredWorldDescriptorRequest(Lines 769-809) has no caller in the visible code after the run-owned preflight was removed. Change the Javadoc to describe the refusal. Delete the helper unless another caller exists.- Accepted Describe actual fixture refusal-before-effects and remove now-unreachable private descriptor helper after caller verification; no lifecycle wiring.
- Add provider tests for the new Game Session read stages.Trivial
The
provider(...)helper always passesnullforserviceEndpointsandgrpcChannelFactory. No test reachesGAME_SESSION_FIXTURE_READorGAME_SESSION_FIXTURE_COMPARE.These cases have no coverage:
- The missing-configuration rejection in
gameSessionFixtureClient(). - A
created.init()failure that must close the partial client. - A
readFixtureexception that must map to the content-freeInvalidRunOwnedWorldLaunchEvidenceExceptionwithstage=GAME_SESSION_FIXTURE_READin the log. - A returned association that differs from the receipt and must be rejected at
GAME_SESSION_FIXTURE_COMPARE.
The existing tests stop at
CAPABILITY_FILEorWIRE_PARSE. The cases above would need a valid wire fixture plus aGrpcPeerIdentityandGrpcPeerCertificateEvidencecontext. A test can also stub the client through a package-private factory seam. Add at least the mismatch case and the read-failure logging case.- Accepted Extend existing World provider tests through actual read/compare stages, including bound result mismatch and content-free read failure/stage log; no production authority expansion.
- The missing-configuration rejection in
- Hosted Review 2 CompletedRuntime 12m 47sFound: 3 Accepted: 0/1/2 Routed: 0
- Make the descriptor-mismatch tests reach
parseSourceReceipt.TrivialsourceReceiptJsonnow computes the seal withfixturePolicyRequestDigest. That call runsrequireFixtureBinding, which already rejects an unknown nested descriptor field, a mismatched version, or a mismatched release reference. TheSupplieroverload callsjson.get()inside theassertThatThrownBylambda. As a result, the three cases inrejectsRecursiveUnknownProtoFieldsAndDescriptorProjectionMismatchesfail while the test builds its fixture, beforeparseSourceReceiptruns. The overload also accepts anyIllegalArgumentExceptioninstead ofInvalidWireDataException.The tests therefore pass without proving that the receipt parser refuses these inputs.
To fix this, build the JSON outside the assertion. Compute the seal from the valid launch evidence, then replace only the encoded
launchDescriptorBase64value. The negative case then reachesparseSourceReceipt, and the strictassertInvalidReceipt(String)helper applies.♻️ Proposed approach
--- "a/services/common-platform-core/src/test/java/net/firedevops/firemud/common/smoke/RunOwnedInitialAdmissionFixtureWireCodecTest.java" +++ "b/services/common-platform-core/src/test/java/net/firedevops/firemud/common/smoke/RunOwnedInitialAdmissionFixtureWireCodecTest.java" @@ -333,10 +333,11 @@ .isInstanceOf(RunOwnedInitialAdmissionFixtureWireCodec.InvalidWireDataException.class); } - private static void assertInvalidReceipt(java.util.function.Supplier<String> json) { - assertThatThrownBy(() -> parseSourceReceipt(json.get(), capability())) - .isInstanceOf(IllegalArgumentException.class); - } + private static String receiptWithDescriptor(LaunchDescriptor descriptor) { + // Seal is computed over the valid launch evidence; only the wire descriptor is substituted. + return validSourceReceiptJson() + .replace(encode(launchDescriptor().toByteArray()), encode(descriptor.toByteArray())); + } private static void assertInvalidReceipt(String json) { assertInvalidReceiptBytes(json.getBytes(StandardCharsets.UTF_8));Then call
assertInvalidReceipt(receiptWithDescriptor(descriptorWithNestedUnknownFields))and use the same form for the twodescriptorFor(...)cases.- Accepted Three descriptor-negative Supplier tests throw during fixture generation before parser, accepting any IllegalArgumentException. Build sealed valid receipt first, substitute wire descriptor outside assertion, assert strict codec exception.
- Remove the unused single-argument overload.Trivial
prepareInitialPublicProduction(request)now always throws, and no production or test caller uses this overload. Catalog creation uses the two-argument overload with published-policy evidence.--- "a/services/game-session-service/src/main/java/net/firedevops/firemud/gamesession/repository/GameSessionCanonicalRealmCatalogRepository.java" +++ "b/services/game-session-service/src/main/java/net/firedevops/firemud/gamesession/repository/GameSessionCanonicalRealmCatalogRepository.java" @@ -138,15 +138,6 @@ * The returned opaque prepared value can only be constructed by this repository and is verified * again against the locked immutable owner rows during creation. */ - @Transactional(propagation = Propagation.NOT_SUPPORTED, readOnly = true) - public PreparedInitialPublicProduction prepareInitialPublicProduction( - CreateCanonicalRealmCatalogRequest request) { - Objects.requireNonNull(request, "request"); - requireCommittedRead(); - throw new InvalidCatalogEvidenceException( - "Complete immutable published policy evidence is required"); - } - @Transactional(propagation = Propagation.NOT_SUPPORTED, readOnly = true) public PreparedInitialPublicProduction prepareInitialPublicProduction( CreateCanonicalRealmCatalogRequest request,- Accepted Confirmed all production/test callers use the published-evidence two-argument catalog overload. Remove unused always-throwing single-argument overload; retain Javadoc on real implementation and existing fail-closed guards.
- Bind
provenanceKindinrequireFixtureBinding.MinorrequireFixtureBindingchecks namespace, canonical tenant, source game row and source game tenant key betweencreationandsource. It does not comparecreation.provenanceKind()withsource.provenanceKind().Two other paths do check this pair:
RunOwnedFixturePolicyProducer.sealAndReadin Game Design.RunOwnedInitialAdmissionFixtureCoordinator.requireExactSourceReceiptin Game Session.
This shared codec is the parser that
parseSourceReceiptandparseFixturePolicyRequestBytesuse. World consumes the receipt through it. The current result is that a receipt whose creation and source provenance differ passes this boundary. Add the comparison so every consumer applies the same closed binding.🛡️ Proposed fix
|| creation.sourceGameRowId() != source.sourceGameRowId() || !creation.sourceGameTenantKey().equals(source.sourceGameTenantKey()) + || !creation.provenanceKind().equals(source.provenanceKind()) || !Long.toString(capability.tenantId()).equals(source.sourceGameTenantKey())- Accepted Shared codec omits exact creation/source provenance binding enforced by producer/coordinator. Add comparison and meaningful parser/request refusal coverage.
- Subagent Review 2 CompletedModel not recordedFound: 1 Accepted: 0 Routed: 1
- Game Session can report gameplay readiness UP after its synthetic player ResolveLook is rejectedMajor
At source HEAD 39a52bd4d4ba7533663be6edf3d6c1cafcfd3e58, Game Session readiness calls player-facing Game Logic ResolveLook with INTERNAL_PROBE, then records UP for any response envelope without checking LookResult.error. Game Logic requires GAMEPLAY_SESSION plus an admitted routing bundle, so it rejects the probe as SESSION_ATTESTATION_INVALID. This permits false-positive Game Session readiness. It does not by itself explain Game Logic HTTP 503; Game Logic has a separate private World/Entity probe. The approved Game Session candidate fix is authenticated existing Game Logic Ping plus bounded registered Game Logic HTTP dependency readiness, retaining local and Account conditions and failing closed. Ping alone is not downstream readiness; neither signal proves gameplay admission or a playable path.
Route · PR #3206 → PR #3210 Accepted/FixedRoot adjudication for commissioned source investigation 1953/c12379cd-66b9-4bc2-af84-526e97c3d865 routes the Game Session readiness finding from #3206 to its owning Gameplay work in #3210. Severity is Major. This is source-finding provenance only, not a full PR or provider review. View routed finding
- Subagent Review 3 CompletedModel not recordedFound: 1 Accepted: 0 Routed: 1
- PR lifecycle retains obsolete passive resolver and polling guidanceMinor
design/developer-workflows/pr-lifecycle.md:83 says ordinary callers retain polling while the resolver is passive. Both exact inspected revisions use one-pass assessment and generic attributable PR callbacks; CI/CD Required Gate Preservation defines that canonical behavior. Replace only the stale sentence while preserving deployment/native-proof limits, deferred failure as missing proof, and explicit recovery for ambiguous outcomes. This unchanged inherited statement is outside the PR3206 source diff and belongs to the existing maintenance backlog, not that PR's fix obligations. Supplied Gameplay terminal evidence explains the stale failed check as a cancelled historical run; a different metadata attempt2 passed. No resolver-code defect or independent CI-readiness claim is established. Full rationale and evidence limits are in the scratch source report.
Route · PR #3206 → Unassigned target OpenRoot inspected the source assessment and accepts routing this inherited outside-diff Minor documentation drift to the existing tooling-maintenance-followup backlog. No source PR3206 obligation, runtime defect or independent CI-readiness claim. View routed finding
- Hosted Review 3 CompletedRuntime 16m 57sFound: 4 Accepted: 0/2/2 Routed: 0
- Classify owner-state failures as
FAILED_PRECONDITION.MinorRunOwnedInitialAdmissionLaunchEvidence.verified(),UUID.fromString(...), andFixtureResultcan throwIllegalArgumentExceptionfor invalid retained owner state. The outer catch currently reports each case asINVALID_ARGUMENT, which misclassifies a server-side precondition failure as a selector error.Keep request decoding and fixed-source selector matching in the
INVALID_ARGUMENTpath. Map later owner-stateIllegalArgumentExceptionfailures toFAILED_PRECONDITION. The generic runtime path already logs the failure. TransportStatusis valid for this read; anErrorDetailresponse field is not required.- if (request == null) { - throw new IllegalArgumentException("Fixture launch owner request is required"); - } - - // Authentication and the fixed default-off boundary precede strict wire decoding. - RunOwnedInitialAdmissionLaunchEvidence evidence = - runOwnedFixtureCoordinator.loadFixedVerifiedEvidenceForWorldPeer(); - CanonicalGameInstanceLaunchAssociationReadEvidence.FixtureRequest selector = - CanonicalGameInstanceLaunchAssociationReadGrpcCodec.fromFixtureRequest(request); - if (!fixtureReadWorkloadNamespace.equals(selector.targetNamespace()) - || !evidence.sourceEvidence().targetNamespace().equals(selector.targetNamespace()) - || !evidence - .fixtureCapability() - .operationId() - .equals(selector.fixtureOperationId().toString()) - || !evidence - .fixturePolicySeal() - .evidenceDigest() - .equals(selector.expectedFixturePolicyEvidenceDigest())) { - throw new IllegalArgumentException( - "Fixture launch owner selector differs from the fixed verified source"); - } + if (request == null) { + responseObserver.onError( + Status.INVALID_ARGUMENT + .withDescription("Fixture launch owner selector is invalid") + .asRuntimeException()); + return; + } + + // Authentication and the fixed default-off boundary precede strict wire decoding. + final RunOwnedInitialAdmissionLaunchEvidence evidence; + try { + evidence = runOwnedFixtureCoordinator.loadFixedVerifiedEvidenceForWorldPeer(); + } catch (IllegalArgumentException ownerState) { + logger.warn("GetRunOwnedFixtureLaunchAssociation owner state is invalid", ownerState); + responseObserver.onError( + Status.FAILED_PRECONDITION + .withDescription("Exact fixed fixture launch owner read is unavailable") + .asRuntimeException()); + return; + } + + final CanonicalGameInstanceLaunchAssociationReadEvidence.FixtureRequest selector; + try { + selector = CanonicalGameInstanceLaunchAssociationReadGrpcCodec.fromFixtureRequest(request); + if (!fixtureReadWorkloadNamespace.equals(selector.targetNamespace()) + || !evidence.sourceEvidence().targetNamespace().equals(selector.targetNamespace()) + || !evidence + .fixtureCapability() + .operationId() + .equals(selector.fixtureOperationId().toString()) + || !evidence + .fixturePolicySeal() + .evidenceDigest() + .equals(selector.expectedFixturePolicyEvidenceDigest())) { + throw new IllegalArgumentException( + "Fixture launch owner selector differs from the fixed verified source"); + } + } catch (IllegalArgumentException malformed) { + responseObserver.onError( + Status.INVALID_ARGUMENT + .withDescription("Fixture launch owner selector is invalid") + .asRuntimeException()); + return; + } ... - } catch (IllegalArgumentException malformed) { + } catch (IllegalArgumentException ownerState) { + logger.warn("GetRunOwnedFixtureLaunchAssociation owner state is invalid", ownerState); responseObserver.onError( - Status.INVALID_ARGUMENT - .withDescription("Fixture launch owner selector is invalid") + Status.FAILED_PRECONDITION + .withDescription("Exact fixed fixture launch owner read is unavailable") .asRuntimeException());- Accepted Retained owner-state validation is server precondition failure; preserve request decoding and selector mismatch INVALID_ARGUMENT separately.
- Keep fixture construction outside the parser assertion.Trivial
validSourceReceiptJson(...)computes the fixture-policy seal before it returns JSON. Malformed bundle, artifact, version, descriptor, or unknown-field inputs can therefore throw during fixture construction. The current helper accepts thatIllegalArgumentExceptionwithout callingparseSourceReceipt.Evaluate the supplier before
assertThatThrownBy, assertInvalidSourceReceiptException, and build seals from valid evidence before mutating only the receipt field under test.♻️ Suggested tightening
--- "a/services/game-session-service/src/test/java/unit/net/firedevops/firemud/gamesession/data/RunOwnedInitialAdmissionFixtureCapabilityTest.java" +++ "b/services/game-session-service/src/test/java/unit/net/firedevops/firemud/gamesession/data/RunOwnedInitialAdmissionFixtureCapabilityTest.java" @@ -941,17 +941,19 @@ assertInvalidSourceReceiptBytes(json.getBytes(java.nio.charset.StandardCharsets.UTF_8)); } private static void assertInvalidSourceReceipt(Supplier<String> receiptJson) { + byte[] bytes = receiptJson.get().getBytes(java.nio.charset.StandardCharsets.UTF_8); assertThatThrownBy( () -> RunOwnedInitialAdmissionFixtureCapability.parseSourceReceipt( - receiptJson.get().getBytes(java.nio.charset.StandardCharsets.UTF_8), + bytes, RUN_ID, PROJECT_NAME, capability(), pins())) - .isInstanceOf(IllegalArgumentException.class); + .isInstanceOf( + RunOwnedInitialAdmissionFixtureCapability.InvalidSourceReceiptException.class); } private static void assertInvalidSourceReceiptBytes(byte[] bytes) { assertThatThrownBy(- Accepted Supplier construction currently can satisfy parser-negative assertion before parser; build valid fixture then mutate receipt and assert exact parser exception.
- Add the required
Observationfield to the new entry.MinorThe file defines a fixed entry format:
Context,Observation, andExpected pattern. This entry hasContext,Expected pattern, andCurrent status. It has noObservationline. The surprising result is stated only insideContext.Move that surprising result into its own
Observationline. You can keepCurrent statusas an extra field.Proposed fix
--- "a/design/project-management/ai-observations.md" +++ "b/design/project-management/ai-observations.md" @@ -271,7 +271,8 @@ - Expected pattern: bound optional external uploads within the containing job's budget and preserve time for required proof artifacts. `continue-on-error` alone cannot protect against whole-job cancellation. Keep cancelled aggregate proof separate from successful individual checks. - Current status: the Codecov step is bounded to two minutes with its existing failure tolerance retained. New-head cloud validation remains required to verify the workflow outcome. - `2026-10-14`: Wait for the database-owned expiry condition in lock-race proof - - Context: a canonical Game Session pin test established its real PostgreSQL INSERT lock wait, then expected a finite owner lease to have expired after a fixed host sleep. The database still reported the lease live, so the intended post-expiry race was not established. + - Context: a canonical Game Session pin test established its real PostgreSQL INSERT lock wait, then expected a finite owner lease to have expired after a fixed host sleep. + - Observation: the database still reported the lease live after the sleep, so the intended post-expiry race was not established. - Expected pattern: retain the original finite lease and exact blocker, poll the same PostgreSQL expiry predicate used by the owner within a bounded deadline, then release the lock and assert refusal without mutation. Do not change the lease, renew authority, weaken the refusal assertion or infer clock skew from the failed sleep assumption. - Current status: the test now waits for the database-owned expiry condition; current physical qualification remains required.As per coding guidelines: "Entry format: -
YYYY-MM-DD: short title - Context: where it appeared - Observation: what was surprising or wasteful - Expected pattern: what should happen instead".- Accepted Own dated entry lacks required Observation field; retain content while separating observed result from context.
- Inject
creationRepositorythrough the constructor.TrivialThe class already uses constructor injection for every other collaborator.
creationRepositoryis a private@Autowiredfield. A caller that constructsRunOwnedFixtureLaunchReadbackdirectly gets a nullcreationRepository, andreadCommittedCreation(Line 123) then throwsNullPointerException.TestDataSeederTest(Line 314) works around this withReflectionTestUtils.setField. The field-only dependency also hides the requirement from the constructor signature and from SpotBugsEI_EXPOSE_REP2handling.Add the repository as a final constructor parameter. Then update the direct construction in
TestDataSeederTest.TestDataSeederuses the same field-injection pattern forcreationRepositoryandfixturePolicyProducer, so apply the same change there.♻️ Proposed refactor
--- "a/services/game-design-service/src/main/java/net/firedevops/firemud/gamedesign/data/RunOwnedFixtureLaunchReadback.java" +++ "b/services/game-design-service/src/main/java/net/firedevops/firemud/gamedesign/data/RunOwnedFixtureLaunchReadback.java" @@ -52,9 +52,8 @@ private final VersionAssetArtifactService artifactService; private final LaunchDescriptorService launchDescriptorService; - @org.springframework.beans.factory.annotation.Autowired - private net.firedevops.firemud.gamedesign.repository.GameTenantCreationRepository - creationRepository; + private final net.firedevops.firemud.gamedesign.repository.GameTenantCreationRepository + creationRepository; @SuppressFBWarnings( value = "EI_EXPOSE_REP2",public RunOwnedFixtureLaunchReadback( GameRepository gameRepository, GameTemplateRepository templateRepository, VersionRepository versionRepository, VersionAssetArtifactRepository artifactRepository, GameAuthoredWorldSourceRepository sourceRepository, VersionService versionService, VersionAssetArtifactService artifactService, LaunchDescriptorService launchDescriptorService, GameTenantCreationRepository creationRepository) { ... this.creationRepository = Objects.requireNonNull(creationRepository, "creationRepository"); }- Accepted Required owner collaborators hidden by field injection; constructor injection and all direct callers must be coherent.
- CLI Review 3 CompletedRuntime 3m 42sFound: 6 Accepted: 0/2/0 Routed: 0
- State the World fixture authentication as source capability, not current behavior.Minor
Line 19 says "The current run-owned fixture independently authenticates the Game Design descriptor and canonical Game Session
STARTINGallocation." The World API contract (api-contracts.mdLine 286) calls this "Target integration".api-contracts.mdLine 288 says no current production lifecycle caller invokes the provider. In the current code, World fixture bootstrap skips seeding and prepare/activate refuse before effects. No current World path performs this authentication.The two architecture documents therefore conflict about current state. Change Line 19 so that it matches
api-contracts.mdLine 288. For example: "The provider's authenticated descriptor and Game Session allocation reads exist as source capability; no current lifecycle caller invokes them."As per path instructions: "Flag obsolete transitional guidance, conflicts between architecture docs".
- Accepted Verified World runtime status claims current authentication while API and default-denied lifecycle code describe prepared provider source only. Align this one status statement; retain actual bootstrap/prepare/activation refusal and owner links.
- Confirm that no caller can reach
reservewhile Humancommit/abortare denied.Minorcommitandabortnow always throwunavailableHumanAdmissionProtection().reserve(Lines 92-186) still inserts a durablePENDINGattempt.If any caller reaches
reserve, these consequences follow:- No code can move that attempt to
COMMITTEDorABORTED. findPendingForRealmrejects every later request for the same realm with "Another initial-admission request already owns the pending realm attempt".- The owner-proof read returns
PENDINGindefinitely. World termination for a bound hold therefore stays fenced.
The documentation says Human preparation refuses "before intent reservation".
DatabaseCanonicalInitialAdmissionServiceis not in the supplied code, so I cannot confirm this guard. Verify that the service throws before it callsreserve.If you want the same guard in the repository, deny the call at the top of
reserve:🛡️ Optional repository-level guard
public void reserve(CanonicalInitialAdmissionRequest request) { Objects.requireNonNull(request, "request"); + throw unavailableHumanAdmissionProtection();Do not add this guard if the retained repository tests require
reserveto remain writable.Also applies to: 211-211
- Rejected Verified DatabaseCanonicalInitialAdmissionService.bind/abort deny before any reserve call; no production caller invokes this repository reserve. Retained physical repository proof intentionally remains writable. Already-qualified before-effects Human refusal preserved.
- No code can move that attempt to
- Confirm that no background work writes to the schema during the snapshot window.Minor
postgresState()captures three things for the fullworld_management_serviceschema:- Every row of every table.
- The
xminvalue of each row. - The
last_valueof every sequence.
The test boots the full
WorldManagementServiceApplication. OnlyGrpcServerLifecycleis mocked. Assume a scheduled orApplicationRunnercomponent writes to a table or advances a sequence between the two snapshots. Examples are lease, heartbeat, outbox, and event-pruning jobs. ThenassertThat(postgresState()).isEqualTo(before)fails without a fixture defect, and CI becomes flaky.Confirm that no scheduled or asynchronous component writes in this test context. If one does, use one of these fixes:
- Limit the snapshot to the tables and sequences that prepare and activate can touch, such as
world_instanceand the region, zone, and room instance tables. - Disable the scheduler in this test.
- Rejected Verified isolated fixture: only expiry/event/hold schedulers exist; class creates no eligible instance/event/hold rows, seeder default-off runs before tests. No background schema writer demonstrated; retain whole-schema/xmin/sequence assertions.
- Remove the
ResolveLaunchDescriptorpreflight claim or mark it as target-only.MinorLine 182 says that only "The World preparation and first-
OPENparagraphs below define the complete target ordering". A reader therefore takes the Game Session paragraph at Line 192 as current behavior. Line 192 says "Preflight exact-compares authenticatedResolveLaunchDescriptorwith the retained projections."The new
RunOwnedInitialAdmissionFixtureCoordinator.coordinatedoes not make this call. It validates the receipt, callscreateVerifiedFixtureStartingLaunch, and compares that result with an independent readback. No remote descriptor resolution occurs.Use one of these corrections:
- Delete the preflight sentence.
- Move the preflight sentence to the target-ordering scope that Line 182 defines.
As per path instructions: "Review docs for canonical-current-state consistency."
- Accepted Verified trusted GS coordinator validates receipt, creates STARTING and reads back; it does not call remote ResolveLaunchDescriptor. Remove unsupported preflight-current sentence; retain canonical producer/World target ordering.
- One historical catalog row now makes the whole discovery read fail.Major
toSnapshotnow throwsInvalidCatalogEvidenceException("Exactly one complete catalog policy provenance required")in these cases:complete_policy_set_evidenceandfixture_policy_request_bytesare both null. This is the state of every V23 catalog row.- The tenant's
game_session_fresh_tenant_associationrow has nocomplete_source_evidence(a pre-V1003 row).verifyStoredFreshAssociationfails intoAssociation, and that failure is wrapped asInvalidCatalogEvidenceException.
readVisiblePublicProductionSnapshotsmapstoSnapshotover every public-production row in the namespace. If one retained row exists, player discovery fails for all tenants, including fresh ones.readUniqueVisiblePublicProduction,lockInitialAdmissionTargetandlockExactInitialPublicProductionalso fail for those tenants.This contradicts the V1004 header, which says historical V23 catalog rows "remain readable as historical catalog state".
GameSessionCanonicalLaunchPreparationServiceIntegrationTest.requireHistoricalRowsRetainedasserts the single-row denial. No test covers the list read with a retained row present.The change also adds an association select, a claim validation and a policy decode for every row in the discovery read. That makes the existing per-row query cost on this path worse.
Correction: skip rows that have no complete provenance in the discovery list read, or report them separately, so that one retained row cannot break discovery for other tenants. Keep the fail-closed behavior for single-target reads. Then align the V1004 comment and the architecture docs with the behavior you choose.
Please confirm whether any deployed namespace contains V23 catalog rows or pre-V1003 fresh associations. Also confirm whether the discovery caller already filters them.
- Rejected Repeated deliberately selected whole-catalog fail-closed provenance rule, previously adjudicated. Historical SQL bytes remain readable/retained but unqualified as complete current evidence. Do not silently skip malformed retained rows or reinterpret immutable V1004 history.
- Check that the injected-proto negative tests still exercise the intended validators.Trivial
validSourceReceiptJson()computesfixturePolicySealfrom the original bundle, artifact state, version state, and descriptor.sourceReceiptWithLaunchReadEvidenceProtoreplaces only one base64 field. The seal stays unchanged. SupposeparseSourceReceiptrecomputesfixturePolicyRequestDigestand compares it to the seal. Then every mutated receipt fails on the seal mismatch before it reaches the check the test names. Examples are the canonical tenant ID, the tombstoned artifact, the epoch0, the missing manifest key, and the unknown fields. Those tests would still pass if the specific validators were removed.Confirm the order of checks in
RunOwnedInitialAdmissionFixtureCapability.parseSourceReceipt. If the seal check runs first, use one of these fixes:- Recompute the seal from the mutated evidence inside the helper.
- Assert a distinguishing cause or message for each case.
♻️ Sketch: build the receipt from the mutated evidence
- private static String sourceReceiptWithLaunchReadEvidenceProto( - String fieldName, byte[] replacementBytes) { - String validReceipt = validSourceReceiptJson(); + // Prefer an overload of validSourceReceiptJson(bundle, artifactState, versionState, descriptor) + // that recomputes fixturePolicySeal from the supplied (mutated) evidence, so each negative case + // reaches its intended validator instead of the seal-digest check.- Rejected Verified parse order: recursively unknown protobuf and launch/descriptor identity checks run BEFORE fixture seal digest comparison. Mutated malformed protobuf tests reach their named validators; rebuilding invalid owner seals would mask the intended parsing boundary.
- CLI Review 4 CompletedRuntime 3m 05sFound: 3 Accepted: 0/0/1 Routed: 0
- Check that transport-status errors in the new RPC follow the gRPC application-error contract.Minor
The other handlers in this class return application failures in the response. They set
response.setError(GrpcAppErrors.error(...))and then callonNext/onCompleted.getRunOwnedFixtureLaunchAssociationdoes not. It sends every failure throughresponseObserver.onError(Status.…), including authorization, invalid selector, disabled boundary and unavailable owner state.If the documented FireMUD invariant requires application errors inside the response, this handler breaks it. The World Management client then receives transport exceptions instead of a typed
ErrorDetail. It can also lose theGrpcAppErrorsmetrics and logging.Confirm two facts:
- Whether
GetRunOwnedFixtureLaunchAssociationResponsehas anerrorfield. - Whether the World-side client for this RPC expects transport
Statuscodes.
If the response has an error field, use the in-band pattern that the rest of the class uses. If transport status is the intended contract for this RPC, document that exception in the API contract.
- Rejected Verified closed private response has no ErrorDetail field and authenticated owner-read client expects non-OK transport status. GS API outcome/transport classification explicitly permits failures preventing a domain result; this RPC follows that contract.
- Whether
- Remove the test helpers that the deleted success-path tests left uncalled.Trivial
This change removed the human bind/replay tests and the run-owned World success tests. The private helpers that only those tests used remain in the files. No visible code calls them now.
services/game-session-service/src/test/java/unit/net/firedevops/firemud/gamesession/service/impl/DatabaseCanonicalInitialAdmissionServiceTest.java#L70-L94: deletependingProof,abortedProof,worldProof,assertWritableReadCommittedTransaction,assertOutsideTransaction,writableReadCommittedRequiresNew, and the unused commit/rollback counters and commit-failure branch inRecordingTransactionManager.services/game-session-service/src/test/java/unit/net/firedevops/firemud/gamesession/service/impl/GameInstanceServiceImplTest.java#L220-L231: deleteconfigureRunOwnedWorld(Lines 1783-1838) andrunOwnedWorldSnapshot(Lines 1840-1860). These helpers simulate a run-owned prepare/activate path, and the new test asserts that this path is unavailable.
If SpotBugs scans test sources, these uncalled private methods can also raise
UPM_UNCALLED_PRIVATE_METHOD.- Accepted Verified orphaned success-path fixture helpers in both named test classes; remaining refusal/retained-state cases never call them. Remove only those helpers and unused transaction counters/branch, preserving every active assertion.
- A historical catalog row without policy provenance now breaks the namespace-wide discovery read.Major
toSnapshotnow throwsInvalidCatalogEvidenceExceptionwhen a row has neithercomplete_policy_set_evidencenorfixture_policy_request_bytes. Every row written before V1004 is in this state.readByRequest,readByRealmandreadUniqueVisiblePublicProductiontherefore fail closed for one tenant. That behavior can be intentional.readVisiblePublicProductionSnapshotsis different. It maps every public-production row in the namespace throughtoSnapshot. If one retained row is in the namespace, the method throws for the complete list. Player discovery then fails for all tenants in that namespace, not only for the historical tenant.The new behavior also contradicts the V1004 migration comment: "Historical V23 catalog rows remain readable as historical catalog state".
GameSessionCanonicalLaunchPreparationServiceIntegrationTest.requireHistoricalRowsRetainedchecks onlyreadByRequest. No test covers the discovery list.Verify whether deployed namespaces contain public-production catalog rows created before V1004. If they do, exclude rows without provenance from the discovery query. Do not let one retained row fail the whole list. Also align the V1004 comment with the chosen behavior.
Proposed fix: filter the discovery query
return dsl.selectFrom(CATALOG) - .where(TARGET_NAMESPACE.eq(targetNamespace).and(PUBLIC_PRODUCTION.isTrue())) + .where( + TARGET_NAMESPACE + .eq(targetNamespace) + .and(PUBLIC_PRODUCTION.isTrue()) + .and( + DSL.field(DSL.name("complete_policy_set_evidence")) + .isNotNull() + .or(DSL.field(DSL.name("fixture_policy_request_bytes")).isNotNull()))) .orderBy(CANONICAL_TENANT_ID.asc(), REALM_ID.asc())- Rejected Same previously adjudicated whole-catalog fail-closed provenance requirement. Immutable V1004 retains historical SQL state without adopting it as current complete evidence; silent namespace filtering would change selected semantics, not fix drift.
- CLI Review 5 CompletedRuntime 11m 22sFound: 3 Accepted: 0/0/1 Routed: 0
- Check that the Game Session result matches the issued read request.Minor
The provider creates
fixtureReadRequestwith a freshreadRequestId. It then passesgameSessionAssociationtoRunOwnedWorldLaunchEvidencewithout checking thatgameSessionAssociation.request()equalsfixtureReadRequest.requireExactGameSessionFixtureAssociationchecksfixtureOperationId,targetNamespace, and the policy evidence digest. It does not checkreadRequestId. A replayed or cached owner response with a differentreadRequestIdtherefore passes this boundary. ThevalidAlternateFixtureAssociationIsRejectedAtCompareStagetest also returns an association whosereadRequestId(5d85bfbe-...) differs from the issued request. That test is rejected only because the canonical tenant differs.The test comment says that the real
CanonicalGameInstanceLaunchAssociationClientrejects mismatched responses. Confirm thatreadFixturechecks the echoedreadRequestId. If it does not, add the binding here. The check costs one comparison either way.The provider also does not check
currentGameInstanceStatus. If the design requires the association to beSTARTING, check that here as well.🛡️ Proposed fix
CanonicalGameInstanceLaunchAssociationReadEvidence.FixtureResult gameSessionAssociation = gameSessionFixtureClient() .readFixture(fixtureReadRequest, capability.gameSessionLeafSha256()); stage = VerificationStage.GAME_SESSION_FIXTURE_COMPARE; + if (!fixtureReadRequest.equals(gameSessionAssociation.request())) { + throw invalidEvidence(); + }- Rejected Real readFixture decodes expected request via fromFixtureResponse, rejecting all echo identity mismatches before provider sees it. FixtureResult constructor independently requires STARTING. Mock bypass is not runtime gap.
- Historical catalog rows now make every catalog read fail, including namespace-wide discovery.Major
toSnapshotnow throwsInvalidCatalogEvidenceExceptionin two cases:- The row has neither
complete_policy_set_evidencenorfixture_policy_request_bytes. verifyStoredFreshAssociationcannot parsecomplete_source_evidence.
V1004 and V1003 leave both columns NULL on historical rows. These rows are V23 catalog rows and V25 fresh associations.
toSnapshotis the shared mapper forreadByRequest,readByRealm,readUniqueVisiblePublicProduction,lockInitialAdmissionTarget, andreadVisiblePublicProductionSnapshots.The last method maps every public-production row in the namespace in one pass (
.fetch().map(this::toSnapshot)). One historical row therefore fails player discovery for every tenant in that namespace. The cause is not limited to the tenant that owns the old row.This also contradicts the V1004 migration comment: "Historical V23 catalog rows remain readable as historical catalog state".
GameSessionCanonicalLaunchPreparationServiceIntegrationTest.requireHistoricalRowsRetainednow asserts the unreadable behavior.Each snapshot also adds an association, claim, and reservation join query before the existing source and namespace queries. This makes the discovery list an N+1 query path.
Correction options:
- Option 1: keep historical rows readable as catalog state. Make provenance validation a separate step on the paths that grant new authority (create, lock, admission target).
- Option 2: make
readVisiblePublicProductionSnapshotsskip or isolate rows that fail provenance validation, so one row cannot fail the whole list.
Whichever option you choose, update the V1004/V1003 comments or the code so they agree.
Verify whether any deployed namespace has pre-V1004 public-production catalog rows or pre-V1003 fresh associations.
- Rejected Canonical selected whole-catalog contract requires complete provenance and fails closed for historical partial rows; retained SQL history is not current owner evidence. Silent filtering would weaken selected contract, not fix it.
- The row has neither
- Add a fresh-schema fixture test through the actual seeder entrypoint.Trivial
prepareFixturecommits creation directly, then seeds with the fixture disabled. Successful fixture cases therefore start with an existing creation receipt, Version and template. They do not exercise the new first-run ordering inservices/game-design-service/src/main/java/net/firedevops/firemud/gamedesign/data/TestDataSeeder.javaat Line 145.Add a separate case that enables the fixture before the first
seeder.runon an empty schema. Verify creation, source, descriptor, policy seal and receipt readback. Also verify that a rolled-back first run publishes no receipt. Keep the existing setup for replay and mismatch cases.- Accepted Existing prepareFixture manually commits creation then seeds disabled, omitting actual fresh-first-entry fixture-enabled path. Add fresh-schema real seeder success/after-commit receipt and rollback/no owner rows or receipt proof.
- CLI Review 6 CompletedRuntime 3m 46sFound: 6 Accepted: 0/2/1 Routed: 0
- The
DSLContext-only constructors leave transaction fields null, and public methods dereference those fields without a guard.MinorBoth repositories now have two constructors. The legacy
DSLContextconstructor setsworkloadNamespace,writeTransaction, andreadTransactionto null. Public methods then call.equalsor.executeon those fields. On a legacy-constructed instance, these methods fail with a bareNullPointerException, not a clear composition error.associateFreshTenantalready shows the correct pattern: it checks its composition and throwsIllegalStateException.services/game-session-service/src/main/java/net/firedevops/firemud/gamesession/repository/GameSessionCanonicalRealmCatalogRepository.java#L1332-L1337: add arequireFixtureComposition()check at the start ofestablishVerifiedFixtureRealmandreadVerifiedFixtureRealm. The check must throwIllegalStateExceptionwhenworkloadNamespace,writeTransaction, orreadTransactionis null.services/game-session-service/src/main/java/net/firedevops/firemud/gamesession/repository/GameSessionFreshTenantAssociationRepository.java#L480-L489: inreadByCanonicalTenantId, throwIllegalStateExceptionwhenreadTransactionorworkloadNamespaceis null, before the call toreadTransaction.execute.
- Accepted Legacy DSL-only construction leaves fixture transaction/namespace composition absent; explicit fail-closed composition guards improve public boundary and avoid incidental NPE. Add focused guard proof.
- Reject a blank workload namespace, not only
null.MinorThe public constructor binds
workloadNamespacefrom${firemud.grpc.workload-namespace:}. The default value is an empty string, notnull. The guardworkloadNamespace == nulltherefore passes when the property is absent. The provider then creates the Game Session client with an empty namespace. The class already has ablankhelper. Use it so that missing configuration fails atGAME_SESSION_FIXTURE_READwithout a client being created. The unit testfixtureClientMissingConfigurationFailsAtReadStageWithoutCreatingClientasserts that behavior for missing endpoints.Proposed fix
- if (serviceEndpoints == null || grpcChannelFactory == null || workloadNamespace == null) { + if (serviceEndpoints == null || grpcChannelFactory == null || blank(workloadNamespace)) { throw invalidEvidence(); }- Accepted Blank workload namespace passes provider constructor default; reject missing configuration before client creation and add focused denial proof.
- Deny
reservetoo, or confirm that no caller can reach it.Minorcommitandabortnow always throwCanonicalHumanAdmissionProtectionUnavailableException.reserve(unchanged) still inserts aPENDINGrow intogame_session_canonical_initial_admission_attempt. If any path still callsreservefor a Human request, the attempt can never reachCOMMITTEDorABORTED.findPendingForRealmthen rejects every later request for that realm with "Another initial-admission request already owns the pending realm attempt". The design docs say Human admission is refused "before intent reservation", but this repository does not enforce that rule itself.Confirm that
DatabaseCanonicalInitialAdmissionServiceandCanonicalInitialAdmissionHoldPreparationrefuse before they callreserve. If any production path can reachreserve, add the same refusal at the top ofreserve.🛡️ Proposed containment
public void reserve(CanonicalInitialAdmissionRequest request) { Objects.requireNonNull(request, "request"); + throw unavailableHumanAdmissionProtection(); - requireWritableReadCommittedOwnerTransaction();- Rejected Production DatabaseCanonicalInitialAdmissionService prepare/commit/abort and HoldPreparation refuse before reservation; no production reserve call remains. Conditional finding is already contained at actual entry.
- Check the returned
STARTINGstatus and the echoed read request ID.MinorrequireExactGameSessionFixtureAssociationcompares the operation ID, namespace, seal, policy bytes, canonical tenant, and canonical version. It does not checkgameSessionAssociation.currentGameInstanceStatus(). The class Javadoc andRunOwnedWorldLaunchEvidenceProviderdescribe this evidence as the Game Session STARTING association. If the owner returnsRUNNINGor another status, the constructor still accepts the association. The constructor also does not comparegameSessionAssociation.request().readRequestId()with the fresh read request ID the provider sent. Without that comparison, the code accepts a replayed earlier response. Confirm whetherCanonicalGameInstanceLaunchAssociationClient.readFixturealready enforces both rules. If the client does not enforce them, add the checks here.Proposed status check
|| !gameSessionAssociation .request() .expectedFixturePolicyEvidenceDigest() .equals(sourceReceipt.fixturePolicySeal().evidenceDigest()) + || gameSessionAssociation.currentGameInstanceStatus() + != CanonicalGameInstanceLaunchAssociationReadEvidence.CurrentGameInstanceStatus + .STARTING || !gameSessionAssociation.fixturePolicySeal().equals(sourceReceipt.fixturePolicySeal())- Rejected Actual readFixture binds all echoed request fields in fromFixtureResponse; FixtureResult constructor requires STARTING. Both conditions already enforced before provider evidence.
- Align this client with the existing exact-peer client pattern.Trivial
This client differs from
CanonicalGameInstanceLaunchAssociationClientin three ways:- The stub installs only
GrpcServerPeerIdentityClientInterceptor. That interceptor checks the server identity only on response. WithoutGrpcServerPeerIdentityCallCredentials, the request (creation request ID and digest) is sent before the exact Game Design workload is confirmed. resolveCreationcallsstub()directly. If the caller does not callinit()first, the call fails with aNullPointerExceptioninstead of a clear "not initialized" state.requireGameSessionMtlscopies the file-backed mTLS rules thatFileBackedGrpcMtlsPolicy.requirealready enforces.
♻️ Proposed alignment
protected TenantIdentityServiceGrpc.TenantIdentityServiceBlockingStub buildStub( ManagedChannel channel) { - return TenantIdentityServiceGrpc.newBlockingStub( - ClientInterceptors.intercept(channel, serverPeerIdentityInterceptor)) - .withCompression("gzip"); + String peer = gameDesignServerPeerUri(workloadNamespace); + return TenantIdentityServiceGrpc.newBlockingStub(channel) + .withCallCredentials(new GrpcServerPeerIdentityCallCredentials(peer)) + .withInterceptors(serverPeerIdentityInterceptor) + .withCompression("gzip"); }Also replace
stub()with a guard that throwsIllegalStateExceptionwhen the stub is null. Then delegaterequireGameSessionMtlstoFileBackedGrpcMtlsPolicy.require(...).- Accepted Align unregistered fresh-creation client with canonical exact-peer call credentials before request bytes, explicit initialization guard and existing file-backed policy; focused wrong-peer/no dispatch proof.
- The stub installs only
- Historical catalog rows now break every catalog read, including player discovery.Major
toSnapshotthrowsInvalidCatalogEvidenceException("Exactly one complete catalog policy provenance required")when bothcomplete_policy_set_evidenceandfixture_policy_request_bytesare null. Every catalog row created before V1004 is in that state.GameSessionCanonicalLaunchPreparationServiceIntegrationTest.requireHistoricalRowsRetainedasserts that exact failure for a retained row.readVisiblePublicProductionSnapshotsruns.map(this::toSnapshot)over every public-production row in the namespace. If one historical row exists, the whole player-discovery read fails for all tenants.readByRequest,readByRealm,readUniqueVisiblePublicProduction, and the lock methods also fail for those tenants. The V1004 comment says the opposite: "Historical V23 catalog rows remain readable as historical catalog state."toSnapshotnow also runsverifyStoredFreshAssociationand a full policy-set decode for each row. The discovery list therefore makes one extra association query per row (an N+1 query pattern). The fixture branch runs that association query twice per row, at Line 1303 and Line 729.Pick one contract and apply it consistently:
- Historical rows must stay readable. Return the snapshot for the both-null case without policy validation. Mark it as historical so admission paths can reject it, and keep the throw only for the both-present case.
- Historical rows must fail closed. Filter them out of
readVisiblePublicProductionSnapshotsso one row cannot deny discovery for other tenants. Then correct the V1004 comment.
Confirm whether any deployed namespace still holds pre-V1004
game_session_canonical_realm_catalogrows withpublic_production = true.- Rejected Selected canonical whole-catalog contract requires complete provenance, failing closed for historical partial rows. Silent filtering would weaken owner contract; immutable historical rows are not current evidence.
- CLI Review 7 CompletedRuntime 2m 56sFound: 4 Accepted: 1/2/1 Routed: 0
- Remove the unreachable four-argument
resolveLaunchDescriptorstub, or make it fail clearly.TrivialThe four-argument stub now calls
RunOwnedInitialAdmissionLaunchEvidenceTestFixture.create(...). That method throwsIllegalArgumentExceptionwhencontrolPlaneRequestIdis not the derived fixture operation ID. The remainingstartSessiontests use"cp-..."IDs and only call the three-argument overload. The run-owned launch path now fails before it calls Game Design. As a result, no test in this file uses this stub. If a later change sends any"cp-..."request through this overload, the failure will appear as a confusing fixture-guard exception. Delete the stub, or replace it with an explicit failure that names the unexpected call.- Accepted Remove unreachable four-argument fixture stub; retain three-argument legacy tests and fail-before-GameDesign run-owned proof.
- Catalog rows created before V1004 now fail every catalog read, including the discovery list.Major
toSnapshotnow throwsInvalidCatalogEvidenceException("Exactly one complete catalog policy provenance required")in two cases:- The row has neither
complete_policy_set_evidencenorfixture_policy_request_bytes. verifyStoredFreshAssociationcannot read a completecomplete_source_evidence.
Historical V23 catalog rows and V25 fresh associations meet both conditions. The V1004 comment says these rows "remain readable as historical catalog state". V1003 also leaves V25 association evidence nullable. The code now contradicts that contract.
Every reader uses
toSnapshot:readByRequest,readByRealm,readUniqueVisiblePublicProduction,lockInitialAdmissionTarget, andreadVisiblePublicProductionSnapshots. The last one maps every public-production row in the namespace. One historical row therefore makes player discovery fail for all realms in that namespace.The new per-row association lookup also adds one extra query for each catalog row in the list read.
Choose one fix:
- Classify historical rows explicitly. Return them as non-authoritative historical state, or skip them in
readVisiblePublicProductionSnapshots. - Or update the migration and design docs to say these rows are intentionally unreadable, and add a migration preflight that refuses to upgrade while such rows exist.
- Accepted Exclude only fully absent historical provenance from namespace discovery; retain strict invalid/current evidence denial, original rows and migration bytes.
- The row has neither
- Confirm that no background component writes to the schema during the whole-schema snapshot comparison.Minor
postgresState()captures every table inworld_management_service. For each row, it recordsto_jsonb(row)andxmin. It also records every sequencelast_value. Lines 140 and 324 then require exact equality before and after the denial calls. The test boots the fullWorldManagementServiceApplication. If any scheduled or startup component can insert or update a row while the test runs, the assertion fails. Examples of such components are tick loops, heartbeats, outbox pollers, and event retention jobs. A failure from those writes is not caused by the code under test. Sequence values are especially sensitive, because any insert into any table advances them.Verify that the Spring context starts no schedulers that write to this schema. If any such scheduler exists, limit the snapshot to the tables the lifecycle service can touch. These are
world_instance, the region/zone/room instance tables, andworld_event, plus their sequences.- Accepted Active World schedulers can mutate full-schema oracle; isolate only three unrelated scheduled writer beans, preserve real lifecycle/repositories and entire snapshot.
- Add focused coordinator proof to the
GR-1.1proof anchors.MinorThe row adds
RunOwnedInitialAdmissionFixtureCoordinator.javaas an implementation anchor. It also states the newSTARTING-only behavior. The proof cell does not list a test for the coordinator or for the fixture launch owner. The Current Status section and the PR file list show thatRunOwnedInitialAdmissionFixtureCoordinatorTest.javaandGameSessionRunOwnedCanonicalLaunchRepositoryPostgresIntegrationTest.javaexist. Add them to the proof anchors, or qualify theprovenscope so that it excludes the fixture coordinator.As per coding guidelines: "A
provenrow must also name focused executable proof."- Accepted Add coordinator unit and launch-owner PostgreSQL links to exact GR-1.1 proof cell without upgrading capability state.
- CLI Review 8 CompletedRuntime 4m 01sFound: 4 Accepted: 0/1/2 Routed: 0
- Reject a Human launch that binds to a catalog row without policy provenance.Minor
In the Human branch (
NEW.fixture_policy_request_bytes IS NULL), the function rejects a catalog row only when that row has fixture bytes. It does not requirecatalog_row.complete_policy_set_evidence IS NOT NULL. A historical V23 catalog row with all provenance columns NULL can therefore accept a new Human launch. V1004 states that such rows are "deliberately not reconstructed or adopted". The Java readers fail closed on these rows, but this guard does not.Do not edit V1010. V1011 pins the md5 of the function body. Replace the function in a new forward migration, and update the V1011-style guard proof if needed.
IF NOT FOUND OR (NEW.fixture_policy_request_bytes IS NULL AND (catalog_row.fixture_policy_request_bytes IS NOT NULL OR catalog_row.complete_policy_set_evidence IS NULL)) OR ...- Accepted Human launch SQL branch accepts all-null historical catalog provenance. Replace current guard in a forward migration with required Human complete policy evidence; preserve prior migrations/hash checks and retained rows.
- Confirm that no production caller uses the three-argument
associateFresh. Update its stale contract.TrivialThe three-argument
associateFresh(UUID, String, IntakeReceipt)now always throwsInvalidFreshTenantSourceException. Its Javadoc above still says "Persists the fresh source-bound tenant mapping or returns its exact durable replay". The method keeps@Transactional(MANDATORY)and the writable-transaction check, so a caller that has not migrated fails only at runtime.- Confirm that every production caller (fresh-tenant service, launch coordinator, configuration wiring) uses the four-argument overload or
associateFreshTenant. - If no caller remains, remove the overload. Otherwise, mark it
@Deprecatedand rewrite the Javadoc to state that it always fails. - These private helpers no longer have a caller:
requireExactAssociation,requireFreshSource,findClaimByCanonicalTenantandfindClaimByAssociationRequest. Remove them with the overload.
- Accepted Three-argument associateFresh always throws and has stale contract; production uses complete-creation API. Remove obsolete overload/dead helpers and adjust existing negative tests to supported API.
- Confirm that every production caller (fresh-tenant service, launch coordinator, configuration wiring) uses the four-argument overload or
- Verify that the association status is enforced as
STARTING.MinorrequireExactGameSessionFixtureAssociationcompares these fields against the immutable fixture receipt:- operation
- namespace
- policy seal, policy request, and policy bytes
- canonical tenant and canonical version
It does not check
gameSessionAssociation.currentGameInstanceStatus(). The class Javadoc and the provider Javadoc call the association the "Game Session STARTING" provenance.Suppose the Game Session owner returns the same allocation with status
RUNNINGorSTOPPED. Then World accepts that association as launch provenance. One cause can be a later lifecycle transition. Another cause can be a regression in theGetRunOwnedFixtureLaunchAssociationhandler.Confirm whether
CanonicalGameInstanceLaunchAssociationReadGrpcCodec.fromFixtureResponseorCanonicalGameInstanceLaunchAssociationClient.readFixturerejects a status that is notSTARTING. If neither rejects it, add the check here. Also add a unit case toRunOwnedWorldLaunchEvidenceProviderTest.Proposed guard
if (!gameSessionAssociation .request() .fixtureOperationId() .toString() .equals(capability.operationId()) + || gameSessionAssociation.currentGameInstanceStatus() + != CanonicalGameInstanceLaunchAssociationReadEvidence.CurrentGameInstanceStatus + .STARTING || !gameSessionAssociation- Accepted World fixture launch contract requires current STARTING; codec/client retain enum status without enforcing STARTING. Add owner-consumer guard plus non-STARTING unit case.
- Log the
FAILEDPRECONDITIONpaths.TrivialLog the `FAILED_PRECONDITION` paths.
The
IllegalArgumentExceptionandIllegalStateExceptionhandlers return one generic description and write no log. These branches cover several different causes: the feature is disabled, an ambient transaction is active, the owner state is invalid, and the evidence is missing. An operator cannot tell these causes apart during a smoke failure. Add alogger.warnwith the exception in both handlers. The client-facing description can stay generic.Proposed fix
} catch (IllegalArgumentException invalidOwnerState) { + logger.warn("GetRunOwnedFixtureLaunchAssociation owner state invalid", invalidOwnerState); responseObserver.onError( Status.FAILED_PRECONDITION .withDescription("Exact fixed fixture launch owner read is unavailable") .asRuntimeException()); } catch (IllegalStateException unavailable) { + logger.warn("GetRunOwnedFixtureLaunchAssociation unavailable", unavailable); responseObserver.onError(- Accepted Expected fixture owner failure branches lack diagnostics. Add bounded category warnings while preserving generic client status and avoiding payload/secret logging.
- Hosted Review 4 CompletedRuntime 10m 07sFound: 4 Accepted: 0/3/1 Routed: 0
- Set READ COMMITTED on the Human association write transaction.Minor
associateFreshTenantrunscommitAssociationinwriteTransaction, and this template uses the datasource default isolation. The fixture path requires READ COMMITTED (associateVerifiedFixtureInOwnerTransaction), but this path does not.commitAssociationfirst waits on an advisory lock and then callsreadByRequestIdInTransactionto replay a prior association. Under REPEATABLE READ, PostgreSQL takes the snapshot at the lock statement, before the lock is granted. A concurrent exact retry then does not see the committed row. It fails on the claim unique constraint instead of returning the original association. Set the isolation explicitly so this path does not depend on the deployment default.🛡️ Proposed fix
--- "a/services/game-session-service/src/main/java/net/firedevops/firemud/gamesession/repository/GameSessionFreshTenantAssociationRepository.java" +++ "b/services/game-session-service/src/main/java/net/firedevops/firemud/gamesession/repository/GameSessionFreshTenantAssociationRepository.java" @@ -344,9 +344,10 @@ throw new IllegalArgumentException("Game Session workload namespace is missing or invalid"); } this.workloadNamespace = workloadNamespace; this.writeTransaction = new TransactionTemplate(Objects.requireNonNull(transactionManager)); + this.writeTransaction.setIsolationLevel(TransactionDefinition.ISOLATION_READ_COMMITTED); this.readTransaction = new TransactionTemplate(transactionManager); this.readTransaction.setReadOnly(true); } /**Also import
org.springframework.transaction.TransactionDefinition.- Accepted Minor useful replay correctness: Human writeTransaction inherits datasource isolation while lock wait then owner replay needs fresh READ COMMITTED statement snapshots; pin existing template explicitly, preserve original ownership/lease.
- Use the file's standard entry format for the new observation.Minor
The entry at Lines 268-272 uses the required format: a `
YYYY-MM-DD: titleline, thenContext,ObservationandExpected pattern`. This new entry uses a different format:- The title line is bold and uses a dash separator.
- It has no
Contextline. - It has no
Expected patternline. It hasConsequence and recoveryandReusable lessoninstead.
The previous review accepted the fixed format for the entry at Lines 268-272. Use the same field names here so readers and tools can scan entries the same way. You can keep
Consequence and recoveryas an extra field.Proposed fix
--- "a/design/project-management/ai-observations.md" +++ "b/design/project-management/ai-observations.md" @@ -296,7 +296,8 @@ - Expected pattern: inspect the exact requested row or declaration before recording an accepted-fix resolution; verify its named anchors instead of relying on a nearby paragraph or a broad substring replacement. - Current status: the exact row is corrected and verified. An immutable audited resolution correction points to the published repair while retaining the original wrong attribution; the User and Overseer were informed. -- **2026-10-14 — Follow typed construction before accepting a missing validation finding.** - - Observation: A CLI finding claimed World accepted non-STARTING fixture allocations. Main initially accepted it after reading the codec and client but missed the shared result constructor's existing STARTING requirement; the attempted negative fixture failed before reaching World. - - Consequence and recovery: The redundant production guard was removed, the decision was corrected in the immutable controller audit, and the public checkpoint correction preserves the original review credit. Focused wire-response rejection proof verifies the actual transitive boundary. - - Reusable lesson: Follow the complete typed construction path before adjudicating an absent check. A local consumer need not repeat an invariant already enforced by every constructible input; retained findings and changed code alone are not fix proof. +- `2026-10-14`: Follow typed construction before accepting a missing validation finding + - Context: a CLI finding claimed World accepted non-STARTING fixture allocations; Main read the codec and client before adjudicating it. + - Observation: the shared result constructor already required STARTING, so the attempted negative fixture failed before reaching World. + - Expected pattern: follow the complete typed construction path before adjudicating an absent check. A local consumer need not repeat an invariant already enforced by every constructible input; retained findings and changed code alone are not fix proof. + - Consequence and recovery: the redundant production guard was removed, the decision was corrected in the immutable controller audit, and the public checkpoint correction preserves the original review credit. Focused wire-response rejection proof verifies the actual transitive boundary.As per coding guidelines: during ordinary autonomous work, append dated reusable observations to
ai-observations.md. The prior review applied the file's entry format: "YYYY-MM-DD: short title - Context - Observation - Expected pattern".- Accepted Minor useful consistency: new owned observation omits canonical Context/Expected pattern headings; align that entry only while retaining actual mistake, audit correction and proof limits.
- Update the
GR-1.1row so that its proof status matches the current boundary in Line 13 and Line 39.MinorLine 72 changes the Implementation cell to say that fresh canonical Human prepare/commit/abort refuse before effects. The Verification cell in the same row was not updated:
- It still calls Validation run 38049505627 on
efcd23e428393e71d10eb406838cee030d283cf6the "Exact-head" result. Line 13 records published heade9f026aa49bb49c7635abd0055febf520aa18321(run 38496689054) as the current whole-service result. - It still lists
DatabaseCanonicalInitialAdmissionServiceTestas proof of "Durable owner behavior". After this change, that test proves refusal before intent, hold, pointer and audit effects. It no longer proves durable commit/abort behavior.
Line 39 states that earlier whole-stack and terminal tests "belong to their recorded revisions and do not qualify this current boundary". The row's Verification cell contradicts that statement. Readers of the scan-first status surface will overstate the current proof.
Make these changes:
- Label run 38049505627 as historical attribution for its own revision.
- Cite run 38496689054 as the current scoped result.
- Describe
DatabaseCanonicalInitialAdmissionServiceTestas refusal-before-effects proof.
As per coding guidelines: "Keep its status, implementation record, validation, gaps, decisions, and service-map sections aligned when a domain boundary changes."
- Accepted Minor useful proof correctness: GR-1.1 verification still calls older efcd CI exact-head and refusal test durable behavior; qualify actual historical revisions/current scoped refusal proof without upgrading activation.
- It still calls Validation run 38049505627 on
- Use the shared codec seal constants.Trivial
SCHEMAandOWNERduplicateRunOwnedInitialAdmissionFixtureWireCodec.FIXTURE_POLICY_SEAL_SCHEMAandSOURCE_RECEIPT_OWNER_SERVICE.requireExactRowuses these local copies to build the seal. Game Session (RunOwnedInitialAdmissionLaunchEvidence.verified) and the codec'sparseSourceReceiptcompare the seal with the codec constants. If one copy changes and the other does not, every receipt is rejected. Reference the codec constants directly.♻️ Proposed refactor
--- "a/services/game-design-service/src/main/java/net/firedevops/firemud/gamedesign/data/RunOwnedFixturePolicyProducer.java" +++ "b/services/game-design-service/src/main/java/net/firedevops/firemud/gamedesign/data/RunOwnedFixturePolicyProducer.java" @@ -19,8 +19,10 @@ /** Fixed-capability fixture authority only; never emits human selected-publication evidence. */ @Service public final class RunOwnedFixturePolicyProducer { - private static final String SCHEMA = "firemud.run-owned-fixture-policy-seal.v1"; - private static final String OWNER = "game-design-service"; + private static final String SCHEMA = + RunOwnedInitialAdmissionFixtureWireCodec.FIXTURE_POLICY_SEAL_SCHEMA; + private static final String OWNER = + RunOwnedInitialAdmissionFixtureWireCodec.SOURCE_RECEIPT_OWNER_SERVICE; private final DSLContext dsl; private final RunOwnedFixtureLaunchReadback readback; private final ObjectMapper json;- Accepted Trivial useful canonical contract alignment: fixture producer repeats shared codec seal schema/owner strings. Reference canonical constants directly; no wire/authority behavior change.
- CLI Review 9 CompletedRuntime 3m 25sFound: 2 Accepted: 0/1/1 Routed: 0
- Classify invalid fixture owner responses the same way as
read.Minorreadwraps codecIllegalArgumentExceptionfailures inIllegalStateException. That marks the Game Session response as invalid owner evidence.readFixtureletsfromFixtureResponseraiseIllegalArgumentExceptiondirectly. This includesCurrentGameInstanceStatus.valueOfon an unknown status and theFixtureResultprovenance mismatches. As a result, a malformed or substituted owner response looks like a caller argument error.A World caller that maps
IllegalArgumentExceptionto a request rejection would then misreport an owner-evidence failure. Wrap the decode step the same way asread.Proposed fix
- var result = - CanonicalGameInstanceLaunchAssociationReadGrpcCodec.fromFixtureResponse(request, response); + CanonicalGameInstanceLaunchAssociationReadEvidence.FixtureResult result; + try { + result = + CanonicalGameInstanceLaunchAssociationReadGrpcCodec.fromFixtureResponse( + request, response); + } catch (IllegalArgumentException invalid) { + throw new IllegalStateException( + "Game Session returned invalid fixture launch association evidence", invalid); + }- Accepted Useful Minor consistency: readFixture lets invalid remote codec evidence escape as caller argument error; match read by wrapping only codec IllegalArgumentException as owner IllegalStateException with cause.
- Add a check that disabled mode reads no fixture paths.Trivial
The test name says that the disabled coordinator does not read fixture paths. The test checks only
launchOwner. No static mock confirms thatRunOwnedInitialAdmissionFixtureCapability.loadandloadSourceReceiptare not called. If the coordinator starts to read the configured files before it checksenabled, this test still passes. Open amockStaticscope and verify that neither loader is called.♻️ Proposed test hardening
void disabledCoordinatorDoesNotReadFixturePathsOrWriteLaunchOwner() { Fixture fixture = fixture(false); - fixture.coordinator.retryRunOwnedFixtureBootstrap(); + try (MockedStatic<RunOwnedInitialAdmissionFixtureCapability> loader = + mockStatic(RunOwnedInitialAdmissionFixtureCapability.class)) { + fixture.coordinator.retryRunOwnedFixtureBootstrap(); + loader.verify( + () -> RunOwnedInitialAdmissionFixtureCapability.load(any(), any(), any(), any()), + never()); + loader.verify( + () -> + RunOwnedInitialAdmissionFixtureCapability.loadSourceReceipt( + any(), any(), any(), any(), any()), + never()); + } verifyNoInteractions(fixture.launchOwner); }- Accepted Useful Trivial proof gap: disabled fixture coordinator must prove neither capability/source loader executes, alongside existing no owner effects. Add scoped static loader no-interaction assertion.
- Hosted Review 5 CompletedRuntime 11m 17sFound: 1 Accepted: 0/1/0 Routed: 0
- Record the V1011.1 Human launch provenance guard in the tracker status.Minor
V1011.1__canonical_human_launch_policy_provenance.sqlchangesrequire_complete_canonical_launch_catalog_identity()so new Human launches require non-emptycomplete_policy_set_evidenceand reject fixture-policy provenance. Historical all-NULL catalogs are not adopted, and existing launch/catalog rows and theirxminremain unchanged.Suggested tracker update
--- "a/design/project-management/implementation-tracking/game-session-runtime-and-tick-coordination.md" +++ "b/design/project-management/implementation-tracking/game-session-runtime-and-tick-coordination.md" @@ -12,7 +12,7 @@ The obsolete numeric fixture allocator and its lifecycle dispatch are removed. The unavailable World continuation refuses before effects under the existing default-off fixture configuration; World materialization, holds, first `OPEN` and all four genuine handoffs remain open. Exact published head `e9f026aa49bb49c7635abd0055febf520aa18321` passed [source Validation run 38496689054](https://github.com/benhook1013/FireMUD/actions/runs/38496689054), with 2,202 fresh unit, 39 cross-service and 267 integration cases, zero failures, errors or skips. The earlier local 260-integration attempt with nine failures predates that passing candidate and retains only its original unpublished-input attribution; it is not the current whole-service result. Exact `eef2c317cac61211a5619badc70e3380f5696995` subsequently passed its Game Session matrix job in [run 38505527497](https://github.com/benhook1013/FireMUD/actions/runs/38505527497), with 2,505 fresh cases and zero failures, errors or skips; the separate Dev Tool Contract Checks job failed on the World tracker verification-state cell. The snapshot guard matches V34.3’s 128-character column, and focused physical proof covers 121/128-character reservations and rejection above 128. The seven Human containment/retention cases include pre-1006 COMMITTED/ABORTED history upgraded without changing original fields, bytes or `xmin`. Rebuilt packaged proof on exact `eef2` reached healthy services and passed WebSocket `WORLDS` and `LOGIN`, then failed `PLAY` with `PLAY_SELECTION_REQUIRED`; Telnet was unrun and default authenticated cleanup removed the project resources. Its browse result contained no selectable world, consistent with the missing materialization/first-OPEN boundary. The operational dependency-readiness correction is published separately in #3210; its 70 focused cases and fresh packaged Game Session/Game Logic readiness plus WebSocket LOGIN proof do not establish an admitted `LOOK`. The canonical receipt and phase ordering remain in [Testing Strategy](../../architecture/system-architecture-testing.md#run-owned-v1-launch-read-evidence). -The migration-preservation correction restores the exact original V1005/V1006 Git blobs and applies their stricter guards through forward V1011, above the complete Game Session/shared-Saga frontier of 1010. Retained-target application status remains unknown; the source does not classify those originals as never applied. Owning jOOQ generation and 15 focused native PostgreSQL cases passed across qualified runs: ten initial-admission cases, one run-owned launch case and four launch-preparation cases. The admission suite checks original SQL bytes, original applied-history checksums and validation, staged original-1010 and direct pre1006 upgrades, unchanged historical row bytes/`xmin`/source/pointer/audit, preserved trigger/function identity, strict fresh-write rejection and transactional rollback for malformed retained protection. Four historical scenarios are one JUnit case. Selected style/static checks and pinned-parent Flyway version validation passed. These are original-history compatibility fixtures, not actual retained deployment-cohort qualification; a discovered mixed original/edited history remains a separate deployment hold requiring owner adjudication. No history repair, adoption, checksum rewrite or genuine Account terminal authority is established. +The migration-preservation correction restores the exact original V1005/V1006 Git blobs and applies their stricter guards through forward V1011, above the complete Game Session/shared-Saga frontier of 1010. V1011.1 additionally requires non-empty Human policy provenance for new Human launches, rejects fixture-policy provenance, does not adopt historical all-NULL catalogs, and leaves existing launch/catalog rows and their `xmin` unchanged. Retained-target application status remains unknown; the source does not classify those originals as never applied. Owning jOOQ generation and 15 focused native PostgreSQL cases passed across qualified runs: ten initial-admission cases, one run-owned launch case and four launch-preparation cases. The admission suite checks original SQL bytes, original applied-history checksums and validation, staged original-1010 and direct pre1006 upgrades, unchanged historical row bytes/`xmin`/source/pointer/audit, preserved trigger/function identity, strict fresh-write rejection and transactional rollback for malformed retained protection. Four historical scenarios are one JUnit case. Selected style/static checks and pinned-parent Flyway version validation passed. These are original-history compatibility fixtures, not actual retained deployment-cohort qualification; a discovered mixed original/edited history remains a separate deployment hold requiring owner adjudication. No history repair, adoption, checksum rewrite or genuine Account terminal authority is established. ### Run-owned canonical source handoff- Accepted Minor: migration-preservation status omits V1011.1 actual new Human full-policy/no-fixture enforcement and retained-row limits. Add the exact implementation/proof consequence at the existing status paragraph; no behavior or authority change.
- Hosted Review 6 CompletedRuntime 9m 19sFound: 4 Accepted: 0/1/2 Routed: 0
- Use one shared historical catalog digest helper in the tests.Trivial
Two test files each copy the production catalog request and receipt digest encoding by hand. If the copies drift from production, the historical-row tests fail on a digest mismatch, not on the provenance rule they exist to cover.
services/game-session-service/src/test/java/integration/net/firedevops/firemud/gamesession/repository/GameSessionRunOwnedCanonicalLaunchRepositoryPostgresIntegrationTest.java#L510-L523: replacehistoricalDigestwith a shared helper inCanonicalHumanPublicationOwnerTestFixtures.services/game-session-service/src/test/java/integration/net/firedevops/firemud/gamesession/service/GameSessionCanonicalLaunchPreparationServiceIntegrationTest.java#L929-L943: replacehistoricalDigestwith the same shared helper. If possible, share the historical catalog row seeder as well.
📍 Affects 2 files
services/game-session-service/src/test/java/integration/net/firedevops/firemud/gamesession/repository/GameSessionRunOwnedCanonicalLaunchRepositoryPostgresIntegrationTest.java#L510-L523(this comment)services/game-session-service/src/test/java/integration/net/firedevops/firemud/gamesession/service/GameSessionCanonicalLaunchPreparationServiceIntegrationTest.java#L929-L943
- Accepted Verified duplicate historical test digest implementation. Consolidate in existing historical fixture helper, preserve exact literal historical encoding and each test boundary; no production/schema derivation.
- Set READ COMMITTED isolation on the fixture launch write transaction.Minor
writeTransactionsets onlyPROPAGATION_REQUIRES_NEW, so it uses the datasource default isolation level. The commit callback first waits onpg_advisory_xact_lock, then callsreadLaunchRowByOperationInTransaction(..., true)to replay an existing launch.Under PostgreSQL REPEATABLE READ, the snapshot starts with the lock statement, before the lock is granted. A concurrent exact contender then does not see the committed launch row. The contender inserts a duplicate and fails on a unique constraint instead of returning the original allocation. The coordinator retry path eventually recovers, but the replay contract depends on the deployment default.
GameSessionCanonicalRealmCatalogRepositoryandGameSessionFreshTenantAssociationRepositoryalready setISOLATION_READ_COMMITTEDon their write templates for this reason. Apply the same setting here.🛡️ Proposed fix
--- "a/services/game-session-service/src/main/java/net/firedevops/firemud/gamesession/repository/GameSessionCanonicalInstanceLaunchRepository.java" +++ "b/services/game-session-service/src/main/java/net/firedevops/firemud/gamesession/repository/GameSessionCanonicalInstanceLaunchRepository.java" @@ -43,8 +43,9 @@ } this.workloadNamespace = workloadNamespace; this.catalogRepository = Objects.requireNonNull(catalogRepository, "catalogRepository"); this.writeTransaction = new TransactionTemplate(transactionManager); this.writeTransaction.setPropagationBehavior(TransactionDefinition.PROPAGATION_REQUIRES_NEW); + this.writeTransaction.setIsolationLevel(TransactionDefinition.ISOLATION_READ_COMMITTED); this.readTransaction = new TransactionTemplate(transactionManager); this.readTransaction.setReadOnly(true); this.readTransaction.setIsolationLevel(TransactionDefinition.ISOLATION_REPEATABLE_READ);- Rejected Duplicate of already accepted CLI10 finding1 from run8f7a00d on the same13d candidate. Same READ_COMMITTED correction and physical two-contender proof are in progress; resolve public thread with the published fix, no new owned issue.
- Fix the
GR-1.1proof anchor for the Human prepare refusal.MinorThe Verification cell says that
DatabaseCanonicalInitialAdmissionServiceTestcovers this case: "prepare, commit, and abort refuse before intent, World hold, pointer, or audit effects". That test exercisesservice.bindandservice.abort. It does not exercise prepare. Prepare refusal belongs toCanonicalInitialAdmissionHoldPreparation.prepare.CanonicalInitialAdmissionIntentRepositoryIntegrationTest.incompleteHumanPreparationDeniesBeforeIntentReservationOrWorldAcquireproves it with zero World client interactions and zero intent rows. The same cell also says that "durable catalog/intent ... components ... are wired locally". Fresh intent reservation now refuses before it writes, so that wording overstates the current boundary.Make these changes:
- Attribute bind/commit/abort refusal to
DatabaseCanonicalInitialAdmissionServiceTest. - Attribute prepare refusal to
CanonicalInitialAdmissionIntentRepositoryIntegrationTest, which the row already lists as a proof anchor. - Describe the intent repository as retained storage, not wired fresh execution.
As per coding guidelines: "
implementedandpartialrows name concrete production anchors... executable proof anchors target tests", and the tracker must keep "status, implementation record, validation" aligned when a domain boundary changes.- Accepted Verified GR1.1 overstates fresh intent wiring and attributes prepare refusal to wrong test. Correct retained-storage status and exact prepare/bind/commit/abort proof anchors, preserving runtime gaps.
- Attribute bind/commit/abort refusal to
- Remove the unused reservation writer.Trivial
reservehas no caller underservices/game-session-service/src/main; only integration tests call it. It still inserts aPENDINGrow, andfindPendingForRealmtreats that row as the realm owner. Sincecommitandabortalways throw, any direct caller can leave a row that blocks later reservations.Remove
reserveand update its tests, or make it throwunavailableHumanAdmissionProtection()beforelockTargetor any database write.- Accepted Verified reserve can create PENDING despite current Human commit/abort unavailable and no production caller. Deny before lock/storage; preserve retained reads and test genuine current refusal without fabricated authority.
- CLI Review 10 CompletedRuntime 3m 20sFound: 3 Accepted: 0/3/0 Routed: 0
- Set READ COMMITTED on the fixture launch write transaction.Minor
writeTransactionsets onlyPROPAGATION_REQUIRES_NEW, so the database default isolation decides its behavior. The first statement in the callback ispg_advisory_xact_lock(...). Under PostgreSQL REPEATABLE READ, that first statement fixes the transaction snapshot before the lock wait ends. Two concurrentcreateVerifiedFixtureStartingLaunchcalls can then fail like this:- The second contender waits on the advisory lock.
- After the lock is released, its
readLaunchRowByOperationInTransaction(..., true)cannot see the first contender's committed launch row. - The second contender then inserts a duplicate
game_instancesrow or launch row. The insert fails with a unique violation instead of returning the exact replay.
The sibling owners use an explicit isolation level for this reason:
GameSessionCanonicalRealmCatalogRepositorysetsISOLATION_READ_COMMITTEDon its fixturewriteTransaction.GameSessionFreshTenantAssociationRepositorysetsISOLATION_READ_COMMITTED, andexactHumanRetryReadsCommittedAssociationAfterAdvisoryWaitOnRepeatableReadDefaulttests that case.
The PostgreSQL launch test passes only because the container default is READ COMMITTED.
🔒️ Proposed fix
this.writeTransaction = new TransactionTemplate(transactionManager); this.writeTransaction.setPropagationBehavior(TransactionDefinition.PROPAGATION_REQUIRES_NEW); + this.writeTransaction.setIsolationLevel(TransactionDefinition.ISOLATION_READ_COMMITTED);- Accepted Verified fixture write transaction relies on DB default, first advisory lock can pin stale RR snapshot. Set READ_COMMITTED and add two-contender exact-replay PG proof on RR-default datasource; no authority or lifecycle expansion.
- Link the current proof to
#canonical-fixture-launch-owner-stage.MinorBoth changed sections link the Game Session runtime tracker at
#run-owned-canonical-source-handoff. That section is unchanged. It still describes the replaced descriptor preflight and predecessor-revision proof. The current STARTING allocation and readback proof is in#canonical-fixture-launch-owner-stage.design/architecture/microservices/game-session-service/api-contracts.md#L13-L13: change the "candidate proof" link anchor to#canonical-fixture-launch-owner-stage.design/architecture/system-architecture-testing.md#L202-L202: change the Game Session runtime tracker link anchor to#canonical-fixture-launch-owner-stage.
As per path instructions: "Review docs for canonical-current-state consistency. Flag obsolete transitional guidance..."
- Accepted Verified two current STARTING owner proof links point to predecessor section. Update only those two current references to canonical-fixture-launch-owner-stage; retain historical source references.
- State the actual creation-request identity that the producer uses.Minor
The contract says that "creation-request equality is not inferred". The production producer sets that equality explicitly.
TestDataSeeder.runcallscreationRepository.createCandidate(FIXTURE_NAMESPACE, verifiedCapability.operationId(), ...). The fixture creation request ID therefore equals the fixture operation UUID. The fixture operation UUID also equals the source registration request ID.TestDataSeederIntegrationTestreads the creation receipt withfixture.operationId(), which confirms this. A reader of this sentence can conclude that the creation request ID is independent. Add one sentence that records this equality. Also note that the codec does not require the equality.RunOwnedInitialAdmissionFixtureWireCodecTestassertscreationRequestId() != registrationRequestId(). That fixture does not model the production shape.- Accepted Verified producer creates candidate with fixture operation UUID, which equals source registration ID. Clarify current producer behavior at canonical contract, preserving codec allowance for distinct creation/registration IDs.
- Hosted Review 7 CompletedRuntime 11m 03sFound: 2 Accepted: 0/0/2 Routed: 0
- Extract the duplicated predecessor-column snapshot queries into helpers.Trivial
The catalog SQL appears twice (Lines 111-131 and 190-210). The launch SQL also appears twice (Lines 132-152 and 215-235). Each "after" query must match its "before" query. If someone edits one copy and not the other, the equality checks compare different column sets. The test then fails or passes for the wrong reason. Put each query in a private helper that returns the
original_columnsandxminpair. This also clears the PMD duplicate-literal hints for"original_columns"and"xmin".♻️ Proposed refactor
private static final String CATALOG_PREDECESSOR_SNAPSHOT_SQL = "SELECT row_to_json(ROW(...))::text AS original_columns, catalog.xmin::text AS xmin FROM game_session_canonical_realm_catalog catalog WHERE target_namespace = ? AND canonical_tenant_id = ?"; private static final String LAUNCH_PREDECESSOR_SNAPSHOT_SQL = "..."; private record RowSnapshot(String originalColumns, String xmin) {} private static RowSnapshot snapshot(DSLContext dsl, String sql, Object... binds) { var row = Objects.requireNonNull(dsl.fetchOne(sql, binds), "predecessor row"); return new RowSnapshot(row.get("original_columns", String.class), row.get("xmin", String.class)); }- assertThat(catalogEvidenceAfter.get("original_columns", String.class)) - .isEqualTo(originalCatalogColumnsBefore); - assertThat(catalogEvidenceAfter.get("xmin", String.class)).isEqualTo(catalogXminBefore); + assertThat(snapshot(dsl, CATALOG_PREDECESSOR_SNAPSHOT_SQL, target.targetNamespace(), target.canonicalTenantId())) + .isEqualTo(catalogBefore);Also applies to: 190-239
- Accepted Verified exact predecessor snapshot SQL duplicated before/after. Extract private typed snapshot helpers preserving all predecessor columns, selectors and xmin checks.
- Remove the unreachable Human mutation helpers and the stale
@Transactionalboundaries.Trivialreserve,commitandabortnow always throwunavailableHumanAdmissionProtection(). After this change, the following private methods in the class have no caller:lockCatalog,lockLaunchTargetandrequireRequestMatchesCatalogAndLaunch.lockTargetandlockAllAdmissionRepresentationsForNoPrior.requireSameRequest,requireSameRequestIdentity,findPendingForRealmandfindAttempt.utcandrequireWritableReadCommittedOwnerTransaction.
The
requireCurrent == truebranch ofverifyOriginalClosedOriginis also unreachable. ThelaunchRepositoryfield is used only by the deadlockLaunchTarget.These helpers lock tables and gate owner writes. If they stay without a caller, a reader can take them for a live write path. A later edit can also bring them back without the Account protection gate.
The three denied methods still have
@Transactional(isolation = READ_COMMITTED). When Spring calls them through its proxy, it opens a writable transaction and takes a connection only to throw. This does not match the "denies before owner effects" Javadoc. The unit test does not catch this because it calls a plain instance.Do these two changes:
- Delete the unreachable helpers.
- Remove
@Transactionalfromreserve,commitandabort.
When Account protection exists, restore the write path from history with its new guards.
- Accepted Verified dead Human mutation helper graph and unused launch dependency; public denials still open transactions. Remove unreachable code/transaction advice, preserve retained read semantics and prove proxied denial avoids transaction acquisition.
- CLI Review 11 CompletedRuntime 4m 16sFound: 1 Accepted: 0/1/0 Routed: 0
- Update the stale "Run-owned canonical source handoff" paragraph.Minor
The new "Canonical fixture launch owner stage" section (Lines 9-16) and the
GR-1.1row (Line 72) say that the coordinator now does only canonicalSTARTINGallocation and readback. The unchanged paragraph at Line 19 still describes the removed flow. It says the coordinator "compares the actual descriptor to authenticated resolution and preflights against the owner projections".RunOwnedInitialAdmissionFixtureCoordinator.coordinatenow calls onlycreateVerifiedFixtureStartingLaunchandreadVerifiedFixtureLaunch. It does no descriptor resolution or preflight. As a result, this tracker contradicts itself and the Game Session API contract.Rewrite the paragraph to give only the current receipt-consumption boundary. Alternatively, label it as historical predecessor behavior.
📝 Proposed wording
-The repaired local fixture consumes Game Design's atomic run/project receipt containing actual committed release-bundle, artifact-state, version-state, and persisted launch-descriptor evidence, pins the exact evidence across retries, and binds its internal launch to the registered source. Game Session obtains its verified typed carrier only through the existing trusted data-package parser/coordinator; generic `StartSession` cannot construct or select that path. It compares the actual descriptor to authenticated resolution and preflights against the owner projections without invoking the three production Game Design release/version/artifact read RPCs. +The repaired local fixture consumes Game Design's atomic run/project receipt, including fresh creation evidence, the four launch snapshots and the fixture policy seal. It pins the exact evidence across retries. Game Session obtains its verified typed carrier only through the existing trusted data-package parser/coordinator; generic `StartSession` cannot construct or select that path. The current coordinator prepares only the canonical `STARTING` allocation and its independent readback; earlier descriptor-resolution preflight belongs to predecessor revisions. It invokes none of the three production Game Design release/version/artifact read RPCs.As per path instructions, "Flag obsolete transitional guidance". As per coding guidelines, keep the tracker's "status, implementation record, validation, gaps, decisions, and service-map sections aligned when a domain boundary changes".
- Accepted Verifiedcurrent coordinatoronlycreatescanonicalSTARTINGandindependentreadback. Trackerline19 stillclaimsremoveddescriptor-resolution/preflight; aligncurrentreceipt-consumptionstatuswithowningAPI, no newcontract orcapability.
- Hosted Review 8 CompletedRuntime 13m 58sFound: 2 Accepted: 0/2/0 Routed: 0
- Take the request advisory lock before locking the pin rows in
capture.Minorcaptureis public and callsrequireOriginalPinsBeforeStartingbeforelockRequest. The former locks the operator attempt and both pin rows withFOR UPDATE.createStartingtakes the advisory lock first, then calls the same pin-validation method. Concurrent calls can therefore hold one lock while waiting for the other, causing PostgreSQL to abort one transaction for deadlock.🔒️ Proposed lock-order fix
--- "a/services/game-session-service/src/main/java/net/firedevops/firemud/gamesession/repository/CanonicalGameInstanceLaunchAssociationRepository.java" +++ "b/services/game-session-service/src/main/java/net/firedevops/firemud/gamesession/repository/CanonicalGameInstanceLaunchAssociationRepository.java" @@ -88,15 +88,15 @@ || binding.descriptor().gameTemplateId() != action.target().gameTemplateId()) { throw new IllegalArgumentException("Original tuple differs from the exact canonical launch"); } - requireOriginalPinsBeforeStarting(originalTuple, binding.evidence()); + lockRequest(binding.descriptor().controlPlaneRequestId()); + requireOriginalPinsBeforeStarting(originalTuple, binding.evidence()); RuntimeTenantIdentityEvidence source = tenantAssociation.sourceEvidence(); requireFreshSourceIdentity(tenantAssociation, source); if (!binding.descriptor().canonicalTenantId().equals(source.canonicalTenantId())) { throw new IllegalArgumentException("Launch binding does not match its fresh tenant owner"); } - lockRequest(binding.descriptor().controlPlaneRequestId()); FreshTenantOwnerMapping mapping = requireFreshTenantMapping(tenantAssociation); GameInstanceRow runtime = requireLockedRuntime(tenantAssociation.legacyGameSessionTenantId(), gameInstanceId); RealmOwnerProjection realm = requirePublicSharedRealm(binding.evidence());- Accepted Verified public capture locks operator/pin rows before request advisory lock, opposite createStarting. Move existing advisory lock before pin validation, preserving owner checks and one lock acquisition; prove real serialization without inventing Human authority.
- Describe the retained bootstrap, not canonical preparation, at Line 71.Minor
When fixture mode is enabled,
RunOwnedInitialAdmissionFixtureCoordinatorexecutes the retained legacy initial-admission flow. It starts aRUNNINGlaunch, registers the catalog, begins the intent, acquires the World hold, and can return a committed or aborted result. The canonical preparation owner is a separate explicit path with no scheduled caller.Suggested documentation fix
-The run-owned Compose coordinator currently completes only canonical `STARTING` launch preparation and its independent owner readback under the existing default-off fixture configuration. The later World materialization, activation, initial-bind intent, hold and first-`OPEN` phases remain unavailable. Fixture bootstrap refuses those phases before effects and returns no completed admission. The canonical target sequencing remains the [World initial admission bind contract](../world-management-service/api-contracts.md#initial-admission-bind-contract), with fixture evidence defined by [Testing Strategy](../../system-architecture-testing.md#run-owned-v1-launch-read-evidence). +When fixture mode is enabled, the retained run-owned Compose coordinator executes the published legacy initial-admission flow: it starts a `RUNNING` launch, registers the public shared fixture catalog, begins the initial-admission intent, acquires the World hold, and can return `BootstrapResult.COMMITTED` or `BootstrapResult.ABORTED`. The canonical target sequencing remains the [World initial admission bind contract](../world-management-service/api-contracts.md#initial-admission-bind-contract), with fixture evidence defined by [Testing Strategy](../../system-architecture-testing.md#run-owned-v1-launch-read-evidence).- Accepted Verified retained scheduled coordinator starts RUNNING legacy fixture, catalog, intent and World hold with COMMITTED/ABORTED outcomes. Replace stale STARTING-only paragraph; keep canonical explicit-source and target/proof distinctions.
- CLI Review 12 CompletedRuntime 3m 59sFound: 5 Accepted: 0/3/1 Routed: 0
- Restore the correct leaf before you test the wrong-namespace peer.Trivial
Line 293 stubs
certificate.leafSha256()to return"d".repeat(64). ThewrongWorldContextcase at lines 297-308 uses the samecertificatemock. That case therefore has a wrong namespace and also a wrong leaf. The assertion still passes ifloadFixedVerifiedEvidenceForWorldPeerdoes not check the namespace, because the leaf check rejects the call first. As a result, the test does not prove that a peer in another namespace is rejected.Before you build
wrongWorldContext, stub the leaf back to the retained World leaf. Then the leaf check passes and only the namespace mismatch can cause the rejection.Proposed fix
+ when(certificate.leafSha256()) + .thenReturn(fixture.capability.worldManagementLeafSha256()); Context wrongWorldContext = Context.current()- Accepted Confirmed wrong-namespace case retains the preceding wrong-leaf stub, masking namespace rejection. Restore the original leaf before that isolated negative case.
- Recompute the fixture policy seal so each mutation tests only its own check.Trivial
sourceReceiptWithLaunchReadEvidenceProtoreplaces one encoded launch-read field. It keeps thefixturePolicySealthatvalidSourceReceiptJsoncomputed from the original evidence.fixturePolicyRequestDigestcovers the launch-read evidence, so every mutated receipt also has a stale seal. ThegameTemplateIdreplacement at line 248 has the same problem.Assume
parseSourceReceiptchecks the seal before it checks projection scope, enum values, epochs, manifest keys, or unknown fields. Then every case inrejectsOwnerReadProjectionScopeAndStateMismatches,rejectsUnknownProtobufFieldsRecursivelyInOwnerReadEvidence, and the related tests passes because of the seal. The specific checks would no longer have focused proof.RunOwnedInitialAdmissionFixtureCoordinatorTest.withPublishedReleaseBundleRefalready recomputes the seal for its mutated evidence.Confirm the order of the checks in
parseSourceReceipt. If the seal check comes first, rebuild the receipt from the mutated protobufs and compute a matching seal. Keep one separate test that changes only the seal.- Rejected Conditional premise is false: parseSourceReceipt calls parseLaunchReadEvidence before seal parsing/validation. Template, projection/state/epoch/manifest and recursive unknown-field checks all execute there first; stale seal cannot mask these cases.
- Fix the
GR-1.1row that says the new tests are unrun.MinorThe
GR-1.1Implementation cell says the source-first canonical owner's "new tests are unrun". The Proof anchors cell saysRunOwnedCanonicalLaunchPreparationOwnerTestandGameSessionFixtureLaunchAssociationReadGrpcServiceTest"are unrun for this candidate".The same tracker says otherwise in two places:
- Line 13 says the reconstruction "passed 98 focused Game Session unit cases (eight explicit preparation-owner, ... seven fixture association-read ...)".
- Line 23 says these tests "passed eight and seven cases respectively in the current focused gate".
The capability row is the scan-first status surface, so it must match the validation record. Replace "unrun" with the qualified passing result and its revision attribution.
As per path instructions/coding guidelines: "Keep its status, implementation record, validation, gaps, decisions, and service-map sections aligned when a domain boundary changes".
- Accepted GR-1.1 still says the explicit owner/read tests are unrun despite qualified8/7results recorded above. Align the capability row with that attribution and retain no-scheduler/no-admission limits.
- Report a canonical-tenant conflict when an association already exists.Minor
commitAssociationcallsrejectOrphanOrRetainedClaimafterreadByRequestIdInTransactionreturns empty. The claim query matches oncanonical_tenant_id = ? OR association_request_id = ?. Assume a second creation request arrives for a canonical tenant that already has a complete fresh association. The query then finds that tenant's valid claim, and the method throwsInvalidFreshTenantAssociationException. The exception says the claim "exists without its exact fresh association" and that "retained or partial identity cannot be adopted".That message is false for this case. The association is present and complete. The deleted path raised
FreshTenantAssociationConflictExceptionwith the message "Canonical tenant already has a Game Session tenant association". Callers and operators now see an ordinary idempotency conflict reported as stored-evidence corruption.Check for an existing association before you classify the claim as orphaned.
♻️ Proposed fix
private void rejectClaimWithoutAssociation( String namespace, UUID canonicalTenantId, UUID requestId) { + if (requestId != null + && dsl.fetchOne( + "SELECT 1 FROM game_session_fresh_tenant_association" + + " WHERE target_namespace = ? AND canonical_tenant_id = ?", + namespace, + canonicalTenantId) + != null) { + throw new FreshTenantAssociationConflictException( + "Canonical tenant already has a Game Session tenant association"); + } Record claim =- Accepted Confirmed a new request for an already fully associated canonical tenant reaches orphan-claim classification. Report conflict only after validating the existing complete snapshot; retain invalid-evidence denial for incomplete or mismatched storage.
- Describe the retained coordinator and the canonical preparation owner the same way in every changed doc.Minor
Several changed docs mix up two components. One is the retained
RunOwnedInitialAdmissionFixtureCoordinatorbootstrap. Testing Strategy line 182 and Game Session API contracts line 71 say it is still scheduled, still dispatches World fixture prepare/activate and still acquires the legacy World hold. The other is the separateRunOwnedCanonicalLaunchPreparationOwner, which does the canonical STARTING create/readback with no scheduler. The sites below give the coordinator the preparation owner's limits, or call the retained World dispatch unavailable. That conflicts with the passing packagedPLAY/LOOKevidence recorded for the retained bootstrap. Readers cannot tell which lifecycle path is live.design/architecture/microservices/world-management-service/api-contracts.md#L278-L278: replace "the current run-owned coordinator completes Game Session STARTING allocation and readback only; it does not acquire a World hold" with the retained coordinator's legacy hold behavior. Credit canonical STARTING allocation toRunOwnedCanonicalLaunchPreparationOwner.design/architecture/microservices/world-management-service/api-contracts.md#L288-L288: limit "prepare and activate refuse before repository effects" to canonical World materialization. State that retained fixture prepare/activate dispatch stays active, as line 5 says.design/project-management/implementation-tracking/game-session-runtime-and-tick-coordination.md#L41-L41: credit "canonicalSTARTINGallocation/readback" to the explicit preparation owner, not "the fixture coordinator".design/project-management/implementation-tracking/world-runtime-and-movement.md#L152-L152: remove "World fixture bootstrap, prepare and activate remain unavailable before effects". Limit the gap to canonical materialization, activation, holds and firstOPEN, matching lines 11 and 41.
As per path instructions: "Flag obsolete transitional guidance, conflicts between architecture docs".
- Accepted Confirmed buried World/GS descriptions conflate retained legacy coordinator dispatch/holds and explicit canonical preparation. Align those current statements. Default-off packaged baseline is separate proof and does not establish enabled fixture execution.
- Hosted Review 9 CompletedRuntime 8m 46sFound: 4 Accepted: 0/2/2 Routed: 0
- Update the scan-first proof status for this candidate.Minor
The
GR-1.1row says the new preparation/read tests are unrun and live Compose execution is unestablished. Line 13 records eight preparation-owner cases, seven association-read cases, and fresh baseline and restart smoke results. Attribute those results to their stated candidate. Keep canonical World and first-OPENproof open.As per coding guidelines: “Keep its status, implementation record, validation, gaps, decisions, and service-map sections aligned when a domain boundary changes.”
- Accepted Verified GR-1.1 contradicts qualified eight owner and seven read tests; align attributed proof and default-off baseline without claiming enabled fixture closure.
- Add a focused test for the call-credentials leaf pin.Trivial
The new two-argument constructor adds a leaf-fingerprint check to
applyRequestMetadata.CanonicalGameInstanceLaunchAssociationClient.readFixturerelies on this check. A test covers the same pin inGrpcServerPeerIdentityClientInterceptor(runOwnedLeafPinDeniesSameWorkloadWithAnotherCertificateBeforeContent). No supplied test covers it inGrpcServerPeerIdentityCallCredentials.Without such a test, a regression could pass every existing test. Examples are a dropped
expectedLeafSha256assignment or a check that ignores the pin. Add tests for these cases:- A matching URI and matching leaf. Assert
applier.apply(...). - A matching URI and a different leaf. Assert
applier.fail(UNAUTHENTICATED)and noapply. - A malformed pin. Assert
IllegalArgumentException.
Based on learnings: tests for identity-sensitive operations "should assert the actual field(s) that determine the resulting identity/authorization outcome".
Also applies to: 41-46
- Accepted Verified call-credentials leaf pin lacks focused proof; add matching URI/leaf success, different-leaf refusal and malformed-pin tests without production expansion.
- A matching URI and matching leaf. Assert
- Use the shared historical catalog digest helper in this test too.Trivial
v34_3CatalogRequestDigest,v34_3CatalogReceiptDigestandv34_3Digestcopy the production catalog digest encoding by hand.GameSessionRunOwnedCanonicalLaunchRepositoryPostgresIntegrationTestalready callsCanonicalHumanPublicationOwnerTestFixtures.historicalDigestfor the same encoding. This file is the remaining copy.If this copy drifts from production, the V34.3 upgrade test fails with a digest mismatch. It would no longer test the predecessor-row retention it is meant to cover.
Replace
v34_3DigestwithCanonicalHumanPublicationOwnerTestFixtures.historicalDigest. If the two seeders match, move the seeding code into that fixture as well.♻️ Proposed refactor
- private static String v34_3Digest(String... values) { - try { - MessageDigest hash = MessageDigest.getInstance("SHA-256"); - for (String value : values) { - byte[] bytes = value.getBytes(StandardCharsets.UTF_8); - hash.update(Integer.toString(bytes.length).getBytes(StandardCharsets.US_ASCII)); - hash.update((byte) ':'); - hash.update(bytes); - } - return "sha256:" + HexFormat.of().formatHex(hash.digest()); - } catch (NoSuchAlgorithmException exception) { - throw new IllegalStateException("SHA-256 is unavailable", exception); - } - } + private static String v34_3Digest(String... values) { + return CanonicalHumanPublicationOwnerTestFixtures.historicalDigest(values); + }- Accepted Verified byte encoding duplicates existing historicalDigest helper; delegate encoding to shared fixture preserving exact predecessor seeding and retention proof.
- Separate the retained bootstrap from explicit canonical preparation.Minor
The changed status text assigns canonical allocation to the retained coordinator and describes its published World dispatch as unavailable. The same files state that the bootstrap remains available and the canonical owner is explicit and unscheduled.
design/architecture/microservices/world-management-service/api-contracts.md#L288-L288: identify the refusing canonical World continuation without saying retained prepare/activate refuses.design/project-management/implementation-tracking/game-session-runtime-and-tick-coordination.md#L41-L41: assign canonicalSTARTINGcreation/readback toRunOwnedCanonicalLaunchPreparationOwner, not the retained coordinator.design/project-management/implementation-tracking/game-session-runtime-and-tick-coordination.md#L217-L217: distinguish the explicit canonical operation from the Compose bootstrap.design/project-management/implementation-tracking/world-runtime-and-movement.md#L152-L152: retain the published bootstrap’s available dispatch while marking canonical World continuation unavailable.
As per path instructions: “Review docs for canonical-current-state consistency.” As per coding guidelines: “Keep its status, implementation record, validation, gaps, decisions, and service-map sections aligned when a domain boundary changes.”
📍 Affects 3 files
design/architecture/microservices/world-management-service/api-contracts.md#L288-L288(this comment)design/project-management/implementation-tracking/game-session-runtime-and-tick-coordination.md#L41-L41design/project-management/implementation-tracking/game-session-runtime-and-tick-coordination.md#L217-L217design/project-management/implementation-tracking/world-runtime-and-movement.md#L152-L152
- Accepted Verified local docs conflate retained legacy bootstrap with explicit canonical owner; correct owner and continuation descriptions, keeping canonical World and firstOPEN open.
- CLI Review 13 CompletedRuntime 3m 55sFound: 3 Accepted: 0/1/1 Routed: 0
- Guard
requireHistoricalRowsRetainedagainst fixtures without historical seeding.TrivialOther tests call
fixture(false, false). In those fixtures,preV24CatalogandpreV24Sourcearenull. If a later test callsrequireHistoricalRowsRetained()on such a fixture, the method throwsNullPointerExceptionand gives no useful diagnosis. Add an explicit precondition with a clear message.Proposed guard
void requireHistoricalRowsRetained() { + java.util.Objects.requireNonNull( + preV24Catalog, "fixture was created without historical V23 owner rows"); + java.util.Objects.requireNonNull( + preV24Source, "fixture was created without historical V23 owner rows"); assertThat(- Accepted Accept small explicit preconditions for historical-row fixture diagnostics; current seeded callers and all runtime behavior stay unchanged.
- Fix the conflicting packaged-proof attribution for the retained bootstrap.Minor
Line 11 says the fresh and restart
WORLDS/LOGIN/PLAY/LOOKresults "qualify the retained bootstrap". TheGR-2.1row at line 61 says the retained bootstrap "has separate qualified runtime proof".Line 152 of this file says something different. It states that the packaged verification "ran with fixture mode disabled, so it proves the ordinary default-off baseline, not the enabled fixture coordinator". The Game Session tracker (
game-session-runtime-and-tick-coordination.md, line 13) says the same thing.The retained bootstrap is the enabled fixture coordinator and verifier path. Lines 11 and 61 therefore claim proof that the packaged run did not provide. Readers who scan the capability row first get the wrong proof status. Align lines 11 and 61 with line 152. The path instructions require you to flag "conflicts between architecture docs" and to keep tracker status consistent.
Proposed wording fix
-... Fresh source-built baseline and same-version restart both passed WebSocket and Telnet `WORLDS`/`LOGIN`/`PLAY`/`LOOK`; original-capability teardown removed the claimed project containers, network and volumes. These packaged results qualify the retained bootstrap, while canonical owner-chain closure remains open. +... Fresh source-built baseline and same-version restart both passed WebSocket and Telnet `WORLDS`/`LOGIN`/`PLAY`/`LOOK` with fixture mode disabled; original-capability teardown removed the claimed project containers, network and volumes. These packaged results qualify only the ordinary default-off baseline, not the enabled retained fixture bootstrap; canonical owner-chain closure remains open.In the
GR-2.1row, change "source-built baseline and same-version restart pass both transports" to "the default-off source-built baseline and same-version restart pass both transports". Change "the retained bootstrap has separate qualified runtime proof" to "the enabled retained bootstrap has no current packaged runtime proof".Also applies to: 61-61
- Accepted Verified current World top/GR-2.1 overclaim packaged bootstrap proof; align both with fixture-disabled baseline and preserve canonical source/activation gaps.
- Check that fixture-provenance launches can still create initial-admission intents.Major
On INSERT, the intent trigger requires a non-null
NEW.original_start_session_tuple. It also requires that tuple to equalselected_launch.original_start_session_tuple. Thechk_gs_initial_admission_intent_v44_launch_evidenceconstraint also requires that tuple whenever the catalog source-intake IDs are present. V1010 then defines fixture launches withoriginal_start_session_tuple IS NULL(chk_gs_launch_fixture_provenance). Neither V1010 nor V1011.1 updates this trigger, this constraint, or the terminal-attempt branch. The terminal-attempt branch also requires agame_session_start_session_operator_attemptrow.As a result, an intent insert for a launch created by
GameSessionCanonicalInstanceLaunchRepository.createVerifiedFixtureStartingLaunchfails with SQLSTATE 23514. The Javadoc onlockVerifiedFixtureLaunchInOwnerTransactionsays that this lock produces "the target used by a fixture intent or terminal write". The run-owned initial-admission smoke flow therefore appears to depend on a write that the schema rejects.Confirm whether any fixture code path (
RunOwnedInitialAdmissionFixtureCapability,CanonicalInitialAdmissionOwnerConfiguration, ordev-tools/smoke/run-owned-compose.sh) writesgame_session_canonical_initial_admission_intentor_attemptrows for a fixture launch. If one does, add a forward migration that defines a fixture-provenance branch in these guards. In that branch, check the fixture seal columns instead of the original tuple and the operator attempt.- Rejected No current fixture writer reaches canonical intent/attempt SQL: the explicit STARTING owner only creates/reads, canonical continuation denies, and scheduled bootstrap uses legacy gameplay tables. The mismatch concerns the declared future continuation.
Routed Findings
Route 1 · PR #3206 → PR #3210 Accepted/FixedMajorGame Session can report gameplay readiness UP after its synthetic player ResolveLook is rejected
At source HEAD 39a52bd4d4ba7533663be6edf3d6c1cafcfd3e58, Game Session readiness calls player-facing Game Logic ResolveLook with INTERNAL_PROBE, then records UP for any response envelope without checking LookResult.error. Game Logic requires GAMEPLAY_SESSION plus an admitted routing bundle, so it rejects the probe as SESSION_ATTESTATION_INVALID. This permits false-positive Game Session readiness. It does not by itself explain Game Logic HTTP 503; Game Logic has a separate private World/Entity probe. The approved Game Session candidate fix is authenticated existing Game Logic Ping plus bounded registered Game Logic HTTP dependency readiness, retaining local and Account conditions and failing closed. Ping alone is not downstream readiness; neither signal proves gameplay admission or a playable path.
Outcome: ff05b2680c5d70b636c31b8285f607409983639a inspected; bounded authenticated Ping AND HTTP readiness, admission guards retained.70 tests/static/render/docs pass. Fresh no-cache GL/GS readiness+LOGIN pass; PLAY empty-catalog fails, LOOK/Telnet unrun; authenticated cleanup completes.
Earlier routing and proof
Earlier decisions
- Accepted Verified original39a player probe reports UP despite application error. The approved complete15-file ff05 child replaces it with authenticated bounded Ping plus HTTP dependency readiness, retaining all admission guards.
- Routed Root adjudication for commissioned source investigation 1953/c12379cd-66b9-4bc2-af84-526e97c3d865 routes the Game Session readiness finding from #3206 to its owning Gameplay work in #3210. Severity is Major. This is source-finding provenance only, not a full PR or provider review.
Route 2 · PR #3206 → Unassigned target OpenMinorPR lifecycle retains obsolete passive resolver and polling guidance
design/developer-workflows/pr-lifecycle.md:83 says ordinary callers retain polling while the resolver is passive. Both exact inspected revisions use one-pass assessment and generic attributable PR callbacks; CI/CD Required Gate Preservation defines that canonical behavior. Replace only the stale sentence while preserving deployment/native-proof limits, deferred failure as missing proof, and explicit recovery for ambiguous outcomes. This unchanged inherited statement is outside the PR3206 source diff and belongs to the existing maintenance backlog, not that PR's fix obligations. Supplied Gameplay terminal evidence explains the stale failed check as a cancelled historical run; a different metadata attempt2 passed. No resolver-code defect or independent CI-readiness claim is established. Full rationale and evidence limits are in the scratch source report.
Outcome: Root inspected the source assessment and accepts routing this inherited outside-diff Minor documentation drift to the existing tooling-maintenance-followup backlog. No source PR3206 obligation, runtime defect or independent CI-readiness claim.
Route 3 · PR #3211 → PR #3206 Accepted/FixedMinorProtected Game Session interceptor names the wrong terminal-proof service
Outcome: Published f98e2e6309 names declared CanonicalInitialAdmissionOwnerProofReadService. Two focused descriptor/interceptor tests pass: dedicated method allowed; old alias/player StartSession denied. GS static and rebuilt/restart both-transport baseline pass.
Earlier routing and proof
Earlier decisions
- Accepted Confirmed actual terminal proof is a separately declared dedicated service; local activation transport corrects registration. Preserve obligation until qualified owning publication, then retarget as directed.
Unlinked items
no items unlinked