FireMUD Delivery Status

PR data refreshed

PR #3028 review history

Account staging and shared gameplay owner-source foundation

Unit 1A · identity, Account and public JOIN

Review rounds

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

Hosted CodeRabbit5 completed
5/5/07/7/03/3/03/2/01/0/0
CLI CodeRabbit23 completed
2/1/00/0/02/2/02/1/01/0/0
Subagent Review10 completed
0/0/01/1/00/0/00/0/00/0/0

Recorded review history

Reviews and findings

  1. Subagent Review 1 CompletedModel: gpt-6-luna · Xhigh
    Found: 0 Accepted: 0 Routed: 0
    1. No findings recorded for this run
  2. CLI Review 1 CompletedRuntime 5m 03s
    Found: 4 Accepted: 0/3/1 Routed: 0
    1. Minor

      Update the exception handling around eligibilityService.resolve in AccountActorStagingEligibilityGrpcService to map CannotCreateTransactionException to Status.UNAVAILABLE alongside DataAccessResourceFailureException. Preserve the existing handling for other transaction and runtime failures.

      • Accepted Accepted: classify CannotCreateTransactionException as owner-storage UNAVAILABLE and add sanitized focused regression. Other transaction/runtime classification preserved. Implementation pending.
    2. Minor

      Update the closing jOOQ ignore marker in the PL/pgSQL section from the unrecognized end token to the configured stop token, matching the closing markers used by the other sections.

      • Accepted Accepted: change only the final V73 jOOQ ignore closing marker from end to configured stop; preserve SQL semantics and run generation proof. Implementation pending.
    3. Trivial

      Align the package declaration in WorldCanonicalInitialAdmissionHoldTest with its current directory by changing it to net.firedevops.firemud.common.world, or move the test under the matching unit directory and keep its existing package.

      • Accepted Accepted: align the existing World hold test package with its source directory; no behavior change. Implementation pending in local batch.
    4. Minor

      Add a separate Observation field to the 2026-10-09 entry in ai-observations.md, moving the observation about patch-tool target resolution and missing before-images out of Context; keep Context for incident details and preserve the existing Expected pattern.

      • Accepted Accepted: add the missing Observation field to the incident entry while preserving its facts, uncertainty, and Expected pattern. Implementation pending.
  3. Subagent Review 2 CompletedModel: gpt-6-luna · Xhigh
    Found: 1 Accepted: 1 Routed: 0
    1. JOIN must verify later tenant authority source before demo entitlement activationMinor

      AccountDemoTenantEntitlementRepository.java:96,122; AccountMembershipAuthorityEventProducer.java:527. Whole immutable 90-path review completed; no other high-confidence obligation. Validation not run by reviewer.

      • Accepted Owned Account source integration gap: V73 entitlement advances generation beyond the existing JOIN 1/1 guard. Preserve fail-closed behavior and add exact current source/event verification before wiring this write path; no current runtime caller or activation is claimed.
  4. Subagent Review 3 CompletedModel: gpt-6-luna · Xhigh
    Found: 0 Accepted: 0 Routed: 0
    1. No findings recorded for this run
  5. CLI Review 2 CompletedRuntime 4m 02s
    Found: 2 Accepted: 0/1/1 Routed: 0
    1. Use the shared publication fixture instead of a copied builder.Trivial

      capture, operation, and release here are near-copies of the same helpers in PublishedRealmEntryPolicySetEvidenceTest (lines 458-610). These helpers encode digest preimages and binding relations. If one copy changes and the other copy does not, the codec test can pass with stale fixture semantics. Make PublishedRealmEntryPolicySetEvidenceTest.fixture(boolean) package-visible, or extract one shared fixture class, and use it from this test. Both tests are already in the common.world test package.

      • Accepted Two evidence tests duplicate the same digest-sensitive publication fixture builders. Reuse one package-local test fixture while preserving all codec and evidence assertions; no production behavior change.
    2. Update the Capability Status rows to match this new production surface.Minor

      The narrative now records first-JOIN billing-cutoff production. The tracker rows are unchanged, so their anchors are stale:

      • The AA-1.2 implementation anchors omit AccountTenantAuthorityEventRepository.java, AccountDemoTenantEntitlementRepository.java, AccountTenantEntitlementOutboxRepository.java, V53__account_protected_demo_entitlements.sql, and V73__account_tenant_authority_source_bridge.sql.
      • The AA-1.2 proof anchors omit AccountDemoTenantEntitlementPersistenceIntegrationTest.java and AccountCanonicalFirstJoinEventIntegrationTest.java.
      • The AA-1.1 row does not mention RuntimeAccountIdentityGrpcService or the actor-staging eligibility RPC, although the Account architecture docs now record both as implemented.

      Add these anchors to the rows. Record the remaining gaps in the same row text: the producer is not wired to an entitlement caller, and the PostgreSQL proof has not run.

      As per coding guidelines: "Keep its status, implementation record, validation, gaps, decisions, and service-map sections aligned when a domain boundary changes" and "implemented and partial rows name concrete production anchors."

      • Accepted AA-1.1 and AA-1.2 capability rows omit current identity/staging and source/event anchors. Add exact owning implementation/proof links and preserve partial status, unwired entitlement caller and current physical proof limitations; earlier hosted74-case execution must not be relabelled wholly unrun.
  6. Subagent Review 4 CompletedModel: gpt-6-luna · Xhigh
    Found: 0 Accepted: 0 Routed: 0
    1. No findings recorded for this run
  7. CLI Review 3 Failed
    Found: 1 Accepted: 1 Routed: 0
    1. Update the assertion in PreseededActorAssignmentOwnerReadEvidenceTest to inspect wireRequest’s message descriptor fields instead of only populated fields, so newly added pointer or epoch fields are detected even when unset.

      • Accepted Trivial accepted. Source fix 7e7830e1aba1497d19d57a6beb334bf704204345 replaces populated getAllFields().keySet() with descriptor.getFields(), including unset pointer/epoch fields. Worker reports two-case tests; Root source-verified, did not rerun. CLI remains failed/nonattributable/uncredited.
  8. CLI Review 4 CompletedRuntime 4m 34s
    Found: 2 Accepted: 0/1/1 Routed: 0
    1. Add ResolvePreseededActorStagingEligibility to the gRPC inventory.Minor

      The "gRPC APIs" list now has an entry for ResolveRuntimeAccountIdentity. It has no entry for AccountActorStagingEligibilityService/ResolvePreseededActorStagingEligibility. The canonical inventory is therefore incomplete, and a reader who scans it will not see that the Entity-only RPC exists. Add a short entry next to Line 119. The entry must state these facts and link to the new section:

      • The RPC is Entity Management only and mTLS-only.
      • It is disabled by default.
      • It grants no admission.

      📝 Proposed inventory entry

       - `ResolveRuntimeAccountIdentity(canonicalAccountId, requestId)` – mTLS-only internal owner read for the exact Game Session and Entity Management workload identities in Account's configured workload namespace. It returns Account's persisted canonical UUID, numeric Account row solely as provenance evidence, and UUID provenance. Account fails closed on missing, ambiguous, malformed, or inconsistent row evidence; this read does not establish membership, grants, actor ownership, or gameplay admission.
      +- `ResolvePreseededActorStagingEligibility(schemaVersion, targetNamespace, requestId, canonicalAccountId, canonicalTenantId, purpose)` – read-only, default-disabled, mTLS-only internal owner read for the exact same-namespace Entity Management workload. It returns staging-only evidence as defined in [Preseeded actor-staging eligibility owner read](#preseeded-actor-staging-eligibility-owner-read) and creates no membership, actor, JOIN, PLAY, or admission authority.
      

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

      • Accepted Canonical Account API inventory omits the implemented default-disabled Entity-only mTLS staging read; add short linked entry without changing authority or claiming admission.
    2. Derive the digests from the preimage builders. Do not keep four copies of the field lists.Trivial

      The field lists appear twice for each digest:

      • requestDigest and requestPreimage each list the full request field sequence.
      • resultDigest and resultPreimage each list the full result field sequence.

      The two copies of each list must stay identical, because the preimages are published for cross-language proof. A future edit can change one copy and not the other. The digest then no longer matches the published preimage, and no code detects the drift. Compute each digest from its preimage builder.

      ♻️ Proposed refactor

         public static String requestDigest(Request request) {
           Objects.requireNonNull(request, "request");
      -    return digest(
      -        REQUEST_DOMAIN,
      -        field("schemaVersion", Integer.toString(SCHEMA_VERSION)),
      -        ... // full duplicated field list
      -        );
      +    return sha256Hex(requestPreimage(request));
         }
       
         public static String resultDigest(AuthoredWorldLaunchDescriptorEvidence evidence) {
           Objects.requireNonNull(evidence, "evidence");
      -    return digest(
      -        RESULT_DOMAIN,
      -        ... // full duplicated field list
      -        );
      +    return sha256Hex(resultPreimage(evidence));
         }
      
      • Accepted Useful source-owned testability/maintenance correction: compute authored launch digests from their existing canonical preimage builders, preserving all bytes and hashes; focused proof required.
  9. CLI Review 5 CompletedRuntime 2m 44s
    Found: 1 Accepted: 0/1/0 Routed: 0
    1. Reject initialAdmissionRequestId values that are not well-formed Unicode.Minor

      requireBoundedText checks only blank and code-point length. A Game Session request ID with a lone UTF-16 surrogate (for example "r\uD800") passes the Request constructor. canonicalRequestBytes() and holdBindingDigest() then depend on how Rfc8785CanonicalJson.canonicalizeUtf8 handles that surrogate. It can throw IllegalStateException after construction, or it can replace the character and produce the same digest for two different request IDs. Other carriers in this PR reject lone surrogates, for example the "bad" + (char) 0xd800 cases in AuthoredWorldSourceEvidenceTest and RuntimeTenantIdentityEvidenceTest. Apply the same rule here so that bad input fails in the constructor.

      🛡️ Proposed fix

         private static void requireBoundedText(String value, String field, int maximumCodePoints) {
           if (value == null
               || value.isBlank()
      -        || value.codePointCount(0, value.length()) > maximumCodePoints) {
      +        || value.codePointCount(0, value.length()) > maximumCodePoints
      +        || value.codePoints().anyMatch(cp -> Character.isSurrogate((char) cp) && cp <= 0xFFFF)) {
             throw new IllegalArgumentException(field + " must be nonempty and bounded");
           }
         }
      
      • Accepted Minor: request constructor admits lone UTF-16 surrogates before canonical serialization, unlike sibling owner-evidence carriers. Reject malformed Unicode at construction; preserve valid supplementary code points, existing bounds and exact digest vectors.
  10. Hosted Review 1 CompletedRuntime 10m 55s
    Found: 5 Accepted: 1/1/3 Routed: 0
    1. Make the tamper case reach the digest check.Trivial

      The canonical payload ends with ..."tenantId":"<uuid>"}. The byte at altered.length - 2 is therefore the closing " of the tenantId value. Replacing that byte with 'a' makes the JSON invalid. verify then fails at JSON.readValue with "payload is malformed". The test never reaches the digest comparison or the canonical-bytes comparison.

      Change a value inside a string field and keep the JSON valid. For example, change one hex character of a nested digest. Then assert the digest-mismatch message so the test proves tamper detection.

      ♻️ Proposed change

      --- "a/services/account-service/src/test/java/unit/net/firedevops/firemud/accountservice/dto/TenantAuthorityEventV1CodecTest.java"
      +++ "b/services/account-service/src/test/java/unit/net/firedevops/firemud/accountservice/dto/TenantAuthorityEventV1CodecTest.java"
      @@ -53,10 +53,14 @@
               .contains("\"tenantAuthorityGeneration\":\"2\"")
               .contains("\"tenantBillingSequence\":\"1\"");
       
      -    byte[] altered = authorityEvent.payload();
      -    altered[altered.length - 2] = altered[altered.length - 2] == 'a' ? (byte) 'b' : (byte) 'a';
      -    assertThatThrownBy(() -> TenantAuthorityEventV1Codec.verify(altered))
      -        .isInstanceOf(IllegalArgumentException.class);
      +    String original = new String(authorityEvent.payload(), StandardCharsets.UTF_8);
      +    String tampered = original.replace("\"tenantBillingSequence\":\"1\"",
      +        "\"tenantBillingSequence\":\"2\"");
      +    assertThat(tampered).isNotEqualTo(original);
      +    assertThatThrownBy(
      +            () -> TenantAuthorityEventV1Codec.verify(tampered.getBytes(StandardCharsets.UTF_8)))
      +        .isInstanceOf(IllegalArgumentException.class)
      +        .hasMessageContaining("digest or canonical bytes differ");
         }
       
         private static FreshTenantCreationEvidence source(UUID tenantId) {
      
      • Accepted Accepted: valid JSON tampering must reach and assert the digest or canonical-byte mismatch, not malformed JSON. Fix pending.
    2. Override equals/hashCode on the records that hold byte[].Trivial

      DraftAuthorizationFenceBinding, SourceEvidence, and OwnerReadback are records with byte[] components (gameDesignBinding, normalizedInput, evidence, fullBinding, result). A generated record equals compares arrays by reference. The constructors also clone every array. As a result, two bindings decoded from the same canonical bytes are never equal. A List<SourceEvidence> comparison has the same defect.

      WorldDraftTerminalReadEvidence.Request already overrides equals for this reason. The binding types do not. GameDesignPublicationTerminalReadEvidence.ReadRequest has the same problem, and it is nested inside ReadResult. Any future caller or test that uses equals, assertThat(...).isEqualTo(...), or a hash-based collection on these types will give wrong results without an error.

      Base equals/hashCode on canonicalBytes() so that equality matches the canonical identity.

      ♻️ Proposed change

        @Override
        public boolean equals(Object other) {
          return other instanceof DraftAuthorizationFenceBinding that
              && Arrays.equals(canonicalBytes(), that.canonicalBytes());
        }
      
        @Override
        public int hashCode() {
          return Arrays.hashCode(canonicalBytes());
        }
      

      Add the same override to SourceEvidence, OwnerReadback, and GameDesignPublicationTerminalReadEvidence.ReadRequest.

      • Accepted Accepted: immutable byte-array records require canonical value equality and matching hash codes with independent decode and changed-identity proof. Fix pending.
    3. Reject a non-COMMITTED proof with IllegalArgumentException in sourceRequest.Minor

      PreseededActorAssignmentOwnerReadGrpcCodec.fromResponse calls sourceRequest with a proof decoded from the wire. It calls sourceRequest before CanonicalGameplayRosterOwnerReadEvidence checks the outcome. Consider a decodable PENDING or ABORTED proof from the peer. For that proof, committedPointerVersion() is null, so Objects.requireNonNull throws NullPointerException.

      The rest of the closed codec rejects malformed or mismatched evidence with IllegalArgumentException. Callers that map IllegalArgumentException to a fail-closed evidence rejection will see an unclassified NullPointerException instead. The roster codec rejects the same input with IllegalArgumentException. Check the outcome first.

      🐛 Proposed fix

           Objects.requireNonNull(request, "request");
           Objects.requireNonNull(proof, "proof");
      +    if (proof.outcome() != GameSessionCanonicalInitialAdmissionOwnerProof.Outcome.COMMITTED) {
      +      throw new IllegalArgumentException(
      +          "Game Session assignment source requires a COMMITTED owner proof");
      +    }
           var hold = proof.holdIdentity().request();
      @@
      -        Objects.requireNonNull(proof.committedPointerVersion(), "committedPointerVersion"),
      +        proof.committedPointerVersion(),
               hold.activeLifecycleEpoch());
      
      • Accepted Accepted: reject non-COMMITTED owner proof explicitly with IllegalArgumentException before nullable pointer access. Fix pending.
    4. Remove the redundant re-decode of the publication operation.Trivial

      validatePublicationContext already decodes operationBytes at Line 457 with GameDesignPublicationOperationBinding.fromStored. parseCapture checks that the captured bytes equal expectedOperationBytes, then decodes the same bytes again at Line 505. Each decode is expensive:

      • GameDesignPublicationOperationBinding.fromStored builds the binding.
      • Its constructor calls AccountPublicationAuthorizationBinding.fromStored and WorldPublishedStartLocationEvidence.fromStored again.
      • The World evidence constructor runs the full WorldDraftTerminalReadGrpcCodec round trip.

      One policy-set decode therefore validates the World evidence several times. Callers repeat this work:

      • CanonicalGameplayRosterOwnerReadGrpcCodec.fromResponse calls fromStored.
      • The CanonicalGameplayRosterOwnerReadEvidence constructor calls fromStored again.

      The carrier can be up to 2 MiB. The byte-equality check is enough because the expected bytes were already decoded. Remove the second decode.

      ♻️ Proposed simplification

      --- "a/services/common-platform-core/src/main/java/net/firedevops/firemud/common/publication/PublishedRealmEntryPolicySetEvidence.java"
      +++ "b/services/common-platform-core/src/main/java/net/firedevops/firemud/common/publication/PublishedRealmEntryPolicySetEvidence.java"
      @@ -499,12 +499,9 @@
           byte[] operationBytes = capture.bytes();
           byte[] snapshotBytes = capture.bytes();
           capture.requireEnd();
      -    if (!Arrays.equals(operationBytes, expectedOperationBytes)
      -        || !Arrays.equals(
      -            operationBytes,
      -            GameDesignPublicationOperationBinding.fromStored(operationBytes).canonicalBytes())) {
      +    if (!Arrays.equals(operationBytes, expectedOperationBytes)) {
             throw new IllegalArgumentException("Captured source operation bytes changed");
           }
           String snapshotJson = strictUtf8(snapshotBytes);
           try {
             if (!Arrays.equals(snapshotBytes, Rfc8785CanonicalJson.canonicalizeUtf8(snapshotJson))) {
      
      • Accepted Accepted: remove redundant operation decode after the sole caller already validates expected bytes; retain exact byte equality and tamper guards. Fix pending.
    5. Bind publication to current entitlement evidence.Major

      requireOperationMatchesRequest validates allowPublicJoin and entitlementVersion only against the persisted operation and its own digest. The later readCurrentTenantSourceEvent check validates tenant authority and provenance, but not current entitlement policy. A stale operation can therefore publish a positive membership event after the tenant entitlement changes.

      Expose the current entitlement snapshot or billing event. Reject publication when the current entitlement version differs from operation.entitlementVersion(), or when the current entitlement no longer allows public join and gameplay. If these values use different version spaces, persist and compare the operation-time tenant authority generation instead.

      • Accepted Accepted: before a new positive JOIN membership event require actual current entitlement version, public-join and gameplay flags, and exact tenant source binding. Preserve original committed replay. Fix pending.
  11. CLI Review 6 CompletedRuntime 4m 26s
    Found: 2 Accepted: 0/2/0 Routed: 0
    1. Correct the "preserves the exact fresh tenant 1/1 baseline" claim.Minor

      This line says that first-JOIN event production preserves the fresh tenant 1/1 baseline. The producer does not support a successful first JOIN at 1/1:

      • At tenant generation and source version 1/1, readCurrentTenantSourceEvent returns null. See services/account-service/src/main/java/net/firedevops/firemud/accountservice/service/AccountMembershipAuthorityEventProducer.java lines 641-645.
      • requireCurrentJoinEntitlement then rejects a null tenantSourceEvent (lines 536-541).
      • AccountDemoTenantEntitlementRepository.provision always advances the tenant generation. A tenant that has a demo entitlement therefore always has generation ≥ 2.

      As a result, every first JOIN at 1/1 fails closed. The 1/1 branch in tenantSourceEvidenceMatches is unreachable on the success path, and tenantBillingCutoff is always present. Change the tracker text to state that first JOIN now requires a current demo entitlement and its typed tenant authority event, so a bare 1/1 baseline is denied. Alternatively, remove the dead 1/1 branch from the producer.

      As per coding guidelines: "Use the relevant tracker as the reader-facing account of implementation status." Based on learnings, the tracker must not restate the canonical contract; this correction only changes the status claim.

      • Accepted Minor current-PR status drift: requireCurrentJoinEntitlement rejects null typed event, so a bare fresh tenant1/1 cannot succeed. Correct the tracker only; preserve fail-closed implementation.
    2. Add a reconsideration trigger, or do not record this entry.Minor

      The entry states that merged #3116 now supplies the diagnostic location, and that the detector stays strict. The lesson therefore appears to be addressed. The entry records no remaining blocker or postponement, and it has no Reconsideration trigger. The file rules permit a retained entry only when a blocker or a deliberate postponement remains, with its reason and trigger. Do one of these:

      • Add a Reconsideration trigger that names the remaining open condition, for example a false positive that occurs after #3116.
      • Remove this new entry because #3116 resolves it.

      As per coding guidelines: "Retain an entry only when a genuine blocker or deliberate postponement remains, recording the reason and reconsideration trigger."

      • Accepted Minor observation stewardship gap: #3116 improves diagnostic location but does not remove the ordinary-prose false positive. Preserve historical entry and state the genuine remaining limitation plus reconsideration trigger.
  12. CLI Review 7 CompletedRuntime 3m 25s
    Found: 0 Accepted: 0/0/0 Routed: 0
    1. No findings recorded for this run
  13. CLI Review 8 CompletedRuntime 3m 38s
    Found: 0 Accepted: 0/0/0 Routed: 0
    1. No findings recorded for this run
  14. CLI Review 9 CompletedRuntime 3m 38s
    Found: 1 Accepted: 0/1/0 Routed: 0
    1. Remove readOnly = true from repository methods that take row locks.Minor

      PostgreSQL rejects SELECT ... FOR SHARE and SELECT ... FOR UPDATE inside a READ ONLY transaction. These methods advertise readOnly = true but issue FOR SHARE reads. Current callers hold writable owner transactions, so nothing fails today. A future read-only caller would fail with a PostgreSQL error.

      • services/account-service/src/main/java/net/firedevops/firemud/accountservice/repository/AccountDemoTenantEntitlementRepository.java#L169-L170: remove readOnly = true from readCurrent and revalidate, because readCurrentRow and outboxRepository.readCheckpoint use FOR SHARE.
      • services/account-service/src/main/java/net/firedevops/firemud/accountservice/repository/AccountTenantAuthorityEventRepository.java#L386-L423: remove readOnly = true from readCurrentByTenant, or drop its FOR SHARE clauses on snapshot-only paths.
      • Accepted Minor transaction-contract correction: these MANDATORY methods take FOR SHARE locks and should not advertise readOnly=true. Preserve locking and mandatory propagation; owner transactions must remain writable. Fix and focused metadata/proof pending.
  15. Hosted Review 2 CompletedRuntime 8m 43s
    Found: 7 Accepted: 0/6/1 Routed: 0
    1. Share one validator for the source key and provenance rules.Trivial

      This record copies the sourceGameTenantKey bounds (36 code points, 72 UTF-16 units), the nil-UUID check, and the NEW_GAME_ROW/RETAINED_GAME_V29 set from AuthoredWorldSourceDigest. The two copies use different methods to reject malformed UTF-16. This file uses CharsetEncoder.canEncode. AuthoredWorldSourceDigest uses GameTenantCreationDigest.utf8ByteLength. The two evidence types describe the same owner row. If one copy changes and the other does not, they will accept different values for that row.

      To fix this, move these checks into package-level static helpers, for example in AuthoredWorldSourceDigest. Then call those helpers from both types.

      • Accepted Both tenant evidence classes validate the same owner row with duplicated source rules; reuse package-level existing owner helpers preserving current bounds and malformed Unicode denial.
    2. OwnedAffectedTuple rejects World epochs that the Draft binding accepts.Minor

      DraftCommitBinding.AffectedUnit accepts any canonical nonnegative decimal for expectedEpoch, with no upper bound. DraftCommitBindingTest uses a 36-digit LARGE_EPOCH as a supported value. WorldDraftTerminalReadGrpcCodec.requireCommittedResult computes resultingEpoch with BigInteger, so the APPLIED carrier also supports that range. The expected_epoch field in the proto is a string.

      This constructor rejects any value above Long.MAX_VALUE. requireRelation builds boundTuples from the Draft's World affected units through this constructor. For a valid committed Draft with a large World epoch, every published start-location evidence attempt throws. That publication path cannot complete for that Draft. Use the same unbounded canonical-decimal rule as DraftCommitBinding. If World storage really limits epochs to long, enforce that limit at Draft creation instead, so both contracts agree.

      Proposed fix

      --- "a/services/common-platform-core/src/main/java/net/firedevops/firemud/common/world/WorldPublishedStartLocationEvidence.java"
      +++ "b/services/common-platform-core/src/main/java/net/firedevops/firemud/common/world/WorldPublishedStartLocationEvidence.java"
      @@ -539,13 +539,9 @@
             if (scopeType.isEmpty() != scopeId.isEmpty()) {
               throw new IllegalArgumentException("scopeType and scopeId must both be present or absent");
             }
      -      if (expectedEpoch == null
      -          || !expectedEpoch.matches("0|[1-9][0-9]*")
      -          || new java.math.BigInteger(expectedEpoch)
      -                  .compareTo(java.math.BigInteger.valueOf(Long.MAX_VALUE))
      -              > 0) {
      +      if (expectedEpoch == null || !expectedEpoch.matches("0|[1-9][0-9]*")) {
               throw new IllegalArgumentException("expectedEpoch must be canonical non-negative decimal");
             }
           }
       
           private static void requireTupleText(String value, String name) {
      
      • Accepted Draft and applied-terminal epochs use unbounded canonical decimals but the publication tuple imposes Long.MAX_VALUE; align the lossless carrier and retain malformed/negative denial.
    3. Select request_id in the prior-request replay query.Minor

      The prior-request query on Line 65 selects only tenant_billing_sequence, event_id, event_digest, payload. Line 71 passes that row to event(tenantId, priorRequest). event then calls row.get("request_id", UUID.class) on Line 169. jOOQ throws IllegalArgumentException when a requested field is not in the record. Every exact replay through append therefore fails before matches runs. The documented "returns only an exact request and payload replay" contract does not work.

      provision currently replays through the operations table first, so the current caller does not reach this path. The public append method still cannot do what it documents.

      🐛 Proposed fix

      --- "a/services/account-service/src/main/java/net/firedevops/firemud/accountservice/repository/AccountTenantEntitlementOutboxRepository.java"
      +++ "b/services/account-service/src/main/java/net/firedevops/firemud/accountservice/repository/AccountTenantEntitlementOutboxRepository.java"
      @@ -60,11 +60,11 @@
                       + "WHERE tenant_uuid = ? FOR UPDATE",
                   tenantId);
           long currentSequence = nonnegative(stream, "last_sequence");
           Record priorRequest =
               dsl.fetchOne(
      -            "SELECT tenant_billing_sequence, event_id, event_digest, payload "
      +            "SELECT tenant_billing_sequence, request_id, event_id, event_digest, payload "
                       + "FROM account_tenant_entitlement_outbox_events "
                       + "WHERE tenant_uuid = ? AND request_id = ?",
                   tenantId,
                   requestId);
           if (priorRequest != null) {
      

      Add a test that appends the same request twice in one transaction. It covers this path.

      • Accepted The exact append replay selects no request_id although event() requires it; select the field and prove same-transaction exact replay and conflict semantics.
    4. A corrupt selection on the wire surfaces as IllegalStateException, not IllegalArgumentException.Minor

      fromStored catches every RuntimeException and rethrows it as IllegalStateException. Wire decoders reach this method through a chain of calls:

      • GameDesignPublicationTerminalReadGrpcCodec.fromRequest calls ReadRequest.fromStored.
      • ReadRequest.fromStored calls GameDesignPublicationOperationBinding.fromStored.
      • That method calls AccountPublicationAuthorizationBinding.fromStored, which calls this method.

      The result: a malformed client request with a corrupt selection JSON escapes as IllegalStateException. Every other malformed-frame path in this chain throws IllegalArgumentException. A receiver that maps IllegalArgumentException to INVALID_ARGUMENT will then report a client input error as INTERNAL. This is a gRPC application-error contract issue.

      PublishedRealmEntryPolicySetEvidence.fromStored already converts the exception back to IllegalArgumentException. The terminal-read codec does not.

      Fix: throw IllegalArgumentException for corrupt input here. If the IllegalStateException type must stay for repository readback, normalize the exception in GameDesignPublicationTerminalReadGrpcCodec.fromRequest and fromResponse instead.

      Proposed fix

      --- "a/services/common-platform-core/src/main/java/net/firedevops/firemud/common/publication/AuthoredDraftPublishSelectionBinding.java"
      +++ "b/services/common-platform-core/src/main/java/net/firedevops/firemud/common/publication/AuthoredDraftPublishSelectionBinding.java"
      @@ -141,9 +141,9 @@
                   "Stored authored Draft publication selection is not exact canonical JSON");
             }
             return selection;
           } catch (RuntimeException exception) {
      -      throw new IllegalStateException("Stored authored Draft selection is corrupt", exception);
      +      throw new IllegalArgumentException("Stored authored Draft selection is corrupt", exception);
           }
         }
       
         public PublishIntent intent() {
      

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

      • Accepted Corrupt nested selection escapes wire decoding as IllegalStateException; normalize to IllegalArgumentException with cause and negative decoding proof without relaxing canonical validation.
    5. Reconcile the recorded validation counts.Minor

      The paragraph records 593 Account unit cases and five shared World hold cases, while the PR reports 598 Account unit cases and 27 focused shared-evidence cases. Clarify whether these are different suite scopes or run snapshots. If they are not, update the paragraph to match the latest results.

      • Accepted Historical gate108 counts are valid but unclear beside newer gate123 and gate124 proof; distinguish the dated scopes rather than erase retained evidence.
    6. Add value-based equals/hashCode to GameDesignPublicationTerminalEvidence.Minor

      This class is described as immutable evidence with a canonical encoding. It does not override equals or hashCode, so equality falls back to object identity.

      GameDesignPublicationTerminalReadEvidence.ReadResult is a record with an Optional<GameDesignPublicationTerminalEvidence> component. Its generated equals therefore fails for two PUBLISHED or NO_PUBLICATION results decoded from the same bytes. ReadRequest was given canonical-byte equality, and PublishedRealmEntryPolicySetEvidenceTest.terminalReadRequestUsesCanonicalByteValueEquality tests it. ReadResult does not have the same behavior.

      Fix: compare the canonical bytes.

      Proposed fix

        @Override
        public boolean equals(Object other) {
          return this == other
              || (other instanceof GameDesignPublicationTerminalEvidence evidence
                  && Arrays.equals(canonicalBytes(), evidence.canonicalBytes()));
        }
      
        @Override
        public int hashCode() {
          return Arrays.hashCode(canonicalBytes());
        }
      
      • Accepted Canonical terminal evidence is immutable yet lacks value equality, breaking independently decoded ReadResult equality; compare and hash canonical bytes.
    7. Bind the returned policy set to the requested targetNamespace.Minor

      verifiedFor and requireTarget check only the tenant UUID and version UUID. The sealed set carries operationBytes, and the World request inside those bytes records its own targetNamespace. Neither fromResponse overload compares that namespace with request.targetNamespace().

      Consequence: a response that echoes the exact request can carry a valid set sealed for a different namespace with the same tenant/version UUIDs, and the codec accepts it. GameDesignPublicationTerminalReadEvidence.ReadRequest already rejects this case at Line 40 ("Read namespace differs from original World operation"). The proto also documents this read as "same-namespace".

      Fix: pass the namespace into the shared check.

      Proposed fix

         private static PublishedRealmEntryPolicySetEvidence verifiedFor(
             ResolveRequest request, PublishedRealmEntryPolicySetEvidence evidence) {
           Objects.requireNonNull(request, "request");
      -    return verifiedFor(request.canonicalTenantId(), request.canonicalVersionId(), evidence);
      +    return verifiedFor(
      +        request.targetNamespace(), request.canonicalTenantId(), request.canonicalVersionId(), evidence);
         }
      @@
         private static void requireTarget(
      -      UUID tenantId, UUID versionId, PublishedRealmEntryPolicySetEvidence evidence) {
      +      String namespace, UUID tenantId, UUID versionId, PublishedRealmEntryPolicySetEvidence evidence) {
           if (!evidence.target().canonicalTenantId().equals(tenantId)
      -        || !evidence.target().canonicalVersionId().equals(versionId)) {
      +        || !evidence.target().canonicalVersionId().equals(versionId)
      +        || !namespace.equals(
      +            GameDesignPublicationOperationBinding.fromStored(evidence.operationBytes())
      +                .world()
      +                .request()
      +                .targetNamespace())) {
             throw new IllegalArgumentException(
                 "Published policy evidence changed the exact owner target");
           }
         }
      

      Apply the same namespace argument to the ListRequest overload and to both fromResponse call sites. Add a test that substitutes a set from another namespace.

      • Accepted Tenant/version checks omit the stored World target namespace, allowing cross-namespace substitution; bind both response paths to the exact requested namespace.
  16. CLI Review 10 CompletedRuntime 3m 37s
    Found: 0 Accepted: 0/0/0 Routed: 0
    1. No findings recorded for this run
  17. CLI Review 11 CompletedRuntime 4m 17s
    Found: 1 Accepted: 0/1/0 Routed: 0
    1. Bind the policy set to the request targetNamespace.Minor

      requirePolicyMatches checks the tenant UUID and Version UUID of the policy set. It does not check the World workload namespace recorded in the policy set's publication operation.

      requireProofMatches binds the Game Session proof to request.targetNamespace(). PublishedRealmEntryPolicyReadGrpcCodec.requireTarget also binds operation.world().request().targetNamespace() for the same evidence type. This consumer is the Entity-facing verifier, so it accepts a sealed policy set produced for another namespace when the tenant and Version UUIDs match.

      Add the same namespace check.

      Proposed fix

         private static void requirePolicyMatches(
             Request request, PublishedRealmEntryPolicySetEvidence evidence) {
      +    var operation =
      +        net.firedevops.firemud.common.publication.GameDesignPublicationOperationBinding
      +            .fromStored(evidence.operationBytes());
           if (!evidence.target().canonicalTenantId().equals(request.canonicalTenantUuid())
      -        || !evidence.target().canonicalVersionId().equals(request.canonicalVersionUuid())) {
      +        || !evidence.target().canonicalVersionId().equals(request.canonicalVersionUuid())
      +        || !operation.world().request().targetNamespace().equals(request.targetNamespace())) {
             throw new IllegalArgumentException("Game Design policy set changed the exact tenant/version");
           }
      
      • Accepted Minor exact target-namespace binding gap in Entity-facing shared verifier: sealed policy tenant/version checks omit operation.World.request.targetNamespace. Add same namespace check and regression preserving existing policy/proof identity guards.
  18. CLI Review 12 CompletedRuntime 3m 13s
    Found: 0 Accepted: 0/0/0 Routed: 0
    1. No findings recorded for this run
  19. Hosted Review 3 CompletedRuntime 9m 55s
    Found: 3 Accepted: 0/2/1 Routed: 0
    1. Throw IllegalArgumentException for an out-of-range positive int frame.Minor

      Reader.positiveInt() calls Math.toIntExact(positiveLong(text())). A canonical decimal between Integer.MAX_VALUE + 1 and Long.MAX_VALUE passes positiveLong. Math.toIntExact then throws ArithmeticException, which is not an IllegalArgumentException.

      ReleaseContent.fromStored reads versionNumber, manifestSchemaVersion, artifactSchemaVersion, and digestSchemaVersion through this method. Wire bytes can reach it through this path:

      • GameDesignPublicationTerminalReadGrpcCodec.fromResponse
      • ReadResult.fromStored
      • GameDesignPublicationTerminalEvidence.fromStored

      GameDesignPublicationTerminalClient.read catches only IllegalArgumentException and converts it to "Game Design returned invalid publication terminal read evidence". If a response has a frame like versionNumber = "3000000000", a raw ArithmeticException escapes instead. This breaks the decode-failure contract used everywhere else in this chain. PublishedRealmEntryPolicySetEvidence.fromStored hides the problem only because it wraps every RuntimeException.

      🐛 Proposed fix

      --- "a/services/common-platform-core/src/main/java/net/firedevops/firemud/common/gamedesign/GameDesignPublicationTerminalEvidence.java"
      +++ "b/services/common-platform-core/src/main/java/net/firedevops/firemud/common/gamedesign/GameDesignPublicationTerminalEvidence.java"
      @@ -489,9 +489,13 @@
             if (!value.equals(text())) throw new IllegalArgumentException("Unexpected canonical field");
           }
       
           int positiveInt() {
      -      return Math.toIntExact(positiveLong(text()));
      +      long value = positiveLong(text());
      +      if (value > Integer.MAX_VALUE) {
      +        throw new IllegalArgumentException("Counter exceeds int range");
      +      }
      +      return (int) value;
           }
       
           int count() {
             String s = text();
      

      This follows the path instruction to flag "gRPC application-error handling" drift.

      • Accepted Canonical positive-long frames outside int range throw ArithmeticException and evade the terminal client malformed-evidence contract. Reject explicitly with IllegalArgumentException and add wire/client regression.
    2. Fix the stale owner-readback schema comment.Minor

      The comment at Line 36 says owner_readback_bytes holds account-draft-owner-readback/v1 bytes. The implementation also emits and accepts account-draft-owner-readback/v2:

      • DraftAuthorizationFenceBinding.OwnerReadback.canonicalBytes() uses readbackSchema(binding). That method returns OWNER_READBACK_SCHEMA_V2 for every account-draft-authorization-fence/v2 binding.
      • OwnerReadback.fromStored accepts both schemas.

      A World server developer who follows this comment may reject or never produce v2 readback. Every v2 Draft authorization fence would then fail at the boundary. Make the comment match the closed set the codec enforces.

      📝 Proposed fix

      --- "a/protos/world-management/v1/draft_terminal_service.proto"
      +++ "b/protos/world-management/v1/draft_terminal_service.proto"
      @@ -33,6 +33,8 @@
         string read_request_id = 3;
         bytes original_account_binding = 4;
         WorldDraftTerminalReadStatus status = 5;
      -  // Canonical account-draft-owner-readback/v1 bytes. Empty only for UNKNOWN.
      +  // Canonical account-draft-owner-readback/v1 or /v2 bytes; the version matches the
      +  // original Account binding schema (fence v1 -> readback v1, fence v2 -> readback v2).
      +  // Empty only for UNKNOWN.
         bytes owner_readback_bytes = 6;
       }
      
      • Accepted OwnerReadback accepts and emits v1/v2 according to the original binding; correct the wire comment without changing protocol behavior.
    3. Validate the World APPLIED readback once, not through a wire round trip.Trivial

      requireRelation validates the APPLIED readback by building a protobuf response and decoding it again. That path runs WorldDraftTerminalReadGrpcCodec.requireCommittedResult three times for each construction:

      1. toResponse → requireExactOwnerReadback → requireCommittedResult.
      2. fromResponse → requireExactOwnerReadback → requireCommittedResult.
      3. fromResponse → new WorldDraftTerminalReadEvidence(...) → requireCommittedResult.

      Each run decodes the Account binding and the DraftCommitBinding again. It also canonicalizes the APPLIED JSON and the graph JSON, and hashes them. OwnerReadback.canonicalBytes() and OwnerReadback.fromStored also reparse the full binding on every call.

      Callers repeat this cost:

      • GameDesignPublicationOperationBinding rebuilds world through fromStored.
      • PublishedRealmEntryPolicySetEvidence.fromStored and CanonicalGameplayRosterOwnerReadEvidence.requirePolicyMatches both decode the operation binding.

      One roster-owner read therefore runs the complete World graph validation many times. The policy-set payload can be up to 2 MiB.

      The public WorldDraftTerminalReadEvidence constructor already enforces the same rules once: the WORLD owner, terminal outcome, requireBinding, exact full-binding bytes, and requireCommittedResult. Use that constructor directly. WorldDraftTerminalReadGrpcCodec.fromResponse has the same duplication: it calls requireExactOwnerReadback(request, decoded) and then calls the constructor, which repeats the committed-result check.

      ♻️ Proposed change

      --- "a/services/common-platform-core/src/main/java/net/firedevops/firemud/common/world/WorldPublishedStartLocationEvidence.java"
      +++ "b/services/common-platform-core/src/main/java/net/firedevops/firemud/common/world/WorldPublishedStartLocationEvidence.java"
      @@ -207,22 +207,20 @@
                 "Published World selection changed the complete World affected set");
           }
       
           var terminalRequest =
               WorldDraftTerminalReadEvidence.Request.create(request.targetNamespace(), accountBytes);
           var terminalReadback =
               new DraftAuthorizationFenceBinding.OwnerReadback(
                   Owner.WORLD,
                   Outcome.COMMITTED,
                   account.operationId(),
                   account.commitId(),
                   account.fenceId(),
                   account.inputDigest(),
                   accountBytes,
                   appliedBytes);
      -    var terminalResponse =
      -        WorldDraftTerminalReadGrpcCodec.toResponse(
      -            terminalRequest, java.util.Optional.of(terminalReadback));
      -    WorldDraftTerminalReadGrpcCodec.fromResponse(terminalRequest, terminalResponse);
      +    // Enforces WORLD owner, exact binding bytes, and the complete APPLIED carrier once.
      +    new WorldDraftTerminalReadEvidence(terminalRequest, java.util.Optional.of(terminalReadback));
       
           JsonNode applied = readApplied(appliedBytes);
           if (!"APPLIED".equals(text(applied, "status"))) {
      
      • Accepted The validated World terminal evidence constructor enforces the same exact owner/binding/APPLIED checks. Use it directly instead of repeated protobuf round-trip validation, preserving all fail-closed checks.
  20. CLI Review 13 CompletedRuntime 4m 07s
    Found: 1 Accepted: 0/1/0 Routed: 0
    1. Correct which component emits the tenant authority event.Minor

      The AA-1.2 gap cell says that AccountMembershipAuthorityEventProducer "emits the canonical tenant authority event with billing cutoff". That is not what the code does. AccountTenantAuthorityEventRepository.append writes the TENANT_AUTHORITY_CHANGED event, and it does so during demo entitlement provisioning. The producer emits the first-JOIN membership event. That membership event carries a tenantBillingCutoff taken from the current tenant authority event. The tracker is the reader-facing record of implementation status, so it must name the correct producer.

      📝 Proposed wording

      -`AccountMembershipAuthorityEventProducer` emits the canonical tenant authority event with billing cutoff from fresh source coordinates, covered by
      +`AccountTenantAuthorityEventRepository` appends the canonical tenant authority event during demo entitlement provisioning; `AccountMembershipAuthorityEventProducer` emits the first-JOIN membership event with a tenant billing cutoff taken from that current tenant authority event, covered by
      

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

      • Accepted Accepted Minor documentation correction: tenant-authority append belongs to AccountTenantAuthorityEventRepository during demo entitlement provisioning; the first-JOIN producer emits membership events using the current tenant event cutoff. No behavior change.
  21. CLI Review 14 CompletedRuntime 3m 09s
    Found: 0 Accepted: 0/0/0 Routed: 0
    1. No findings recorded for this run
  22. CLI Review 15 CompletedRuntime 2m 57s
    Found: 1 Accepted: 0/0/1 Routed: 0
    1. Replace the hard-coded operation frame index 13 with an accessor on the owning codec.Trivial

      appliedIntakeRequestId copies the layout of world-draft-terminal-operation/v1 frames. That layout is owned by WorldDraftTerminalReadEvidence. This code checks only the schema at frame 0 and the frame at index 13.

      Several frames near index 13 also hold canonical UUID text. One example is the frame at index 11, which holds aaaaaaaa-... in the test fixture. Assume the owner later inserts or reorders a frame without changing the schema string. This parser then reads a different UUID and still parses it. The mismatch would appear only as a misleading "differs from the original APPLIED intake request" rejection. In the worst case, an unrelated UUID would be accepted as the intake identity.

      The frame layout should have one owner. Expose the decoded intake request id from the validated WorldDraftTerminalReadEvidence / APPLIED codec, and call that accessor here. Do not re-walk the frames in this class.

      ♻️ Sketch

      -    new WorldDraftTerminalReadEvidence(terminalRequest, java.util.Optional.of(terminalReadback));
      +    var terminal =
      +        new WorldDraftTerminalReadEvidence(terminalRequest, java.util.Optional.of(terminalReadback));
       ...
      -    if (!request.intakeRequestId().equals(appliedIntakeRequestId(applied))) {
      +    if (!request.intakeRequestId().equals(terminal.appliedIntakeRequestId())) {
      

      Then delete APPLIED_INTAKE_REQUEST_ID_FRAME and appliedIntakeRequestId.

      Also applies to: 269-304

      • Accepted Trivial useful codec ownership fix: remove downstream hard-coded APPLIED frame13 parsing; expose the validated intake UUID from the owning terminal codec. Preserve exact intake/receipt checks. Fix stays local while Hosted is active.
  23. Hosted Review 4 CompletedRuntime 9m 47s
    Found: 3 Accepted: 0/1/1 Routed: 0
    1. Remove the permanent --refresh-dependencies flag and its contract assertion.Minor

      The --refresh-dependencies flag makes every matrix job resolve all dependencies from the remote repositories again. This adds CI time and more chances for network failures on every run. The contract test also requires the flag to stay in the workflow.

      • .github/workflows/ci.yml#L995-L995: remove --refresh-dependencies. If the cache is stale, rotate the setup-gradle cache key once instead.
      • dev-tools/tests/ci-lightweight-scope-contract.sh#L253-L253: remove --refresh-dependencies from the expected run string.

      As per path instructions: "Focus on workflow correctness, ... cache correctness, duplication, and CI cost."

      📍 Affects 2 files

      • .github/workflows/ci.yml#L995-L995 (this comment)
      • dev-tools/tests/ci-lightweight-scope-contract.sh#L253-L253
      • Rejected Retain the demonstrated CI repair: unchanged canonical pins failed dependency resolution on original and failed-job rerun37847761035; metadata refresh made all five modules pass on37851593234. Removing it without a validated cache-invalidation replacement risks reproducing the blocker.
    2. Decode the operation bytes once.Trivial

      Line 38 runs GameDesignPublicationOperationBinding.fromStored. Line 39 then runs it again on the same canonical bytes. Each decode re-validates the nested AccountPublicationAuthorizationBinding and WorldPublishedStartLocationEvidence. That work includes the full World APPLIED carrier and graph validation through WorldDraftTerminalReadEvidence. The second decode adds no check. fromStored already rejects noncanonical input, so operation.canonicalBytes() equals the input bytes.

      ReadResult rebuilds request through ReadRequest.fromStored, so each terminal read decodes the operation several times.

      ♻️ Proposed change

      --- "a/services/common-platform-core/src/main/java/net/firedevops/firemud/common/gamedesign/GameDesignPublicationTerminalReadEvidence.java"
      +++ "b/services/common-platform-core/src/main/java/net/firedevops/firemud/common/gamedesign/GameDesignPublicationTerminalReadEvidence.java"
      @@ -34,9 +34,8 @@
               throw new IllegalArgumentException(
                   "Closed schema-1 namespace and non-nil read UUID required");
             }
      -      operationBytes =
      -          GameDesignPublicationOperationBinding.fromStored(operationBytes).canonicalBytes();
      -      var operation = GameDesignPublicationOperationBinding.fromStored(operationBytes);
      +      var operation = GameDesignPublicationOperationBinding.fromStored(operationBytes);
      +      operationBytes = operation.canonicalBytes();
             if (!targetNamespace.equals(operation.world().request().targetNamespace())) {
               throw new IllegalArgumentException("Read namespace differs from original World operation");
             }
      
      • Accepted Trivial useful redundant-work removal: decode the original canonical operation once and reuse its canonical bytes. Preserve immutable copying, exact namespace/read-identity and full nested owner validation.
    3. Reject the maximum World epoch with IllegalArgumentException, not ArithmeticException.Minor

      WorldPublishedStartLocationEvidence.Request accepts any positive long for versionStateEpoch, including Long.MAX_VALUE. For a PUBLISHED terminal with that epoch, Math.addExact(..., 1L) at Line 277 throws ArithmeticException.

      That exception escapes this decode path:

      • GameDesignPublicationTerminalReadGrpcCodec.fromResponse
      • ReadResult.fromStored
      • GameDesignPublicationTerminalEvidence.fromStored
      • this constructor

      GameDesignPublicationTerminalClient.read catches only IllegalArgumentException. A raw ArithmeticException then reaches the caller. On a receiver, it would map to an internal error instead of invalid input. Every other malformed-evidence path in this chain throws IllegalArgumentException. A PUBLISHED terminal for that epoch can never be valid, so reject it before the addition.

      🐛 Proposed fix

      --- "a/services/common-platform-core/src/main/java/net/firedevops/firemud/common/gamedesign/GameDesignPublicationTerminalEvidence.java"
      +++ "b/services/common-platform-core/src/main/java/net/firedevops/firemud/common/gamedesign/GameDesignPublicationTerminalEvidence.java"
      @@ -272,9 +272,11 @@
           }
           this.release = release == null ? null : ReleaseContent.fromStored(release.canonicalBytes());
           this.epoch = publicationVersionStateEpoch;
           if (release != null) {
      -      if (epoch <= 0
      -          || epoch != Math.addExact(operation.world().request().versionStateEpoch(), 1L)
      +      long frozenEpoch = operation.world().request().versionStateEpoch();
      +      if (epoch <= 0
      +          || frozenEpoch == Long.MAX_VALUE
      +          || epoch != frozenEpoch + 1L
                 || !Arrays.equals(
                     release.worldStartLocationEvidence().canonicalBytes(),
                     operation.world().canonicalBytes())) {
      

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

      • Accepted Minor valid malformed-evidence error classification: frozen Long.MAX_VALUE cannot yield a valid incremented publication epoch. Reject explicitly as IllegalArgumentException before arithmetic; retain full binding/release validation and add maximum-epoch regression.
  24. CLI Review 16 CompletedRuntime 3m 51s
    Found: 4 Accepted: 0/0/3 Routed: 0
    1. Use the unit. package prefix for the new unit tests.Trivial

      Two new tests under src/test/java/unit/... declare production packages. The other Account unit tests declare unit.net.firedevops.... If a package-based test filter or coverage filter is in use, these suites can be skipped silently.

      • services/account-service/src/test/java/unit/net/firedevops/firemud/accountservice/service/impl/RuntimeAccountIdentityGrpcServiceTest.java#L1-L1: change the package to unit.net.firedevops.firemud.accountservice.service.impl and import RuntimeAccountIdentityGrpcService.
      • services/account-service/src/test/java/unit/net/firedevops/firemud/accountservice/AccountUuidTextTest.java#L1-L1: change the package to unit.net.firedevops.firemud.accountservice and import AccountUuidText.
      • Accepted Align two new unit packages with Account unit test convention; public production classes allow explicit imports without visibility changes.
    2. Assert the specific trigger failure instead of any RuntimeException.Trivial

      This check exists to prove that account_tenant_authority_generation_consistency rejects a tenant generation advance without a matching source event. As written, any failure passes, including an unrelated SQL error or a fixture fault. Assert the trigger's message.

      -        .isInstanceOf(RuntimeException.class);
      +        .isInstanceOf(DataAccessException.class)
      +        .hasMessageContaining("Tenant authority generation advance lacks its canonical source event");
      
      • Accepted Assert owning jOOQ DataAccessException and exact V73 consistency-trigger message; unrelated SQL/fixture failures must not satisfy the physical regression.
    3. Remove --refresh-dependencies from the per-module Gradle check, and update its contract.Minor

      The matrix check now refreshes every dependency in every module job on every run. Each job loses dependency caching and contacts the remote repositories again, which raises CI cost and lets a repository outage fail required gates. A one-time cache clear (for example, a new setup-gradle cache key) fixes a stale cache without a permanent cost. As per path instructions, CI changes must address "cache correctness, duplication, and CI cost."

      • .github/workflows/ci.yml#L995-L995: change the command to ./gradlew :${{ matrix.module }}:check -PfullCheck. If you need a refresh option, add it only behind a manual workflow_dispatch input.
      • dev-tools/tests/ci-lightweight-scope-contract.sh#L246-L257: remove --refresh-dependencies from the expected run string so the contract matches the workflow.
      • Rejected Duplicate Hosted4224920463: old CI37847761035 and failed-job rerun failed existing dependency resolution; scoped refresh proved all five modules green in37851593234. Removing this demonstrated repair/cache replacement is unproved.
    4. Set a valid pointer snapshot digest so the non-committed case tests the outcome check.Trivial

      nonCommittedResponse omits admission_pointer_snapshot_digest. The CanonicalGameplayRosterOwnerReadEvidence constructor validates the digest format before requireProofMatches. The empty digest therefore causes the rejection, not the PENDING outcome. If the COMMITTED guard regresses on the codec path, this assertion still passes.

      💚 Proposed fix

                   .setPublishedPolicySetEvidence(
                       ByteString.copyFrom(evidence.publishedPolicySetEvidence().canonicalBytes()))
      +            .setAdmissionPointerSnapshotDigest(evidence.admissionPointerSnapshotDigest())
                   .build();
      
      • Accepted Add valid pointer digest so PENDING proof rejection exercises COMMITTED guard rather than earlier malformed-digest check.
  25. CLI Review 17 CompletedRuntime 3m 33s
    Found: 1 Accepted: 0/0/1 Routed: 0
    1. The generation == 1 && sourceVersion == 1 null path cannot produce a JOIN.Trivial

      readCurrentTenantSourceEvent returns null for the 1/1 baseline, and tenantSourceEvidenceMatches accepts null. After that, requireCurrentJoinEntitlement always rejects tenantSourceEvent == null. The readCurrent call before it already fails, because no entitlement row exists at generation 1, and V53/V73 prevent such a row.

      As a result:

      • The if (tenantSourceEvent != null) branch in membershipEventPreimage (Lines 388-402) is dead.
      • A 1/1 tenant is denied with the ENTITLEMENT_UNAVAILABLE message instead of the intended "exact current public-join entitlement evidence" message.

      Reject the 1/1 baseline explicitly in readCurrentTenantSourceEvent, and make the event non-null afterward. The tracker documents this denial.

      • Accepted Owned low-risk convergence: explicitly deny generation1/sourceVersion1 before entitlement lookup; eliminate unreachable nullable-source event/preimage path, preserve authentic current source and exact replay.
  26. CLI Review 18 CompletedRuntime 3m 15s
    Found: 1 Accepted: 0/0/0 Routed: 0
    1. Remove --refresh-dependencies from the per-module gate, or limit it to a scheduled or manual job.Trivial

      This flag makes Gradle ignore its cached dependency resolution. Gradle then checks the remote repositories again for every resolved module. This step runs once for each entry in the affected_modules matrix on every PR run. The result is higher CI time and more network egress. The required gate also becomes more exposed to registry outages and rate limits. The setup-gradle cache (cache-read-only: false) gives little benefit to this step.

      If the goal is to detect stale changing or dynamic dependencies, use a separate scheduled or workflow_dispatch job. The path instructions say to "focus on … cache correctness … and CI cost" and to "flag cases where a workflow becomes unnecessarily blocking".

      ♻️ Proposed change

      -          ./gradlew --refresh-dependencies :${{ matrix.module }}:check -PfullCheck
      +          ./gradlew :${{ matrix.module }}:check -PfullCheck
      

      Update the exact-string assertion in dev-tools/tests/ci-lightweight-scope-contract.sh in the same change.

      • Rejected Removing refresh reverses c5152a65f cache-repair. CI37847761035 common-saga failed resolving cached Spring Boot4.1.1 JDBC/Redis artifacts before the refresh repair; succeeding CI retained it. Generic egress savings do not prove equivalent cache correctness. No safe targeted replacement supplied.
  27. Hosted Review 5 CompletedRuntime 7m 32s
    Found: 1 Accepted: 0/0/0 Routed: 0
    1. Confirm tenant-generation mutation paths before enforcing the source requirement.Major

      The trigger requires every TENANT generation update to have a matching account_tenant_authority_source_records row. A tenant without a source record therefore cannot advance its generation. Confirm that all tenant-generation paths create and update the source record through AccountTenantAuthorityEventRepository.append, including suspension, billing, revocation, and existing AccountAuthorityGenerationRepository.advance callers.

      If any supported path updates tenant authority without that source record, this migration breaks it. In that case, either add the source-record flow to that path or limit the trigger to tenants with a source record.

      • Rejected Only TENANT update writer provisions and appends source in one transaction. V73 guards UPDATE, not enrollment INSERT; account/member writers use other scopes. Physical CI37861898079 proves missing-source denial. No suspension/revocation bypass exists; conditional enforcement weakens authority.
  28. CLI Review 19 CompletedRuntime 3m 15s
    Found: 1 Accepted: 0/0/0 Routed: 0
    1. Drop the forced --refresh-dependencies from the per-module Gradle check.Minor

      The workflow now runs ./gradlew --refresh-dependencies in every matrix module job. Each job therefore checks all dependency metadata against the remote repositories again instead of using the Gradle cache. This adds network time to every job, and a remote repository outage can now fail an otherwise green build. The contract script requires the exact flag, so the cost is locked in. If a stale cache was the reason, invalidate the cache key or add a manual workflow_dispatch toggle instead. As per path instructions: "Focus on workflow correctness, … cache correctness, duplication, and CI cost."

      • .github/workflows/ci.yml#L995-L995: remove --refresh-dependencies from the Run Gradle Checks command.
      • dev-tools/tests/ci-lightweight-scope-contract.sh#L246-L256: update the expected run string so it has no --refresh-dependencies.
      • Rejected Repeat of prior cache-removal suggestion: would reverse c5152a65f repair for actual common-saga missing Spring Boot4.1.1 artifacts in CI37847761035. No equivalent tested invalidation supplied; retain demonstrated cache-correctness repair.
  29. CLI Review 20 CompletedRuntime 3m 24s
    Found: 2 Accepted: 0/0/1 Routed: 0
    1. Move the shared fresh-graph fixtures out of this test class.Trivial

      WorldDraftTerminalReadGrpcCodecTest is now public and exposes freshGraphRequestForStartLocationEvidenceTest and committedFreshGraphReadbackForStartLocationEvidenceTest for other test classes. WorldPublishedStartLocationGrpcCodecTest.evidence() calls these helpers. PublishedRealmEntryPolicySetEvidenceTest.operation(...) calls WorldPublishedStartLocationGrpcCodecTest.evidence(). This creates a test-to-test dependency chain across three packages. A change to a private helper in one codec test can break unrelated policy-set and roster tests.

      Extract the fixture builders into a dedicated fixture class. The builders are freshGraphBinding, accountBinding, committedReadback, graphBytes, and receipt. An example class is net.firedevops.firemud.common.testing.AuthoringFixtures. Make each test class depend on that fixture class.

      • Accepted Shared fresh graph/published start fixtures are coupled through two JUnit classes across packages. Extract a dedicated test fixture and update direct consumers without altering assertions or production behavior.
    2. Drop --refresh-dependencies from the per-module Gradle check.Minor

      The workflow now forces Gradle to re-check every dependency against the remote repositories for every module in the matrix. This makes the setup-gradle cache much less useful. It adds network round trips to every required Build and Test job, and a repository outage then fails those jobs. The lightweight scope contract pins the exact command text, so the flag cannot be removed without updating the contract as well. These risks fall under the path instruction topics of "cache correctness" and "CI cost".

      • .github/workflows/ci.yml#L995-L995: run ./gradlew :${{ matrix.module }}:check -PfullCheck without --refresh-dependencies.
      • dev-tools/tests/ci-lightweight-scope-contract.sh#L246-L256: change the expected run string to the same command without --refresh-dependencies.

      If a stale cached artifact caused this change, use a cache-key bump or one scheduled refresh job instead.

      As per path instructions: "Focus on workflow correctness, permissions scope, secret handling, cache correctness, duplication, and CI cost."

      • Rejected Repeated unsafe removal: actual CI37847761035 failed missing Boot4.1.1 JDBC/Redis/sql/transaction artifacts under cached metadata. Commit c5152a65f refresh repaired it. No proven cache-correct replacement is supplied; retain required repair.
  30. Subagent Review 5 CompletedModel: gpt-6-luna · Xhigh
    Found: 0 Accepted: 0 Routed: 0
    1. No findings recorded for this run
  31. Subagent Review 6 CompletedModel: gpt-6-luna · Xhigh
    Found: 0 Accepted: 0 Routed: 0
    1. No findings recorded for this run
  32. CLI Review 21 CompletedRuntime 3m 07s
    Found: 0 Accepted: 0/0/0 Routed: 0
    1. No findings recorded for this run
  33. CLI Review 22 CompletedRuntime 4m 10s
    Found: 2 Accepted: 0/1/1 Routed: 0
    1. Assert the failure reason in assertResultRejected.Trivial

      assertResultRejected checks only IllegalArgumentException. Each negative test changes one property, but the mutation can also break a different invariant. One example is Lines 451-474, which test "graph without the selected room row". The mutation rewrites template_id on the ROOM row. The graph therefore no longer matches the draft revision payload, and the codec can reject it for that reason before it checks the room selector. If that happens, the test passes even when the selected-room check does not exist. Add an expected message fragment parameter and assert it with hasMessageContaining, or assert on the root cause. This makes each test prove the guard it names.

      • Accepted Test-only proof gap: generic exception assertions can pass for an earlier invariant. Bind negative cases to the intended rejection and correct selector fixture; production guards unchanged.
    2. Remove --refresh-dependencies from the per-module Gradle check, or document why each run needs it.Minor

      Every build-and-test matrix job now ignores cached dependency metadata and revalidates every dependency against the remote repositories. Each module job takes longer, and each required gate fails when a remote registry has a transient failure. The CI contract test also pins the flag, so both sites must change together.

      • .github/workflows/ci.yml#L995-L995: run ./gradlew :${{ matrix.module }}:check -PfullCheck without --refresh-dependencies. If a stale cache caused the change, fix the cache key or the specific dependency. If the flag must stay, add a comment above the step that explains the reason.
      • dev-tools/tests/ci-lightweight-scope-contract.sh#L249-L256: update the expected run string so that it matches the workflow command.

      As per path instructions: "Focus on workflow correctness, permissions scope, secret handling, cache correctness, duplication, and CI cost."

      • Accepted Partially accepted: retain dependency refresh required by evidenced stale negative cache, but document its bounded reason beside the workflow step; do not remove flag or weaken contract.
  34. Subagent Review 7 CompletedModel: gpt-6-luna · Xhigh
    Found: 1 Accepted: 1 Routed: 0
    1. Bind successful launch descriptor result to requested target version and patchMinor

      AuthoredWorldLaunchDescriptorEvidence constructor checks request digest/result shape but does not compare present request.targetVersionId or scriptPatchVersion to successful response. Correct production validator plus its existing unit tests; 101-file exception is currently test/comment-only so report exact delta before implementation.

      • Accepted Canonical version resolution requires selected target and permitted requested patch to match output. Existing constructor allows self-consistent contradictory evidence; no current runtime call sites limits immediate impact.
  35. Subagent Review 8 CompletedModel: gpt-6-luna · Xhigh
    Found: 0 Accepted: 0 Routed: 0
    1. No findings recorded for this run
  36. Subagent Review 9 CompletedModel: gpt-6-luna · Xhigh
    Found: 0 Accepted: 0 Routed: 0
    1. No findings recorded for this run
  37. Subagent Review 10 CompletedModel: gpt-6-luna · Xhigh
    Found: 0 Accepted: 0 Routed: 0
    1. No findings recorded for this run
  38. CLI Review 23 CompletedRuntime 4m 06s
    Found: 2 Accepted: 0/0/1 Routed: 0
    1. Do not make the dependency refresh permanent.Trivial

      The workflow now runs --refresh-dependencies for every module on every build to work around one cached failed lookup. The contract test then requires the flag. The extra metadata checks and network exposure therefore stay after the cache problem is gone.

      • .github/workflows/ci.yml#L991-L996: remove --refresh-dependencies and its comment. Clear the bad Gradle cache entry once instead, for example with a cache-key bump or a cache purge. Alternatively, refresh only on a retry after a resolution failure.
      • dev-tools/tests/ci-lightweight-scope-contract.sh#L246-L257: assert ./gradlew :${{ matrix.module }}:check -PfullCheck without the refresh flag.

      As per path instructions, workflows must be checked for "cache correctness, duplication, and CI cost."

      • Rejected Refresh repairs restored negative Boot4.1.1 metadata: CI37847761035, fix c5152a65f, explanation af682a951. Removing it lacks restored-cache success proof or an alternative invalidation repair; retain it until that evidence exists.
    2. Use insertion-ordered maps for the fresh-graph declaration.Trivial

      Map.of has an unspecified iteration order. The JDK randomizes that order for each JVM run. Lines 265-285 serialize the freshGraphDeclaration from Map.of. Line 330 embeds that serialized order into the World revision payload. DraftCommitBinding keeps the payload text exactly. The values below can therefore change from one JVM run to the next:

      • the binding digest
      • the World operation bytes
      • the graph digest
      • the receipt digest
      • every policy-set digest derived from startLocationEvidence()

      Current assertions compare values only within one run, so they still pass. This fixture describes itself as "exact" reusable evidence. If a test later pins a literal vector, that test will fail intermittently. Failures will also be hard to reproduce. The same problem applies to the nested familyCounts entries.

      ♻️ Proposed deterministic declaration

      -    String declaration =
      -        JSON.writeValueAsString(
      -            Map.of(
      -                "tenantId", TENANT_ID.toString(),
      -                "versionId", VERSION_ID.toString(),
      -                "startLocation",
      -                    Map.of(
      -                        "tenantId", TENANT_ID.toString(),
      -                        "versionId", VERSION_ID.toString(),
      -                        "roomTemplateId", ROOM_TEMPLATE_ID.toString()),
      -                "familyCounts",
      -                    List.of(
      -                        Map.of("family", "WORLD_DESIGN_AGGREGATE_TYPE_REGION", "count", 1),
      -                        ...)));
      +    var start = new java.util.LinkedHashMap<String, Object>();
      +    start.put("tenantId", TENANT_ID.toString());
      +    start.put("versionId", VERSION_ID.toString());
      +    start.put("roomTemplateId", ROOM_TEMPLATE_ID.toString());
      +    var counts = new java.util.ArrayList<Map<String, Object>>();
      +    for (var entry : List.of(
      +        Map.entry("WORLD_DESIGN_AGGREGATE_TYPE_REGION", 1),
      +        Map.entry("WORLD_DESIGN_AGGREGATE_TYPE_ZONE", 1),
      +        Map.entry("WORLD_DESIGN_AGGREGATE_TYPE_ROOM", 1),
      +        Map.entry("WORLD_DESIGN_AGGREGATE_TYPE_ROOM_EXIT", 0),
      +        Map.entry("WORLD_DESIGN_AGGREGATE_TYPE_GENERATION_RULE", 0),
      +        Map.entry("WORLD_DESIGN_AGGREGATE_TYPE_WORLD_ENTITY_SPAWN_BINDING", 0))) {
      +      var count = new java.util.LinkedHashMap<String, Object>();
      +      count.put("family", entry.getKey());
      +      count.put("count", entry.getValue());
      +      counts.add(count);
      +    }
      +    var root = new java.util.LinkedHashMap<String, Object>();
      +    root.put("tenantId", TENANT_ID.toString());
      +    root.put("versionId", VERSION_ID.toString());
      +    root.put("startLocation", start);
      +    root.put("familyCounts", counts);
      +    String declaration = JSON.writeValueAsString(root);
      
      • Accepted Make fresh-graph declaration fixture bytes deterministic with insertion-ordered maps while preserving exact values/list order. Existing AuthoringFixtures-owned path; bounded test-only correction pending.
  39. CLI Review 24 CompletedRuntime 3m 36s
    Found: 1 Accepted: 0/0/0 Routed: 0
    1. Avoid a permanent --refresh-dependencies on every matrix module check.Trivial

      --refresh-dependencies makes Gradle revalidate all dependency metadata and artifacts against remote repositories. This change applies it to every build-and-test matrix job on every run. The trigger was one cached negative resolution of Spring Boot 4.1.1 (CI 37847761035). The flag increases network time per job. It also makes every module job fail when a remote repository is slow or unavailable. The path instructions ask for attention to cache correctness and CI cost.

      Fix the stale cache entry once, for example by changing the Gradle cache key or clearing the affected cache entry. Then remove the flag. If you keep the flag, add a removal trigger to the comment. Update dev-tools/tests/ci-lightweight-scope-contract.sh at the same time, because it pins the exact command.

      ♻️ Proposed change

      -      # Cached negative Spring Boot 4.1.1 resolution requires metadata revalidation (CI 37847761035).
             - name: 🧪 Run Gradle Checks
               id: checks
               run: |
                 echo "::group::Run Module Validation"
      -          ./gradlew --refresh-dependencies :${{ matrix.module }}:check -PfullCheck
      +          ./gradlew :${{ matrix.module }}:check -PfullCheck
                 echo "::endgroup::"
      

      As per path instructions: "Focus on workflow correctness, permissions scope, secret handling, cache correctness, duplication, and CI cost."

      • Rejected Repeat of the rejected cache-refresh suggestion: removal would undo the evidenced restored-cache CI repair (37847761035). No passing restored-cache proof or verified replacement invalidation is supplied.

Routed Findings

0 Open0 Accepted/Fixed0 Rejected

No routes recorded

Unlinked items

no items unlinked