PR #3145 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
- CLI Review 1 CompletedRuntime 2m 12sFound: 2 Accepted: 0/1/0 Routed: 0
- The claim-path descriptor
INSERTdoes not check the original authorization expiry.MinorThe two
pinoverloads have different checks:pin(EvidenceContinuation, …)adds?::timestamptz > clock_timestamp(). The bound value isauthorizationExpiresAt.pin(AttemptClaim, …)checks onlyattempt.lease_expires_at > clock_timestamp().
The owner lease can be up to five minutes. It is independent of the Account reference expiry. A claim whose Account reference has already expired can therefore still persist an immutable descriptor pin while the lease is live.
That contradicts two documents:
- The tracker claims "database-clock claim/reference-expiry checks at descriptor pinning".
- The ADR-0048 rule says reconciliation after authorization expiry is read-only.
Add the same predicate to the claim path. Derive the value from
attempt.post_authorization_execution_tuplewith the existingoriginalAuthorizationExpiresAtlogic.🛡️ Proposed fix
+ "AND attempt.account_redemption_projection IS NOT NULL " + + "AND ?::timestamptz > clock_timestamp() " + "AND attempt.lease_expires_at > clock_timestamp() " + "RETURNING *", ... claim.claimOwnerId(), - claim.ownerFence()); + claim.ownerFence(), + StartSessionAuthorityEvidenceBundle.decode( + association.result().request().decodedTuple().authorityEvidenceBundleBytes()) + .authorizationExpiresAt());- Accepted Valid #3145-owned fresh descriptor INSERT lacks original Account authorization expiry at DB statement; add independent reference-expiry predicate and race proof, preserving read-only exact replay.
- The tracker claims reference-expiry checks at descriptor pinning, but only one pin path has them.Minor
Line 9 claims "database-clock claim/reference-expiry checks at descriptor pinning". This is true only for
GameSessionStartSessionLaunchDescriptorRepository.pin(EvidenceContinuation, …). Thepin(AttemptClaim, …)overload checks onlylease_expires_at > clock_timestamp(). It does not check the original authorization expiry.Choose one of these fixes:
- Add the reference-expiry predicate to the claim path. This is the preferred fix; see the repository comment.
- Limit the tracker sentence to the continuation path.
The coding guidelines require: "Keep its status, implementation record, validation, gaps … aligned".
- Rejected Duplicate observation of finding1, not a separate obligation. The accepted INSERT/reference-expiry correction makes the tracker claim true; do not weaken the documented invariant.
- Hosted Review 1 CompletedRuntime 9m 15sFound: 3 Accepted: 0/3/0 Routed: 0
- Treat only ambiguous gRPC statuses as
ACCOUNT_OUTCOME_AMBIGUOUS.MinorThe
catch (StatusRuntimeException ...)block treats every non-OK status as an ambiguous Account outcome. Some statuses are not ambiguous:UNAUTHENTICATEDfromGrpcServerPeerIdentityClientInterceptormeans the request never reached Account.StartSessionOperatorRedemptionClientMtlsTestproves this withrpcStarts == 0.INVALID_ARGUMENT,PERMISSION_DENIED, andFAILED_PRECONDITIONare definitive denials.
The current code records each of these as
ACCOUNT_OUTCOME_AMBIGUOUS. Reconciliation then treats a known "not redeemed" result as "unknown". Classify onlyDEADLINE_EXCEEDED,UNAVAILABLE,CANCELLED,UNKNOWN, andINTERNALas ambiguous. Propagate the other statuses, or map them to a distinct non-redeemed outcome.Proposed fix
} catch (StatusRuntimeException ambiguousTransportOutcome) { + if (!isAmbiguous(ambiguousTransportOutcome.getStatus().getCode())) { + throw ambiguousTransportOutcome; + } return new AuthorizationResult( reservation.snapshot(), Optional.of(claim), Progress.ACCOUNT_OUTCOME_AMBIGUOUS); }private static boolean isAmbiguous(io.grpc.Status.Code code) { return switch (code) { case DEADLINE_EXCEEDED, UNAVAILABLE, CANCELLED, UNKNOWN, INTERNAL -> true; default -> false; }; }- Accepted Accepted #3145-owned status classification: preserve ambiguity only for transport/unknown/internal statuses; propagate definitive denials without attachment, redemption retry or terminalizing the pending owner claim.
- Add or update the
Capability Statusrow for this boundary.MinorThis change adds only a narrative record. The tracking guideline requires one
Capability Statusrow for every capability that the tracker primarily owns. For animplementedorpartialstatus, the row must name concrete production anchors. It must also use theNo focused executable proof:marker or name focused proof. The PostgreSQL cases were not executed, so focused proof is absent. Possible anchors areGameSessionStartSessionOperatorAttemptRepository,GameSessionStartSessionLaunchDescriptorContinuationService, and the V35/V37/V38 migrations. If another tracker owns this capability, add a handoff link to it instead.As per coding guidelines: "Each tracker contains one
Capability Statusrow for every capability it primarily owns" and "Anaudited,unverified, ornot-applicablerow may omit executable proof only when its proof cell uses the explicitNo focused executable proof:marker".- Accepted Partially accepted tracker row: add concrete inactive capability and executable proof anchors; retain exact physical fresh/upgrade PostgreSQL attribution gap without incorrectly claiming all executable proof absent.
- Document the descriptor-pin write and the actual lock order.Minor
The contract text has two inaccuracies:
- It says the continuation is "restricted to reading and exact replay of an existing immutable association pin".
GameSessionStartSessionLaunchDescriptorContinuationService.continueOriginalEvidencealso inserts a newgame_session_start_session_launch_descriptor_pinrow. - It says Game Session "then locks and rechecks the same owner state before returning the association". The code first locks and reads the association in one owner transaction. It then makes the Account and Game Design calls outside SQL. Finally it locks again, rechecks, and pins the descriptor.
Under the path instructions, the architecture document owns the technical target state. The text must match the implemented boundary.
Proposed wording
-The continuation is restricted to reading and exact replay of an existing immutable association pin. It must not replay redemption, ... Remote Account/source reads occur outside SQL; Game Session then locks and rechecks the same owner state before returning the association. The actual pin/read statement enforces claim expiry using the database clock. +The continuation is restricted to reading and exact replay of an existing immutable association pin and to creating at most one immutable launch-descriptor evidence pin for that exact association. It must not replay redemption, ... Game Session reads the association under the owner lock, performs remote Account and Game Design reads outside SQL, then locks and rechecks the same owner state and association before pinning the descriptor. The descriptor pin statement enforces claim lease and original reference expiry using the database clock.- Accepted Accepted owner-contract correction: bounded original continuation may create one immutable descriptor evidence pin; document actual lock/remote-read/recheck sequence and unchanged no-admission/no-renewal limits.
- It says the continuation is "restricted to reading and exact replay of an existing immutable association pin".
- Subagent Review 1 CompletedModel: gpt-6-luna · XhighFound: 2 Accepted: 2 Routed: 0
- Initial immutable association INSERT omits current owner lease at statementMinor
Immutable d539 review: template association pin uses plain VALUES after validateCurrentAttempt. Inactive unregistered scope; no current player admission.
- Accepted Owned preparation invariant requires same unexpired original claim at pinning; earlier owner lock/validation does not keep wall-clock lease live while INSERT waits. Add exact owner-qualified database-clock INSERT and regression.
- Descriptor continuation SELECT omits original owner lease at readMinor
Immutable d539 review of existing descriptor replay; earlier query validates lease, final descriptor SELECT lacks it. Account reference check alone insufficient.
- Accepted Owned continuation contract requires actual read under original live claim plus reference expiry; SELECT only checks reference expiry after earlier owner validation. Add exact owner lease/identity at read with blocked-read regression, preserve distinct historical reads.
- CLI Review 2 CompletedRuntime 2m 43sFound: 2 Accepted: 0/2/0 Routed: 0
- Add the original-authorization expiry check to the initial association
INSERT … SELECT.MinorThe initial association pin checks the owner-claim lease (
attempt.lease_expires_at > clock_timestamp()). It does not check that the original Account authorization reference is still unexpired. The descriptor pin checks both conditions at its write boundary (?::timestamptz > clock_timestamp()ininsertClaimPinand in the continuationINSERT).Trigger: Account redemption succeeds. Then the authorization reference expires while the owner claim lease is still live. The caller can still write a new immutable association pin under that claim. ADR-0048 states: "After authorization expiry, reconciliation is read-only." The descriptor path enforces that rule, but the association path does not.
GameSessionStartSessionLaunchDescriptorRepositoryIntegrationTest.liveOwnerClaimCannotCreateDescriptorPinAfterOriginalAuthorizationExpiresdepends on this gap. It creates the association pin with an already-expired tuple. After the fix, create the association before the reference expires. Or assert the new rejection in that test.🛡️ Proposed fix
+ "AND attempt.lease_expires_at > clock_timestamp() " + + "AND ?::timestamptz > clock_timestamp() " + "RETURNING *", ... exactTuple, - exactProjection); + exactProjection, + StartSessionAuthorityEvidenceBundle.decode( + StartSessionPostAuthorizationExecutionTuple.decode(exactTuple) + .authorityEvidenceBundleBytes()) + .authorizationExpiresAt());- Accepted Verified initial association INSERT only guards original claim lease, unlike descriptor write original authorization expiry; add exact original-reference DB-clock expiry at association write and blocking-wait regression without renewal.
- Fix the conflicting
AA-2.1status values.MinorThe new section is named
AA-2.1and gives proof stateaudited(Line 13). TheAA-2.1row in the Capability Status table (Line 68) still givespartial/drift-found. Line 27 also saysAA-2.1remainspartial/drift-found. One capability ID now has two verification states.The
AA-2.1row covers "Gameplay login, character selection, and session binding". The StartSession operator-continuation work is a different control-plane capability. The tracker contract requires oneCapability Statusrow per capability. It also requires that row to name the concrete production anchors. The current row has none of the new coordinator, repository, or migration anchors.Use one of these fixes:
- Change the new section to a sub-record without its own status, and keep
partial/drift-foundas the onlyAA-2.1status. - Give the continuation work its own capability ID and row. Put its implementation anchors, proof anchors, and the
auditedstate in that row.
As per coding guidelines: "Keep its status, implementation record, validation, gaps, decisions, and service-map sections aligned" and "Each tracker contains one
Capability Statusrow for every capability it primarily owns."- Accepted Verified new AA-2.1 sub-boundary says audited while capability status remains partial/drift-found; preserve canonical capability row and express preparation audit as bounded sub-record proof, not second capability status.
- Change the new section to a sub-record without its own status, and keep
- Hosted Review 2 CompletedRuntime 5m 21sFound: 1 Accepted: 0/1/0 Routed: 0
- Make the initial association pin check that the original authorization has not expired, using the database clock.Minor
The
INSERT ... SELECTininsertInitialPinchecks the owner claim lease (lease_expires_at > clock_timestamp()). It does not check when the original Account authorization reference expires. The owner claim lease can last up to five minutes, and the authorization reference can expire while the claim is still live. In that state, this path still creates the immutable association pin.The descriptor claim path rejects the same state.
GameSessionStartSessionLaunchDescriptorRepository.insertClaimPinbinds?::timestamptz > clock_timestamp()at the write. The testliveOwnerClaimCannotCreateDescriptorPinAfterOriginalAuthorizationExpiresasserts that behavior. The continuation path also checks the expiry throughrequireOriginalAuthorityUnexpired. Without the same predicate here, an expired authorization can still create the first association evidence.To fix this, decode the stored tuple's
authorizationExpiresAt()and add the same predicate to the insert statement.🛡️ Proposed fix
+ "AND attempt.account_redemption_projection = ? " + "AND attempt.lease_expires_at > clock_timestamp() " + + "AND ?::timestamptz > clock_timestamp() " + "RETURNING *", @@ exactTuple, - exactProjection); + exactProjection, + net.firedevops.firemud.common.operator.StartSessionAuthorityEvidenceBundle.decode( + StartSessionPostAuthorizationExecutionTuple.decode(exactTuple) + .authorityEvidenceBundleBytes()) + .authorizationExpiresAt());Add
bindings[25]toGameSessionStartSessionTemplateAssociationRepositoryTest. Also add an integration case: a claim that is still live but carries an expired original reference must not create an association pin.- Accepted Verified original authorization expiry absent in initial association INSERT while lease remains live; same current-PR obligation as accepted CLI04e883 finding1, addressed once withDB-clock writepredicate and regressionproof.
- Subagent Review 2 CompletedModel: gpt-6-luna · XhighFound: 1 Accepted: 1 Routed: 0
- Initial association must reject expired original authorizationMinor
One combined reviewer candidate: initial association write is useful and accepted. Descriptor existing-result read/replay portion is not a separate obligation: it does not create a new pin or authority; fresh descriptor INSERT and opaque evidence continuation enforce reference expiry.
- Accepted Initial INSERT lacked DB-clock reference expiry; duplicates accepted CLI1 and Hosted4237098583. Same fix batch. AttemptClaim retained reads/replays are non-authorizing reconciliation; restricted EvidenceContinuation separately enforces expiry.
Routed Findings
No routes recorded
Unlinked items
no items unlinked