PR #3151 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: 1 Accepted: 1 Routed: 0
- Selector-v2 published asset repair rejects a supported complete bindingMinor
PublishedReleaseBundleContract.java:102 invokes requireSupportedSchemaForRead; AssetExportServiceImpl.java:165 invokes exact repair match before object writes. A stored complete v2 binding needs repair support under existing canonical exact-bytes repair owner contract.
- Accepted Verified repair uses v1-only schema dispatch despite supported v2 selector binding. Preserve exact manifest/digest/key checks and all denial boundaries; narrowly admit validated v2 repair. Normal v2 publication remains denied.
- Subagent Review 2 CompletedModel: gpt-6-luna · XhighFound: 3 Accepted: 3 Routed: 0
- Complete launch-binding read lacks operation-specific tenant authorizationMajor
Pinned 357/8bd full65 pass2; current handler forwards caller-selected tenant without an authenticated scope grant. Direct owner-local proof stays available.
- Accepted Same-namespace peer identity does not authorize requested tenant scope; retain candidate peer check and default-deny before owner read pending genuine operation authority.
- Selector-v2 validator omits strict manifest and participant constraintsMinor
Strengthen existing contract validator and focused descriptor/repair negative proof; preserve complete-read typed errors and no new validator family.
- Accepted Existing descriptor/repair selector validator must reject unsupported schemas and invalid participant order/errors/ability owner like complete attestation already does.
- Versioning implementation status retains obsolete repair orderingTrivial
Canonical current status contradicts new source snapshot/candidate/repair ordering; target semantics unchanged.
- Accepted Update only the asset repair implementation-status paragraph to current durable pre-write mechanics with physical and lifecycle-fence proof limits.
- Subagent Review 3 CompletedModel: gpt-6-luna · XhighFound: 0 Accepted: 0 Routed: 0
- No findings recorded for this run
- CLI Review 1 CompletedRuntime 4m 49sFound: 4 Accepted: 2/0/2 Routed: 0
- Remove the unused
sourceIdentity()helper.TrivialNo test calls
sourceIdentity(). ThesetUpmethod already builds the same canonical identity inline. Delete the helper. Otherwise, use it insetUpso that the UUID fixtures exist in one place only.- Accepted Verified sourceIdentity helper unused and duplicates setup canonical UUID fixture; remove dead helper.
- The tests depend on a private method name through reflection.Trivial
mechanicsHarnesslooks upreconcileFullVersionPublishMechanicsby its string name. If someone renames that method or changes its signature, the compiler gives no error. About 20 tests then fail at runtime with anAssertionError. Make the method package-private, because the test is in the same package. Then call it directly so the compiler checks the call.- Accepted Verified reflection harness bypasses compiler signature checks; package-private internal mechanics and direct test call preserve public deny-first ingress.
- Include the content type in the object identity, or stop comparing it during readback.Major
prepareArtifactderivesimmutableObjectKeyfrom the SHA-256 of the bytes only (artifacts/sha256/<hex>). The key has no tenant or content-type component.verifyReadbackrequires that the stored object'scontentTypeequals the requestedcontentType. The first writer of a byte sequence therefore fixes the content type for every later writer.Triggers:
- Two mapped assets in one snapshot have identical bytes and different
content_typevalues. For example, one upload isimage/pngand one isapplication/octet-stream. The second conditional put gets a 412 response. Readback then throwsIMMUTABLE_OBJECT_CONFLICT. - Tenant A exports some bytes with content type X. Tenant B later exports the same bytes with content type Y. B's export and B's
RepairPublishedVersionAssetsfail permanently. A tenant that knows another tenant's asset bytes can block that tenant's export or repair. The conflict also tells B that some other tenant already stored those exact bytes.
VersionAssetExportCandidateServiceImpl.putProofaccepts these candidates because it compares only key and digest. The failure therefore occurs after the candidate commits, so the candidate stays durable and every retry fails.Use one of these fixes:
- Derive the key from both the content type and the digest, for example
artifacts/sha256/<hex>/<urlencoded contentType>. Then updateVersionAssetExportCandidateServiceImpl.candidateEvidence, which currently requiresARTIFACT_OBJECT_ROOT + digest. - Keep byte-only keys and drop the content-type comparison in
verifyReadback. The manifest entry then becomes the only content-type authority. Delivery must not depend on object metadata.
Also applies to: 510-523
- Accepted Verified shared byte-only keys conflict on first-writer contentType metadata. Keep canonical byte identity; verify exact bytes/length/digest and use bound manifest contentType authority.
- Two mapped assets in one snapshot have identical bytes and different
- Map
FULLVERSIONPUBLICATIONUNAVAILABLEto its own application error inPublishVersion.MajorMap `FULL_VERSION_PUBLICATION_UNAVAILABLE` to its own application error in `PublishVersion`.
reconcileFullVersionPublishnow throwsFullVersionPublicationUnavailableExceptionfor every fresh orPENDINGrequest. The exception message starts withFULL_VERSION_PUBLICATION_UNAVAILABLE:.GameDesignGrpcService.publishVersion(Lines 219-266, unchanged) has no catch forMutationOwnerProofUnavailableException. ItspublishAttemptErrorCodeswitch does not listFULL_VERSION_PUBLICATION_UNAVAILABLE, so it returnsnull. The result depends on the exception's superclass:- If the superclass is
IllegalArgumentException, the response code isINVALID_ARGUMENT. - If the superclass is
IllegalStateException, the code callsGrpcAppErrors.internal. That path logs and counts an internal failure for the documented normal denial.
In both cases, callers cannot distinguish the documented denial from bad input or a server fault. That breaks the deterministic application-error contract stated in
api-contracts.mdLine 157.compareAndSetVersionState(Lines 821-824) already uses the correct pattern. Apply the same catch inpublishVersion, and confirm that the Temporal activity propagation preserves the code.Proposed fix in
GameDesignGrpcService.publishVersion} catch (AdminAuthorizationException ex) { builder.setError( GrpcAppErrors.error( meterRegistry, logger, "PublishVersion", "PERMISSION_DENIED", ex.getMessage())); + } catch (MutationOwnerProofUnavailableException ex) { + builder.setError( + GrpcAppErrors.error( + meterRegistry, logger, "PublishVersion", ex.errorCode(), ex.getMessage())); } catch (IllegalArgumentException ex) {Add a focused
GameDesignGrpcServiceTestcase that asserts the response code isFULL_VERSION_PUBLICATION_UNAVAILABLE.- Accepted Typed full-version owner-proof denial extends IllegalStateException and is mapped INTERNAL by PublishVersion; preserve deterministic application errorCode using typed catch and focused proof.
- If the superclass is
- CLI Review 2 CompletedRuntime 4m 04sFound: 6 Accepted: 1/4/1 Routed: 0
- Update the adjacent Implementation Status paragraphs that this change makes obsolete.Minor
Line 33 now describes the new durable snapshot/candidate repair behavior. The unchanged paragraphs next to it still contradict this PR and the other updated architecture docs:
- Line 25 says "both artifact and Version lifecycle saves lack database epoch predicates and affected-row CAS proof".
VersionAssetArtifactRepository.savenow uses astate_epochpredicate and requires one affected row.asset-storage.mdLine 13 documents this. - Line 27 says
CompareAndSetVersionState"accepts any non-null lifecycle enum and saves it". State-changing requests now fail closed withVERSION_STATE_MUTATION_UNAVAILABLE. - Line 29 says "The current catch path still attempts that delete".
failDefinitivelynow retains the Version, andasset-storage.mdLine 23/425 documents this.
Rewrite these three statements so that they match the current owner-local behavior. Keep the remaining proof gaps.
As per path instructions: "Review docs for canonical-current-state consistency. Flag obsolete transitional guidance, conflicts between architecture docs".
- Accepted Verified stale adjacent status: artifact repository has epoch predicate/affected-row CAS; Version state changes deny; failDefinitively retains Version. Align status only and preserve gaps.
- Line 25 says "both artifact and Version lifecycle saves lack database epoch predicates and affected-row CAS proof".
- Use the shared Testcontainers image helper.Minor
This test hard-codes
postgres:16-alpine. The other Game Design PostgreSQL integration tests useTestContainerImages.postgres(). With a hard-coded image, this test can run on a different PostgreSQL version than the rest of the suite. It also bypasses any registry mirror or pin that the helper applies in CI.Proposed fix
@Container - static PostgreSQLContainer<?> postgres = new PostgreSQLContainer<>("postgres:16-alpine"); + static PostgreSQLContainer<?> postgres = + new PostgreSQLContainer<>(TestContainerImages.postgres());- Accepted Confirmed hard-coded postgres16 image bypasses canonical TestContainerImages.postgres mirror/pin. Replace with shared helper; focused compile/owner check required.
- Do not use HTTP 400 for the owner-proof refusal.Minor
MutationOwnerProofUnavailableExceptionmeans the server lacks Account commit-bound authority. The request itself is valid. HTTP 400 tells Gateway, UI, and API clients that the request is malformed. Those clients then show an input error, and they cannot tell this condition apart fromINVALID_ARGUMENT. Return 403 or 503 instead, depending on the documented semantics. The structurederrorCodestays the same.Proposed fix
} catch (MutationOwnerProofUnavailableException ex) { - return ResponseEntity.status(HttpStatus.BAD_REQUEST) + return ResponseEntity.status(HttpStatus.FORBIDDEN) .body(ApiResponse.error(new ErrorDetail(ex.errorCode(), ex.getMessage())));If you change the status, update
AssetControllerTestLine 32 to match.- Accepted Confirmed owner-proof refusal is a server authority-unavailable condition, not malformed input. Return deterministic HTTP503 preserving structured code; keep INVALID_ARGUMENT400 and document boundary.
- Bound the repeated full-byte snapshot reads before this path becomes reachable.Trivial
One
exportAssetscall loads the fullgame_assets.datafor every mapped asset at least five times:freezeOrReadSnapshot, which also does its own readback inVersionAssetPublicationServiceImplreadFrozenSnapshotrecordExportCandidatereadExportCandidate
recordExportCandidateandreadExportCandidateeach callreadAndValidateSnapshot. In addition,AssetSelection.bytes()clones the array on every call.validateAndOrderSnapshot,requireSameSnapshot(both sides),prepareArtifact, andcandidateEvidenceeach call it. The target draft quota is 2 GiB per tenant. At that size, publish or repair can hold several copies of the full selection on heap and cause an OOM.Make the independent readback and candidate validation compare
(assetId, contentHash, byteSize)metadata. Load and hash bytes once, streaming per asset, only in the writer.- Accepted Repeated bulk byte payload reads are real on export/admin repair; unchecked metadata would weaken proof. Implement bounded per-asset staged byte verification with independently verified snapshot metadata, preserving exact bytes/digests before immutable writes.
- Do not let deployment config change the attested manifest bytes.Major
prepareArtifactputspublicBaseUrl + "/" + immutableObjectKeyinto every manifest entry.serializeManifestwrites thaturlinto the manifest bytes, so it becomes part ofmanifestHash.repairPublishedAssetsrebuilds the manifest from the currentasset.store.public-base-url. If an operator changes the public origin (CDN migration, host rename) after publication, repair produces a differentmanifestHash. Two failures follow:requireExistingCandidatethrowsASSET_EXPORT_CANDIDATE_CONFLICT. Before this check, the candidate comparison already fails.- If that check passes,
requireExactRepairMatchthrowsREPAIR_ATTESTATION_MISMATCH.VersionAssetArtifactServiceImplthen advances the artifact epoch and records the failure.
After that, exact-bytes repair for every existing release is permanently impossible, and recovery requires a new
versionId.asset-storage.mdrequires repair to reproduce the attested manifest from the frozen snapshot. Mutable configuration should not affect that result.Use one of these fixes:
- Remove the absolute
urlfrom the attested manifest. Let clients resolve the delivery origin from release metadata. - Persist the approved base URL in the frozen candidate evidence, and reuse that stored value during repair. Do not read the current config value.
- Accepted Verified current publicBaseUrl enters attested manifest hash and repair regenerates it from mutable config. Repair must reuse frozen delivery evidence; canonical exact bytes/readback checks remain mandatory.
- Remove the claim that the v1 release read projection carries canonical tenant identity.Minor
Line 11 says the v1 release read/seed projection "carries canonical tenant/version identity". In this PR,
api-contracts.mdLine 78 changes to say the opposite. That line states that the current proto has no tenant field, that the gRPC mapper does not emittenantId, and that consumers cannot exact-compare(tenantId, versionId). Both statements are now canonical architecture text, and they contradict each other. Line 156 repeats the stale wording in the target-field list.Align Line 11 and Line 156 with the
api-contracts.mdlimitation. Alternatively, state exactly which projection carries which identity field.Proposed wording
-The v1 release read/seed projection carries canonical tenant/version identity, an opaque release reference, manifest-schema metadata, and artifact-digest fields where present; producer population and retained-row backfill remain unproved. +The v1 release read/seed projection carries canonical version identity, an opaque release reference, manifest-schema metadata, and artifact-digest fields where present; the current proto/mapper omit `tenantId`, so consumers cannot exact-compare the requested tenant/version pair (see [API contracts](api-contracts.md#implementation-status)). Producer population and retained-row backfill remain unproved.As per path instructions: "Flag obsolete transitional guidance, conflicts between architecture docs".
- Accepted Verified live v1 proto/mapper omit tenantId while status claims canonical tenant/version pair. Qualify implementation projection; preserve normative target tenant/version fields and fixture owner-local proof.
- Hosted Review 1 CompletedRuntime 8m 07sFound: 10 Accepted: 0/8/2 Routed: 0
- Fix the stale export-layout claim for
POST /assets.MinorLine 140 says that publication "exports those bytes to version-scoped object-storage prefixes" and that content-addressed object storage is target-only. The export now writes only
artifacts/sha256/<hex>andmanifests/sha256/<hex>keys.asset-storage.md(Lines 9, 305, and 351) describes those content-addressed writes as current behavior. Update this line to describe content-addressed export. Keep "direct content-addressed upload is target-only" only if it refers to the upload path.As per path instructions: "Flag obsolete transitional guidance, conflicts between architecture docs".
- Accepted Confirmed stale version-prefix export description; current exporter uses content-addressed artifacts and manifests.
- A failed temp-file cleanup turns a completed export into a definitive failure.Minor
PrivateStaging.close()rethrows anIOExceptionwhenFiles.deleteIfExistsfails. The try-with-resources block callsclose()after every object write and readback has already succeeded. Thecatch (IOException)at Line 203 then throwsASSET_PRIVATE_STAGING_UNAVAILABLE. That exception is not anAssetExportOutcomePendingException. As a result,VersionPublishCommandServiceImplsends it tofailDefinitivelyand marks the attemptFAILED. The immutable objects and candidate evidence are already durable at that point.Fix: when
close()fails after a successful export, log the failure and do not rethrow. Keep theIOExceptionmapping only for staging failures that happen before any object write.🐛 Proposed fix
@Override - public void close() throws IOException { + public void close() { IOException failure = null; ... - if (failure != null) { - throw failure; - } + if (failure != null) { + logger.warn("Failed to delete private asset staging files", failure); + } }- Accepted Cleanup IOException after all verified writes incorrectly becomes definitive export failure; warn during cleanup while preserving prewrite staging failures.
- Remove the unreachable
createBundlehelper or wire it to a real caller.TrivialcreateFullVersionBundlenow throwsPUBLISH_SELECTION_REQUIREDunconditionally. No code callscreateBundle, and PMD reports it asUnusedPrivateMethod. The helper keeps a second version of the duplicate-bundle, canonical-identity and command-definition validation that no code runs. Future edits can change this copy without any test failing.Delete
createBundle, together with theversionRepositorydependency if nothing else uses it. If the captured-publication operation will reuse this helper later, add that caller in this change.- Accepted Uncalled createBundle and write-only dependencies are dead; remove without enabling captured publication.
- Fix the stale purge-finalization status.Minor
Line 16 says that live
FinalizePurgeVersionAssets"still selects deletion fromexported_version_number". This implies that a deletion can still be issued. In the code,AssetExportServiceImpl.deleteExportedAssetsnow always throwsCONTENT_ADDRESSED_PURGE_PROOF_REQUIREDand makes no S3 call. Every finalization therefore takes the failure branch. Lines 21 and 23 already say that physical deletion is hard-disabled. State the same current behavior here so the status notes agree.📝 Suggested wording
-- **Current purge finalization:** Live `FinalizePurgeVersionAssets` still selects deletion from `exported_version_number`. Exported objects are now content-addressed and may be shared, so this prefix selection does not establish safe deletion of those objects. ... +- **Current purge finalization:** Live `FinalizePurgeVersionAssets` calls an exporter delete that always fails with `CONTENT_ADDRESSED_PURGE_PROOF_REQUIRED` and issues no object deletion; exported objects are content-addressed and may be shared. ...As per path instructions: "Flag obsolete transitional guidance, conflicts between architecture docs".
- Accepted Confirmed deletion always refuses before S3; update current purge status.
- Two denial cases fail on a different check than the one they target.Minor
validParticipants()uses commit"commit-12"and World Management digest schema3.assertDenied()checks only theCOMPLETE_LAUNCH_BINDING_prefix. Because of this, two cases fail on an earlier check:missingAbility(index 2) uses"commit-1".requireParticipantEvidencethrowsPARTICIPANT_COMMIT_MISMATCHbefore it reaches the ability-schema check.ABILITY_SCHEMA_EVIDENCE_MISSINGis never exercised.wrongAbilityOwner(index 0) uses digest schema2. The supported-schema check throwsPARTICIPANT_EVIDENCE_INVALIDfirst.ABILITY_SCHEMA_EVIDENCE_OWNER_MISMATCHis never exercised.
The
failedcase at lines 588-601 has the same schema-2problem.If the ability-owner rules regress, these tests still pass. Use
"commit-12"and the supported schema in each replacement participant. Then assert the exact error code.Proposed fix
new PublishParticipantDigestDto( PublishParticipantKey.GAME_LOGIC.name(), Long.toString(VERSION_ID), null, - "commit-1", + "commit-12", CONTENT_DIGEST, 1, null, null, null)); @@ new PublishParticipantDigestDto( PublishParticipantKey.WORLD_MANAGEMENT.name(), Long.toString(VERSION_ID), null, - "commit-1", + "commit-12", CONTENT_DIGEST, - 2, + 3, ABILITY_SCHEMA_DIGEST, null, null));Add an
assertDenied(String expectedCode)overload. Use it to assertCOMPLETE_LAUNCH_BINDING_ABILITY_SCHEMA_EVIDENCE_MISSING,..._PARTICIPANT_COMMIT_MISMATCHand..._ABILITY_SCHEMA_EVIDENCE_OWNER_MISMATCH.- Accepted Participant replacement fixtures fail earlier commit/schema checks; fix fixtures and assert exact intended errors.
- The command-validation and duplicate-bundle tests pass for the wrong reason.Trivial
createFullVersionBundlethrowsIllegalStateExceptionbefore it reads any repository. Four tests stub repository rows and then expectIllegalStateException:createFullVersionBundleRejectsDuplicateAttestationcreateFullVersionBundleRejectsDuplicateCommandDefinitionAliascreateFullVersionBundleRejectsDuplicateCanonicalCommandIdscreateFullVersionBundleRejectsCanonicalIdAndAliasCollisions
These four tests pass whatever the stubs contain, so they do not test duplicate-bundle, alias or command-ID validation. Remove them, or rename them as fail-closed checks that assert the
PUBLISH_SELECTION_REQUIREDmessage andverifyNoInteractions(...).legacyFullVersionBundleDoesNotReachMutableCommandValidationalready uses that pattern.- Accepted Duplicate tests never reach named checks under unconditional legacy refusal; retain exact fail-closed assertions.
- Do not open a second pooled connection while this transaction holds row locks.Minor
recordInOwnerTransactionruns insideownerWrite(REQUIRES_NEW). At Line 152 it already holdsFOR UPDATElocks on the Game, publish attempt, Version, and artifact rows.readAndValidateSnapshotthen callspublicationService.readFrozenSnapshot. That call runs in its ownownerReadtemplate, which is alsoREQUIRES_NEW. Spring suspends the outer transaction and borrows a second connection from the pool. Each concurrent candidate write therefore needs two connections at the same time. Suppose the pool has N connections and N requests are inside the outer transaction. Then every inner borrow waits for the pool timeout while the row locks stay held.readInOwnerTransactionat Line 212 has the same nesting.Fix: read and validate the snapshot through
VersionAssetPublicationRepositoryin the same transaction. Because the snapshot is immutable once committed, a second option also works: read the snapshot before the write template starts and pass it in.♻️ Sketch
- ExportSnapshot snapshot = readAndValidateSnapshot(tenantId, versionNumber, version); + // Same-transaction read; no nested REQUIRES_NEW connection while holding locks. + ExportSnapshot snapshot = + validateSnapshot( + publicationRepository.readFrozenSnapshot(tenantId, versionNumber), + tenantId, versionNumber, version);- Accepted Candidate transaction nests REQUIRES_NEW snapshot read; use owning repository within existing transaction.
- Complete the retention details for these entries.Minor
Line 9 requires each retained entry to identify a remaining blocker or deliberate postponement, its reason, and a reconsideration trigger. Lines 110–113 do not say whether the stale guidance remains unresolved. Lines 115–123 describe completed events as candidate improvements without stating deliberate deferral. Lines 125–129 report an active investigation but omit its reconsideration trigger. Add the missing details to each retained entry, or omit entries that do not meet the retention rule.
As per path instructions: “Review docs for canonical-current-state consistency.”
Also applies to: 115-123, 125-129
- Accepted Retention details missing for adjacent observations; append dated per-entry deferral and reconsideration details under append-only worker authority.
- A recognized repair code without a colon crashes with
ArrayIndexOutOfBoundsException.MinorisRepairAttestationFailurematches on a bare prefix. The catch block then readsex.getMessage().split(":", 2)[1]. If a matched message has no colon, the split returns a single element and index[1]throwsArrayIndexOutOfBoundsException.AssetExportServiceImpl.repairPublishedAssetscreates exactly that message at Line 120:new IllegalStateException(PublishedReleaseBundleContract.REPAIR_ATTESTATION_MISMATCH). AnySCHEMA_VERSION_UNSUPPORTEDmessage without detail text fails the same way. The gRPC handler then returns a generic internal error instead of the stable repair code.Fix: parse the code and the detail separately, and default the detail when it is absent.
🐛 Proposed fix (catch block)
- artifact.setLastErrorCode(ex.getMessage().split(":", 2)[0]); - artifact.setLastErrorMessage(ex.getMessage().split(":", 2)[1].trim()); + String[] parts = ex.getMessage().split(":", 2); + artifact.setLastErrorCode(parts[0].trim()); + artifact.setLastErrorMessage(parts.length > 1 ? parts[1].trim() : parts[0].trim());- Accepted Bare recognized repair error has no split detail and crashes; preserve stable code with fallback detail.
- Update the stale CAS paragraph at Line 206 to match the deny-only status.Minor
Line 27 now says
CompareAndSetVersionStaterefuses every state-changing request before it updates the Version. Line 206 still says the currentVersionService"performs an unconditional row-ID save, so concurrent state writers can overwrite one another".VersionServiceImpl.compareAndSetVersionStateno longer saves anything. Two sections of the same document now describe current behavior differently. Change Line 206 so that it states the missing database CAS boundary as a target gap only, and remove the claim about the unconditional save.As per path instructions, flag "obsolete transitional guidance, conflicts between architecture docs".
- Accepted Confirmed CAS denies state changes before save; describe database CAS solely as target gap.
- CLI Review 3 CompletedRuntime 3m 57sFound: 6 Accepted: 0/2/4 Routed: 0
- Do not count the fixture's own repository call in
times(2).TrivialstubRetainedBaselineSeedData()callsversionAssetArtifactRepository.findByTenantIdAndVersionId("1", 7L)directly at Line 518. Mockito records that call. As a result,times(2)means one call from the fixture plus one call from the seeder. If the seeder reads the artifact twice, as the test name suggests, the verification fails. If the seeder reads it once, the test passes for a reason the reader cannot see.Call
clearInvocations(versionAssetArtifactRepository)at the end of the fixture helper. Then state the seeder's expected call count explicitly.♻️ Proposed change
VersionAssetArtifact artifact = versionAssetArtifactRepository.findByTenantIdAndVersionId("1", 7L).orElseThrow(); artifact.setUpdatedAt(java.time.LocalDateTime.now()); + org.mockito.Mockito.clearInvocations(versionAssetArtifactRepository, versionRepository); return artifact;- Accepted Fixture lookup is a recorded mock call; clear fixture invocations and assert the sole seeder read.
- Correct the stale upload-persistence statement.Minor
Lines 348-349 still say that
GameAssetRepositoryandGameAssetServiceImpl"persist uploads through the service-local jOOQ/PostgreSQL data boundary." This PR changesGameAssetServiceImpl.uploadAssetto refuse before it accessesMultipartFileor the repository. The changed lines 10 and 318 describe that refusal. The two statements now contradict each other in the same canonical document.Rewrite the sentence so that it says only previously retained rows exist and that new uploads are refused.
As per path instructions: "Review docs for canonical-current-state consistency. Flag obsolete transitional guidance, conflicts between architecture docs…"
📝 Proposed fix
-A basic repository (`GameAssetRepository`) and service implementation -(`GameAssetServiceImpl`) persist uploads through the service-local jOOQ/PostgreSQL data boundary. +`GameAssetRepository` reads and writes previously retained `game_assets` rows through the +service-local jOOQ/PostgreSQL data boundary. `GameAssetServiceImpl` currently refuses new uploads +before multipart or repository access; see the upload admission gap above.- Accepted Upload persistence statement contradicts upload refusal; describe retained rows and refusal before multipart/repository access.
- These rejection tests now pass because of the fail-closed guard, not because of the named checks.Trivial
legacyFullVersionBundleFailsClosedBeforeReadingMutableSourcesshows the new contract:createFullVersionBundlethrowsIllegalStateExceptionbefore it touchesrepository,revisionRepository, orversionRepository.legacyFullVersionBundleDoesNotReachMutableCommandValidationconfirms the same result withemptyManifest().These tests use the same input shape:
createFullVersionBundleRejectsDuplicateAttestationcreateFullVersionBundleRejectsDuplicateCommandDefinitionAliascreateFullVersionBundleRejectsDuplicateCanonicalCommandIdscreateFullVersionBundleRejectsCanonicalIdAndAliasCollisions
They therefore pass at the guard. Their repository and revision stubs are never used. The checks for duplicate attestation, alias, and canonical ID are no longer covered, but the test names still say they are.
Choose one fix:
- Remove these tests, or rename them and assert the fail-closed error code.
- Move these checks to a path that still runs them, such as the selector or v2 path. Then assert the specific failure message.
Also applies to: 224-224, 242-242, 260-260
- Accepted Four tests terminate at unconditional refusal and do not prove named duplicate validations; remove redundant tests and retain exact refusal checks.
- Remove the uncalled
createBundlehelper or make the refusal explicit at the caller.TrivialcreateFullVersionBundlenow always throwsPUBLISH_SELECTION_REQUIRED. The privatecreateBundlemethod on lines 65-123 has no caller. This has two effects:- The code is dead, and SpotBugs
UPM_UNCALLED_PRIVATE_METHODtargets this pattern. VersionPublishCommandServiceImpl.finalizeFullVersioncallscreateFullVersionBundle, so the package-private mechanics path cannot complete finalization against the real service. That limits what the "private mechanics" proof described in the tracker and inapi-contracts.mdactually exercises.
Choose one fix:
- Delete
createBundleuntil a captured publication operation exists. - Keep it reachable only from a documented test seam, and state in the tracker that finalization succeeds only with a mocked bundle service.
♻️ Proposed fix
throw new IllegalStateException( "PUBLISH_SELECTION_REQUIRED: full-version bundles require the captured publication operation"); } - - private PublishedReleaseBundleDto createBundle( - VersionDto version, - ... - return toDto(repository.save(entity)); - }Remove
isCanonicalNonNilUuid, and theversionRepositorydependency if nothing else uses it.- Accepted Private createBundle has no caller; remove it and unused write-only dependencies without enabling publication.
- The code is dead, and SpotBugs
- Isolate each invalid-origin iteration and assert that no candidate is recorded.Trivial
All iterations share one
storedCandidate. Suppose the implementation records the export candidate before it validates the public origin. Then the first iteration stores a candidate with the invalid origin. Every later iteration then throwsASSET_EXPORT_CANDIDATE_CONFLICT, which is also anIllegalStateException. In that case the loop passes but does not prove origin validation for six of the seven inputs. The test also does not check the candidate write, which is a durable write before any S3 call.Reset the stored candidate in each iteration. After the loop, assert that
recordExportCandidatewas never called.♻️ Proposed change
for (String invalidBaseUrl : Arrays.asList( ...)) { + storedCandidate.set(null); AssetExportServiceImpl invalidService = newService(invalidBaseUrl); assertThrows( IllegalStateException.class, () -> invalidService.exportAssets(TENANT_ID, VERSION_NUMBER), String.valueOf(invalidBaseUrl)); + assertEquals(null, storedCandidate.get(), String.valueOf(invalidBaseUrl)); } verifyNoInteractions(s3Client); + verify(candidateService, never()) + .recordExportCandidate(any(String.class), anyInt(), any(FrozenAssetExportCandidate.class));- Accepted Invalid-origin loop shares mutable candidate state; isolate each input and prove no durable candidate record.
- Align the
AR-1.5verification claim with the deny-only publication boundary.MinorThe
AR-1.5row still rates verification asprovenfor "current revision/version publication" and "happy-path release-bundle … seams." This PR removes both paths:VersionPublishCommandServiceImpl.reconcileFullVersionPublishdenies every fresh andPENDINGfull-version request.PublishedReleaseBundleServiceImpl.createFullVersionBundlenow always throwsPUBLISH_SELECTION_REQUIRED.
No current happy-path bundle creation exists to prove, so the row contradicts lines 35 and 146 of this tracker.
Narrow the
provenscope to what still runs:- the fail-closed gate;
- exact terminal replay;
- the bundle readback seams.
Alternatively, move the row to
audited, as this PR already did for AR-1.4.As per coding guidelines: "Keep its status, implementation record, validation, gaps, decisions, and service-map sections aligned when a domain boundary changes" and "
implementeddoes not implyproven."- Accepted Tracker claims happy-path publication despite deny-only ingress; narrow proof to refusal, terminal replay and bundle readback.
- CLI Review 4 CompletedRuntime 3m 55sFound: 5 Accepted: 0/2/3 Routed: 0
- Assert specific rejection codes in the selector-v2 rejection helpers.Trivial
Both helpers accept any
IllegalArgumentException. Each case changes one property, such as manifest schema, artifact schema, participant order, error content, or ability-schema owner. An unrelated validation failure would also pass, so the targeted check is not proven. Pass an expected code prefix into each helper and assert it, asCompleteLaunchBindingServiceImplTest.assertDenied(String)does.services/game-design-service/src/test/java/unit/net/firedevops/firemud/gamedesign/service/impl/LaunchDescriptorServiceImplTest.java#L195-L204: add anexpectedCodePrefixparameter toassertSelectorResolutionRejectedand assertdenied.getMessage().startsWith(expectedCodePrefix).services/game-design-service/src/test/java/unit/net/firedevops/firemud/gamedesign/service/impl/PublishedReleaseBundleContractTest.java#L196-L200: add the same parameter toassertSelectorRepairRejectedand assert the message prefix of the thrown exception.
- Accepted Selector negative helpers accept unrelated IllegalArgumentException; assert existing targeted code/message prefix in each mutation case.
- Remove the stale
manifest.jsonobject-key claim.MinorThis line says the private export mechanics "write a
manifest.json".AssetExportServiceImplwrites the manifest only tomanifests/sha256/<digest>(MANIFEST_OBJECT_ROOT). The service never writes amanifest.jsonobject key.api-contracts.mdLine 140 states the content-addressed layout correctly. The two documents therefore conflict about the object layout. Describe the manifest as a content-addressed manifest object.📝 Proposed wording
-- Retain previously accepted branding uploads in the Game Design persistence boundary; the current `POST /assets` path refuses before multipart access or persistence. Private export mechanics write a `manifest.json` and immutable content-addressed artifact and manifest objects. No public asset `GET`/download route exists; durable private-candidate isolation and approved public `/assets/**` delivery remain target work. +- Retain previously accepted branding uploads in the Game Design persistence boundary; the current `POST /assets` path refuses before multipart access or persistence. Private export mechanics write immutable content-addressed artifact objects (`artifacts/sha256/<digest>`) and a content-addressed manifest object (`manifests/sha256/<digest>`). No public asset `GET`/download route exists; durable private-candidate isolation and approved public `/assets/**` delivery remain target work.As per path instructions: "Review docs for canonical-current-state consistency. Flag ... conflicts between architecture docs".
- Accepted README still claims manifest.json object despite exporter only content-addressed manifest keys; correct current layout.
- Reuse one selector evidence instance for the bundle and its participants.Trivial
Line 54 calls
selectorEvidence()two times. One result builds the bundle. The other result builds the participants. IfPublishedWorldSelectorFixtures.evidenceis not deterministic, the "valid" bundle already has a selector/participant mismatch. Both later assertions would then pass for that reason and not for the schema change under test. The other tests in this file reuse oneselectorvariable.♻️ Proposed change
- var validBundle = selectorBundle(selectorEvidence(), selectorParticipants(selectorEvidence())); + var selector = selectorEvidence(); + var validBundle = selectorBundle(selector, selectorParticipants(selector));- Accepted One selector instance explicitly binds bundle and participant fixture identity and avoids duplicate construction.
- Do not treat a
STAGEDartifact with recorded candidate evidence as an absent publication.MinorexportAssetsrecords and independently reads back candidate evidence before it writes any object. After that,writeAndVerifyImmutableObjectcan fail definitively, for example with anImmutableObjectConflictExceptionon the manifest key. Some artifact objects may already be written at that point.The exception reaches
catch (RuntimeException ex) -> failDefinitively(request, attempt, version, null, ex).readPublicationthen calls this method. The candidate matches the artifact hash and keys, so the method returnsPublicationReadback.absent().failDefinitivelymarks the attemptFAILED. It skipsmarkFailedbecauseexportedManifest == null.The result is a
FAILEDattempt with an orphanedSTAGEDartifact. That artifact holds candidate evidence and possibly written objects.TombstoneVersionAssetsaccepts onlyFAILED/PURGE_FAILED, so it cannot recover the row. This breaks theasset-storage.mdrule:STAGED -> FAILEDonly after the owner proves that no external write remains unresolved.Before this change, the same state returned
partial()and stayed reconciliation-required. If a candidate exists, returnfalseso the attempt keeps that behavior. The path is currently non-ingress, so the impact is limited to the private mechanics.🐛 Proposed fix
if (candidate == null) { return artifact.manifestHash() == null && artifact.exportedManifestAssetKeys() != null && artifact.exportedManifestAssetKeys().isEmpty(); } - return Objects.equals(artifact.manifestHash(), candidate.manifestHash()) - && Objects.equals( - artifact.exportedManifestAssetKeys(), candidate.requiredManifestAssetKeys()); + // Recorded candidate evidence admits external object writes; absence is not proven. + return false;- Accepted Recorded STAGED candidate admits external writes and cannot prove absence; preserve reconciliation-required pending state after export failure.
- Give the retired version a version number that differs from
exportedVersionNumber.TrivialThe test name says the frozen export version number is used. The retired version row and the artifact both use version number
8. The test therefore passes even iffinalizePurgeVersionAssetsreads the number from theVersionrow. Before this change the version row was absent, so the old test proved the claim. Set a different number onretiredVersionso the verification at Line 407 again distinguishes the two sources.♻️ Proposed change
retiredVersion.setTenantId("tenant-1"); - retiredVersion.setVersionNumber(8); + retiredVersion.setVersionNumber(9); retiredVersion.setVersionState(VersionLifecycleState.RETIRED);- Accepted Equal Version/artifact numbers mask frozen export selection; use distinct Version9/artifact8.
- CLI Review 5 CompletedRuntime 4m 00sFound: 6 Accepted: 0/5/1 Routed: 0
- Make the projection count match the rest of the tracker.Minor
Line 80 says the producer compares the descriptor "and all four owner projections". Line 23 of this tracker and
api-contracts.md(line 27 and line 31) name three owner projections: release-bundle, artifact-state, and version-state. The fixture receipt also carries three. If the fourth item is the source evidence, name it. Otherwise, use "three".Proposed wording
-The expanded run-owned producer compares the actual committed descriptor and all four owner projections before receipt publication. +The expanded run-owned producer compares the actual committed descriptor, the committed source evidence, and the three owner projections (release-bundle, artifact-state, version-state) before receipt publication.As per coding guidelines: "Keep its status, implementation record, validation, gaps, decisions, and service-map sections aligned".
- Accepted Accepted Minor: producer comparison uses three owner projections plus source evidence; replace misleading four projection count.
- Do not drop file-name drift in the join. Let the explicit check reject it.Minor
lockMappedSourceAssetsjoins onga.file_name = va.usage_key. A mapping whose source row was renamed after association therefore disappears fromselected. The check!Objects.equals(source.usageKey(), source.fileName())at lines 126-129 can never fire.freezeOrReadSnapshotthen inserts a snapshot with fewer items than the mapping set.readSnapshotfails afterward with "Frozen snapshot no longer matches its complete Version mapping set". The transaction rolls back, so the result fails closed. However, the operator sees a generic snapshot-consistency error instead of the actual cause. Remove the file-name predicate from the join so that the dedicated check reports the drift.Proposed fix
+ "JOIN game_assets ga ON ga.tenant_id = va.tenant_id AND ga.id = va.asset_id " - + "AND ga.file_name = va.usage_key " + "WHERE va.tenant_id = ? AND va.version_id = ? "- Accepted Accepted Minor: source join drops renamed mapped rows, bypassing explicit filename-drift rejection; retain tenant/id join and prove exact drift rejection before snapshot persists.
- Make the origin-validation test fail when origin validation is removed.Minor
exporter.exportAssetsalready records a candidate with originhttps://assets.example.invalid/assets. Each laterrecordExportCandidatecall with any different origin is rejected by the candidate-immutability check (ASSET_EXPORT_CANDIDATE_CONFLICT).candidateOriginIsImmutableAndMissingRetainedOriginFailsClosedproves that behavior. As a result, this test passes even when the HTTPS, trailing-slash, userinfo, and query checks are absent.Record each invalid origin against an artifact that has no recorded candidate. Also assert that the exception message is not the conflict code.
Proposed fix
@Test void candidateOriginMustUseCanonicalHttpsAssetsPath() { - ExportedAssetManifest manifest = exporter.exportAssets(TENANT_ID, VERSION_NUMBER); + ExportedAssetManifest manifest = exporter.exportAssets(TENANT_ID, VERSION_NUMBER); for (String invalidOrigin : List.of( "http://assets.example.invalid/assets", "https://assets.example.invalid/assets/", "https://user@assets.example.invalid/assets", "https://assets.example.invalid/assets?query=1")) { - assertThrows( + // Reset to the initial staged intent so only origin validation can reject. + artifact.setManifestHash(null); + artifact.setManifestSchemaVersion(null); + artifact.setArtifactDigestsJson(null); + artifact.setPublishedObjectProofsJson(null); + artifact.setCandidateSnapshotVersionId(null); + artifact.setCandidatePublicBaseUrl(null); + artifact.setExportedManifestAssetKeysJson("[]"); + artifact.setStateEpoch(1L); + IllegalStateException thrown = + assertThrows( IllegalStateException.class, () -> candidateService.recordExportCandidate( TENANT_ID, VERSION_NUMBER, new FrozenAssetExportCandidate(manifest, invalidOrigin))); + org.junit.jupiter.api.Assertions.assertNotEquals( + "ASSET_EXPORT_CANDIDATE_CONFLICT", thrown.getMessage(), invalidOrigin); } }- Rejected Rejected: FrozenAssetExportCandidate compact constructor validates origin before recordExportCandidate runs and maps syntax errors to ASSET_EXPORT_CANDIDATE_CONFLICT. These invalid literals already exercise HTTPS/canonical slash/userinfo/query validation; retained immutability cannot mask them.
- State that repair reads the snapshot. Do not state that repair creates it.Minor
The text says "Asset repair now snapshots a durable version-scoped source".
AssetExportServiceImpl.repairPublishedAssetscalls onlyreadFrozenSnapshot. It never freezes a snapshot. When no frozen snapshot exists, repair fails closed withVERSION_ASSET_SNAPSHOT_UNAVAILABLE. As written, the sentence suggests that repair can establish a missing repair source.Proposed wording
-Asset repair now snapshots a durable version-scoped source, records and independently reads back the export candidate, checks it against the release attestation before writes, ... +Asset repair now reads and verifies the existing durable version-scoped source snapshot, independently reads back the recorded export candidate, checks it against the release attestation before writes, ...As per path instructions: "Review docs for canonical-current-state consistency."
- Accepted Accepted Minor: repair reads existing frozen snapshot and candidate; current summary incorrectly says it snapshots/records them.
- Update the stale implementation notes on publish and upload.Minor
This change makes two unchanged notes in the same list obsolete:
- Line 343 still says full-version publish moves
version_asset_artifactthroughEXPORTED_UNATTESTEDandPUBLISHED. The current ingress refuses fresh andPENDINGpublication before mutation. Only the private mechanics seam performs that transition. - Lines 348-349 still say
GameAssetServiceImplpersists uploads through jOOQ/PostgreSQL. The service now refuses before it accesses the repository.
These notes contradict lines 10, 23, and 318 of the same document.
Proposed wording
-- `version_asset_artifact` is now a persisted control-plane row and full-version publish updates it through `EXPORTED_UNATTESTED` and `PUBLISHED`. +- `version_asset_artifact` is a persisted control-plane row. Only the private, non-ingress publication mechanics move it through `EXPORTED_UNATTESTED` and `PUBLISHED`; public and registered Temporal ingress refuse fresh and `PENDING` publication before mutation. @@ -A basic repository (`GameAssetRepository`) and service implementation -(`GameAssetServiceImpl`) persist uploads through the service-local jOOQ/PostgreSQL data boundary. +`GameAssetRepository` retains the service-local jOOQ/PostgreSQL boundary for previously accepted rows. `GameAssetServiceImpl` currently refuses uploads before repository access.As per path instructions: "Flag obsolete transitional guidance".
Also applies to: 348-349
- Accepted Accepted Minor: unchanged implementation notes contradict current fail-closed public/Temporal and upload ingress; qualify private mechanics and retained repository source.
- Line 343 still says full-version publish moves
- Isolate the unsupported-schema case from the commit mismatch.Trivial
The
unsupportedparticipant setsappliedCommitIdto"commit-1". Every other participant uses"commit-12". The participant therefore has two defects: digest schema99and a shared-commit mismatch.assertDenied()accepts anyCOMPLETE_LAUNCH_BINDING_prefix. The test passes even if the unsupported-schema check is removed, because the commit-mismatch check also denies the bundle.Use
"commit-12"and assert the specific denial reason.Proposed fix
new PublishParticipantDigestDto( PublishParticipantKey.WORLD_MANAGEMENT.name(), Long.toString(VERSION_ID), null, - "commit-1", + "commit-12", CONTENT_DIGEST, 99, null, null, null));Then replace the following
assertDenied()withassertDenied("<reason emitted for an unsupported participant schema>").- Accepted Accepted Trivial: unsupported participant also mismatches commit; isolate schema99 with commit12 and assert PARTICIPANT_EVIDENCE_INVALID.
- CLI Review 6 CompletedRuntime 3m 53sFound: 2 Accepted: 0/0/2 Routed: 0
- Check the denial reason in the corrupted-selector test.Trivial
The fixture sets only
attestationSchemaVersion,tenantId,versionId, and the selector JSON.participantDigestsJson,requiredManifestAssetKeysJson, and the other required fields arenull. The read path can throwIllegalArgumentExceptionwhile it parses one of those missing fields, before it validates the selector evidence. The test checks only the exception class, so it can pass even when selector validation never runs.Fill the other fields with valid values, or assert the specific selector-validation message.
♻️ Proposed change
retained.setWorldPublishedStartLocationEvidenceJson("{}"); + retained.setParticipantDigestsJson("[]"); + retained.setRequiredManifestAssetKeysJson("[]"); + retained.setCommandDefinitionsJson("[]"); when(repository.findByTenantIdAndVersionId("tenant-1", 7L)).thenReturn(Optional.of(retained)); - assertThrows( - IllegalArgumentException.class, () -> service.getPublishedReleaseBundle("tenant-1", 7L)); + IllegalArgumentException denied = + assertThrows( + IllegalArgumentException.class, + () -> service.getPublishedReleaseBundle("tenant-1", 7L)); + // assert the selector-evidence-specific message here- Accepted Accepted Trivial: null JSON helpers already safely return absent/empty values, so provider null-parse premise is inaccurate; still exact selector error assertion is needed to pin this corrupted-evidence test to its claimed boundary and avoid other v2 contract denials masking it.
- The origin-validation test can pass because of the immutability conflict.Trivial
exportAssetsalready records a candidate withhttps://assets.example.invalid/assets. A laterrecordExportCandidatecall with any different origin fails as a candidate conflict. This happens even if origin validation is missing. The loop therefore does not prove that the four invalid origins are rejected for their format.Record each invalid origin against a fresh staged artifact that has no candidate. Also assert the validation-specific message, not only
IllegalStateException.♻️ Proposed change
@Test void candidateOriginMustUseCanonicalHttpsAssetsPath() { - ExportedAssetManifest manifest = exporter.exportAssets(TENANT_ID, VERSION_NUMBER); + // Build the manifest without recording a candidate so that origin validation is the only gate. + ExportedAssetManifest manifest = exporter.exportAssets(TENANT_ID, VERSION_NUMBER); + clearRecordedCandidate(artifact); // reset candidate columns to the initial staged intent for (String invalidOrigin :- Rejected Rejected repeated origin masking finding: FrozenAssetExportCandidate constructor validates all four URL syntax/canonicality cases before recordExportCandidate or candidate immutability. Current rejection occurs in constructor; no stale artifact reset or changed production error needed.
- Hosted Review 2 CompletedRuntime 8m 08sFound: 2 Accepted: 0/1/0 Routed: 0
- Align the private failure-handler precondition with Line 23 and the code.Minor
Line 426 says the handler requires local readback to prove that "no bundle or artifact exists". Line 23 is more precise: either no artifact, or an exact empty
STAGEDartifact with no recorded candidate.VersionPublishCommandServiceImpl.isExactPendingStagedCandidateimplements the Line 23 rule.stageExportcreates that emptySTAGEDrow before export, so the empty-artifact case is the normal one. Update Line 426 to match.📝 Suggested wording
-- Current private failure handling revalidates the pending attempt and requires its local readback to prove no bundle or artifact exists and Version remains `DRAFT` before marking failure; +- Current private failure handling revalidates the pending attempt and requires its local readback to prove no bundle, either no artifact or an exact empty `STAGED` artifact with no recorded candidate, and a Version that remains `DRAFT` before marking failure;As per path instructions: "Flag obsolete transitional guidance, conflicts between architecture docs".
- Accepted Valid Minor documentation drift: private failure readback permits absent artifact or exact empty STAGED artifact with no candidate, plus no bundle and DRAFT Version. Align existing paragraph with current guard; no behavior change.
- Every snapshot read hashes all frozen source bytes in PostgreSQL.Trivial
readSnapshotrunssha256(ga.data)andoctet_length(ga.data)for every snapshot item. The method has no item-count bound. A singleexportAssetscall reachesreadSnapshotabout six times:freezeOrReadSnapshotreads once inside the write transaction.VersionAssetPublicationServiceImplreads once to verify the commit.AssetExportServiceImplperforms an independent read.VersionAssetExportCandidateServiceImplreads during the pre-record candidate read, the record, and the post-record read.
readFrozenAssetBytesthen hashes each asset again. Each asset can be up to 25 MiB. Both transaction templates setsetTimeout(15). A large mapped set can therefore exceed the timeout in the repeated readback transactions. The candidate path then classifies the failure asASSET_EXPORT_OUTCOME_PENDING, and the export retries until it times out again.Choose one of these fixes:
- Add an explicit item-count or total-byte limit when the snapshot is frozen.
- Recompute source digests in one verification step only. Make the other readbacks compare the persisted metadata rows. V37 triggers already protect the referenced source rows.
The current publication path is private. For this reason, this is a scalability refactor and not a release blocker.
- Rejected Skipping repeated current-byte hashes weakens proven source-drift defense; a new global cap changes admitted inputs without an approved limit. No timeout demonstrated. Broad bounded-batch redesign is disproportionate to this Trivial private-path speculation; scale gap reported to Overseer.
- CLI Review 7 CompletedRuntime 4m 17sFound: 3 Accepted: 0/2/1 Routed: 0
- Add V50 as an
AR-1.4production anchor. Record the release v2 selector work in the tracker.MinorCurrent Status (Line 9) depends on V50: V50 freezes the candidate public origin, and it makes retained origin-less candidates fail closed on replay. The
AR-1.4row does not listV50__freeze_asset_export_candidate_public_origin.sqlin its implementation anchors. It lists V37 and V38 only.This change also adds the release
v2World selector-evidence boundary in three places:V49__published_world_start_location_evidence.sqlV49.1__selected_world_release_participant_schema.sqlPublishedReleaseBundleContract.requireSelectorBinding
No capability row, implementation record, or validation entry in the tracker records this boundary or its proof status.
PublishedWorldSelectorSchemaMigrationIntegrationTestis a candidate focused proof anchor. The tracker contract requires these sections to stay aligned when a domain boundary changes. As per coding guidelines: "Keep its status, implementation record, validation, gaps, decisions, and service-map sections aligned when a domain boundary changes".📝 Proposed anchor addition (excerpt)
-... [V38 published asset digest evidence](../../../services/game-design-service/src/main/resources/db/migration/V38__published_asset_digest_evidence.sql); [PublishedReleaseBundleRepository.java]... +... [V38 published asset digest evidence](../../../services/game-design-service/src/main/resources/db/migration/V38__published_asset_digest_evidence.sql); [V50 frozen candidate public origin](../../../services/game-design-service/src/main/resources/db/migration/V50__freeze_asset_export_candidate_public_origin.sql); [PublishedReleaseBundleRepository.java]...- Accepted Accepted Minor: add actual V50 anchor and release-v2 selector implementation/migration proof, with current-head physical evidence and remaining gaps.
- The origin-format test passes even if origin validation is missing.Minor
candidateOriginMustUseCanonicalHttpsAssetsPathfirst callsexporter.exportAssets(...). That call records a candidate with originhttps://assets.example.invalid/assets. Each laterrecordExportCandidatecall then sends a different origin.candidateOriginIsImmutableAndMissingRetainedOriginFailsClosedshows that any different origin is already rejected as a candidate conflict. So each loop iteration throwsIllegalStateExceptionbecause of the immutability rule. The test stays green even if the service never checks for HTTPS, a trailing slash, userinfo, or a query string.Fix the test in one of two ways:
- Remove the
exportAssetscall so the artifact is still an empty staged intent with no recorded candidate. - Or assert the specific validation message, so that a conflict exception cannot satisfy the assertion.
Proposed fix
@Test void candidateOriginMustUseCanonicalHttpsAssetsPath() { - ExportedAssetManifest manifest = exporter.exportAssets(TENANT_ID, VERSION_NUMBER); + ExportedAssetManifest manifest = exporter.exportAssets(TENANT_ID, VERSION_NUMBER); + // Reset to an exact initial staged intent so origin validation, not immutability, rejects. + artifact.setManifestHash(null); + artifact.setManifestSchemaVersion(null); + artifact.setArtifactDigestsJson(null); + artifact.setPublishedObjectProofsJson(null); + artifact.setCandidateSnapshotVersionId(null); + artifact.setCandidatePublicBaseUrl(null); + artifact.setExportedManifestAssetKeysJson("[]"); for (String invalidOrigin : List.of( "http://assets.example.invalid/assets", "https://assets.example.invalid/assets/", "https://user@assets.example.invalid/assets", "https://assets.example.invalid/assets?query=1")) { - assertThrows( + IllegalStateException thrown = assertThrows( IllegalStateException.class, () -> candidateService.recordExportCandidate( TENANT_ID, VERSION_NUMBER, new FrozenAssetExportCandidate(manifest, invalidOrigin))); + org.junit.jupiter.api.Assertions.assertNotEquals( + "ASSET_EXPORT_CANDIDATE_CONFLICT", thrown.getMessage(), invalidOrigin); } + assertEquals(null, artifact.getCandidatePublicBaseUrl()); }- Accepted Accepted Minor: generic conflict can mask removed constructor validation. Assert exact IllegalArgumentException cause/message while retaining the immutable candidate.
- Remove the
- These repair tests no longer test drift. Rename them or add a real drift case.Trivial
In
repairFailsClosedWhenManifestHashDrifts, the artifact, the candidate, and the release bundle all use the sameMANIFEST_HASH. InrepairFailsClosedWhenAttestedArtifactDigestDrifts, the artifact and the bundle both uselogoProof(LOGO_DIGEST). In both tests, the mockedassetExportService.repairPublishedAssetsthrowsREPAIR_ATTESTATION_MISMATCHwithout any condition.So both tests prove only that
VersionAssetArtifactServiceImplpropagates the exception and records the error code and message. They do not show that drift causes a refusal. Drift detection itself is covered inPublishedReleaseBundleContractTestandVersionAssetExportCandidateServiceImplTest.Pick one fix:
- Rename the tests to describe what they verify, for example
repairRecordsAttestationMismatchFromExporter. - Or make the bundle differ from the artifact candidate, and assert that the refusal happens before the exporter runs.
Also applies to: 260-305
- Accepted Accepted Trivial: mocked exporter mismatch tests prove stable error propagation/recording, so rename them to describe that proof.
- Rename the tests to describe what they verify, for example
Routed Findings
No routes recorded
Unlinked items
no items unlinked