FireMUD Delivery Status

PR data refreshed

PR #3249 review history

Prepare selected recipient authorization and exact owner settlement

Unit 1A · identity, Account and public JOIN

Review rounds

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

Hosted CodeRabbit6 completed
Progress: Review completeRule: Max 2 reached
5/5/01/1/06/6/01/1/00/0/0
CLI CodeRabbit6 completed
Progress: Max 6 reachedRule: Min 0 remaining · Max 6 reached
4/3/02/2/01/1/02/1/01/1/0

Recorded review history

Reviews and findings

  1. Hosted Review 1 CompletedRuntime 14m 35s
    Found: 7 Accepted: 0/3/4 Routed: 0
    1. Use the required entry format for the recurrence note.Minor

      The file defines one entry format. It is a dated title with Context, Observation, and Expected pattern sub-bullets. This entry puts everything on one line and has no Expected pattern. The reusable lesson is missing as a result. That lesson is that a helper with a validation allowance of NONE must not run checks, even read-only checks, and that the report must not claim "no validation".

      Add a link to the earlier equivalent entry, so that the recurrence is traceable.

      📝 Proposed format

      --- "a/design/project-management/ai-observations.md"
      +++ "b/design/project-management/ai-observations.md"
      @@ -231,4 +231,7 @@
         - Expected pattern: Record commit and receiving evidence separately from background maintenance results. Investigate only under qualified shared-repository maintenance or when an actual delivery blocker requires it; `gc.log` or unreachable-object warnings do not authorize cleanup.
         - Status and reconsideration: The commit retained prospective tree `733ed58d9390a5ba00e24088435af7b847567527`, all 84 child-owned postimages and the deletion, and all 12 qualified incoming blobs. Evidence is in Controller current-gameplay update 2151, `private-parent-carry-via-09e-verification.json`, and `receive-qualified-private-cli1-parent.patch` under the private #3248 local current-parent-carry evidence. Revisit if a qualified maintenance pass identifies the cause or the failure blocks delivery.
       
      -- `2026-10-18`: Recurrence (#3249): a parent-carry helper again ran a scoped `git diff --cached --check` under an explicit validation allowance of NONE. The check exited zero and grants no proof credit. Main corrected the contradictory no-validation claim and retained ownership of the named integration gate.
      +- `2026-10-18`: Recurrence (#3249): helper ran a check under validation allowance NONE
      +  - Context: #3249 parent-carry helper; recurrence of <link to the earlier entry>.
      +  - Observation: The helper ran a scoped `git diff --cached --check` despite an explicit allowance of NONE. The check exited zero and grants no proof credit. Main corrected the contradictory no-validation claim and kept ownership of the named integration gate.
      +  - Expected pattern: Under allowance NONE, helpers run no checks, including read-only diff checks. Reports state exactly what ran. The main agent owns every named gate.
      

      As per coding guidelines: "Entry format: - YYYY-MM-DD: short title - Context: where it appeared - Observation: what was surprising or wasteful - Expected pattern: what should happen instead".

      • Accepted Own recurrence note lacks required entry structure; preserve all facts, format context/observation/expected pattern and reference earlier equivalent lesson.
    2. Cache the canonical bytes and digest instead of rebuilding them on every call.Trivial

      Each call to canonicalBytes() builds the complete frame again. The frame contains the full selected content and all source evidence, up to 16 MiB. Each call to digest() rebuilds that frame and hashes it with SHA-256. The binding is immutable, but these values are computed again on every access.

      Callers on the settlement and HELD paths call these methods many times per request. Examples are requireAuthorization, exactSettlement, readFinalAuthorization, requireSettlement, requireExactTerminal, the terminal-read Request.equals and hashCode, and every codec toRequest. Several of these calls run inside owner transactions that hold source-lock and reservation rows FOR UPDATE. The Entity fixture already carries a source frame larger than 4 MiB. One settlement can therefore copy and hash hundreds of MiB while it holds locks.

      A record cannot hold extra cached fields. Convert the record to a final class that computes canonicalBytes and digest once in the constructor. Keep the current accessor names and behaviour. canonicalBytes() must still return a defensive copy.

      ♻️ Sketch

      -public record SelectedOwnerIntakeAuthorizationBinding(
      -    SelectedOwnerIntakeSourceContent content, List<SourceEvidence> sources) {
      +public final class SelectedOwnerIntakeAuthorizationBinding {
      +  private final SelectedOwnerIntakeSourceContent content;
      +  private final List<SourceEvidence> sources;
      +  private final byte[] canonicalBytes;
      +  private final String digest;
       ...
      -  public byte[] canonicalBytes() {
      -    return canonicalBytes(content, sources, intendedReader(), purpose());
      -  }
      -
      -  public String digest() {
      -    return DraftAuthorizationFenceBinding.digest(canonicalBytes());
      -  }
      +  public byte[] canonicalBytes() {
      +    return canonicalBytes.clone();
      +  }
      +
      +  public String digest() {
      +    return digest;
      +  }
      

      Add equals and hashCode that compare canonicalBytes.

      • Accepted Immutable binding repeatedly rebuilds and hashes its bounded frame under owner locks; cache canonical bytes/digest and preserve defensive copies and equality.
    3. Use the base client's lifecycle helpers instead of duplicating them.Trivial

      AbstractReloadingBlockingGrpcClient already provides initOnce(...), requireInitializedStub(...) and requireNoAmbientSql(...). It also tracks closed and explicitlyInitialized under its own monitor. This class adds a second set of volatile initialized and closed flags, overrides close() to keep them in sync, and re-implements requireFileBackedMtls and requireReadableFile.

      Five new clients repeat the same block:

      • AccountSelectedOwnerIntakeWorldClosureAuthorizationGrpcClient
      • WorldSelectedOwnerInventoryGrpcClient
      • GrpcEntitySelectedSourceIntakeTerminalReadClient
      • AutomationSelectedSourceIntakeTerminalReadClient
      • this class

      The copies already differ: WorldSelectedOwnerInventoryGrpcClient.requireReadableFile has no Path.of try/catch, so its error is less specific. Put the file-backed mTLS check in one shared helper, and use the base-class methods for initialization and stub access.

      ♻️ Sketch

      -  private volatile boolean initialized;
      -  private volatile boolean closed;
       ...
      -  public synchronized void init() throws SSLException, IOException {
      -    if (closed) throw new IllegalStateException("...closed");
      -    if (initialized) return;
      -    initReloadingClient();
      -    if (stub() == null) throw new IllegalStateException("...unavailable");
      -    initialized = true;
      -  }
      +  public void init() throws SSLException, IOException {
      +    initOnce(
      +        "Account selected-owner authorization client is closed",
      +        "Account selected-owner authorization stub unavailable");
      +  }
       ...
      -    if (TransactionSynchronizationManager.isActualTransactionActive()
      -        || TransactionSynchronizationManager.isSynchronizationActive()) {
      -      throw new IllegalStateException(...);
      -    }
      +    requireNoAmbientSql("Account selected-owner authorization read must run outside SQL");
       ...
      -        requireStub()
      +        requireInitializedStub(
      +                "Account selected-owner authorization client is not initialized and available")
      

      Delete the close() override and requireStub(). Move requireFileBackedMtls into one shared helper, for example in net.firedevops.firemud.common.grpc.

      Also applies to: 105-156

      • Accepted Use existing shared lifecycle and file-backed mTLS helpers across the five related clients; preserve errors, identity guards, deadlines and wire bounds.
    4. Move the duplicated six-family source-content builder to a shared test fixture.Trivial

      sourceContent and sourceSnapshot copy content and snapshot from SelectedOwnerIntakeAuthorizationReadEvidenceTest (Line 80-127) almost line for line. That includes the family order, the GameplayRuleSelectedSource JSON map, and the TemplateConfigSourceSnapshot genesis ID. source, frame, and id are copied as well.

      The canonical family list or snapshot schema may change later. The two copies then need the same edit, or one test silently builds stale content.

      Put a content(SelectedOwnerIntakeSourceReadScope) helper next to SelectedOwnerIntakeSourceTestFixtures.snapshot, and call it from both tests.

      • Accepted Two owner-evidence tests duplicate the canonical six-family fixture; centralize in existing fixture preserving exact frames and all assertions.
    5. Verify the binding passed to the HELD check.Trivial

      requireHeld(any()) accepts a check for the wrong binding. The response-echo assertions would still pass if the handler checked one binding and returned the original request. Capture the argument for each owner domain and assert its exact authorization binding and recipient identity.

      Based on learnings, identity-sensitive tests must assert the fields that determine the authorization outcome, not only adjacent response fields.

      • Accepted HELD verification must assert exact owner-specific binding, not an unconstrained argument; strengthen identity-sensitive positive test.
    6. Replace the transitional "being reconciled" statement with the current state.Minor

      Line 19 says that "Shared typed transports and Game Design six-family/World recipient reads are being reconciled in the same preparation."

      This conflicts with other current documents:

      • The World API contract in this same PR (world-management-service/api-contracts.md Line 5) describes the recipient-specific inventory read as prepared.
      • The PR describes complete Entity/Automation typed transports and a standalone World inventory reader.

      The tracker is the reader-facing status authority. In-progress wording therefore leaves it unclear whether these surfaces exist. State that they are prepared and unregistered. Keep the qualification limits.

      📝 Proposed wording

      -Shared typed transports and Game Design six-family/World recipient reads are being reconciled in the same preparation.
      +Shared typed Entity/Automation terminal transports and the Game Design six-family and World recipient-specific inventory reads are prepared as unregistered source in the same preparation; their qualification remains pending.
      

      As per path instructions: "Review docs for canonical-current-state consistency. Flag obsolete transitional guidance, conflicts between architecture docs". As per coding guidelines: "Keep its status, implementation record, validation, gaps, decisions, and service-map sections aligned when a domain boundary changes".

      • Accepted Current typed terminal and recipient inventory surfaces are prepared; replace stale reconciliation wording while preserving qualification and registration limits.
    7. Normalize Account failures at the World boundary.Minor

      AccountSelectedOwnerIntakeWorldClosureAuthorizationGrpcClient.readHeld does not catch remote StatusRuntimeException failures. This handler forwards those failures unchanged to the Entity or Automation caller, exposing Account or transport status descriptions at a different service boundary.

      Map only FAILED_PRECONDITION to the World-owned status. Map all other downstream failures to UNAVAILABLE with a fixed description.

      🛡️ Suggested mapping

      --- "a/services/world-management-service/src/main/java/net/firedevops/firemud/worldmanagement/tenant/WorldSelectedOwnerInventoryReadGrpcService.java"
      +++ "b/services/world-management-service/src/main/java/net/firedevops/firemud/worldmanagement/tenant/WorldSelectedOwnerInventoryReadGrpcService.java"
      @@ -67,9 +67,13 @@
           try {
             var evidence = readService.read(decoded);
             response = SelectedOwnerWorldInventoryReadGrpcCodec.toResponse(decoded, evidence.inventory());
           } catch (StatusRuntimeException failure) {
      -      responseObserver.onError(failure);
      +      Status.Code code = failure.getStatus().getCode();
      +      fail(
      +          responseObserver,
      +          code == Status.Code.FAILED_PRECONDITION ? Status.FAILED_PRECONDITION : Status.UNAVAILABLE,
      +          "Account did not confirm the exact selected-owner World closure read");
             return;
           } catch (SecurityException denied) {
             fail(
                 responseObserver,
      
      • Accepted World must sanitize remote Account status descriptions/trailers; map only missing precondition separately and otherwise use fixed dependency-unavailable response.
  2. Hosted Review 2 CompletedRuntime 11m 12s
    Found: 5 Accepted: 5 Routed: 0
    1. CodeRabbit summary-only outside-diff finding 1 of 2 (aggregate; no individual detail)

      summary-only aggregate; provider supplied no individual detail

      • Accepted Read full outside-diff finding1: tracker source-protection gap contradicts prepared V1008-V1010 source/focused proof; align status while retaining qualification/authority/registration holds.
    2. Reuse the decoded worldInventoryReadEvidence field.Trivial

      The constructor already assigns this.worldInventoryReadEvidence = decodeWorldEvidence() at Line 189. requireAuthorizationIdentity then calls decodeWorldEvidence() a second time. The second call re-parses the World request protobuf and re-validates the full canonical inventory bytes. Those bytes can be many MiB. The duplicate work runs on every create and on every fromStored, including Account settlement decoding.

      ♻️ Proposed change

      --- "a/services/common-platform-core/src/main/java/net/firedevops/firemud/common/automation/sourceintake/AutomationEmptySelectedSourceIntakeReceipt.java"
      +++ "b/services/common-platform-core/src/main/java/net/firedevops/firemud/common/automation/sourceintake/AutomationEmptySelectedSourceIntakeReceipt.java"
      @@ -531,9 +531,9 @@
             throw new IllegalArgumentException(
                 "Automation receipt differs from its original Account binding");
           }
           var declaration =
      -        new SelectedOwnerEmptySourceInputs(authorizationBinding, decodeWorldEvidence())
      +        new SelectedOwnerEmptySourceInputs(authorizationBinding, worldInventoryReadEvidence)
                   .ownerSourceInventoryDeclaration();
           if (declaration.owner() != Owner.AUTOMATION_SCRIPTING
               || !declaration.revisionId().equals(sourceRevisionId)
               || !declaration.revisionOrder().equals(sourceRevisionOrder)) {
      
      • Accepted Verified immutable World evidence is already decoded before identity validation; reuse field rather than parse and validate large retained bytes again.
    3. CodeRabbit summary-only outside-diff finding 2 of 2 (aggregate; no individual detail)

      summary-only aggregate; provider supplied no individual detail

      • Accepted Read full outside-diff finding2: V1003 runtime remaining-gap sentence contradicts V1008-V1010 prepared source; correct local storage status and link owning tracker proof limits.
    4. Run the zero-census check before the Math.addExact partition check.Minor

      fromStored accepts any canonical nonnegative long for each count. If a malformed receipt has two partition counts whose sum overflows, Math.addExact throws ArithmeticException. That exception is not an IllegalArgumentException. AutomationSelectedSourceIntakeTerminalReadClient.read catches only IllegalArgumentException to map invalid terminal evidence to IllegalStateException. The overflow therefore escapes as an unclassified runtime failure, not as "invalid terminal evidence".

      All nine partition and selected-scope counts must be zero. If the zero check runs first, the partition check reduces to totals equal to zero, and the overflow path cannot occur.

      🛡️ Proposed reorder

      -    if (Math.addExact(unqualifiedScriptsRowCount, emptyAssociatedScriptsRowCount) != scriptsRowCount
      -        || Math.addExact(unqualifiedEventBindingsRowCount, emptyAssociatedEventBindingsRowCount)
      -            != eventBindingsRowCount
      -        || Math.addExact(
      -                unqualifiedPatchBaseBindingsRowCount, emptyAssociatedPatchBaseBindingsRowCount)
      -            != patchBaseBindingsRowCount) {
      -      throw new IllegalArgumentException("Automation source census partitions do not add up");
      -    }
           if (unqualifiedScriptsRowCount != 0L
               || unqualifiedEventBindingsRowCount != 0L
      @@
             throw new IllegalArgumentException(
                 "Fresh empty Automation intake requires a zero unqualified and selected-scope census");
           }
      +    if (scriptsRowCount != 0L || eventBindingsRowCount != 0L || patchBaseBindingsRowCount != 0L) {
      +      throw new IllegalArgumentException("Automation source census partitions do not add up");
      +    }
      
      • Accepted Verified Math.addExact precedes nine-zero census guard and can escape invalid terminal classification; enforce zero census before partition check with malformed stored-byte regression.
    5. Normalize downstream Automation/Entity status codes instead of forwarding them to Game Design.Minor

      settle rethrows every StatusRuntimeException from automationClient.read and entityClient.read unchanged. AccountSelectedOwnerIntakeSettlementGrpcService at Line 70-72 then copies the code to Game Design. The following failures therefore reach Game Design as Account outcomes:

      • PERMISSION_DENIED or UNAUTHENTICATED when Automation/Entity rejects Account's mTLS identity.
      • INTERNAL, DEADLINE_EXCEEDED, or RESOURCE_EXHAUSTED from the owner.

      Game Design cannot distinguish "Account denied this caller" from "the owner terminal read failed." A caller that treats PERMISSION_DENIED as terminal stops retrying. The finalized authorization then stays unsettled, and the source fence stays held. The World receiver in this PR already applies the bounded mapping: it preserves FAILED_PRECONDITION and maps every other dependency failure to UNAVAILABLE. Apply the same rule here.

      🛡️ Proposed mapping

      -    } catch (StatusRuntimeException failure) {
      -      throw failure;
      -    } catch (RuntimeException unavailable) {
      +    } catch (StatusRuntimeException failure) {
      +      if (failure.getStatus().getCode() == Status.Code.FAILED_PRECONDITION) {
      +        throw Status.FAILED_PRECONDITION
      +            .withDescription("Automation terminal evidence is not committed")
      +            .asRuntimeException();
      +      }
      +      throw Status.UNAVAILABLE
      +          .withDescription("Automation terminal evidence is unavailable")
      +          .asRuntimeException();
      +    } catch (RuntimeException unavailable) {
      

      Apply the same change to the Entity read at Line 168-169.

      The Game Design source read in AccountSelectedOwnerIntakeAuthorizationService.authorizeWithEnvironmentCapture (Line 114) has the same pass-through through the producer's statusOf. Consider the same normalization there.

      As per path instructions: "Flag changes that violate documented FireMUD invariants, especially gRPC application-error handling, ownership boundaries, and failure-mode expectations."

      Also applies to: 168-169

      • Accepted Verified Automation/Entity status passthrough at Account settlement; normalize dependency failures and prove both owners without changing caller denial semantics.
  3. Hosted Review 3 CompletedRuntime 9m 26s
    Found: 1 Accepted: 0/0/1 Routed: 0
    1. Use the cached binding identity instead of re-encoding the binding on every use.Trivial

      SelectedOwnerIntakeAuthorizationBinding now caches its canonical bytes, digest and hash, and it already implements equals and hashCode. Three places in Request still work around that cache:

      • The compact constructor clones the bytes and fully re-decodes them with fromStored, up to 16 MiB. A constructed binding is already canonical.
      • equals clones both bindings' bytes through authorizationBindingBytes().
      • hashCode clones the bytes and hashes them again.

      These calls run on every codec round trip and every Result construction. Delegate to the binding instead.

      ♻️ Proposed refactor

      -      byte[] bytes = authorizationBinding.canonicalBytes();
      -      if (bytes.length == 0
      -          || bytes.length > SelectedOwnerIntakeAuthorizationBinding.MAX_BYTES
      -          || !DraftAuthorizationFenceBinding.digest(bytes).equals(authorizationBinding.digest())) {
      -        throw invalid("Canonical original authorization is required");
      -      }
      -      var decoded = SelectedOwnerIntakeAuthorizationBinding.fromStored(bytes);
      -      if (!Arrays.equals(bytes, decoded.canonicalBytes())
      -          || !authorizationBinding.digest().equals(decoded.digest())) {
      -        throw invalid("Canonical original authorization is required");
      -      }
       ...
      -          && Arrays.equals(authorizationBindingBytes(), other.authorizationBindingBytes());
      +          && authorizationBinding.equals(other.authorizationBinding);
       ...
      -      return Objects.hash(
      -          schemaVersion,
      -          targetNamespace,
      -          transportRequestId,
      -          Arrays.hashCode(authorizationBindingBytes()));
      +      return Objects.hash(schemaVersion, targetNamespace, transportRequestId, authorizationBinding);
      

      Also applies to: 79-95

      • Accepted Valid repeated 16MiB copy/decode after H1 immutable canonical binding cache. Final validated binding owns bounded construction and canonical equals/hash. Remove redundant Request reparse and delegate identity; retain scope/correlation/transport validation.
  4. CLI Review 1 CompletedRuntime 3m 23s
    Found: 3 Accepted: 0/0/3 Routed: 0
    1. Extract the shared settlement write path from settleCommittedEmpty and settleEntityCommittedEmpty.Trivial

      Both methods repeat the same lock order, reservation and authorization checks, abort check, prior-settlement recovery, 14-column INSERT and readback. Only the owner check and the receipt factory differ. The PR's correction note records a real writer-exclusion omission. That kind of omission is more likely when owner-specific copies of one invariant drift apart. Use one private helper that takes the expected owner, the AccountSelectedOwnerIntakeSettlementReceipt, the read correlation and the retry evidence.

      ♻️ Proposed helper

      private AccountSelectedOwnerIntakeSettlementReceipt settleExact(
          SelectedOwnerIntakeAuthorizationBinding requested,
          UUID terminalReadRequestId,
          java.util.function.Supplier<AccountSelectedOwnerIntakeSettlementReceipt> create,
          Object retryEvidence) {
        SelectedOwnerIntakeSourceReadScope scope = requested.content().scope();
        lockReservedSources(scope);
        requireReservation(reservation(scope), scope);
        requireAuthorization(authorization(requested.operationId()), requested);
        if (aborted(scope))
          throw new IllegalArgumentException("Finalized owner authorization was aborted");
        Record prior = settlement(requested.operationId());
        if (prior != null) return exactSettlement(prior, requested, retryEvidence);
        var receipt = create.get();
        dsl.execute(/* existing INSERT */ ...);
        return exactSettlement(settlement(requested.operationId()), requested, retryEvidence);
      }
      
      • Accepted Accepted: both owner settlement paths duplicate one locking/authorization/retry/INSERT/readback invariant. Extract one private helper with lazy receipt factory; retain owner validation and exact lock/order/SQL semantics.
    2. Move the duplicated World inventory fixture builder into one shared test helper.Trivial

      fixture, sourceContent, sourceSnapshot, and source in this file are copies of Lines 259-424 in WorldSelectedOwnerInventoryReadServiceTest. Both builders construct the same SelectedOwnerIntakeAuthorizationBinding and the same WorldSelectedDraftPublicationFreezeEvidence chain. These records have strict canonical constructors. If one constructor contract changes, both copies must be updated together, or they will drift apart. Put the builder in a package-private WorldSelectedOwnerInventoryTestFixtures class in the same test package. Then call it from both tests.

      • Accepted Accepted: two World tests duplicate the same strict owner binding/freeze fixture. Extract one package-private test helper, preserving values, cases and assertions; no production or authority change.
    3. Remove the repeated proof-status claims from the architecture status paragraph.Trivial

      Line 11 states proof status twice. First it says that the preceding source-disclosure proof passed and full-native qualification is held. Then it says that focused V1008–V1010 proof passed and full-native qualification is limited. The same paragraph also says that the recipient-intake tracker owns current proof. The path instruction says: "Architecture owns technical target state". AGENTS.md assigns capability and proof status to the domain implementation trackers. Two copies of these claims can drift away from tracker records R28/R31/R35. Keep the Account-local storage consequence here, and point to the tracker for proof status.

      ♻️ Proposed simplification

      -... while preserving prior protection/disposal guards. The preceding source-disclosure upgrade and composition pass focused PostgreSQL proof; full-native qualification remains held on inherited PostgreSQL/Redis failures. Focused PostgreSQL upgrade and owner-storage proof for authorization and terminal settlement passes; authenticated cross-owner composition and full-native qualification remain limited as recorded in the tracker. These components remain unregistered and unqualified; the [recipient-intake tracker](...) owns current proof and remaining dependencies.
      +... while preserving prior protection/disposal guards. These components remain unregistered and unqualified; the [recipient-intake tracker](...) owns current proof, qualification limits and remaining dependencies.
      
      • Accepted Accepted: architecture status repeats tracker-owned proof results. Retain local storage/migration and registration consequences; link the existing tracker for current proof, qualification limits and dependencies.
  5. CLI Review 2 CompletedRuntime 2m 51s
    Found: 4 Accepted: 0/2/1 Routed: 0
    1. Map failures to statuses by source, not by exception type alone.Trivial

      The StatusRuntimeException branch always reports "Account did not confirm…". However, inventoryReadService.readRetained can also throw this exception type. The IllegalArgumentException branch always reports "Exact retained World artifact inventory is unavailable". However, the Account client codec can throw IllegalArgumentException for a malformed Account response, and that is not a World inventory problem. Operators then get the wrong failure attribution. Wrap the Account call and the inventory call in separate try blocks. Then each status description names the boundary that actually failed.

      • Accepted Account codec and retained World failures share exception classes; classify each boundary locally so sanitized descriptions name the actual failing dependency while preserving status codes.
    2. Correct the migration provenance and owner-neutral diagnostics before V1010 is applied.Minor
      • Lines 1-2 say "V1008 Automation rows". The Automation settlement table, its constraints and its rows come from V1009.
      • Lines 24 and 31 also name "V1008" constraints. The dropped constraints are the V1009 settlement constraints.
      • After this migration, the guard also serves Entity settlements. Lines 133, 142, 304 and 371 still report "Automation" for Entity failures. One example is Settlement must bind one exact active Automation authorization. Operators who triage an Entity rejection get a wrong diagnostic.

      Flyway records the checksum after the migration is applied. After that point, this text cannot be corrected. Correct it now, while V1010 is unapplied. Line 133 changes an asserted message, so update the post-upgrade test diagnostics in the same commit. The V1009-frontier assertion in the integration test still uses the V1009 text and does not change.

      📝 Proposed text corrections

      --- V1008 Automation rows and receipt bytes are retained exactly; no pending predicate changes.
      +-- V1009 Automation rows and receipt bytes are retained exactly; no pending predicate changes.
      -            RAISE EXCEPTION 'Unexpected retained V1008 settlement constraint: %', check_row.conname;
      +            RAISE EXCEPTION 'Unexpected retained V1009 settlement constraint: %', check_row.conname;
      -        RAISE EXCEPTION 'Expected all three retained V1008 settlement constraints';
      +        RAISE EXCEPTION 'Expected all three retained V1009 settlement constraints';
      -        RAISE EXCEPTION 'Settlement must bind one exact active Automation authorization'
      +        RAISE EXCEPTION 'Settlement must bind one exact active selected-owner authorization'
      -        RAISE EXCEPTION 'Settlement original binding is not Automation authorization'
      +        RAISE EXCEPTION 'Settlement original binding schema differs from its owner'
      -        RAISE EXCEPTION 'Settlement or Automation receipt digest differs' USING ERRCODE = '23514';
      +        RAISE EXCEPTION 'Settlement or owner terminal receipt digest differs' USING ERRCODE = '23514';
      -        RAISE EXCEPTION 'Settlement receipt differs from exact Automation terminal bytes'
      +        RAISE EXCEPTION 'Settlement receipt differs from exact owner terminal bytes'
      

      Also applies to: 24-24, 31-31, 133-133, 142-142, 304-304, 371-371

      • Accepted V1010 receives V1009 settlement rows and serves Entity too. Correct only provenance/shared diagnostics and post-upgrade assertion; keep V1009-frontier text, all predicates and SQLSTATE.
    3. Reject owners other than Entity and Automation explicitly.Minor

      peerMatchesOwner maps every owner that is not ENTITY_MANAGEMENT to automation-scripting-service. Suppose a decoded binding carries another Owner value, such as WORLD_MANAGEMENT or GAME_DESIGN_CONTROL_PLANE. An authenticated Automation peer then passes the owner check for a binding it does not own. WorldSelectedOwnerInventoryReadService.requireAuthenticatedRecipient (Line 63-66) uses the same fallback. Check whether SelectedOwnerIntakeAuthorizationBinding or SelectedOwnerWorldInventoryReadGrpcCodec.fromRequest limits owner() to the two intake owners. If neither one does, this receiver relies only on the later Account check. Use an exhaustive switch that denies other owners. Apply the same change in both places.

      🔒️ Proposed fix

         private boolean peerMatchesOwner(Owner owner) {
           GrpcPeerIdentity peer = GrpcPeerIdentity.current();
      -    String expectedService =
      -        owner == Owner.ENTITY_MANAGEMENT
      -            ? "entity-management-service"
      -            : "automation-scripting-service";
      +    final String expectedService;
      +    switch (owner) {
      +      case ENTITY_MANAGEMENT -> expectedService = "entity-management-service";
      +      case AUTOMATION_SCRIPTING -> expectedService = "automation-scripting-service";
      +      default -> {
      +        return false;
      +      }
      +    }
           return peer != null && isExpectedPeer(peer, expectedService);
         }
      
      • Accepted Typed binding already excludes other owners; explicit fail-closed Entity/Automation switches at both receiver matchers improve local clarity without widening the contract.
    4. Bind the caller-supplied freeze evidence to the Account-confirmed authorization.Major

      The Account request carries only request.authorizationBinding(). Account therefore confirms the binding and does not confirm request.freezeEvidence(). The service then calls readRetained(request.freezeEvidence()). That freeze evidence comes from the caller over the wire. This method does not check that the freeze evidence has the same tenant, version, or selected commit as authorizationBinding().scope().selected(). Suppose SelectedOwnerWorldInventoryReadEvidence.Request.create and fromRequest do not enforce that link. An authenticated Entity or Automation workload can then pair one valid held authorization with the freeze evidence of a different publication or tenant. World then returns that retained inventory. readRetained probably proves that the freeze is real. It does not prove that the freeze belongs to this authorization.

      Confirm that the Request constructor or codec compares freezeEvidence.request().canonicalTenantId(), the version, and the selected commit or digest against the binding's selected commit. If it does not, add that comparison here before the Account call, and add a mismatch test.

      • Rejected Already guarded: Request constructor compares namespace, canonical tenant/version and exact selected canonical bytes to freeze; fromRequest constructs it before Account read. No bypass exists.
  6. CLI Review 3 CompletedRuntime 3m 04s
    Found: 2 Accepted: 0/1/1 Routed: 0
    1. Fix the conflicting proof attribution for the V1007-only source proof.Minor

      Line 15 attributes the earlier V1007-only source proof to R33. Line 17 records the V1007 upgrade, source-exclusion and disclosure-composition cases as fresh R28 results. Line 19 also states that the V1007 source upgrade and disclosure composition "pass focused R28 PostgreSQL proof". These two run identifiers conflict in the same tracker section. Readers cannot tell which run qualifies the V1007 proof.

      The tracker is the canonical proof inventory. Correct the identifier so all three paragraphs name the same run.

      📝 Proposed fix

      -The earlier V1007-only source proof retains separate R33 attribution.
      +The earlier V1007-only source proof retains separate R28 attribution.
      

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

      • Accepted Tracker lines17/19 independently attribute V1007 upgrade/source disclosure proof to R28; isolated R33 label conflicts. Correct only that label, preserving separate successor R35 and R31 scopes.
    2. Remove the catch branches that duplicate the domain-service mapping and cannot be reached.Trivial

      WorldSelectedOwnerInventoryReadService.read wraps every failure from readHeld and readRetained in ReadFailure. Outside those try blocks, it can throw only three exception types:

      • IllegalStateException (ambient SQL)
      • SecurityException (from requireAuthenticatedRecipient)
      • IllegalArgumentException (from Request.create)

      As a result, the StatusRuntimeException, ConflictException, and DataAccessException branches on Lines 73-104 never run for readService.read. They copy the status-and-description table that already exists in the domain service. If one copy changes without the other, the two status mappings will drift apart.

      The IllegalArgumentException branch also gives the wrong attribution. If SelectedOwnerIntakeWorldClosureAuthorizationReadEvidence.Request.create rejects the binding before the Account call, the caller gets "Exact retained World artifact inventory is unavailable". That message blames World storage for a problem with the Account request.

      Keep these mappings in the gRPC layer:

      • ReadFailure
      • SecurityException
      • an IllegalArgumentException from toResponse
      • a final RuntimeException

      Also consider sharing ownerService and the peer check with WorldSelectedOwnerInventoryReadService, which has a duplicate of each.

      ♻️ Proposed simplification

           } catch (WorldSelectedOwnerInventoryReadService.ReadFailure failure) {
             fail(responseObserver, Status.fromCode(failure.statusCode()), failure.description());
             return;
      -    } catch (StatusRuntimeException failure) {
      -      Status status =
      -          failure.getStatus().getCode() == Status.Code.FAILED_PRECONDITION
      -              ? Status.FAILED_PRECONDITION
      -              : Status.UNAVAILABLE;
      -      fail(
      -          responseObserver,
      -          status,
      -          status.getCode() == Status.Code.FAILED_PRECONDITION
      -              ? "Exact retained World artifact inventory is unavailable"
      -              : "World selected inventory owner storage is unavailable");
      -      return;
           } catch (SecurityException denied) {
             fail(
                 responseObserver,
                 Status.PERMISSION_DENIED,
                 "Exact same-namespace selected-owner workload is required");
             return;
      -    } catch (WorldDesignPublicationFenceRepository.ConflictException
      -        | IllegalArgumentException inconsistent) {
      +    } catch (IllegalArgumentException inconsistent) {
             fail(
                 responseObserver,
                 Status.FAILED_PRECONDITION,
                 "Exact retained World artifact inventory is unavailable");
             return;
      -    } catch (org.springframework.dao.DataAccessException
      -        | org.jooq.exception.DataAccessException unavailable) {
      -      fail(
      -          responseObserver,
      -          Status.UNAVAILABLE,
      -          "World selected inventory owner storage is unavailable");
      -      return;
           } catch (RuntimeException failure) {
      
      • Accepted Read service already wraps downstream failures as ReadFailure. Remove only unreachable transport catches/import; keep response-code mapping and peer checks unchanged. No shared-validator expansion.
  7. CLI Review 4 CompletedRuntime 3m 57s
    Found: 1 Accepted: 0/1/0 Routed: 0
    1. Add the canonical round-trip check to fromRequest.Minor

      fromRequest decodes the request but never checks that toRequest(decoded) equals the incoming wire message. The other selected-owner codecs in this change do run that check: SelectedOwnerIntakeAuthorizationReadGrpcCodec, SelectedOwnerIntakeWorldClosureAuthorizationReadGrpcCodec, SelectedOwnerIntakeSettlementGrpcCodec and both terminal-read codecs. requireNoUnknownFields inspects only the top-level message. As a result, a nested unknown field or a noncanonical value inside freeze_request or freeze_acknowledgement can pass this decoder unless WorldSelectedDraftPublicationFreezeGrpcCodec rejects it.

      The World receiver decodes the request with this method. Entity and Automation receipts keep worldReadRequestBytes as stored proto bytes. Parsing keeps unknown fields, so the retained-receipt canonical check in decodeWorldEvidence/decodeInputs does not remove them.

      Verify that WorldSelectedDraftPublicationFreezeGrpcCodec.fromRequest and fromResponse reject nested unknown fields. Whatever that check shows, the round-trip check makes this boundary closed, as in the sibling codecs.

      🛡️ Proposed fix

           var freezeEvidence =
               WorldSelectedDraftPublicationFreezeGrpcCodec.fromResponse(
                   freezeRequest, request.getFreezeAcknowledgement());
      -    return new Request(
      +    var decoded =
      +        new Request(
                   request.getSchemaVersion(),
                   request.getTargetNamespace(),
                   readRequestId,
                   binding,
                   freezeEvidence);
      +    if (!toRequest(decoded).equals(request)) {
      +      throw invalid("Selected-owner World inventory read request is noncanonical");
      +    }
      +    return decoded;
         }
      
      • Accepted Minor accepted: explicit full wire/domain round-trip closes this recipient boundary consistently with siblings. Nested freeze codecs already reject direct unknown fields; retain those guards and add focused valid/tampered nested proof without broader schema or registration changes.
  8. CLI Review 5 CompletedRuntime 2m 45s
    Found: 2 Accepted: 0/1/0 Routed: 0
    1. Confirm that the caller-supplied freezeEvidence is bound to the Account-confirmed authorization binding.Major

      The Account confirmation request contains only trustedNamespace and request.authorizationBinding(). It does not include request.freezeEvidence(). After Account confirms the binding, inventoryReadService.readRetained(request.freezeEvidence()) reads World storage with the freeze evidence that the Entity or Automation caller supplied.

      SelectedOwnerWorldInventoryReadEvidence.Request might not reject a pairing of a valid held binding with freeze evidence for a different tenant, version, publication request, or selected commit. In that case, an authenticated owner workload can read a retained World inventory that its Account authorization does not cover.

      Verify that SelectedOwnerWorldInventoryReadEvidence.Request.create, its constructor, and SelectedOwnerWorldInventoryReadGrpcCodec.fromRequest require all of these to match:

      • the freeze evidence tenant and canonical version
      • the selected commit ID, request ID, and digest in account.input().selection()
      • the corresponding fields in authorizationBinding()

      If the request type does not enforce this, add the check before accountReadClient.readHeld. Another fix is to include the freeze evidence digest in the Account closure read so that Account confirms the pairing. Add a test that pairs a valid binding with mismatched freeze evidence. The test must verify that readRetained is never called.

      Also applies to: 79-81

      • Rejected Request constructor already exact-compares namespace, tenant/version and complete selected canonical bytes before reads; freeze constructor binds its publication request/digest to its Account selection. Intake and publication request IDs are distinct correlations, not an omitted equality.
    2. Classify invalid owner terminal evidence as FAILEDPRECONDITION, not UNAVAILABLE.Minor

      Classify invalid owner terminal evidence as `FAILED_PRECONDITION`, not `UNAVAILABLE`.

      AutomationSelectedSourceIntakeTerminalReadClient.read and GrpcEntitySelectedSourceIntakeTerminalReadClient.read wrap codec IllegalArgumentException in IllegalStateException. The codec raises that exception for a changed echo, a wrong result, or a digest mismatch. The generic catch (RuntimeException unavailable) therefore reports definitive integrity failures as retryable UNAVAILABLE. A local validation failure of the same evidence in requireExactTerminal or settleEntity returns FAILED_PRECONDITION. Game Design gets different statuses for the same defect, depending on where the defect is detected, and keeps retrying a terminal that cannot succeed. The participation stays pending, so there is no data loss. The status contract is still incorrect.

      Map IllegalStateException from the client to FAILED_PRECONDITION. Alternatively, make the clients throw a dedicated exception type for invalid evidence and keep UNAVAILABLE for transport failures.

      Proposed fix

      -    } catch (RuntimeException unavailable) {
      +    } catch (IllegalStateException invalidEvidence) {
      +      throw Status.FAILED_PRECONDITION
      +          .withDescription("Automation terminal evidence is invalid")
      +          .asRuntimeException();
      +    } catch (RuntimeException unavailable) {
      

      Apply the same change in settleEntity, using an Entity description.

      Also applies to: 196-201

      • Accepted Both gRPC clients wrap definitive codec rejection as IllegalStateException, which settlement maps to UNAVAILABLE. Emit FAILED_PRECONDITION only for response-codec rejection; preserve uninitialized-client and transport failures. Add actual client regression proof.
  9. CLI Review 6 CompletedRuntime 4m 28s
    Found: 1 Accepted: 0/0/1 Routed: 0
    1. Extract the shared owner-terminal read and commit/readback steps.Trivial

      settleEntity duplicates the Automation flow in settle (lines 115–170):

      • The remote-read status mapping is the same. FAILED_PRECONDITION is kept. NOT_FOUND, ALREADY_EXISTS, and DATA_LOSS pass through. Other codes become UNAVAILABLE.
      • The requireNoAmbientTransaction sequencing is the same.
      • The independent commit transaction is the same.
      • The lookup-only readback and sameSettlement comparison are the same.

      These two copies contain security-sensitive settlement rules. A future fix to one copy, such as a new passthrough code or a change to the readback contract, can easily miss the other copy. Extract two helpers:

      ♻️ Proposed helper extraction

      private <R> R readOwnerTerminal(String ownerLabel, java.util.function.Supplier<R> read) {
        requireNoAmbientTransaction();
        try {
          return read.get();
        } catch (StatusRuntimeException failure) {
          Status.Code code = failure.getStatus().getCode();
          if (code == Status.Code.FAILED_PRECONDITION) {
            throw Status.FAILED_PRECONDITION
                .withDescription(ownerLabel + " terminal evidence is not committed")
                .asRuntimeException();
          }
          if (code == Status.Code.NOT_FOUND
              || code == Status.Code.ALREADY_EXISTS
              || code == Status.Code.DATA_LOSS) {
            throw Status.fromCode(code).asRuntimeException();
          }
          throw Status.UNAVAILABLE
              .withDescription(ownerLabel + " terminal evidence is unavailable")
              .asRuntimeException();
        } catch (RuntimeException unavailable) {
          throw Status.UNAVAILABLE
              .withDescription(ownerLabel + " terminal evidence is unavailable")
              .withCause(unavailable)
              .asRuntimeException();
        }
      }
      
      private AccountSelectedOwnerIntakeSettlementReceipt commitAndReadBack(
          SelectedOwnerIntakeAuthorizationBinding original,
          Object exactOwnerTerminal,
          java.util.function.Supplier<AccountSelectedOwnerIntakeSettlementReceipt> commit) {
        requireNoAmbientTransaction();
        var committed = ownerTransaction.execute(ignored -> commit.get());
        requireSettlement(committed, original, exactOwnerTerminal);
        requireNoAmbientTransaction();
        var readback =
            ownerTransaction.execute(
                ignored ->
                    Objects.requireNonNull(repository.findSettlement(original))
                        .orElseThrow(
                            () ->
                                Status.FAILED_PRECONDITION
                                    .withDescription("Committed Account settlement is not readable")
                                    .asRuntimeException()));
        requireSettlement(readback, original, exactOwnerTerminal);
        if (!sameSettlement(committed, readback)) {
          throw Status.FAILED_PRECONDITION
              .withDescription("Committed Account settlement readback differs")
              .asRuntimeException();
        }
        return readback;
      }
      

      After the extraction, each owner path keeps only its own exact-terminal validation. downstreamStatusFailuresPreserveTerminalStatusesAndSanitizeOthersForBothOwners asserts owner-specific descriptions. Keep the ownerLabel text exact so that this test continues to pass.

      • Accepted Useful deduplication of identical status mapping and independent commit/lookup-only readback. Extract two private helpers only; keep owner-specific validation/messages, exact immutable receipt comparison, no ambient SQL and unknown-first-commit behavior unchanged.
  10. Hosted Review 4 CompletedRuntime 17m 52s
    Found: 6 Accepted: 6 Routed: 0
    1. 📐 Maintainability & Code Quality | 🔵 Trivial | ⚖️ Poor tradeoff

      Consider sharing the six-family content builder through a test-fixtures source set.

      sourceContent and sourceSnapshot repeat the framing and snapshot logic of SelectedOwnerIntakeSourceTestFixtures.content(scope) in common-platform-core. The same builder also appears in AccountSelectedOwnerIntakeAuthorizationReadServiceTest (lines 164-225) and AccountSelectedOwnerIntakeAuthorizationServiceTest (lines 657-712). The common helper is in src/test, so World and Account tests cannot import it. A change to the SelectedOwnerIntakeSourceContent family list or framing then requires four synchronized edits. Consider moving the helper to the existing common-test-support or common-platform-core testFixtures source set. Then call it from World and Account. Service-specific marker digests can stay as parameters.

      • Accepted Repeated six-family test framing can drift. Move existing canonical fixture to shared testFixtures and reuse it with parameters preserving every service-specific byte marker.
    2. Delegate Request equality and hashing to the cached binding identity.Trivial

      SelectedOwnerIntakeAuthorizationBinding caches its canonical bytes and hash. Its equals compares the internal array without copying it. Each call to binding.canonicalBytes() returns a defensive copy of up to 16 MiB. As a result, equals copies two full bindings and hashCode copies one. AccountSelectedOwnerIntakeSettlementService.requireExactTerminal calls request.equals(echoed) on every settlement. Reviewers raised the same pattern in SelectedOwnerIntakeSettlementEvidence.Request, and you fixed it there. EntitySelectedSourceIntakeTerminalReadEvidence.Request (Lines 69-82) has the same code and needs the same change.

      ♻️ Proposed refactor (apply to both terminal-read Request records)

           @Override
           public boolean equals(Object value) {
             return value instanceof Request other
                 && schemaVersion == other.schemaVersion
                 && targetNamespace.equals(other.targetNamespace)
                 && readRequestId.equals(other.readRequestId)
      -          && Arrays.equals(binding.canonicalBytes(), other.binding.canonicalBytes());
      +          && binding.equals(other.binding);
           }
      
           @Override
           public int hashCode() {
      -      return Objects.hash(
      -          schemaVersion, targetNamespace, readRequestId, Arrays.hashCode(binding.canonicalBytes()));
      +      return Objects.hash(schemaVersion, targetNamespace, readRequestId, binding);
           }
      
      • Accepted Both Request equality/hash paths copy large canonical bindings. Delegate to the existing cached exact binding identity without changing semantics.
    3. Capture the HELD request and assert its exact binding.Trivial

      verify(owner, times(2)).requireHeld(any()) also passes when the handler sends the wrong binding or reader to the owner. The response-echo assertions on lines 96-99 still pass in that case, because the handler echoes the wire request. The World-closure counterpart (AccountSelectedOwnerIntakeWorldClosureAuthorizationReadGrpcServiceTest, lines 125-141) already captures each request. That test asserts the schema, namespace, read ID, reader, purpose, canonical binding bytes and owner. Use the same check here for both Entity and Automation.

      ♻️ Proposed assertion

      --- "a/services/account-service/src/test/java/unit/net/firedevops/firemud/accountservice/service/session/AccountSelectedOwnerIntakeAuthorizationReadGrpcServiceTest.java"
      +++ "b/services/account-service/src/test/java/unit/net/firedevops/firemud/accountservice/service/session/AccountSelectedOwnerIntakeAuthorizationReadGrpcServiceTest.java"
      @@ -98,7 +98,18 @@
             assertThat(result.response.getRequest()).isEqualTo(wire);
             assertThat(result.response.getHeld()).isTrue();
           }
      -    verify(owner, times(2)).requireHeld(any());
      +    var captured =
      +        org.mockito.ArgumentCaptor.forClass(SelectedOwnerIntakeAuthorizationReadEvidence.Request.class);
      +    verify(owner, times(2)).requireHeld(captured.capture());
      +    var owners = List.of(Owner.ENTITY_MANAGEMENT, Owner.AUTOMATION_SCRIPTING);
      +    for (int index = 0; index < owners.size(); index++) {
      +      var actual = captured.getAllValues().get(index);
      +      var expected = AccountSelectedOwnerIntakeAuthorizationReadServiceTest.binding(owners.get(index));
      +      assertThat(actual.targetNamespace()).isEqualTo("test");
      +      assertThat(actual.intendedReader()).isEqualTo(expected.intendedReader());
      +      assertThat(actual.retentionPurpose()).isEqualTo(expected.purpose());
      +      assertThat(actual.binding().canonicalBytes()).containsExactly(expected.canonicalBytes());
      +    }
         }
       
         @Test
      

      Based on learnings: "check that the test asserts the actual field(s) that determine the resulting identity/authorization outcome (not just adjacent metadata or presence/hash checks)".

      • Accepted Verified requireHeld(any()) does not prove decoded owner identity. Capture both requests and assert exact correlation, reader, purpose and binding bytes.
    4. Add lifecycle coverage for GrpcEntitySelectedSourceIntakeTerminalReadClient.Trivial

      SelectedOwnerIntakeClientLifecycleTest covers the Automation terminal client but not the Entity terminal client. The Entity test covers mTLS and transport cleanup, not the monitor-release and watcher-drain path. Add an ENTITY_TERMINAL case.

      ♻️ Suggested case

           AUTOMATION_TERMINAL,
      +    ENTITY_TERMINAL,
           GAME_DESIGN_SOURCE,
      @@
      +        case ENTITY_TERMINAL -> {
      +          var client =
      +              new net.firedevops.firemud.common.entity.sourceintake
      +                  .GrpcEntitySelectedSourceIntakeTerminalReadClient(endpoints, tls, factory, "test");
      +          yield new ClientHandle(client, client::init);
      +        }
      
      • Accepted Entity terminal client is absent from shared monitor-release/watcher-drain lifecycle coverage. Add its enum case to the existing proof.
    5. Merge the duplicated recovery branches.Trivial

      Both branches of the retained.isPresent() check run the same recover(scope) → ABORTED / FINALIZED handling. The only difference is how they obtain scope. PMD also reports that the null initializer at Line 78 is never used. If the recovery handling exists in one place, a future change to the recovery contract cannot update one branch and miss the other.

      ♻️ Proposed refactor

      -    Optional<SelectedOwnerIntakeSourceReadScope> retained =
      -        findScope(originalCreatorCredential, intakeRequestId, owner, selected);
      -    SelectedOwnerIntakeSourceReadScope scope = null;
      -    if (retained.isPresent()) {
      -      scope = retained.orElseThrow();
      -      var recovery = recover(scope);
      -      ...
      -    } else {
      -      var initialEnvironment = requireEnvironment(environmentCapture.get());
      -      scope =
      -          reserveSourceRead(
      -              originalCreatorCredential, intakeRequestId, owner, selected, initialEnvironment);
      -      var recovery = recover(scope);
      -      ...
      -    }
      +    Optional<SelectedOwnerIntakeSourceReadScope> retained =
      +        findScope(originalCreatorCredential, intakeRequestId, owner, selected);
      +    final SelectedOwnerIntakeSourceReadScope scope =
      +        retained.isPresent()
      +            ? retained.orElseThrow()
      +            : reserveSourceRead(
      +                originalCreatorCredential,
      +                intakeRequestId,
      +                owner,
      +                selected,
      +                requireEnvironment(environmentCapture.get()));
      +    var recovery = recover(scope);
      +    if (recovery.state() == AccountSelectedOwnerIntakeSourceReservationRepository.State.ABORTED)
      +      throw denied("Original selected-owner intake reservation was aborted");
      +    if (recovery.state()
      +        == AccountSelectedOwnerIntakeSourceReservationRepository.State.FINALIZED) {
      +      return readFinalAuthorization(
      +          findFinalAuthorization(scope)
      +              .orElseThrow(
      +                  () -> denied("Finalized selected-owner intake authorization is unavailable")));
      +    }
      

      After this change, reservationScope at Line 111 is redundant. Use scope directly.

      • Accepted Verified duplicated recovery branches. Consolidate after lazy retained/new scope selection, preserving capture timing, errors and owner transaction behavior.
    6. Add the owner-transaction guard case for settleEntityCommittedEmpty.Trivial

      The new assertions cover settleCommittedEmpty, the Automation settlement writer. They do not cover settleEntityCommittedEmpty, the Entity settlement writer. AccountSelectedOwnerIntakeSettlementServiceTest calls this writer on lines 404 and 433. Without the case, nothing checks that the Entity terminal write rejects a call outside a writable Account owner transaction. That write releases the selected-owner fence.

      ♻️ Proposed addition

      --- "a/services/account-service/src/test/java/unit/net/firedevops/firemud/accountservice/service/session/AccountSelectedOwnerIntakeSourceReservationRepositoryTest.java"
      +++ "b/services/account-service/src/test/java/unit/net/firedevops/firemud/accountservice/service/session/AccountSelectedOwnerIntakeSourceReservationRepositoryTest.java"
      @@ -42,9 +42,12 @@
           assertThatThrownBy(() -> repository.findSettlement(null))
               .isInstanceOf(IllegalStateException.class)
               .hasMessageContaining("Writable Account owner transaction");
           assertThatThrownBy(() -> repository.settleCommittedEmpty(null))
               .isInstanceOf(IllegalStateException.class)
               .hasMessageContaining("Writable Account owner transaction");
      +    assertThatThrownBy(() -> repository.settleEntityCommittedEmpty(null))
      +        .isInstanceOf(IllegalStateException.class)
      +        .hasMessageContaining("Writable Account owner transaction");
       
           verifyNoInteractions(dsl);
         }
      
      • Accepted Verified missing Entity settlement owner-transaction guard proof. Add its assertion beside the existing Automation guard.
  11. Hosted Review 5 CompletedRuntime 11m 16s
    Found: 1 Accepted: 0/1/0 Routed: 0
    1. Add the V1008–V1010 production and proof anchors to the AA-1.3 row.Minor

      Line 11 states that the production and focused proof anchors for this preparation are in the AA-1.3 Capability Status row. Line 19 now describes V1008–V1010 final authorization, recovery and terminal settlement as prepared, with R31 owner-storage and upgrade proof. The AA-1.3 row (line 225) still stops at the V1007 migration and AccountSelectedOwnerIntakeSourceReservationService. It also does not list the settlement or authorization proof suites.

      The row is missing these entries:

      • Implementation anchors: V1008, V1009 and V1010, AccountSelectedOwnerIntakeSettlementService, AccountSelectedOwnerIntakeAuthorizationService, AccountSelectedOwnerIntakeWorldClosureAuthorizationReadService, and AccountSelectedOwnerIntakeSettlementReceipt.
      • Proof anchors: the R31 Account PostgreSQL final-authorization and terminal-storage suites, AccountSelectedOwnerIntakeSettlementServiceTest, and SelectedOwnerIntakeSettlementGrpcCodecTest.

      Without these entries, the scan-first status surface does not match the narrative.

      As per coding guidelines: "Each tracker contains one Capability Status row for every capability it primarily owns… the capability rows are the complete scan-first status surface" and "implemented and partial rows name concrete production anchors."

      • Accepted AA-1.3 row omits implemented V1008-V1010 owner and R31 proof anchors already described in narrative. Add real links only; preserve partial/drift-found and unregistered controlled-proof limits.
  12. Hosted Review 6 CompletedRuntime 10m 10s
    Found: 0 Accepted: 0/0/0 Routed: 0
    1. No findings recorded for this run

Routed Findings

0 Open1 Accepted/Fixed0 Rejected
  1. Route 1 · PR #3269 → PR #3249 Accepted/FixedMinorPreserve terminal-read status codes in Account settlement.

    Both settlement paths map every owner error except FAILED_PRECONDITION to UNAVAILABLE. A missing receipt can therefore bypass Account’s “not committed” handling, while ALREADY_EXISTS and DATA_LOSS can appear retryable.

    Preserve these owner statuses for both Automation and Entity, then add boundary tests for the absent, conflicting, and corrupt receipt cases.

           if (failure.getStatus().getCode() == Status.Code.FAILED_PRECONDITION) {
             throw Status.FAILED_PRECONDITION
                 .withDescription("Automation terminal evidence is not committed")
                 .asRuntimeException();
           }
    +      Status.Code code = failure.getStatus().getCode();
    +      if (code == Status.Code.NOT_FOUND
    +          || code == Status.Code.ALREADY_EXISTS
    +          || code == Status.Code.DATA_LOSS) {
    +        throw failure;
    +      }
           throw Status.UNAVAILABLE
               .withDescription("Automation terminal evidence is unavailable")
               .asRuntimeException();
    

    Apply the same status-preservation block to the Entity catch path.

    Outcome: Published19907273a7509fbc6d59ea4b4aada9188364f045 preserves three terminal codes for both owners, strips poisoned details. Fresh11Accountcases/20status-matrix combinations0fail/error/skip;MainTestCheckstyle/SpotBugs/SpotlessPASS85.9s. Proof:3249-routed-terminal-statuses/qualified-proof.json.

Unlinked items

no items unlinked