PR #3154 review history
Unit 1A · identity, Account and public JOIN
Review rounds
Three-number pills mean: found (raw) / accepted here (useful) / routed
Recorded review history
Reviews and findings
- Hosted Review 1 CompletedRuntime 12m 07sFound: 6 Accepted: 6 Routed: 0
- Remove the unused private helpers.Trivial
PMD reports these as unused:
key,parseCanonicalUuid,object,requireBoundedText,parsePositive,parseNonnegative,canonicalize, and theEVENT_DIGESTconstant (Line 53). Line 468 also has an orphaned Javadoc above the realcanonicalProjectionPairJavadoc. 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.
- Reject non-v4 Account UUIDs before creating PENDING.Minor
beginPendingForAccountrejects only the nil UUID, and V147 permits any non-nilaccount_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-L56services/account-service/src/main/resources/db/migration/V151__account_gameplay_token_identity_fences.sql#L20-L20services/account-service/src/main/java/net/firedevops/firemud/accountservice/service/session/AccountGameplayDelegationAuthorityProjection.java#L459-L466services/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.
- 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.bindandCredentialVerifier.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
authenticateForGameplaypath 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.
- 🚀 Performance & Scalability | 🔵 Trivial
Every gameplay LOGIN capture holds one global row lock until commit.
allocateSourceFenceupdates the singleton rowaccount_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.
- 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_fencesskips 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 aBEFORE TRUNCATEguard.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.
- 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.
- CLI Review 1 CompletedRuntime 3m 09sFound: 8 Accepted: 1/6/1 Routed: 0
- Assert the specific stale-projection failure, not any
IllegalStateException.MinorThis 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 assertProjectionUnavailableExceptionorStaleProjectionException. 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.
- The singleton source-fence allocator serializes every new evidence capture across all Accounts.Trivial
allocateSourceFenceupdates the oneallocator_id = TRUErow. The V148 insert trigger then locks the same rowFOR 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. TheUNIQUE (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.
- 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. Thepartial/drift-foundstate 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.
- Stub preflight for every input so that the owner's own comparison is tested.Minor
assertRejectedBeforeActivationstubspreflightCommittedRecoveryonly for(REQUEST_ID, ACCOUNT_ID, CALLER). In each mismatch case the caller passes different arguments. The mock therefore returnsnull, and the owner fails on the missing preflight. The comparison between the preflight fields and the requestedrequestId,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.
- 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, andcredentialVerifier.verifyrun. 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 returnINVALID_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.
- 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 noSCRIPT_ID.registerPendingthen fails with a script-lookup error, not a digest mismatch. The test still passes, because it only assertsAccountCoordinationRedisExceptionand no connection use. Filter byAccountGameplayDelegationRedisClient.SCRIPT_ID, asAccountGameplayDelegationRedisClientTestalready 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.
- 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.
registerPendingruns without an Account transaction, but its repository read requires one.MajorAccountGameplayDelegationIssuanceCommitService.commitPendingCandidaterejects any active transaction. It then callstokenRegistry.registerPending(requestId). That method callsissuanceRepository.readPendingRegistryCandidate. The read reaches two calls that each checkTransactionSynchronizationManagerdirectly:readCurrentAuthority→tokenIdentityFences.lockAccountForUpdate→requireTransaction().requireCurrentEvidenceBundle→captureAndPersist→requireWritableAccountTransaction().
Both throw
IllegalStateExceptionwhen no writable transaction is active. Only a Spring transactional proxy around the issuance repository supplies one, through@Transactional(REQUIRED). The repository is also constructed withnewin 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-closedAUTH_UNAVAILABLE. Open an explicitTransactionTemplateinsideregisterPendingaround 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, isissuanceRepositorya Spring proxy, or does the call toregisterPendingrun inside a transaction?- Accepted Plain repository construction requires explicit Account transaction for pending read, ending before Redis; preserve ambient rejection and null fail-closed.
- CLI Review 2 CompletedRuntime 3m 40sFound: 3 Accepted: 1/2/0 Routed: 0
- Add the required
Expected patternfield to the new observation.MinorThe
2026-10-13entry hasContext,Observation,Current status, andReconsideration trigger. It has noExpected patternline. 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.
- Fix the
AA-2.1anchor cells: remove the tracker-section link and correct the separators.MinorThe 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 exampleV147__account_gameplay_delegation_issuance.sqlthroughV157.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.
- Projection publication fails permanently after any sequence gap.Major
requireSuccessorOfaccepts only two cases:- A missing key (
prior == null) whensequence() == 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 fromAccountGameplayDelegationAuthorityProjection.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
publishSelectedCurrentcall throwsAccountCoordinationRedisException. The descriptors'tailLossBehaviorsays "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() + 1up 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.
- A missing key (
- CLI Review 3 CompletedRuntime 3m 29sFound: 6 Accepted: 3/1/0 Routed: 0
- Confirm which owner publishes the issuer/Account projections before LOGIN commit observes them.Major
commitPendingCandidatecallsauthorityProjection.observeCurrent(proof.accountId()). ThroughreadProjections, 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.authenticatenever callspublishCurrent. 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 withIssuanceCommitUnavailableException. - 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)beforeobserveCurrentin 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.
- A new Account with no published
- Verify that
@AfterAllcleanup cannot fail when the Docker assumption skips the class.MinorWhen neither Redis URI is set and Docker is unavailable,
assumeTrueat Line 192 aborts@BeforeAllbeforePOSTGRES.start()runs. JUnit Jupiter still runs@AfterAllmethods after an aborted@BeforeAll.stopPhysicalFixturesthen callsPOSTGRES.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 whenstart()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.
- 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.mdLine 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.
- Require TLS on the Coordination Redis client that sends ACL credentials.Major
initializebuilds aRedisStandaloneConfigurationwith theaccount_coord_appusername and password. It then usesLettuceClientConfiguration.builder()withoutuseSsl(). Lettuce therefore sendsAUTHand all projection traffic in plaintext.The pinned
AccountGameplayDelegationRedisClientrelies 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.
- Verify the JSON type of the
accountSecurityCutoffvalues in the selected tuple.MinorThe selected tuple encodes every generation explicitly as a decimal string with
Long.toString(...). The cutoff values are different:cutoff.accountAuthorityGeneration()andcutoff.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
accountSecurityCutoffwith quoted values. If these accessors returnlong, 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 withLong.toString(...).- Rejected AccountSecurityCutoff accessors are String (common-platform-core codec); existing canonical tuple already uses protocol decimal strings.
- Confirm that every persisted Account UUID is version 4 (random UUID).Major
beginPendingForAccountrejects any Account UUID whose version is not 4. The same rule appears in other places:- V151
account_gameplay_token_identity_shape AccountGameplayDelegationResponseEnvelopeRepository.requireV4ForRecoveryAccountGameplayDelegationAuthorityProjection.requireAccountId
AccountAuthEvidenceBundle.UUID_TEXTdeliberately accepts versions 1–8 foraccountId. That suggests the producer may emit other versions. Accepted provenances includeACCOUNT_DATABASE_INSERT. If that path or the V29 backfill can produce a non-v4 UUID (for example, PostgreSQL 18uuidv7()), gameplay LOGIN fails for those Accounts.The failure is an
IllegalArgumentExceptionafter 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.
- V151
- Hosted Review 2 CompletedRuntime 9m 18sFound: 4 Accepted: 1/2/1 Routed: 0
- 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.mdLine 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.
- Replay pays one full Redis round trip per retained event.Trivial
Each
publishSelectedAuthorityEventcall 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 WHOAMIandSCRIPT 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
WAITAOFwaits. 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
WAITAOFand 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.
- Publish the authority projection before observing it.Major
AccountGameplayCanonicalLoginOwner.authenticatereachescommitPendingCandidateafter the preparation transaction. The commit method registers the pending token, then callsauthorityProjection.observeCurrent(proof.accountId()), but no production Account path callspublishCurrent. When Redis lacks the projection, LOGIN can fail after signing and pending registration. CallpublishCurrentbeforeobserveCurrentand 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.
- Add V157.1 to the migration range in the source-intake paragraph.Minor
Line 17 lists "V147–V157 migrations". The
AA-2.1row on Line 120 also anchorsV157.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 atf9922f2b6c59b836c730bcb47100719c3498dbe0includes 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.
- CLI Review 4 CompletedRuntime 4m 18sFound: 4 Accepted: 0/1/2 Routed: 0
- Check that
@AfterAllcannot turn a Docker skip into a class error.MinorIf Docker is unavailable and no URIs are configured,
assumeTrueinstartPhysicalFixturesaborts beforePOSTGRES.start()runs. JUnit still runs@AfterAll, andstopPhysicalFixturesthen callsPOSTGRES.stop()on a fixture that never started. IfAccountPostgresIntegrationFixture.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 whenstart()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.
- Add the gameplay LOGIN source-intake gaps to the
AA-2.1"Gap or decision" cell.MinorLine 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.
- 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 V147account_gameplay_delegation_caller_checkconstraint. 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
Patternconstant, for exampleGameSessionAccountDelegationProfile.CALLER_WORKLOAD_PATTERN, and reference it from every Java site. Some sites callString.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 inlineworkload.matches(...)with the sharedPattern.services/account-service/src/main/java/net/firedevops/firemud/accountservice/dto/AccountAuthEvidenceBundle.java#L50-L52: replace the localWORKLOADpattern with the shared constant.services/account-service/src/main/java/net/firedevops/firemud/accountservice/repository/AccountAuthEvidenceBundleRepository.java#L45-L47: replace the localGAME_SESSION_WORKLOADpattern with the shared constant.services/account-service/src/main/java/net/firedevops/firemud/accountservice/repository/AccountGameplayDelegationIssuanceRepository.java#L2072-L2077: replace the inlinecallerWorkload.matches(...)inPendingIntentwith the shared constant.services/account-service/src/main/java/net/firedevops/firemud/accountservice/repository/AccountGameplayDelegationResponseEnvelopeRepository.java#L55-L57: replace the localGAME_SESSION_WORKLOADpattern with the shared constant.services/account-service/src/main/java/net/firedevops/firemud/accountservice/service/session/AccountGameplayCanonicalLoginOwner.java#L246-L250: replace the inlineworkload.matches(...)inrequireRequestwith 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.
- Check the fourth constructor argument of
AccountGameplayDelegationRedisClient.TrivialThis helper passes
AccountGameplayDelegationAuthorityProjection.MAX_PROJECTION_BYTESas the fourth argument. Every other construction site passes the registry-record bound:GameSessionAccountDelegationProfile.MAX_REGISTRY_RECORD_BYTESinAccountGameplayDelegationIssuancePersistenceIntegrationTestandAccountGameplayDelegationResponseRecoveryPersistenceIntegrationTest.REGISTRY_BYTESinAccountGameplayDelegationRedisIntegrationTest.16_384inAccountGameplayDelegationTokenRegistryTest.
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. IfMAX_PROJECTION_BYTESis 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.
- Hosted Review 3 CompletedRuntime 12m 10sFound: 3 Accepted: 0/3/0 Routed: 0
- Clarify the replay-proof reference.Minor
Replace “current-head paragraph below” with “later replay-proof paragraph below.” Line 19 describes head
50c22969698303ffdc6f3aab42d19dc499e47c5dand 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.
- Use
ReturnType.INTEGERfor the integer-only CAS script.Minoraccount_generation_projection_cas.luareturns only Lua integers. The Account Redis configuration uses Lettuce, andReturnType.VALUEselects Lettuce's bulk-value output. Lettuce can fail while decoding the integerevalShareply, beforedecodeScriptResultruns. 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.
- Check the issuer key TTL in every read and readback path. Do not check it only in the selected paths.Minor
readProjectionschecks issuerPTTL == -1only whentenantId != null(Lines 853-859). The plain path,readAuthorityProjections, checks only the Account key TTL.publishProjectionsbehaves the same way: whenselected == null, the readback at Line 716 checks onlyaccountKey.The issuer key may get a TTL from outside these methods, for example from an operator command or a different writer.
observeCurrentthen 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.
- CLI Review 5 CompletedRuntime 3m 35sFound: 3 Accepted: 0/0/0 Routed: 0
- Use the canonical profile encoder for
accountSecurityCutoffin the selected tuple.MinorThis block uses
Map.ofto buildaccountSecurityCutofffrom the raw values returned bycutoff.accountAuthorityGeneration()andcutoff.outboxSequence(). Every other tuple producer in this change passes these values throughGameSessionAccountDelegationProfile.AccountSecurityCutoffandGameSessionAccountDelegationProfile.authorityTuple(...). Those producers areAccountGameplayDelegationIssuanceRepository.authoritySnapshot,AccountAuthEvidenceBundleRepository.authorityTuple, andAccountGameplayDelegationResponseEnvelopeRepository.requireCurrentAuthority. The canonical contract encodes these cutoff fields as decimal strings:- V153/V157 build the expected tuple as
"accountAuthorityGeneration":"N"and"outboxSequence":"N". AccountAuthEvidenceBundle.validateFieldscallsparsePositiveDecimalon the cutoff fields, so it accepts only strings.
The source-evidence cutoff record can expose
longcomponents. 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.
- V153/V157 build the expected tuple as
- Confirm that
@AfterAllcleanup is safe when the Docker assumption aborts@BeforeAll.MinorIf Docker is unavailable,
assumeTrueat Line 192 abortsstartPhysicalFixturesbeforePOSTGRES.start()runs. JUnit still runs@AfterAll.stopPhysicalFixturesthen callsPOSTGRES.stop()on a fixture that never started. IfAccountPostgresIntegrationFixture.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 whenREDIS_URI_ENVis configured butPOSTGRES.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.
- Confirm that the fixed 2027 expiry does not depend on the system clock.Minor
NOWis fixed at1_800_000_000L(2027-01-15T08:00:00Z).EXPIRY_MILLISis about 150 seconds later. The registry receives a fixed clock.AccountGameplayDelegationRedisClientreceives no clock. If the client or the registry's pre-Redis checks compareabsoluteExpiryMilliswithSystem.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()(AccountGameplayDelegationRedisClientTestLine 935). That suggests the client may depend on the real clock. Check whetherregisterPendingor its readback validates the deadline against the system time. If it does, deriveNOWfrom 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.
- CLI Review 6 CompletedRuntime 3m 20sFound: 2 Accepted: 0/0/0 Routed: 0
- Use
\zinstead of$to anchor the caller-workload pattern.MinorThe new public
GAME_SESSION_CALLER_WORKLOADpattern ends with$. WithoutMULTILINE, Java$also matches before a final line terminator. If a caller usesmatcher(value).find()orlookingAt(), the inputspiffe://firemud/ns/x/sa/game-session-service\npasses 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\zso that the check is exact for every matcher method.Confirm that every consumer of
GAME_SESSION_CALLER_WORKLOAD, for exampleAccountGameplayCredentialRequestDigester.bind, callsmatches()and notfind().🔒️ 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.
- 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 SQLSTATE42883.AccountAuthEvidenceBundlePersistenceIntegrationTestasserts 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.
- Hosted Review 4 CompletedRuntime 10m 34sFound: 2 Accepted: 0/1/0 Routed: 0
- Replace the duplicated
65_610envelope bound with the cryptography owner's constant.TrivialexactCommittedEnvelopeandexactReadbackhardcode65_610.AccountResponseEnvelopeCryptography.MAX_ENVELOPE_BYTESowns 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 withStorageUnavailableException, 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_BYTESAlso 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.
- 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.
- CLI Review 7 CompletedRuntime 3m 41sFound: 1 Accepted: 0/0/0 Routed: 0
- Check the encoding of the
accountSecurityCutoffvalues in the selected current-authority tuple.MinorThis block puts
cutoff.accountAuthorityGeneration()andcutoff.outboxSequence()directly into the tuple map. The neighboring fields useLong.toString(...):issuerAuthGeneration,accountAuthorityGeneration, the tenant and membership generations, andtenantBillingCutoff. The V153/V157 SQL guard also expects decimal strings for the cutoff generation and sequence. If these accessors returnlong,canonical(tuple)writes JSON numbers.currentAuthorityTuple()andcanonicalCurrentAuthorityTuple()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()andoutboxSequence()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.
- Hosted Review 5 CompletedRuntime 10m 50sFound: 1 Accepted: 0/1/0 Routed: 0
- 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
38278570811passed all 208 Account integration cases without skips. runtime-and-data.mdLine 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.
- Hosted Review 6 CompletedRuntime 8m 14sFound: 2 Accepted: 0/1/1 Routed: 0
- Use one injected
Clockfor expiry decisions.TrivialrequireOwnerReceiptCorrespondencechecks expiry withInstant.now().requirePendingRecordusesSystem.currentTimeMillis()andInstant.now()at Lines 886 and 902.Every caller decides currentness with an injected
Clock:AccountGameplayDelegationCommittedIssuanceOwnerAccountGameplayDelegationTokenRegistryAccountGameplayDelegationSigner
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,
AccountGameplayDelegationCommittedIssuanceOwnerTestuses2026-10-05, which is already in the past.Inject a
Clockthrough the constructor and useclock.millis()andclock.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.
- 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
No routes recorded
Unlinked items
no items unlinked