PR #3248 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 11m 14sFound: 3 Accepted: 1/1/1 Routed: 0
- Use the required observation entry format.Minor
These four entries omit the labeled
Context,Observation, andExpected patternfields. Add a short title and those fields to each entry. As per coding guidelines, the entry format requires “YYYY-MM-DD: short title” followed by “Context,” “Observation,” and “Expected pattern.”Also applies to: 120-120, 122-122, 130-130
- Accepted Required observation structure was missing in four owned entries; preserve facts while formatting.
- Allow retained v2 captures without branding enrollment.Major
isHistoricalOperationrecognizes onlygame-design-publication-operation/v1. A retained v2 operation without branding genesis therefore reaches the non-historical check, and line 393 rejects its otherwise complete capture whenbrand.isEmpty().PublishedReleaseBundleRepositorycallsreadCapturefor published operations, so this can block reads for retained published versions. Gate the branding requirement on enrollment:--- "a/services/game-design-service/src/main/java/net/firedevops/firemud/gamedesign/publication/GameDesignSourceRepository.java" +++ "b/services/game-design-service/src/main/java/net/firedevops/firemud/gamedesign/publication/GameDesignSourceRepository.java" @@ -390,7 +390,7 @@ || policy.isEmpty() || (asset.isEmpty() && !historicalOperation) || (gameplayCapture.isEmpty() && !historicalOperation && !historicalGameplay) - || (brand.isEmpty() && (!historicalOperation || brandingSourceEnrolled)) + || (brand.isEmpty() && brandingSourceEnrolled) || (templateSourceEnrolled && templateConfig.isEmpty() && !historicalTemplate)) { throw new IllegalStateException("GAME_DESIGN_SOURCE_CAPTURE_INCOMPLETE"); }- Accepted Retained pre-branding v2 captures must remain readable; require branding only when enrolled, preserving fresh freeze requirements.
- Use the lifecycle helpers that
AbstractReloadingBlockingGrpcClientalready provides.TrivialThe superclass already provides
initOnce(closedMessage, unavailableMessage),requireInitializedStub(unavailableMessage), andrequireNoAmbientSql(message). Itsclose()already setsclosedandexplicitlyInitialized. This class copies that state in its ownvolatileinitialized/closedfields and overridesclose()only to keep those copies in sync.GrpcSelectedOwnerIntakeSourceReadClient(lines 29-30, 47-54, 60-62, 101-118) contains the same copy. The two copies and the base class can drift apart in future edits. Delegate to the base helpers in both clients.♻️ Proposed refactor
- private volatile boolean initialized; - private volatile boolean closed; ... - public synchronized void init() throws SSLException, IOException { - if (closed) throw new IllegalStateException("Game Design source client is closed"); - if (initialized) return; - initReloadingClient(); - if (stub() == null) throw new IllegalStateException("Game Design source stub unavailable"); - initialized = true; - } + public void init() throws SSLException, IOException { + initOnce("Game Design source client is closed", "Game Design source stub unavailable"); + } ... - if (TransactionSynchronizationManager.isActualTransactionActive() - || TransactionSynchronizationManager.isSynchronizationActive()) - throw new IllegalStateException( - "Game Design selected-owner source read must run outside SQL"); + requireNoAmbientSql("Game Design selected-owner source read must run outside SQL"); ... - var response = - requireStub() + var response = + requireInitializedStub( + "Game Design selected-owner source client is not initialized and available") .withDeadlineAfter(CALL_DEADLINE_SECONDS, TimeUnit.SECONDS) ... - @Override - public void close() throws IOException { ... } - private ... requireStub() { ... }Also applies to: 48-54, 60-63, 102-119
- Accepted Both clients duplicate lifecycle state already owned by the shared base; delegate without changing messages or transport checks.
- Hosted Review 2 CompletedRuntime 10m 46sFound: 2 Accepted: 0/0/1 Routed: 1
- Make the Entity result distinguishable and assert both owner results.Trivial
The vector gives World and Entity the same result bytes. The test checks only the World result identity and bytes, so it cannot detect an Entity result-byte substitution. Give Entity distinct bytes, then assert its result identity and bytes alongside the World assertions. Based on learnings, identity-sensitive tests should assert the fields that determine the resulting identity or authorization outcome, not only adjacent metadata.
- Accepted Verified World/Entity use identical result bytes and only World assertions. Give Entity distinct bytes and verify both identities, bytes and defensive copies.
- Give every reservation a terminal state other than an explicit abort.Major
account_selected_owner_intake_source_read_is_pendingtreats a reservation as pending until a row exists inaccount_selected_owner_intake_source_read_aborts. The reservation has no completion, finalization, or expiry path.V1007 uses this predicate in the source-writer, source-change completion, and hosted-terms dispatch guards. The Java authorization paths also depend on it. A successful read therefore continues to block the affected Account source vector until Game Design calls
abortSourceRead.If Game Design crashes, loses its state, or does not send the abort, source changes remain blocked without a bound. Issuer credential expiry does not release the reservation because
readSourceScoperejects expired reads, whileaccount_selected_owner_intake_source_read_is_pendingdoes not check expiry.Before registering these endpoints, add an Account-owned completion or expiry terminal and a recovery path. Preserve the reservation until the Account-owned recovery logic has sufficient evidence to release it.
Route · PR #3248 → PR #3251 Accepted/FixedRoute to3251 owning finalization/terminal settlement (V1008–1010), which already replaces pending predicate. Add safe Account-owned abandoned-preliminary recovery before registration; expiry alone cannot settle finalized owners. 3248 remains passive/default-denied with explicit gap. View routed finding
- CLI Review 1 CompletedRuntime 4m 12sFound: 4 Accepted: 1/1/2 Routed: 0
- A reservation that is never aborted blocks the creator's Account source writers with no time limit.Major
account_selected_owner_intake_source_read_is_pendingreturns true for every reservation that has no abort row. The function has no expiry term and no finalization term. The V1007 hooks in this file andDraftAuthorizationFenceRepository.allAffectedSettleduse this function. As a result, a reservation that is never aborted keeps these operations pending:- source-change completion and abort,
account_control_ui_hold_required_sources,- hosted-terms dispatch,
- disclosure preparation.
These rows lock the current creator's complete source vector (
ACCOUNT,GLOBAL_ROLES,MEMBERSHIP,HOSTED_TERMS, and others). Password reset, logout-all, role changes, and terms changes on those sources stayWAITING, and callers get retryableAUTH_UNAVAILABLE.readSourceScoperefuses reads after the original creator credential expires. After that point the reservation cannot be used, but it still blocks writers. Only an explicit Game DesignabortSourceReadreleases it. Game Design can fail to abort in several ways: a crash after reserve, a lost scope, or a missed abort path. In each case, Account cannot release the block on its own. The PostgreSQL test confirms the block:sourceMutationPermittedstays false until abort.Confirm whether the planned finalization or settlement owner also has an Account-local release path. One option is a terminal state that a database-clock check derives from the creator issuance
expires_at_epoch_secondplus a bounded grace period. Add that path before any registration. If the unlimited hold is intended, record the gap and its reconsideration trigger in the tracker.- Accepted Verified V1007 holds until explicit abort despite issuance expiry. Accept tracker gap/registration blocker and recovery-owner requirement; do not invent timeout release or weaken source fences. Passive unregistered scope remains incomplete until safe owner recovery is implemented.
- Name the owning Capability Status row for the selected-recipient intake section.Minor
The other preparation sections state their owning capability row and its state, for example "This preparation is owned by AA-1.3 …
partial/drift-found". This new section adds V1007, new Account owners, and new Game Design production anchors. It does not say whichCapability Statusrow owns them, and it does not say whether that row's production anchors or proof cells changed. The tracker contract requires one status row for each owned capability. It also requires production and proof anchors that resolve.Add one sentence that names the owning row and its current state. In the same edit, update that row's anchors to include
V1007__selected_owner_intake_source_reservations.sql,AccountSelectedOwnerIntakeSourceReservationService, and the R28 focused proof classes.As per coding guidelines: "Each tracker contains one
Capability Statusrow for every capability it primarily owns …implementedandpartialrows name concrete production anchors."- Accepted Verified selected intake section omits AA-1.3 state and its capability row lacks V1007/service/focused proof anchors. Accept exact owning-row and resolvable-anchor correction.
- The malformed-reservation case never reaches the V1007 completeness trigger.Trivial
The insert uses
owner = 'UNDECLARED_OWNER'and random UUIDs foractor_account_uuid,tenant_uuid, andissuance_operation_id. PostgreSQL rejects this row at statement time, either with theownerCHECK constraint or with an immediate foreign-key violation. The deferredaccount_selected_owner_intake_source_read_completeconstraint trigger never runs. The assertion accepts anyRuntimeException. This case therefore proves only column constraints, not the creator-evidence, scope-framing, or source-vector guards that the tracker credits to R28.Add a case that inserts a row that passes the column checks and foreign keys but has a wrong
scope_digestor a mismatchedsource_payload. Commit that transaction. Assert SQLSTATE23514and the trigger message, and assert that no source rows remain.- Accepted Verified malformed owner and absent FK identities fail immediate constraints. Accept a valid-fixture deferred-completeness regression with wrong scope digest, commit-time23514/message and unchanged/no reservation children.
- Make the race tests wait for the blocked write before they commit the first writer.Trivial
Each test calls
started.countDown()before the worker issues its write. The main thread then callslifecycle.commit(),slot.commit(), orselection.commit()at once. The second write can therefore start after the first transaction commits.At
TRANSACTION_READ_COMMITTED, that order is sequential, not concurrent. The second write sees committed state and fails with23514, even if the storage guard takes no lock. AtREPEATABLE_READandSERIALIZABLE, the earlierSELECTcreates the stale snapshot, so40001can also occur without a blocked write. The tests prove the final outcomes. They do not prove the path where one write blocks and then resolves after the other write commits.RealmPolicySourcePostgresIntegrationTest.freezeAndSourceWriterUseSameVersionLockAndRollbackDoesNotLeaveCapturealready shows the stronger pattern. It pollspg_stat_activityandpg_blocking_pidsuntil the second backend waits on a lock. Use the same pattern here before each commit.♻️ Sketch for one race (apply to all four)
+ int firstPid = DSL.using(lifecycle, SQLDialect.POSTGRES) + .fetchSingle("SELECT pg_backend_pid()").get(0, Integer.class); + int secondPid = slotSql.fetchSingle("SELECT pg_backend_pid()").get(0, Integer.class); var started = new java.util.concurrent.CountDownLatch(1); var inserting = worker.submit(...); try { assertThat(started.await(10, TimeUnit.SECONDS)).isTrue(); + awaitBlocked(local, firstPid, secondPid); // poll pg_blocking_pids(secondPid) with a deadline } finally { lifecycle.commit(); }Also applies to: 1842-1857, 1885-1896, 1927-1938
- Accepted Verified all four tests release the first transaction after a pre-write latch only. Accept bounded test correction: observe exact worker backend blocked by first backend before commit, retaining isolation/outcome assertions.
- CLI Review 2 CompletedRuntime 3m 32sFound: 1 Accepted: 0/1/0 Routed: 0
- Restore the removed prior observation. Append new entries at the end.Minor
This change deletes the earlier
2026-10-15entry "Preserve receiver status when relocating inherited tracker proof" because it duplicates another entry. The repository rule does not allow this kind of deletion during ordinary autonomous work. Removal is allowed only under explicitly assigned Overseer stewardship or a human-requested repository health check, and nothing in this change shows either one.The new
2026-10-15and2026-10-16entries are also inserted in the middle of the file (Line 118 onward), not appended at the end.Required fixes:
- Restore the deleted entry.
- If it is a true duplicate, add a dated note that links the two entries and leave both in place.
- Move the new entries to the end of the file.
As per coding guidelines: "During ordinary autonomous work, append dated entries; do not silently rewrite or delete prior observations."
- Accepted Accept append-only correction: five added observation blocks were inserted mid-file. Existing Preserve receiver status entry remains byte-identical in current diff, so no duplicate restoration. Move only added blocks to EOF; preserve every existing entry.
- Hosted Review 3 CompletedRuntime 14m 26sFound: 1 Accepted: 1/0/0 Routed: 0
- Add a recovery path for retained Draft Versions without branding genesis.Major
GameDesignSourceRepository.readGenesisrejects a retained Draft Version when policy and command genesis exist but branding genesis is absent.apply,captureSynchronized, andfreezecallrequireGenesis, so authoring and publication fail for these Draft Versions.enrollFreshDraftcannot repair them because it requires a same-transaction fresh-insert witness.Add either:
- a migration that creates branding genesis and head rows for each existing enrolled Draft Version; or
- an explicit legacy rule that treats missing branding genesis like missing asset genesis.
Preserve the existing compatibility behavior for historical
readSynchronizedand partial historical captures, which allow unenrolled branding to remain absent. If this publication boundary is intentional, record it in the implementation tracker.- Accepted Accept explicit tracker boundary alternative. Canonical six-family/no-backfill contract and existing native history/refusal tests intentionally deny fresh work without branding. Document retained apply/capture/freeze restriction; do not invent genesis or relax production.
- CLI Review 3 CompletedRuntime 3m 32sFound: 2 Accepted: 0/2/0 Routed: 0
- Identify the owning migration for the "existing V1007 storage" reference.Minor
Line 9 says that the branding source owner "uses existing V1007 storage". In this PR, the V1007 migration is Account's
V1007__selected_owner_intake_source_reservations.sql. That migration creates no branding tables. The tracker (player-access-and-session.mdline 15) also calls it "Account V1007". A reader of this Game Design document cannot tell whether the reference means a Game Design V1007 migration or the Account migration.Confirm which Game Design migration holds the
game_design_branding_source_*tables. Then link that file and name the owning service. As per path instructions: "Flag obsolete transitional guidance, conflicts between architecture docs, broken repo links".📝 Proposed clarification
-The recipient-intake preparation adds an unregistered Account-authenticated read of all six selected source families. Its required branding source owner uses existing V1007 storage, and command snapshot parsing ... +The recipient-intake preparation adds an unregistered Account-authenticated read of all six selected source families. Its required branding source owner uses the existing Game Design branding storage in [V<n>](../../../../services/game-design-service/src/main/resources/db/migration/V<n>__<name>.sql), and command snapshot parsing ...- Accepted Accepted: ambiguous V1007 ownership. Published40d explicitly links Game Design V1007__branding_asset_source_history.sql; it is not Account reservation storage. Exact three-doc correction and successful11s canonical docs proof verified.
- Update the source-protection text that still calls selected-owner reservation an outside obligation.Minor
This section says that Account V1007 now adds selected-owner preliminary reservations and source-writer exclusions. Two unchanged sentences still describe that work as outside the current scope:
- Line 69 of this tracker: "The source-only V130 selected-owner reservation hook is outside this cut and remains a separate receiving obligation."
- Line 357 of
account-service/runtime-and-data.md: "...and the separate selected-owner source-reservation obligation remain unproved."
These sentences now conflict with lines 9–17 and with the AA-1.3 row, which lists V1007 as a production anchor. Revise both sentences. State that V1007 receives the reservation and hook storage, and that finalization and terminal settlement (#3251) remain open. As per coding guidelines: "Keep its status, implementation record, validation, gaps, decisions, and service-map sections aligned when a domain boundary changes". As per path instructions: "Flag obsolete transitional guidance".
- Accepted Accepted: stale reservation hook/source-protection status. Published40d tracker and Account runtime/data name received V1007 preliminary reservation storage; finalization/settlement/registration remain unproved at this boundary. Canonical docs proof verified.
- CLI Review 4 CompletedRuntime 2m 52sFound: 1 Accepted: 0/0/1 Routed: 0
- Make the deferred-guard assertion prove the digest check.Trivial
The first
IFblock inaccount_selected_owner_intake_source_read_complete_guardraises the same message for ten different conditions. These include issuer status, issuer expiry, source payload, bundle, fence, checkpoints and the scope digest. This test asserts only that shared message, so any other mismatch in the fixture also passes the test.The fixture also uses
"sources":[]. The later vector check requires at least one source, so the guard would reject this reservation even with the correctscope_digest. The test therefore does not show that the digest is the only cause of the rejection.Use one of these fixes:
- Add a positive control. Insert the same row with
scope.digest()and one valid source row, and show that it commits. - Give the digest check its own error message in the migration, and assert that message.
- Accepted Useful proof gap: shared ten-predicate error plus sources[] cannot isolate digest. Add same valid populated reservation/source fixture positive control with correct digest committing, retain wrong-digest rollback/SQL assertions; production guards unchanged.
- Add a positive control. Insert the same row with
- CLI Review 5 CompletedRuntime 2m 49sFound: 1 Accepted: 0/0/0 Routed: 0
- Return a retained Genesis without branding instead of throwing from
readGenesis.MinorreadGenesisnow throwsGAME_DESIGN_SOURCE_GENESIS_INCOMPLETEwhen branding genesis is absent. This applies to every retained five-family Version that predates branding. Before this change, the same call returned aGenesis.This creates two inconsistencies:
Genesisstill declaresbrandingEvidenceasOptional. The compatibility constructors still supplyOptional.empty().requireGenesisalready refuses freshapply,captureSynchronizedandfreezewhenbrandingEvidenceis empty. The throw inreadGenesisis therefore redundant for those paths.
The new throw affects every other caller of
GameDesignSourceRepository.readGenesis. A read that only inspects retained genesis now fails for historical Versions, and the error code differs from the existingGAME_DESIGN_SOURCE_GENESIS_UNAVAILABLE.Check whether any caller other than
enrollFreshDraftandrequireGenesisexists. If such a caller exists, treat branding the same way as the optionalassetevidence. Keep the refusal inrequireGenesis.♻️ Proposed change
- if (policy.isEmpty() || command.isEmpty() || brand.isEmpty()) { + if (policy.isEmpty() || command.isEmpty()) { throw new IllegalStateException("GAME_DESIGN_SOURCE_GENESIS_INCOMPLETE"); }- Rejected Intentional fresh-genesis completeness guard: aggregate callers enroll/prepare fresh review/advance visibility, not historical inspection. Historical readSynchronized preserves five-family rows; qualified retained-branding test explicitly expects readGenesis refusal. No regression or useful fix.
- CLI Review 6 CompletedRuntime 2m 38sFound: 1 Accepted: 0/0/0 Routed: 0
- Confirm that referenced
gameassetsrows cannot change after a branding revision binds them.MajorConfirm that referenced `game_assets` rows cannot change after a branding revision binds them.
verifyItemsruns on everyreadSnapshotand every retainedapplicationreadback. It callsqualify(item.reference(), false)and requires an exact match with the currentgame_assetsrow. The match coversfile_name,content_typeand the SHA-256 digest and size ofdata.The snapshot stores the content digest, content type and byte size. The revision row stores the same three values. If ordinary authoring can update
data,content_typeorfile_namefor a referenced asset row afterapply, three failures follow:readSnapshotfor every retained snapshot that contains that item throwsBRANDING_SOURCE_BYTE_READBACK_CONFLICT.applyandcaptureSynchronizedfor later commits fail, because they read the inherited snapshot throughreadSnapshot.freezeand the selected-owner source export also fail.
Only a new owner-evidenced path could then recover the branding source for that Version.
Check one of these facts:
- Game Design V1007, or an earlier migration, prevents updates to these columns while a
game_design_branding_source_revisionrow references the asset row. - Branding asset rows are append-only.
If neither guard exists, choose one fix:
- Add an immutability guard on referenced rows.
- Verify historical snapshots against the retained revision columns only, and check current asset bytes only at
applyandfreeze.
- Rejected Already guarded: V1007 protect_branding_asset_bytes rejects any changed/deleted referenced asset row; V1003 denies TRUNCATE. Existing branding PG proof rejects byte updates; V1030 and two-connection PG cases fence stale first-reference writers. Historical verification stays fail closed.
- Hosted Review 4 CompletedRuntime 12m 31sFound: 1 Accepted: 0/1/0 Routed: 0
- Wait for mapped JDBC readiness on both PostgreSQL containers before the test runs.Minor
This PR adds
PostgresBackedServiceTestSupport.awaitPostgresJdbcReadybecause the owner gate showed PostgreSQL connection refusals on the first connection. This new cross-service test opensGDSandACCOUNTconnections immediately insourceStore()and inAccountControlUiOriginalOrderFixture. It does not call the readiness helper. A transient mapped-port refusal therefore fails this test before any assertion runs. Other changed fixtures in this PR already use the helper, for exampleTemplateConfigSourcePostgresIntegrationTest. Add a@BeforeAllmethod that calls the helper for both containers.Proposed fix
--- "a/services/game-design-service/src/test/java/crossservice/net/firedevops/firemud/accountservice/service/session/SelectedOwnerSourceDisclosurePostgresIntegrationTest.java" +++ "b/services/game-design-service/src/test/java/crossservice/net/firedevops/firemud/accountservice/service/session/SelectedOwnerSourceDisclosurePostgresIntegrationTest.java" @@ -117,9 +117,15 @@ "selected-disclosure-primary", "6379"); @TempDir Path temporary; + @org.junit.jupiter.api.BeforeAll + static void awaitPostgresJdbcReady() { + net.firedevops.firemud.test.PostgresBackedServiceTestSupport.awaitPostgresJdbcReady(GDS); + net.firedevops.firemud.test.PostgresBackedServiceTestSupport.awaitPostgresJdbcReady(ACCOUNT); + } + @Test void actualPreliminaryPermissionDisclosesExactSixFamiliesAndAbortPermanentlyRefuses() throws Exception { var local = sourceStore();- Accepted Both cross-service PostgreSQL containers open mapped JDBC connections without the shared bounded readiness guard. Add BeforeAll waits for GDS and ACCOUNT; preserve all behavioral assertions and options.
Routed Findings
Route 1 · PR #3248 → PR #3251 Accepted/FixedMajorGive every reservation a terminal state other than an explicit abort.
account_selected_owner_intake_source_read_is_pendingtreats a reservation as pending until a row exists inaccount_selected_owner_intake_source_read_aborts. The reservation has no completion, finalization, or expiry path.V1007 uses this predicate in the source-writer, source-change completion, and hosted-terms dispatch guards. The Java authorization paths also depend on it. A successful read therefore continues to block the affected Account source vector until Game Design calls
abortSourceRead.If Game Design crashes, loses its state, or does not send the abort, source changes remain blocked without a bound. Issuer credential expiry does not release the reservation because
readSourceScoperejects expired reads, whileaccount_selected_owner_intake_source_read_is_pendingdoes not check expiry.Before registering these endpoints, add an Account-owned completion or expiry terminal and a recovery path. Preserve the reservation until the Account-owned recovery logic has sufficient evidence to release it.
Outcome: Published ae830dbf96cdce32394c3d3fa42d828c2fd80888: bounded original-scope expiry recovery; finalized owners excluded.8units cda9+actual expiry/late-lock PG case7ff2+checks PASS; own code unchanged. Fresh five-store case ae830 PASS,5DockerIDsabsent; docs79914de. Internal/unregistered; no activation.
Earlier routing and proof
Earlier decisions
- Accepted Own selected-recipient finalization/terminal lifecycle here in V1008–1010. Implement and prove Account-owned abandoned-preliminary recovery without releasing finalized reservations from credential expiry or missing owner terminal evidence.
- Routed Route to3251 owning finalization/terminal settlement (V1008–1010), which already replaces pending predicate. Add safe Account-owned abandoned-preliminary recovery before registration; expiry alone cannot settle finalized owners. 3248 remains passive/default-denied with explicit gap.
Unlinked items
no items unlinked