PR #2967 review history
Unit 1A · identity, Account and public JOIN
Review rounds
Three-number pills mean: found (raw) / accepted here (useful) / routed
Recorded review history
Reviews and findings
- Subagent Review 1 CompletedModel not recordedFound: 0 Accepted: 0 Routed: 0
- No findings recorded for this run
- Hosted Review 1 CompletedRuntime 8m 11sFound: 6 Accepted: 6 Routed: 0
- Constraint validation blocks
characterswrites during the migration.MinorEach
ADD CONSTRAINTat Lines 41-99 runs a full validation scan, and the scans run in sequence. The FK also takes aSHARE ROW EXCLUSIVElock on both tables. Flyway runs this whole file in one transaction, so the locks from the rewrite at Lines 31-33 and from every scan stay held until commit.If
charactersis large in any environment, use this approach:- Add the CHECK constraints and the FK as
NOT VALIDhere. - Run
VALIDATE CONSTRAINTin a separate follow-up migration. In the same transaction,NOT VALIDgives no benefit. - Build
ux_characters_character_uuidandidx_characters_owner_resolved_rosterwithCREATE ... CONCURRENTLYin a non-transactional migration. Then attach the unique constraint withUSING INDEX.
If the table is small in every environment, record that assumption in the migration comment.
Based on learnings: "adding the constraint as NOT VALID and validating it in a separate follow-up statement lets the initial DDL take only a brief ACCESS EXCLUSIVE lock".
- Accepted Separate validation and concurrent index building with complete final constraints; document initial backfill locking and maintenance requirements, with no small-table or online-activation assumption.
- Add the CHECK constraints and the FK as
- Replace the positional binding list with named reuse of the two parameters.Trivial
The method passes
tenantIdandgameInstanceIdin a long positional sequence of 11 values. The sequence ends withgameInstanceIdtwice, because the audit clause uses it twice. A change to the SQL order silently breaks the binding. Also,Object retainedwithBoolean.TRUE.equalshides a type mismatch.Use
dsl.fetchValue(sql, Boolean.class ...)or a named-parameter form. Alternatively, use a CTE that declares both values once.- Accepted Replace 11 positional values with one typed two-value target CTE and typed Boolean retrieval; preserve the complete fail-closed holder/audit predicate.
- CodeRabbit summary-only outside-diff finding 1 of 1 (aggregate; no individual detail)
summary-only aggregate; provider supplied no individual detail
- Accepted Correct obsolete ScopedCharacterResolver verification claim to unconditional legacy identity denial and accurately distinguish guarded administrative paths from remaining unsupported persistence surfaces.
- The owner-resolved save guards check caller-supplied fields, not the persisted row.Major
Both
savemethods validateentity.getTenantId()andentity.getCharacterId(). Their update branches then filter only by rowIDand do not check the affected-row count. An entity whoseidpoints to a quarantined actor's row and whosecharacterIdnames an owner-resolved actor passes the guard and mutates retained quarantined state.services/entity-management-service/src/main/java/net/firedevops/firemud/entitymanagement/repository/ActorActiveConditionRepository.java#L74-L74: add the tenant, character, andownerResolvedActorExists()predicates to theUPDATEWHEREclause, and throwACTOR_IDENTITY_NOT_OWNER_RESOLVEDunless exactly one row changed.services/entity-management-service/src/main/java/net/firedevops/firemud/entitymanagement/repository/ActorResourceStateRepository.java#L50-L50: add the same tenant, character, and owner-resolvedEXISTSpredicates to theUPDATE, and fail unless exactly one row changed.
Proposed fix pattern
- .where(ACTOR_ACTIVE_CONDITIONS.ID.eq(entity.getId())) - .execute(); + .where( + ACTOR_ACTIVE_CONDITIONS + .ID + .eq(entity.getId()) + .and(ACTOR_ACTIVE_CONDITIONS.TENANT_ID.eq(entity.getTenantId())) + .and(ACTOR_ACTIVE_CONDITIONS.CHARACTER_ID.eq(entity.getCharacterId())) + .and(ownerResolvedActorExists())) + .execute(); + if (updated != 1) { + throw new IllegalStateException("ACTOR_IDENTITY_NOT_OWNER_RESOLVED"); + }📍 Affects 2 files
services/entity-management-service/src/main/java/net/firedevops/firemud/entitymanagement/repository/ActorActiveConditionRepository.java#L74-L74(this comment)services/entity-management-service/src/main/java/net/firedevops/firemud/entitymanagement/repository/ActorResourceStateRepository.java#L50-L50
- Accepted Bind both UPDATEs to persisted tenant/character/row and owner-resolved status, checking exactly one affected row. Caller fields alone cannot authorize touching quarantined or foreign retained state.
- Enforce namespace scope immutability in the database.Major
The documentation says the namespace/scope pair is immutable. The schema does not enforce that.
entity_playable_state_namespace_scopeshas no update guard.fk_characters_owner_resolved_namespace_scopeuses defaultNO ACTION. It rejects a scopeUPDATEonly while anOWNER_RESOLVEDcharacter references the row.- A namespace with no referencing actors can change from
SHAREDtoISOLATED. - Quarantined rows with a
NULLscope never activate theMATCH SIMPLEFK. They do not protect the row either.
The negative assertion in
RetainedActorIdentityIntegrationTest(Lines 254-262) passes only because owner-resolved actors exist at that point. It does not prove immutability.Add a trigger that rejects every
UPDATEoftenant_uuid,playable_state_namespace_id, andplayable_state_scope. Add a test that updates a namespace with no referencing actors.Proposed trigger
CREATE FUNCTION entity_reject_namespace_scope_update() RETURNS trigger AS $$ BEGIN RAISE EXCEPTION 'ENTITY_NAMESPACE_SCOPE_IMMUTABLE'; END; $$ LANGUAGE plpgsql; CREATE TRIGGER trg_entity_namespace_scope_immutable BEFORE UPDATE ON entity_playable_state_namespace_scopes FOR EACH ROW EXECUTE FUNCTION entity_reject_namespace_scope_update();Wrap this in
/* [jooq ignore start] *///* [jooq ignore stop] */if the jOOQ DDL parser cannot read it.- Accepted Enforce namespace identity/scope immutability independent of referencing actors and add unreferenced shared/isolated mutation regressions; exact no-op changes may remain valid.
- Cleanup guard blocks every instance that has runtime rows.Major
The first four
EXISTSclauses inHAS_UNRESOLVED_RUNTIME_EVIDENCE_SQLreturn true for anyitem_instances,container_instances,item_stacks, orroom_ground_inventoryrow in the tenant and instance. None of them checks for a quarantined or unresolved holder.cleanupRuntimeInstancethen throwsENTITY_RETAINED_ACTOR_EVIDENCE_BLOCKS_CLEANUPbefore the delete calls. The delete calls cannot run when there is data to delete.services/entity-management-service/src/main/java/net/firedevops/firemud/entitymanagement/repository/QuarantinedActorRetentionRepository.java#L13-L57: restrict each clause to unresolved evidence. Use theentity_quarantined_actor_item_instancesandentity_quarantined_actor_container_instancesviews for holder-linked rows. Define explicitly which room-ground and unowned rows count as unresolved. If blocking on all rows is intended, rename the method and update the Javadoc and error text.services/entity-management-service/src/main/java/net/firedevops/firemud/entitymanagement/service/impl/RuntimeInstanceCleanupServiceImpl.java#L51-L55: keep the guard, but add an integration test that cleans an instance with runtime rows and no quarantined actor. Also decide whether to lock the check, because a concurrent insert between the check and the deletes is possible at the default isolation level.
📍 Affects 2 files
services/entity-management-service/src/main/java/net/firedevops/firemud/entitymanagement/repository/QuarantinedActorRetentionRepository.java#L13-L57(this comment)services/entity-management-service/src/main/java/net/firedevops/firemud/entitymanagement/service/impl/RuntimeInstanceCleanupServiceImpl.java#L51-L55
- Accepted Partially accepted: make the deliberate unclassified-holder hold explicit and prove empty/nonempty behavior. Reject narrowing to quarantined-actor views alone: legacy holder namespace/disposal provenance is absent and must not be guessed.
- CLI Review 1 CompletedRuntime 3m 09sFound: 3 Accepted: 0/1/2 Routed: 0
- Minor
Update the GR-4.3 row: describe production XP/level mutation as fail-closed until owner-qualified character resolution exists, change verification from proven to conditional to reflect mocked-resolver coverage, and add owner-qualified admission to the gap cell.
- Accepted Minor: GR-4.3 overstates mocked resolver coverage; record production XP mutation as fail-closed and proof as conditional pending owner-qualified admission.
- Trivial
Remove the redundant scope-validation conditional after ActorIdentity.requireScope in the relevant repository method. Keep the requireScope call and query flow unchanged so it validates scope consistently with findOwnerResolvedActor.
- Accepted Trivial: requireScope already rejects unsupported scopes; remove the duplicate branch while retaining canonical validation and query semantics.
- Trivial
Document recovery for the concurrent indexes ux_characters_character_uuid_idx and idx_characters_owner_resolved_roster in the Entity operations runbook: check pg_index.indisvalid, drop any invalid index with DROP INDEX CONCURRENTLY IF EXISTS, run flyway repair, then rerun the migration. Also instruct operators to monitor pg_stat_activity for long-running transactions that may block the build.
- Accepted Trivial: document concurrent-index recovery, invalid-index inspection and blockers. Require quiescence and dependency checks; blind repair/rerun is unsafe when a valid partial index or attached constraint remains.
- Hosted Review 2 CompletedRuntime 3m 38sFound: 2 Accepted: 0/2/0 Routed: 0
- Fix the stale unit-test count in the GR-3.1 verification cell.Minor
The GR-3.1 verification cell reports that 203 Entity unit tests passed. The PR objectives report 205 tests in 39 suites. The tracker is the reader-facing status record, so this count must match the current proof. Update the number, or remove the count and reference the validation run.
Proposed fix
-The full Entity unit task passed 203 tests with zero failures/errors/skips, +The full Entity unit task passed 205 tests in 39 suites with zero failures/errors/skips,- Accepted Valid stale proof count on reviewed head; correction already prepared in local CI tracker batch. Published proof will follow.
- Self-friendship always fails the owner-resolved guard.Minor
If
characterIdequalsfriendId, theINlist matches one row. The count is then 1, andsavethrowsFRIEND_ACTOR_IDENTITY_NOT_OWNER_RESOLVEDeven when the actor is owner-resolved. The error code misreports the failure cause. Reject self-friendship explicitly before the count, or compare the count against the number of distinct IDs.Proposed fix
+ if (entity.getId().getCharacterId().equals(entity.getId().getFriendId())) { + throw new IllegalArgumentException("FRIEND_SELF_RELATIONSHIP_NOT_ALLOWED"); + } long ownerResolvedCount =- Accepted Valid local error-contract gap: reject self-relationship before database owner count; distinct actor ownership guard remains mandatory. Delegated focused regression fix.
- CLI Review 2 CompletedRuntime 3m 02sFound: 0 Accepted: 0/0/0 Routed: 0
- No findings recorded for this run
- CLI Review 3 CompletedRuntime 1m 23sFound: 1 Accepted: 0/1/0 Routed: 0
- Minor
Update the update query in CharacterRepository to include CHARACTERS.TENANT_ID.eq(entity.getTenantId()) alongside the ID and OWNER_RESOLVED predicates, and remove the duplicate BODY_LAYOUT_KEY set.
- Accepted Accepted current-PR tenant update fence: add exact tenant predicate alongside persisted ID/OWNER_RESOLVED; remove duplicate body-layout SET. Fix and zero-write wrong-tenant proof pending locally during Hosted.
- Hosted Review 3 CompletedRuntime 3m 49sFound: 1 Accepted: 0/1/0 Routed: 0
- Update the stale migration-proof statement.Minor
Line 16 says no successful PostgreSQL migration run has been observed since the
transactional-lock=falsechange. According to the PR objectives, PostgreSQL CI run 37165391640 passed all nine Entity integration cases, includingflywayV1ToLatestRetainsLegacyRowsAndValidatesConstraints. Line 16 now contradicts that recorded evidence. The path instructions require canonical-current-state consistency. Record the observed run, and keep the remaining gap: final develop-based full-stack Smoke is still missing.Proposed fix
-... A successful PostgreSQL migration run after this configuration change has not yet been observed. +... PostgreSQL 16 CI run 37165391640 subsequently passed the V1→latest migration and retained-actor integration cases with this configuration; develop-based full-stack Smoke proof remains outstanding.As per path instructions: "Review docs for canonical-current-state consistency."
- Accepted Current runtime-and-data.md line16 denies observed PostgreSQL proof. Verified CI37165391640 ran nine cases including V1-latest migration. Correct statement while retaining develop full-stack Smoke gap; direct documentation fix.
- CLI Review 4 CompletedRuntime 2m 11sFound: 2 Accepted: 1/1/0 Routed: 0
- Minor
The verification records cite a historical run that covered five retained-actor tests, not the current six-test RetainedActorIdentityIntegrationTest. After obtaining current focused integration-suite proof, update the GR-3.1 verification cell and the corresponding Entity integration-test count in runtime-and-data.md with the new run ID and actual case counts; do not present the historical run as proof of the current test class.
- Accepted Distinguish prior five-case retained-actor PostgreSQL proof from current six-case class; mark new regression pending until exact attributable CI executes, then record actual count/run. Minor documentation/proof accuracy.
- Major
In characterUpdateRequiresExactTenantAndPreservesOwnerResolvedRowOnMismatch, call insertNamespace for TENANT_UUID, NAMESPACE_UUID, and PLAYABLE_STATE_SCOPE_SHARED before inserting the OWNER_RESOLVED actor with insertActor.
- Accepted Missing namespace fixture violates OWNER_RESOLVED foreign key before exercising tenant UPDATE. Add exact namespace fixture; preserve assertions. Major test correctness, not production bypass.
- CLI Review 5 CompletedRuntime 4m 17sFound: 0 Accepted: 0/0/0 Routed: 0
- No findings recorded for this run
- CLI Review 6 CompletedRuntime 1m 48sFound: 0 Accepted: 0/0/0 Routed: 0
- No findings recorded for this run
- CLI Review 7 CompletedRuntime 3m 10sFound: 0 Accepted: 0/0/0 Routed: 0
- No findings recorded for this run
- Hosted Review 4 CompletedRuntime 13m 43sFound: 0 Accepted: 0/0/0 Routed: 0
- No findings recorded for this run
- CLI Review 8 CompletedRuntime 2m 15sFound: 1 Accepted: 0/0/1 Routed: 0
- Trivial
Update the Entity Flyway configuration statement to retain only the
transactional-lock=falsecontract and the session-level advisory lock requirement for V3’sCREATE INDEX CONCURRENTLYstatements. Remove the historical CI run details, test counts, and pending-proof status, and link to GR-3.1 for proof status.- Accepted Valid documentation ownership correction: retain the Flyway session advisory-lock contract in architecture and link GR-3.1 for historical/current proof status; no runtime semantic change.
- Hosted Review 5 CompletedRuntime 6m 13sFound: 1 Accepted: 0/0/1 Routed: 0
- Add isolated PostgreSQL cases for both audit outcomes.Trivial
The current positive fixture references the quarantined actor through
actor_character_idandsource_character_id. It also seeds target-instance holder rows, so itstrueresult does not test the audit match. Add an audit-only case where the quarantined actor appears only indestination_character_idand assert that cleanup is blocked. Also add an audit-onlyOWNER_RESOLVEDcase and assert that retention returnsfalseand cleanup proceeds. The negative case alone cannot catch a missing destination-character match. The current query includes that match, so this is regression coverage, not a demonstrated production failure.- Accepted Valid missing PostgreSQL regression coverage: existing holder rows mask the audit predicate; add isolated destination-only quarantined and OWNER_RESOLVED audit outcomes without changing runtime behavior.
- CLI Review 9 CompletedRuntime 2m 20sFound: 3 Accepted: 1/2/0 Routed: 0
- Minor
Update the inventory-relationship cache statement in the Runtime Data Model section to mark it as target-only or remove it; keep it consistent with getWithInventory, which currently has no character graph cache path.
- Accepted Minor documentation drift: line309 states graph inventory caching live while getWithInventory deliberately bypasses cache. Mark namespace-qualified graph caching target-only; preserve fresh owner-resolved reads.
- Minor
Update the GR-3.1 verification cell to report eight cases in RetainedActorIdentityIntegrationTest and keep the current ten-test integration suite’s execution status pending until the corrected suite runs. Preserve the historical prior-run counts and clearly distinguish them from current-suite proof.
- Accepted Minor stale proof counts: current retained class has8 tests, complete integration tree12 tests rather than prior10. Preserve prior executed9/five retained evidence and mark present12 pending actual execution.
- Major
In destinationOnlyOwnerResolvedAuditDoesNotBlockCleanupWithoutRuntimeRows, insert the matching namespace scope row with insertNamespace before creating the OWNER_RESOLVED fixture via insertActor, using the same tenant UUID, namespace UUID, and shared scope.
- Accepted Major fixture defect: OWNER_RESOLVED insertion uses a new exact tenant/namespace/scope absent from namespace scope table; V2 FK rejects before audit-only cleanup assertions. Insert matching scope first; no production guard change.
- CLI Review 10 CompletedRuntime 1m 59sFound: 2 Accepted: 0/1/1 Routed: 0
- Trivial
Replace the setter-only assertion in manualFlywayConfigurationUsesSessionLevelPostgresqlAdvisoryLocks with a check of the repository’s manual Flyway configuration, using the FluentConfiguration built by RetainedActorIdentityIntegrationTest.migrationFlyway() or a shared helper; otherwise remove this test.
- Accepted Trivial proof correction: setter-only manual Flyway test checks library setter, not repository configuration. Remove misleading test or exercise real shared configuration without introducing artificial runtime helper; preserve actual integration migration and profile checks.
- Minor
Update the canonical cutover-validation notes for ValidateEntityUpgradeMappings and its illustrative responses to document the ENTITY_ACTOR_IDENTITY_QUARANTINED reason, its tenant-wide scope regardless of sourceGameInstanceId, and that a remapSetId cannot clear this INCOMPATIBLE result; clarify that cutover remains blocked until provenance is available.
- Accepted Minor API documentation gap: live tenant-wide quarantine check precedes remap handling and returns ENTITY_ACTOR_IDENTITY_QUARANTINED/INCOMPATIBLE without remap approval. Canonical cutover notes/examples must disclose provenance prerequisite; no runtime scope expansion.
- Hosted Review 6 CompletedRuntime 4m 43sFound: 1 Accepted: 1/0/0 Routed: 0
- Move
SET NOT NULLafter the remaining validations.MajorFlyway runs V4 in one transaction unless configured otherwise.
ALTER COLUMN character_uuid SET NOT NULLtakes anACCESS EXCLUSIVElock, which the transaction retains while Lines 10–32 validate the remaining constraints. On a largecharacterstable, those scans can block ordinary reads and writes until V4 commits. Validate the remaining constraints first. PerformSET NOT NULLand removal of the validated check at the end of the migration, after the scans. PostgreSQL documents both the validation lock and the ability to skip theSET NOT NULLscan when a valid check proves non-nullness. (postgresql.org)- Accepted Major: transactional V4 acquires ACCESS EXCLUSIVE at SET NOT NULL and retains it across later constraint scans. Keep all validations first, move only SET NOT NULL/drop proven nonnull check to end; add focused ordering regression without weakening retained-identity checks.
- CLI Review 11 CompletedRuntime 2m 07sFound: 0 Accepted: 0/0/0 Routed: 0
- No findings recorded for this run
- Hosted Review 7 CompletedRuntime 6m 00sFound: 0 Accepted: 0/0/0 Routed: 0
- No findings recorded for this run
- CLI Review 12 CompletedRuntime 2m 56sFound: 1 Accepted: 0/1/0 Routed: 0
- Minor
Update the recovery guidance for V3 to state that dropping invalid indexes does not clear the failed Flyway history row; when inspection confirms both V3 indexes and the ux_characters_character_uuid constraint are absent, direct the operator to run Flyway repair followed by migrate, keeping writer admission closed.
- Accepted Pending doc fix: exact V3 indexes/constraint all absent permits Flyway repair then migrate, writers closed; failed history survives index drops. Mixed or valid objects still require operator-reviewed roll-forward.
- Hosted Review 8 CompletedRuntime 4m 09sFound: 0 Accepted: 0/0/0 Routed: 0
- No findings recorded for this run
- Subagent Review 2 CompletedModel: gpt-6-luna · XhighFound: 1 Accepted: 0 Routed: 1
- kind binary pin is not enforced before executing PATH binaryMajor
Dirty SOURCE reviewed at3b225136; configured checksum unused before kind execution. Read-only initial boundary review, no runtime/tests.
Route · PR #2967 → Unassigned target OpenValid defect outside Entity PR: Gameplay owns bootstrap SOURCE, no published target yet. Direct SHA256 enforcement and same-version tamper proof assigned. No CodeRabbit taper credit. View routed finding
- CLI Review 13 CompletedRuntime 2m 37sFound: 0 Accepted: 0/0/0 Routed: 0
- No findings recorded for this run
- CLI Review 14 CompletedRuntime 3m 08sFound: 0 Accepted: 0/0/0 Routed: 0
- No findings recorded for this run
- CLI Review 15 CompletedRuntime 2m 46sFound: 1 Accepted: 0/0/1 Routed: 0
- Trivial
Update ScopedCharacterResolverTest to verify the resolver rejects the legacy owner-resolved candidate without querying the repository: remove the direct call-and-assert against the stub and add a no-interactions assertion after requireScopedCharacter throws.
- Accepted Accepted: replace the test-only direct repository call with verifyNoInteractions after legacy-scope rejection; proves rejection precedes repository lookup. One-file regression correction, validation and publication pending.
- CLI Review 16 CompletedRuntime 2m 31sFound: 0 Accepted: 0/0/0 Routed: 0
- No findings recorded for this run
- CLI Review 17 CompletedRuntime 2m 54sFound: 1 Accepted: 0/1/0 Routed: 0
- Minor
Update the invalid-index cleanup instructions in the runbook to show each DROP INDEX statement separately, with its own inspection condition immediately before it. Make clear that operators should run only the statement for the specific index confirmed invalid and unattached, preserving the outside-a-transaction requirement.
- Accepted Minor runbook safety fix: independently condition each invalid-index DROP so an operator cannot drop the healthy companion index.
- CLI Review 18 CompletedRuntime 2m 30sFound: 0 Accepted: 0/0/0 Routed: 0
- No findings recorded for this run
- CLI Review 19 CompletedRuntime 2m 36sFound: 0 Accepted: 0/0/0 Routed: 0
- No findings recorded for this run
- CLI Review 20 CompletedRuntime 2m 07sFound: 0 Accepted: 0/0/0 Routed: 0
- No findings recorded for this run
- Subagent Review 3 CompletedModel: gpt-6-luna · XhighFound: 3 Accepted: 3 Routed: 0
- System namespace and extension paths escape writer exclusionMajor
- Accepted Arbitrary system workloads/role bindings, unchecked roleRef and APIService undermine precreation all-writer exclusion. Require proved pinned baseline or block before creation; no inferred trust from names/prefixes.
- Resource inventory rejects typed Kubernetes listsMinor
Unpublished source only; implementation delegated in the two owning files. No published2967 finding or CodeRabbit/taper credit.
- Accepted Existing owner helpers support typed PodList. Add expected resource/item-kind fixtures through the real _get_list decoder; exact live kubectl output remains unverified.
- Storage/routing spec and immutable before-after readback incompleteMajor
- Accepted Exact volumes/mounts/security/network/config/service plus immutable Pod/container/storage identity must match across actual PG/Redis observations. Extra writable mounts or replacement cannot pass.
- Subagent Review 4 CompletedModel: gpt-6-luna · XhighFound: 1 Accepted: 1 Routed: 0
- Public fixture projection includes secret-derived key fingerprintsMinor
- Accepted Private-key digests/source paths must remain owner-private per custody README. No key bytes leaked. Current source may already remove ownerMounts; verify provenance and add public-projection regression before resolving.
- Subagent Review 5 CompletedModel: gpt-6-luna · XhighFound: 1 Accepted: 1 Routed: 0
- Decision selector does not enforce its UUIDv4 contractMinor
- Accepted Canonical spelling and non-nil checks alone allow v1/v7/non-RFC selectors. Source now enforces version4/variant2 with regressions; validation pending, original lease bytes unchanged.
- Subagent Review 6 CompletedModel: gpt-6.1-sol · MediumFound: 1 Accepted: 1 Routed: 0
- Passive LOGIN proposal omits both canonical authorization route matrix pathsMinor
Read-only donor14a62e387afaa3ef1392ca26b1440ac3e5d66e0d vs receiving8055569bcca418624c658b5050d75a5dfb3842db, PR2967. Rechecked clean source /home/ben/src/FireMUD-gameplay-entity-preseeded-stage-20261013, branch codex/gameplay-entity-preseeded-stage-20261013 at donor. Native proposal95eca463 and manifest64dc20be omit design/architecture/system-architecture-authz-route-matrix.md and design/architecture/system-architecture-authz-route-matrix.yaml: required RetireInitialGameplayLogin caller/request/context/witness checks and lifecycle-only, unregistered limitations. Semantic contract dependencies, not administrative differences. Initial coherence covered Account/GS callers, proto/results, V1005/V1012 retention, journal/CAS and qualification; no other supported dependency defect. Candidate proof/publication pending; no production qualification, UUID producer, custody, registration or activation proof. No edits; validation NONE.
- Accepted Accepted proposal correction: include both authz contract paths; A41+B34-two shared docs+ADR0038=74. All four credential composition paths were already listed. Remains pending actual candidate manifest/publication evidence; no resolution or provider review credit. Validation NONE; recording only.
- Subagent Review 7 CompletedModel not recordedFound: 0 Accepted: 0 Routed: 0
- No findings recorded for this run
- Subagent Review 8 CompletedModel: gpt-6.1-sol · HighFound: 1 Accepted: 1 Routed: 0
- Bound keytool execution before reading outputMinor
services/account-service/src/testFixtures/java/net/firedevops/firemud/accountservice/testsupport/AccountStartSessionReservationProofPki.java:277
- Accepted Test PKI fixture reads stdout to EOF before timed wait, so a stalled process can evade its deadline. Document is assigned a bounded output/wait and timeout/interruption cleanup correction; final source proof and revalidation remain pending.
- Subagent Review 9 CompletedModel: gpt-6.1-sol · HighFound: 0 Accepted: 0 Routed: 0
- No findings recorded for this run
- CLI Review 21 CompletedRuntime 7m 42sFound: 9 Accepted: 0/2/5 Routed: 0
- Map changed immutable authorization to
FAILEDPRECONDITION.MinorMap changed immutable authorization to `FAILED_PRECONDITION`.
When an existing authorization differs from the request,
AccountPublicationAuthorizationRepository.authorizecallsrequireExact, which throwsIllegalArgumentException("Changed immutable selected-publication authorization"). The receiver currently maps that exception toUNAVAILABLE, although retrying the changed input cannot succeed.Keep the pending source-change case as
UNAVAILABLE.requirePublicationAdmissionthrowsIllegalStateExceptionwhile a source change is inWAITING; that is an in-progress authority transition and is intended to remain retryable. Do not catch everyIllegalStateExceptionhere.} catch (StatusRuntimeException failure) { deny(observer, Status.fromCode(failure.getStatus().getCode())); return; + } catch (IllegalArgumentException conflict) { + deny(observer, Status.FAILED_PRECONDITION); + return; } catch (RuntimeException unavailable) { deny(observer, Status.UNAVAILABLE); return;- Accepted Changed-input authorization throws IllegalArgumentException. Map conflict to sanitized FAILED_PRECONDITION; keep pending source-change IllegalStateException retryable UNAVAILABLE and prove both codes.
- Bound the keytool wait so a stalled child cannot hang the build.Minor
runKeytoolcallsstream.readAllBytes()beforeprocess.waitFor(30, TimeUnit.SECONDS).readAllBytes()blocks until the child closes its output, so a stalled keytool (for example, one waiting on a password prompt) blocks forever. The 30-second deadline never runs, and the timeout branch never destroys the child. This PR fixes the same defect inAccountStartSessionWorldParticipationSettlementGrpcMtlsTestandAccountStartSessionReservationProofPki: those versions redirect output to a file and call a boundedawaitKeytoolExit. This copy still has the old pattern.toLowerCase()here also omits aLocale.Use the same file-redirect and bounded-wait approach. A better option is to reuse the shared test-fixture PKI helper so the keytool logic exists in one place.
🐛 Proposed fix
- Process process = new ProcessBuilder(command).redirectErrorStream(true).start(); - String output; - try (var stream = process.getInputStream()) { - output = new String(stream.readAllBytes(), StandardCharsets.UTF_8); - } - if (!process.waitFor(30, TimeUnit.SECONDS) || process.exitValue() != 0) { - process.destroyForcibly(); - throw new IllegalStateException("keytool failed: " + output); - } + Path output = Files.createTempFile(temporaryDirectory, "keytool-output-", ".log"); + try { + Process process = + new ProcessBuilder(command) + .redirectErrorStream(true) + .redirectOutput(output.toFile()) + .start(); + if (!process.waitFor(30, TimeUnit.SECONDS)) { + process.destroyForcibly(); + process.waitFor(5, TimeUnit.SECONDS); + throw new IllegalStateException("keytool exceeded its execution deadline"); + } + if (process.exitValue() != 0) { + throw new IllegalStateException("keytool failed: " + Files.readString(output)); + } + } finally { + Files.deleteIfExists(output); + }- Accepted Verified readAllBytes precedes supposed deadline. Reuse existing bounded Account PKI runner and Locale.ROOT without changing credential or peer boundaries.
- Use the required entry format. Do not record a completed fix as an observation.Minor
The two
2026-10-15entries are free-form paragraphs. The file requires theYYYY-MM-DD: title / Context / Observation / Expected pattern structure, and the later 2026-10-16 entries follow it.The follow-up entry also records the V1011 correction and the R14/R16 results, so it reads as a log of a fix finished in the same work. The file rule says: "Do not use this file as a bug log for ordinary fixes that were completed in the same piece of work." The reusable lesson is that separate owner proofs did not catch the stale V94 profile validator. Keep that lesson in the required format. The proof counts belong in the authoring tracker, which already records them.
Proposed restructure
-- 2026-10-15: Separate selected-publication owner proofs missed an Account settlement profile gap. ... - -- 2026-10-15 follow-up: Account's forward V1011 now converges ... +- `2026-10-15`: Composed owner proofs exposed a stale consumer profile validator + - Context: The GDS terminal → World completion → Account settlement composition failed at Account V94 with SQLSTATE 23514. + - Observation: Separate component passes did not exercise the closure inventory/2 + World/4 producer profile against the Account validator. + - Expected pattern: When a producer profile changes, run the actual consumer composition. Apply a forward validator correction with exact profile/refusal and retained-row upgrade proof. Do not rewrite installed migrations.As per coding guidelines: "Entry format:
YYYY-MM-DD: short title — Context / Observation / Expected pattern" and "Do not use this file as a bug log for ordinary fixes that were completed in the same piece of work."- Rejected Requested consolidation/deletion rewrites prior dated observations, contrary to canonical append-only rule for ordinary work. Historical composition failure and qualification notes stay retained; bounded stewardship/health-check authority is distinct.
- Use the base-class lifecycle helpers instead of duplicate
initialized/closedstate.TrivialAbstractReloadingBlockingGrpcClientalready hasinitOnce(closedMessage, unavailableMessage),requireInitializedStub(message), andrequireNoAmbientSql(message). These helpers keep their ownclosed/explicitlyInitializedstate under the client monitor. This class copies that logic with separate volatile flags and an overriddenclose().AccountSelectedPublicationSettlementClientcopies the same pattern. Two sets of lifecycle state can diverge if the base close semantics change.♻️ Proposed refactor
- private volatile boolean initialized; - private volatile boolean closed; ... - public synchronized void init() throws SSLException, IOException { - if (closed) throw new IllegalStateException("Account selected-publication client is closed"); - if (initialized) return; - initReloadingClient(); - if (stub() == null) - throw new IllegalStateException("Account selected-publication stub unavailable"); - initialized = true; - } + public void init() throws SSLException, IOException { + initOnce( + "Account selected-publication client is closed", + "Account selected-publication stub unavailable"); + } ... - if (TransactionSynchronizationManager.isActualTransactionActive() - || TransactionSynchronizationManager.isSynchronizationActive()) - throw new IllegalStateException( - "Account selected-publication transport requires no owner transaction"); + requireNoAmbientSql("Account selected-publication transport requires no owner transaction"); ... - var current = stub(); - if (closed || !initialized || current == null) - throw new IllegalStateException("Account selected-publication client unavailable"); + var current = requireInitializedStub("Account selected-publication client unavailable");Delete the
close()override as well.Also applies to: 109-116
- Accepted Base class already owns synchronized init/closed state and SQL guard. Reuse helpers in both Account clients, preserving namespaces, mTLS, peers, credentials, deadlines and errors.
- Map deterministic owner conflicts to
FAILEDPRECONDITION, notUNAVAILABLE.MinorMap deterministic owner conflicts to `FAILED_PRECONDITION`, not `UNAVAILABLE`.
The handler maps every non-status
RuntimeExceptiontoUNAVAILABLE. This includes deterministic refusals from the owner path:IllegalArgumentException("Changed immutable selected-publication authorization")fromAccountPublicationAuthorizationRepository.requireExact. This happens when a different selection reuses the samepublish_request_id.IllegalStateException("Authenticated Game Design selection differs ...")fromAccountSelectedDraftPublicationOrderService.IllegalStateException("Applicable authority source change is waiting")fromrequirePublicationAdmission.
UNAVAILABLEtells the Game Design caller that the request is retryable. A changed-input conflict never succeeds on retry, so the caller can retry it indefinitely. The siblingAccountSelectedPublicationSettlementGrpcServicealready mapsIllegalArgumentExceptiontoFAILED_PRECONDITION. Apply the same rule here so both Account selected-publication receivers have the same error contract.Proposed fix
} catch (StatusRuntimeException failure) { deny(observer, Status.fromCode(failure.getStatus().getCode())); return; + } catch (IllegalArgumentException conflict) { + deny(observer, Status.FAILED_PRECONDITION); + return; } catch (RuntimeException unavailable) { deny(observer, Status.UNAVAILABLE); return; }As per path instructions: "Flag changes that violate documented FireMUD invariants, especially gRPC application-error handling."
- Rejected Duplicate of accepted finding9 for same handler. Its broader narrative incorrectly treats WAITING source transition as permanent; accepted fix catches only IllegalArgumentException and preserves retryable IllegalStateException.
- Reuse the shared
awaitKeytoolExitinstead of keeping a second copy.TrivialTestPki.runKeytoolandTestPki.awaitKeytoolExitduplicateAccountStartSessionReservationProofPki.runKeytoolandAccountStartSessionReservationProofPki.awaitKeytoolExitline for line. Lines 82-145 also duplicate the timeout and interruption tests inAccountStartSessionReservationProofPkiTest. If one copy changes later, the copies will drift. Make the fixture helper accessible from this test (for example, a public staticawaitKeytoolExit/runKeytoolintestsupport), then delete the local copy and its two tests.- Accepted Bounded runner and stalled-child cases are duplicated. Reuse existing shared Account fixture runner; retain canonical timeout/interruption proof, removing only duplicate fixture helpers/cases.
- Gate or remove the
SettlementDiagnosticsstdout instrumentation.TrivialSettlementDiagnosticswrites an unconditionalSystem.out.printfline for every PostgreSQL container, every phase, every gRPC message and handler step, and every Account transaction. Each run of this test now produces a large volume ofSETTLEMENT_DIAGNOSTICoutput, and the test assertions do not use any of it. The instrumentation looks like investigation tooling for the settlement timing problem.If the instrumentation must stay, route it through a test logger at debug level, or enable it only when a system property is set (for example,
-Dfiremud.settlementDiagnostics=true). Otherwise remove it after the investigation is complete.- Accepted Diagnostic output is unconditional and not asserted. Gate output behind opt-in firemud.settlementDiagnostics; preserve diagnostic events and owner/transport proof behavior when enabled.
- Bound and reap the keytool child, and preserve interruption.Trivial
runKeytoolwaits 30 seconds before it reads output. On timeout, it callsdestroyForcibly()but does not wait for the child to exit. If the test thread is interrupted,waitForthrows and leaves the child running. The output is read only after the wait, so a child that fills the pipe buffer stalls until the timeout ends.ai-observations.mdrecords the corrected pattern for other Account PKI fixtures: redirect output to an owned temporary file, wait within the deadline, and terminate and reap the child on timeout or interruption while preserving interrupt status. It also says to compare each remaining fixture independently. Apply the same purpose-specific correction here.Proposed fix
- Process process = new ProcessBuilder(command).redirectErrorStream(true).start(); - if (!process.waitFor(30, TimeUnit.SECONDS)) { - process.destroyForcibly(); - throw new IllegalStateException("Ephemeral test certificate generation timed out"); - } - try (var output = process.getInputStream()) { - String details = new String(output.readAllBytes(), StandardCharsets.UTF_8); - if (process.exitValue() != 0) - throw new IllegalStateException("Test keytool failed: " + details); - } + Path log = Files.createTempFile("keytool", ".log"); + Process process = + new ProcessBuilder(command).redirectErrorStream(true).redirectOutput(log.toFile()).start(); + try { + if (!process.waitFor(30, TimeUnit.SECONDS)) { + throw new IllegalStateException("Ephemeral test certificate generation timed out"); + } + } catch (InterruptedException interrupted) { + Thread.currentThread().interrupt(); + throw interrupted; + } finally { + if (process.isAlive()) { + process.destroyForcibly().waitFor(5, TimeUnit.SECONDS); + } + } + try { + if (process.exitValue() != 0) + throw new IllegalStateException( + "Test keytool failed: " + Files.readString(log, StandardCharsets.UTF_8)); + } finally { + Files.deleteIfExists(log); + }- Accepted Verified pipe wait does not reap on timeout/interruption. Reuse existing Account fixture bounded keytool runner; preserve certificates, TLS and owner semantics.
- Rename the shared helper. The name contradicts the equality case.Trivial
originalCreatorIssuedAtEqualityAtFinalOwnerLockAllowsCurrentCallbackcallsassertOriginalCreatorTimeAtFinalOwnerLockDeniesCurrentCallback. WithDuration.ZERO, the helper asserts that the callback runs and that no failure occurs. The name says "Denies", so it misdescribes the allowed boundary. Use a neutral name such asassertOriginalCreatorTimeAtFinalOwnerLock.- Accepted Helper name contradicts its covered equality-success case. Rename helper/callers only; preserve temporal-boundary assertions.
- CLI Review 22 CompletedRuntime 3m 26sFound: 4 Accepted: 0/2/2 Routed: 0
- The binding size limit rejects valid responses for large selections.Minor
AccountPublicationAuthorizationBinding.canonicalBytes()contains the complete selection canonical bytes plus the operation IDs, fence IDs, and source evidence. The binding is therefore always larger than the selection.Requestaccepts selections up toMAX_SELECTION_BYTES. For a selection near that limit, Account authorizes and commits the binding. The client then rejects the response, and every exact retry is rejected in the same way. Use a separate, larger response limit, or derive the limit from the selection length plus the maximum binding overhead.🐛 Proposed fix
- || wire.getPublicationAuthorizationBinding().size() > MAX_SELECTION_BYTES) + || wire.getPublicationAuthorizationBinding().size() > MAX_BINDING_BYTES)/** Selection plus bounded Account identity and source-evidence frames. */ public static final int MAX_BINDING_BYTES = 2 * MAX_SELECTION_BYTES;- Accepted Confirmed selection1MiB accepted while complete binding necessarily exceeds it. Reuse existing4MiB Account binding bound, bound response including echoed selection, configure client inbound size; add boundary roundtrip/refusal proof.
- Consider using the shared base-client lifecycle helpers.Trivial
The new publication clients call
initOnce,requireInitializedStub, andrequireNoAmbientSqlfromAbstractReloadingBlockingGrpcClient. This client still keeps its owninitialized/closedflags and its own transaction guard. If this client uses the shared helpers, all publication clients follow one lifecycle contract, and changes to that contract happen in one place.- Accepted Terminal client still duplicates base lifecycle and ambient-SQL guard. Reuse initOnce/requireInitializedStub/requireNoAmbientSql preserving namespaces, peers, deadlines and close semantics.
- Use the required entry format for the 2026-10-15 observations.Minor
The two 2026-10-15 entries are free-form paragraphs. The file defines a fixed entry format:
- A
YYYY-MM-DD: short titleline. Context,Observation, andExpected patternsub-bullets.
The later 2026-10-16 entries in this file follow that format. These two entries do not. Restructure them into the same shape.
Keep the follow-up as a separate appended outcome. The original "in progress" statement must stay as written, because during ordinary work the file must not be silently rewritten.
The changed ranges and the change summary also disagree. The summary reports nine removed entries, and the same topics appear as changed lines 268–305. If these entries were moved or rewritten, confirm the authority for that edit. The file guidance states: "During ordinary autonomous work, this file is append-only: add dated reusable observations, and do not silently rewrite or delete prior entries."
As per coding guidelines: "Entry format:
YYYY-MM-DD: short title — Context / Observation / Expected pattern".📝 Proposed format
-- 2026-10-15: Separate selected-publication owner proofs missed an Account settlement profile gap. The actual GDS terminal → ... +- `2026-10-15`: Separate owner proofs missed an Account settlement profile gap + - Context: Actual GDS terminal → authenticated World completion → both terminal reads reached Account V94. + - Observation: SQLSTATE 23514; the inventory validator admitted only inventory/1 + World/3 while the producer retains closure inventory/2 + World/4. Prior component passes did not expose it. + - Expected pattern: Compose actual producers before claiming settlement compatibility; correct with a forward validator plus exact profile/refusal and retained-settlement upgrade proof. Do not rewrite installed migrations.- Accepted Two entries are introduced by this unmerged PR. Format only while preserving every sentence, exact historical in-progress statement and separate follow-up/outcomes. No consolidation/deletion; nine-removed claim disproved by actual added diff.
- A
- Move the file-backed mTLS check into one shared helper.Trivial
requireMtlsrepeats the logic inAccountSelectedPublicationSettlementClient.requireFileBackedMtlsandGameDesignPublicationTerminalClient.requireFileBackedMtls. These are security preconditions. Three copies can diverge, for example if theclasspath:rule or the trim behavior changes in only one client. Put the check in one sharedcommon.grpchelper that takes the error label.- Accepted Three file-backed mTLS preconditions duplicate rejection/trim/readability rules. Consolidate optional base helper with caller error context; preserve peers, credentials and validation behavior.
- CLI Review 23 CompletedRuntime 3m 02sFound: 1 Accepted: 0/0/1 Routed: 0
- Assert the specific refusal status for the pre-terminal settlement attempt.Trivial
The pre-terminal settlement check accepts any
RuntimeException. The zero-row assertion that follows does not show why the call failed. For example, a peer-identity rejection, a deadline expiry, or a codec failure also leaves zero settlement rows. Any of these makes this phase pass without showing that Account refuses settlement because no World terminal exists yet.Assert the expected
io.grpc.Status.CodefromStatus.fromThrowable(...), as thewrongCallercheck does above. The same weakness applies to the firstclient.authorize(request)andfreeze.begin(request)failure checks. Those checks are partly protected by the read counters.♻️ Proposed tightening
assertThatThrownBy( () -> settlementClient.settle( net.firedevops.firemud.common.publication .AccountSelectedPublicationSettlementGrpcCodec.Request.create( NAMESPACE, operation.canonicalBytes()))) - .isInstanceOf(RuntimeException.class); + .isInstanceOfSatisfying( + io.grpc.StatusRuntimeException.class, + error -> + assertThat(io.grpc.Status.fromThrowable(error).getCode()) + .isEqualTo(io.grpc.Status.Code.FAILED_PRECONDITION));Confirm the code that Account returns when no terminal exists before you apply this change.
- Accepted Valid proof gap: broad RuntimeException permits unrelated failure. Tighten three controlled refusal assertions to verified grpc codes: authorize and freeze transport outages UNAVAILABLE; missing committed World terminal FAILED_PRECONDITION. Preserve row/read counters.
- CLI Review 24 CompletedRuntime 3m 55sFound: 1 Accepted: 0/1/0 Routed: 0
- Validate the same path string that the channel and watcher later use.Minor
requireFileBackedMtlschecksconfiguredPath.trim(). It then returnstlsPropertieswith the untrimmed value.initReloadingClientcallsPath.of(tlsProps.getCertChain())on the untrimmed value.channelFactory.buildChannelalso receives the untrimmed value.On POSIX, leading or trailing spaces are valid filename characters. Consider the configured value
" /certs/client.crt". Validation passes because/certs/client.crtexists.init()then fails with anIOExceptionon a different path. The constructor guard therefore does not give its fail-fast guarantee.Reject surrounding whitespace, or validate the exact configured string.
🐛 Proposed fix
- String pathText = configuredPath.trim(); - if (pathText.startsWith("classpath:")) { + String pathText = configuredPath; + if (!pathText.equals(pathText.strip()) || pathText.startsWith("classpath:")) { throw new IllegalArgumentException( errorContext + " requires readable file-backed TLS material"); }- Accepted Verified path mismatch: constructor checks trimmed path but watcher/channel open exact configured string. Validate unmodified path; reject missing exact files even when trimmed neighbors exist, retain real space-containing filenames and sanitized context. No new path policy.
- CLI Review 25 CompletedRuntime 2m 44sFound: 1 Accepted: 0/1/0 Routed: 0
- Check that the 16 KiB credential bound fits the gRPC metadata limit.Minor
Credential.ofaccepts up toMAX_CREDENTIAL_BYTES(16384) bytes. The credential travels in the binary headerfiremud-selected-publication-creator-bin. gRPC base64-encodes binary header values on the wire, so a 16384-byte credential becomes about 21,846 header bytes. grpc-java Netty servers use a defaultmaxInboundMetadataSizeof 8 KiB. A credential larger than about 6 KiB can therefore pass every local check and still fail at the Account server. The failure is a transport error such asRESOURCE_EXHAUSTEDorINTERNAL, not a defined denial.Confirm whether the Account gRPC server sets
maxInboundMetadataSizehigh enough for this header. If it does not, do one of the following:- Lower
MAX_CREDENTIAL_BYTESto a value whose encoded size fits the configured limit. - Raise the server metadata limit for this service.
Add a test at the maximum credential size over the real mTLS transport.
- Accepted 16KiB credential exceeds default receiver metadata allowance. Follow existing Account original-order precedent: explicit bounded22872metadata, exactmax mTLSproof and receiving prerequisite before registration. No credential-bound reduction/global enablement.
- Lower
- CLI Review 26 CompletedRuntime 2m 48sFound: 0 Accepted: 0/0/0 Routed: 0
- No findings recorded for this run
- CLI Review 27 CompletedRuntime 2m 46sFound: 2 Accepted: 0/1/1 Routed: 0
- Shut down the executor so a timed-out worker fails the test instead of hanging it.Minor
first.get(20, SECONDS)andsecond.get(20, SECONDS)set a bound on the wait. Try-with-resources callsExecutorService.close(), andclose()waits for running tasks without a time limit. If a worker blocks on a row lock or stalls incommitStorage,getthrowsTimeoutException. The implicitclose()then waits indefinitely, so the build hangs and the timeout diagnostic is lost.Use an explicit
shutdownNow()with a boundedawaitTerminationin afinallyblock.🛠️ Proposed fix
- try (var executor = java.util.concurrent.Executors.newFixedThreadPool(2)) { + var executor = java.util.concurrent.Executors.newFixedThreadPool(2); + try { ... assertThat(releaseBundleTuple(fixture.dsl(), one.getId())).isEqualTo(beforeRetry); - } + } finally { + executor.shutdownNow(); + assertThat(executor.awaitTermination(10, java.util.concurrent.TimeUnit.SECONDS)).isTrue(); + }- Accepted Future.get timeout is defeated by ExecutorService.close waiting without a bound. Replace only concurrent-test lifecycle with shutdownNow and bounded termination, preserving original failure and interruption.
- Consolidate the duplicated keytool PKI builders.Trivial
This
TestPkirepeats the same keytool workflow (CA generation, export,-genkeypair/-certreq/-gencertper SPIFFE identity, PKCS12 key extraction) thatAccountSelectedDraftPublicationOrderGrpcMtlsTest.TestPkiandAccountStartSessionWorldParticipationSettlementGrpcMtlsTest.TestPkialso implement. All three now delegate only the process call toAccountStartSessionReservationProofPki.runKeytool. Move identity issuance into the shared fixture, for exampleissueIdentity(caStore, alias, spiffeUri, server). Then the bounded-child and SAN/EKU rules have one owner instead of three diverging copies.- Accepted Three controlled PKI builders duplicate CA and leaf issuance. Reuse existing bounded fixture while preserving each CA, SAN, EKU, workload, namespace and artifact variant; no production or trust change.
- CLI Review 28 CompletedRuntime 2m 48sFound: 4 Accepted: 0/1/1 Routed: 0
- Check whether this receiver must reject an authenticated caller context, as the settlement receiver does.Minor
AccountSelectedPublicationSettlementGrpcService(Lines 42-46) denies any call whereSessionContext.hasAuthenticatedCallerContext()is true. This change also makesStartSessionReservationEvidenceClientreject an ambient caller context. The order producer accepts only the exact Game Design workload, but it does not checkSessionContext. If a shared interceptor fillsSessionContextfrom end-user metadata, a player context can reachowner.authorizetogether with the creator credential. That breaks the "workload-only" boundary rule used by the sibling adapters.Confirm the canonical rule for the selected-publication order transport. If it must reject caller context, add the same check after the peer check:
Proposed guard
Status denied = peerDenial(); if (denied != null) { deny(observer, denied); return; } + if (net.firedevops.firemud.common.security.SessionContext.hasAuthenticatedCallerContext()) { + deny(observer, Status.PERMISSION_DENIED); + return; + }- Accepted Exact workload-only order ingress lacks ambient authenticated SessionContext rejection. Add shared peerDenial check for bound interceptor/direct handler before credential parsing and owner effects; preserve all existing authority/transport rules.
- Move the callback validity and key-acceptance rules into the Account contract.Trivial
Line 25 defines a normative rule: one clock observation must satisfy
issuedAt <= now < expiresAtbefore the callback runs. Line 31 defines another: the exact key ID and RFC 7638 fingerprint must be present in the protected JWKS snapshot, and newest-signer selection is not required. These are target-state technical contracts. The tracker should only record implementation and proof status for them.Add both rules to the Account API or runtime contract. Then change this tracker to link to that contract, and keep only the anchors and validation results here.
Based on learnings: "do not duplicate canonical technical contracts that are already defined by the owning ADRs or architecture contracts... use this documentation only to track implementation-specific status". As per path instructions: "Architecture owns technical target state."
Also applies to: 31-31
- Accepted Tracker owns normative callback-time and accepted-key rules. Move existing Account-local contract into owning Account API, link global JWT contract, retain implementation/proof attribution and limits in tracker.
- Merge these two entries and remove the proof-result details.Minor
The first entry's
Observationsays "Correction and qualification are in progress". That text is a status note, not a surprising observation. The second entry records the completed V1011 correction and the R14/R16 case results. The selected-publication trackers already contain the same results.The file rule says: "Do not use this file as a bug log for ordinary fixes that were completed in the same piece of work." Keep one entry with the reusable lesson. The lesson is: separate owner-component proofs can miss a composed profile mismatch, so composed proof is required before a validator is accepted. Put the
Outcomein that same entry, and link to the tracker instead of repeating the run counts.As per coding guidelines: "Workers should append reusable observations ... and ordinary bugs fixed in the same work should not become entries."
- Rejected AGENTS requires dated append-only observations during ordinary autonomous work and forbids silently rewriting prior entries. These retain the failed composition and dated qualified follow-up; no human repository-health cleanup was requested.
- Check whether the narrower legacy inventory/1 branch can leave retained orders permanently unsettleable.Major
The new v1 branch now requires
checkpoint->'digestSchemaVersion' = '3'andselector->'request'->'digestSchemaVersion' = '3'. The old V94 profile anchor did not check these values.AccountSourceCurrentnessForwardMigrationsPostgresIntegrationTesthad to change its v1 fixture from1to3(Lines 918 and 1024) to keep passing. This confirms that the v1 profile is now narrower.The guard runs only on settlement insert. Retained settlement rows therefore stay valid. A risk remains for a held
account_selected_publication_authorizationsorder whose operation carries inventory/1 with a different digest schema. After the upgrade, that order cannot settle. Its source rows stay inaccount_selected_publication_sources, sohasPendingPublicationkeeps blocking source changes and disclosure for those sources. No recovery path exists.Confirm that no deployed or retained World producer emitted inventory/1 with
digestSchemaVersionother than 3. If such operations can exist, keep the earlier v1 acceptance for them, or document their disposition before this migration ships.- Rejected No new supported-order regression: unchanged pre-PR typed inventory and retained-operation decoder already require inventory/1 + World3. V94 SQL was broader. V1011 aligns SQL; noncanonical held rows already fail Java. No deployed-state absence claim or retention waiver.
- CLI Review 29 CompletedRuntime 2m 02sFound: 0 Accepted: 0/0/0 Routed: 0
- No findings recorded for this run
- CLI Review 30 CompletedRuntime 3m 05sFound: 2 Accepted: 0/0/0 Routed: 0
- Move the duplicated exact-workload SPIFFE predicate into one shared helper.Trivial
Five new classes build the same
"spiffe://firemud/ns/" + namespace + "/sa/<workload>"string inline and compare it toGrpcPeerIdentity.current().uri():AccountSelectedDraftPublicationSettlementService.requireGameDesignPeerAccountSelectedDraftPublicationOrderService.requireGameDesignPeerAccountSelectedDraftPublicationOrderGrpcService.peerDenialAccountSelectedPublicationSettlementGrpcService.settleSelectedPublicationAccountPublicationAuthorizationReadService.requirePeer
This predicate is an authorization boundary. If one copy changes (for example, the trust-domain prefix or workload name), the copies stop matching and nothing detects it. Add one helper that returns the denial status for an exact namespace and workload, and call it from all five sites.
♻️ Example helper
// e.g. in a small package-private Account helper static Status exactWorkloadDenial(String namespace, String... workloads) { var peer = GrpcPeerIdentity.current(); if (peer == null) return Status.UNAUTHENTICATED; for (String workload : workloads) { if (("spiffe://firemud/ns/" + namespace + "/sa/" + workload).equals(peer.uri())) return null; } return Status.PERMISSION_DENIED; }- Rejected Optional extraction; no current authorization mismatch. Verified five predicates and denial tests: order/settlement allow Game Design, owner read also allows World, and ingress separately denies player context. No demonstrated correctness repair.
- Watch the uncached protected JWKS load that now runs on every fresh callback.Trivial
readAcceptedSignerKeycallspublicSource.load()directly. It does not usepublicJwksCache. Everyauthenticate,claimOriginalDraft, selected-publicationauthorize, andwithCurrentCommittedcall now makes one protected source observation, in addition to the cachedverifySignedread. This matches the documented per-invocation snapshot contract, so this is not a defect. The trusted source is an external protected read, so its latency and availability now apply directly to every creator callback.Before you register these paths, add a latency/failure metric and a bounded timeout around
publicSource.load(). Also confirm the expected callback rate against the source's rate limits.- Rejected Per-invocation snapshot is canonical and unregistered. AccountJwtJwksApiBinding already limits each HTTP request to8s and connect to3s. No current timing/authority defect shown; metrics/rate planning is future registration advice.
- CLI Review 31 CompletedRuntime 2m 32sFound: 1 Accepted: 0/0/0 Routed: 0
- Confirm that the production Account gRPC server accepts metadata of
MAXMETADATABYTES.MinorConfirm that the production Account gRPC server accepts metadata of `MAX_METADATA_BYTES`.
MAX_CREDENTIAL_BYTESallows a 16384-byte credential. The-binheader sends this credential as base64, so the header can be about 21.8 KiB on the wire. By default, grpc-java servers limit inbound metadata to 8 KiB. If the server rejects the headers, the client getsRESOURCE_EXHAUSTEDorINTERNALbefore Account authorization runs.The cross-service test raises the limit only for its loopback servers:
ownerServerinSelectedFullOwnerPublicationPostgresIntegrationTestcalls.maxInboundMetadataSize(AccountSelectedPublicationOrderGrpcCodec.MAX_METADATA_BYTES). The Account service server configuration is not in this change. If that configuration keeps the default limit, credentials longer than about 6 KiB fail in production, even though the codec accepts them.Do one of these two things:
- Set
maxInboundMetadataSizeto at leastMAX_METADATA_BYTESon the Account gRPC server that registersAccountSelectedDraftPublicationOrderGrpcService. - Lower
MAX_CREDENTIAL_BYTESso the encoded header fits the server's limit.
Verify which limit the production Account server uses.
- Rejected Already documented prerequisite: adapter is unregistered, with no production caller. Its Javadoc and Account API owner require22872-byte metadata before registration; controlled tests configure it. Preserve16KiB credential contract and activation hold.
- Set
Routed Findings
Route 1 · PR #2967 → Unassigned target OpenMajorkind binary pin is not enforced before executing PATH binary
Dirty SOURCE reviewed at3b225136; configured checksum unused before kind execution. Read-only initial boundary review, no runtime/tests.
Outcome: Valid defect outside Entity PR: Gameplay owns bootstrap SOURCE, no published target yet. Direct SHA256 enforcement and same-version tamper proof assigned. No CodeRabbit taper credit.
Route 2 · PR #3125 → PR #2967 Accepted/FixedMinorVerify that the display-name length rule matches Entity's rule.
isCanonicalDisplayNamelimitsvalue.length()to 100. That value counts UTF-16 code units, not Unicode code points. Line 58 says the client matches Entity's bounded roster contract. Other canonical limits in this PR count code points; for example,CanonicalInitialAdmissionRequestusescodePointCount.Suppose Entity limits display names to 100 code points. A valid name of 51 or more supplementary characters, such as emoji, then fails here.
validateResponsewould reject the complete roster, andCanonicalGameplayRosterSelectionServicewould returnINVALID_ROSTER_PROOFfor every actor of that account.Confirm whether Entity's
CanonicalGameplayRosterSnapshotDigestcontract counts UTF-16 units or code points. If it counts code points, apply this change:🐛 Proposed fix
- && value.length() <= 100 + && value.codePointCount(0, value.length()) <= 100Outcome: Published9526190049a86feef40cd616ec7b5eb931247e8b preserves100-code-point source acceptance through Entity roster and GS client;292unit+27PostgreSQL0skip and21GS cases pass, fullEntity/focusedGS static/format/docs gates pass. PG supplementary100CP assignment/roster case executes.
Earlier routing and proof
Earlier decisions
- Accepted Producer persists a valid100-code-point PRESEEDED display name that the100-UTF16 roster guard rejects. Preserve existing accepted source bound and align Entity roster plus GS consumer; prove supplementary-character assignment-to-roster readback.
Unlinked items
Decisions
- Accepted Owned runtime2967 activation prerequisite per Overseer e2af8f49: classify sealed roster family under ADR0163 and prove disposal before registered writer; pending implementation, existing holds/deletion guards preserved.