FireMUD Delivery Status

PR data refreshed

PR #3155 review history

Review rounds

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

Hosted CodeRabbit2 completed
6/5/03/2/0
CLI CodeRabbit3 completed
6/6/04/3/03/1/0

Recorded review history

Reviews and findings

  1. CLI Review 1 CompletedRuntime 3m 04s
    Found: 6 Accepted: 2/3/1 Routed: 0
    1. Extract the duplicated authority-bundle fixture builder.Trivial

      At least 11 new or changed test classes contain almost the same canonical authorityEvidenceBundle/v1 builder. Each copy has the same scope, projection, operation identity, authority tuple, and human-evidence maps. The copies are in these files:

      • AccountStartSessionWorldParticipationHistoricalReadServiceTest
      • AccountStartSessionWorldParticipationSettlementServiceTest
      • AccountStartSessionWorldParticipationAcquisitionGrpcServiceTest
      • AccountStartSessionWorldParticipationRepositoryTest
      • AccountStartSessionWorldOriginalAttemptEvidenceRepositoryTest
      • AccountStartSessionOperatorAuthorizationRepositoryTest
      • WorldStartSessionExecutionTerminalTest
      • WorldStartSessionExecutionTerminalReadGrpcCodecTest
      • AccountStartSessionWorldParticipationHistoricalReadGrpcCodecTest
      • AccountStartSessionWorldParticipationAcquisitionClientMtlsTest

      A future change to the closed ROOT_FIELDS or HUMAN_TENANT_FIELDS sets in StartSessionAuthorityEvidenceBundle would require the same edit in every copy.

      Move one parameterized builder into a test-fixtures source set that all three modules can use. Its parameters can include the tuple, issuance fence, source version, and evaluated/expiry instants.

      • Accepted Verified11 repeated canonical bundle scenario builders across Account/Core/Security. Share a test-only parameterized data fixture, preserving every explicit scenario value, independent decoder oracle and terminal golden bytes; no production schema/behavior changes.
    2. Name the capability row that owns the new World participation preparation.Minor

      Every other preparation subsection in this tracker names its owning capability, for example "owned by AA-1.3 in Capability Status". The new subsection names no owner. Add that line, and update the matching Capability Status row with the new production anchors and the No focused executable proof: limits. Use V158–V160 and the participation repositories as the anchors.

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

      • Accepted The new World participation preparation lacks its existing AA-1.3 owner and row anchors. Add V158–V160 and capture/participation/original-attempt repositories, preserving partial/drift-found status and explicit genuine-owner/composed-execution proof gaps.
    3. Allow bounded clock skew when Account compares Logging's observedAt with its own clock.Major

      observedAtEpochMillis comes from the Logging & Admin clock. now comes from the Account clock. The condition now < observedAt rejects the claim when Account's clock is behind Logging's by more than the RPC latency. A lag of a few milliseconds is enough.

      The check runs up to six times per ISSUE and RECOVER call. Ordinary cross-host clock drift therefore makes StartSession issuance and recovery fail with FAILED_PRECONDITION on otherwise valid claims. The failure is intermittent or persistent, depending on the drift direction.

      Allow a small, explicit future skew for observedAt. Keep the strict now >= expiresAt expiry check.

      Proposed fix

      +  private static final long MAX_CLAIM_OBSERVATION_SKEW_MILLIS = 1_000L;
      +
         private void requireFreshClaimEvidence(ReadCurrentClaimEvidenceResponse evidence) {
           Objects.requireNonNull(evidence, "Logging/Admin claim evidence is required");
           long observedAt = evidence.getObservedAtEpochMillis();
           long expiresAt = evidence.getClaimExpiresAtEpochMillis();
           long now = clock.millis();
      -    if (observedAt <= 0L || expiresAt <= observedAt || now < observedAt || now >= expiresAt) {
      +    if (observedAt <= 0L
      +        || expiresAt <= observedAt
      +        || now < observedAt - MAX_CLAIM_OBSERVATION_SKEW_MILLIS
      +        || now >= expiresAt) {
      
      • Accepted Overseer decision1223: remove only unsupported producer-observation versus Account-now ordering in both checks; preserve strict local expiry, positive ordered producer evidence, exact bindings and all authority gates.
    4. Make the "current-parent gate" proof claim match the recorded runs.Minor

      Line 25 says "The current-parent gate passed six physical PostgreSQL disclosure-handoff storage cases". The recorded runs do not support that wording:

      • Line 21 says the local current-parent full gate at c7a61401… failed.
      • Line 23 says the later current-parent carry at 932f2e13… ran only five targeted physical integration cases. Those five cases came from AccountGameplayDelegationRedisIntegrationTest.

      Neither run is a passing current-parent gate that included six disclosure-handoff cases. Name the exact run that executed these cases, for example the 0a84bfa2… exact-head CI run 38276405663. Otherwise, state that the cases passed inside the failed local gate.

      As per coding guidelines, "a historical broad test run does not substitute for focused proof".

      • Accepted The six disclosure-handoff physical cases passed within the failed c7a local aggregate and in exact0a84 CI38276405663. The later932 targeted5 did not include this suite; name exact proof rather than claiming a passing current-parent aggregate.
    5. Confirm that every committed participation reaches settlement, including after a failed acquisition response.Major

      The participation commits inside withCurrentWorldReceivingParticipationCurrentness. The later readback calls attemptEvidenceRepository.findCurrentExact, and that method requires the original Game Session lease to be unexpired. Two paths leave a committed, unsettled participation behind a failed response:

      • The lease expires between commit and readback.
      • toResponse in the gRPC adapter rejects the result.

      In both cases World receives FAILED_PRECONDITION. An exact retry also fails, because both the lease check and the insert-time reference-expiry trigger fail closed.

      The unsettled participation has downstream effects:

      • DraftAuthorizationFenceRepository.allAffectedSettled returns false for its sources.
      • The V159 source-change and hosted-terms guards block those sources.
      • The source vector includes the actor's Account source. Password reset for that account therefore stays WAITING and returns AUTH_UNAVAILABLE until settlement.

      Settlement requires a World-owned terminal. No expiry-based abort path exists.

      Verify one of the following:

      • World Management always produces an ABORTED terminal for a participation it never started, even when it received an acquisition failure.
      • Account must expose a bounded abort path that settles never-started participations.

      If neither exists, add one before registration.

      • Accepted Decision1223: correct Account original-tuple historical discovery in3155; genuine World COMMITTED/fenced-ABORTED producer remains separately OPEN pre-activation. Account correction must not claim compound finding wholly fixed.
    6. Skip the World participation check when the handoff is already DISPATCHAUTHORIZED.Minor

      Skip the World participation check when the handoff is already `DISPATCH_AUTHORIZED`.

      authorizeDispatch calls requireWorldParticipationDisclosureAdmission before it reads the row status. The Javadoc says an existing DISPATCH_AUTHORIZED row "is recovered by readback". That recovery now throws if any handoff source has a pending World participation.

      This state is reachable:

      • The handoff vector can contain non-hosted-terms sources, for example ACCOUNT.
      • V159 assert_exclusive blocks participation only on the exact disclosed hosted-terms evidence.
      • A participation can therefore become pending on another vector source after dispatch was authorized.

      The V159 trigger blocks only the PREPARED/AMBIGUOUS → DISPATCH_AUTHORIZED transition. Apply the participation check only to those transitions.

      Proposed fix

      -    fenceRepository.requireWorldParticipationDisclosureAdmission(handoff.sources());
      -    Record row = requireExactRow(handoff);
      +    fenceRepository.lockDisclosureSources(handoff.sources());
      +    Record row = requireExactRow(handoff);
           Status status = Status.valueOf(row.get("status", String.class));
           boolean newlyAuthorized = false;
      +    if (status == Status.PREPARED || status == Status.AMBIGUOUS) {
      +      fenceRepository.requireWorldParticipationDisclosureAdmission(handoff.sources());
      +    }
      
      • Accepted Verified authorizeDispatch applies World exclusion before status lookup, incorrectly denying exact DISPATCH_AUTHORIZED readback. Keep sorted source locks before journal and guard only PREPARED/AMBIGUOUS authorization transitions, with immutable SQL and no new dispatch on recovered authorization.
  2. Hosted Review 1 CompletedRuntime 10m 15s
    Found: 6 Accepted: 1/1/3 Routed: 0
    1. Check the named source-fence constraint when an invalid fence is rejected.Trivial

      The loop only checks for SQLSTATE 23514. Any CHECK constraint or guard trigger that raises check_violation meets that check. For example, an insert guard that compares the bundle with its reference would also pass the test. This test means to prove account_ss_operator_bundle_source_fence_canonical_check, so check that name in the PostgreSQL server diagnostic.

      ♻️ Proposed assertion

                 .satisfies(
      -              failure -> assertThat(findSqlException(failure).getSQLState()).isEqualTo("23514"));
      +              failure -> {
      +                SQLException sqlFailure = findSqlException(failure);
      +                assertThat(sqlFailure.getSQLState()).isEqualTo("23514");
      +                assertThat(sqlFailure)
      +                    .isInstanceOfSatisfying(
      +                        org.postgresql.util.PSQLException.class,
      +                        postgres ->
      +                            assertThat(postgres.getServerErrorMessage().getConstraint())
      +                                .isEqualTo(
      +                                    "account_ss_operator_bundle_source_fence_canonical_check"));
      +              });
      
      • Accepted SQLState23514 alone does not prove the named source-fence CHECK. Require its actual Postgres server constraint diagnostic, alongside immutable V160→160.1 identity proof.
    2. Plan for unsettled World participation before any runtime registration.Trivial

      With this change, allAffectedSettled returns false while any overlapping World participation is unsettled. Such a participation blocks sourceMutationPermitted, sourceAbortPermitted, markSourceCommitted, and markSourceAborted for every source in its captured vector. That vector includes the actor's ACCOUNT source.

      The docs state that Account expiry does not settle a participation. Only a World COMMITTED or fenced ABORTED terminal settles it, and that producer is still open. If a World terminal is never produced, Account source changes for that actor stay WAITING with no end condition. Password reset and other source writers would return retryable AUTH_UNAVAILABLE until settlement.

      The methods are not registered today, so nothing reaches this state yet. Before activation, define and document one of these:

      • A bounded settlement or reconciliation path.
      • An operator-visible metric or alert for participations that stay pending.
      • Rejected Duplicate of the already-owned World terminal/reconciliation readiness obligation39aaOPEN/unassigned; no new passiveAccount source fix or expiry-abort is authorized/needed. Existing route/producer activation hold stays explicit, not waived or counted fixed.
    3. Bind the complete Account reference at each consumer boundary.Major

      requireReferenceBinding checks only bundleVersion and sourceVersion. Account binds all four fields when it creates the reference, but StartSessionOperatorAuthorizationClient.validateResponse and StartSessionPostAuthorizationExecutionTuple.createHuman accept supplied references after only the partial check. A reference with the correct sourceVersion but substituted sourceFence or linearization can therefore enter the tuple and pass later Game Session checks.

      The source fence does not need to equal the issuance fence. Bind it and linearization to the immutable Account capture before accepting the tuple, and add rejection coverage for substituted values. The accepted test case should remain accepted.

      • Accepted Root decision1234 requires complete Account-derived original post-tuple evidence in authenticated ISSUE/RECOVER/REDEEM replies and comparison at Logging/GS redemption/launch. Earlier partial bindings need owned correction; no sourceFence=issuanceFence or inactive-only deferral.
    4. Replace the /tmp log path with a resolvable proof reference, and record the current proof run.Minor

      Line 19 cites /tmp/gameplay3155-reconciled-account-proof.log as captured evidence. Readers cannot open that path, and it is not in the repository. The tracker guideline requires evidence targets to be "repository-local and resolvable".

      The proof record is also behind the PR description. The tracker records 1,255 or 1,280 unit cases and five targeted physical cases. The PR description reports 1,289 Account unit cases and ten selected real PostgreSQL/Redis cases, including the new after-expiry recovery case.

      Make these changes:

      • Remove the /tmp path, or replace it with a CI run or artifact link.
      • Record the latest focused proof and its exact scope. Keep the statement that this proof is not an unfiltered physical run.

      As per coding guidelines, "Evidence targets must be repository-local and resolvable".

      • Accepted Tracker temporary evidence and proof scope are stale; verified selected10 current cases and later224/4 endpoint failures must be recorded honestly with repository test anchors, preserving prior history.
    5. Correct the “V128” migration labels to “V158”.Trivial

      The capture migration is V158__account_start_session_authority_captures.sql. Rename the Javadoc and assertion messages so they identify the migration that creates these objects.

      -/** PostgreSQL proof of V128 allocator ownership and capture-table statement protection. */
      +/** PostgreSQL proof of V158 allocator ownership and capture-table statement protection. */
      ...
      -                    "V128 protection trigger query must return a row")
      +                    "V158 protection trigger query must return a row")
      ...
      -                "V128 capture guard function must exist")
      +                "V158 capture guard function must exist")
      ...
      -                    "V128 capture count query must return a row")
      +                    "V158 capture count query must return a row")
      
      • Accepted Capture migration is receivingV158; correct stale donorV128 Javadoc/assertion labels with testbehavior unchanged.
    6. Check guard diagnostics in the new SQL-guard tests, not only RuntimeException.Trivial

      These PostgreSQL tests prove database guards, but each one passes on any RuntimeException. A plain TRUNCATE on a table that a foreign key references fails with SQLSTATE 0A000 before any trigger runs. This PR shows that behavior in AccountStartSessionOperatorAuthorizationRepositoryIntegrationTest. A missing trigger therefore stays undetected. Reuse the assertImmutableGuardRejected pattern, which checks SQLSTATE 23514 and the server message, and use TRUNCATE ... CASCADE to reach the no-truncate trigger.

      • services/account-service/src/test/java/integration/net/firedevops/firemud/accountservice/repository/AccountStartSessionWorldParticipationPostgresIntegrationTest.java#L420-L436: Use TRUNCATE <table> CASCADE. Check SQLSTATE 23514 for each table, because the sources and settlements tables reference account_start_session_world_participations.
      • services/account-service/src/test/java/integration/net/firedevops/firemud/accountservice/service/session/AccountStartSessionAuthorityCapturePostgresIntegrationTest.java#L108-L118: Use TRUNCATE account_start_session_authority_captures CASCADE. Check the guard SQLSTATE and message for the allocator UPDATE/DELETE and for the truncate.
      • services/account-service/src/test/java/integration/net/firedevops/firemud/accountservice/repository/AccountStartSessionWorldOriginalAttemptEvidencePostgresIntegrationTest.java#L205-L221: Check the lease-guard SQLSTATE and message for the expired INSERT. Apply the same check in assertAppendOnly (L275-L291).
      • services/account-service/src/test/java/integration/net/firedevops/firemud/accountservice/service/session/AccountStartSessionWorldParticipationPostgresIntegrationTest.java#L448-L454: Check the settlement immutability guard's SQLSTATE and message for the direct UPDATE.

      📍 Affects 4 files

      • services/account-service/src/test/java/integration/net/firedevops/firemud/accountservice/repository/AccountStartSessionWorldParticipationPostgresIntegrationTest.java#L420-L436 (this comment)
      • services/account-service/src/test/java/integration/net/firedevops/firemud/accountservice/service/session/AccountStartSessionAuthorityCapturePostgresIntegrationTest.java#L108-L118
      • services/account-service/src/test/java/integration/net/firedevops/firemud/accountservice/repository/AccountStartSessionWorldOriginalAttemptEvidencePostgresIntegrationTest.java#L205-L221
      • services/account-service/src/test/java/integration/net/firedevops/firemud/accountservice/service/session/AccountStartSessionWorldParticipationPostgresIntegrationTest.java#L448-L454
      • Accepted Generic runtime errors/plain TRUNCATE can pass on foreign-key failure instead of owned guards; strengthen exactSQLState/message/CASCADE focusedphysical proof, preserving publishedSQL.
  3. CLI Review 2 CompletedRuntime 3m 04s
    Found: 4 Accepted: 1/2/0 Routed: 0
    1. Add V160.1 and the new focused tests to the AA-1.3 record.Minor
      • Line 17 maps receiving migrations only through V160. It does not record V160.1__start_session_operator_bundle_source_fence.sql. That migration changes a constraint on the retained operator-authorization table, so it is a real change to the domain boundary.
      • The AA-1.3 implementation-anchor cell lists V158–V160 and three repositories. It does not list V160.1 or the new acquisition, historical-read, and settlement services.
      • The AA-1.3 proof-anchor cell lists none of the new focused PostgreSQL tests:
      • AccountStartSessionWorldParticipationPostgresIntegrationTest
      • AccountStartSessionWorldOriginalAttemptEvidencePostgresIntegrationTest
      • AccountStartSessionAuthorityCapturePostgresIntegrationTest
      • HostedTermsDisclosureHandoffPostgresIntegrationTest
      • Line 19 cites /tmp/gameplay3155-reconciled-account-proof.log as evidence. That file is outside the repository and cannot be resolved by a reader.

      The guidelines require the tracker sections to stay aligned when a domain boundary changes. They also say evidence targets "must be repository-local and resolvable."

      Add V160.1 to the migration-intake paragraph and to the implementation anchors. Add the focused tests to the proof anchors. Replace the /tmp path with a CI run or artifact ID, or remove it.

      As per coding guidelines: "Keep its status, implementation record, validation, gaps, decisions, and service-map sections aligned when a domain boundary changes" and "Evidence targets must be repository-local and resolvable."

      Also applies to: 137-137

      • Accepted Verified AA-1.3 intake/implementation/proof anchors omit V160.1 and owning services/tests; remove unreachable temporary evidence reference and record bounded actual proof/current limits.
    2. Return a non-retryable status for permanent denials. Do not return UNAVAILABLE.Minor

      Only IllegalArgumentException maps to FAILED_PRECONDITION. Every other RuntimeException maps to UNAVAILABLE. That catch-all also receives permanent denials:

      • AccountStartSessionOperatorAuthorizationService.denied(...) throws IllegalStateException. Examples are a changed tuple, an expired reference, the wrong target owner, or a mismatched redeemed projection.
      • AccountStartSessionOperatorAuthorizationService.NotFoundException is thrown when no original issuance exists.
      • AccountStartSessionWorldParticipationRepository.conflict() and unavailable() throw IllegalStateException. So do AccountStartSessionWorldOriginalAttemptEvidenceRepository.conflict() and unavailable().

      A World caller treats UNAVAILABLE as transient. It would retry these terminal denials forever and never classify the failure. The historical-read receiver in this PR handles the same exceptions correctly: AccountStartSessionWorldParticipationHistoricalReadGrpcService maps IllegalStateException to FAILED_PRECONDITION. Make both receivers classify errors the same way.

      🐛 Proposed status mapping

      -    } catch (IllegalArgumentException invalidEvidence) {
      +    } catch (AccountStartSessionOperatorAuthorizationService.NotFoundException missing) {
      +      observer.onError(Status.NOT_FOUND.asRuntimeException());
      +    } catch (org.springframework.transaction.CannotCreateTransactionException
      +        | org.springframework.dao.DataAccessException
      +        | org.jooq.exception.DataAccessException unavailable) {
      +      observer.onError(Status.UNAVAILABLE.asRuntimeException());
      +    } catch (IllegalArgumentException | IllegalStateException invalidEvidence) {
             observer.onError(Status.FAILED_PRECONDITION.asRuntimeException());
           } catch (RuntimeException unavailable) {
      -      observer.onError(Status.UNAVAILABLE.asRuntimeException());
      +      observer.onError(Status.INTERNAL.asRuntimeException());
           }
      

      Keep connection-level 08xxx SQL failures mapped to UNAVAILABLE, as StartSessionOperatorAuthorizationGrpcService.invoke already does.

      As per path instructions: "Flag changes that violate documented FireMUD invariants, especially gRPC application-error handling."

      • Accepted Verified receiver maps permanent owner IllegalState/NotFound denials to transientUNAVAILABLE; bounded redacted canonical error classification and meaningful tests required.
    3. Close jOOQ ignore blocks with [jooq ignore stop].Trivial

      Two new migrations end their ignore blocks with [jooq ignore end]. V158 and V159 use [jooq ignore stop], which is jOOQ's default parser stop token. An unrecognized end marker leaves the block open. Today this is harmless only because each marker is the last line of its file. Any DDL appended after the marker later would be skipped silently by jOOQ generation.

      • services/account-service/src/main/resources/db/migration/V160.1__start_session_operator_bundle_source_fence.sql#L12-L12: replace -- [jooq ignore end] with -- [jooq ignore stop].
      • services/account-service/src/main/resources/db/migration/V160__start_session_world_original_attempt_evidence.sql#L73-L73: replace -- [jooq ignore end] with -- [jooq ignore stop].
      • Rejected Both blocks end at immutable published EOF; no following DDL is lost. Current Account generateJooq passed. Future appends are prohibited by SQL-history immutability; no existing projection loss justifies rewriting checksummed files or speculative generator compatibility.
    4. Confirm which constraint accountstartsessionoperatorauthorizationscheck names before dropping it by that name.Major

      Confirm which constraint `account_start_session_operator_authorizations_check` names before dropping it by that name.

      PostgreSQL generates names for unnamed table-level checks: <table>_check, then _check1, _check2, and so on, in declaration order. This migration drops the first generated name blindly. If V126 or a later migration declared more than one unnamed table-level check, this name could belong to a different invariant than the bundle_source_fence = issuance_fence equality. Examples are a timestamp-ordering check or a redemption-shape check. That invariant would then disappear silently. The realPostgresEnforcesCanonicalPositiveLongRangeForBundleSourceFence test only proves that the new constraint exists and the old name does not. It does not prove which expression was removed.

      V126.3 already handles this case safely: it locates its guard by definition and fails closed if the match is absent or ambiguous. Use the same pattern here. Find the check by pg_get_constraintdef content that references both bundle_source_fence and issuance_fence. Require exactly one match, then drop that constraint.

      Inspect the result with SELECT conname, pg_get_constraintdef(oid) FROM pg_constraint WHERE conrelid = 'account_start_session_operator_authorizations'::regclass AND contype = 'c' ORDER BY conname; at target V160.

      ♻️ Definition-matched drop

      DO $migration$
      DECLARE
          matched TEXT[];
      BEGIN
          SELECT array_agg(conname) INTO matched
            FROM pg_constraint
           WHERE conrelid = 'account_start_session_operator_authorizations'::regclass
             AND contype = 'c'
             AND pg_get_constraintdef(oid) LIKE '%bundle_source_fence%'
             AND pg_get_constraintdef(oid) LIKE '%issuance_fence%';
          IF coalesce(array_length(matched, 1), 0) <> 1 THEN
              RAISE EXCEPTION 'Expected exactly one bundle source-fence/issuance-fence check';
          END IF;
          EXECUTE format('ALTER TABLE account_start_session_operator_authorizations DROP CONSTRAINT %I', matched[1]);
      END;
      $migration$;
      
      • Accepted Useful exact legacy-constraint identity and preservation proof gap. Existing distinct-fence PG proof confirms canonical effect; strengthen targetV160→160.1 catalogue/prepost proof while preserving published SQL, not blindly rewrite immutable history.
  4. Hosted Review 2 CompletedRuntime 9m 46s
    Found: 3 Accepted: 0/1/1 Routed: 0
    1. Do not report every unexpected failure as retryable UNAVAILABLE.Minor

      The final catch (RuntimeException unavailable) maps all other runtime failures to UNAVAILABLE. These failures include programming errors such as NullPointerException, non-connection jOOQ/Spring DataAccessExceptions, and ClassCastException. A World caller treats UNAVAILABLE as transient. A deterministic defect therefore causes unbounded retries, not a terminal failure.

      The sibling receiver AccountStartSessionWorldParticipationAcquisitionGrpcService (Lines 109-121) already uses the stricter contract:

      • CannotCreateTransactionException maps to UNAVAILABLE.
      • A DataAccessException with SQLSTATE 08* maps to UNAVAILABLE.
      • Every other failure maps to INTERNAL.

      Use the same mapping here. The two World-facing Account receivers then share one gRPC application-error contract. As per path instructions, flag "changes that violate documented FireMUD invariants, especially gRPC application-error handling".

      Proposed fix

      --- "a/services/account-service/src/main/java/net/firedevops/firemud/accountservice/service/session/AccountStartSessionWorldParticipationHistoricalReadGrpcService.java"
      +++ "b/services/account-service/src/main/java/net/firedevops/firemud/accountservice/service/session/AccountStartSessionWorldParticipationHistoricalReadGrpcService.java"
      @@ -71,12 +71,30 @@
                 AccountStartSessionWorldParticipationHistoricalReadGrpcCodec.toResponse(
                     decoded, evidence));
             observer.onCompleted();
           } catch (StatusRuntimeException failure) {
             observer.onError(failure);
           } catch (IllegalArgumentException | IllegalStateException mismatch) {
             observer.onError(Status.FAILED_PRECONDITION.asRuntimeException());
      -    } catch (RuntimeException unavailable) {
      -      observer.onError(Status.UNAVAILABLE.asRuntimeException());
      +    } catch (org.springframework.transaction.CannotCreateTransactionException unavailable) {
      +      observer.onError(Status.UNAVAILABLE.asRuntimeException());
      +    } catch (org.jooq.exception.DataAccessException
      +        | org.springframework.dao.DataAccessException failure) {
      +      observer.onError(
      +          (hasConnectionFailureSqlState(failure) ? Status.UNAVAILABLE : Status.INTERNAL)
      +              .asRuntimeException());
      +    } catch (RuntimeException failure) {
      +      observer.onError(Status.INTERNAL.asRuntimeException());
           }
         }
      +
      +  private static boolean hasConnectionFailureSqlState(Throwable failure) {
      +    for (Throwable cause = failure; cause != null; cause = cause.getCause()) {
      +      if (cause instanceof java.sql.SQLException sql
      +          && sql.getSQLState() != null
      +          && sql.getSQLState().startsWith("08")) {
      +        return true;
      +      }
      +    }
      +    return false;
      +  }
       }
      
      • Accepted Minor: historical receiver maps deterministic runtime/non-connection DB defects to retryable UNAVAILABLE. Align with existing acquisition transport contract: connection08*/transaction-unavailable transient, other failures INTERNAL; retain mismatch denial.
    2. Reuse one static strict JsonMapper.Trivial

      parseObject builds a new JsonMapper on every call. One prepareOrReadExact or lock call runs parseObject at least three times. Two calls come from requireStoredColumnsMatchPayload (once in decode and once in requireSameRequestAndSnapshot), and one comes from requireSameRequestAndSnapshot. Building a mapper is expensive, and it discards the mapper's deserializer caches. Each call does this work while it holds the row lock. AccountStartSessionAuthorityCapture and AccountStartSessionOperatorAuthorityBundle already use a static strict mapper.

      ♻️ Proposed refactor

      --- "a/services/account-service/src/main/java/net/firedevops/firemud/accountservice/service/session/AccountStartSessionAuthorityCaptureRepository.java"
      +++ "b/services/account-service/src/main/java/net/firedevops/firemud/accountservice/service/session/AccountStartSessionAuthorityCaptureRepository.java"
      @@ -511,14 +511,15 @@
               && targetNamespace.equals(peer.namespace());
         }
       
      +  private static final tools.jackson.databind.json.JsonMapper JSON =
      +      tools.jackson.databind.json.JsonMapper.builder()
      +          .enable(tools.jackson.core.StreamReadFeature.STRICT_DUPLICATE_DETECTION)
      +          .enable(tools.jackson.databind.DeserializationFeature.FAIL_ON_TRAILING_TOKENS)
      +          .build();
      +
         private static Map<?, ?> parseObject(byte[] bytes) {
           try {
      -      Object value =
      -          tools.jackson.databind.json.JsonMapper.builder()
      -              .enable(tools.jackson.core.StreamReadFeature.STRICT_DUPLICATE_DETECTION)
      -              .enable(tools.jackson.databind.DeserializationFeature.FAIL_ON_TRAILING_TOKENS)
      -              .build()
      -              .readValue(new String(bytes, StandardCharsets.UTF_8), Object.class);
      +      Object value = JSON.readValue(new String(bytes, StandardCharsets.UTF_8), Object.class);
             if (value instanceof Map<?, ?> map) return map;
             throw unavailable();
           } catch (RuntimeException malformed) {
      
      • Accepted Trivial: verified repeated strict JsonMapper construction during locked capture reads. Reuse one immutable static mapper retaining duplicate/trailing-token rejection; no wire/storage semantic change.
    3. Close the jOOQ ignore block with [jooq ignore stop].Minor

      jOOQ 3.21 recognizes [jooq ignore start] and [jooq ignore stop] by default. The codegen configuration does not define a custom terminator, so [jooq ignore end] leaves the ignore region open. The migration glob can then suppress later migrations during code generation.

      --- [jooq ignore end]
      +-- [jooq ignore stop]
      

      Check whether V160 has been applied in any shared environment before editing it. Editing an applied Flyway migration changes its checksum.

      • Rejected Minor: exactjOOQ3.21.9 DDLDatabase loads/parses each Source separately, not concatenatedglobs; jar/sourceverified. Bothignoredregions endatEOF, no laterDDL suppressed. Publishedmigrations immutable; changingchecksum adds no useful correction.
  5. CLI Review 3 CompletedRuntime 3m 17s
    Found: 3 Accepted: 0/1/0 Routed: 0
    1. Use the standard [jooq ignore stop] terminator in both new migrations.Trivial

      V158, V159, and the jOOQ DDLDatabase default close ignore regions with [jooq ignore stop]. These two files use [jooq ignore end]. If the generator does not recognize end, each ignore region runs to the end of its file. That is harmless now, but later DDL could silently disappear from the generated model if scripts are combined. Confirm the configured parseIgnoreCommentStop token, or align the markers.

      • services/account-service/src/main/resources/db/migration/V160.1__start_session_operator_bundle_source_fence.sql#L12-L12: replace -- [jooq ignore end] with -- [jooq ignore stop].
      • services/account-service/src/main/resources/db/migration/V160__start_session_world_original_attempt_evidence.sql#L73-L73: replace -- [jooq ignore end] with -- [jooq ignore stop].
      • Rejected Trivial: both immutable published migrations end their ignored regions at EOF with no later DDL. Current jOOQ model includes V160 table and physical SQL proof passes; future DDL belongs new migrations. Changing published bytes is unjustified.
    2. Use the required entry format for the new observation.Minor

      The new entry uses a ## heading and one prose paragraph. The file requires a dated bullet with Context, Observation, and Expected pattern sub-bullets. Every earlier entry uses that form. Keep the reconsideration trigger as a sub-bullet if the entry stays as a retained blocker.

      📝 Proposed format

      -## 2026-10-13 — Local PostgreSQL readiness does not prove mapped endpoint availability
      -
      -During the otherwise-required Account correction gate on 2026-10-12 UTC, two participation repository cases refused ...
      +- `2026-10-13`: Local PostgreSQL readiness does not prove mapped endpoint availability
      +  - Context: during the Account correction gate on 2026-10-12 UTC, two participation repository cases refused the mapped `localhost:57828` endpoint before Flyway.
      +  - Observation: the bounded capture tied the port to its PostgreSQL 18 container. Final TCP readiness and Testcontainers startup preceded the failures, and the recorded kill followed suite completion. This rules out a simple pre-readiness attempt, but it does not identify the refusal cause or the cleanup initiator.
      +  - Expected pattern: preserve correlated port, readiness, case, and teardown evidence during required gates. Do not infer a source defect, early cleanup, or OOM from a generic refusal. Do not add speculative wait or configuration changes, and do not start a diagnostics-only rerun. Report passing subsets and missing full proof separately. Matching current-candidate CI remains a qualification path.
      

      As per coding guidelines: "Entry format: - YYYY-MM-DD: short title / - Context / - Observation / - Expected pattern".

      • Accepted Minor: newest Gameplay observation violates dated-bullet Context/Observation/Expected-pattern format. Preserve all facts and prior entries; prepare formatting correction locally while Hosted is active.
    3. Check whether the new source-writer guard blocks exact acquisition retries.Major

      This block adds a check to account_control_ui_hold_required_sources(TEXT[]). The check raises 55P03 whenever any unsettled World participation shares a required source key.

      AccountStartSessionWorldParticipationAcquisitionService.acquire documents that an unknown commit is propagated "for a later retry with this same original request". The retry path calls withCurrentWorldReceivingParticipationCurrentness, which calls actors.withCurrentCommitted. Suppose withCurrentCommitted, or the Control-UI actor hold it runs, calls account_control_ui_hold_required_sources. In that case, every retry after the first committed participation fails at this guard before createOrReadExact can return the existing participation. The participation stays pending until World settles it.

      The same guard would also deny ISSUE, RECOVER, REDEEM, and ReadRedeemedOperationProjection for the same actor and tenant sources while the participation is pending. That includes the Game Session read/pin continuation that ADR 0047 now allows.

      The question to resolve: does AccountControlUiActorService.withCurrentCommitted (or its source-hold path) execute account_control_ui_hold_required_sources? If it does, exempt the exact participation owner's own receiving path, or restrict the guard to real source writers. Then add a physical retry case to AccountStartSessionWorldParticipationPostgresIntegrationTest that calls acquire twice with the same request.

      • Rejected Major hypothesis disproved: withCurrentCommitted uses locked source reads and SELECT FOR UPDATE, not the source-writer trigger/hold function. Physical World-currentness exact retry already returns the same pending participation; no guard exemption is needed.

Routed Findings

1 Open1 Accepted/Fixed0 Rejected
  1. Route 1 · PR #3155 → Unassigned target OpenFinding summary unavailable
  2. Route 2 · PR #3155 → PR #3183 Accepted/FixedFinding summary unavailable
    Earlier routing and proof
    • Earlier disposition: accepted and fixed
    • Earlier proof: Published3183 ccf0528c352d6e57f790d6c3a0e007c23ddfeaa7 exact30 verified consumerpostimages: Core/Security600, Account1291+13PG, GS2136+45PG and4units; static/docs pass. Independent Account tuple retained and launchchecked; no activation.

Unlinked items

no items unlinked