Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
7ac68df
Quarantine retained actor identity and add exact namespace-qualified …
benhook1013 Oct 3, 2026
8bf05b7
Merge commit 'db306e918e7e868198916ef449beca1bbc72f0cc' into codex/ga…
benhook1013 Oct 3, 2026
c53f14b
Enforce persisted actor update identity and immutable namespace scope
benhook1013 Oct 3, 2026
a38bdde
Merge commit 'ef57c4d1c4b4166428732ad059db30d1e0c42205' into codex/ga…
benhook1013 Oct 3, 2026
631e159
fix(entity-management): use session locks for concurrent index migrat…
benhook1013 Oct 4, 2026
80b616e
Merge commit 'cc00fd8ec8cd5e941e6ea09627360b975d207940' into codex/ga…
benhook1013 Oct 4, 2026
400dfe0
fix(entity): complete migration fixture and review corrections
benhook1013 Oct 4, 2026
29ef830
Reconcile Account parent and enable stacked Validation
benhook1013 Oct 4, 2026
67b4934
fix(entity): align proof states and reject self-friendship precisely
benhook1013 Oct 4, 2026
3ace5c4
Fence character updates by tenant and refresh migration proof
benhook1013 Oct 4, 2026
d6ec652
Align character update limitation with tenant fence
benhook1013 Oct 4, 2026
466830d
Initialize tenant-fence proof namespace and distinguish historical co…
benhook1013 Oct 4, 2026
811a173
Merge remote-tracking branch 'origin/develop' into codex/gameplay-ent…
benhook1013 Oct 4, 2026
a4fe745
Carry forward reviewed CI safety corrections
benhook1013 Oct 5, 2026
7cc7469
Reconcile Entity namespace foundation with current develop
benhook1013 Oct 5, 2026
696f4b7
Merge commit '87da524321b89b97ecaff5f97146eb1098038a49' into codex/ga…
benhook1013 Oct 6, 2026
4897809
Merge branch 'codex/account-gameplay-authority-foundation' into codex…
benhook1013 Oct 6, 2026
d18e599
Merge remote-tracking branch 'origin/codex/account-gameplay-authority…
benhook1013 Oct 6, 2026
d9f7106
test(entity): isolate quarantined audit retention outcomes
benhook1013 Oct 6, 2026
90fb710
Merge commit '39453c55924b6ec80f6e5a91b3458206da318b21' into codex/ga…
benhook1013 Oct 6, 2026
3365343
Fix Entity audit fixture namespace and proof status
benhook1013 Oct 6, 2026
757fd8c
Clarify tenant quarantine cutover proof and remove setter-only test
benhook1013 Oct 6, 2026
99a3c7b
Merge commit 'db7203c886079917dad4b73ce1b534584b9e5d0c' into codex/ga…
benhook1013 Oct 6, 2026
bf03be0
Defer Entity strong migration lock until validations complete
benhook1013 Oct 6, 2026
b3eb131
Merge commit 'd619948920469228814d8d2ef60f9dac8672e7ea' into codex/ga…
benhook1013 Oct 6, 2026
dff13b5
Extract authenticated Account runtime identity producer
benhook1013 Oct 6, 2026
df28467
Merge commit 'f086de2896f885e33745d1482872ec2ae1c480c2' into codex/ga…
benhook1013 Oct 6, 2026
e0f15d9
Merge commit 'df284676a32530385c11b9cfbc8aa174d67579e5' into codex/ga…
benhook1013 Oct 6, 2026
bd11d79
Merge remote-tracking branch 'origin/develop' into codex/gameplay-ent…
benhook1013 Oct 6, 2026
abd02e8
Merge branch 'codex/gameplay-entity-namespace-ownership-foundation' i…
benhook1013 Oct 6, 2026
5c88cd0
Merge remote-tracking branch 'origin/develop' into codex/gameplay-run…
benhook1013 Oct 8, 2026
8d88c3e
Isolate Account staging and shared owner-source foundation on develop
benhook1013 Oct 8, 2026
7760c0f
Record staged owner-source proof and wrong-checkout safety incident
benhook1013 Oct 8, 2026
82a7e69
Verify current tenant source for JOIN and repair Account proof fixtures
benhook1013 Oct 8, 2026
9d28e9f
Share publication policy proof fixtures and align Account capability …
benhook1013 Oct 8, 2026
c636a14
Merge commit '6263fb113dc953c07b2abf9cfd52b5de4c63d0be' into codex/ga…
benhook1013 Oct 8, 2026
48527ad
Apply canonical formatting to shared policy proof fixture
benhook1013 Oct 8, 2026
7e7830e
test: assert complete actor assignment request schema
benhook1013 Oct 8, 2026
23e7c4a
Unify launch evidence preimages and correct Account source fixture co…
benhook1013 Oct 8, 2026
470540a
Reject malformed Unicode in initial admission request IDs
benhook1013 Oct 8, 2026
9ba8dd8
Bind canonical JOIN publication to current entitlement and strengthen…
benhook1013 Oct 8, 2026
b5234ac
Clarify current entitlement and credential screening proof limits
benhook1013 Oct 8, 2026
ef41f7d
Clarify writable owner transactions for locked admission reads
benhook1013 Oct 8, 2026
43c2a38
Fix Account entitlement replay and exact shared evidence binding
benhook1013 Oct 8, 2026
5128ad7
Make entitlement replay integration row assertions explicitly non-null
benhook1013 Oct 8, 2026
c1586ae
Merge commit '41d9ae3a7997e18417e1b02f29f477cb8ae747d9' into codex/ga…
benhook1013 Oct 8, 2026
f59c45b
Bind roster policy evidence to its exact workload namespace
benhook1013 Oct 8, 2026
269dc1f
Reject oversized publication evidence and align exact owner-read proof
benhook1013 Oct 8, 2026
3f4f28e
Merge remote-tracking branch 'origin/develop' into codex/gameplay-run…
benhook1013 Oct 8, 2026
52fb85a
docs: distinguish tenant authority and first-JOIN event producers
benhook1013 Oct 8, 2026
c5152a6
fix(ci): refresh restored module dependency metadata
benhook1013 Oct 8, 2026
6188679
fix(common): expose validated World APPLIED intake identity
benhook1013 Oct 8, 2026
e6ccbee
Reject overflowing publication epochs and decode read operation once
benhook1013 Oct 8, 2026
6956f3a
Strengthen owner-evidence rejection and Account proof assertions
benhook1013 Oct 8, 2026
f2d1b62
Deny bare JOIN authority baselines and verify deferred commit guard
benhook1013 Oct 8, 2026
0f6b57e
test(common): extract shared authoring evidence fixtures
benhook1013 Oct 9, 2026
af682a9
test: verify precise authoring rejection paths and explain dependency…
benhook1013 Oct 9, 2026
17e9b80
fix: reject launch results contradicting explicit selection
benhook1013 Oct 9, 2026
b3b2c1f
Merge remote-tracking branch 'origin/develop' into codex/gameplay-run…
benhook1013 Oct 9, 2026
3431a21
test: stabilize fresh authoring graph declaration bytes
benhook1013 Oct 9, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -988,11 +988,12 @@ jobs:
build-scan-terms-of-use-agree: 'yes'
cache-read-only: false

