FireMUD Delivery Status

PR data refreshed

PR #3171 review history

Bind run-owned authored-world fixture to committed owner receipts

Unit 1A · identity, Account and public JOIN

Review rounds

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

Hosted CodeRabbit2 completed
7/7/02/2/0
CLI CodeRabbit4 completed
5/5/03/3/03/2/02/2/0

Recorded review history

Reviews and findings

  1. Hosted Review 1 CompletedRuntime 8m 27s
    Found: 7 Accepted: 0/4/3 Routed: 0
    1. The unbound-row case fails at the not-found lookup, not at the fixture identity check.Minor

      activatePreparedWorldInstance first calls requireWorldInstance. The other activation tests in this file stub only findByTenantIdAndGameInstanceId, which shows that requireWorldInstance uses that method. This case stubs only findByTenantIdAndGameInstanceIdForUpdate. The unstubbed lookup returns Optional.empty() from Mockito, so activation throws the "not found" IllegalArgumentException. The fixtureModeEnabled() → fixtureIdentityConflict() branch never runs. The bare assertThrows(IllegalArgumentException.class, ...) hides this.

      Stub the plain lookup and assert the conflict prefix.

      🧪 Proposed fix

      --- "a/services/world-management-service/src/test/java/unit/net/firedevops/firemud/worldmanagement/service/impl/WorldLifecycleCommandServiceImplTest.java"
      +++ "b/services/world-management-service/src/test/java/unit/net/firedevops/firemud/worldmanagement/service/impl/WorldLifecycleCommandServiceImplTest.java"
      @@ -876,13 +876,17 @@
           when(provider.requireAuthenticatedEvidence()).thenReturn(evidence);
           when(evidence.bindingDigest(any(PreparedWorldInstanceRequest.class), anyLong()))
               .thenReturn("c".repeat(64));
           WorldInstance unbound = activeWorldInstance();
      +    when(worldInstanceRepository.findByTenantIdAndGameInstanceId(42L, 101L))
      +        .thenReturn(Optional.of(unbound));
           when(worldInstanceRepository.findByTenantIdAndGameInstanceIdForUpdate(42L, 101L))
               .thenReturn(Optional.of(unbound));
       
      -    assertThrows(
      -        IllegalArgumentException.class,
      -        () -> fixtureService(provider).activatePreparedWorldInstance(42L, 101L, 2L));
      +    IllegalArgumentException conflict =
      +        assertThrows(
      +            IllegalArgumentException.class,
      +            () -> fixtureService(provider).activatePreparedWorldInstance(42L, 101L, 2L));
      +    assertTrue(conflict.getMessage().startsWith("RUN_OWNED_WORLD_LAUNCH_IDENTITY_CONFLICT:"));
           verify(gameDesignClient, never()).getPublishedReleaseBundle(42L, 11L);
       
           WorldInstance active = boundFixtureInstance("ACTIVE", 2L);
      
      • Accepted Verified plain activation lookup is unstubbed and generic exception masks not-found; stub both lookups and assert fixture identity conflict.
    2. Add the new production and proof anchors to the GR-2.1 Capability Status row.Minor

      Line 11 states that the World launch-evidence provider, the world_instance binding digest, and the preparing-epoch persistence now exist. The GR-2.1 row (Line 29) still names only the earlier lifecycle and hold anchors:

      • RunOwnedWorldLaunchEvidenceProvider.java, RunOwnedWorldLaunchEvidence.java, and V23.0.1__world_run_owned_fixture_launch_binding.sql are not in "Implementation anchors".
      • RunOwnedWorldLaunchEvidenceMtlsIntegrationTest.java, RunOwnedWorldLaunchEvidencePostgresIntegrationTest.java, and RunOwnedWorldLaunchEvidenceProviderTest.java are not in "Proof anchors".

      Add these anchors to that row. Also mention the run-owned launch-evidence binding in its "Gap or decision" cell, so that the scan-first status surface matches the narrative.

      As per coding guidelines: "Keep its status, implementation record, validation, gaps, decisions, and service-map sections aligned when a domain boundary changes" and "the capability rows are the complete scan-first status surface."

      • Accepted Verified GR-2.1 scan row omits implemented evidence/model/migration and focused proof anchors; align without upgrading runtime proof.
    3. These file-guard tests pass even if the path, permission, and symlink checks are removed.Minor

      Each case writes "{}" as the capability and receipt content. Each case asserts only IllegalArgumentException. The malformed-wire test at Lines 93-99 shows that "{}" content fails at stage=WIRE_PARSE and also throws IllegalArgumentException. So all three cases pass even when the file guard does not reject the file.

      There is a second problem in the first case. relativeCapability comes from temporaryDirectory.resolve(...), and @TempDir gives an absolute path. The "relative path" case therefore never passes a relative path.

      Make each case fail only at the guard under test:

      • Pass a relative path, for example Path.of("capability.json").toString(), for the relative-path case.
      • Capture output and assert that the log contains stage=CAPABILITY_FILE. Also assert that it does not contain stage=WIRE_PARSE. Do this for the relative, writable, and symlink cases.

      🧪 Example fix for the relative-path case

      -  void enabledFixtureRequiresAbsoluteBoundedReadOnlyRegularWireFilesBeforeOwnerReads()
      -      throws Exception {
      +  void enabledFixtureRequiresAbsoluteBoundedReadOnlyRegularWireFilesBeforeOwnerReads(
      +      CapturedOutput output) throws Exception {
       ...
               new RunOwnedWorldLaunchEvidenceProvider(
                   true,
      -            relativeCapability.toString(),
      +            Path.of("capability.json").toString(),
                   receipt.toString(),
       ...
           assertThatThrownBy(provider::requireAuthenticatedEvidence)
               .isInstanceOf(IllegalArgumentException.class);
      +    assertThat(output)
      +        .contains("stage=CAPABILITY_FILE")
      +        .doesNotContain("stage=WIRE_PARSE");
      

      Also applies to: 155-179

      • Accepted Verified TempDir path is absolute and malformed wire yields same exception; distinct relative/writable/symlink tests must prove CAPABILITY_FILE before parse.
    4. Remove requireRunOwnedDescriptorMatchesRequest, because it duplicates requireDescriptorMatchesRequest.Trivial

      After this change, requireDescriptorMatchesRequest (Line 807-827) no longer compares against a locally built prb: reference. The two methods now have the same body: the same predicates and the same error codes. If a future change updates only one of them, the regular launch path and the run-owned launch path will validate different invariants without any warning. Call the existing method from startRunOwnedInitialLaunch and delete the copy.

      ♻️ Proposed change

      -    requireRunOwnedDescriptorMatchesRequest(request, resolvedLaunchDescriptor);
      +    requireDescriptorMatchesRequest(request, resolvedLaunchDescriptor);
      
      -  private void requireRunOwnedDescriptorMatchesRequest(
      -      StartSessionRequest request, ResolvedLaunchDescriptor descriptor) {
      -    ...
      -  }
      
      • Accepted Verified identical descriptor validators; same accepted CLI1 correction removes duplicate without behavior expansion.
    5. Three tests have the same body, so the test names claim coverage that does not exist.Trivial

      getPublishedReleaseBundleDeniesCandidateBeforeOwnerNotFoundRead, ...BeforeSchemaRead, and ...BeforeIdentityRead send the same request from the same game-session-service peer. They also make the same assertions. None of them stubs versionService to return a missing bundle, an unsupported schema, or a non-canonical identity. The names therefore describe preconditions that the tests never set up. This change also deleted the earlier tests for the NOT_FOUND and SCHEMA_VERSION_UNSUPPORTED mappings. Those catch branches in GameDesignGrpcService.getPublishedReleaseBundle are now untested.

      Make one of these two changes:

      • Combine the three tests into one parameterized denial test over the candidate peers. This change covers the requirement in version-control.md Line 139: Game Session, World Management, and Automation & Scripting, plus a wrong-namespace peer.
      • Or stub versionService in each test so that the named precondition really exists. Then verifyNoInteractions(versionService) proves that the denial happens before that specific read.

      ♻️ Example parameterized replacement

      -  @Test
      -  void getPublishedReleaseBundleDeniesCandidateBeforeOwnerNotFoundRead() {
      -    ...
      -  }
      -  @Test
      -  void getPublishedReleaseBundleDeniesCandidateBeforeSchemaRead() {
      -    ...
      -  }
      -  @Test
      -  void getPublishedReleaseBundleDeniesCandidateBeforeIdentityRead() {
      -    ...
      -  }
      +  @ParameterizedTest
      +  @ValueSource(
      +      strings = {
      +        "game-session-service",
      +        "world-management-service",
      +        "automation-scripting-service"
      +      })
      +  void getPublishedReleaseBundleDeniesCandidatePeerBeforeOwnerRead(String peer) {
      +    AtomicReference<GetPublishedReleaseBundleResponse> ref = new AtomicReference<>();
      +    underLaunchPeer(
      +        peer,
      +        () ->
      +            service.getPublishedReleaseBundle(
      +                GetPublishedReleaseBundleRequest.newBuilder()
      +                    .setTenantId("tenant-1")
      +                    .setVersionId(7L)
      +                    .build(),
      +                observerFor(ref)));
      +
      +    assertEquals("PERMISSION_DENIED", ref.get().getError().getCode());
      +    Mockito.verifyNoInteractions(versionService);
      +  }
      
      • Accepted Accept duplicate denial tests and real peer/namespace matrix. Decline restoring unreachable NOT_FOUND/schema mapping tests: canonical production read gate denies every reader before owner; no auth bypass.
    6. Align the AR-3.1 verification cell with the current launch-descriptor status.Minor

      The Verification cell still says "Game Design launch-descriptor resolution now fails closed pending canonical authored-world identity binding." The Gap or decision cell in the same row says "authenticated source-bound v1 resolution and exact descriptor readback are live." Line 77 and line 159 say the same thing as the gap cell. LaunchDescriptorServiceImpl now resolves source-bound requests. Only the legacy numeric overload fails closed. As a result, the row gives two conflicting statuses. The tracker contract requires the status, record, and gap sections to stay aligned.

      Replace the stale clause with the current state: source-bound v1 resolution and exact readback are implemented, and the legacy numeric resolution fails closed.

      📝 Proposed wording

      -| `AR-3.1` Runtime instance launch, lifecycle, and termination | `partial` | `unverified`: Game Session lifecycle, world-instance activation, failure, and termination seams remain proven; Game Design launch-descriptor resolution now fails closed pending canonical authored-world identity binding. Automation `READY` join, ...
      +| `AR-3.1` Runtime instance launch, lifecycle, and termination | `partial` | `unverified`: Game Session lifecycle, world-instance activation, failure, and termination seams remain proven; Game Design resolves source-bound v1 launch descriptors and legacy numeric-only resolution fails closed, while candidate source/receipt and physical smoke proof remain unvalidated. Automation `READY` join, ...
      

      As per coding guidelines: "Keep its status, implementation record, validation, gaps, decisions, and service-map sections aligned when a domain boundary changes."

      • Accepted Verified stale AR-3.1 Verification conflicts with live source-bound resolution; same CLI1 tracker correction keeps legacy denial and proof gaps.
    7. Check that the exact retry does not materialize the topology again.Trivial

      The test name says the exact retry does not repeat materialization. The test checks only that WorldInstance is saved once. A regression that saves the region or rooms a second time would still pass. Add checks on the topology repositories.

           verify(worldInstanceRepository, org.mockito.Mockito.times(1)).save(any(WorldInstance.class));
      +    verify(regionInstanceRepository, org.mockito.Mockito.times(1)).save(any());
      +    verify(roomInstanceRepository, org.mockito.Mockito.times(1)).save(any());
           verify(evidence, org.mockito.Mockito.times(2)).requireMatches(request);
      

      Based on learnings: "assert not only the primary persisted result but also all resulting side effects on related entities/components."

      • Accepted Verified exact retry only checks world-row save; assert each topology repository save once to prove no rematerialization.
  2. CLI Review 1 CompletedRuntime 3m 48s
    Found: 5 Accepted: 1/1/3 Routed: 0
    1. Remove the duplicated descriptor validator.Trivial

      requireRunOwnedDescriptorMatchesRequest matches requireDescriptorMatchesRequest (Lines 807-827) token for token. It has the same conditions and the same error messages. The summary says the only behavior change was removing the reconstructed-ref check, and that change is now in both copies. Call requireDescriptorMatchesRequest from startRunOwnedInitialLaunch and delete the copy. With one copy, a later change to the request-binding or completeness rules cannot reach one launch path and miss the other.

      ♻️ Proposed change

      -    requireRunOwnedDescriptorMatchesRequest(request, resolvedLaunchDescriptor);
      +    requireDescriptorMatchesRequest(request, resolvedLaunchDescriptor);
      

      Then delete requireRunOwnedDescriptorMatchesRequest.

      • Accepted Verified identical descriptor validators; one shared request/completeness guard prevents launch-path drift without semantic expansion.
    2. Extract one bounded immutable-file reader for the capability and the receipt.Trivial

      readSourceReceipt copies readCapability (Lines 378-424). The only differences are the size limit and the exception factory. RunOwnedWorldLaunchEvidenceProvider.readImmutableWireFile repeats the same algorithm a third time. The copies have already drifted. readSourceReceipt checks bytes.size() != before.size() after the read, but readCapability does not. A single helper keeps the replacement and truncation guards the same for every fixture file.

      The catch block for InvalidCapabilityException in loadSourceReceipt (Lines 117-118) is redundant. The RuntimeException catch that follows already covers that exception.

      ♻️ Proposed helper shape

      static byte[] readBoundedImmutableFile(
          Path path, int maxBytes, Supplier<? extends RuntimeException> invalid) {
        // existing before/after attribute, NOFOLLOW_LINKS, size, fileKey and read-only checks,
        // including bytes.size() == before.size()
      }
      
      static byte[] readCapability(Path path) {
        return readBoundedImmutableFile(path, MAX_CAPABILITY_BYTES,
            RunOwnedInitialAdmissionFixtureCapability::invalidCapability);
      }
      
      static byte[] readSourceReceipt(Path path) {
        return readBoundedImmutableFile(path, MAX_SOURCE_RECEIPT_BYTES,
            RunOwnedInitialAdmissionFixtureCapability::invalidSourceReceipt);
      }
      
      • Accepted Three bounded fixture readers duplicate logic and capability reader lacks byte-count equality. Consolidate at shared fixture owner preserving all read-only, link, identity and size guards.
    3. Return the bound snapshot on a fixture prepare replay. Do not reject non-PREPARING rows.Major

      Game Session sends prepareWorldInstance again on every retry while its owner row is STARTING (GameInstanceServiceImpl Lines 295-313). It expects a non-PREPARING response in that case. On that response it reloads the row and checks ACTIVE against the durable preparing epoch (Lines 339-348).

      Consider this sequence. World commits activation. The activation response is lost or times out. Game Session retries. World then reaches this branch with status == ACTIVE and throws INVALID_WORLD_INSTANCE_STATE. prepareRunOwnedWorldInstance turns that error into an IllegalStateException. Every retry fails in the same way, so the coordinator uses up its 12 attempts and never reaches a terminal result. The ambiguous-activation reconciliation path cannot complete against the real World service. The unit test runOwnedInitialLaunchRetryReconcilesAmbiguousActivationOnTheSameInstance passes only because its mock prepare returns the ACTIVE snapshot.

      The non-fixture branch (Lines 270-274) returns the snapshot regardless of status. The fixture branch has already verified the binding, so returning the snapshot here is safe.

      🐛 Proposed fix

               requireRunOwnedFixtureBinding(existing, fixtureEvidence, request);
      -        if (!STATUS_PREPARING.equals(existing.getStatus())) {
      -          throw new IllegalArgumentException(
      -              "INVALID_WORLD_INSTANCE_STATE: fixture prepare replay requires PREPARING state");
      -        }
               return snapshot(existing);
      

      If you keep the guard, allow ACTIVE when lifecycleEpoch == runOwnedFixturePreparingLifecycleEpoch + 1. Also add a World-side test that sends prepare again after activation.

      • Accepted Verified World rejects an exact bound prepare retry after activation, preventing the existing Game Session ambiguous-response reconciliation. Return the authenticated bound snapshot without mutation.
    4. Keep candidate proof and run results out of the canonical architecture contracts.Trivial

      These three edits put candidate-specific validation status into normative architecture documents: commit SHAs, Smoke run IDs, pass/skip counts, and "unrun on this candidate". The implementation trackers already record the same facts. The copies will go stale when the next candidate runs.

      • design/architecture/microservices/world-management-service/api-contracts.md#L278-L283: remove the commit/run/pass-skip ledger from Line 282 and keep one link to the fixture tracker section.
      • design/architecture/microservices/world-management-service/runtime-and-data.md#L18-L18: replace "has not been run on this candidate" with a link to the World runtime tracker.
      • design/architecture/microservices/game-session-service/api-contracts.md#L11-L12: remove "New focused proof is present but unrun; rebuilt-image smoke remains pending" and keep only the runtime tracker link.

      As per path instructions: "Architecture owns technical target state".

      • Accepted Candidate proof ledgers duplicate tracker facts in architecture; move only provenance/results to existing tracker references and retain local storage/transport technical consequences.
    5. Fix the conflicting AR-3.1 statements in the same row.Minor

      The Verification cell says "Game Design launch-descriptor resolution now fails closed pending canonical authored-world identity binding." The Gap cell in the same row says "authenticated source-bound v1 resolution and exact descriptor readback are live." Lines 77 and 159 agree with the Gap cell.

      The Verification cell is stale. The tracker contract requires the status row to stay aligned with the implementation record. Rewrite the Verification cell to name the live source-bound resolution and its remaining proof gaps. Consider adding the new focused proof anchors (LaunchDescriptorServiceImplTest, RunOwnedInitialAdmissionFixtureWireCodecTest).

      📝 Proposed wording

      -| ... | `unverified`: Game Session lifecycle, world-instance activation, failure, and termination seams remain proven; Game Design launch-descriptor resolution now fails closed pending canonical authored-world identity binding. Automation ...
      +| ... | `unverified`: Game Session lifecycle, world-instance activation, failure, and termination seams remain proven; authenticated source-bound Game Design launch-descriptor resolution and exact readback are live, while candidate PostgreSQL and rebuilt packaged Smoke proof remain unrun. Automation ...
      

      As per coding guidelines: "Keep its status, implementation record, validation, gaps, decisions, and service-map sections aligned when a domain boundary changes".

      • Accepted Verified AR-3.1 verification contradicts its own gap/implementation record; align source-bound resolution and retain unproved runtime/activation gaps.
  3. CLI Review 2 CompletedRuntime 2m 36s
    Found: 3 Accepted: 1/0/2 Routed: 0
    1. Build the receipt descriptor from the supplied bundle and versionState.Trivial

      The 4-argument validSourceReceiptJson overload builds descriptor from launchBundle() and launchVersionState(). It ignores the bundle and versionState parameters. Several rejection cases change a field that the descriptor also encodes. Examples are setVersionStateEpoch(0L), setVersionId(12L), and the changed bundle in rejectsUnknownProtobufFieldsRecursivelyInOwnerReadEvidence. In those cases the receipt descriptor no longer matches the snapshots. The parser can then reject the receipt for that mismatch instead of for the check under test. assertInvalidSourceReceipt checks only the exception type. The test therefore passes even if the intended check is removed.

      Build the descriptor from the parameters. Add a separate case for a descriptor that does not match the snapshots.

      ♻️ Proposed fix

      -    LaunchDescriptor descriptor = launchDescriptor(source, launchBundle(), launchVersionState());
      +    LaunchDescriptor descriptor = launchDescriptor(source, bundle, versionState);
      
      • Accepted Verified receipt test helper ignores supplied snapshots; align descriptor with parameters and keep separate intentional mismatch rejection proof.
    2. Use the shared immutable-file reader and wire codec instead of private copies.Trivial

      readBoundedRegularReadOnlyFile repeats RunOwnedFixtureImmutableFileReader.readBoundedImmutableFile. loadFixtureCapability/readStrictJson repeat RunOwnedInitialAdmissionFixtureWireCodec.parseCapability. The copies already behave differently:

      • sameFile here rejects a case where only one file key is null. The shared sameFileKey accepts that case.
      • The shared reader requires OWNER_READ and has a DOS fallback. This copy accepts any permission set that has no write bit.
      • The shared codec also checks the UUID format, SHA-256 pin format, and the 256-character text limit. This copy checks these differently.

      Game Design writes the receipt, and Game Session and World Management read it. If the rules drift, the producer can accept a capability that the consumers reject, which makes smoke failures hard to diagnose. Call the shared reader with a Supplier that throws IllegalStateException, and parse the capability with the shared codec. Keep only the Game Design checks: tenantId == 1, the run/project binding, and the certificate pins.

      • Accepted Verified producer duplicates reader/closed capability codec and drifts from consumers. Converge shared owner helpers; retain stricter mixed-null identity denial and producer tenant/run/certificate gates.
    3. Expect two requireAuthenticatedEvidence() calls on restartedProvider.Major

      restartedService uses restartedProvider for two calls before this verification:

      • activatePreparedWorldInstance (Line 137): the row has a binding, so WorldLifecycleCommandServiceImpl calls runOwnedWorldLaunchEvidenceProvider.requireAuthenticatedEvidence().
      • prepareWorldInstance (Line 145): configuredFixtureEvidence() calls requireAuthenticatedEvidence() again.

      verify(restartedProvider) defaults to times(1). It therefore throws TooManyActualInvocations. The test fails whenever Docker is available, so it blocks the integration test run.

      💚 Proposed fix

      -      verify(restartedProvider).requireAuthenticatedEvidence();
      +      verify(restartedProvider, org.mockito.Mockito.times(2)).requireAuthenticatedEvidence();
      
      • Accepted Verified physical World PG failure and call path: activation replay then prepare replay authenticate twice; preserve proof with intermediate1/final2 assertions.
  4. CLI Review 3 CompletedRuntime 3m 47s
    Found: 3 Accepted: 0/1/1 Routed: 0
    1. Do not call unexecuted tests "focused proof".Minor

      The first sentence says the candidate "has focused proof for immutable replay, descriptor comparison, …". The next sentence says "These tests have not been run for this candidate." Tests that have not run are not proof. The tracker contract separates implementation from proof: "implemented does not imply proven". This wording invites a reader to treat the parcel as proved. Describe them as focused test anchors that are present but not executed.

      📝 Proposed wording

      -The expanded candidate has focused proof for immutable replay, descriptor comparison, certificate-pin mismatch, malformed/unknown evidence, and bundle/template/source, artifact state/epoch, and version state/epoch mismatches. These tests have not been run for this candidate.
      +Focused test anchors exist for immutable replay, descriptor comparison, certificate-pin mismatch, malformed/unknown evidence, and bundle/template/source, artifact state/epoch, and version state/epoch mismatches. These tests have not been run for this candidate, so they are not yet proof.
      

      As per coding guidelines: "implemented does not imply proven, and a historical broad test run does not substitute for focused proof."

      • Accepted Tracker incorrectly calls its unexecuted anchors proof and is now stale after focused unit execution. Correct its evidence attribution and retain current-head physical/runtime limitations.
    2. Use the same Gradle JVM arguments in the bootJar step.Trivial

      The check step now passes -Dorg.gradle.jvmargs=-Xmx2500m -Dfile.encoding=UTF-8. The next step (./gradlew :${{ matrix.module }}:bootJar -PfullCheck, line 1015) still uses the default arguments. Gradle reuses a daemon only when the JVM arguments match. The bootJar step therefore starts a second daemon. The first daemon still holds a 2.5 GB heap, and the Testcontainers PostgreSQL container also runs on the same runner. This costs startup time and memory on the standard 7 GB runner. Also, the command-line value replaces every argument in gradle.properties org.gradle.jvmargs (for example, metaspace limits).

      Choose one fix:

      • Move the arguments to a job-level GRADLE_OPTS/ORG_GRADLE_JVMARGS value, or to gradle.properties.
      • Pass the same arguments to the bootJar step.

      If you change this command, also update the exact-string assertion in dev-tools/tests/ci-lightweight-scope-contract.sh (line 315).

      ♻️ Proposed alignment

             - name: 📦 Build Runtime JAR
               if: ${{ contains(fromJSON(needs.changes.outputs.bootable_modules), matrix.module) }}
      -        run: ./gradlew :${{ matrix.module }}:bootJar -PfullCheck
      +        run: ./gradlew --max-workers=2 '-Dorg.gradle.jvmargs=-Xmx2500m -Dfile.encoding=UTF-8' :${{ matrix.module }}:bootJar -PfullCheck
      

      As per path instructions: "Focus on workflow correctness, permissions scope, secret handling, cache correctness, duplication, and CI cost."

      • Accepted Checks and bootJar request different JVM heaps, causing an avoidable second CI daemon. Align both commands and extend the existing workflow contract proof.
    3. Set publishedAt on the stubbed existing bundle. Without it, the reuse and artifact-mismatch tests fail.Major

      TestDataSeeder.seedPublishedReleaseBundle rejects a stored bundle when stored.getPublishedAt() == null. This stub never calls setPublishedAt. The same change adds inserted.setPublishedAt(...) to the save stub in runSeedsAndReassertsCanonicalPublishedRuntimeData, which shows the entity has no default value. The consequences:

      • reusesExactExistingPublishedReleaseBundleWithoutSavingItAgain throws "Existing published release bundle does not exactly match the demo seed" and fails.
      • rejectsExistingArtifactWithChangedStateEpochWithoutResettingIt expects "Existing version artifact does not exactly match", but receives the bundle message, and fails.
      • rejectsExistingPublishedReleaseBundleThatDiffersFromDemoSeed passes only by coincidence, because the null publishedAt triggers the same message family as the changed manifest hash.

      matchesDemoVersion, matchesDemoTemplate, and matchesDemoArtifact also require createdAt/updatedAt, templateReferencePhase == ENFORCED, and updatedAt. The version, template, and artifact stubs do not set these values. If the entities do not default them, set them explicitly as well.

      💚 Proposed fix for the stub data

           version.setIdentitySourceProvenanceKind("NEW_GAME_ROW");
      +    version.setCreatedAt(java.time.LocalDateTime.now());
      +    version.setUpdatedAt(java.time.LocalDateTime.now());
      @@
           template.setDefaultRuntimeFlagsJson("{}");
      +    template.setTemplateReferencePhase(
      +        net.firedevops.firemud.gamedesign.model.TemplateReferencePhase.ENFORCED);
      +    template.setCreatedAt(java.time.LocalDateTime.now());
      @@
           bundle.setCommandDefinitionsJson("[]");
      +    bundle.setPublishedAt(java.time.LocalDateTime.now());
      @@
           artifact.setExportedManifestAssetKeysJson("[]");
      +    artifact.setUpdatedAt(java.time.LocalDateTime.now());
      
      • Rejected Entity field initializers already provide PublishedReleaseBundle.publishedAt, Version createdAt/updatedAt, GameTemplate ENFORCED/createdAt and artifact updatedAt. Canonical GDS310 unit cases, including these seeder tests, pass; no missing initialization.
  5. CLI Review 4 CompletedRuntime 2m 46s
    Found: 2 Accepted: 0/1/1 Routed: 0
    1. Move candidate validation and proof status to the implementation tracker.Trivial

      Line 11 says "this candidate has not been validated" and lists pending physical smoke. Line 13 lists "Focused producer unit proof and PostgreSQL integration cases are present; physical PostgreSQL and rebuilt full-smoke evidence remain unproven." These are execution results for one candidate. They are not target-state or current-behavior contract text. The [run-owned fixture repair](../../../project-management/implementation-tracking/game-authoring-publishing-and-activation.md#run-owned-authored-world-fixture-repair) section in the tracker already records the same status. If the architecture doc keeps its own copy, the two copies will drift.

      Keep the behavioral statements in this file, such as "authenticated source-bound v1 path is live" and "no production RPC authority is added". Replace the validation sentences with a link to the tracker section.

      Based on learnings: "Record actual execution results in PR/CI evidence and implementation-tracking documents when applicable; do not duplicate a validation ledger inside normative target-state architecture contracts."

      • Accepted Architecture version-control duplicates candidate validation history. Keep its behavior/authority boundary and link proof status to the canonical authoring tracker.
    2. Define or remove the "R" label in the capability status paragraph.Minor

      Line 58 uses "The complete R fixture successor" and "Current R source physical, packaged, and restart proof limits". The tracker does not define "R" anywhere. Readers cannot tell which slice or head it names. Use a name the tracker already uses, such as "the run-owned fixture successor (#3171)".

      Proposed wording fix

      -... The complete R fixture successor, now published in #3171, adds claimed source registration, ...
      +... The run-owned fixture successor, now published in #3171, adds claimed source registration, ...
      -... Current R source physical, packaged, and restart proof limits plus historical original-source evidence are recorded in ...
      +... Current successor physical, packaged, and restart proof limits plus historical original-source evidence are recorded in ...
      

      As per path instructions: "Use the relevant tracker as the reader-facing account of implementation status."

      • Accepted The tracker uses an undefined R label; replace it with its established run-owned fixture successor name while preserving PR and proof references.
  6. Hosted Review 2 CompletedRuntime 8m 06s
    Found: 2 Accepted: 0/2/0 Routed: 0
    1. Read the fixture evidence before you take the row lock.Minor

      Line 334 takes SELECT ... FOR UPDATE on the world_instance row. Line 336 then calls requireAuthenticatedEvidence(), which rereads both files and makes a blocking GetLaunchDescriptor gRPC call with a 5-second deadline. The row lock therefore stays held during that remote read.

      Termination (requireLockedWorldInstance) and concurrent activation retries on the same row must wait for that read. If Game Design is slow, those calls wait up to the full deadline. The prepare path already obtains its evidence before it takes any lock (Line 231). Use the same order for activation. The binding is still compared after the lock, so the order change does not weaken the check.

      The World Management runtime docs also list "no open transaction across blocking gRPC" as an invariant that this code does not yet meet.

      Proposed reorder

      --- "a/services/world-management-service/src/main/java/net/firedevops/firemud/worldmanagement/service/impl/WorldLifecycleCommandServiceImpl.java"
      +++ "b/services/world-management-service/src/main/java/net/firedevops/firemud/worldmanagement/service/impl/WorldLifecycleCommandServiceImpl.java"
      @@ -331,9 +331,9 @@
             if (!fixtureModeEnabled()) {
               throw fixtureEvidenceUnavailable();
             }
      -      worldInstance = requireLockedWorldInstance(tenantId, gameInstanceId);
      -      RunOwnedWorldLaunchEvidence fixtureEvidence =
      -          runOwnedWorldLaunchEvidenceProvider.requireAuthenticatedEvidence();
      +      RunOwnedWorldLaunchEvidence fixtureEvidence =
      +          runOwnedWorldLaunchEvidenceProvider.requireAuthenticatedEvidence();
      +      worldInstance = requireLockedWorldInstance(tenantId, gameInstanceId);
             PreparedWorldInstanceRequest preparedRequest = preparedRequest(worldInstance);
             requireRunOwnedFixtureBinding(worldInstance, fixtureEvidence, preparedRequest);
             if (STATUS_ACTIVE.equals(worldInstance.getStatus())) {
      
      • Accepted Verified fixture evidence performs blocking authenticated descriptor read after row lock; move it before lock and retain binding and epoch checks under lock.
    2. The relative-path test still passes if the absolute-path guard is removed.Minor

      The test passes Path.of("capability.json"). No such file exists in the test working directory. Suppose the provider drops the absolute-path check. The read then fails because the file is missing. That failure is also logged at stage=CAPABILITY_FILE. So assertFileRejectionStoppedBeforeWireParse passes with or without the guard.

      The writable test and the symlink test do not have this weakness. In both, a removed guard lets "{}" reach stage=WIRE_PARSE, and the assertion catches it.

      To isolate the guard, point the relative path at a real read-only file. Then, if the guard is missing, the read succeeds and the provider fails later, at WIRE_PARSE or RECEIPT_FILE. The existing assertion catches that.

      🧪 Proposed fix

      -  void enabledFixtureRejectsRelativeCapabilityPathAtFileReadStage(CapturedOutput output) {
      +  void enabledFixtureRejectsRelativeCapabilityPathAtFileReadStage(CapturedOutput output)
      +      throws Exception {
           GameDesignClient gameDesignClient = mock(GameDesignClient.class);
      +    Path capability = temporaryDirectory.resolve("capability.json");
      +    Path receipt = temporaryDirectory.resolve("receipt.json");
      +    Files.writeString(capability, "{}", StandardCharsets.UTF_8);
      +    Files.writeString(receipt, "{}", StandardCharsets.UTF_8);
      +    Files.setPosixFilePermissions(
      +        capability, Set.of(PosixFilePermission.OWNER_READ, PosixFilePermission.GROUP_READ));
      +    Files.setPosixFilePermissions(
      +        receipt, Set.of(PosixFilePermission.OWNER_READ, PosixFilePermission.GROUP_READ));
      +    Path relativeCapability = Path.of("").toAbsolutePath().relativize(capability);
      +    assertThat(relativeCapability.isAbsolute()).isFalse();
           RunOwnedWorldLaunchEvidenceProvider provider =
               new RunOwnedWorldLaunchEvidenceProvider(
                   true,
      -            Path.of("capability.json").toString(),
      -            temporaryDirectory.resolve("receipt.json").toString(),
      +            relativeCapability.toString(),
      +            receipt.toString(),
      
      • Accepted Current relative path names no existing file, so missing-file failure masks a removed absolute-path guard. Use a real readable read-only capability via relative path.

Routed Findings

0 Open0 Accepted/Fixed0 Rejected

No routes recorded

Unlinked items

no items unlinked