FireMUD Delivery Status

PR data refreshed

PR #3151 review history

Publish immutable assets and complete v2 launch bindings

Unit 1A · identity, Account and public JOIN

Review rounds

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

Hosted CodeRabbit2 completed
10/10/02/1/0
CLI CodeRabbit7 completed
6/6/05/5/06/6/02/2/03/3/0
Subagent Review3 completed
1/1/03/3/00/0/0

Recorded review history

Reviews and findings

  1. Subagent Review 1 CompletedModel: gpt-6-luna · Xhigh
    Found: 1 Accepted: 1 Routed: 0
    1. 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.
  2. Subagent Review 2 CompletedModel: gpt-6-luna · Xhigh
    Found: 3 Accepted: 3 Routed: 0
    1. 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.
    2. 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.
    3. 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.
  3. Subagent Review 3 CompletedModel: gpt-6-luna · Xhigh
    Found: 0 Accepted: 0 Routed: 0
    1. No findings recorded for this run
  4. CLI Review 1 CompletedRuntime 4m 49s
    Found: 4 Accepted: 2/0/2 Routed: 0
    1. Remove the unused sourceIdentity() helper.Trivial

      No test calls sourceIdentity(). The setUp method already builds the same canonical identity inline. Delete the helper. Otherwise, use it in setUp so that the UUID fixtures exist in one place only.

      • Accepted Verified sourceIdentity helper unused and duplicates setup canonical UUID fixture; remove dead helper.
    2. The tests depend on a private method name through reflection.Trivial

      mechanicsHarness looks up reconcileFullVersionPublishMechanics by 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 an AssertionError. 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.
    3. Include the content type in the object identity, or stop comparing it during readback.Major

      prepareArtifact derives immutableObjectKey from the SHA-256 of the bytes only (artifacts/sha256/<hex>). The key has no tenant or content-type component. verifyReadback requires that the stored object's contentType equals the requested contentType. 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_type values. For example, one upload is image/png and one is application/octet-stream. The second conditional put gets a 412 response. Readback then throws IMMUTABLE_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 RepairPublishedVersionAssets fail 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.putProof accepts 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 update VersionAssetExportCandidateServiceImpl.candidateEvidence, which currently requires ARTIFACT_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.
    4. Map FULLVERSIONPUBLICATIONUNAVAILABLE to its own application error in PublishVersion.Major

      Map `FULL_VERSION_PUBLICATION_UNAVAILABLE` to its own application error in `PublishVersion`.

      reconcileFullVersionPublish now throws FullVersionPublicationUnavailableException for every fresh or PENDING request. The exception message starts with FULL_VERSION_PUBLICATION_UNAVAILABLE:. GameDesignGrpcService.publishVersion (Lines 219-266, unchanged) has no catch for MutationOwnerProofUnavailableException. Its publishAttemptErrorCode switch does not list FULL_VERSION_PUBLICATION_UNAVAILABLE, so it returns null. The result depends on the exception's superclass:

      • If the superclass is IllegalArgumentException, the response code is INVALID_ARGUMENT.
      • If the superclass is IllegalStateException, the code calls GrpcAppErrors.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.md Line 157. compareAndSetVersionState (Lines 821-824) already uses the correct pattern. Apply the same catch in publishVersion, 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 GameDesignGrpcServiceTest case that asserts the response code is FULL_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.
  5. CLI Review 2 CompletedRuntime 4m 04s
    Found: 6 Accepted: 1/4/1 Routed: 0
    1. 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.save now uses a state_epoch predicate and requires one affected row. asset-storage.md Line 13 documents this.
      • Line 27 says CompareAndSetVersionState "accepts any non-null lifecycle enum and saves it". State-changing requests now fail closed with VERSION_STATE_MUTATION_UNAVAILABLE.
      • Line 29 says "The current catch path still attempts that delete". failDefinitively now retains the Version, and asset-storage.md Line 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.
    2. Use the shared Testcontainers image helper.Minor

      This test hard-codes postgres:16-alpine. The other Game Design PostgreSQL integration tests use TestContainerImages.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.
    3. Do not use HTTP 400 for the owner-proof refusal.Minor

      MutationOwnerProofUnavailableException means 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 from INVALID_ARGUMENT. Return 403 or 503 instead, depending on the documented semantics. The structured errorCode stays 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 AssetControllerTest Line 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.
    4. Bound the repeated full-byte snapshot reads before this path becomes reachable.Trivial

      One exportAssets call loads the full game_assets.data for every mapped asset at least five times:

      • freezeOrReadSnapshot, which also does its own readback in VersionAssetPublicationServiceImpl
      • readFrozenSnapshot
      • recordExportCandidate
      • readExportCandidate

      recordExportCandidate and readExportCandidate each call readAndValidateSnapshot. In addition, AssetSelection.bytes() clones the array on every call. validateAndOrderSnapshot, requireSameSnapshot (both sides), prepareArtifact, and candidateEvidence each 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.
    5. Do not let deployment config change the attested manifest bytes.Major

      prepareArtifact puts publicBaseUrl + "/" + immutableObjectKey into every manifest entry. serializeManifest writes that url into the manifest bytes, so it becomes part of manifestHash. repairPublishedAssets rebuilds the manifest from the current asset.store.public-base-url. If an operator changes the public origin (CDN migration, host rename) after publication, repair produces a different manifestHash. Two failures follow:

      • requireExistingCandidate throws ASSET_EXPORT_CANDIDATE_CONFLICT. Before this check, the candidate comparison already fails.
      • If that check passes, requireExactRepairMatch throws REPAIR_ATTESTATION_MISMATCH. VersionAssetArtifactServiceImpl then 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.md requires 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 url from 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.
    6. 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.md Line 78 changes to say the opposite. That line states that the current proto has no tenant field, that the gRPC mapper does not emit tenantId, 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.md limitation. 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.
  6. Hosted Review 1 CompletedRuntime 8m 07s
    Found: 10 Accepted: 0/8/2 Routed: 0
    1. Fix the stale export-layout claim for POST /assets.Minor

      Line 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> and manifests/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.
    2. A failed temp-file cleanup turns a completed export into a definitive failure.Minor

      PrivateStaging.close() rethrows an IOException when Files.deleteIfExists fails. The try-with-resources block calls close() after every object write and readback has already succeeded. The catch (IOException) at Line 203 then throws ASSET_PRIVATE_STAGING_UNAVAILABLE. That exception is not an AssetExportOutcomePendingException. As a result, VersionPublishCommandServiceImpl sends it to failDefinitively and marks the attempt FAILED. 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 the IOException mapping 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.
    3. Remove the unreachable createBundle helper or wire it to a real caller.Trivial

      createFullVersionBundle now throws PUBLISH_SELECTION_REQUIRED unconditionally. No code calls createBundle, and PMD reports it as UnusedPrivateMethod. 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 the versionRepository dependency 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.
    4. Fix the stale purge-finalization status.Minor

      Line 16 says that live FinalizePurgeVersionAssets "still selects deletion from exported_version_number". This implies that a deletion can still be issued. In the code, AssetExportServiceImpl.deleteExportedAssets now always throws CONTENT_ADDRESSED_PURGE_PROOF_REQUIRED and 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.
    5. Two denial cases fail on a different check than the one they target.Minor

      validParticipants() uses commit "commit-12" and World Management digest schema 3. assertDenied() checks only the COMPLETE_LAUNCH_BINDING_ prefix. Because of this, two cases fail on an earlier check:

      • missingAbility (index 2) uses "commit-1". requireParticipantEvidence throws PARTICIPANT_COMMIT_MISMATCH before it reaches the ability-schema check. ABILITY_SCHEMA_EVIDENCE_MISSING is never exercised.
      • wrongAbilityOwner (index 0) uses digest schema 2. The supported-schema check throws PARTICIPANT_EVIDENCE_INVALID first. ABILITY_SCHEMA_EVIDENCE_OWNER_MISMATCH is never exercised.

      The failed case at lines 588-601 has the same schema-2 problem.

      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 assert COMPLETE_LAUNCH_BINDING_ABILITY_SCHEMA_EVIDENCE_MISSING, ..._PARTICIPANT_COMMIT_MISMATCH and ..._ABILITY_SCHEMA_EVIDENCE_OWNER_MISMATCH.

      • Accepted Participant replacement fixtures fail earlier commit/schema checks; fix fixtures and assert exact intended errors.
    6. The command-validation and duplicate-bundle tests pass for the wrong reason.Trivial

      createFullVersionBundle throws IllegalStateException before it reads any repository. Four tests stub repository rows and then expect IllegalStateException:

      • createFullVersionBundleRejectsDuplicateAttestation
      • createFullVersionBundleRejectsDuplicateCommandDefinitionAlias
      • createFullVersionBundleRejectsDuplicateCanonicalCommandIds
      • createFullVersionBundleRejectsCanonicalIdAndAliasCollisions

      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_REQUIRED message and verifyNoInteractions(...). legacyFullVersionBundleDoesNotReachMutableCommandValidation already uses that pattern.

      • Accepted Duplicate tests never reach named checks under unconditional legacy refusal; retain exact fail-closed assertions.
    7. Do not open a second pooled connection while this transaction holds row locks.Minor

      recordInOwnerTransaction runs inside ownerWrite (REQUIRES_NEW). At Line 152 it already holds FOR UPDATE locks on the Game, publish attempt, Version, and artifact rows. readAndValidateSnapshot then calls publicationService.readFrozenSnapshot. That call runs in its own ownerRead template, which is also REQUIRES_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. readInOwnerTransaction at Line 212 has the same nesting.

      Fix: read and validate the snapshot through VersionAssetPublicationRepository in 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.
    8. 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.
    9. A recognized repair code without a colon crashes with ArrayIndexOutOfBoundsException.Minor

      isRepairAttestationFailure matches on a bare prefix. The catch block then reads ex.getMessage().split(":", 2)[1]. If a matched message has no colon, the split returns a single element and index [1] throws ArrayIndexOutOfBoundsException. AssetExportServiceImpl.repairPublishedAssets creates exactly that message at Line 120: new IllegalStateException(PublishedReleaseBundleContract.REPAIR_ATTESTATION_MISMATCH). Any SCHEMA_VERSION_UNSUPPORTED message 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.
    10. Update the stale CAS paragraph at Line 206 to match the deny-only status.Minor

      Line 27 now says CompareAndSetVersionState refuses every state-changing request before it updates the Version. Line 206 still says the current VersionService "performs an unconditional row-ID save, so concurrent state writers can overwrite one another". VersionServiceImpl.compareAndSetVersionState no 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.
  7. CLI Review 3 CompletedRuntime 3m 57s
    Found: 6 Accepted: 0/2/4 Routed: 0
    1. Do not count the fixture's own repository call in times(2).Trivial

      stubRetainedBaselineSeedData() calls versionAssetArtifactRepository.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.
    2. Correct the stale upload-persistence statement.Minor

      Lines 348-349 still say that GameAssetRepository and GameAssetServiceImpl "persist uploads through the service-local jOOQ/PostgreSQL data boundary." This PR changes GameAssetServiceImpl.uploadAsset to refuse before it accesses MultipartFile or 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.
    3. These rejection tests now pass because of the fail-closed guard, not because of the named checks.Trivial

      legacyFullVersionBundleFailsClosedBeforeReadingMutableSources shows the new contract: createFullVersionBundle throws IllegalStateException before it touches repository, revisionRepository, or versionRepository. legacyFullVersionBundleDoesNotReachMutableCommandValidation confirms the same result with emptyManifest().

      These tests use the same input shape:

      • createFullVersionBundleRejectsDuplicateAttestation
      • createFullVersionBundleRejectsDuplicateCommandDefinitionAlias
      • createFullVersionBundleRejectsDuplicateCanonicalCommandIds
      • createFullVersionBundleRejectsCanonicalIdAndAliasCollisions

      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.
    4. Remove the uncalled createBundle helper or make the refusal explicit at the caller.Trivial

      createFullVersionBundle now always throws PUBLISH_SELECTION_REQUIRED. The private createBundle method on lines 65-123 has no caller. This has two effects:

      • The code is dead, and SpotBugs UPM_UNCALLED_PRIVATE_METHOD targets this pattern.
      • VersionPublishCommandServiceImpl.finalizeFullVersion calls createFullVersionBundle, 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 in api-contracts.md actually exercises.

      Choose one fix:

      • Delete createBundle until 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 the versionRepository dependency if nothing else uses it.

      • Accepted Private createBundle has no caller; remove it and unused write-only dependencies without enabling publication.
    5. 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 throws ASSET_EXPORT_CANDIDATE_CONFLICT, which is also an IllegalStateException. 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 recordExportCandidate was 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.
    6. Align the AR-1.5 verification claim with the deny-only publication boundary.Minor

      The AR-1.5 row still rates verification as proven for "current revision/version publication" and "happy-path release-bundle … seams." This PR removes both paths:

      • VersionPublishCommandServiceImpl.reconcileFullVersionPublish denies every fresh and PENDING full-version request.
      • PublishedReleaseBundleServiceImpl.createFullVersionBundle now always throws PUBLISH_SELECTION_REQUIRED.

      No current happy-path bundle creation exists to prove, so the row contradicts lines 35 and 146 of this tracker.

      Narrow the proven scope 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 "implemented does not imply proven."

      • Accepted Tracker claims happy-path publication despite deny-only ingress; narrow proof to refusal, terminal replay and bundle readback.
  8. CLI Review 4 CompletedRuntime 3m 55s
    Found: 5 Accepted: 0/2/3 Routed: 0
    1. 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, as CompleteLaunchBindingServiceImplTest.assertDenied(String) does.

      • services/game-design-service/src/test/java/unit/net/firedevops/firemud/gamedesign/service/impl/LaunchDescriptorServiceImplTest.java#L195-L204: add an expectedCodePrefix parameter to assertSelectorResolutionRejected and assert denied.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 to assertSelectorRepairRejected and 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.
    2. Remove the stale manifest.json object-key claim.Minor

      This line says the private export mechanics "write a manifest.json". AssetExportServiceImpl writes the manifest only to manifests/sha256/<digest> (MANIFEST_OBJECT_ROOT). The service never writes a manifest.json object key. api-contracts.md Line 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.
    3. 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. If PublishedWorldSelectorFixtures.evidence is 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 one selector variable.

      ♻️ 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.
    4. Do not treat a STAGED artifact with recorded candidate evidence as an absent publication.Minor

      exportAssets records and independently reads back candidate evidence before it writes any object. After that, writeAndVerifyImmutableObject can fail definitively, for example with an ImmutableObjectConflictException on 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). readPublication then calls this method. The candidate matches the artifact hash and keys, so the method returns PublicationReadback.absent(). failDefinitively marks the attempt FAILED. It skips markFailed because exportedManifest == null.

      The result is a FAILED attempt with an orphaned STAGED artifact. That artifact holds candidate evidence and possibly written objects. TombstoneVersionAssets accepts only FAILED/PURGE_FAILED, so it cannot recover the row. This breaks the asset-storage.md rule: STAGED -> FAILED only 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, return false so 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.
    5. Give the retired version a version number that differs from exportedVersionNumber.Trivial

      The 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 if finalizePurgeVersionAssets reads the number from the Version row. Before this change the version row was absent, so the old test proved the claim. Set a different number on retiredVersion so 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.
  9. CLI Review 5 CompletedRuntime 4m 00s
    Found: 6 Accepted: 0/5/1 Routed: 0
    1. 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.
    2. Do not drop file-name drift in the join. Let the explicit check reject it.Minor

      lockMappedSourceAssets joins on ga.file_name = va.usage_key. A mapping whose source row was renamed after association therefore disappears from selected. The check !Objects.equals(source.usageKey(), source.fileName()) at lines 126-129 can never fire. freezeOrReadSnapshot then inserts a snapshot with fewer items than the mapping set. readSnapshot fails 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.
    3. Make the origin-validation test fail when origin validation is removed.Minor

      exporter.exportAssets already records a candidate with origin https://assets.example.invalid/assets. Each later recordExportCandidate call with any different origin is rejected by the candidate-immutability check (ASSET_EXPORT_CANDIDATE_CONFLICT). candidateOriginIsImmutableAndMissingRetainedOriginFailsClosed proves 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.
    4. 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.repairPublishedAssets calls only readFrozenSnapshot. It never freezes a snapshot. When no frozen snapshot exists, repair fails closed with VERSION_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.
    5. 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_artifact through EXPORTED_UNATTESTED and PUBLISHED. The current ingress refuses fresh and PENDING publication before mutation. Only the private mechanics seam performs that transition.
      • Lines 348-349 still say GameAssetServiceImpl persists 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.
    6. Isolate the unsupported-schema case from the commit mismatch.Trivial

      The unsupported participant sets appliedCommitId to "commit-1". Every other participant uses "commit-12". The participant therefore has two defects: digest schema 99 and a shared-commit mismatch. assertDenied() accepts any COMPLETE_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() with assertDenied("<reason emitted for an unsupported participant schema>").

      • Accepted Accepted Trivial: unsupported participant also mismatches commit; isolate schema99 with commit12 and assert PARTICIPANT_EVIDENCE_INVALID.
  10. CLI Review 6 CompletedRuntime 3m 53s
    Found: 2 Accepted: 0/0/2 Routed: 0
    1. 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 are null. The read path can throw IllegalArgumentException while 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.
    2. The origin-validation test can pass because of the immutability conflict.Trivial

      exportAssets already records a candidate with https://assets.example.invalid/assets. A later recordExportCandidate call 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.
  11. Hosted Review 2 CompletedRuntime 8m 08s
    Found: 2 Accepted: 0/1/0 Routed: 0
    1. 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 STAGED artifact with no recorded candidate. VersionPublishCommandServiceImpl.isExactPendingStagedCandidate implements the Line 23 rule. stageExport creates that empty STAGED row 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.
    2. Every snapshot read hashes all frozen source bytes in PostgreSQL.Trivial

      readSnapshot runs sha256(ga.data) and octet_length(ga.data) for every snapshot item. The method has no item-count bound. A single exportAssets call reaches readSnapshot about six times:

      • freezeOrReadSnapshot reads once inside the write transaction.
      • VersionAssetPublicationServiceImpl reads once to verify the commit.
      • AssetExportServiceImpl performs an independent read.
      • VersionAssetExportCandidateServiceImpl reads during the pre-record candidate read, the record, and the post-record read.

      readFrozenAssetBytes then hashes each asset again. Each asset can be up to 25 MiB. Both transaction templates set setTimeout(15). A large mapped set can therefore exceed the timeout in the repeated readback transactions. The candidate path then classifies the failure as ASSET_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.
  12. CLI Review 7 CompletedRuntime 4m 17s
    Found: 3 Accepted: 0/2/1 Routed: 0
    1. Add V50 as an AR-1.4 production anchor. Record the release v2 selector work in the tracker.Minor

      Current 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.4 row does not list V50__freeze_asset_export_candidate_public_origin.sql in its implementation anchors. It lists V37 and V38 only.

      This change also adds the release v2 World selector-evidence boundary in three places:

      • V49__published_world_start_location_evidence.sql
      • V49.1__selected_world_release_participant_schema.sql
      • PublishedReleaseBundleContract.requireSelectorBinding

      No capability row, implementation record, or validation entry in the tracker records this boundary or its proof status. PublishedWorldSelectorSchemaMigrationIntegrationTest is 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.
    2. The origin-format test passes even if origin validation is missing.Minor

      candidateOriginMustUseCanonicalHttpsAssetsPath first calls exporter.exportAssets(...). That call records a candidate with origin https://assets.example.invalid/assets. Each later recordExportCandidate call then sends a different origin.

      candidateOriginIsImmutableAndMissingRetainedOriginFailsClosed shows that any different origin is already rejected as a candidate conflict. So each loop iteration throws IllegalStateException because 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 exportAssets call 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.
    3. 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 same MANIFEST_HASH. In repairFailsClosedWhenAttestedArtifactDigestDrifts, the artifact and the bundle both use logoProof(LOGO_DIGEST). In both tests, the mocked assetExportService.repairPublishedAssets throws REPAIR_ATTESTATION_MISMATCH without any condition.

      So both tests prove only that VersionAssetArtifactServiceImpl propagates the exception and records the error code and message. They do not show that drift causes a refusal. Drift detection itself is covered in PublishedReleaseBundleContractTest and VersionAssetExportCandidateServiceImplTest.

      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.

Routed Findings

0 Open0 Accepted/Fixed0 Rejected

No routes recorded

Unlinked items

no items unlinked