# Cached negative Spring Boot 4.1.1 resolution requires metadata revalidation (CI 37847761035).
- name: 🧪 Run Gradle Checks
id: checks
run: |
echo "::group::Run Module Validation"
./gradlew :${{ matrix.module }}:check -PfullCheck
./gradlew --refresh-dependencies :${{ matrix.module }}:check -PfullCheck
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved
echo "::endgroup::"

- name: 📦 Build Runtime JAR
Expand Down
26 changes: 26 additions & 0 deletions design/architecture/microservices/account-service/api-contracts.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ This Account source-currentness and first-JOIN persistence prerequisite builds o

Current explicit JOIN status: the local `/auth/bootstrap/join` controller and operation are implemented, but the exact Gateway path is blocked by its route guard and the route is absent from `publicOpenAPI`. Local policy-digest revalidation does not prove that the exact target remains valid through Account commit; the strict ADR 0025 commit gate remains incomplete. The canonical owner is [Runtime & Data](./runtime-and-data.md#membership-and-entitlement-authority), with the target contract in [ADR 0025](../../decisions/adr-0025-explicit-open-enrollment-membership.md).

`ResolveRuntimeAccountIdentity` is implemented as an authenticated Account-owner provenance read. The isolated producer extraction passes 31 focused unit tests, Account integration-source compilation, and formatting/documentation checks. These are handler, codec, and interceptor-wiring proofs, not PostgreSQL execution or a live mTLS handshake. The exact RPC is listed in `public-methods` in both base and production Account configuration to bypass bearer-token validation for this workload-only method; the gRPC listener still requires mTLS and the handler authorizes only the exact same-namespace Game Session and Entity Management workload identities. This result establishes neither Account UUID authentication nor membership, grants, actor ownership, namespace selection, or gameplay admission.

Explicit playtest grants remain partial: current Account persistence and internal lookup can support a grant-backed admission read, but expiry bounded by fork lifecycle, tenant-admin create/extend/list/revoke, distinct audited platform break-glass, stable request-idempotent outcomes, retained revocation tombstones, and active-binding ejection are not implemented or end-to-end proved. The target owner contract is [Account-Owned Playtest Grant Contract](#account-owned-playtest-grant-contract); the links in authentication, session behavior, journeys, and trackers retain only their local consequences.

The hosted Creator Party, terms catalog, acceptance/currentness evidence, and changed-term lifecycle are target-only. No current Account route, proto/schema, storage, signer/transfer operation, creator UI, or focused proof implements them; Game Design must not maintain a copied catalog or authorize a creator mutation from a tenant-local flag.
Expand Down Expand Up @@ -114,6 +116,8 @@ For `security_locked` accounts, Account's successful recovery authorization issu
- `GetCallerTenantMembership` – caller-bound membership read for billing-safe mutation checks; freshness and sequence semantics follow [Account Runtime and Data](./runtime-and-data.md#membership-and-entitlement-authority).
- `GetTenantMembershipForAccount` – cross-tenant membership lookup for billing/reporting workflows (`billingAdmin`/`platformAdmin` only).
- `GetTenantMembershipForRuntime(accountId, tenantId, requestId)` – internal membership read for gameplay admission, reconnect/resume, and membership-gap reconciliation. **Current implementation:** the proto and Account producer emit lifecycle state and `membershipAuthorityGeneration` alongside the independent `membershipVersion`, but Game Session does not enforce those fields. **Target gap:** one fresh atomic Account membership snapshot must include the remaining authority evidence, and consumers must fail closed on exact lifecycle/generation checks.
- `ResolveRuntimeAccountIdentity(canonicalAccountId, requestId)` – mTLS-only internal owner read for the exact Game Session and Entity Management workload identities in Account's configured workload namespace. It returns Account's persisted canonical UUID, numeric Account row solely as provenance evidence, and UUID provenance. Account fails closed on missing, ambiguous, malformed, or inconsistent row evidence; this read does not establish membership, grants, actor ownership, or gameplay admission.
- `ResolvePreseededActorStagingEligibility` – default-disabled, same-namespace Entity Management mTLS-only owner read limited to public-production actor staging; it returns staging evidence and creates no actor or gameplay admission. See [Preseeded actor-staging eligibility owner read](#preseeded-actor-staging-eligibility-owner-read).
- `GetTenantEntitlementsForRuntime(tenantId, requestId)` – unredacted internal runtime/admission entitlement API for the exact Game Session and World Management workload identities. For target player-admission calls, Game Session supplies a trusted typed request context carrying `callerAccountId`, `verifiedConnectScopeId`, and the exact resolved target bundle. The private `game-session-account-delegation` JWT authenticates the Account call and carries its declared Account authority, but not `verifiedConnectScopeId` or the complete runtime target bundle; Account requires the typed caller to equal the JWT's `accountId`/`sub` and the exact bound Game Session subject, verifies the scope and target fields against the signed connect scope and current exact target, and returns the already-declared caller/target-bound evidence. World Management supplies separate tenant/operation-bound instance-lifecycle context, while the current tenant-only proto/request remains implementation drift until this conditional target shape is carried and proved. Logging & Admin and `control-ui` callers use the redacted route variants.

- `GetRealmAccessGrant(accountId, tenantId, worldSlug, realmSlug, playtestLifecycleId, requestId)` / `ListRealmAccessGrantsForAccount(accountId, tenantId, worldSlug, realmSlug, playtestLifecycleId, requestId)` – authoritative internal realm-grant reads for non-public realm bootstrap discovery and gameplay admission; the lifecycle-bound target is mandatory and a tenant-global `realmSlug` lookup is invalid.
Expand All @@ -129,6 +133,28 @@ For `security_locked` accounts, Account's successful recovery authorization issu
- `AddCurrency` – deferred virtual-currency substrate; unavailable as a supported v1 monetization API and not entitlement authority.
- `SpendCurrency` – deferred virtual-currency substrate; unavailable as a supported v1 monetization API and not entitlement authority.

### Runtime account identity owner read

`RuntimeAccountIdentityService/ResolveRuntimeAccountIdentity` reads Account's already-persisted canonical UUID and provenance for Account's own row. The protobuf in [`runtime_account_identity_service.proto`](../../../../protos/account/v1/runtime_account_identity_service.proto) is the wire authority; Account does not derive an identity from another owner's key or row.

The only permitted peers are verified Game Session and Entity Management workload identities in the exact configured `FIREMUD_GRPC_WORKLOAD_NAMESPACE`. The RPC is exempted by its exact full method name from bearer-token validation because it is workload-only; the listener remains mTLS-only, and the handler verifies the exact peer service and namespace. JWT claims and request metadata do not establish workload identity.

The request contains exactly `canonical_account_id` and `request_id`; both must be canonical, lower-case, nonnil UUID strings, and unknown fields or invalid/missing values are rejected. The schema-version-1 response contains the configured `target_namespace`, exact echoed `request_id` and `canonical_account_id`, `source_account_row_id`, and `account_uuid_provenance`. The returned source row and provenance must come from the same persisted Account row whose UUID exactly matches the request selector. The numeric row value is provenance only and must not be used as gameplay identity. Account independently verifies that its persisted `account_uuid_source_numeric_id` equals that row's `id` before returning evidence. Account returns no partial evidence when persisted UUID/provenance/source-row evidence is missing, ambiguous, malformed, or inconsistent.

This read is not an authentication, membership, entitlement, realm-grant, actor-owner, playable-state namespace, or admission decision. It creates no membership or grant and does not select or activate an actor. Game Session and Entity Management retain their respective runtime composition and admission contracts.

### Preseeded actor-staging eligibility owner read

`AccountActorStagingEligibilityService/ResolvePreseededActorStagingEligibility` is a read-only Account owner RPC for public-production actor staging. The wire schema in [`actor_staging_eligibility.proto`](../../../../protos/account/v1/actor_staging_eligibility.proto) is authoritative. This is an internal workload surface, not a public REST or Gateway route.

Only the verified Entity Management workload identity in Account's exact configured workload namespace is accepted: `spiffe://firemud/ns/{namespace}/sa/entity-management-service`. The gRPC listener remains mTLS-only. The exact RPC method is exempt from bearer-token validation because authorization comes from the verified workload peer; request metadata and JWT claims do not establish that identity. The handler is disabled unless `firemud.account.actor-staging-eligibility.enabled` is explicitly true, and the default is false.

Schema version 1 requires the configured `target_namespace`, canonical nonnil UUID text for `request_id`, `canonical_account_id`, and `canonical_tenant_id`, and the sole supported purpose `PUBLIC_PRODUCTION_STAGING_ONLY`. Unknown request fields and all other schemas, namespaces, IDs, or purposes are rejected. Account reads the requested Account, its recognized UUID provenance and source-row binding, fresh Game Design tenant-source evidence, current membership and pair authority, and the matching committed membership event/checkpoint in one read-only repeatable-read owner snapshot. Missing or contradictory source evidence fails closed.

The response echoes the exact request scope and includes `CURRENT_AT_REVALIDATION`, observation time, the current Account and membership source fields, and independently domain-separated authority-snapshot and eligibility-decision digests. `STAGING_ELIGIBLE` means only that the observed Account is `ACTIVE`, the membership is `ACTIVE`, and its current source allows gameplay; otherwise the evidence reports `STAGING_INELIGIBLE`. This evidence does not establish that a realm is public, that its entry policy is `PRESEEDED_ONLY`, or that gameplay admission is authorized. It creates no membership, grant, actor, JOIN result, PLAY result, or admission authority.

The handler returns `PERMISSION_DENIED` for a caller that is not the exact verified workload peer, `INVALID_ARGUMENT` for malformed scope or request shape, and `FAILED_PRECONDITION` when current owner evidence is absent or contradictory. Account source unavailability maps to `UNAVAILABLE`; other read or evidence-production failures map to `INTERNAL`. No partial evidence is returned on failure.

### Operator Authorization References

`IssueHumanOperatorAuthorizationReferenceRequest` contains the forwarded `control-ui` evidence, target owner service, typed target scope, action family, action-family schema identifier/version, the applicable mutation identity, correlation-only `controlPlaneRequestId`, and canonical digest. Its branch selector is `action_category_or_absence`: published moderation schemas must validate a closed `action_category` before branch selection, while published non-moderation schemas must explicitly omit `action_category` and select `non_moderation`; omission cannot downgrade a moderation family. For moderation action families, the typed request carries exactly one dedicated identity: `policyIntentRequestId` with the local policy-intent digest, or `ownerEnforcementRequestId` with the owner-enforcement digest. Neither dedicated identity may be omitted, replaced, or aliased by `controlPlaneRequestId`; the separate appeal-submission identity is not carried by operator issuance. For non-moderation families, the typed mutation identity remains `controlPlaneRequestId` with `mutationDigest/v1`. The typed scope is branch-specific: `non_moderation` and `tenant_restriction` require `tenant_scope`, while `platform_access_ban` requires explicit `target_account_id` and has no tenant scope or membership fields. Actor identity is not a request field: Account derives it from the validated token forwarded by the exact Logging & Admin mTLS workload. Account chooses a short expiry, stores a keyed hash for lookup, and retains the original high-entropy opaque reference only in protected encrypted authority storage or a bounded encrypted response envelope for the reference lifetime plus the documented retry and read-only recovery window. The exact authenticated internal response contains `operatorAuthorizationReference`, Account-calculated `authorizationReferenceFingerprint`, `expiresAt`, and the immutable `authorityEvidenceBundle/v1`; Account never exposes that evidence through an external route, logs, audit text, or client-visible response.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ Account owns platform identity, hosted Creator Party/operator and terms currentn

Account V40 adds owner-proven sequence-zero source baselines to the inherited V30–V39 authority-storage and retention-safety foundation. New repository-created Accounts and a genuinely new issuer receive these baselines; retained rows are not backfilled. Exact security-relevant Account updates compose source generation, issuance fence, canonical event, and current readback in their owner transaction. The owner-local first-JOIN producer/coordinator retains membership, pair/event, audit, and terminal-operation evidence. These persistence primitives do not provide public JOIN, target-currentness protection, or runtime wiring. Reconciled V40/source-currentness/coordinator proof remains pending; see the [Player Access and Session implementation tracker](../../../project-management/implementation-tracking/player-access-and-session.md#current-status). Hard deletion remains denied, revoked grants remain tombstones, and this stage does not enable signer provisioning, LOGIN, PLAY, or activation.

Account's actor-staging eligibility owner read is a read-only, same-namespace Entity workload RPC gated off by default. Under one repeatable-read Account transaction it verifies persisted Account UUID/provenance, current Account membership and pair authority, fresh Game Design tenant-source evidence, and the current membership event/checkpoint, then returns digest-sealed evidence scoped to `PUBLIC_PRODUCTION_STAGING_ONLY`. It reports an eligible or ineligible source snapshot but creates no membership, actor assignment, JOIN, PLAY, or gameplay admission. The staged foundation passed 43 focused Account tests and 92 shared-evidence tests with no failures or skips, plus source generation and Account integration-source compilation. PostgreSQL migration/persistence proof sources are included but physical PostgreSQL and live runtime execution remain unrun; the RPC is not runtime-ready or admission authority.

Account V29 persists immutable, unique, non-nil `account_uuid` values with provenance and the unchanged numeric source-row id. Registration REST/gRPC and the Account component of the current Account/profile-local and legacy tenant exports expose that persisted UUID through `AccountDto.id`; the mapper requires a non-nil UUID, provenance, and an exact positive source-row match. Repository insert/readback checks remain the persistence boundary, and new registration audit payloads use the same UUID. Profile and tenant DTO identifiers, authentication results, JWT subjects, and downstream consumers remain unchanged; the current export is still partial Account/profile-local data, not the canonical portable export. The Account-local UUID-to-row resolver also remains confined to Account. The closed consumer boundary is incomplete: shared `SessionContext.currentAccountIdOrNull()` still requires numeric claims and is used by `GrpcClientAuth`, Logging & Admin `SessionActorReaders`, Automation Scripting `ScriptEventIngressServiceImpl`, and Social & Groups current-account authorization; Game Session control-plane owner authorization also compares numeric owner IDs. These consumers are outside this Account-owned slice, so no UUID-authentication or downstream-consumer proof is claimed. Focused repository and retained-row migration integration cases are present, but local PostgreSQL execution is unavailable while Docker is disabled; [ADR 0020](../../decisions/adr-0020-scoped-domain-and-operational-identifiers.md) remains the identifier authority.

The account lifecycle state machine, global deletion preconditions, account-scoped versus tenant-scoped portable-data export split, separate safety-restriction lifecycles, hosting-billing authority, and future-marketplace `purchase_entitlement` substrate are the canonical target design. The current service has live identity/authentication, profile, external-link persistence, recovery/verification, payment, subscription, notification, and virtual-currency foundations, but lifecycle state transitions, genuine provider authentication, cross-service export, retained-record handling, complete account lock/platform-ban enforcement, purchased-entitlement fulfillment, and complete billing/subscription follow-through remain partial. The current account export returns only Account and profile rows, the tenant export includes excessive global Account fields, and DeleteAccount preserves its JOIN and billing denials before failing closed without deleting child rows; AccountRepository retains its independent hard-delete guard. A complete retained-data lifecycle remains absent. Those behaviors directly conflict with [ADR 0050](../../decisions/adr-0050-versioned-export-retention-and-erasure-policy.md) and the bounded erasure workflow below.
Expand Down
Loading
Loading