FireMUD Delivery Status

PR data refreshed

PR #3120 review history

Review rounds

Three-number pills mean: found (raw) / accepted here (useful) / routed

Hosted CodeRabbit4 completed
3/3/05/3/08/7/05/3/0
CLI CodeRabbit8 completed
4/4/05/5/04/2/04/1/02/0/0
Subagent Review2 completed
1/1/01/0/1

Recorded review history

Reviews and findings

  1. Subagent Review 1 CompletedModel: gpt-6-luna · Xhigh
    Found: 1 Accepted: 1 Routed: 0
    1. Normal full-version publication bypasses selected source capture and terminal sealMajor
      • Accepted Owned B publication path still commits v1 from mutable revisions. Reconcile genuine retained source-qualified producer and seal flow with original focused proof; missing owner authority must deny, never fabricate evidence.
  2. Subagent Review 2 CompletedModel: gpt-6-luna · Xhigh
    Found: 1 Accepted: 0 Routed: 1
    1. Supply independently authorized operation receipts for scoped publication and lifecycle readsMajor

      Launch resolution remains fail-closed; PrepareWorldInstance, WMS Draft mutation/version read, Automation activation/work-item release reads lack receiver-verifiable scope. Need exact caller workload+namespace, canonical tenant+version, selected source commit/digest, read purpose, and governing operation/lifecycle from independently authorized owner operation. Preserve terminal reads and separate Account-authorized diagnostics; no invented expiry/revocation.

      Route · PR #3120 → PR #3105 OpenDocument producer handoff required by Overseer 7b059d55; Gameplay retains receiver/caller contract and proof ownership. Existing correlation, tenant selectors or workload identity cannot mint read authority. View routed finding
  3. Hosted Review 1 CompletedRuntime 10m 54s
    Found: 3 Accepted: 0/0/3 Routed: 0
    1. Remove the vacuous revisionRepository assertions and the mismatched collision test.Trivial

      The constructor never receives the revisionRepository mock (Lines 43, 272-273). PublishedReleaseBundleServiceImpl takes only PublishedReleaseBundleRepository, VersionRepository, and ObjectMapper. Every verifyNoInteractions(revisionRepository) and verify(revisionRepository, never()) in this file therefore passes regardless of service behavior. These assertions do not prove that mutable revision rows stay unread.

      createFullVersionBundleRejectsCanonicalIdAndAliasCollisions (Lines 521-537) calls the legacy 5-argument overload. That overload always throws PUBLISH_SELECTION_REQUIRED, so the revision stubs never take effect. The test name claims collision rejection, but the test only checks the legacy refusal. Collision coverage already exists in selectedFullVersionBundleRejectsCanonicalIdAndAliasCollisions (Lines 631-636).

      Delete this test. Remove the revisionRepository field, its stubs, and its verifications, or replace them with a structural check on the class.

      ♻️ Proposed cleanup

      --- "a/services/game-design-service/src/test/java/unit/net/firedevops/firemud/gamedesign/service/impl/PublishedReleaseBundleServiceImplTest.java"
      +++ "b/services/game-design-service/src/test/java/unit/net/firedevops/firemud/gamedesign/service/impl/PublishedReleaseBundleServiceImplTest.java"
      @@ -518,23 +518,6 @@
           org.mockito.Mockito.verifyNoInteractions(revisionRepository);
         }
       
      -  @Test
      -  void createFullVersionBundleRejectsCanonicalIdAndAliasCollisions() {
      -    when(repository.findByTenantIdAndVersionId("tenant-1", 7L)).thenReturn(Optional.empty());
      -    Revision first = new Revision();
      -    first.setData(commandDefinition("salute", "greet"));
      -    Revision second = new Revision();
      -    second.setData(commandDefinition("hail", "SALUTE"));
      -    when(revisionRepository.findByTenantIdAndVersionIdAndRevisionKindOrderByIdAsc(
      -            "tenant-1", 7L, "COMMAND_DEFINITION"))
      -        .thenReturn(List.of(first, second));
      -
      -    assertThrows(
      -        IllegalStateException.class,
      -        () ->
      -            service.createFullVersionBundle(
      -                version(), "workflow-1", emptyManifest(), "genrev-1", List.of()));
      -  }
       
         @Test
         void legacyFullVersionBundleDoesNotReachMutableCommandValidation() {
      

      Then remove the line @Mock private RevisionRepository revisionRepository; and each verifyNoInteractions(revisionRepository) or verify(revisionRepository, ...) reference.

      • Accepted Collision portion duplicates CLI1 finding3, but unused RevisionRepository mock is additional useful cleanup: service never receives it, so interaction assertions are vacuous. Remove disconnected mock/stubs/assertions, preserve real repository and selected-source tests.
    2. Merge the two duplicate post-export finalization recovery tests.Trivial

      fullVersionMechanicsLeavesPostExportFinalizationFailurePendingWithCandidateAndRemap (Lines 717-893) and selectedMechanicsLeavesPostExportFinalizationFailurePendingWithCandidateAndRemap (Lines 948-1124) set up the same fixture. They inject the same markPublished failure and make the same assertions. The differences are only the tenant ID (isolatedTenantId() vs "9003") and the remap-set ID (random vs fixed). Each copy is about 175 lines, and future fixes must be applied twice.

      Keep one test with the isolated tenant and random remap ID, and delete the other. Line 704 also hard-codes "https://assets.example.test/assets". Use FIXTURE_PUBLIC_BASE_URL there.

      Also applies to: 948-1124

      • Accepted Two post-export transaction tests differ only fixed versus isolated tenant/remap identities. Keep isolated/random variant and exact pending/readback/recovery assertions; replace repeated fixture URL literals with existing constant.
    3. Remove the duplicated claim checks from claim().Trivial

      claim() calls validateClaim() on Line 44. Lines 47-95 then repeat the same checks: operation lookup, commit lookup, QUEUED state, DRAFT state, and absence of the application slot. DraftCommitCoordinatorRepository.claim(binding, account) also calls validateClaim() before claim(). Each Account claim therefore runs the same locking reads three times. The two copies can also drift apart.

      The only behavior that claim() adds is that the commit row must exist. Keep that check and the insert, and remove the other repeated checks. Lines 414-417 also have a redundant if (inserted == 0) return retained; branch.

      ♻️ Proposed refactor

         GameDesignDraftTerminalOperation claim(
             GameDesignDraftTerminalOperation operation,
             DraftCommitCoordinatorRepository.LockedVersion lockedVersion) {
           requireWritableReadCommittedTransaction();
           validateClaim(operation, lockedVersion);
           DraftCommitBinding binding = operation.gameDesignBinding();
      -
           Record byOperation = findOperation(operation.accountBinding().operationId(), true);
           if (byOperation != null) {
      -      GameDesignDraftTerminalOperation persisted = toOperation(byOperation);
      -      requireExactOperation(operation, persisted);
      -      return persisted;
      +      return toOperation(byOperation); // validateClaim already proved exactness
           }
      -    Record byCommit = ...
      -    ... (repeated commit/state/slot checks)
      +    if (dsl.fetchOne(
      +            "SELECT 1 FROM " + COMMIT_TABLE
      +                + " WHERE canonical_tenant_id = ? AND canonical_version_id = ? "
      +                + "AND request_id = ? AND commit_id = ?",
      +            binding.target().canonicalTenantId(), binding.target().canonicalVersionId(),
      +            binding.requestId(), binding.commitId()) == null) {
      +      throw new DraftCommitCoordinatorRepository.DraftCommitNotFoundException(
      +          "Game Design commit must be claimed before its Account operation");
      +    }
      
      • Accepted validateClaim already validates exact operation/commit/state/slot under same Version lock. Remove duplicate checks while retaining replay return, commit existence and atomic insert; terminal inserted==0 return is identical to final return.
  4. CLI Review 1 CompletedRuntime 4m 43s
    Found: 10 Accepted: 0/4/2 Routed: 1
    1. Verify that this adapter compiles against the merge base.Major

      This file imports these types:

      • PublishedRealmEntryPolicyServiceGrpc
      • ResolvePublishedRealmEntryPolicyRequest/Response
      • ListPublishedRealmEntryPoliciesRequest/Response
      • PublishedRealmEntryPolicyReadGrpcCodec
      • PublishedRealmEntryPolicySetEvidence

      None of these types is in this change. api-contracts.md links protos/game-design/v1/published_realm_entry_policy_service.proto, and that file is also not in this change. The tracker says that "post-A compilation" is pending. That wording suggests these types come from another, unmerged change.

      Confirm that the proto and the common-platform-core publication classes exist on the target branch. If they do not exist, :game-design-service:compileJava fails, and the class is unconditionally on the component-scan path. The @ConditionalOnProperty annotation does not prevent a compile failure.

      • Rejected Proto and both common-platform-core codec/evidence classes exist as immutable blobs on actual reviewedparent20c7. Core/GDS compilation and471/490 fresh units passed at identical runtime postimages; undefined documentation wording handled finding4.
    2. Reject gamedesignrealmpolicysource updates that do not advance to a synchronized snapshot.Minor

      Reject `game_design_realm_policy_source` updates that do not advance to a synchronized snapshot.

      The other V50.8 guards bind every write to exact owner evidence. The UPDATE branch for game_design_realm_policy_source checks only canonical_tenant_id, canonical_version_id, and genesis_receipt_id.

      A raw write can set visible_commit_id back to an older snapshot and set source_epoch to that older snapshot's sourceEpoch. The capture guard at Lines 220-224 then accepts the older snapshot as the visible source. The capture guard checks only that the epoch matches and that a visibility row exists.

      Add these checks to the source-row UPDATE branch:

      • The new epoch is greater than the old epoch.
      • source_epoch equals the sourceEpoch of the referenced snapshot.

      The existing fixtures change the epoch from 1 to 2 with a new snapshot, so they stay valid.

      🛡️ Proposed guard

               ELSIF NEW.canonical_tenant_id IS DISTINCT FROM OLD.canonical_tenant_id
                   OR NEW.canonical_version_id IS DISTINCT FROM OLD.canonical_version_id
      -            OR NEW.genesis_receipt_id IS DISTINCT FROM OLD.genesis_receipt_id THEN
      +            OR NEW.genesis_receipt_id IS DISTINCT FROM OLD.genesis_receipt_id
      +            OR NEW.source_epoch::NUMERIC <= OLD.source_epoch::NUMERIC
      +            OR NOT EXISTS (SELECT 1 FROM game_design_realm_policy_snapshot s
      +                WHERE s.canonical_tenant_id = NEW.canonical_tenant_id
      +                    AND s.canonical_version_id = NEW.canonical_version_id
      +                    AND s.commit_id = NEW.visible_commit_id
      +                    AND s.snapshot_json::JSONB->>'sourceEpoch' = NEW.source_epoch) THEN
                   RAISE EXCEPTION 'realm policy history is immutable' USING ERRCODE = 'check_violation';
      
      • Accepted Valid raw-head rewind can be inherited by later disjoint capture. Fix two legal transitions via additive migration: exact staged +1 with matching application, or same-epoch current-fence snapshot/preserved predecessor; naive greater-epoch every update breaks legitimate capture.
    3. Realm policies are mandatory for full-version publication, but one code comment says they are optional.Minor

      RealmPolicySnapshot.Capture calls RealmPolicySource.ordered(...). That method rejects an empty set and requires exactly one visible && publicProduction policy. GameDesignSourceRepository.freeze always freezes the policy source, and readCapture requires both captures. So a Draft with commands but no realm policies cannot be published. recordFreshGenesis always creates a game_design_realm_policy_source row. As a result, the "no policy source" branch in retainSealedPublished is unreachable, and its comment is wrong.

      Decide whether published full Versions must define realm policies. Then apply one consistent rule:

      • services/game-design-service/src/main/java/net/firedevops/firemud/gamedesign/publication/RealmPolicySnapshot.java#L64-L71: if policies are optional, call ordered only for a non-empty snapshot. If policies are mandatory, return a typed publication gate failure, not a constructor IllegalArgumentException.
      • services/game-design-service/src/main/java/net/firedevops/firemud/gamedesign/publication/RealmPolicyPublicationRepository.java#L66-L73: change the method comment and the empty-capture branch to match the chosen rule. Skip association for an empty capture if policies are optional, or delete the unreachable branch if they are mandatory.
      • Accepted Canonical full publication requires bounded policies with exactly one visible public policy. Reject absent/invalid set through typed owner-freeze publication failure before constructing capture; remove unrelated no-policy success association branch. No activation.
    4. Verify that every existing caller that creates a new full Draft still passes the isolation check.Major

      @Transactional(isolation = READ_COMMITTED) uses the default REQUIRED propagation. Suppose a caller already holds a transaction with default isolation. Spring then joins that transaction and ignores the inner isolation attribute. TransactionSynchronizationManager.getCurrentTransactionIsolationLevel() returns null, and Lines 235-238 throw IllegalStateException. PostgreSQL already runs READ COMMITTED by default, so this check rejects callers that are effectively correct.

      Before this change, any caller inside a default @Transactional boundary could create a new non-script Draft. Examples are a game-creation service, TestDataSeeder, and template or bootstrap flows. Each of these callers now fails.

      Run this search: rg -n "versionRepository\.save\(|VersionRepository" services/game-design-service/src/main. Confirm that each insert path for a new full Draft runs inside an explicit isolation = READ_COMMITTED transaction, or outside any transaction. If not, either annotate those callers, or accept a null isolation level when the database default is READ COMMITTED.

      • Rejected Actual current main save callsites do not insert full Draft: seeder inserts PUBLISHED, VersionService creates script-only/base-bound Draft, other calls update existing rows. Reported present seeder/bootstrap regression unsupported; future default-transaction caller hazard not current defect.
    5. Delete the duplicated selected-mechanics tests.Trivial

      The rewrite left many tests in pairs with identical bodies:

      • Successful mechanics: reflectiveUnitHarnessReconcilesSelectedExistingVersionWithCapturedOperation (Line 666) and privateMechanicsUsesDurablySelectedVersionWithoutSequenceReservation (Line 1870).
      • Typed gate failure: publishFullVersionPropagatesTypedPublishGateFailures (Line 817) and privateMechanicsRecordsTypedPublishGateFailures (Line 2021).
      • Gate rejection: Line 845 and Line 2049.
      • Transient participant read: Line 936 and Line 2672.
      • Staged artifact with a mismatched workflow, a mismatched scope, or a published version: Lines 1075, 1095, and 1115, and Lines 2434, 2454, and 2474.
      • Mismatched or uncertain persisted candidate: Lines 1323 and 1376, and Lines 2386 and 2410.
      • Mismatched version evidence and mixed scope: Lines 1479 and 1503, and Lines 2484 and 2508.
      • Fresh legacy denial: Line 149 and Line 1798.

      The second copies named legacyFull... (Lines 2484 and 2508) use selectedPublishFixture. Their names describe a legacy path that they do not test.

      Keep one copy of each scenario. Delete the duplicates or rename them so that each name describes the actual path.

      • Accepted Ten exact duplicate selected-mechanics bodies verified, including misnamed legacy selected-fixture cases. Keep canonical named scenarios once, preserve distinct assertions/refusal/recovery cases; no production change.
    6. Confirm that the bearer-exemption method names use the actual proto package of PublishedRealmEntryPolicyService.Major

      The existing exemption uses gamedesign.v1.TenantIdentityService. The new entries use game_design.v1.PublishedRealmEntryPolicyService. The [redacted credential] matches full gRPC method names exactly. If the package differs, the interceptor rejects every Game Session mTLS call that has no JWT before the handler's peer check runs, so the read can never succeed.

      Run this search: rg -n "^package" protos/game-design/v1/published_realm_entry_policy_service.proto.

      • services/game-design-service/src/main/resources/application.yml#L65-L66: change the two entries to match the declared proto package.
      • services/game-design-service/src/main/resources/application-prod.yml#L54-L55: apply the same correction.
      • Rejected Both base and production exemptions already use game_design.v1, exactly the proto package at reviewed3a28 and parent20c7. No package mismatch; same-namespace mTLS handler gate retained.
    7. Replace the undefined term "A-dependent compilation".Minor

      Line 107 says "final A-dependent compilation". The document does not define "A". A reader cannot tell which dependency this term names. This sentence also records proof status inside a canonical architecture contract. The implementation tracker owns proof status.

      Name the exact prerequisite, for example the PR or the shared module that supplies the published-policy proto and codec. As an alternative, remove the proof clause here and keep it only in the tracker. Apply the same change to the "post-A" wording in the tracker.

      As per path instructions: "Review docs for canonical-current-state consistency."

      • Accepted Undefined A/post-A and stale pendingproof claims are verified; remove undefinedarchitectureproof wording, name current inherited dependency and retain qualified proof status/limits at tracker.
    8. A publication selection permanently freezes its Draft with no recovery path.Major

      The selection row is immutable, and this repository never releases it. These are its effects:

      • reserve rejects every later publish request with a different publishRequestId for the same Version (Lines 66-69).
      • The V50.2 trigger reject_gd_draft_application_during_authored_publication rejects every new application slot for that Version.
      • requireNoPublicationSelection in the coordinator and the source repositories also blocks owner application.

      Consider a selected publication that ends FAILED, for example on APPLIED_COMMIT_MISMATCH or a gate failure. The Version stays DRAFT. It cannot accept a corrective commit, and it cannot accept a new publish request. No code creates a successor Draft that copies the source.

      Confirm the intended recovery after a definitive FAILED/NO_PUBLICATION seal. Two options are a release rule tied to the sealed NO_PUBLICATION outcome, or a documented successor-Version path. The selected path is not reachable yet, so this is a lifecycle gap for the future, not a current outage.

      Route · PR #3120 → Unassigned target OpenRoot20e0e42c accepts Major future recovery gap into existing PR-unassigned production-readiness followup. Preserve passive immutable selection; OPEN before enablement/genuine recovery proof. No deletion/unfreeze/clone or fixed/route-closure claim. View routed finding
    9. Remove or rewrite the stale legacy-path collision and validation tests.Trivial

      createFullVersionBundleRejectsCanonicalIdAndAliasCollisions calls the legacy five-argument createFullVersionBundle. That entry point now throws PUBLISH_SELECTION_REQUIRED before it reads revisionRepository. The test passes because of that refusal, not because the code detects a collision. The Revision stubs are never used.

      legacyFullVersionBundleDoesNotReachMutableCommandValidation checks the same refusal. Lines 283, 294, 308, 368, and 462 check it as well, so the legacy refusal is tested seven times.

      The selected-path tests at Lines 618-643 already cover collisions and invalid command definitions. Delete these two tests. Merge the legacy-refusal tests into one test.

      • Accepted Legacy five-arg path throws selection-required before repositories; stale collision/validation tests pass for wrong reason and duplicate refusal. Keep one exact refusal+no-interactions test, retain selected-path collision/effect-validation proof.
    10. Align the Capability Status rows with the new immutable source capability.Minor

      This section adds new production anchors. These include CommandSourceRepository, RealmPolicySourceRepository, RealmPolicyPublicationGrpcService, GameDesignPublicationOperationRepository, and migrations V50.1–V50.11. The AR-1.5 row still lists only the older anchors. No Capability Status row names the new focused tests as proof anchors, for example RealmPolicyPublicationPostgresIntegrationTest and CommandSourceTest. The section also says that compilation and execution are pending, so the row Verification cell must show that state explicitly.

      Line 19 also uses "post-A compilation" without a definition. Name the exact prerequisite.

      As per coding guidelines: "Each tracker contains one Capability Status row for every capability it primarily owns" and "implemented and partial rows name concrete production anchors."

      • Accepted AR1.5 production/test anchors omit this new immutable-source slice; add existing owner paths and scoped actual proof limits, keeping whole publication/producer/runtime incomplete. Undefined post-A duplicates finding4 fix.
  5. Hosted Review 2 CompletedRuntime 11m 56s
    Found: 5 Accepted: 0/2/1 Routed: 0
    1. Remove the duplicate World selector evidence comparison.Trivial

      Lines 323-325 already compare getWorldPublishedStartLocationEvidenceJson(). The new check at Lines 305-307 repeats the same comparison.

      Proposed cleanup

      --- "a/services/game-design-service/src/main/java/net/firedevops/firemud/gamedesign/repository/PublishedReleaseBundleRepository.java"
      +++ "b/services/game-design-service/src/main/java/net/firedevops/firemud/gamedesign/repository/PublishedReleaseBundleRepository.java"
      @@ -301,11 +301,8 @@
               || !Objects.equals(persisted.getManifestHash(), requested.getManifestHash())
               || !Objects.equals(
                   persisted.getManifestSchemaVersion(), requested.getManifestSchemaVersion())
               || !Objects.equals(persisted.getArtifactDigestsJson(), requested.getArtifactDigestsJson())
      -        || !Objects.equals(
      -            persisted.getWorldPublishedStartLocationEvidenceJson(),
      -            requested.getWorldPublishedStartLocationEvidenceJson())
               || !Objects.equals(
                   persisted.getAttestationSchemaVersion(), requested.getAttestationSchemaVersion())
               || !Objects.equals(persisted.getPublishWorkflowId(), requested.getPublishWorkflowId())
               || persisted.getVersionNumber() != requested.getVersionNumber()
      
      • Accepted ExactWorldpublishedstartlocationevidence comparison duplicated in samepersisted/requestedguard; retainone comparison, remove duplicate.
    2. Run the published-policy PostgreSQL proof against schema V50.12.Trivial

      The fixture stops at 50.10, but the replacement-baseline test calls baseline(..., "1", "Replacement World"). That path directly updates game_design_realm_policy_source. V50.12 adds a trigger that requires epoch and visible-pointer changes to match the exact owner application and synchronized snapshot. This test therefore does not prove the source transition used by the publication and readback flow against the current schema.

      Migrate through V50.12 after setup. Create the replacement baseline through the guarded transition instead of issuing the direct UPDATE. V50.11 is not shown to affect this publication path, so do not rely on it alone as the reason for the change.

      • Rejected DuplicateCLI2f5 acceptedfirst; same50.12guardedfixture/currentownerapplication correctionalreadyprepared and physicalvalidationongoing, noextra usefulwork.
    3. Wrap the readback in the failure-marking catch so it keeps the pending-reconciliation contract.Minor

      In the FullVersionTransactionException branch, Line 668 calls readPublication(request, attempt) without a try. readPublication can throw. The reasons are:

      • readPublishedReleaseBundle maps the stored row through toDto.
      • toDto runs requireSelectorBinding.
      • versionAssetArtifactService.findState reads storage.

      If the readback throws, the raw exception escapes failDefinitively. The caller then receives a non-PendingReconciliationException, so TemporalVersionPublishActivitiesImpl.reconcile does not return a PENDING snapshot. The original ex.causeException() is also lost. The finalization catch at Lines 297-304 already wraps the same readback and attaches the suppressed failure. Apply the same pattern here.

      🐛 Proposed fix

      --- "a/services/game-design-service/src/main/java/net/firedevops/firemud/gamedesign/service/impl/VersionPublishCommandServiceImpl.java"
      +++ "b/services/game-design-service/src/main/java/net/firedevops/firemud/gamedesign/service/impl/VersionPublishCommandServiceImpl.java"
      @@ -664,9 +664,17 @@
                   // Approved launch remap sets may reference this failed candidate, so retain the row.
                   return Boolean.TRUE;
                 });
           } catch (PublishAttemptService.FullVersionTransactionException ex) {
      -      PublicationReadback winningPublication = readPublication(request, attempt);
      +      PublicationReadback winningPublication;
      +      try {
      +        winningPublication = readPublication(request, attempt);
      +      } catch (RuntimeException readFailure) {
      +        readFailure.addSuppressed(ex.causeException());
      +        throw pendingReconciliation(
      +            "full-version failure marking readback failed; reconciliation is required",
      +            readFailure);
      +      }
             if (winningPublication.isComplete()) return reconcileCommittedAttempt(request, attempt);
             throw pendingReconciliation(
                 "full-version failure marking commit outcome is unknown; readback/reconciliation is required",
                 ex.causeException());
      
      • Accepted Failuremarking transaction catch readPublication canthrowoutsidePendingwrapper; preserve pendingreconciliation contract and suppressedoriginalcause, focusedregression.
    4. Make the AR-1.5 PostgreSQL proof count match the status narrative.Minor

      Line 19 says that 17 cases failed with mapped PostgreSQL connection refusal or the resulting context-loading failure. The AR-1.5 gap cell on Line 80 says that the latest local PostgreSQL proof has "one unresolved mapped-endpoint failure". These two statements give different counts for the same gate. The Verification cell is also inconsistent with itself: it says "mapped-endpoint failures" in the plural. It also contains a double space before "Immutable-source".

      Line 80 must state the same result as the narrative: 17 mapped-endpoint or context failures, with the cause unknown. Otherwise the scan-first status row understates the open integration-gate gap. The tracker contract requires the status, validation, and gap sections to stay aligned.

      As per coding guidelines: "Keep its status, implementation record, validation, gaps, decisions, and service-map sections aligned".

      • Rejected DuplicateCLI2f1 acceptedfirst; same17endpointtrackerfix is prepared and beingvalidated, noadditional usefulcorrection.
    5. Map transaction-begin failures to UNAVAILABLE, not INTERNAL.Minor

      RealmPolicyPublicationService.readPublishedSet runs inside a TransactionTemplate. If the database connection fails when the transaction starts, Spring throws CannotCreateTransactionException. That class extends TransactionException, not DataAccessException. Both handlers therefore send it to the generic RuntimeException branch and return INTERNAL. Game Session would then classify a transient storage outage as a non-retryable server fault. Add TransactionException to the UNAVAILABLE catch in both handlers.

      Proposed fix (apply to both handlers)

      -    } catch (DataAccessException | org.jooq.exception.DataAccessException unavailable) {
      +    } catch (DataAccessException
      +        | org.jooq.exception.DataAccessException
      +        | org.springframework.transaction.TransactionException unavailable) {
             fail(observer, Status.UNAVAILABLE, "Published realm policy owner storage unavailable");
      

      Also applies to: 131-140

      • Accepted Bothreadhandlers miss SpringTransactionException at TransactionTemplatebegin; add storageUNAVAILABLEmapping and focusedmethodregressions.
  6. CLI Review 2 CompletedRuntime 3m 57s
    Found: 6 Accepted: 0/3/2 Routed: 0
    1. New full Draft inserts fail when the caller's transaction uses the default isolation.Major

      @Transactional(isolation = Isolation.READ_COMMITTED) uses REQUIRED propagation. When a caller already has a transaction, Spring joins it and does not apply the inner isolation level (validateExistingTransaction is false by default). TransactionSynchronizationManager.getCurrentTransactionIsolationLevel() then returns the outer transaction's level. For a plain @Transactional caller that level is null.

      As a result, the guard on lines 235-238 throws IllegalStateException for every new non-script-only DRAFT Version saved from a default-isolation transaction. Examples are game creation, template bootstrap, or a test/demo seeder that opens its own @Transactional. Before this change those inserts succeeded. The annotation only applies READ_COMMITTED when no outer transaction exists.

      If any production caller creates full Drafts inside a default-isolation transaction, Draft creation stops working. Fix the callers rather than the guard:

      • Annotate each such caller with isolation = Isolation.READ_COMMITTED, or
      • Run the insert in a dedicated REQUIRES_NEW + READ_COMMITTED boundary. Note that enrollFreshDraft requires the insert witness from the current transaction, so the insert and the enrollment must stay in that same new boundary.

      Verify which callers reach this branch:

      For each caller that sets DRAFT and scriptOnly=false on a new Version, confirm that its enclosing @Transactional declares READ_COMMITTED. Also confirm that the PostgreSQL seeder and integration paths, such as TestDataSeederIntegrationTest, pass with the guard enabled.

      • Rejected DuplicateCLI1f9 hypothetical: all actual new full main-source seeder Versions are PUBLISHED, VersionService newVersions scriptOnly=true; no identified default-isolation full-DRAFT caller. Preserve strictguard.
    2. Make the PostgreSQL proof status in the AR-1.5 row match the narrative.Minor

      Line 19 says the broader local integration gate had 17 failures. They were mapped PostgreSQL connection refusals or their context-loading cascade, and the cause is still unknown. The AR-1.5 row says something different. It reports "one unresolved mapped-endpoint failure" in its gap cell and "mapped-endpoint failures remain unqualified" in its verification cell. A reader scanning the row first gets a smaller failure count than the record supports.

      Use one statement in both places, for example: "17 mapped-endpoint/context-loading failures; cause unknown; full current-candidate integration gate unqualified."

      As per coding guidelines: "Keep its status, implementation record, validation, gaps, decisions, and service-map sections aligned when a domain boundary changes."

      • Accepted AR1.5 still says one endpoint failure while current narrative has17; align row with actual unknown-cause/unqualified integration record.
    3. Run the publication-association proof against the latest schema, not 50.10.Trivial

      The fixture stops at migration 50.10. The PR also ships V50.11 (immutable_reviewed_draft_base) and V50.12 (realm_policy_source_head_transition_guard).

      baseline(..., "1", ...) updates game_design_realm_policy_source directly with SQL. RealmPolicySourcePostgresIntegrationTest shows that V50.12 rejects this kind of update. So this test cannot run at the latest schema. Its seal, capture, and set-association assertions therefore do not cover the triggers that production runs.

      Migrate to the latest version. Create the replacement baseline through the real owner application path (RealmPolicySourceRepository.apply plus the coordinator), not a raw source-row UPDATE.

      • Accepted Confirmed fixture stops50.10 and rawpolicy UPDATE bypasses shipped50.12guard. Upgrade fixture to currentmigration and real existing coordinator/source application; retain association assertions.
    4. Remove the orphaned @ParameterizedTest and @EnumSource annotations from fullAttempt.Minor

      Lines 2320-2323 belonged to a test method that this change removed. They now annotate the private, non-void helper fullAttempt. JUnit Jupiter does not run a private method that returns a value as a test. JUnit reports such a method as an invalid test method. Depending on the JUnit version and the discovery-issue severity setting, this is either a warning or a discovery failure. In both cases the annotations suggest a test that does not exist.

      Confirm the JUnit Platform version and the junit.platform.discovery.issue.severity.critical setting.

      🐛 Proposed fix

      -  @ParameterizedTest
      -  @EnumSource(
      -      value = Status.Code.class,
      -      names = {"UNAVAILABLE", "DEADLINE_EXCEEDED"})
         private PublishAttempt fullAttempt(
             PublishAttemptStatus status, long versionId, int versionNumber, String workflowId) {
      
      • Accepted Confirmed orphan parameterized/enum annotations on private nonvoid fullAttempt helper after dedup; remove only those annotations.
    5. Document that tenantid changes meaning when the selection fields are set.Minor

      Document that `tenant_id` changes meaning when the selection fields are set.

      GameDesignGrpcService.publishVersion reads tenant_id in two ways:

      • With all five selection fields blank, it treats tenant_id as the legacy Game Design tenant key and passes it to replayLegacyFullVersion.
      • With all five selection fields set, it parses tenant_id with canonicalPublicationUuid and requires a canonical non-nil UUID.

      The proto comment says nothing about this. A client that sends the tenant key together with a complete selection gets INVALID_ARGUMENT. Add the canonical-UUID requirement for tenant_id, version_id, selected_commit_request_id, and selected_commit_id to the comment.

      📝 Proposed comment

      -  // Complete together for new publication: the exact existing Draft selection.
      -  // When all selection fields are empty, only a retained terminal legacy retry is eligible.
      +  // Complete together for new publication: the exact existing Draft selection. When set,
      +  // tenant_id, version_id, selected_commit_request_id, and selected_commit_id must be
      +  // canonical lower-case non-nil UUIDs (tenant_id is the canonical tenant UUID, not the key).
      +  // When all selection fields are empty, tenant_id is the legacy tenant key and only a
      +  // retained terminal legacy retry is eligible.
      
      • Accepted Actual publishVersion requires canonical lower-case nonnil UUID tenant/version/selected commit identifiers in selectedmode; proto comment omits key-vsUUID semantics. Clarify comment only.
    6. Make the late publisher wait on the winner's locks before you release the winner.Trivial

      The test calls releaseSeal.countDown() right after it submits loser. It does not wait for loser to block on the winner's row locks. The executor can start loser after the winner has committed. In that case publish(fixture) sees a sealed operation through the ordinary non-concurrent path, and the test passes without proving serialization.

      Wait for the loser backend to block on the winner's backend before you release the winner. Get the backend PIDs and poll pg_blocking_pids, as RealmPolicySourcePostgresIntegrationTest.freezeAndSourceWriterUseSameVersionLockAndRollbackDoesNotLeaveCapture does.

      ♻️ Sketch

      -      releaseSeal.countDown();
      +      // Get the winner and loser backend PIDs, then poll pg_stat_activity until
      +      // winnerPid = ANY(pg_blocking_pids(loserPid)) before releasing the winner.
      +      awaitBlockedBy(winnerPid, loserPid);
      +      releaseSeal.countDown();
      
      • Accepted Confirmed seal latch released immediately afterlosersubmit, no actuallockblockingproof. Add bounded pg_blocking_pids evidence beforewinner release, existingtestpatternreuse.
  7. CLI Review 3 CompletedRuntime 3m 46s
    Found: 2 Accepted: 0/1/0 Routed: 0
    1. Fix the duplicated and malformed proof sentence in the AR-1.5 row.Minor

      The Verification cell contains a double space before "Immutable-source". It then continues with "; The full current-candidate…", which starts with a capital letter after a semicolon. The same sentence pair also appears in the Gap cell. Both cells state the same qualification, so readers see the text twice.

      Correct the punctuation. Keep the integration-gate qualification in one cell only.

      📝 Proposed wording fix (Verification cell)

      -...remain unproved. Historical lineage remains a retained-data deployment blocker: the owner must record a verified no-data boundary or explicit retained-row disposition/mapping with exact readback before migration cleanup or any completion claim.  Immutable-source PostgreSQL proof is partial on the latest local parent gate; The full current-candidate integration gate remains unqualified after 17 mapped-endpoint/context-loading failures; their cause is unknown.
      +...remain unproved. Historical lineage remains a retained-data deployment blocker: the owner must record a verified no-data boundary or explicit retained-row disposition/mapping with exact readback before migration cleanup or any completion claim. Immutable-source PostgreSQL proof is partial on the latest local parent gate: the full current-candidate integration gate remains unqualified after 17 mapped-endpoint/context-loading failures of unknown cause.
      
      • Accepted PriorAR1.5literalreplacement duplicatedqualification/leftmalformedpunctuation. Keep17unknown-causeunqualifiedfullgate statement once inVerification, preserve othergapsemantics.
    2. Check that existing full Draft creators still satisfy the new transaction guard.Major

      save now rejects a new full DRAFT row unless the current transaction reports ISOLATION_READ_COMMITTED. The method-level @Transactional(isolation = READ_COMMITTED) uses REQUIRED propagation. That setting applies only when save starts its own transaction. If a caller is already inside an ordinary @Transactional method, save joins that transaction. With default isolation, TransactionSynchronizationManager.getCurrentTransactionIsolationLevel() returns null, so the guard throws. Before this change, the same call succeeded.

      Genesis enrollment adds a second constraint. Both CommandSourceRepository.enrollNewDraftGenesis and the V50.10 baseline trigger require version_state_epoch = 1. A caller that inserts a new full Draft with any other epoch now fails at enrollment.

      Removing the Draft creation from VersionPublishCommandServiceImpl does not show that no other caller remains. The demo seeder, game creation paths, or test fixtures may still create full Drafts. Confirm that every caller that creates a full DRAFT either runs without an outer transaction or uses an explicit READ_COMMITTED writable transaction. Each caller must also set versionStateEpoch = 1.

      • Rejected RepeatCLI1f9/CLI2f2 hypothetical. ActualnewfullmainseedVersionsPUBLISHED; VersionService newscriptOnly=true; defaultVersionDRAFTepoch1, latest50.12fixtureREAD_COMMITTED passed4PG. Noactualaffecteddefault-isolationfullDraftcalleridentified.
  8. CLI Review 4 CompletedRuntime 3m 42s
    Found: 4 Accepted: 2/2/0 Routed: 0
    1. Bind the realm-policy JWT-bypass entries to the generated gRPC method names.Major

      The YAML allowlist and both tests write game_design.v1.PublishedRealmEntryPolicyService/... by hand. The existing tenant method uses the package gamedesign.v1. AuthTokenInterceptor matches the full method name exactly.

      If the generated full method name differs from the YAML entry, every call without a JWT from game-session-service fails with UNAUTHENTICATED. No test detects this, because each test compares the YAML with another hand-written copy. RealmPolicyPublicationMtlsTest builds its allowlist from getFullMethodName(), so it does not exercise the YAML.

      Verification needed: confirm the package declaration of PublishedRealmEntryPolicyService in protos/game-design/v1/game_design_service.proto.

      • services/game-design-service/src/test/java/unit/net/firedevops/firemud/gamedesign/config/RealmPolicyPublicationReadConfigurationTest.java#L89-L92: assert the YAML entries against PublishedRealmEntryPolicyServiceGrpc.getResolvePublishedRealmEntryPolicyMethod().getFullMethodName() and getListPublishedRealmEntryPoliciesMethod().getFullMethodName().
      • services/game-design-service/src/test/java/unit/net/firedevops/firemud/gamedesign/security/TenantIdentityGrpcAuthWiringTest.java#L54-L58: build CONFIGURED_PUBLIC_METHODS from the same generated descriptors instead of string literals.
      • Accepted Actualproto/YAMLnames alreadymatch game_design.v1; generateddescriptor assertions improveproof insteadofmatchingtwohandwrittenexpectedliterals. Twoexistingtests only, noactualauthoutageclaim.
    2. Validate the epoch of a non-genesis source-head insert.Minor

      The game_design_realm_policy_source branch validates an INSERT only when genesis_receipt_id IS NOT NULL. A non-genesis insert passes with any source_epoch and any visible_commit_id. The only conditions are a Draft owner and the snapshot FK.

      V50.12 checks every later UPDATE of the head, but it uses OLD.source_epoch as its trusted base. If the first row has an epoch that differs from its snapshot sourceEpoch, every later transition builds on a value that was never verified. RealmPolicySourcePostgresIntegrationTest.retainedFixture uses this exact raw-insert path.

      Fix: for a non-genesis insert, require that the visible snapshot exists and that its sourceEpoch equals NEW.source_epoch.

      Proposed guard

             IF TG_OP = 'INSERT' AND NEW.genesis_receipt_id IS NOT NULL THEN
               ...
             END IF;
      +      IF TG_OP = 'INSERT' AND NEW.genesis_receipt_id IS NULL AND NOT EXISTS (
      +          SELECT 1 FROM game_design_realm_policy_snapshot s
      +          WHERE s.canonical_tenant_id = NEW.canonical_tenant_id
      +            AND s.canonical_version_id = NEW.canonical_version_id
      +            AND s.commit_id = NEW.visible_commit_id
      +            AND s.snapshot_json::JSONB->>'sourceEpoch' = NEW.source_epoch) THEN
      +        RAISE EXCEPTION 'realm policy source head must match its visible snapshot epoch' USING ERRCODE = 'check_violation';
      +      END IF;
      
      • Accepted Validrawnon-genesis sourceINSERT epoch/snapshotmismatch acceptedbyoldguard; newforwardinsertguard mustmatchsameowner/version/commit snapshotepoch andpreservevalidgenesis/retainedinitialization.
    3. Fix the receipt evidence so it does not depend on the release table's column set.Major

      seal stores to_jsonb(r)::TEXT for the whole published_release_bundle row as release_row_json and inside the receipt(...) bytes. read (Lines 138-145) recomputes to_jsonb(r)::TEXT and requires exact equality with the stored text.

      A future migration can add a column to published_release_bundle, even a nullable or defaulted one. That migration changes the to_jsonb output for every existing row. Every retained PUBLISHED operation then fails with PUBLICATION_RECEIPT_BACKING_CONFLICT. This failure blocks:

      • exact terminal replay;
      • GameDesignPublicationTerminalReadGrpcService;
      • RealmPolicyPublicationRepository.readPublishedSet.

      These records are immutable, so retained receipts cannot be repaired. The closed PublicationReleaseContent and publishedReleaseBundleDigest already provide an exact binding.

      Use one of these fixes:

      • Bind the receipt to PublicationReleaseContent.canonicalBytes() and its digest only.
      • Build the evidence from a fixed, versioned projection, for example jsonb_build_object(...), with an explicit column list.

      Apply the same change at both the seal site and the read site.

      • Accepted Valid retained-receipt regression risk: fullrowJSONchangesonadditivecolumns. Fixedversionedprojection atseal/read/guard mustpreservecurrentimmutablebytes; forwardSQLonly andphysicaladdcolumn/tamperproof.
    4. Prevent backward movement and deletion of the Draft visibility pointer.Minor

      enforce_gd_draft_commit_visibility_pointer checks only three things:

      • the named fence exists;
      • the digest matches;
      • the commit is not FAILED_NONPUBLICATION or final-aborted.

      An UPDATE can therefore move game_design_draft_commit_visibility back to an older fence that was already SYNCHRONIZED. A DELETE or TRUNCATE of the pointer row is not guarded. The other evidence tables in this migration reject both operations.

      enforce_gd_authored_draft_publish_selection (V50.2) treats this pointer as the definition of "current". A moved-back pointer makes an older commit selectable for publication. A deleted pointer removes current visibility.

      Required changes:

      • Reject DELETE and TRUNCATE on the pointer table.
      • On UPDATE, require the new commit to be the commit that is now advancing. For example, require that its fence was created in the current transaction, or that its workflow state is still APPLYING or RECONCILIATION_REQUIRED.

      Verification needed: confirm where DraftCommitCoordinatorRepository.advanceVisibilityFence and advanceSourceVisibilityFence write the pointer, relative to the SYNCHRONIZED state change. The state-based check is valid only if the pointer write happens before that state change.

      • Accepted Validrawvisibilitypointerrewind/delete/truncate notguarded. CanonicalcoordinatorwritesbeforeSYNCHRONIZED; forwardactivewriter/retentionguards +physicalnegativeandvalidretryproof, nooldSQLrewrite.
  9. CLI Review 5 CompletedRuntime 4m 06s
    Found: 5 Accepted: 1/3/1 Routed: 0
    1. Migrate this composed-source proof to the latest schema, not 50.12.Minor

      This class is the PostgreSQL proof for the real local source writers (GameDesignSourceRepository, coordinator SQL, freeze). The fixture stops at 50.12, so it does not apply V50.13 or V50.14. V50.14 adds the Draft visibility and realm-policy source insert guards, and those guards act directly on the writers this test covers. RealmPolicySourcePostgresIntegrationTest and RealmPolicyPublicationPostgresIntegrationTest both migrate to 50.14.

      At 50.12, a writer can pass here and still be rejected in production. For example, it could depend on rewinding the visibility pointer or on inserting a source head without its snapshot epoch. Remove .target(...) or set it to the latest version. If the test fails on the latest schema for a deliberate reason, record that reason in a comment.

      -        .target("50.12")
      

      Confirm that the class passes when Flyway migrates to the latest version (no .target).

      • Accepted Validlatestguardproofgap: composedGameDesignSourcePG stilltarget50.12 bypasses13/14. Removefixturetarget tolatest, proveactualwriters and newrequiredownerforwardguard physically; historicalretainedfixturesremainlabeled.
    2. Add explicit deletion to the realm-policy source, or document that deletion is not supported.Major

      revision accepts exactly one payload shape: revisionKind, logicalRevisionId, and policy. That shape is an upsert. effective only applies policies.put(selector, policy). No source operation removes an inherited policy.

      The canonical contract at api-contracts.md Line 151 says: "Each typed upsert or explicit deletion names its stable authored key … An omitted row is not a deletion." CommandSource implements DELETE for commands. The realm-policy source has no equivalent.

      This has two consequences:

      • When an authored policy enters a Draft's effective set, every later snapshot inherits it. The same Version can never remove that policy.
      • draftOrdered enforces tenant/version-wide realmSlug uniqueness. Therefore a creator cannot move a realm to another worldSlug. The upsert under the new selector collides with the inherited row.

      Neither problem is reachable through production ingress today. Both become user-visible when the reviewed-source writer is wired.

      Add a closed DELETE payload keyed by (worldSlug, realmSlug) to revision/effective. Mirror the command-source rules: deny a delete of an absent selector, and keep revision provenance. Extend the V50.8/V50.12 application guards to match. If deletion is intentionally out of scope for v1, state that in the realm-entry policy owner contract.

      • Accepted Acceptedcanonicalcapabilitygap: ownerAPIexplicitlyrequiresdeletion butRealmPolicySourceonlyupserts. AddclosedDELETEselector/provenance operation, absentdelete denial, exactreplay+moveproof, preserveexistingcanonicalupserts/retainedbytes; no activation.
    3. Assert the storage guard messages, not only RuntimeException.Trivial

      These PostgreSQL tests claim to prove specific trigger guards. They assert only RuntimeException, so an unrelated SQL, lock, or fixture error also passes them. Each guard raises a deterministic message, so assert that message.

      • services/game-design-service/src/test/java/integration/net/firedevops/firemud/gamedesign/publication/GameDesignPublicationOperationPostgresIntegrationTest.java#L796-L808: for the epoch, digest, and content fields, assert "publication terminal content or committed epoch differs from owner seal". For the terminal field, assert "publication terminal bytes differ from original owner result". Apply the same change to the loop at Lines 762-789.
      • services/game-design-service/src/test/java/integration/net/firedevops/firemud/gamedesign/draft/RealmPolicySourcePostgresIntegrationTest.java#L566-L574: replace .isInstanceOf(RuntimeException.class) with .hasMessageContaining("realm policy history is immutable").
      • Accepted Validproofspecificitygap: genericRuntimeException canmaskunrelatedSQLfailure. Assertactualdeterministicfirstseal/terminalimmutability/historyguard messages, correctreviewersuggestedpostsealedmessageagainstrealtriggerorder.
    4. Pin the 473-unit / 109-PostgreSQL result to a revision and run.Minor

      The new status cites "the primary full source run" and a follow-up 27-case suite. It names no commit SHA, CI run, or job. The same tracker pins every other proof claim to an exact head and run, for example 0c15969… with run 38205959330. Without that pin, a reader cannot tell whether a later head still matches this result. The AR-1.5 row at Line 80 repeats the same unpinned totals. Record the source revision and the run or job identifiers for the full run and for the 27-case rerun. Alternatively, state explicitly that the run was local and unpublished.

      As per coding guidelines: "implemented does not imply proven, and a historical broad test run does not substitute for focused proof."

      • Accepted Acceptedprooftraceability: pin local unpublished primary473unit109PG +final27PG to sourcepostimages9bf/logtimestamps and actualfreshGDSCIjob115153084495/run38354137185; no broaderworkflow/runtimeclaim.
    5. Require a non-empty, closed requiredOwners array when a Draft commit binding is inserted.Minor

      The insert path checks the identity fields in binding_json. It does not check requiredOwners. Every later guard assumes that the array exists:

      • enforce_gd_draft_commit_visibility_fence (Lines 680-692) runs a LEFT JOIN over jsonb_array_elements_text(... -> 'requiredOwners'). If the key is missing or the array is [], the join returns no rows. NOT EXISTS is then true, so a fence is accepted with no APPLIED owner.
      • The same empty-set result also affects the SYNCHRONIZED slot-release check (Lines 779-788) and the selection check in V50.2 (Lines 225-237).
      • enforce_gd_draft_commit_owner_result (Line 582) evaluates NOT ((NULL) ? NEW.owner). The result is NULL, and the IF treats NULL as false. The trigger therefore accepts an owner result outside any bound owner set.

      Only gd_draft_commit_has_exact_terminal_abort_vector rejects an absent or empty array. A raw insert that passes the Version source proof can therefore produce a "synchronized" commit that no owner applied. These triggers are the storage-level enforcement, so add the check where the binding is first stored.

      🛡️ Proposed fix

           IF NEW.binding_json::jsonb ->> 'canonicalTenantId' IS DISTINCT FROM NEW.canonical_tenant_id::text
               ...
               OR NEW.binding_json::jsonb ->> 'schemaVersion' IS DISTINCT FROM '1' THEN
               RAISE EXCEPTION 'Stored Draft commit JSON differs from its indexed identity'
                   USING ERRCODE = 'check_violation';
           END IF;
      +    IF jsonb_typeof(NEW.binding_json::jsonb -> 'requiredOwners') IS DISTINCT FROM 'array'
      +        OR jsonb_array_length(NEW.binding_json::jsonb -> 'requiredOwners') = 0
      +        OR EXISTS (
      +            SELECT 1 FROM jsonb_array_elements(NEW.binding_json::jsonb -> 'requiredOwners') o(v)
      +            WHERE jsonb_typeof(o.v) IS DISTINCT FROM 'string'
      +               OR o.v #>> '{}' NOT IN ('WORLD_MANAGEMENT', 'ENTITY_MANAGEMENT', 'GAME_LOGIC',
      +                                      'AUTOMATION_SCRIPTING', 'GAME_DESIGN_CONTROL_PLANE'))
      +        OR (SELECT count(DISTINCT o) FROM jsonb_array_elements_text(
      +                NEW.binding_json::jsonb -> 'requiredOwners') o)
      +           <> jsonb_array_length(NEW.binding_json::jsonb -> 'requiredOwners') THEN
      +        RAISE EXCEPTION 'Draft commit binding requires a non-empty distinct required owner set'
      +            USING ERRCODE = 'check_violation';
      +    END IF;
      

      Also change Line 582 so that a NULL result fails: IF NOT COALESCE((parent_record.binding_json::jsonb -> 'requiredOwners') ? NEW.owner, FALSE) THEN.

      • Accepted Validrawstoragezero-owner/nullmembershipgap. ForwardrequiredOwnersINSERTguard nonemptydistinctclosedknownstrings plusownerresultCOALESCEfalse; physicalmalformeddenials/validclaimapplyfenceproof, nooldSQL/historyrewrite.
  10. Hosted Review 3 CompletedRuntime 11m 11s
    Found: 8 Accepted: 2/1/4 Routed: 0
    1. Reject source-less fence advances for Drafts that have source genesis.Major

      advanceVisibilityFence is public. It advances the coordinator pointer without moving the command and realm-policy source heads. advanceSourceVisibilityFence is the only path that captures both sources.

      Consider a genesis-enrolled Draft whose fence is advanced through advanceVisibilityFence, for example for a World-only commit. In that case:

      • game_design_command_source_head.visible_commit_id stays NULL.
      • The coordinator fence then names a commit.
      • CommandSourceRepository.requireVisibleHeadMatchesFence throws COMMAND_SOURCE_VISIBLE_FENCE_CHANGED for every later command application.
      • readSynchronized returns empty for that commit.
      • No repair path exists, because the source head can only advance to a snapshot whose fence is current.

      The integrity invariant in the contract ("only the exact fully synchronized owner fence advances the effective snapshot") therefore depends on which public method the caller chooses. No V50.x trigger enforces it.

      When GameDesignSourceRepository.readGenesis(target) is present, make advanceVisibilityFence refuse the call. Alternatively, reduce it to package-private and route all callers through advanceSourceVisibilityFence. Retained fixtures that need the raw primitive can keep the package-private seam.

      • Accepted Validpublicrawfencecanbypasssourcecapture. Use explicitreviewalternative: make rawadvanceVisibilityFence packageprivate androuteactualproductionthroughpublicadvanceSourceVisibilityFence; retainedsamepackageseamisnotproductionauthority.
    2. Map transaction-start failures to UNAVAILABLE and wrap response encoding.Minor

      owner.readExact runs inside a TransactionTemplate. If the service cannot get a connection, Spring throws CannotCreateTransactionException, which is a TransactionException. A TransactionException is not a DataAccessException. The catch at Lines 89-90 therefore does not match it. The failure falls through to Line 99 and returns INTERNAL. A transient storage outage becomes a non-retryable status for the Account or World caller. RealmPolicyPublicationGrpcService already catches TransactionException and maps it to UNAVAILABLE. The PR objectives also state that transaction failures map to UNAVAILABLE.

      Line 103 calls GameDesignPublicationTerminalReadGrpcCodec.toResponse outside the try. If encoding throws, the exception escapes the handler and gRPC returns UNKNOWN. The realm-policy handler wraps its response encoding and returns FAILED_PRECONDITION or INTERNAL.

      🐛 Proposed fix

           } catch (org.springframework.dao.DataAccessException
      -        | org.jooq.exception.DataAccessException unavailable) {
      +        | org.jooq.exception.DataAccessException
      +        | org.springframework.transaction.TransactionException unavailable) {
             fail(observer, Status.UNAVAILABLE, "Publication terminal owner storage unavailable");
             return;
      @@
      -    observer.onNext(GameDesignPublicationTerminalReadGrpcCodec.toResponse(request, result));
      +    final ReadGameDesignPublicationTerminalResponse response;
      +    try {
      +      response = GameDesignPublicationTerminalReadGrpcCodec.toResponse(request, result);
      +    } catch (IllegalArgumentException | IllegalStateException inconsistent) {
      +      fail(
      +          observer,
      +          Status.FAILED_PRECONDITION,
      +          "Retained publication terminal evidence unavailable or inconsistent");
      +      return;
      +    } catch (RuntimeException unexpected) {
      +      fail(observer, Status.INTERNAL, "Publication terminal response encoding failed");
      +      return;
      +    }
      +    observer.onNext(response);
           observer.onCompleted();
      
      • Accepted Validavailability/encodingerror boundary: includeSpringTransactionException inUNAVAILABLE andmap encodingfailures throughguardedresponse beforeonNext/complete, meaningfulRPCfaultproof.
    3. Remove the unused full-version digest backfill path.Trivial

      PublishAttemptRepository.backfillFullVersionRequestDigestIfAbsent has no production caller. Remove the repository method, this integration test, and the test-only mock verifications in VersionPublishCommandServiceImplTest.

      • Accepted Validpre-v1convergence: digestbackfillhasNOproductioncallers, onlytest references confirmedbyfullserviceRG. Removeunusedmethod/test/mockverifications; preserveexactretainedterminalreplayauthorization/checks.
    4. Enforce the reviewed-base requirement at the source owner, not only in the composing repository.Major

      Only GameDesignSourceRepository calls requireRetained. RealmPolicySourceRepository.apply/applyMutation and CommandSourceRepository.apply are public. They stage source applications for any claimed binding, including an opaque baseCommitId such as "ISOLATED-explicit-base". RealmPolicySourcePostgresIntegrationTest shows this: it claims through coordinator.claim and applies policy source with no reviewed-base row.

      The V50.8 and V50.10 application triggers do not check game_design_reviewed_draft_base either. The contract says that unknown or contradictory base references "fail before a new application" and that the closed game-design-draft-base-reference/v1 grammar governs the base. At present the database does not enforce either rule.

      Pick one of these fixes:

      • Add an existence check against game_design_reviewed_draft_base (exact request/commit/digest) to the application insert guards in a forward migration.
      • Reduce the per-source apply methods to package-private so that GameDesignSourceRepository is the only entry point, and move the retained-fixture tests to that path.
      • Accepted Validbaseauthoritystoragegap: per-sourceapplicationINSERTmustrequire exactretainedreviewedbase forcanonicaltarget/request/commit/digest/binding. ForwardV50.16 only, actualclosedgenesis/authoredclaimReviewed fixturepath; no fakelegacy authority.
    5. Reuse replayTerminalAttempt for the FAILED branch and remove the stale comment.Trivial

      Lines 170-182 duplicate the FAILED branch of replayTerminalAttempt (Lines 338-349) exactly. That covers the validation, the requireNoPublicationOperation check, and the snapshot construction. The comment at Lines 171-172 refers to a "draft-dependent compatibility backfill". This PR removes that backfill. Both copies must currently stay aligned by hand. A future change to one terminal-replay check can therefore miss the mechanics path.

      ♻️ Proposed refactor

      --- "a/services/game-design-service/src/main/java/net/firedevops/firemud/gamedesign/service/impl/VersionPublishCommandServiceImpl.java"
      +++ "b/services/game-design-service/src/main/java/net/firedevops/firemud/gamedesign/service/impl/VersionPublishCommandServiceImpl.java"
      @@ -164,22 +164,10 @@
             requireCanonicalOwnerPublicationCarrier(request);
             attempt = reserveDraftAttempt(request);
           }
      -    if (attempt.getStatus() == PublishAttemptStatus.SUCCEEDED) {
      -      return replayTerminalAttempt(request, attempt);
      -    }
      -    if (attempt.getStatus() == PublishAttemptStatus.FAILED) {
      -      // Failed legacy attempts may retain only terminal evidence after their draft was deleted.
      -      // Validate their stable scope before entering the draft-dependent compatibility backfill.
      -      validateTerminalFullVersionAttempt(attempt, request);
      -      if (request.intent() != null) publishAttemptRepository.requireNoPublicationOperation(attempt);
      -      return new PublishWorkflowSnapshot(
      -          attempt.getVersionId() == null ? 0L : attempt.getVersionId(),
      -          attempt.getVersionNumber(),
      -          request.publishWorkflowId(),
      -          "FAILED",
      -          emptyIfNull(attempt.getFailureCode()),
      -          emptyIfNull(attempt.getFailureMessage()));
      -    }
      +    if (attempt.getStatus() == PublishAttemptStatus.SUCCEEDED
      +        || attempt.getStatus() == PublishAttemptStatus.FAILED) {
      +      return replayTerminalAttempt(request, attempt);
      +    }
           requireSelectedIntent(request);
           validateFullVersionAttempt(attempt, request);
           requireCanonicalOwnerPublicationCarrier(request);
      
      • Accepted Validsharedterminal-replaydeduplication andobsoletebackfillcomment: existingFAILEDmechanicduplicateshelperexactly. ReusecanonicalreplayTerminalAttempt forbothterminalstatuses, preserveallchecks.
    6. Override equals, hashCode and toString for PublishedSet, or replace the record with a class.Trivial

      PublishedSet is a record with three byte[] components: operationBytes, captureBytes and terminalEvidenceBytes. The record-generated equals and hashCode compare these arrays by reference, not by content. The record-generated toString prints array identities. As a result, two PublishedSet values built from the same stored evidence are not equal. The tests compare fields one by one, so the problem does not appear today. A later assertThat(a).isEqualTo(b) or a set/map lookup would fail without a clear reason.

      The accessors already return clones. Add content-based equals and hashCode that use Arrays.equals and Arrays.hashCode for the three arrays. Alternatively, convert PublishedSet to a final class with explicit accessors.

      Based on learnings: "avoid converting a class to a record if it holds array-typed fields (e.g., byte[]). Record-generated equals/hashCode/toString use identity-based semantics for arrays".

      ♻️ Proposed content-based equality

           @Override
           public List<Policy> policies() {
             return List.copyOf(policies);
           }
      +
      +    @Override
      +    public boolean equals(Object other) {
      +      return other instanceof PublishedSet that
      +          && versionNumber == that.versionNumber
      +          && publicationVersionStateEpoch == that.publicationVersionStateEpoch
      +          && policyCount == that.policyCount
      +          && target.equals(that.target)
      +          && sourceCommitId.equals(that.sourceCommitId)
      +          && sourceEpoch.equals(that.sourceEpoch)
      +          && publishedReleaseBundleRef.equals(that.publishedReleaseBundleRef)
      +          && publishedReleaseBundleDigest.equals(that.publishedReleaseBundleDigest)
      +          && publishWorkflowId.equals(that.publishWorkflowId)
      +          && manifestHash.equals(that.manifestHash)
      +          && Arrays.equals(operationBytes, that.operationBytes)
      +          && Arrays.equals(captureBytes, that.captureBytes)
      +          && Arrays.equals(terminalEvidenceBytes, that.terminalEvidenceBytes)
      +          && policySetDigest.equals(that.policySetDigest)
      +          && policies.equals(that.policies);
      +    }
      +
      +    @Override
      +    public int hashCode() {
      +      return Objects.hash(target, versionNumber, publishWorkflowId, policySetDigest,
      +          Arrays.hashCode(operationBytes), Arrays.hashCode(captureBytes),
      +          Arrays.hashCode(terminalEvidenceBytes), policies);
      +    }
      +
      +    @Override
      +    public String toString() {
      +      return "PublishedSet[workflow=" + publishWorkflowId + ", policySetDigest="
      +          + policySetDigest + ", policyCount=" + policyCount + "]";
      +    }
      
      • Accepted Validrecordvalue-semantics defect: bytearraycomponents currentlyuseidentityEquals/hash. Content-awareequals/hash retainingallotherfields/defensiveclones andsamevalue/differentbytes tests; optionaltoStringnotrequired.
    7. Run the combined-source proof against the current schema (V50.14).Trivial

      This fixture migrates only to 50.12. V50.13 (stable release-row receipt evidence) and V50.14 (visibility-pointer advance/delete/truncate guards and non-genesis source-head insert guard) are therefore absent. The combined command/policy flow, the mixed-outcome replay, and the source-backed freeze never run under those guards.

      The tracker cites this suite as V50.14-era proof for AR-1.5. RealmPolicySourcePostgresIntegrationTest already migrates to 50.14. Align this fixture with it so that the combined source path is proven against the deployed migration set.

      Proposed fix

      --- "a/services/game-design-service/src/test/java/integration/net/firedevops/firemud/gamedesign/draft/GameDesignSourcePostgresIntegrationTest.java"
      +++ "b/services/game-design-service/src/test/java/integration/net/firedevops/firemud/gamedesign/draft/GameDesignSourcePostgresIntegrationTest.java"
      @@ -392,7 +392,7 @@
               .placeholders(Map.of("serviceSchema", schema))
               .locations("classpath:db/migration")
               .table("flyway_schema_history_game_design_service")
      -        .target("50.12")
      +        .target("50.14")
               .load()
               .migrate();
           var write = new TransactionTemplate(new DataSourceTransactionManager(dataSource));
      
      • Rejected Duplicate ofalreadyacceptedCLI5f3 latestschemafixtureproofgap, sameGameDesignSourcePG line. Currentfix removesoldtargetandphysicallyqualifieslatestforwardguards; nosecondacceptedcount.
    8. Use the shared PostgreSQL test image instead of a hard-coded tag.Trivial

      Line 119 pins postgres:16-alpine directly. Other PostgreSQL integration tests in this service use TestContainerImages.postgres(), for example PublishAttemptServiceTransactionIntegrationTest. If the shared image changes, this test still runs on a different PostgreSQL version. Trigger and jsonb byte-equality proofs in this file depend on server behavior.

      ♻️ Proposed fix

      --- "a/services/game-design-service/src/test/java/integration/net/firedevops/firemud/gamedesign/publication/GameDesignPublicationOperationPostgresIntegrationTest.java"
      +++ "b/services/game-design-service/src/test/java/integration/net/firedevops/firemud/gamedesign/publication/GameDesignPublicationOperationPostgresIntegrationTest.java"
      @@ -116,7 +116,8 @@
       @Testcontainers(disabledWithoutDocker = true)
       class GameDesignPublicationOperationPostgresIntegrationTest {
         @Container
      -  static PostgreSQLContainer<?> postgres = new PostgreSQLContainer<>("postgres:16-alpine");
      +  static PostgreSQLContainer<?> postgres =
      +      new PostgreSQLContainer<>(net.firedevops.firemud.test.TestContainerImages.postgres());
       
         private static final AtomicLong TEST_CERTIFICATE_SERIAL = new AtomicLong(1);
       
      
      • Accepted Validcanonicaltestimagealignment: useexistingTestContainerImages.postgres() insteadhardcodedtag soownerSQL/JSONbyteproof tracksrepositorysupportedimage. NoDocker/resource/environmentsettingchanges.
  11. Hosted Review 4 CompletedRuntime 11m 46s
    Found: 5 Accepted: 0/1/2 Routed: 0
    1. Run the published-policy proof against the latest schema, not V50.14.Trivial

      fixture migrates only to 50.14. baseline creates its policy commit through coordinator.claim without reviewed-base evidence. Under V50.16, GameDesignSourcePostgresIntegrationTest shows that this sequence fails with "Draft source application requires exact reviewed base evidence". As a result, this suite never tests the publication, sealing and readback path under the V50.15 required-owner guards or the V50.16 reviewed-source guards.

      Fix:

      • Create the baseline through GameDesignReviewedBaseRepository.resolve and sources.claimReviewed, as the start helper in the source suites does.
      • Remove the .target("50.14") pin so that the suite migrates to the latest schema.

      Also applies to: 497-514

      • Rejected Duplicate acceptedCLI6finding4; same latest-schema publication fixture and actual reviewed-base/source-aware setup correction owns the fix, no double accepted count.
    2. Allow selected-publication retries after lifecycle transitions.Minor

      For an intent-bearing request, replaySucceededAttempt calls readPublication. That method returns partial readback unless the current version state is exactly PUBLISHED. If a succeeded selected publication later moves to ACTIVE or RETIRED, reconciliation returns PENDING instead of the stored SUCCEEDED result.

      Separate terminal-replay validation from the readback used to mark an attempt successful. The terminal replay path must accept PUBLISHED, ACTIVE, and RETIRED while preserving the existing bundle, artifact, selected-world, committed-bundle, publication-gate, and recorded-digest checks. Add a selected-publication test that retries after an ACTIVE transition.

      • Accepted Confirmed selected SUCCEEDED replay uses PUBLISHED-only readPublication and becomes PENDING after ACTIVE/RETIRED. Separate terminal-state acceptance while preserving full bundle/artifact/selection/gate/digest checks; add selected lifecycle replay proof.
    3. Align the AR-1.5 status row and the immutable-source section with the newer validation record.Minor

      Line 13 records the 2026-10-13 local runs: 476 unit and 114 physical PostgreSQL cases, then an affected 12-case PostgreSQL run. Line 23 and the AR-1.5 row on Line 84 still cite only the older 473/109 checkpoint at 9bf78e2. Both still say that the V50.15 owner-list guard and the exact publication-terminal denial assertions are "pending consolidated proof".

      If the newer run covers V50.15, mark that proof as complete and cite the newer evidence. If it does not, state in Line 13 that V50.15 remains pending. In both cases, the scan-first row must agree with the narrative.

      As per coding guidelines: "Keep its status, implementation record, validation, gaps, decisions, and service-map sections aligned".

      Also applies to: 84-84

      • Rejected Duplicate acceptedCLI6finding1; same trackerpublication/proof inconsistency is being corrected and qualified under thatsource, no double accepted count.
    4. Assert the rejection reason for each malformed payload.Trivial

      The loop accepts any IllegalArgumentException. All three payloads share the same revisionId and binding helper. If one payload fails for an unrelated reason, the test still passes. For example, DraftCommitBinding.create can reject the binding, or upsertPayload validation can fail. In that case, the test does not prove the targeted guard: surplus field, unsupported revisionKind, or schema version 2. Add .hasMessageContaining(...) with the expected message for each case. Also build bad outside the lambda so that construction failures are not counted as parser rejections.

      • Accepted Confirmed malformed-command assertions accept anyIllegalArgumentException. Keep bindingconstruction outside assertion (already so) and require precise surplusfield/revisionkind/schemaversion rejection messages.
    5. Use the shared PostgreSQL test image in the new trigger-proof suites.Trivial

      Three new suites pin postgres:16-alpine directly. GameDesignPublicationOperationPostgresIntegrationTest and PublishAttemptServiceTransactionIntegrationTest use TestContainerImages.postgres(). If the shared image changes, these trigger and jsonb proofs run on a different server version.

      • services/game-design-service/src/test/java/integration/net/firedevops/firemud/gamedesign/publication/RealmPolicyPublicationPostgresIntegrationTest.java#L84-L84: replace the literal with TestContainerImages.postgres().
      • services/game-design-service/src/test/java/integration/net/firedevops/firemud/gamedesign/draft/GameDesignSourcePostgresIntegrationTest.java#L45-L45: replace the literal with TestContainerImages.postgres().
      • services/game-design-service/src/test/java/integration/net/firedevops/firemud/gamedesign/draft/RealmPolicySourcePostgresIntegrationTest.java#L54-L54: replace the literal with TestContainerImages.postgres().

      📍 Affects 3 files

      • services/game-design-service/src/test/java/integration/net/firedevops/firemud/gamedesign/publication/RealmPolicyPublicationPostgresIntegrationTest.java#L84-L84 (this comment)
      • services/game-design-service/src/test/java/integration/net/firedevops/firemud/gamedesign/draft/GameDesignSourcePostgresIntegrationTest.java#L45-L45
      • services/game-design-service/src/test/java/integration/net/firedevops/firemud/gamedesign/draft/RealmPolicySourcePostgresIntegrationTest.java#L54-L54
      • Accepted Confirmed three new PostgreSQL suites retain hardcoded16 tag. Use existing canonical TestContainerImages.postgres() and physically qualify affected suites on shared server version.
  12. CLI Review 6 CompletedRuntime 3m 28s
    Found: 4 Accepted: 0/1/1 Routed: 0
    1. Prove realm-policy publication against the latest schema, not V50.14.Trivial

      fixture() stops at migration 50.14. Production applies V50.15 (required-owner shape guard) and V50.16 (reviewed-base requirement for every source application). The baseline() helper uses coordinator.claim with the unresolvable base "ISOLATED-initial-source-base" and no reviewed-base evidence. V50.16 would reject that helper. This class therefore proves publication only on a schema that does not exist in production. It cannot detect a regression in which the latest guards block the publication path.

      Migrate to the latest version. Build the baseline the way RealmPolicySourcePostgresIntegrationTest.start does: resolve the fresh genesis base with GameDesignReviewedBaseRepository.resolve, then call GameDesignSourceRepository.claimReviewed. Then use IsolatedPublicationOwnerSetup.retainSourceBacked (or retainFrozenSourceBacked) in prepare.

      • Accepted Confirmed positive publication fixture stops50.14 and uses opaque baseline with no reserved reviewed-base evidence. Converge normal latest-schema lifecycle through actual fresh genesis, claimReviewed and source-aware owner capture; preserve retained evidence negatives.
    2. Make the #3120 checkpoint status consistent across the tracker.Minor

      Line 11 calls 9bf78e22f742c3830821c920e70570eb1bc03e2b the "published #3120 immutable-source proof checkpoint". Line 23 and the AR-1.5 row (Line 84) say the proof ran on "locally unpublished postimages". Both statements cite Validation run 38354137185, which is a hosted CI run.

      Line 23 and Line 84 also say that the V50.15 owner-list guard and the terminal-denial assertions are "pending consolidated proof". Line 13 records later local full and affected runs on the combined fixes. A reader cannot tell which statement is current.

      Choose one publication status for the checkpoint. State whether the Line 13 runs cover the V50.15 assertions, and update Line 23 and Line 84 to match.

      Path instruction: "Review docs for canonical-current-state consistency."

      • Accepted Confirmed two residual tracker paragraphs mislabeled hosted9bf evidence locally unpublished and kept V50.15 proof pending after qualified3e812. Correct canonical status and exact run attribution without widening implementation claims.
    3. Confirm that every caller that creates a new full Draft runs in an explicit READCOMMITTED transaction.Major

      Confirm that every caller that creates a new full Draft runs in an explicit `READ_COMMITTED` transaction.

      save declares @Transactional(isolation = Isolation.READ_COMMITTED) with the default REQUIRED propagation. With no outer transaction, Spring opens a new READ_COMMITTED transaction, so the guard always passes in that case.

      With an outer transaction, Spring joins it and does not apply the inner isolation. The default setting validateExistingTransaction=false keeps this silent. If the outer transaction uses ISOLATION_DEFAULT, TransactionSynchronizationManager.getCurrentTransactionIsolationLevel() returns null. The guard then throws "New full Draft creation requires one writable READ_COMMITTED source transaction".

      Any existing @Transactional service that creates a non-script-only DRAFT Version can therefore fail where it worked before. Possible callers include the demo/test data seeder and game or Version creation services. enrollFreshDraft also needs the game_design_realm_policy_version_insert witness from the same transaction and version_state_epoch = 1. A caller that does not meet these conditions also fails.

      Verify the following:

      • List every caller of VersionRepository.save that passes a new full DRAFT Version.
      • Confirm that each one runs with explicit READ_COMMITTED isolation and epoch 1.
      • Update any caller that does not meet both conditions, or document why the change does not reach it.
      • Rejected Complete production caller investigation finds no new full-DRAFT save: seeder creates PUBLISHED/epoch1, script patch creates scriptOnly DRAFT, publication updates existing rows. Future default-isolation caller would intentionally deny; no current regression to fix.
    4. Run the header-clone rejection checks before the additive release column is added.Minor

      Lines 114-121 add future_optional_evidence to published_release_bundle. After that change, to_jsonb(release)::TEXT no longer equals the retained operation.release_row_json. guard_published_realm_policy_set (V50.9, line 187) therefore rejects every clone with the same terminalBindingError text, whatever field the clone changes.

      Line 149 runs assertRejectedHeaderClonesPreserveOriginal after the column is added. As a result, the operation_bytes, terminal_evidence_bytes, and capture_bytes cases pass even if the guard drops the specific field comparison. These cases do not prove what their names state.

      Move the call so that it runs before the ALTER TABLE. An unmodified clone then fails at the primary key, not at the guard, so each expected message proves that the guard rejected that specific field.

      🧪 Proposed reordering

           assertThat(originalReleaseEvidence).isEqualTo(originalWholeReleaseRow);
      +    var preAlteration =
      +        fixture.publicationReads().readPublishedSet(fixture.target()).orElseThrow();
      +    assertRejectedHeaderClonesPreserveOriginal(fixture, preAlteration);
       
           fixture.tx(
               () -> {
      @@
           assertThat(original.publicationVersionStateEpoch())
               .isEqualTo(operation.world().request().versionStateEpoch() + 1);
      -    assertRejectedHeaderClonesPreserveOriginal(fixture, original);
      
      • Rejected Allegation cites obsolete V50.9 whole-row comparison. Fixture50.14 includes V50.13 replacement guard using publication_release_row_evidence_v1(release), ignoring added columns; other clone fields remain unchanged so guards remain specific after ALTER. Physical current tests pass.
  13. CLI Review 7 CompletedRuntime 3m 22s
    Found: 4 Accepted: 0/1/0 Routed: 0
    1. Confirm that one failed publication should permanently freeze the Draft Version.Major

      The primary key (canonical_tenant_id, canonical_version_id) allows only one selection for each Version. The selection is immutable, and the trigger rejects UPDATE and DELETE. Lines 247-264 reject every later game_design_draft_commit_application_slot insert after any selection exists. Other migrations add more permanent constraints:

      • game_design_publication_operation has UNIQUE (tenant_id, version_id) (V50.6).
      • game_design_realm_policy_capture permanently freezes the policy source (V50.8).

      Here is a likely sequence. A publication reaches NO_PUBLICATION after a gate failure such as RECORDED_CONTENT_DIGEST_MISMATCH. The Version then stays DRAFT. It cannot accept new owner applications to fix the cause, and it cannot be reselected for a new publication. A reservation without an attempt causes the same block, for example when the process crashes between reserve and attempt creation. No supported path recovers that Version.

      Verify that version-control.md and api-contracts.md explicitly require "one publication attempt per Draft Version, retry only through a new Version". If they do not, scope the interlock and uniqueness to non-terminal selections. For example, key the interlock on an operation that is still PENDING, or on an attempt that has not reached a terminal failed state.

      • Rejected Duplicate CLI1 finding10, OPEN failed-selection-recovery route f88269d02a28928ee09f8414c233d8eb01b000c237d19ef286388eed50ae5485. Version-control records passive retention and recovery gap; fresh/PENDING ingress denied. Preserve immutable evidence; original route remains open.
    2. Reject a DELETE of an absent command key.Minor

      replay calls effective.remove(mutation.stableKey()) and accepts the mutation when the key is not in the inherited set. The commit then records a digest-bound delete that removes nothing. A mistyped commandId is never detected. RealmPolicySource.effective rejects the same case with "Cannot delete an absent policy selector". The api-contracts document says that omission is never deletion and that every deletion names an exact stable key. Make the command path fail closed in the same way as the realm-policy path.

      🐛 Proposed fix

             if (mutation.operation() == OperationKind.DELETE) {
      -        effective.remove(mutation.stableKey());
      +        if (effective.remove(mutation.stableKey()) == null) {
      +          throw new IllegalArgumentException("Cannot delete an absent command definition key");
      +        }
             } else {
      
      • Accepted Valid absent-command DELETE is currently silently accepted. Require an existing effective stable key, aligned with closed explicit source mutation and policy deletion; preserve ordered replay/provenance with negative proof.
    3. Replace the != comparisons of Version row IDs in both genesis readbacks.Major

      Both readbacks compare a jOOQ Long with TargetProof.gameDesignVersionRowId() by using !=. If the accessor returns a boxed Long, the comparison checks references. Values from -128 to 127 are cached, so the comparison passes for small IDs and fails for larger IDs. Every Version with a row ID above 127 would then fail genesis readback, and all source apply, capture, and freeze operations would deny. Tests that use small row IDs do not detect this. Check the return type of TargetProof.gameDesignVersionRowId(). Use Objects.equals in both places, as other code in this PR already does.

      • services/game-design-service/src/main/java/net/firedevops/firemud/gamedesign/publication/CommandSourceRepository.java#L106-L106: replace row.get("game_design_version_row_id", Long.class) != target.gameDesignVersionRowId() with !Objects.equals(...).
      • services/game-design-service/src/main/java/net/firedevops/firemud/gamedesign/publication/RealmPolicySourceRepository.java#L80-L80: replace target.gameDesignVersionRowId() != row.get("version_id", Long.class) with !Objects.equals(...).
      • Rejected False premise: TargetProof.gameDesignVersionRowId is primitive long (record line52). Both Long-versus-long != expressions unbox and compare numeric values, including IDs above127; no reference comparison.
    4. Confirm that no caller creates a full Draft inside a default-isolation transaction.Major

      save uses @Transactional(isolation = READ_COMMITTED) with default REQUIRED propagation. If a caller already holds a transaction, Spring joins that transaction and does not change its isolation level. If the outer transaction uses the default isolation, getCurrentTransactionIsolationLevel() returns null. The new guard then throws IllegalStateException for every new full DRAFT Version. Candidates include the demo/test data seeder, game-creation services, and any @Transactional service method that calls versionRepository.save(newDraft). Before this change, those calls succeeded.

      Check every caller that creates a non-script-only DRAFT Version with id == null. Confirm that each caller runs with no outer transaction or inside a READ_COMMITTED transaction. If the caller set is not closed, use Propagation.REQUIRES_NEW for new full-Draft inserts. Alternatively, add isolation = READ_COMMITTED to those callers.

      • Rejected Duplicate CLI6 finding2. Rechecked all production save callers: both seeder paths create PUBLISHED; VersionServiceImpl creates scriptOnly=true DRAFT; publication updates existing Version. No new full DRAFT default-isolation caller; guard deliberately requires proved creation transaction.
  14. CLI Review 8 CompletedRuntime 3m 42s
    Found: 2 Accepted: 0/0/0 Routed: 0
    1. Use value equality for the genesis readback row-ID checks.Major

      Both genesis readback checks compare a Version row ID by using !=. If TargetProof.gameDesignVersionRowId() returns a boxed Long, Java compares references, not values. A matching Version row ID above 127 then fails the check, and every new Draft genesis readback and enrollment fails. Tests that use small sequence IDs do not show this failure. Verify the declared return type of DraftCommitBinding.TargetProof.gameDesignVersionRowId() in common-platform-core. Use Objects.equals in both places so that the result does not depend on that type.

      • services/game-design-service/src/main/java/net/firedevops/firemud/gamedesign/publication/CommandSourceRepository.java#L106-L106: replace row.get("game_design_version_row_id", Long.class) != target.gameDesignVersionRowId() with !Objects.equals(row.get("game_design_version_row_id", Long.class), target.gameDesignVersionRowId()).
      • services/game-design-service/src/main/java/net/firedevops/firemud/gamedesign/publication/RealmPolicySourceRepository.java#L79-L81: replace target.gameDesignVersionRowId() != row.get("version_id", Long.class) with !Objects.equals(target.gameDesignVersionRowId(), row.get("version_id", Long.class)).
      • Rejected Duplicate CLI7 finding3 false premise: TargetProof.gameDesignVersionRowId is primitive long, so both jOOQ Long != long expressions unbox and compare numeric values. IDs above127 do not incur reference inequality.
    2. Confirm that every caller that creates a new full Draft runs in an explicit READCOMMITTED transaction.Major

      Confirm that every caller that creates a new full Draft runs in an explicit `READ_COMMITTED` transaction.

      @Transactional(isolation = Isolation.READ_COMMITTED) uses the default propagation, REQUIRED. A call inside an existing transaction joins that transaction, and Spring does not apply the declared isolation level. If the outer transaction uses DEFAULT isolation, TransactionSynchronizationManager.getCurrentTransactionIsolationLevel() returns null. In that case, the guard on Lines 235-238 throws IllegalStateException for every new non-script-only DRAFT insert. PostgreSQL already defaults to READ COMMITTED, so the guard rejects transactions that are semantically valid. Game creation, the demo seeder, and other owner-local Draft creation paths can fail at runtime if they wrap save in a plain @Transactional or a default TransactionTemplate.

      Verify every caller of VersionRepository.save that inserts a full DRAFT. Each caller must either have no outer transaction or declare READ_COMMITTED explicitly. If a caller uses the default isolation, choose one fix: accept null (DEFAULT) when the database default is READ COMMITTED, or update those callers.

      • Rejected Duplicate CLI6 finding2/CLI7 finding4. Verified production callers: seeder creates PUBLISHED, script patch creates scriptOnly DRAFT, publication updates existing Version. No new full DRAFT default-isolation caller; guard intentionally requires explicit READ_COMMITTED owner transaction.

Routed Findings

2 Open1 Accepted/Fixed0 Rejected
  1. Route 1 · PR #3120 → PR #3105 OpenMajorSupply independently authorized operation receipts for scoped publication and lifecycle reads

    Launch resolution remains fail-closed; PrepareWorldInstance, WMS Draft mutation/version read, Automation activation/work-item release reads lack receiver-verifiable scope. Need exact caller workload+namespace, canonical tenant+version, selected source commit/digest, read purpose, and governing operation/lifecycle from independently authorized owner operation. Preserve terminal reads and separate Account-authorized diagnostics; no invented expiry/revocation.

    Outcome: Document producer handoff required by Overseer 7b059d55; Gameplay retains receiver/caller contract and proof ownership. Existing correlation, tenant selectors or workload identity cannot mint read authority.

  2. Route 2 · PR #3120 → Unassigned target OpenMajorA publication selection permanently freezes its Draft with no recovery path.

    The selection row is immutable, and this repository never releases it. These are its effects:

    • reserve rejects every later publish request with a different publishRequestId for the same Version (Lines 66-69).
    • The V50.2 trigger reject_gd_draft_application_during_authored_publication rejects every new application slot for that Version.
    • requireNoPublicationSelection in the coordinator and the source repositories also blocks owner application.

    Consider a selected publication that ends FAILED, for example on APPLIED_COMMIT_MISMATCH or a gate failure. The Version stays DRAFT. It cannot accept a corrective commit, and it cannot accept a new publish request. No code creates a successor Draft that copies the source.

    Confirm the intended recovery after a definitive FAILED/NO_PUBLICATION seal. Two options are a release rule tied to the sealed NO_PUBLICATION outcome, or a documented successor-Version path. The selected path is not reachable yet, so this is a lifecycle gap for the future, not a current outage.

    Outcome: Root20e0e42c accepts Major future recovery gap into existing PR-unassigned production-readiness followup. Preserve passive immutable selection; OPEN before enablement/genuine recovery proof. No deletion/unfreeze/clone or fixed/route-closure claim.

  3. Route 3 · PR #3122 → PR #3120 Accepted/FixedMajorVersion lifecycle CAS can assert unsafe states without durable fencing

    Outcome: Published5fe03e2f4: changing CAS denied before writes; same-state read-only. VersionServiceImplTest no-save/no-mutation cases passed in44-case focused gate. Secondary stale status fixed; linkCheck/lintMarkdown pass. DB-CAS/activation remain incomplete.

    Earlier routing and proof

    Earlier decisions

    • Accepted Unsafe arbitrary lifecycle writes are already contained in published24e291cc: state changes deny before persistence; same-state remains read-only. Full legal transition/DB epoch-CAS capability is not implemented; stale cross-document status correction still needed.

Unlinked items

Decisions

  1. Accepted Exact same-namespace mTLS method allowlist exists, but request tenant/version only scope lookup and do not prove caller authority. Need canonical owner evidence under ADR0038; preserve legitimate immutable/retired reads.
  2. Accepted Confirmed generic internal-service context bypass and missing authorized tenant/scope on state/artifact reads. Exact workload guard and independent tenant evidence required; clarification sent to Overseer; preserve valid terminal reads.