PR #3028 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
- Subagent Review 1 CompletedModel: gpt-6-luna · XhighFound: 0 Accepted: 0 Routed: 0
- No findings recorded for this run
- CLI Review 1 CompletedRuntime 5m 03sFound: 4 Accepted: 0/3/1 Routed: 0
- Minor
Update the exception handling around eligibilityService.resolve in AccountActorStagingEligibilityGrpcService to map CannotCreateTransactionException to Status.UNAVAILABLE alongside DataAccessResourceFailureException. Preserve the existing handling for other transaction and runtime failures.
- Accepted Accepted: classify CannotCreateTransactionException as owner-storage UNAVAILABLE and add sanitized focused regression. Other transaction/runtime classification preserved. Implementation pending.
- Minor
Update the closing jOOQ ignore marker in the PL/pgSQL section from the unrecognized end token to the configured stop token, matching the closing markers used by the other sections.
- Accepted Accepted: change only the final V73 jOOQ ignore closing marker from end to configured stop; preserve SQL semantics and run generation proof. Implementation pending.
- Trivial
Align the package declaration in WorldCanonicalInitialAdmissionHoldTest with its current directory by changing it to net.firedevops.firemud.common.world, or move the test under the matching unit directory and keep its existing package.
- Accepted Accepted: align the existing World hold test package with its source directory; no behavior change. Implementation pending in local batch.
- Minor
Add a separate Observation field to the 2026-10-09 entry in ai-observations.md, moving the observation about patch-tool target resolution and missing before-images out of Context; keep Context for incident details and preserve the existing Expected pattern.
- Accepted Accepted: add the missing Observation field to the incident entry while preserving its facts, uncertainty, and Expected pattern. Implementation pending.
- Subagent Review 2 CompletedModel: gpt-6-luna · XhighFound: 1 Accepted: 1 Routed: 0
- JOIN must verify later tenant authority source before demo entitlement activationMinor
AccountDemoTenantEntitlementRepository.java:96,122; AccountMembershipAuthorityEventProducer.java:527. Whole immutable 90-path review completed; no other high-confidence obligation. Validation not run by reviewer.
- Accepted Owned Account source integration gap: V73 entitlement advances generation beyond the existing JOIN 1/1 guard. Preserve fail-closed behavior and add exact current source/event verification before wiring this write path; no current runtime caller or activation is claimed.
- Subagent Review 3 CompletedModel: gpt-6-luna · XhighFound: 0 Accepted: 0 Routed: 0
- No findings recorded for this run
- CLI Review 2 CompletedRuntime 4m 02sFound: 2 Accepted: 0/1/1 Routed: 0
- Use the shared publication fixture instead of a copied builder.Trivial
capture,operation, andreleasehere are near-copies of the same helpers inPublishedRealmEntryPolicySetEvidenceTest(lines 458-610). These helpers encode digest preimages and binding relations. If one copy changes and the other copy does not, the codec test can pass with stale fixture semantics. MakePublishedRealmEntryPolicySetEvidenceTest.fixture(boolean)package-visible, or extract one shared fixture class, and use it from this test. Both tests are already in thecommon.worldtest package.- Accepted Two evidence tests duplicate the same digest-sensitive publication fixture builders. Reuse one package-local test fixture while preserving all codec and evidence assertions; no production behavior change.
- Update the
Capability Statusrows to match this new production surface.MinorThe narrative now records first-JOIN billing-cutoff production. The tracker rows are unchanged, so their anchors are stale:
- The
AA-1.2implementation anchors omitAccountTenantAuthorityEventRepository.java,AccountDemoTenantEntitlementRepository.java,AccountTenantEntitlementOutboxRepository.java,V53__account_protected_demo_entitlements.sql, andV73__account_tenant_authority_source_bridge.sql. - The
AA-1.2proof anchors omitAccountDemoTenantEntitlementPersistenceIntegrationTest.javaandAccountCanonicalFirstJoinEventIntegrationTest.java. - The
AA-1.1row does not mentionRuntimeAccountIdentityGrpcServiceor the actor-staging eligibility RPC, although the Account architecture docs now record both as implemented.
Add these anchors to the rows. Record the remaining gaps in the same row text: the producer is not wired to an entitlement caller, and the PostgreSQL proof has not run.
As per coding guidelines: "Keep its status, implementation record, validation, gaps, decisions, and service-map sections aligned when a domain boundary changes" and "
implementedandpartialrows name concrete production anchors."- Accepted AA-1.1 and AA-1.2 capability rows omit current identity/staging and source/event anchors. Add exact owning implementation/proof links and preserve partial status, unwired entitlement caller and current physical proof limitations; earlier hosted74-case execution must not be relabelled wholly unrun.
- The
- Subagent Review 4 CompletedModel: gpt-6-luna · XhighFound: 0 Accepted: 0 Routed: 0
- No findings recorded for this run
- CLI Review 3 FailedFound: 1 Accepted: 1 Routed: 0
Update the assertion in PreseededActorAssignmentOwnerReadEvidenceTest to inspect wireRequest’s message descriptor fields instead of only populated fields, so newly added pointer or epoch fields are detected even when unset.
- Accepted Trivial accepted. Source fix 7e7830e1aba1497d19d57a6beb334bf704204345 replaces populated getAllFields().keySet() with descriptor.getFields(), including unset pointer/epoch fields. Worker reports two-case tests; Root source-verified, did not rerun. CLI remains failed/nonattributable/uncredited.
- CLI Review 4 CompletedRuntime 4m 34sFound: 2 Accepted: 0/1/1 Routed: 0
- Add
ResolvePreseededActorStagingEligibilityto the gRPC inventory.MinorThe "gRPC APIs" list now has an entry for
ResolveRuntimeAccountIdentity. It has no entry forAccountActorStagingEligibilityService/ResolvePreseededActorStagingEligibility. The canonical inventory is therefore incomplete, and a reader who scans it will not see that the Entity-only RPC exists. Add a short entry next to Line 119. The entry must state these facts and link to the new section:- The RPC is Entity Management only and mTLS-only.
- It is disabled by default.
- It grants no admission.
📝 Proposed inventory entry
- `ResolveRuntimeAccountIdentity(canonicalAccountId, requestId)` – mTLS-only internal owner read for the exact Game Session and Entity Management workload identities in Account's configured workload namespace. It returns Account's persisted canonical UUID, numeric Account row solely as provenance evidence, and UUID provenance. Account fails closed on missing, ambiguous, malformed, or inconsistent row evidence; this read does not establish membership, grants, actor ownership, or gameplay admission. +- `ResolvePreseededActorStagingEligibility(schemaVersion, targetNamespace, requestId, canonicalAccountId, canonicalTenantId, purpose)` – read-only, default-disabled, mTLS-only internal owner read for the exact same-namespace Entity Management workload. It returns staging-only evidence as defined in [Preseeded actor-staging eligibility owner read](#preseeded-actor-staging-eligibility-owner-read) and creates no membership, actor, JOIN, PLAY, or admission authority.As per path instructions: "Review docs for canonical-current-state consistency."
- Accepted Canonical Account API inventory omits the implemented default-disabled Entity-only mTLS staging read; add short linked entry without changing authority or claiming admission.
- Derive the digests from the preimage builders. Do not keep four copies of the field lists.Trivial
The field lists appear twice for each digest:
requestDigestandrequestPreimageeach list the full request field sequence.resultDigestandresultPreimageeach list the full result field sequence.
The two copies of each list must stay identical, because the preimages are published for cross-language proof. A future edit can change one copy and not the other. The digest then no longer matches the published preimage, and no code detects the drift. Compute each digest from its preimage builder.
♻️ Proposed refactor
public static String requestDigest(Request request) { Objects.requireNonNull(request, "request"); - return digest( - REQUEST_DOMAIN, - field("schemaVersion", Integer.toString(SCHEMA_VERSION)), - ... // full duplicated field list - ); + return sha256Hex(requestPreimage(request)); } public static String resultDigest(AuthoredWorldLaunchDescriptorEvidence evidence) { Objects.requireNonNull(evidence, "evidence"); - return digest( - RESULT_DOMAIN, - ... // full duplicated field list - ); + return sha256Hex(resultPreimage(evidence)); }- Accepted Useful source-owned testability/maintenance correction: compute authored launch digests from their existing canonical preimage builders, preserving all bytes and hashes; focused proof required.
- CLI Review 5 CompletedRuntime 2m 44sFound: 1 Accepted: 0/1/0 Routed: 0
- Reject
initialAdmissionRequestIdvalues that are not well-formed Unicode.MinorrequireBoundedTextchecks only blank and code-point length. A Game Session request ID with a lone UTF-16 surrogate (for example"r\uD800") passes theRequestconstructor.canonicalRequestBytes()andholdBindingDigest()then depend on howRfc8785CanonicalJson.canonicalizeUtf8handles that surrogate. It can throwIllegalStateExceptionafter construction, or it can replace the character and produce the same digest for two different request IDs. Other carriers in this PR reject lone surrogates, for example the"bad" + (char) 0xd800cases inAuthoredWorldSourceEvidenceTestandRuntimeTenantIdentityEvidenceTest. Apply the same rule here so that bad input fails in the constructor.🛡️ Proposed fix
private static void requireBoundedText(String value, String field, int maximumCodePoints) { if (value == null || value.isBlank() - || value.codePointCount(0, value.length()) > maximumCodePoints) { + || value.codePointCount(0, value.length()) > maximumCodePoints + || value.codePoints().anyMatch(cp -> Character.isSurrogate((char) cp) && cp <= 0xFFFF)) { throw new IllegalArgumentException(field + " must be nonempty and bounded"); } }- Accepted Minor: request constructor admits lone UTF-16 surrogates before canonical serialization, unlike sibling owner-evidence carriers. Reject malformed Unicode at construction; preserve valid supplementary code points, existing bounds and exact digest vectors.
- Hosted Review 1 CompletedRuntime 10m 55sFound: 5 Accepted: 1/1/3 Routed: 0
- Make the tamper case reach the digest check.Trivial
The canonical payload ends with
..."tenantId":"<uuid>"}. The byte ataltered.length - 2is therefore the closing"of thetenantIdvalue. Replacing that byte with'a'makes the JSON invalid.verifythen fails atJSON.readValuewith "payload is malformed". The test never reaches the digest comparison or the canonical-bytes comparison.Change a value inside a string field and keep the JSON valid. For example, change one hex character of a nested digest. Then assert the digest-mismatch message so the test proves tamper detection.
♻️ Proposed change
--- "a/services/account-service/src/test/java/unit/net/firedevops/firemud/accountservice/dto/TenantAuthorityEventV1CodecTest.java" +++ "b/services/account-service/src/test/java/unit/net/firedevops/firemud/accountservice/dto/TenantAuthorityEventV1CodecTest.java" @@ -53,10 +53,14 @@ .contains("\"tenantAuthorityGeneration\":\"2\"") .contains("\"tenantBillingSequence\":\"1\""); - byte[] altered = authorityEvent.payload(); - altered[altered.length - 2] = altered[altered.length - 2] == 'a' ? (byte) 'b' : (byte) 'a'; - assertThatThrownBy(() -> TenantAuthorityEventV1Codec.verify(altered)) - .isInstanceOf(IllegalArgumentException.class); + String original = new String(authorityEvent.payload(), StandardCharsets.UTF_8); + String tampered = original.replace("\"tenantBillingSequence\":\"1\"", + "\"tenantBillingSequence\":\"2\""); + assertThat(tampered).isNotEqualTo(original); + assertThatThrownBy( + () -> TenantAuthorityEventV1Codec.verify(tampered.getBytes(StandardCharsets.UTF_8))) + .isInstanceOf(IllegalArgumentException.class) + .hasMessageContaining("digest or canonical bytes differ"); } private static FreshTenantCreationEvidence source(UUID tenantId) {- Accepted Accepted: valid JSON tampering must reach and assert the digest or canonical-byte mismatch, not malformed JSON. Fix pending.
- Override
equals/hashCodeon the records that holdbyte[].TrivialDraftAuthorizationFenceBinding,SourceEvidence, andOwnerReadbackare records withbyte[]components (gameDesignBinding,normalizedInput,evidence,fullBinding,result). A generated recordequalscompares arrays by reference. The constructors also clone every array. As a result, two bindings decoded from the same canonical bytes are neverequal. AList<SourceEvidence>comparison has the same defect.WorldDraftTerminalReadEvidence.Requestalready overridesequalsfor this reason. The binding types do not.GameDesignPublicationTerminalReadEvidence.ReadRequesthas the same problem, and it is nested insideReadResult. Any future caller or test that usesequals,assertThat(...).isEqualTo(...), or a hash-based collection on these types will give wrong results without an error.Base
equals/hashCodeoncanonicalBytes()so that equality matches the canonical identity.♻️ Proposed change
@Override public boolean equals(Object other) { return other instanceof DraftAuthorizationFenceBinding that && Arrays.equals(canonicalBytes(), that.canonicalBytes()); } @Override public int hashCode() { return Arrays.hashCode(canonicalBytes()); }Add the same override to
SourceEvidence,OwnerReadback, andGameDesignPublicationTerminalReadEvidence.ReadRequest.- Accepted Accepted: immutable byte-array records require canonical value equality and matching hash codes with independent decode and changed-identity proof. Fix pending.
- Reject a non-COMMITTED proof with
IllegalArgumentExceptioninsourceRequest.MinorPreseededActorAssignmentOwnerReadGrpcCodec.fromResponsecallssourceRequestwith a proof decoded from the wire. It callssourceRequestbeforeCanonicalGameplayRosterOwnerReadEvidencechecks the outcome. Consider a decodablePENDINGorABORTEDproof from the peer. For that proof,committedPointerVersion()isnull, soObjects.requireNonNullthrowsNullPointerException.The rest of the closed codec rejects malformed or mismatched evidence with
IllegalArgumentException. Callers that mapIllegalArgumentExceptionto a fail-closed evidence rejection will see an unclassifiedNullPointerExceptioninstead. The roster codec rejects the same input withIllegalArgumentException. Check the outcome first.🐛 Proposed fix
Objects.requireNonNull(request, "request"); Objects.requireNonNull(proof, "proof"); + if (proof.outcome() != GameSessionCanonicalInitialAdmissionOwnerProof.Outcome.COMMITTED) { + throw new IllegalArgumentException( + "Game Session assignment source requires a COMMITTED owner proof"); + } var hold = proof.holdIdentity().request(); @@ - Objects.requireNonNull(proof.committedPointerVersion(), "committedPointerVersion"), + proof.committedPointerVersion(), hold.activeLifecycleEpoch());- Accepted Accepted: reject non-COMMITTED owner proof explicitly with IllegalArgumentException before nullable pointer access. Fix pending.
- Remove the redundant re-decode of the publication operation.Trivial
validatePublicationContextalready decodesoperationBytesat Line 457 withGameDesignPublicationOperationBinding.fromStored.parseCapturechecks that the captured bytes equalexpectedOperationBytes, then decodes the same bytes again at Line 505. Each decode is expensive:GameDesignPublicationOperationBinding.fromStoredbuilds the binding.- Its constructor calls
AccountPublicationAuthorizationBinding.fromStoredandWorldPublishedStartLocationEvidence.fromStoredagain. - The World evidence constructor runs the full
WorldDraftTerminalReadGrpcCodecround trip.
One policy-set decode therefore validates the World evidence several times. Callers repeat this work:
CanonicalGameplayRosterOwnerReadGrpcCodec.fromResponsecallsfromStored.- The
CanonicalGameplayRosterOwnerReadEvidenceconstructor callsfromStoredagain.
The carrier can be up to 2 MiB. The byte-equality check is enough because the expected bytes were already decoded. Remove the second decode.
♻️ Proposed simplification
--- "a/services/common-platform-core/src/main/java/net/firedevops/firemud/common/publication/PublishedRealmEntryPolicySetEvidence.java" +++ "b/services/common-platform-core/src/main/java/net/firedevops/firemud/common/publication/PublishedRealmEntryPolicySetEvidence.java" @@ -499,12 +499,9 @@ byte[] operationBytes = capture.bytes(); byte[] snapshotBytes = capture.bytes(); capture.requireEnd(); - if (!Arrays.equals(operationBytes, expectedOperationBytes) - || !Arrays.equals( - operationBytes, - GameDesignPublicationOperationBinding.fromStored(operationBytes).canonicalBytes())) { + if (!Arrays.equals(operationBytes, expectedOperationBytes)) { throw new IllegalArgumentException("Captured source operation bytes changed"); } String snapshotJson = strictUtf8(snapshotBytes); try { if (!Arrays.equals(snapshotBytes, Rfc8785CanonicalJson.canonicalizeUtf8(snapshotJson))) {- Accepted Accepted: remove redundant operation decode after the sole caller already validates expected bytes; retain exact byte equality and tamper guards. Fix pending.
- Bind publication to current entitlement evidence.Major
requireOperationMatchesRequestvalidatesallowPublicJoinandentitlementVersiononly against the persisted operation and its own digest. The laterreadCurrentTenantSourceEventcheck validates tenant authority and provenance, but not current entitlement policy. A stale operation can therefore publish a positive membership event after the tenant entitlement changes.Expose the current entitlement snapshot or billing event. Reject publication when the current entitlement version differs from
operation.entitlementVersion(), or when the current entitlement no longer allows public join and gameplay. If these values use different version spaces, persist and compare the operation-time tenant authority generation instead.- Accepted Accepted: before a new positive JOIN membership event require actual current entitlement version, public-join and gameplay flags, and exact tenant source binding. Preserve original committed replay. Fix pending.
- CLI Review 6 CompletedRuntime 4m 26sFound: 2 Accepted: 0/2/0 Routed: 0
- Correct the "preserves the exact fresh tenant 1/1 baseline" claim.Minor
This line says that first-JOIN event production preserves the fresh tenant 1/1 baseline. The producer does not support a successful first JOIN at 1/1:
- At tenant generation and source version 1/1,
readCurrentTenantSourceEventreturnsnull. Seeservices/account-service/src/main/java/net/firedevops/firemud/accountservice/service/AccountMembershipAuthorityEventProducer.javalines 641-645. requireCurrentJoinEntitlementthen rejects anulltenantSourceEvent(lines 536-541).AccountDemoTenantEntitlementRepository.provisionalways advances the tenant generation. A tenant that has a demo entitlement therefore always has generation ≥ 2.
As a result, every first JOIN at 1/1 fails closed. The 1/1 branch in
tenantSourceEvidenceMatchesis unreachable on the success path, andtenantBillingCutoffis always present. Change the tracker text to state that first JOIN now requires a current demo entitlement and its typed tenant authority event, so a bare 1/1 baseline is denied. Alternatively, remove the dead 1/1 branch from the producer.As per coding guidelines: "Use the relevant tracker as the reader-facing account of implementation status." Based on learnings, the tracker must not restate the canonical contract; this correction only changes the status claim.
- Accepted Minor current-PR status drift: requireCurrentJoinEntitlement rejects null typed event, so a bare fresh tenant1/1 cannot succeed. Correct the tracker only; preserve fail-closed implementation.
- At tenant generation and source version 1/1,
- Add a reconsideration trigger, or do not record this entry.Minor
The entry states that merged #3116 now supplies the diagnostic location, and that the detector stays strict. The lesson therefore appears to be addressed. The entry records no remaining blocker or postponement, and it has no
Reconsideration trigger. The file rules permit a retained entry only when a blocker or a deliberate postponement remains, with its reason and trigger. Do one of these:- Add a
Reconsideration triggerthat names the remaining open condition, for example a false positive that occurs after #3116. - Remove this new entry because #3116 resolves it.
As per coding guidelines: "Retain an entry only when a genuine blocker or deliberate postponement remains, recording the reason and reconsideration trigger."
- Accepted Minor observation stewardship gap: #3116 improves diagnostic location but does not remove the ordinary-prose false positive. Preserve historical entry and state the genuine remaining limitation plus reconsideration trigger.
- Add a
- CLI Review 7 CompletedRuntime 3m 25sFound: 0 Accepted: 0/0/0 Routed: 0
- No findings recorded for this run
- CLI Review 8 CompletedRuntime 3m 38sFound: 0 Accepted: 0/0/0 Routed: 0
- No findings recorded for this run
- CLI Review 9 CompletedRuntime 3m 38sFound: 1 Accepted: 0/1/0 Routed: 0
- Remove
readOnly = truefrom repository methods that take row locks.MinorPostgreSQL rejects
SELECT ... FOR SHAREandSELECT ... FOR UPDATEinside aREAD ONLYtransaction. These methods advertisereadOnly = truebut issueFOR SHAREreads. Current callers hold writable owner transactions, so nothing fails today. A future read-only caller would fail with a PostgreSQL error.services/account-service/src/main/java/net/firedevops/firemud/accountservice/repository/AccountDemoTenantEntitlementRepository.java#L169-L170: removereadOnly = truefromreadCurrentandrevalidate, becausereadCurrentRowandoutboxRepository.readCheckpointuseFOR SHARE.services/account-service/src/main/java/net/firedevops/firemud/accountservice/repository/AccountTenantAuthorityEventRepository.java#L386-L423: removereadOnly = truefromreadCurrentByTenant, or drop itsFOR SHAREclauses on snapshot-only paths.
- Accepted Minor transaction-contract correction: these MANDATORY methods take FOR SHARE locks and should not advertise readOnly=true. Preserve locking and mandatory propagation; owner transactions must remain writable. Fix and focused metadata/proof pending.
- Hosted Review 2 CompletedRuntime 8m 43sFound: 7 Accepted: 0/6/1 Routed: 0
- Share one validator for the source key and provenance rules.Trivial
This record copies the
sourceGameTenantKeybounds (36 code points, 72 UTF-16 units), the nil-UUID check, and theNEW_GAME_ROW/RETAINED_GAME_V29set fromAuthoredWorldSourceDigest. The two copies use different methods to reject malformed UTF-16. This file usesCharsetEncoder.canEncode.AuthoredWorldSourceDigestusesGameTenantCreationDigest.utf8ByteLength. The two evidence types describe the same owner row. If one copy changes and the other does not, they will accept different values for that row.To fix this, move these checks into package-level static helpers, for example in
AuthoredWorldSourceDigest. Then call those helpers from both types.- Accepted Both tenant evidence classes validate the same owner row with duplicated source rules; reuse package-level existing owner helpers preserving current bounds and malformed Unicode denial.
OwnedAffectedTuplerejects World epochs that the Draft binding accepts.MinorDraftCommitBinding.AffectedUnitaccepts any canonical nonnegative decimal forexpectedEpoch, with no upper bound.DraftCommitBindingTestuses a 36-digitLARGE_EPOCHas a supported value.WorldDraftTerminalReadGrpcCodec.requireCommittedResultcomputesresultingEpochwithBigInteger, so the APPLIED carrier also supports that range. Theexpected_epochfield in the proto is astring.This constructor rejects any value above
Long.MAX_VALUE.requireRelationbuildsboundTuplesfrom the Draft's World affected units through this constructor. For a valid committed Draft with a large World epoch, every published start-location evidence attempt throws. That publication path cannot complete for that Draft. Use the same unbounded canonical-decimal rule asDraftCommitBinding. If World storage really limits epochs tolong, enforce that limit at Draft creation instead, so both contracts agree.Proposed fix
--- "a/services/common-platform-core/src/main/java/net/firedevops/firemud/common/world/WorldPublishedStartLocationEvidence.java" +++ "b/services/common-platform-core/src/main/java/net/firedevops/firemud/common/world/WorldPublishedStartLocationEvidence.java" @@ -539,13 +539,9 @@ if (scopeType.isEmpty() != scopeId.isEmpty()) { throw new IllegalArgumentException("scopeType and scopeId must both be present or absent"); } - if (expectedEpoch == null - || !expectedEpoch.matches("0|[1-9][0-9]*") - || new java.math.BigInteger(expectedEpoch) - .compareTo(java.math.BigInteger.valueOf(Long.MAX_VALUE)) - > 0) { + if (expectedEpoch == null || !expectedEpoch.matches("0|[1-9][0-9]*")) { throw new IllegalArgumentException("expectedEpoch must be canonical non-negative decimal"); } } private static void requireTupleText(String value, String name) {- Accepted Draft and applied-terminal epochs use unbounded canonical decimals but the publication tuple imposes Long.MAX_VALUE; align the lossless carrier and retain malformed/negative denial.
- Select
request_idin the prior-request replay query.MinorThe prior-request query on Line 65 selects only
tenant_billing_sequence, event_id, event_digest, payload. Line 71 passes that row toevent(tenantId, priorRequest).eventthen callsrow.get("request_id", UUID.class)on Line 169. jOOQ throwsIllegalArgumentExceptionwhen a requested field is not in the record. Every exact replay throughappendtherefore fails beforematchesruns. The documented "returns only an exact request and payload replay" contract does not work.provisioncurrently replays through the operations table first, so the current caller does not reach this path. The publicappendmethod still cannot do what it documents.🐛 Proposed fix
--- "a/services/account-service/src/main/java/net/firedevops/firemud/accountservice/repository/AccountTenantEntitlementOutboxRepository.java" +++ "b/services/account-service/src/main/java/net/firedevops/firemud/accountservice/repository/AccountTenantEntitlementOutboxRepository.java" @@ -60,11 +60,11 @@ + "WHERE tenant_uuid = ? FOR UPDATE", tenantId); long currentSequence = nonnegative(stream, "last_sequence"); Record priorRequest = dsl.fetchOne( - "SELECT tenant_billing_sequence, event_id, event_digest, payload " + "SELECT tenant_billing_sequence, request_id, event_id, event_digest, payload " + "FROM account_tenant_entitlement_outbox_events " + "WHERE tenant_uuid = ? AND request_id = ?", tenantId, requestId); if (priorRequest != null) {Add a test that appends the same request twice in one transaction. It covers this path.
- Accepted The exact append replay selects no request_id although event() requires it; select the field and prove same-transaction exact replay and conflict semantics.
- A corrupt selection on the wire surfaces as
IllegalStateException, notIllegalArgumentException.MinorfromStoredcatches everyRuntimeExceptionand rethrows it asIllegalStateException. Wire decoders reach this method through a chain of calls:GameDesignPublicationTerminalReadGrpcCodec.fromRequestcallsReadRequest.fromStored.ReadRequest.fromStoredcallsGameDesignPublicationOperationBinding.fromStored.- That method calls
AccountPublicationAuthorizationBinding.fromStored, which calls this method.
The result: a malformed client request with a corrupt selection JSON escapes as
IllegalStateException. Every other malformed-frame path in this chain throwsIllegalArgumentException. A receiver that mapsIllegalArgumentExceptiontoINVALID_ARGUMENTwill then report a client input error asINTERNAL. This is a gRPC application-error contract issue.PublishedRealmEntryPolicySetEvidence.fromStoredalready converts the exception back toIllegalArgumentException. The terminal-read codec does not.Fix: throw
IllegalArgumentExceptionfor corrupt input here. If theIllegalStateExceptiontype must stay for repository readback, normalize the exception inGameDesignPublicationTerminalReadGrpcCodec.fromRequestandfromResponseinstead.Proposed fix
--- "a/services/common-platform-core/src/main/java/net/firedevops/firemud/common/publication/AuthoredDraftPublishSelectionBinding.java" +++ "b/services/common-platform-core/src/main/java/net/firedevops/firemud/common/publication/AuthoredDraftPublishSelectionBinding.java" @@ -141,9 +141,9 @@ "Stored authored Draft publication selection is not exact canonical JSON"); } return selection; } catch (RuntimeException exception) { - throw new IllegalStateException("Stored authored Draft selection is corrupt", exception); + throw new IllegalArgumentException("Stored authored Draft selection is corrupt", exception); } } public PublishIntent intent() {As per path instructions: "Flag changes that violate documented FireMUD invariants, especially gRPC application-error handling".
- Accepted Corrupt nested selection escapes wire decoding as IllegalStateException; normalize to IllegalArgumentException with cause and negative decoding proof without relaxing canonical validation.
- Reconcile the recorded validation counts.Minor
The paragraph records 593 Account unit cases and five shared World hold cases, while the PR reports 598 Account unit cases and 27 focused shared-evidence cases. Clarify whether these are different suite scopes or run snapshots. If they are not, update the paragraph to match the latest results.
- Accepted Historical gate108 counts are valid but unclear beside newer gate123 and gate124 proof; distinguish the dated scopes rather than erase retained evidence.
- Add value-based
equals/hashCodetoGameDesignPublicationTerminalEvidence.MinorThis class is described as immutable evidence with a canonical encoding. It does not override
equalsorhashCode, so equality falls back to object identity.GameDesignPublicationTerminalReadEvidence.ReadResultis a record with anOptional<GameDesignPublicationTerminalEvidence>component. Its generatedequalstherefore fails for twoPUBLISHEDorNO_PUBLICATIONresults decoded from the same bytes.ReadRequestwas given canonical-byte equality, andPublishedRealmEntryPolicySetEvidenceTest.terminalReadRequestUsesCanonicalByteValueEqualitytests it.ReadResultdoes not have the same behavior.Fix: compare the canonical bytes.
Proposed fix
@Override public boolean equals(Object other) { return this == other || (other instanceof GameDesignPublicationTerminalEvidence evidence && Arrays.equals(canonicalBytes(), evidence.canonicalBytes())); } @Override public int hashCode() { return Arrays.hashCode(canonicalBytes()); }- Accepted Canonical terminal evidence is immutable yet lacks value equality, breaking independently decoded ReadResult equality; compare and hash canonical bytes.
- Bind the returned policy set to the requested
targetNamespace.MinorverifiedForandrequireTargetcheck only the tenant UUID and version UUID. The sealed set carriesoperationBytes, and the World request inside those bytes records its owntargetNamespace. NeitherfromResponseoverload compares that namespace withrequest.targetNamespace().Consequence: a response that echoes the exact request can carry a valid set sealed for a different namespace with the same tenant/version UUIDs, and the codec accepts it.
GameDesignPublicationTerminalReadEvidence.ReadRequestalready rejects this case at Line 40 ("Read namespace differs from original World operation"). The proto also documents this read as "same-namespace".Fix: pass the namespace into the shared check.
Proposed fix
private static PublishedRealmEntryPolicySetEvidence verifiedFor( ResolveRequest request, PublishedRealmEntryPolicySetEvidence evidence) { Objects.requireNonNull(request, "request"); - return verifiedFor(request.canonicalTenantId(), request.canonicalVersionId(), evidence); + return verifiedFor( + request.targetNamespace(), request.canonicalTenantId(), request.canonicalVersionId(), evidence); } @@ private static void requireTarget( - UUID tenantId, UUID versionId, PublishedRealmEntryPolicySetEvidence evidence) { + String namespace, UUID tenantId, UUID versionId, PublishedRealmEntryPolicySetEvidence evidence) { if (!evidence.target().canonicalTenantId().equals(tenantId) - || !evidence.target().canonicalVersionId().equals(versionId)) { + || !evidence.target().canonicalVersionId().equals(versionId) + || !namespace.equals( + GameDesignPublicationOperationBinding.fromStored(evidence.operationBytes()) + .world() + .request() + .targetNamespace())) { throw new IllegalArgumentException( "Published policy evidence changed the exact owner target"); } }Apply the same namespace argument to the
ListRequestoverload and to bothfromResponsecall sites. Add a test that substitutes a set from another namespace.- Accepted Tenant/version checks omit the stored World target namespace, allowing cross-namespace substitution; bind both response paths to the exact requested namespace.
- CLI Review 10 CompletedRuntime 3m 37sFound: 0 Accepted: 0/0/0 Routed: 0
- No findings recorded for this run
- CLI Review 11 CompletedRuntime 4m 17sFound: 1 Accepted: 0/1/0 Routed: 0
- Bind the policy set to the request
targetNamespace.MinorrequirePolicyMatcheschecks the tenant UUID and Version UUID of the policy set. It does not check the World workload namespace recorded in the policy set's publication operation.requireProofMatchesbinds the Game Session proof torequest.targetNamespace().PublishedRealmEntryPolicyReadGrpcCodec.requireTargetalso bindsoperation.world().request().targetNamespace()for the same evidence type. This consumer is the Entity-facing verifier, so it accepts a sealed policy set produced for another namespace when the tenant and Version UUIDs match.Add the same namespace check.
Proposed fix
private static void requirePolicyMatches( Request request, PublishedRealmEntryPolicySetEvidence evidence) { + var operation = + net.firedevops.firemud.common.publication.GameDesignPublicationOperationBinding + .fromStored(evidence.operationBytes()); if (!evidence.target().canonicalTenantId().equals(request.canonicalTenantUuid()) - || !evidence.target().canonicalVersionId().equals(request.canonicalVersionUuid())) { + || !evidence.target().canonicalVersionId().equals(request.canonicalVersionUuid()) + || !operation.world().request().targetNamespace().equals(request.targetNamespace())) { throw new IllegalArgumentException("Game Design policy set changed the exact tenant/version"); }- Accepted Minor exact target-namespace binding gap in Entity-facing shared verifier: sealed policy tenant/version checks omit operation.World.request.targetNamespace. Add same namespace check and regression preserving existing policy/proof identity guards.
- CLI Review 12 CompletedRuntime 3m 13sFound: 0 Accepted: 0/0/0 Routed: 0
- No findings recorded for this run
- Hosted Review 3 CompletedRuntime 9m 55sFound: 3 Accepted: 0/2/1 Routed: 0
- Throw
IllegalArgumentExceptionfor an out-of-range positive int frame.MinorReader.positiveInt()callsMath.toIntExact(positiveLong(text())). A canonical decimal betweenInteger.MAX_VALUE + 1andLong.MAX_VALUEpassespositiveLong.Math.toIntExactthen throwsArithmeticException, which is not anIllegalArgumentException.ReleaseContent.fromStoredreadsversionNumber,manifestSchemaVersion,artifactSchemaVersion, anddigestSchemaVersionthrough this method. Wire bytes can reach it through this path:GameDesignPublicationTerminalReadGrpcCodec.fromResponseReadResult.fromStoredGameDesignPublicationTerminalEvidence.fromStored
GameDesignPublicationTerminalClient.readcatches onlyIllegalArgumentExceptionand converts it to "Game Design returned invalid publication terminal read evidence". If a response has a frame likeversionNumber = "3000000000", a rawArithmeticExceptionescapes instead. This breaks the decode-failure contract used everywhere else in this chain.PublishedRealmEntryPolicySetEvidence.fromStoredhides the problem only because it wraps everyRuntimeException.🐛 Proposed fix
--- "a/services/common-platform-core/src/main/java/net/firedevops/firemud/common/gamedesign/GameDesignPublicationTerminalEvidence.java" +++ "b/services/common-platform-core/src/main/java/net/firedevops/firemud/common/gamedesign/GameDesignPublicationTerminalEvidence.java" @@ -489,9 +489,13 @@ if (!value.equals(text())) throw new IllegalArgumentException("Unexpected canonical field"); } int positiveInt() { - return Math.toIntExact(positiveLong(text())); + long value = positiveLong(text()); + if (value > Integer.MAX_VALUE) { + throw new IllegalArgumentException("Counter exceeds int range"); + } + return (int) value; } int count() { String s = text();This follows the path instruction to flag "gRPC application-error handling" drift.
- Accepted Canonical positive-long frames outside int range throw ArithmeticException and evade the terminal client malformed-evidence contract. Reject explicitly with IllegalArgumentException and add wire/client regression.
- Fix the stale owner-readback schema comment.Minor
The comment at Line 36 says
owner_readback_bytesholdsaccount-draft-owner-readback/v1bytes. The implementation also emits and acceptsaccount-draft-owner-readback/v2:DraftAuthorizationFenceBinding.OwnerReadback.canonicalBytes()usesreadbackSchema(binding). That method returnsOWNER_READBACK_SCHEMA_V2for everyaccount-draft-authorization-fence/v2binding.OwnerReadback.fromStoredaccepts both schemas.
A World server developer who follows this comment may reject or never produce v2 readback. Every v2 Draft authorization fence would then fail at the boundary. Make the comment match the closed set the codec enforces.
📝 Proposed fix
--- "a/protos/world-management/v1/draft_terminal_service.proto" +++ "b/protos/world-management/v1/draft_terminal_service.proto" @@ -33,6 +33,8 @@ string read_request_id = 3; bytes original_account_binding = 4; WorldDraftTerminalReadStatus status = 5; - // Canonical account-draft-owner-readback/v1 bytes. Empty only for UNKNOWN. + // Canonical account-draft-owner-readback/v1 or /v2 bytes; the version matches the + // original Account binding schema (fence v1 -> readback v1, fence v2 -> readback v2). + // Empty only for UNKNOWN. bytes owner_readback_bytes = 6; }- Accepted OwnerReadback accepts and emits v1/v2 according to the original binding; correct the wire comment without changing protocol behavior.
- Validate the World APPLIED readback once, not through a wire round trip.Trivial
requireRelationvalidates the APPLIED readback by building a protobuf response and decoding it again. That path runsWorldDraftTerminalReadGrpcCodec.requireCommittedResultthree times for each construction:toResponse→requireExactOwnerReadback→requireCommittedResult.fromResponse→requireExactOwnerReadback→requireCommittedResult.fromResponse→new WorldDraftTerminalReadEvidence(...)→requireCommittedResult.
Each run decodes the Account binding and the
DraftCommitBindingagain. It also canonicalizes the APPLIED JSON and the graph JSON, and hashes them.OwnerReadback.canonicalBytes()andOwnerReadback.fromStoredalso reparse the full binding on every call.Callers repeat this cost:
GameDesignPublicationOperationBindingrebuildsworldthroughfromStored.PublishedRealmEntryPolicySetEvidence.fromStoredandCanonicalGameplayRosterOwnerReadEvidence.requirePolicyMatchesboth decode the operation binding.
One roster-owner read therefore runs the complete World graph validation many times. The policy-set payload can be up to 2 MiB.
The public
WorldDraftTerminalReadEvidenceconstructor already enforces the same rules once: the WORLD owner, terminal outcome,requireBinding, exact full-binding bytes, andrequireCommittedResult. Use that constructor directly.WorldDraftTerminalReadGrpcCodec.fromResponsehas the same duplication: it callsrequireExactOwnerReadback(request, decoded)and then calls the constructor, which repeats the committed-result check.♻️ Proposed change
--- "a/services/common-platform-core/src/main/java/net/firedevops/firemud/common/world/WorldPublishedStartLocationEvidence.java" +++ "b/services/common-platform-core/src/main/java/net/firedevops/firemud/common/world/WorldPublishedStartLocationEvidence.java" @@ -207,22 +207,20 @@ "Published World selection changed the complete World affected set"); } var terminalRequest = WorldDraftTerminalReadEvidence.Request.create(request.targetNamespace(), accountBytes); var terminalReadback = new DraftAuthorizationFenceBinding.OwnerReadback( Owner.WORLD, Outcome.COMMITTED, account.operationId(), account.commitId(), account.fenceId(), account.inputDigest(), accountBytes, appliedBytes); - var terminalResponse = - WorldDraftTerminalReadGrpcCodec.toResponse( - terminalRequest, java.util.Optional.of(terminalReadback)); - WorldDraftTerminalReadGrpcCodec.fromResponse(terminalRequest, terminalResponse); + // Enforces WORLD owner, exact binding bytes, and the complete APPLIED carrier once. + new WorldDraftTerminalReadEvidence(terminalRequest, java.util.Optional.of(terminalReadback)); JsonNode applied = readApplied(appliedBytes); if (!"APPLIED".equals(text(applied, "status"))) {- Accepted The validated World terminal evidence constructor enforces the same exact owner/binding/APPLIED checks. Use it directly instead of repeated protobuf round-trip validation, preserving all fail-closed checks.
- CLI Review 13 CompletedRuntime 4m 07sFound: 1 Accepted: 0/1/0 Routed: 0
- Correct which component emits the tenant authority event.Minor
The
AA-1.2gap cell says thatAccountMembershipAuthorityEventProducer"emits the canonical tenant authority event with billing cutoff". That is not what the code does.AccountTenantAuthorityEventRepository.appendwrites theTENANT_AUTHORITY_CHANGEDevent, and it does so during demo entitlement provisioning. The producer emits the first-JOIN membership event. That membership event carries atenantBillingCutofftaken from the current tenant authority event. The tracker is the reader-facing record of implementation status, so it must name the correct producer.📝 Proposed wording
-`AccountMembershipAuthorityEventProducer` emits the canonical tenant authority event with billing cutoff from fresh source coordinates, covered by +`AccountTenantAuthorityEventRepository` appends the canonical tenant authority event during demo entitlement provisioning; `AccountMembershipAuthorityEventProducer` emits the first-JOIN membership event with a tenant billing cutoff taken from that current tenant authority event, covered byAs per coding guidelines: "Keep its status, implementation record, validation, gaps, decisions, and service-map sections aligned when a domain boundary changes."
- Accepted Accepted Minor documentation correction: tenant-authority append belongs to AccountTenantAuthorityEventRepository during demo entitlement provisioning; the first-JOIN producer emits membership events using the current tenant event cutoff. No behavior change.
- CLI Review 14 CompletedRuntime 3m 09sFound: 0 Accepted: 0/0/0 Routed: 0
- No findings recorded for this run
- CLI Review 15 CompletedRuntime 2m 57sFound: 1 Accepted: 0/0/1 Routed: 0
- Replace the hard-coded operation frame index 13 with an accessor on the owning codec.Trivial
appliedIntakeRequestIdcopies the layout ofworld-draft-terminal-operation/v1frames. That layout is owned byWorldDraftTerminalReadEvidence. This code checks only the schema at frame 0 and the frame at index 13.Several frames near index 13 also hold canonical UUID text. One example is the frame at index 11, which holds
aaaaaaaa-...in the test fixture. Assume the owner later inserts or reorders a frame without changing the schema string. This parser then reads a different UUID and still parses it. The mismatch would appear only as a misleading "differs from the original APPLIED intake request" rejection. In the worst case, an unrelated UUID would be accepted as the intake identity.The frame layout should have one owner. Expose the decoded intake request id from the validated
WorldDraftTerminalReadEvidence/ APPLIED codec, and call that accessor here. Do not re-walk the frames in this class.♻️ Sketch
- new WorldDraftTerminalReadEvidence(terminalRequest, java.util.Optional.of(terminalReadback)); + var terminal = + new WorldDraftTerminalReadEvidence(terminalRequest, java.util.Optional.of(terminalReadback)); ... - if (!request.intakeRequestId().equals(appliedIntakeRequestId(applied))) { + if (!request.intakeRequestId().equals(terminal.appliedIntakeRequestId())) {Then delete
APPLIED_INTAKE_REQUEST_ID_FRAMEandappliedIntakeRequestId.Also applies to: 269-304
- Accepted Trivial useful codec ownership fix: remove downstream hard-coded APPLIED frame13 parsing; expose the validated intake UUID from the owning terminal codec. Preserve exact intake/receipt checks. Fix stays local while Hosted is active.
- Hosted Review 4 CompletedRuntime 9m 47sFound: 3 Accepted: 0/1/1 Routed: 0
- Remove the permanent
--refresh-dependenciesflag and its contract assertion.MinorThe
--refresh-dependenciesflag makes every matrix job resolve all dependencies from the remote repositories again. This adds CI time and more chances for network failures on every run. The contract test also requires the flag to stay in the workflow..github/workflows/ci.yml#L995-L995: remove--refresh-dependencies. If the cache is stale, rotate thesetup-gradlecache key once instead.dev-tools/tests/ci-lightweight-scope-contract.sh#L253-L253: remove--refresh-dependenciesfrom the expectedrunstring.
As per path instructions: "Focus on workflow correctness, ... cache correctness, duplication, and CI cost."
📍 Affects 2 files
.github/workflows/ci.yml#L995-L995(this comment)dev-tools/tests/ci-lightweight-scope-contract.sh#L253-L253
- Rejected Retain the demonstrated CI repair: unchanged canonical pins failed dependency resolution on original and failed-job rerun37847761035; metadata refresh made all five modules pass on37851593234. Removing it without a validated cache-invalidation replacement risks reproducing the blocker.
- Decode the operation bytes once.Trivial
Line 38 runs
GameDesignPublicationOperationBinding.fromStored. Line 39 then runs it again on the same canonical bytes. Each decode re-validates the nestedAccountPublicationAuthorizationBindingandWorldPublishedStartLocationEvidence. That work includes the full World APPLIED carrier and graph validation throughWorldDraftTerminalReadEvidence. The second decode adds no check.fromStoredalready rejects noncanonical input, sooperation.canonicalBytes()equals the input bytes.ReadResultrebuildsrequestthroughReadRequest.fromStored, so each terminal read decodes the operation several times.♻️ Proposed change
--- "a/services/common-platform-core/src/main/java/net/firedevops/firemud/common/gamedesign/GameDesignPublicationTerminalReadEvidence.java" +++ "b/services/common-platform-core/src/main/java/net/firedevops/firemud/common/gamedesign/GameDesignPublicationTerminalReadEvidence.java" @@ -34,9 +34,8 @@ throw new IllegalArgumentException( "Closed schema-1 namespace and non-nil read UUID required"); } - operationBytes = - GameDesignPublicationOperationBinding.fromStored(operationBytes).canonicalBytes(); - var operation = GameDesignPublicationOperationBinding.fromStored(operationBytes); + var operation = GameDesignPublicationOperationBinding.fromStored(operationBytes); + operationBytes = operation.canonicalBytes(); if (!targetNamespace.equals(operation.world().request().targetNamespace())) { throw new IllegalArgumentException("Read namespace differs from original World operation"); }- Accepted Trivial useful redundant-work removal: decode the original canonical operation once and reuse its canonical bytes. Preserve immutable copying, exact namespace/read-identity and full nested owner validation.
- Reject the maximum World epoch with
IllegalArgumentException, notArithmeticException.MinorWorldPublishedStartLocationEvidence.Requestaccepts any positivelongforversionStateEpoch, includingLong.MAX_VALUE. For aPUBLISHEDterminal with that epoch,Math.addExact(..., 1L)at Line 277 throwsArithmeticException.That exception escapes this decode path:
GameDesignPublicationTerminalReadGrpcCodec.fromResponseReadResult.fromStoredGameDesignPublicationTerminalEvidence.fromStored- this constructor
GameDesignPublicationTerminalClient.readcatches onlyIllegalArgumentException. A rawArithmeticExceptionthen reaches the caller. On a receiver, it would map to an internal error instead of invalid input. Every other malformed-evidence path in this chain throwsIllegalArgumentException. A PUBLISHED terminal for that epoch can never be valid, so reject it before the addition.🐛 Proposed fix
--- "a/services/common-platform-core/src/main/java/net/firedevops/firemud/common/gamedesign/GameDesignPublicationTerminalEvidence.java" +++ "b/services/common-platform-core/src/main/java/net/firedevops/firemud/common/gamedesign/GameDesignPublicationTerminalEvidence.java" @@ -272,9 +272,11 @@ } this.release = release == null ? null : ReleaseContent.fromStored(release.canonicalBytes()); this.epoch = publicationVersionStateEpoch; if (release != null) { - if (epoch <= 0 - || epoch != Math.addExact(operation.world().request().versionStateEpoch(), 1L) + long frozenEpoch = operation.world().request().versionStateEpoch(); + if (epoch <= 0 + || frozenEpoch == Long.MAX_VALUE + || epoch != frozenEpoch + 1L || !Arrays.equals( release.worldStartLocationEvidence().canonicalBytes(), operation.world().canonicalBytes())) {As per path instructions: "Flag changes that violate documented FireMUD invariants, especially gRPC application-error handling".
- Accepted Minor valid malformed-evidence error classification: frozen Long.MAX_VALUE cannot yield a valid incremented publication epoch. Reject explicitly as IllegalArgumentException before arithmetic; retain full binding/release validation and add maximum-epoch regression.
- CLI Review 16 CompletedRuntime 3m 51sFound: 4 Accepted: 0/0/3 Routed: 0
- Use the
unit.package prefix for the new unit tests.TrivialTwo new tests under
src/test/java/unit/...declare production packages. The other Account unit tests declareunit.net.firedevops.... If a package-based test filter or coverage filter is in use, these suites can be skipped silently.services/account-service/src/test/java/unit/net/firedevops/firemud/accountservice/service/impl/RuntimeAccountIdentityGrpcServiceTest.java#L1-L1: change the package tounit.net.firedevops.firemud.accountservice.service.impland importRuntimeAccountIdentityGrpcService.services/account-service/src/test/java/unit/net/firedevops/firemud/accountservice/AccountUuidTextTest.java#L1-L1: change the package tounit.net.firedevops.firemud.accountserviceand importAccountUuidText.
- Accepted Align two new unit packages with Account unit test convention; public production classes allow explicit imports without visibility changes.
- Assert the specific trigger failure instead of any
RuntimeException.TrivialThis check exists to prove that
account_tenant_authority_generation_consistencyrejects a tenant generation advance without a matching source event. As written, any failure passes, including an unrelated SQL error or a fixture fault. Assert the trigger's message.- .isInstanceOf(RuntimeException.class); + .isInstanceOf(DataAccessException.class) + .hasMessageContaining("Tenant authority generation advance lacks its canonical source event");- Accepted Assert owning jOOQ DataAccessException and exact V73 consistency-trigger message; unrelated SQL/fixture failures must not satisfy the physical regression.
- Remove
--refresh-dependenciesfrom the per-module Gradle check, and update its contract.MinorThe matrix check now refreshes every dependency in every module job on every run. Each job loses dependency caching and contacts the remote repositories again, which raises CI cost and lets a repository outage fail required gates. A one-time cache clear (for example, a new
setup-gradlecache key) fixes a stale cache without a permanent cost. As per path instructions, CI changes must address "cache correctness, duplication, and CI cost.".github/workflows/ci.yml#L995-L995: change the command to./gradlew :${{ matrix.module }}:check -PfullCheck. If you need a refresh option, add it only behind a manualworkflow_dispatchinput.dev-tools/tests/ci-lightweight-scope-contract.sh#L246-L257: remove--refresh-dependenciesfrom the expectedrunstring so the contract matches the workflow.
- Rejected Duplicate Hosted4224920463: old CI37847761035 and failed-job rerun failed existing dependency resolution; scoped refresh proved all five modules green in37851593234. Removing this demonstrated repair/cache replacement is unproved.
- Set a valid pointer snapshot digest so the non-committed case tests the outcome check.Trivial
nonCommittedResponseomitsadmission_pointer_snapshot_digest. TheCanonicalGameplayRosterOwnerReadEvidenceconstructor validates the digest format beforerequireProofMatches. The empty digest therefore causes the rejection, not thePENDINGoutcome. If the COMMITTED guard regresses on the codec path, this assertion still passes.💚 Proposed fix
.setPublishedPolicySetEvidence( ByteString.copyFrom(evidence.publishedPolicySetEvidence().canonicalBytes())) + .setAdmissionPointerSnapshotDigest(evidence.admissionPointerSnapshotDigest()) .build();- Accepted Add valid pointer digest so PENDING proof rejection exercises COMMITTED guard rather than earlier malformed-digest check.
- CLI Review 17 CompletedRuntime 3m 33sFound: 1 Accepted: 0/0/1 Routed: 0
- The
generation == 1 && sourceVersion == 1null path cannot produce a JOIN.TrivialreadCurrentTenantSourceEventreturnsnullfor the 1/1 baseline, andtenantSourceEvidenceMatchesacceptsnull. After that,requireCurrentJoinEntitlementalways rejectstenantSourceEvent == null. ThereadCurrentcall before it already fails, because no entitlement row exists at generation 1, and V53/V73 prevent such a row.As a result:
- The
if (tenantSourceEvent != null)branch inmembershipEventPreimage(Lines 388-402) is dead. - A 1/1 tenant is denied with the
ENTITLEMENT_UNAVAILABLEmessage instead of the intended "exact current public-join entitlement evidence" message.
Reject the 1/1 baseline explicitly in
readCurrentTenantSourceEvent, and make the event non-null afterward. The tracker documents this denial.- Accepted Owned low-risk convergence: explicitly deny generation1/sourceVersion1 before entitlement lookup; eliminate unreachable nullable-source event/preimage path, preserve authentic current source and exact replay.
- The
- CLI Review 18 CompletedRuntime 3m 15sFound: 1 Accepted: 0/0/0 Routed: 0
- Remove
--refresh-dependenciesfrom the per-module gate, or limit it to a scheduled or manual job.TrivialThis flag makes Gradle ignore its cached dependency resolution. Gradle then checks the remote repositories again for every resolved module. This step runs once for each entry in the
affected_modulesmatrix on every PR run. The result is higher CI time and more network egress. The required gate also becomes more exposed to registry outages and rate limits. Thesetup-gradlecache (cache-read-only: false) gives little benefit to this step.If the goal is to detect stale changing or dynamic dependencies, use a separate scheduled or
workflow_dispatchjob. The path instructions say to "focus on … cache correctness … and CI cost" and to "flag cases where a workflow becomes unnecessarily blocking".♻️ Proposed change
- ./gradlew --refresh-dependencies :${{ matrix.module }}:check -PfullCheck + ./gradlew :${{ matrix.module }}:check -PfullCheckUpdate the exact-string assertion in
dev-tools/tests/ci-lightweight-scope-contract.shin the same change.- Rejected Removing refresh reverses c5152a65f cache-repair. CI37847761035 common-saga failed resolving cached Spring Boot4.1.1 JDBC/Redis artifacts before the refresh repair; succeeding CI retained it. Generic egress savings do not prove equivalent cache correctness. No safe targeted replacement supplied.
- Hosted Review 5 CompletedRuntime 7m 32sFound: 1 Accepted: 0/0/0 Routed: 0
- Confirm tenant-generation mutation paths before enforcing the source requirement.Major
The trigger requires every
TENANTgeneration update to have a matchingaccount_tenant_authority_source_recordsrow. A tenant without a source record therefore cannot advance its generation. Confirm that all tenant-generation paths create and update the source record throughAccountTenantAuthorityEventRepository.append, including suspension, billing, revocation, and existingAccountAuthorityGenerationRepository.advancecallers.If any supported path updates tenant authority without that source record, this migration breaks it. In that case, either add the source-record flow to that path or limit the trigger to tenants with a source record.
- Rejected Only TENANT update writer provisions and appends source in one transaction. V73 guards UPDATE, not enrollment INSERT; account/member writers use other scopes. Physical CI37861898079 proves missing-source denial. No suspension/revocation bypass exists; conditional enforcement weakens authority.
- CLI Review 19 CompletedRuntime 3m 15sFound: 1 Accepted: 0/0/0 Routed: 0
- Drop the forced
--refresh-dependenciesfrom the per-module Gradle check.MinorThe workflow now runs
./gradlew --refresh-dependenciesin every matrix module job. Each job therefore checks all dependency metadata against the remote repositories again instead of using the Gradle cache. This adds network time to every job, and a remote repository outage can now fail an otherwise green build. The contract script requires the exact flag, so the cost is locked in. If a stale cache was the reason, invalidate the cache key or add a manualworkflow_dispatchtoggle instead. As per path instructions: "Focus on workflow correctness, … cache correctness, duplication, and CI cost.".github/workflows/ci.yml#L995-L995: remove--refresh-dependenciesfrom theRun Gradle Checkscommand.dev-tools/tests/ci-lightweight-scope-contract.sh#L246-L256: update the expectedrunstring so it has no--refresh-dependencies.
- Rejected Repeat of prior cache-removal suggestion: would reverse c5152a65f repair for actual common-saga missing Spring Boot4.1.1 artifacts in CI37847761035. No equivalent tested invalidation supplied; retain demonstrated cache-correctness repair.
- CLI Review 20 CompletedRuntime 3m 24sFound: 2 Accepted: 0/0/1 Routed: 0
- Move the shared fresh-graph fixtures out of this test class.Trivial
WorldDraftTerminalReadGrpcCodecTestis nowpublicand exposesfreshGraphRequestForStartLocationEvidenceTestandcommittedFreshGraphReadbackForStartLocationEvidenceTestfor other test classes.WorldPublishedStartLocationGrpcCodecTest.evidence()calls these helpers.PublishedRealmEntryPolicySetEvidenceTest.operation(...)callsWorldPublishedStartLocationGrpcCodecTest.evidence(). This creates a test-to-test dependency chain across three packages. A change to a private helper in one codec test can break unrelated policy-set and roster tests.Extract the fixture builders into a dedicated fixture class. The builders are
freshGraphBinding,accountBinding,committedReadback,graphBytes, andreceipt. An example class isnet.firedevops.firemud.common.testing.AuthoringFixtures. Make each test class depend on that fixture class.- Accepted Shared fresh graph/published start fixtures are coupled through two JUnit classes across packages. Extract a dedicated test fixture and update direct consumers without altering assertions or production behavior.
- Drop
--refresh-dependenciesfrom the per-module Gradle check.MinorThe workflow now forces Gradle to re-check every dependency against the remote repositories for every module in the matrix. This makes the setup-gradle cache much less useful. It adds network round trips to every required
Build and Testjob, and a repository outage then fails those jobs. The lightweight scope contract pins the exact command text, so the flag cannot be removed without updating the contract as well. These risks fall under the path instruction topics of "cache correctness" and "CI cost"..github/workflows/ci.yml#L995-L995: run./gradlew :${{ matrix.module }}:check -PfullCheckwithout--refresh-dependencies.dev-tools/tests/ci-lightweight-scope-contract.sh#L246-L256: change the expectedrunstring to the same command without--refresh-dependencies.
If a stale cached artifact caused this change, use a cache-key bump or one scheduled refresh job instead.
As per path instructions: "Focus on workflow correctness, permissions scope, secret handling, cache correctness, duplication, and CI cost."
- Rejected Repeated unsafe removal: actual CI37847761035 failed missing Boot4.1.1 JDBC/Redis/sql/transaction artifacts under cached metadata. Commit c5152a65f refresh repaired it. No proven cache-correct replacement is supplied; retain required repair.
- Subagent Review 5 CompletedModel: gpt-6-luna · XhighFound: 0 Accepted: 0 Routed: 0
- No findings recorded for this run
- Subagent Review 6 CompletedModel: gpt-6-luna · XhighFound: 0 Accepted: 0 Routed: 0
- No findings recorded for this run
- CLI Review 21 CompletedRuntime 3m 07sFound: 0 Accepted: 0/0/0 Routed: 0
- No findings recorded for this run
- CLI Review 22 CompletedRuntime 4m 10sFound: 2 Accepted: 0/1/1 Routed: 0
- Assert the failure reason in
assertResultRejected.TrivialassertResultRejectedchecks onlyIllegalArgumentException. Each negative test changes one property, but the mutation can also break a different invariant. One example is Lines 451-474, which test "graph without the selected room row". The mutation rewritestemplate_idon the ROOM row. The graph therefore no longer matches the draft revision payload, and the codec can reject it for that reason before it checks the room selector. If that happens, the test passes even when the selected-room check does not exist. Add an expected message fragment parameter and assert it withhasMessageContaining, or assert on the root cause. This makes each test prove the guard it names.- Accepted Test-only proof gap: generic exception assertions can pass for an earlier invariant. Bind negative cases to the intended rejection and correct selector fixture; production guards unchanged.
- Remove
--refresh-dependenciesfrom the per-module Gradle check, or document why each run needs it.MinorEvery
build-and-testmatrix job now ignores cached dependency metadata and revalidates every dependency against the remote repositories. Each module job takes longer, and each required gate fails when a remote registry has a transient failure. The CI contract test also pins the flag, so both sites must change together..github/workflows/ci.yml#L995-L995: run./gradlew :${{ matrix.module }}:check -PfullCheckwithout--refresh-dependencies. If a stale cache caused the change, fix the cache key or the specific dependency. If the flag must stay, add a comment above the step that explains the reason.dev-tools/tests/ci-lightweight-scope-contract.sh#L249-L256: update the expectedrunstring so that it matches the workflow command.
As per path instructions: "Focus on workflow correctness, permissions scope, secret handling, cache correctness, duplication, and CI cost."
- Accepted Partially accepted: retain dependency refresh required by evidenced stale negative cache, but document its bounded reason beside the workflow step; do not remove flag or weaken contract.
- Subagent Review 7 CompletedModel: gpt-6-luna · XhighFound: 1 Accepted: 1 Routed: 0
- Bind successful launch descriptor result to requested target version and patchMinor
AuthoredWorldLaunchDescriptorEvidence constructor checks request digest/result shape but does not compare present request.targetVersionId or scriptPatchVersion to successful response. Correct production validator plus its existing unit tests; 101-file exception is currently test/comment-only so report exact delta before implementation.
- Accepted Canonical version resolution requires selected target and permitted requested patch to match output. Existing constructor allows self-consistent contradictory evidence; no current runtime call sites limits immediate impact.
- Subagent Review 8 CompletedModel: gpt-6-luna · XhighFound: 0 Accepted: 0 Routed: 0
- No findings recorded for this run
- Subagent Review 9 CompletedModel: gpt-6-luna · XhighFound: 0 Accepted: 0 Routed: 0
- No findings recorded for this run
- Subagent Review 10 CompletedModel: gpt-6-luna · XhighFound: 0 Accepted: 0 Routed: 0
- No findings recorded for this run
- CLI Review 23 CompletedRuntime 4m 06sFound: 2 Accepted: 0/0/1 Routed: 0
- Do not make the dependency refresh permanent.Trivial
The workflow now runs
--refresh-dependenciesfor every module on every build to work around one cached failed lookup. The contract test then requires the flag. The extra metadata checks and network exposure therefore stay after the cache problem is gone..github/workflows/ci.yml#L991-L996: remove--refresh-dependenciesand its comment. Clear the bad Gradle cache entry once instead, for example with a cache-key bump or a cache purge. Alternatively, refresh only on a retry after a resolution failure.dev-tools/tests/ci-lightweight-scope-contract.sh#L246-L257: assert./gradlew :${{ matrix.module }}:check -PfullCheckwithout the refresh flag.
As per path instructions, workflows must be checked for "cache correctness, duplication, and CI cost."
- Rejected Refresh repairs restored negative Boot4.1.1 metadata: CI37847761035, fix c5152a65f, explanation af682a951. Removing it lacks restored-cache success proof or an alternative invalidation repair; retain it until that evidence exists.
- Use insertion-ordered maps for the fresh-graph declaration.Trivial
Map.ofhas an unspecified iteration order. The JDK randomizes that order for each JVM run. Lines 265-285 serialize thefreshGraphDeclarationfromMap.of. Line 330 embeds that serialized order into the World revision payload.DraftCommitBindingkeeps the payload text exactly. The values below can therefore change from one JVM run to the next:- the binding digest
- the World operation bytes
- the graph digest
- the receipt digest
- every policy-set digest derived from
startLocationEvidence()
Current assertions compare values only within one run, so they still pass. This fixture describes itself as "exact" reusable evidence. If a test later pins a literal vector, that test will fail intermittently. Failures will also be hard to reproduce. The same problem applies to the nested
familyCountsentries.♻️ Proposed deterministic declaration
- String declaration = - JSON.writeValueAsString( - Map.of( - "tenantId", TENANT_ID.toString(), - "versionId", VERSION_ID.toString(), - "startLocation", - Map.of( - "tenantId", TENANT_ID.toString(), - "versionId", VERSION_ID.toString(), - "roomTemplateId", ROOM_TEMPLATE_ID.toString()), - "familyCounts", - List.of( - Map.of("family", "WORLD_DESIGN_AGGREGATE_TYPE_REGION", "count", 1), - ...))); + var start = new java.util.LinkedHashMap<String, Object>(); + start.put("tenantId", TENANT_ID.toString()); + start.put("versionId", VERSION_ID.toString()); + start.put("roomTemplateId", ROOM_TEMPLATE_ID.toString()); + var counts = new java.util.ArrayList<Map<String, Object>>(); + for (var entry : List.of( + Map.entry("WORLD_DESIGN_AGGREGATE_TYPE_REGION", 1), + Map.entry("WORLD_DESIGN_AGGREGATE_TYPE_ZONE", 1), + Map.entry("WORLD_DESIGN_AGGREGATE_TYPE_ROOM", 1), + Map.entry("WORLD_DESIGN_AGGREGATE_TYPE_ROOM_EXIT", 0), + Map.entry("WORLD_DESIGN_AGGREGATE_TYPE_GENERATION_RULE", 0), + Map.entry("WORLD_DESIGN_AGGREGATE_TYPE_WORLD_ENTITY_SPAWN_BINDING", 0))) { + var count = new java.util.LinkedHashMap<String, Object>(); + count.put("family", entry.getKey()); + count.put("count", entry.getValue()); + counts.add(count); + } + var root = new java.util.LinkedHashMap<String, Object>(); + root.put("tenantId", TENANT_ID.toString()); + root.put("versionId", VERSION_ID.toString()); + root.put("startLocation", start); + root.put("familyCounts", counts); + String declaration = JSON.writeValueAsString(root);- Accepted Make fresh-graph declaration fixture bytes deterministic with insertion-ordered maps while preserving exact values/list order. Existing AuthoringFixtures-owned path; bounded test-only correction pending.
- CLI Review 24 CompletedRuntime 3m 36sFound: 1 Accepted: 0/0/0 Routed: 0
- Avoid a permanent
--refresh-dependencieson every matrix module check.Trivial--refresh-dependenciesmakes Gradle revalidate all dependency metadata and artifacts against remote repositories. This change applies it to everybuild-and-testmatrix job on every run. The trigger was one cached negative resolution of Spring Boot 4.1.1 (CI 37847761035). The flag increases network time per job. It also makes every module job fail when a remote repository is slow or unavailable. The path instructions ask for attention to cache correctness and CI cost.Fix the stale cache entry once, for example by changing the Gradle cache key or clearing the affected cache entry. Then remove the flag. If you keep the flag, add a removal trigger to the comment. Update
dev-tools/tests/ci-lightweight-scope-contract.shat the same time, because it pins the exact command.♻️ Proposed change
- # Cached negative Spring Boot 4.1.1 resolution requires metadata revalidation (CI 37847761035). - name: 🧪 Run Gradle Checks id: checks run: | echo "::group::Run Module Validation" - ./gradlew --refresh-dependencies :${{ matrix.module }}:check -PfullCheck + ./gradlew :${{ matrix.module }}:check -PfullCheck echo "::endgroup::"As per path instructions: "Focus on workflow correctness, permissions scope, secret handling, cache correctness, duplication, and CI cost."
- Rejected Repeat of the rejected cache-refresh suggestion: removal would undo the evidenced restored-cache CI repair (37847761035). No passing restored-cache proof or verified replacement invalidation is supplied.
Routed Findings
No routes recorded
Unlinked items
no items unlinked