FireMUD Delivery Status

PR data refreshed

PR #3154 review history

Review rounds

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

Hosted CodeRabbit6 completed
4/4/03/3/02/1/01/1/02/2/0
CLI CodeRabbit7 completed
6/4/04/3/03/0/02/0/01/0/0

Recorded review history

Reviews and findings

  1. Hosted Review 1 CompletedRuntime 12m 07s
    Found: 6 Accepted: 6 Routed: 0
    1. Remove the unused private helpers.Trivial

      PMD reports these as unused: key, parseCanonicalUuid, object, requireBoundedText, parsePositive, parseNonnegative, canonicalize, and the EVENT_DIGEST constant (Line 53). Line 468 also has an orphaned Javadoc above the real canonicalProjectionPair Javadoc. In a fail-closed authority class, dead validators suggest checks that never run.

      • Accepted Verified all listed private helpers/constants orphaned; remove dead validators and orphan Javadoc, preserving active validation.
    2. Reject non-v4 Account UUIDs before creating PENDING.Minor

      beginPendingForAccount rejects only the nil UUID, and V147 permits any non-nil account_uuid. Recovery, token fences, authority projection, and Redis projection reads require UUIDv4. An explicitly supplied non-v4 Account UUID can therefore create PENDING state and fail later in the LOGIN flow.

      V29 generates v4 UUIDs by default, but its schema does not enforce the v4 format. Keep the downstream v4 checks and reject the value at the issuance boundary.

         Objects.requireNonNull(accountId, "Account UUID is required");
      -  if (accountId.equals(new UUID(0L, 0L))) {
      -    throw new IllegalArgumentException("A non-nil Account UUID is required");
      +  if (accountId.equals(new UUID(0L, 0L))
      +      || accountId.version() != 4
      +      || accountId.variant() != 2) {
      +    throw new IllegalArgumentException("Canonical Account UUIDv4 is required");
         }
      

      📍 Affects 5 files

      • services/account-service/src/main/java/net/firedevops/firemud/accountservice/repository/AccountGameplayDelegationResponseEnvelopeRepository.java#L645-L650 (this comment)
      • services/account-service/src/main/java/net/firedevops/firemud/accountservice/dto/AccountGameplayTokenIdentityFence.java#L47-L56
      • services/account-service/src/main/resources/db/migration/V151__account_gameplay_token_identity_fences.sql#L20-L20
      • services/account-service/src/main/java/net/firedevops/firemud/accountservice/service/session/AccountGameplayDelegationAuthorityProjection.java#L459-L466
      • services/account-service/src/main/java/net/firedevops/firemud/accountservice/service/session/AccountGameplayDelegationRedisClient.java#L604-L608
      • Accepted Valid non-v4 pending intake gap in IssuanceRepository despite mislocated anchor; add UUID version/variant validation before owner reads and state.
    3. Equalize credential-verification work for unknown emails.Minor

      When this owner is activated with the existing password/OTP authority, an unknown email returns before AccountGameplayCredentialRequestDigester.bind and CredentialVerifier.verify. A known email performs that work. This timing difference can expose whether an Account exists.

      Run an equal-cost dummy verification for unknown emails. Do not create or mutate an Account or OTP challenge. The existing authenticateForGameplay path also returns before credential verification, so it does not provide equalization.

      • Accepted Same valid absent-Account timing gap as CLI1 finding7; run same protected digest binding and mandatory decoy credential hook, always denying without Account/OTP writes.
    4. 🚀 Performance & Scalability | 🔵 Trivial

      Every gameplay LOGIN capture holds one global row lock until commit.

      allocateSourceFence updates the singleton row account_gameplay_auth_evidence_source_fence. The row lock stays held until the capture transaction commits, and that transaction includes the full V148/V155 insert trigger. As a result, captures for all accounts run one at a time. Before activation, measure capture latency under concurrent load. Alternatively, derive the fence from a sequence, or scope the allocator so that the monotonic contract holds without one global writer.

      • Accepted Same valid allocator limit as CLI1 finding8; preserve strict global fence and record serialization plus required preactivation measurement.
    5. Add a TRUNCATE guard for the token fence table.Minor

      The trigger forbids DELETE "so retention cannot be bypassed", but TRUNCATE account_gameplay_token_identity_fences skips row triggers. A truncate removes every fence. A later re-registration would then create new ACTIVE rows for previously revoked tokens. The sibling tables (V147, V148, V149) all add a BEFORE TRUNCATE guard.

      Proposed addition

       CREATE TRIGGER account_gameplay_token_identity_fence_guard
       BEFORE INSERT OR UPDATE OR DELETE ON account_gameplay_token_identity_fences
       FOR EACH ROW EXECUTE FUNCTION account_gameplay_token_identity_fence_guard();
      +CREATE FUNCTION account_gameplay_token_identity_fence_no_truncate()
      +RETURNS TRIGGER LANGUAGE plpgsql AS $$
      +BEGIN
      +    IF EXISTS (SELECT 1 FROM account_gameplay_token_identity_fences) THEN
      +        RAISE EXCEPTION 'Account token fence retention cannot be bypassed by truncation' USING ERRCODE = '23514';
      +    END IF;
      +    RETURN NULL;
      +END;
      +$$;
      +CREATE TRIGGER account_gameplay_token_identity_fence_no_truncate
      +BEFORE TRUNCATE ON account_gameplay_token_identity_fences
      +FOR EACH STATEMENT EXECUTE FUNCTION account_gameplay_token_identity_fence_no_truncate();
      

      Ship this change as a new forward migration if V151 has already been applied in any environment.

      • Accepted Valid statement-level retention gap; preserve published V151 and add forward V157.1 plus physical retained-fence rejection proof.
    6. Add a reconsideration trigger.Minor

      The entry records pending artifact qualification and CI evidence, but not when to review its retention. Add a trigger tied to verification of the exact candidate’s artifacts and terminal CI result.

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

      • Accepted Same valid observation trigger as CLI1 finding4; fix retains artifact and CI qualification separately.
  2. CLI Review 1 CompletedRuntime 3m 09s
    Found: 8 Accepted: 1/6/1 Routed: 0
    1. Assert the specific stale-projection failure, not any IllegalStateException.Minor

      This test checks that a source change after the Redis readback prevents the observation from being returned. The assertion accepts any IllegalStateException. That includes an unrelated failure in fixture wiring or in the mocked collaborators, so the test can pass without the post-readback recheck ever running. The sibling tests assert ProjectionUnavailableException or StaleProjectionException. Assert the exact exception type that the post-readback recheck throws.

      🧪 Proposed assertion

             assertThatThrownBy(
                     () -> fixture.projection.observeSelectedCurrent(ACCOUNT_ID, fixture.tenant))
      -          .isInstanceOf(IllegalStateException.class);
      +          .isInstanceOf(
      +              AccountGameplayDelegationAuthorityProjection.StaleProjectionException.class);
      
      • Accepted Post-Redis source inconsistency is ProjectionUnavailableException; assert exact type and verify second owner read rather than any IllegalStateException.
    2. The singleton source-fence allocator serializes every new evidence capture across all Accounts.Trivial

      allocateSourceFence updates the one allocator_id = TRUE row. The V148 insert trigger then locks the same row FOR UPDATE. The lock is held until the caller's Account transaction commits. Every first-time capture across every Account therefore waits on one row lock. That includes the work done after capture in the same transaction, such as signing-identity reads and binding. The behavior is correct. However, it puts a global serialization point on the gameplay LOGIN preparation path. The UNIQUE (source_fence) monotonic contract may need this point. If so, record the throughput limit before activation. Otherwise, consider a per-Account fence or a PostgreSQL sequence. A sequence also needs a gap-tolerant contract.

      • Accepted Current global allocator deliberately serializes captures; record throughput limit and preactivation measurement without altering fence semantics.
    3. Name the owning capability row for the new LOGIN source intake.Minor

      The other preparation subsections state their owner. For example, "This preparation is owned by AA-1.3 in Capability Status". This subsection does not name its owner. The AA-2.1 row (gameplay login) also does not list the new production anchors or focused proof anchors. Examples are AccountGameplayCanonicalLoginOwner, AccountGameplayDelegationIssuanceRepository, and V147–V157. Readers who scan the status table cannot find this slice. State the owning capability and keep its row aligned. The partial / drift-found state does not change.

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

      • Accepted Initial private LOGIN intake belongs AA-2.1; add source/proof anchors without upgrading partial status.
    4. Stub preflight for every input so that the owner's own comparison is tested.Minor

      assertRejectedBeforeActivation stubs preflightCommittedRecovery only for (REQUEST_ID, ACCOUNT_ID, CALLER). In each mismatch case the caller passes different arguments. The mock therefore returns null, and the owner fails on the missing preflight. The comparison between the preflight fields and the requested requestId, accountId, workload, and context ID never runs. The test passes even if that comparison is removed. Return the fixed preflight for any arguments, so that the owner must reject the mismatch itself.

      🧪 Proposed fixture change

      -    when(responseEnvelopes.preflightCommittedRecovery(REQUEST_ID, ACCOUNT_ID, CALLER))
      -        .thenReturn(preflight());
      +    when(responseEnvelopes.preflightCommittedRecovery(any(), any(), any()))
      +        .thenReturn(preflight());
      
      • Accepted Argument-specific stub returned null on mismatches; broad stub forces owner identity checks.
    5. Unknown emails fail faster than known emails and expose Account existence through timing.Minor

      An unknown email fails at findByEmail(...).orElseThrow(invalidCredentials). It fails before the digest-key read, the HMAC binding, and credentialVerifier.verify run. A known email always pays the cost of those steps, including the password or OTP hash. A pre-auth caller can therefore distinguish registered emails by response latency, even though both cases return INVALID_CREDENTIALS. Run an equivalent dummy verification on the absent-Account branch, for example against a fixed decoy password hash, before you return the denial.

      Sketch

      -    Account found =
      -        accounts
      -            .findByEmail(normalizedEmail)
      -            .orElseThrow(AccountGameplayCanonicalLoginOwner::invalidCredentials);
      +    Optional<Account> maybeFound = accounts.findByEmail(normalizedEmail);
      +    if (maybeFound.isEmpty()) {
      +      credentialVerifier.verifyDecoy(request.credential()); // constant-cost, always denies
      +      throw invalidCredentials();
      +    }
      +    Account found = maybeFound.orElseThrow();
      
      • Accepted Absent Account bypasses credential cost; require decoy verification hook before unchanged denial, with no issuance or activation.
    6. Select the pending-registration descriptor by ID, not by iteration order.Minor

      descriptors().iterator().next() assumes that the first contributed descriptor is the pending-registration script. The contribution also declares the activation, issuer-projection, tenant-projection, and membership-projection scripts. If a different descriptor is first, the catalog built from the altered descriptor contains no SCRIPT_ID. registerPending then fails with a script-lookup error, not a digest mismatch. The test still passes, because it only asserts AccountCoordinationRedisException and no connection use. Filter by AccountGameplayDelegationRedisClient.SCRIPT_ID, as AccountGameplayDelegationRedisClientTest already does.

      🧪 Proposed selection

           RedisScriptDescriptor descriptor =
      -        new AccountGameplayDelegationRedisScriptContribution().descriptors().iterator().next();
      +        new AccountGameplayDelegationRedisScriptContribution()
      +            .descriptors().stream()
      +                .filter(
      +                    item -> AccountGameplayDelegationRedisClient.SCRIPT_ID.equals(item.scriptId()))
      +                .findFirst()
      +                .orElseThrow();
      
      • Accepted Descriptor iteration can target another script; select pending script ID and preserve mismatch proof.
    7. Add the required reconsideration trigger to the new observation.Minor

      The entry says that exact artifact qualification and CI completion are still pending. The file rules say that a retained entry must record "the reason and reconsideration trigger." The entry has a status line but no trigger. Without a trigger, stewardship cannot tell when the entry can be removed.

      Proposed addition

         - Current status: the six distinct workflow watchers are stopped and the correction is recorded in the SQL job brief. Exact artifact qualification and CI completion remain separate evidence, not inferred from historical green runs.
      +  - Reconsideration trigger: revisit after a single quota-aware observer completes exact-head artifact qualification and CI completion without a rate-limit error, or after the controller supplies a shared consolidated watcher.
      

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

      • Accepted Retained concurrent-watcher observation needs explicit stewardship reconsideration trigger.
    8. registerPending runs without an Account transaction, but its repository read requires one.Major

      AccountGameplayDelegationIssuanceCommitService.commitPendingCandidate rejects any active transaction. It then calls tokenRegistry.registerPending(requestId). That method calls issuanceRepository.readPendingRegistryCandidate. The read reaches two calls that each check TransactionSynchronizationManager directly:

      • readCurrentAuthority → tokenIdentityFences.lockAccountForUpdate → requireTransaction().
      • requireCurrentEvidenceBundle → captureAndPersist → requireWritableAccountTransaction().

      Both throw IllegalStateException when no writable transaction is active. Only a Spring transactional proxy around the issuance repository supplies one, through @Transactional(REQUIRED). The repository is also constructed with new in places, for example the response-envelope repository's 4-arg constructor. The cut also has no Spring composition. If the eventual composition passes an unproxied instance, every first LOGIN commit fails with a fail-closed AUTH_UNAVAILABLE. Open an explicit TransactionTemplate inside registerPending around the SQL read, and close it before the Redis call. This removes the dependency on proxying.

      Sketch

      -    PendingRegistryCandidate candidate = issuanceRepository.readPendingRegistryCandidate(requestId);
      +    PendingRegistryCandidate candidate =
      +        accountTransaction.execute(
      +            status -> issuanceRepository.readPendingRegistryCandidate(requestId));
      +    if (candidate == null) throw new IllegalStateException("Pending candidate unavailable");
      

      Verify the following: in the integration test for commitPendingCandidate, is issuanceRepository a Spring proxy, or does the call to registerPending run inside a transaction?

      • Accepted Plain repository construction requires explicit Account transaction for pending read, ending before Redis; preserve ambient rejection and null fail-closed.
  3. CLI Review 2 CompletedRuntime 3m 40s
    Found: 3 Accepted: 1/2/0 Routed: 0
    1. Add the required Expected pattern field to the new observation.Minor

      The 2026-10-13 entry has Context, Observation, Current status, and Reconsideration trigger. It has no Expected pattern line. The file's entry format requires that field. The other entries kept here as reusable observations also include it. Without that line, the entry does not say which repeatable rule or fixture diagnostic should change, so it reads as an incident log rather than a reusable observation.

      Proposed fix

         - Observation: Docker daemon availability and a started-container event do not prove a fixture’s JDBC endpoint remains reachable; the failure cause and responsible lifecycle are unknown. These connection errors do not establish failed product assertions.
      +  - Expected pattern: classify connection-refused fixture errors separately from assertion failures, capture container state and port mapping at the failing case, and do not count those cases as executed physical proof.
         - Current status: preserve the failed proof and diagnose the endpoint/container lifecycle; the separately running composed #3125 gate remains owned.
      

      As per coding guidelines: "Entry format: - YYYY-MM-DD: short title - Context … - Observation … - Expected pattern: what should happen instead", and "Prefer logging reusable observations that suggest a better repo rule, CI guard, design refinement, or shared implementation pattern."

      • Accepted Reusable observation needs Expected pattern; add diagnostic rule and verified fresh child/exact-parent outcome, preserving unknown cause.
    2. Fix the AA-2.1 anchor cells: remove the tracker-section link and correct the separators.Minor

      The implementation-anchor cell lists [V147–V157 source intake](#initial-private-gameplay-login-issuance-source-intake). That link points to a tracker section, not to production code. The guideline requires production anchors to stay outside documentation-only surfaces. Replace the link with the real migration files, for example V147__account_gameplay_delegation_issuance.sql through V157.1__account_gameplay_token_fence_truncate_guard.sql.

      Both anchor cells also have broken separators. [game-session-service build](...) is followed by two spaces and no ;, and the cell ends with a trailing ;. The proof-anchor cell has the same problem after [V34.3 PostgreSQL fixture](...). Anchor validators that split on ; can merge or mis-parse those entries.

      Proposed fix (implementation cell excerpt)

      -[game-session-service build](../../../services/game-session-service/build.gradle.kts)  [AccountGameplayCanonicalLoginOwner.java](...); [AccountGameplayDelegationIssuanceRepository.java](...); [V147–V157 source intake](#initial-private-gameplay-login-issuance-source-intake); |
      +[game-session-service build](../../../services/game-session-service/build.gradle.kts); [AccountGameplayCanonicalLoginOwner.java](...); [AccountGameplayDelegationIssuanceRepository.java](...); [V147](../../../services/account-service/src/main/resources/db/migration/V147__account_gameplay_delegation_issuance.sql); [V157.1](../../../services/account-service/src/main/resources/db/migration/V157.1__account_gameplay_token_fence_truncate_guard.sql) |
      

      As per coding guidelines: "Evidence targets must be repository-local and resolvable: … production anchors stay outside test-only and documentation-only surfaces."

      • Accepted AA2.1 must link production migration files, not tracker prose; repair semicolon-separated anchor cells.
    3. Projection publication fails permanently after any sequence gap.Major

      requireSuccessorOf accepts only two cases:

      • A missing key (prior == null) when sequence() == 1.
      • An existing key when the sequence is exactly prior.sequence() + 1.

      Its only caller is AccountGameplayDelegationRedisClient.publishProjections (lines 536-540). That method receives only the latest owner snapshot from AccountGameplayDelegationAuthorityProjection.readSelectedSnapshot. Nothing in this change replays the intermediate tenant or membership events. Three realistic states therefore block publication with no recovery path:

      • Shared tenant key. session:auth:generation:tenant:<tenantId> is shared by all members of a tenant. It is first published after the tenant stream has passed sequence 1, for example after entitlement provisioning plus a billing event.
      • Two events between publications. Two or more tenant or membership events commit between two publications.
      • Redis loss or cluster reset. All keys are missing, but the current sequences are above 1.

      In each case every later publishSelectedCurrent call throws AccountCoordinationRedisException. The descriptors' tailLossBehavior says "reapply exact Account … events without sequence gaps", but no code applies those events. The deny state is fail-closed, but it does not recover: selected gameplay use stays denied until someone intervenes by hand.

      Correct this in one of two ways:

      • Add an owner-side publisher that reads the retained outbox events from prior.sequence() + 1 up to the current head and applies each one through the CAS.
      • Define an authoritative rebuild rule for a missing key (for example, accept the exact current head when the key is absent and the owner snapshot is locked), and document it in the descriptor.

      Confirm whether a gap-free replay publisher is planned before selected publication is activated. If it is not, decide whether rebuilding a missing key from the current head is an acceptable substitute.

      • Accepted Rootd19c scope decision: exact retained tenant/member replay through captured head belongs to3154 passive source. Preserve contiguous CAS, historical sourceVersion and currentness reread; prove gaps, initialseq>1 andRedisloss.
  4. CLI Review 3 CompletedRuntime 3m 29s
    Found: 6 Accepted: 3/1/0 Routed: 0
    1. Confirm which owner publishes the issuer/Account projections before LOGIN commit observes them.Major

      commitPendingCandidate calls authorityProjection.observeCurrent(proof.accountId()). Through readProjections, that call fails when either Redis key is absent (boundedProjection(null)). It also fails when the stored bytes differ from the projection derived from current SQL.

      AccountGameplayCanonicalLoginOwner.authenticate never calls publishCurrent. No collaborator in this cut republishes after an Account authority change. Two cases follow:

      • A new Account with no published session:auth:generation:account:<id> key fails every initial LOGIN with IssuanceCommitUnavailableException.
      • After any authority advance, LOGIN fails until some owner republishes.

      Identify the owner that keeps these projections current, and the trigger that runs it. If no such owner exists, call authorityProjection.publishCurrent(accountId) before observeCurrent in this flow. Publishing is outside any SQL transaction and is idempotent, so it is safe here.

      • Accepted No owning source flow publishes issuer/Account projections before commit observes them. Publish, exact-compare result and preserve transaction fencing.
    2. Verify that @AfterAll cleanup cannot fail when the Docker assumption skips the class.Minor

      When neither Redis URI is set and Docker is unavailable, assumeTrue at Line 192 aborts @BeforeAll before POSTGRES.start() runs. JUnit Jupiter still runs @AfterAll methods after an aborted @BeforeAll. stopPhysicalFixtures then calls POSTGRES.stop() on a fixture that never started.

      If AccountPostgresIntegrationFixture.stop() throws on an unstarted fixture, the intended skip becomes a class failure. That breaks local full-check runs with Docker disabled. The repository AI observations already describe that workflow.

      Confirm that AccountPostgresIntegrationFixture.stop() is a no-op when start() never ran. If it is not, guard the call:

      Proposed guard

      +  private static boolean postgresStarted;
       ...
      -    POSTGRES.start();
      +    POSTGRES.start();
      +    postgresStarted = true;
         }
       
         @AfterAll
         static void stopPhysicalFixtures() {
      -    POSTGRES.stop();
      +    if (postgresStarted) POSTGRES.stop();
      
      • Rejected Fixture.stop() checks started before container.stop(); skipped BeforeAll is already safe. No redundant flag needed.
    3. Align the proof-status statement with the tracker and the Runtime & Data document.Minor

      Line 57 states that "physical Redis/PostgreSQL ... remain unproved". The linked tracker records fresh exact-head Account CI at f9922f2b6c59b836c730bcb47100719c3498dbe0. That run executed 207 PostgreSQL/Redis integration cases with zero failures, errors, or skips. runtime-and-data.md Line 11 also says that "Bounded test-owned physical Redis and PostgreSQL execution is recorded in the tracker".

      These canonical documents now contradict each other. State that bounded test-owned physical fixture proof exists. Then keep the remaining gaps: deployed ACL/TLS, caller authorization, gameplay admission, and runtime activation.

      Proposed wording

      -The initial private gameplay LOGIN owner, signer, registry, and response-recovery code is present as unregistered Account source, with focused proof sources. This does not add or activate an API, proto method, or Spring composition; the source has no caller-selected profile or property override, and physical Redis/PostgreSQL, caller authorization, gameplay admission, and runtime activation remain unproved.
      +The initial private gameplay LOGIN owner, signer, registry, and response-recovery code is present as unregistered Account source, with focused proof sources and bounded test-owned physical Redis/PostgreSQL fixture proof recorded in the tracker. This does not add or activate an API, proto method, or Spring composition; the source has no caller-selected profile or property override, and deployed ACL/TLS and authority custody, caller authorization, gameplay admission, and runtime activation remain unproved.
      

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

      • Accepted API status contradicts fresh bounded PG/Redis fixture proof. Align status while retaining deployed custody/auth/admission/activation gaps.
    4. Require TLS on the Coordination Redis client that sends ACL credentials.Major

      initialize builds a RedisStandaloneConfiguration with the account_coord_app username and password. It then uses LettuceClientConfiguration.builder() without useSsl(). Lettuce therefore sends AUTH and all projection traffic in plaintext.

      The pinned AccountGameplayDelegationRedisClient relies on an external provider for "Endpoint/TLS/ACL provisioning". This helper has no TLS option at all, so a caller cannot get an encrypted connection.

      Verify that the Coordination Redis deployment contract requires TLS. If it does, enable useSsl() with peer verification, or accept the already-protected connection provider instead of building a factory here.

      Possible fix

           LettuceClientConfiguration clientConfiguration =
      -        LettuceClientConfiguration.builder().commandTimeout(COMMAND_TIMEOUT).build();
      +        LettuceClientConfiguration.builder()
      +            .useSsl()
      +            .and()
      +            .commandTimeout(COMMAND_TIMEOUT)
      +            .build();
      
      • Accepted Plaintext factory initialize and InitializedClient have zero callers. Remove unused credential-bearing initializer instead of inventing TLS wiring; active pinned-provider custody remains unproved.
    5. Verify the JSON type of the accountSecurityCutoff values in the selected tuple.Minor

      The selected tuple encodes every generation explicitly as a decimal string with Long.toString(...). The cutoff values are different: cutoff.accountAuthorityGeneration() and cutoff.outboxSequence() go into the map without conversion.

      V153 states that tuple generations are "protocol decimal strings, not JSON numbers". The V153/V157 guards also build accountSecurityCutoff with quoted values. If these accessors return long, the selected canonical tuple contains JSON numbers. It then diverges from the delegation-profile tuple for the same Account.

      Confirm the accessor types. If they return long, wrap them with Long.toString(...).

      • Rejected AccountSecurityCutoff accessors are String (common-platform-core codec); existing canonical tuple already uses protocol decimal strings.
    6. Confirm that every persisted Account UUID is version 4 (random UUID).Major

      beginPendingForAccount rejects any Account UUID whose version is not 4. The same rule appears in other places:

      • V151 account_gameplay_token_identity_shape
      • AccountGameplayDelegationResponseEnvelopeRepository.requireV4ForRecovery
      • AccountGameplayDelegationAuthorityProjection.requireAccountId

      AccountAuthEvidenceBundle.UUID_TEXT deliberately accepts versions 1–8 for accountId. That suggests the producer may emit other versions. Accepted provenances include ACCOUNT_DATABASE_INSERT. If that path or the V29 backfill can produce a non-v4 UUID (for example, PostgreSQL 18 uuidv7()), gameplay LOGIN fails for those Accounts.

      The failure is an IllegalArgumentException after credential verification, inside the owner transaction. Affected Accounts cannot log in at all. Verify the UUID generator for every accepted provenance. If non-v4 values can exist, relax all the version-4 checks together. Otherwise, document the v4 invariant at the Account producer.

      • Accepted Existing V29 backfill/database default use gen_random_uuid and repository uses UUID.randomUUID. Clarify generator provenances without changing immutable migrations/guards.
  5. Hosted Review 2 CompletedRuntime 9m 18s
    Found: 4 Accepted: 1/2/1 Routed: 0
    1. Remove the claim that physical Redis/PostgreSQL proof is unproved.Minor

      This note says "physical Redis/PostgreSQL ... remain unproved". The tracker it links to records fresh exact-head Account CI with 207 PostgreSQL/Redis integration cases and zero skips. runtime-and-data.md Line 11 says bounded test-owned physical Redis and PostgreSQL execution is recorded. The two architecture documents now contradict each other.

      Change this sentence to match runtime-and-data.md. Physical execution is bounded fixture proof. Caller authorization, gameplay admission, deployed ACL/TLS, and runtime activation remain unproved.

      As per path instructions, "Flag ... conflicts between architecture docs".

      📝 Proposed wording

      -... the source has no caller-selected profile or property override, and physical Redis/PostgreSQL, caller authorization, gameplay admission, and runtime activation remain unproved.
      +... the source has no caller-selected profile or property override. Bounded test-owned physical Redis/PostgreSQL execution is recorded in the tracker; deployed ACL/TLS, caller authorization, gameplay admission, and runtime activation remain unproved.
      
      • Accepted API physical-proof status contradicts recorded bounded fixture execution; preserve deployed custody/authorization/admission gaps.
    2. Replay pays one full Redis round trip per retained event.Trivial

      Each publishSelectedAuthorityEvent call does all of the following:

      • re-reads the Lua source from the classpath
      • re-hashes the script with SHA-256 and SHA-1
      • opens a new pinned connection
      • runs ACL WHOAMI and SCRIPT LOAD
      • runs one CAS
      • blocks on one WAITAOF
      • reads the key back

      After Redis loss, replay starts at sequence 0. A stream with N retained events therefore costs N connections and N WAITAOF waits. The 130-event test runs 130 durability waits. Replay latency grows linearly with history length and with the AOF timeout.

      Read and verify the script once per replay. Apply each page on one pinned connection. Issue one WAITAOF and one readback per page instead of per event. Keep the per-event CAS so ordering and the predecessor check do not change.

      • Accepted Bounded page replay can share one pinned connection/durability/readback while preserving each predecessor CAS and failclosed partial-page recovery.
    3. Publish the authority projection before observing it.Major

      AccountGameplayCanonicalLoginOwner.authenticate reaches commitPendingCandidate after the preparation transaction. The commit method registers the pending token, then calls authorityProjection.observeCurrent(proof.accountId()), but no production Account path calls publishCurrent. When Redis lacks the projection, LOGIN can fail after signing and pending registration. Call publishCurrent before observeCurrent and use its returned publication result before continuing.

      • Accepted Publish exact owner-derived issuer/Account projections before observing and compare returned evidence; keep final SQL fences.
    4. Add V157.1 to the migration range in the source-intake paragraph.Minor

      Line 17 lists "V147–V157 migrations". The AA-2.1 row on Line 120 also anchors V157.1__account_gameplay_token_fence_truncate_guard.sql, which the PR describes as a required forward migration. The narrative should match the status row. It should also say whether the exact-head CI proof at f9922f2b6c59b836c730bcb47100719c3498dbe0 includes V157.1, or whether V157.1 needs its own scoped proof, as the replay repair does.

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

      • Accepted Include forwardV157.1 in intake narrative and qualify actual executed fixture proof.
  6. CLI Review 4 CompletedRuntime 4m 18s
    Found: 4 Accepted: 0/1/2 Routed: 0
    1. Check that @AfterAll cannot turn a Docker skip into a class error.Minor

      If Docker is unavailable and no URIs are configured, assumeTrue in startPhysicalFixtures aborts before POSTGRES.start() runs. JUnit still runs @AfterAll, and stopPhysicalFixtures then calls POSTGRES.stop() on a fixture that never started. If AccountPostgresIntegrationFixture.stop() throws in that state, the class reports an error instead of a skip. That error breaks the local full-check workflow without Docker, which is a documented supported mode.

      Confirm that AccountPostgresIntegrationFixture.stop() does nothing when start() never ran. If it can throw, add a started flag.

      🛡️ Proposed guard

      +  private static boolean postgresStarted;
       ...
      -    POSTGRES.start();
      +    POSTGRES.start();
      +    postgresStarted = true;
         }
      
         @AfterAll
         static void stopPhysicalFixtures() {
      -    POSTGRES.stop();
      +    if (postgresStarted) POSTGRES.stop();
      
      • Rejected Duplicate prior rejected cleanup finding: AccountPostgresIntegrationFixture.stop() checks started before stopping; an aborted BeforeAll already leaves safe no-op.
    2. Add the gameplay LOGIN source-intake gaps to the AA-2.1 "Gap or decision" cell.Minor

      Line 122 adds new implementation anchors to the row: AccountGameplayCanonicalLoginOwner, AccountGameplayDelegationIssuanceRepository, V147, and V157.1. It also adds two proof anchors. The "Gap or decision" cell was not updated. It still describes only Game Session admission, the migration driver, and actor-entry gaps.

      The remaining LOGIN gaps appear only in the narrative at Lines 13–23:

      • No runtime registration or caller authentication.
      • No deployed ACL/TLS or signer-key custody proof.
      • No timing-parity proof for the missing-Account decoy verification.
      • The singleton source-fence allocator throughput limit.

      A reader who scans only the status row cannot see these gaps. Add one sentence to the gap cell that names them and links to [Initial private gameplay LOGIN issuance source intake](#initial-private-gameplay-login-issuance-source-intake).

      As per coding guidelines: "Every row links canonical design, records the most relevant secondary tracker handoffs, and states the remaining gap or decision" and "Keep its status, implementation record, validation, gaps, decisions, and service-map sections aligned when a domain boundary changes".

      • Accepted AA-2.1 gap cell omits the initial LOGIN gaps linked in its own anchors; add concise linked status without duplicating normative contract.
    3. Define the Game Session workload identity pattern once and reuse it.Trivial

      The exact ^spiffe://firemud/ns/[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?/sa/game-session-service$ regex is copied into six Java classes. It also appears in the V147 account_gameplay_delegation_caller_check constraint. This pattern is a security boundary: it decides which caller can request a gameplay delegation token. The copies match today. If one copy changes and the others do not, the Java checks will accept different callers than the SQL checks, or reject callers they should accept.

      Add one precompiled Pattern constant, for example GameSessionAccountDelegationProfile.CALLER_WORKLOAD_PATTERN, and reference it from every Java site. Some sites call String.matches(...), which also recompiles the regex on every call. The shared constant removes that cost. Keep the SQL constraint unchanged. A unit test can assert that the constraint text and the Java pattern stay equal.

      • services/account-service/src/main/java/net/firedevops/firemud/accountservice/service/session/AccountGameplayCredentialRequestDigester.java#L87-L93: replace the inline workload.matches(...) with the shared Pattern.
      • services/account-service/src/main/java/net/firedevops/firemud/accountservice/dto/AccountAuthEvidenceBundle.java#L50-L52: replace the local WORKLOAD pattern with the shared constant.
      • services/account-service/src/main/java/net/firedevops/firemud/accountservice/repository/AccountAuthEvidenceBundleRepository.java#L45-L47: replace the local GAME_SESSION_WORKLOAD pattern with the shared constant.
      • services/account-service/src/main/java/net/firedevops/firemud/accountservice/repository/AccountGameplayDelegationIssuanceRepository.java#L2072-L2077: replace the inline callerWorkload.matches(...) in PendingIntent with the shared constant.
      • services/account-service/src/main/java/net/firedevops/firemud/accountservice/repository/AccountGameplayDelegationResponseEnvelopeRepository.java#L55-L57: replace the local GAME_SESSION_WORKLOAD pattern with the shared constant.
      • services/account-service/src/main/java/net/firedevops/firemud/accountservice/service/session/AccountGameplayCanonicalLoginOwner.java#L246-L250: replace the inline workload.matches(...) in requireRequest with the shared constant.
      • Accepted Six identical caller-workload regex copies can drift. Reuse one precompiled constant at the existing delegation profile; preserve exact grammar, null guards and immutable V147 SQL.
    4. Check the fourth constructor argument of AccountGameplayDelegationRedisClient.Trivial

      This helper passes AccountGameplayDelegationAuthorityProjection.MAX_PROJECTION_BYTES as the fourth argument. Every other construction site passes the registry-record bound:

      • GameSessionAccountDelegationProfile.MAX_REGISTRY_RECORD_BYTES in AccountGameplayDelegationIssuancePersistenceIntegrationTest and AccountGameplayDelegationResponseRecoveryPersistenceIntegrationTest.
      • REGISTRY_BYTES in AccountGameplayDelegationRedisIntegrationTest.
      • 16_384 in AccountGameplayDelegationTokenRegistryTest.

      This test class runs the pending-registration and activation cases (activationFixture). If the fourth parameter is the registry-record bound, those cases run with a limit that production does not use. If MAX_PROJECTION_BYTES is larger than the registry bound, the test cannot detect a regression in record-size enforcement.

      Confirm what the fourth parameter means. If it is the registry-record bound, use GameSessionAccountDelegationProfile.MAX_REGISTRY_RECORD_BYTES.

      ♻️ Proposed change

               new AcknowledgementRequirements(1, 1, 1_000),
      -        AccountGameplayDelegationAuthorityProjection.MAX_PROJECTION_BYTES,
      +        GameSessionAccountDelegationProfile.MAX_REGISTRY_RECORD_BYTES,
               AccountGameplayDelegationRedisClientTest.class.getClassLoader());
      
      • Accepted The client parameter is the registry-record limit (16KiB), but helper uses projection limit (8KiB). Align the test with the production profile bound and preserve registry size assertions.
  7. Hosted Review 3 CompletedRuntime 12m 10s
    Found: 3 Accepted: 0/3/0 Routed: 0
    1. Clarify the replay-proof reference.Minor

      Replace “current-head paragraph below” with “later replay-proof paragraph below.” Line 19 describes head 50c22969698303ffdc6f3aab42d19dc499e47c5d and says that proof predates later corrections. The current wording can misattribute that historical proof to a later source state.

      As per path instructions, “Review docs for canonical-current-state consistency.” As per coding guidelines, “Keep its status, implementation record, validation, gaps, decisions, and service-map sections aligned when a domain boundary changes.”

      • Accepted The tracker reference calls historical replay evidence current-head proof; use the precise later replay-proof reference.
    2. Use ReturnType.INTEGER for the integer-only CAS script.Minor

      account_generation_projection_cas.lua returns only Lua integers. The Account Redis configuration uses Lettuce, and ReturnType.VALUE selects Lettuce's bulk-value output. Lettuce can fail while decoding the integer evalSha reply, before decodeScriptResult runs. The decoder unit test does not cover this transport path.

                             .evalSha(
                                 loadedSha,
      -                          ReturnType.VALUE,
      +                          ReturnType.INTEGER,
                                 1,
                                 keyBytes,
      
      • Accepted The registered Lua returns integers and the typed decoder accepts Long; ReturnType.INTEGER must select the matching Spring Redis transport decoder.
    3. Check the issuer key TTL in every read and readback path. Do not check it only in the selected paths.Minor

      readProjections checks issuer PTTL == -1 only when tenantId != null (Lines 853-859). The plain path, readAuthorityProjections, checks only the Account key TTL. publishProjections behaves the same way: when selected == null, the readback at Line 716 checks only accountKey.

      The issuer key may get a TTL from outside these methods, for example from an operator command or a different writer. observeCurrent then reports the issuer projection as current and digest-matched, even though Redis will expire it. The issuer Lua script treats a TTL on the stored issuer value as malformed (it returns -5). The two observation paths therefore disagree on the same state.

      Check the issuer TTL unconditionally in both methods.

      Proposed fix

      --- "a/services/account-service/src/main/java/net/firedevops/firemud/accountservice/service/session/AccountGameplayDelegationRedisClient.java"
      +++ "b/services/account-service/src/main/java/net/firedevops/firemud/accountservice/service/session/AccountGameplayDelegationRedisClient.java"
      @@ -837,15 +837,20 @@
             byte[] account =
                 commands.get(
                     ascii(AccountGameplayDelegationAuthorityProjection.ACCOUNT_KEY_PREFIX + accountId));
             if (!boundedProjection(issuer) || !boundedProjection(account)) throw unavailable();
      -      if (!Long.valueOf(-1L)
      -          .equals(
      -              commands.pttl(
      -                  ascii(
      -                      AccountGameplayDelegationAuthorityProjection.ACCOUNT_KEY_PREFIX
      -                          + accountId)))) {
      +      byte[] issuerKey =
      +          ascii(
      +              AccountGameplayDelegationAuthorityProjection.ISSUER_KEY_PREFIX
      +                  + GameSessionAccountDelegationProfile.ISSUER);
      +      if (!Long.valueOf(-1L).equals(commands.pttl(issuerKey))
      +          || !Long.valueOf(-1L)
      +              .equals(
      +                  commands.pttl(
      +                      ascii(
      +                          AccountGameplayDelegationAuthorityProjection.ACCOUNT_KEY_PREFIX
      +                              + accountId)))) {
               throw unavailable();
             }
             AccountGameplayDelegationAuthorityProjection.ProjectionValue.decode(
                 issuer, "issuer", GameSessionAccountDelegationProfile.ISSUER);
             AccountGameplayDelegationAuthorityProjection.ProjectionValue.decode(
      

      Make the same change to the readback at Line 716: add || !Long.valueOf(-1L).equals(commands.pttl(issuerKey)), and remove the conditional check at Line 681.

      • Accepted Plain issuer read and publication readback omit issuer no-TTL validation while selected paths and Lua reject TTLs; make the existing guard unconditional.
  8. CLI Review 5 CompletedRuntime 3m 35s
    Found: 3 Accepted: 0/0/0 Routed: 0
    1. Use the canonical profile encoder for accountSecurityCutoff in the selected tuple.Minor

      This block uses Map.of to build accountSecurityCutoff from the raw values returned by cutoff.accountAuthorityGeneration() and cutoff.outboxSequence(). Every other tuple producer in this change passes these values through GameSessionAccountDelegationProfile.AccountSecurityCutoff and GameSessionAccountDelegationProfile.authorityTuple(...). Those producers are AccountGameplayDelegationIssuanceRepository.authoritySnapshot, AccountAuthEvidenceBundleRepository.authorityTuple, and AccountGameplayDelegationResponseEnvelopeRepository.requireCurrentAuthority. The canonical contract encodes these cutoff fields as decimal strings:

      • V153/V157 build the expected tuple as "accountAuthorityGeneration":"N" and "outboxSequence":"N".
      • AccountAuthEvidenceBundle.validateFields calls parsePositiveDecimal on the cutoff fields, so it accepts only strings.

      The source-evidence cutoff record can expose long components. In that case, canonical(tuple) writes JSON numbers. canonicalCurrentAuthorityTuple() then returns a cutoff encoding that differs from the cutoff encoding in signed tokens and in the evidence bundle. A consumer that compares the selected tuple with token claims rejects every Account that has a security cutoff.

      Confirm the component types of the source-evidence accountSecurityCutoff() record. If they are numeric, derive this entry from the shared profile encoding.

      ♻️ Proposed fix

      -              var accountCutoff = source.account().accountSecurityCutoff();
      -              if (accountCutoff.isPresent()) {
      -                var cutoff = accountCutoff.orElseThrow();
      -                tuple.put(
      -                    "accountSecurityCutoff",
      -                    Map.of(
      -                        "accountAuthorityGeneration",
      -                        cutoff.accountAuthorityGeneration(),
      -                        "outboxStreamKey",
      -                        cutoff.outboxStreamKey(),
      -                        "outboxSequence",
      -                        cutoff.outboxSequence()));
      -              }
      +              Map<String, Object> profileTuple =
      +                  GameSessionAccountDelegationProfile.authorityTuple(
      +                      composite.issuer().generation(),
      +                      composite.account().generation(),
      +                      source
      +                          .account()
      +                          .accountSecurityCutoff()
      +                          .map(
      +                              cutoff ->
      +                                  new GameSessionAccountDelegationProfile.AccountSecurityCutoff(
      +                                      cutoff.accountAuthorityGeneration(),
      +                                      cutoff.outboxStreamKey(),
      +                                      cutoff.outboxSequence())));
      +              if (profileTuple.containsKey("accountSecurityCutoff")) {
      +                tuple.put("accountSecurityCutoff", profileTuple.get("accountSecurityCutoff"));
      +              }
      
      • Rejected AccountAuthoritySourceEventV1Codec.AccountSecurityCutoff has String generation and sequence components; selected tuple already emits the exact decimal strings. This repeats the rejected numeric-encoding hypothesis; no incorrect encoding exists.
    2. Confirm that @AfterAll cleanup is safe when the Docker assumption aborts @BeforeAll.Minor

      If Docker is unavailable, assumeTrue at Line 192 aborts startPhysicalFixtures before POSTGRES.start() runs. JUnit still runs @AfterAll. stopPhysicalFixtures then calls POSTGRES.stop() on a fixture that never started. If AccountPostgresIntegrationFixture.stop() throws for an unstarted fixture, the class reports a failure instead of a skip. Docker-less local full checks are a known workflow in this repository. The same risk applies when REDIS_URI_ENV is configured but POSTGRES.start() fails.

      Check that AccountPostgresIntegrationFixture.stop() does nothing when no container was started. If it can throw, track the start and guard the stop call.

      🛡️ Proposed guard

      +  private static boolean postgresStarted;
       ...
      -    POSTGRES.start();
      +    POSTGRES.start();
      +    postgresStarted = true;
         }
       
         @AfterAll
         static void stopPhysicalFixtures() {
      -    POSTGRES.stop();
      +    if (postgresStarted) POSTGRES.stop();
      
      • Rejected Fixture.stop already checks started before container.stop; Docker assumption abort is safe. This repeats the previously rejected finding; no redundant guard is needed.
    3. Confirm that the fixed 2027 expiry does not depend on the system clock.Minor

      NOW is fixed at 1_800_000_000L (2027-01-15T08:00:00Z). EXPIRY_MILLIS is about 150 seconds later. The registry receives a fixed clock. AccountGameplayDelegationRedisClient receives no clock. If the client or the registry's pre-Redis checks compare absoluteExpiryMillis with System.currentTimeMillis(), these tests start to fail after 2027-01-15. That failure would block CI for every branch.

      The other Redis client tests use Instant.now() (AccountGameplayDelegationRedisClientTest Line 935). That suggests the client may depend on the real clock. Check whether registerPending or its readback validates the deadline against the system time. If it does, derive NOW from the current time, or inject a clock into the client.

      Also applies to: 142-148

      • Rejected All tested paths use the injected fixed registry Clock. RedisClient.registerPending/decode/readback compare exact expiry and relative bounds without system time; requirePendingRecord is a separate uncalled path. No 2027 expiry failure exists here.
  9. CLI Review 6 CompletedRuntime 3m 20s
    Found: 2 Accepted: 0/0/0 Routed: 0
    1. Use \z instead of $ to anchor the caller-workload pattern.Minor

      The new public GAME_SESSION_CALLER_WORKLOAD pattern ends with $. Without MULTILINE, Java $ also matches before a final line terminator. If a caller uses matcher(value).find() or lookingAt(), the input spiffe://firemud/ns/x/sa/game-session-service\n passes the check. That input is not a canonical SPIFFE ID, and the pattern is used as an authorization boundary. Matcher.matches() rejects the trailing newline, so the risk depends on how callers use the pattern. Use \z so that the check is exact for every matcher method.

      Confirm that every consumer of GAME_SESSION_CALLER_WORKLOAD, for example AccountGameplayCredentialRequestDigester.bind, calls matches() and not find().

      🔒️ Proposed fix

         public static final Pattern GAME_SESSION_CALLER_WORKLOAD =
             Pattern.compile(
      -          "^spiffe://firemud/ns/[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?/sa/game-session-service$");
      +          "\\Aspiffe://firemud/ns/[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?/sa/game-session-service\\z");
      
      • Rejected Every production consumer uses Matcher.matches(), which rejects final terminators; no find/lookingAt consumer exists. The claimed authorization bypass depends on hypothetical API misuse and is absent from current behavior.
    2. Confirm whether this PR must keep known-broken migrations that later migrations in the same PR repair.Trivial

      V148 calls jsonb_object_length. PostgreSQL has no such function. Every bundle insert under V148 alone fails with SQLSTATE 42883. AccountAuthEvidenceBundlePersistenceIntegrationTest asserts this failure, and V154 replaces the function body. V153 repairs the V147 numeric tuple encoding in the same way. V156 repairs the V150 bundle-key count in the same way.

      All of V147–V157.1 are new files in this PR. If no shared or deployed database has applied them, correct V147, V148 and V150 directly and delete the repair migrations. A fresh install then never passes through a trigger that cannot run, and the migration history describes one contract instead of three revisions. If any environment already applied these versions, keep the forward repairs as written.

      Confirm whether any shared database's Flyway history contains V147–V157.

      Also applies to: 262-262

      • Rejected Standing migration-history restrictions explicitly preserve published V147-V157 and required forward corrections. V153/V154/V156 repair the canonical complete schema and have physical prefix/history regression proof; rewriting or deleting published migration history is not authorized.
  10. Hosted Review 4 CompletedRuntime 10m 34s
    Found: 2 Accepted: 0/1/0 Routed: 0
    1. Replace the duplicated 65_610 envelope bound with the cryptography owner's constant.Trivial

      exactCommittedEnvelope and exactReadback hardcode 65_610. AccountResponseEnvelopeCryptography.MAX_ENVELOPE_BYTES owns this bound, and V149 repeats it. If the cryptography limit changes (for example, a longer key ID or a larger response cap), these checks reject valid stored envelopes. Recovery then fails with StorageUnavailableException, and no error identifies the cause. Reference the shared constant at both sites.

      ♻️ Proposed change

      -        && envelopeBytes.length <= 65_610
      +        && envelopeBytes.length <= AccountResponseEnvelopeCryptography.MAX_ENVELOPE_BYTES
      
      -          || envelope.length > 65_610
      +          || envelope.length > AccountResponseEnvelopeCryptography.MAX_ENVELOPE_BYTES
      

      Also applies to: 703-703

      • Rejected V149 deliberately limits this private-envelope table to65610 bytes. Generic cryptography MAX_ENVELOPE_BYTES is147530 after independent StartSession expansion; it is package-private and does not own the narrower table bound. Substituting it would weaken prechecks beyond the immutable schema.
    2. Accept retained signing keys during caller currentness.Minor

      Normal signer rotation must preserve existing sessions while the retiring public key remains trusted. The current path calls requireCurrentCommittedSigner, which requires exact signer correspondence and rejects a token from the prior generation. Use the recovery signer checks and validate the retained key after the SQL transaction.

      --- "a/services/account-service/src/main/java/net/firedevops/firemud/accountservice/service/session/AccountGameplayDelegationCommittedIssuanceOwner.java"
      +++ "b/services/account-service/src/main/java/net/firedevops/firemud/accountservice/service/session/AccountGameplayDelegationCommittedIssuanceOwner.java"
      @@ -85,22 +85,23 @@
           }
           if (TransactionSynchronizationManager.isActualTransactionActive()) throw unavailable();
           try {
             CommittedCandidateVerificationData evidence =
                 accountTransaction.execute(
                     status -> {
                       CommittedCandidateVerificationData current =
                           issuanceRepository
                               .readCurrentCommittedCandidateByJti(tokenJti)
                               .orElseThrow(AccountGameplayDelegationCommittedIssuanceOwner::unavailable);
      -                signer.requireCurrentCommittedSigner(current);
      +                signer.requireCurrentCommittedRecoverySigner(current);
                       return current;
                     });
             if (evidence == null
                 || !tokenJti.equals(evidence.identity().tokenJti())
                 || Math.floorDiv(clock.millis(), 1_000L) >= evidence.identity().expiresAtEpochSecond()) {
               throw unavailable();
             }
      +      signer.requireRetainedCommittedPublicKey(evidence);
             tokenRegistry.requireExactActiveRecord(evidence);
             if (Math.floorDiv(clock.millis(), 1_000L) >= evidence.identity().expiresAtEpochSecond()) {
               throw unavailable();
             }
      
      • Accepted Canonical normal rotation preserves existing sessions. Caller JTI currentness incorrectly requires the original generation; current protected signer trust plus the exact retained original key must be checked, without weakening authority/expiry/ACTIVE-record guards.
  11. CLI Review 7 CompletedRuntime 3m 41s
    Found: 1 Accepted: 0/0/0 Routed: 0
    1. Check the encoding of the accountSecurityCutoff values in the selected current-authority tuple.Minor

      This block puts cutoff.accountAuthorityGeneration() and cutoff.outboxSequence() directly into the tuple map. The neighboring fields use Long.toString(...): issuerAuthGeneration, accountAuthorityGeneration, the tenant and membership generations, and tenantBillingCutoff. The V153/V157 SQL guard also expects decimal strings for the cutoff generation and sequence. If these accessors return long, canonical(tuple) writes JSON numbers. currentAuthorityTuple() and canonicalCurrentAuthorityTuple() then expose a tuple that does not byte-match the tuple in the token and the issuance row for the same Account cutoff.

      Confirm the return types of accountAuthorityGeneration() and outboxSequence() on the source-evidence cutoff record. If they are numeric, encode them as decimal strings.

      Proposed fix

                           Map.of(
                               "accountAuthorityGeneration",
      -                        cutoff.accountAuthorityGeneration(),
      +                        Long.toString(cutoff.accountAuthorityGeneration()),
                               "outboxStreamKey",
                               cutoff.outboxStreamKey(),
                               "outboxSequence",
      -                        cutoff.outboxSequence()));
      +                        Long.toString(cutoff.outboxSequence())));
      
      • Rejected Exact source remains unchanged: the imported AccountAuthoritySourceEventV1Codec.AccountSecurityCutoff record defines generation and sequence as String. The tuple already emits canonical decimal strings; this repeats the disproved numeric-encoding hypothesis.
  12. Hosted Review 5 CompletedRuntime 10m 50s
    Found: 1 Accepted: 0/1/0 Routed: 0
    1. Replace the transitional proof narrative with the current proof state.Minor

      This Implementation Status paragraph describes an earlier review round, not the current state:

      • "The commit source now publishes …" describes a change. It does not describe a stable contract.
      • "two unrelated local currentness tests failed acquiring their PostgreSQL host endpoint" is a historical local-gate failure.
      • The PR objectives report that exact-head Validation run 38278570811 passed all 208 Account integration cases without skips.
      • runtime-and-data.md Line 11 records bounded physical Redis/PostgreSQL proof and links to the tracker. It does not mention any local-gate failure.
      • This paragraph also omits the caller-currentness rule: verification during normal signer rotation accepts a retained original key and denies a withdrawn key.

      Remove the history and use the same wording in both architecture documents. State the source behavior as a contract. Leave proof details to the tracker.

      📝 Proposed wording

      -The initial private gameplay LOGIN owner, signer, registry, and response-recovery code is present as unregistered Account source, with focused proof sources. The commit source now publishes the current issuer and Account projections before observing them and requires the publication and observation to match before opening its final Account transaction; publication failure denies the commit. The projection publication/observation correction has focused unit and bounded test-owned PostgreSQL/Redis fixture proof recorded in the tracker; two unrelated local currentness tests failed acquiring their PostgreSQL host endpoint before migration, so the full local Account gate is not claimed as passing. This does not add or activate an API, proto method, or Spring composition; ...
      +The initial private gameplay LOGIN owner, signer, registry, and response-recovery code is present as unregistered Account source, with focused proof sources. The commit owner publishes the current issuer and Account projections, then requires an exact matching observation before it opens its final Account transaction; a publication or observation failure denies the commit. Caller currentness and recovery accept a historical signer generation only while its exact original public key remains in the trusted current JWKS. Focused unit proof and bounded test-owned PostgreSQL/Redis fixture proof are recorded in the tracker. This does not add or activate an API, proto method, or Spring composition; ...
      

      As per path instructions: "Review docs for canonical-current-state consistency. Flag obsolete transitional guidance, conflicts between architecture docs".

      • Accepted API status retains superseded local PostgreSQL failure history and omits the implemented retained-key caller-currentness rule. Align the two existing Account source-status paragraphs with stable commit/verification behavior; keep exact proof in the tracker and preserve registration/authority gaps.
  13. Hosted Review 6 CompletedRuntime 8m 14s
    Found: 2 Accepted: 0/1/1 Routed: 0
    1. Use one injected Clock for expiry decisions.Trivial

      requireOwnerReceiptCorrespondence checks expiry with Instant.now(). requirePendingRecord uses System.currentTimeMillis() and Instant.now() at Lines 886 and 902.

      Every caller decides currentness with an injected Clock:

      • AccountGameplayDelegationCommittedIssuanceOwner
      • AccountGameplayDelegationTokenRegistry
      • AccountGameplayDelegationSigner

      The same activation can therefore pass the owner's clock check and then fail the client's wall-clock check. Fixed-clock unit tests cannot cover these branches deterministically. Fixture timestamps also become time-dependent. For example, AccountGameplayDelegationCommittedIssuanceOwnerTest uses 2026-10-05, which is already in the past.

      Inject a Clock through the constructor and use clock.millis() and clock.instant() in these three checks.

      • Accepted Verified RedisClient three expiry checks use wall time while committed owner/registry/signer use injected Clock; require one injected clock and deterministic strict-expiry proof, preserve all independent fences.
    2. Add the retained-original-key rotation proof and the latest exact-head CI result to the source-intake record.Minor

      Both architecture documents now say that caller currentness and response recovery can use an older committed signer generation, but only while the exact original public-key fingerprint is still in the trusted JWKS. Both documents send readers to this subsection for "exact proof scope".

      This paragraph ends with the issuer-TTL and integer-transport correction batch: 1,210 unit cases and a filtered rerun of 21 physical cases. It does not record the following:

      • The retained-key and withdrawn-key rotation correction, or its focused proof. The PR reports 1,212 unit cases with four skips, plus five PostgreSQL/Redis cases that tested retained-key acceptance and withdrawn-key denial without changing Redis bytes or expiry.
      • Exact-head Validation run 38278570811. It ran 208 Account integration cases with no failures, errors, or skips, plus 1,212 unit cases with four skips.

      Without these entries, the proof claim in the architecture documents points to a record that does not contain that proof. Add one sentence for each result, and name the source head for each one. Keep the existing historical results as they are.

      The coding guidelines say: "Keep its status, implementation record, validation, gaps, decisions, and service-map sections aligned when a domain boundary changes". The path instructions say: "Review docs for canonical-current-state consistency."

      • Accepted Verified source-intake tracker lacks exact7dc retained/withdrawn original-key rotation proof and full208 physical CI38278570811; add exact attributed evidence, preserve earlier history.

Routed Findings

0 Open0 Accepted/Fixed0 Rejected

No routes recorded

Unlinked items

no items unlinked