PR #3171 review history
Unit 1A · identity, Account and public JOIN
Review rounds
Three-number pills mean: found (raw) / accepted here (useful) / routed
Recorded review history
Reviews and findings
- Hosted Review 1 CompletedRuntime 8m 27sFound: 7 Accepted: 0/4/3 Routed: 0
- The unbound-row case fails at the not-found lookup, not at the fixture identity check.Minor
activatePreparedWorldInstancefirst callsrequireWorldInstance. The other activation tests in this file stub onlyfindByTenantIdAndGameInstanceId, which shows thatrequireWorldInstanceuses that method. This case stubs onlyfindByTenantIdAndGameInstanceIdForUpdate. The unstubbed lookup returnsOptional.empty()from Mockito, so activation throws the "not found"IllegalArgumentException. ThefixtureModeEnabled()→fixtureIdentityConflict()branch never runs. The bareassertThrows(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.
- Add the new production and proof anchors to the
GR-2.1Capability Status row.MinorLine 11 states that the World launch-evidence provider, the
world_instancebinding digest, and the preparing-epoch persistence now exist. TheGR-2.1row (Line 29) still names only the earlier lifecycle and hold anchors:RunOwnedWorldLaunchEvidenceProvider.java,RunOwnedWorldLaunchEvidence.java, andV23.0.1__world_run_owned_fixture_launch_binding.sqlare not in "Implementation anchors".RunOwnedWorldLaunchEvidenceMtlsIntegrationTest.java,RunOwnedWorldLaunchEvidencePostgresIntegrationTest.java, andRunOwnedWorldLaunchEvidenceProviderTest.javaare 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.
- 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 onlyIllegalArgumentException. The malformed-wire test at Lines 93-99 shows that"{}"content fails atstage=WIRE_PARSEand also throwsIllegalArgumentException. So all three cases pass even when the file guard does not reject the file.There is a second problem in the first case.
relativeCapabilitycomes fromtemporaryDirectory.resolve(...), and@TempDirgives 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 containstage=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.
- Pass a relative path, for example
- Remove
requireRunOwnedDescriptorMatchesRequest, because it duplicatesrequireDescriptorMatchesRequest.TrivialAfter this change,
requireDescriptorMatchesRequest(Line 807-827) no longer compares against a locally builtprb: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 fromstartRunOwnedInitialLaunchand 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.
- Three tests have the same body, so the test names claim coverage that does not exist.Trivial
getPublishedReleaseBundleDeniesCandidateBeforeOwnerNotFoundRead,...BeforeSchemaRead, and...BeforeIdentityReadsend the same request from the samegame-session-servicepeer. They also make the same assertions. None of them stubsversionServiceto 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 theNOT_FOUNDandSCHEMA_VERSION_UNSUPPORTEDmappings. Thosecatchbranches inGameDesignGrpcService.getPublishedReleaseBundleare 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.mdLine 139: Game Session, World Management, and Automation & Scripting, plus a wrong-namespace peer. - Or stub
versionServicein each test so that the named precondition really exists. ThenverifyNoInteractions(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.
- Combine the three tests into one parameterized denial test over the candidate peers. This change covers the requirement in
- Align the AR-3.1 verification cell with the current launch-descriptor status.Minor
The
Verificationcell still says "Game Design launch-descriptor resolution now fails closed pending canonical authored-world identity binding." TheGap or decisioncell 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.LaunchDescriptorServiceImplnow 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.
- 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
WorldInstanceis 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.
- CLI Review 1 CompletedRuntime 3m 48sFound: 5 Accepted: 1/1/3 Routed: 0
- Remove the duplicated descriptor validator.Trivial
requireRunOwnedDescriptorMatchesRequestmatchesrequireDescriptorMatchesRequest(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. CallrequireDescriptorMatchesRequestfromstartRunOwnedInitialLaunchand 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.
- Extract one bounded immutable-file reader for the capability and the receipt.Trivial
readSourceReceiptcopiesreadCapability(Lines 378-424). The only differences are the size limit and the exception factory.RunOwnedWorldLaunchEvidenceProvider.readImmutableWireFilerepeats the same algorithm a third time. The copies have already drifted.readSourceReceiptchecksbytes.size() != before.size()after the read, butreadCapabilitydoes not. A single helper keeps the replacement and truncation guards the same for every fixture file.The catch block for
InvalidCapabilityExceptioninloadSourceReceipt(Lines 117-118) is redundant. TheRuntimeExceptioncatch 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.
- Return the bound snapshot on a fixture prepare replay. Do not reject non-
PREPARINGrows.MajorGame Session sends
prepareWorldInstanceagain on every retry while its owner row isSTARTING(GameInstanceServiceImplLines 295-313). It expects a non-PREPARINGresponse in that case. On that response it reloads the row and checksACTIVEagainst 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 == ACTIVEand throwsINVALID_WORLD_INSTANCE_STATE.prepareRunOwnedWorldInstanceturns that error into anIllegalStateException. 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 testrunOwnedInitialLaunchRetryReconcilesAmbiguousActivationOnTheSameInstancepasses only because its mock prepare returns theACTIVEsnapshot.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
ACTIVEwhenlifecycleEpoch == 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.
- 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.
- Fix the conflicting
AR-3.1statements in the same row.MinorThe 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.
- CLI Review 2 CompletedRuntime 2m 36sFound: 3 Accepted: 1/0/2 Routed: 0
- Build the receipt descriptor from the supplied
bundleandversionState.TrivialThe 4-argument
validSourceReceiptJsonoverload buildsdescriptorfromlaunchBundle()andlaunchVersionState(). It ignores thebundleandversionStateparameters. Several rejection cases change a field that the descriptor also encodes. Examples aresetVersionStateEpoch(0L),setVersionId(12L), and the changed bundle inrejectsUnknownProtobufFieldsRecursivelyInOwnerReadEvidence. 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.assertInvalidSourceReceiptchecks 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.
- Use the shared immutable-file reader and wire codec instead of private copies.Trivial
readBoundedRegularReadOnlyFilerepeatsRunOwnedFixtureImmutableFileReader.readBoundedImmutableFile.loadFixtureCapability/readStrictJsonrepeatRunOwnedInitialAdmissionFixtureWireCodec.parseCapability. The copies already behave differently:sameFilehere rejects a case where only one file key is null. The sharedsameFileKeyaccepts that case.- The shared reader requires
OWNER_READand 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
Supplierthat throwsIllegalStateException, 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.
- Expect two
requireAuthenticatedEvidence()calls onrestartedProvider.MajorrestartedServiceusesrestartedProviderfor two calls before this verification:activatePreparedWorldInstance(Line 137): the row has a binding, soWorldLifecycleCommandServiceImplcallsrunOwnedWorldLaunchEvidenceProvider.requireAuthenticatedEvidence().prepareWorldInstance(Line 145):configuredFixtureEvidence()callsrequireAuthenticatedEvidence()again.
verify(restartedProvider)defaults totimes(1). It therefore throwsTooManyActualInvocations. 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.
- CLI Review 3 CompletedRuntime 3m 47sFound: 3 Accepted: 0/1/1 Routed: 0
- 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: "
implementeddoes not implyproven". 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: "
implementeddoes not implyproven, 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.
- Use the same Gradle JVM arguments in the
bootJarstep.TrivialThe 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. ThebootJarstep 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 ingradle.propertiesorg.gradle.jvmargs(for example, metaspace limits).Choose one fix:
- Move the arguments to a job-level
GRADLE_OPTS/ORG_GRADLE_JVMARGSvalue, or togradle.properties. - Pass the same arguments to the
bootJarstep.
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 -PfullCheckAs 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.
- Move the arguments to a job-level
- Set
publishedAton the stubbed existing bundle. Without it, the reuse and artifact-mismatch tests fail.MajorTestDataSeeder.seedPublishedReleaseBundlerejects a stored bundle whenstored.getPublishedAt() == null. This stub never callssetPublishedAt. The same change addsinserted.setPublishedAt(...)to the save stub inrunSeedsAndReassertsCanonicalPublishedRuntimeData, which shows the entity has no default value. The consequences:reusesExactExistingPublishedReleaseBundleWithoutSavingItAgainthrows "Existing published release bundle does not exactly match the demo seed" and fails.rejectsExistingArtifactWithChangedStateEpochWithoutResettingItexpects "Existing version artifact does not exactly match", but receives the bundle message, and fails.rejectsExistingPublishedReleaseBundleThatDiffersFromDemoSeedpasses only by coincidence, because the nullpublishedAttriggers the same message family as the changed manifest hash.
matchesDemoVersion,matchesDemoTemplate, andmatchesDemoArtifactalso requirecreatedAt/updatedAt,templateReferencePhase == ENFORCED, andupdatedAt. 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.
- CLI Review 4 CompletedRuntime 2m 46sFound: 2 Accepted: 0/1/1 Routed: 0
- 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.
- 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.
- Hosted Review 2 CompletedRuntime 8m 06sFound: 2 Accepted: 0/2/0 Routed: 0
- Read the fixture evidence before you take the row lock.Minor
Line 334 takes
SELECT ... FOR UPDATEon theworld_instancerow. Line 336 then callsrequireAuthenticatedEvidence(), which rereads both files and makes a blockingGetLaunchDescriptorgRPC 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.
- 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 atstage=CAPABILITY_FILE. SoassertFileRejectionStoppedBeforeWireParsepasses with or without the guard.The writable test and the symlink test do not have this weakness. In both, a removed guard lets
"{}"reachstage=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_PARSEorRECEIPT_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
No routes recorded
Unlinked items
no items unlinked