Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
126 changes: 123 additions & 3 deletions .github/workflows/ci.yml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ Recovery reads the original immutable results and never remints permission or re

Account is the sole target authority for the identified hosted Creator Party, operator/legal-party and terms-version catalog, and acceptance/currentness evidence under [ADR 0180](../../decisions/adr-0180-account-owned-hosted-terms-acceptance-gate.md). Acceptance is an explicit party-level decision for an identified operator and hosted-terms scope; tenant roles, billing ownership, payment, caller-supplied fields, or a copied Game Design flag do not establish party, signer, or acceptance authority. Organization and other unsupported party/signer paths remain disabled until their target contract is implemented and reviewed.

For a fresh tenant with no prior creator-party association or association history, Account may record an explicit initial association requested by the authenticated initiator of that exact committed Game Design tenant-creation operation. Account independently verifies the initiator's own individual creator party and the complete committed creation evidence, binding the canonical tenant, initiating Account and original creation operation/evidence to the immutable association result. Account proves the absence of any prior association or history at its commit boundary; missing or contradictory creation, individual-party or history evidence denies the association. A `tenantAdmin` role alone is insufficient. Exact retries recover the original operation and association without choosing another party or rewriting the creation evidence.

Retained tenant associations require separate, owner-approved audited evidence and do not use this fresh-only path. The initial association is neither hosted-terms acceptance nor authority to create content, transfer parties or admit gameplay. Independently verified individual identity, legally reviewed terms and verification policy, and retention/launch gates remain required; recording a tenant-party link does not satisfy or waive them.

Changing a tenant's Creator Party is a distinct target-only Account transfer operation with its own authority and evidence; ordinary tenant, membership, billing, or content updates cannot substitute for it. No transfer route or schema is selected here.

For official hosted deployments, Game Design owns creator content and must obtain a bounded Account currentness/evidence result before each creator-intent content-bearing write, including the first Draft. The exact party, evidence, and material-acceptance-generation authority must remain valid through Game Design's commit linearization point; a preflight read alone is insufficient, so the boundary requires commit-bound Account authorization/fence or equivalent validation without selecting its mechanism. Each committed covered mutation records `tenantId`, exact `creatorPartyId`, `acceptanceEvidenceId`, and material-acceptance `generation`; Game Design stores only this local binding and does not duplicate Account's party or terms catalogs. Missing, stale, mismatched, ambiguous, unavailable, or uncertain authority aborts the Game Design local transaction before any mutation or staged artifact becomes authoritative or externally reachable; staged bytes are cleanup/quarantine state, not success. Exact durably committed retries replay their stored result and evidence. An uncertain or not-durably-committed attempt first reconciles the original stable identity and obtains durable no-commit proof; it is not blindly redispatched or mutated while indeterminate. Only a permitted fresh attempt performs a fresh commit-bound currentness check. Reusing the same identity with changed normalized payload returns the target application outcome `IDEMPOTENCY_CONFLICT` before mutation. Account does not select a distributed transaction, public route, or future schema here.
Expand All @@ -64,6 +68,8 @@ A disclosed terms effective date is never delayed by unresolved owner work and n

**Implementation boundary:** the internal durable fence and participant readback storage are preparation, not an authenticated authorization producer or enabled writer. The unwired logout-all source producer now retains an immutable pending caller binding and original Account capture, waits for both definitive participant outcomes, and commits its source advance, event, receipt and linked journals in one Account transaction. Pending readback grants no authorization. Complete participation by the remaining source writers, current role/party/terms proof, authenticated participant verification and executed commit-versus-revocation proof remain required before canonical writes may be enabled. No public route or wire schema is selected by this section. Current proof and remaining gates belong to [Player Access and Session](../../../project-management/implementation-tracking/player-access-and-session.md#current-status).

Account recovery reads the original durable operation rather than recapturing sources or replacing its binding. The [World terminal readback](../world-management-service/api-contracts.md#exact-authored-draft-terminal-readback) and [Game Design terminal readback](../game-design-service/api-contracts.md#exact-authored-draft-terminal-readback) run outside the Account transaction; only independently authenticated, exact terminal results may be recorded in a subsequent short owner transaction. Recovery rechecks the original operation and ordering at that transaction boundary. A stored World-only result must not skip the missing Game Design read, and `UNKNOWN` stores no invented outcome. This readback grants no authorization or source-mutation permission beyond the definitive settlement predicate above.

### Account-Owned Playtest Grant Contract

Account is the sole writer and read authority for non-public realm grants under [ADR 0138 (PLAYTEST-01)](../../decisions/adr-0138-expiring-playtest-grants-with-bounded-active-revocation.md). The canonical grant identity is `{accountId, tenantId, worldSlug, realmSlug, playtestLifecycleId}`, with `playtestLifecycleId` immutable for the lifecycle; the record carries active/revoked state, monotonic `grantRevision`, `grantExpiresAt`, grantor/audit metadata, and the stable `requestId` outcome. `tenantAdmin` may create, extend, list, and revoke grants only within the exact tenant it administers. Authenticated `platformAdmin` may create, extend, revoke, or deliberately re-grant only through a distinct reasoned and audited `privileged_control`/break-glass grant-mutation branch governed by [Operator Authorization References](#operator-authorization-references) and [operator delegation](../../system-architecture-authz-route-matrix.md#operator-delegation). The branch requires an Account-issued authorization reference bound to the typed grant action, exact target and current playtest lifecycle, canonical `mutationDigest/v1` digest, live `platformAdmin` role, exact target-tenant generation, and `privileged_control` evidence. The grant's stable `requestId` remains the domain idempotency identity; the operator flow's `controlPlaneRequestId` is a separate correlation identity, and the reference binds both. The branch carries an explicit reason and audit attribution, is distinct from `tenantAdmin`, and is not tenant impersonation or a gameplay grant. Both paths validate the exact tenant, world, realm, account, and current playtest lifecycle; a slug or caller-supplied tenant identifier is not proof.
Expand Down Expand Up @@ -104,7 +110,7 @@ The local `/auth/bootstrap/join` controller and operation are implemented, but t

Explicit playtest grants remain partial. Legacy four-field persistence is retained, but current runtime grant RPC reads deny before data access and those rows do not authorize non-public discovery or admission. Legacy `POST` and `DELETE /internal/runtime/realm-access-grants` retain their authentication and malformed-input checks, then return `AUTH_UNAVAILABLE` before service dispatch; the corresponding direct service mutators also deny before reads or writes. A global privileged-role claim is not the lifecycle-qualified tenant-admin or Account-authorized operator evidence required by the target contract. No legacy grant row is created, revised or deleted through these unsupported mutations. 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 remain unimplemented or unproved. 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.
Hosted creator authorization, the terms catalog, acceptance/currentness evidence and changed-term lifecycle remain unavailable. An unregistered individual-party and fresh-association storage prerequisite does not supply independent verification provisioning, authenticated creator authorization or operative terms; its evidence and proof limits belong to the [Player Access and Session tracker](../../../project-management/implementation-tracking/player-access-and-session.md#current-status). No signer/transfer operation or creator route is enabled. Game Design must not maintain a copied catalog or authorize a creator mutation from a tenant-local flag.

The current credential-granting `Authenticate`, `RequestEmailLoginOtp`, and `VerifyEmailLoginOtp` gRPC handlers require the exact authenticated Game Session mTLS peer before credential or challenge work; the shared public-method list still bypasses bearer validation for these methods, so the peer guard is required and is not a JWT fallback. Legacy profile GET/PUT now require the exact Social Groups peer and a non-internal caller subject matching the requested account; presence-policy batch reads require the exact Social Groups peer and read only tenant-scoped profiles. The account-ID export, external-link, and verification gRPC handlers deny before data access or mutation because no authorized caller contract exists. Runtime membership, grant, and entitlement methods deny before Account reads until typed player/target binding is available; these local guards are not complete admission proof. `GetBalance`, `AddCurrency`, and `SpendCurrency` now return `FAILED_PRECONDITION` before balance access or mutation because virtual currency is a deferred substrate, not a supported v1 API.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ A committed deterministic business denial is also an immutable launch-request ou

Before reporting `PREPARING`, World verifies that exact descriptor against its requested scope and separate release attestation, durably retains the binding with its lifecycle result, and proves exact retry/readback. Game Design's version-state epoch is not World's lifecycle epoch. Changed, missing, contradictory or unauthenticated evidence fails closed, and historical descriptor recovery alone is not current activation eligibility. The [World API](../world-management-service/api-contracts.md) owns local lifecycle/materialization consequences; Game Session remains catalog/instance and launch orchestration owner.

The immutable selected release and separate attestation also carry World's unchanged [authored start-location selector](../world-management-service/api-contracts.md#published-authored-start-location-selector) and its exact selected-commit binding. Game Design must obtain and retain actual World owner evidence before release finalization; it never derives a selector from a template, first room or numeric key during a read. Existing descriptor-v1 bytes remain separate from this release evidence. World owns graph membership, durable selector readback and eventual runtime room mapping; neither Game Design's carrier nor a selector alone supplies actor ownership or admission. The producer/carrier implementation and executed proof remain open in the [authoring tracker](../../../project-management/implementation-tracking/game-authoring-publishing-and-activation.md#current-status).

**Implementation and proof status:** This extension is being prepared behind the canonical JOIN/audit checkpoint. Current numeric template/version and owner graph representations remain the separate drift recorded by [Versioning Runtime](../../system-architecture-versioning-runtime.md#implementation-status); this binding is not proof of their completed canonical migration. The separate attestation producer, its wire and durable pair representation, receiver verification, substitution, concurrent exact-retry, immutable readback, fresh/retained isolation and actual PostgreSQL proof remain required. No runtime, catalog or credential activation is authorized. Capability evidence belongs to the [Player Access tracker](../../../project-management/implementation-tracking/player-access-and-session.md) and [authoring tracker](../../../project-management/implementation-tracking/game-authoring-publishing-and-activation.md), not this target contract.

### Source-qualified version-state read
Expand Down Expand Up @@ -159,6 +161,14 @@ The eventual creator-facing proto/OpenAPI shape must expose these semantics with

The creator-facing commit/proposal RPC names, message fields, enums, pagination, and transport exposure remain deferred until their proto/OpenAPI contract is implemented. Whatever shape is selected must preserve the authority and visibility rules in ADR 0129.

### Exact authored-Draft terminal readback

`GameDesignDraftTerminalReadService.ReadGameDesignDraftTerminalOutcome` is a read-only Account-to-Game Design recovery method. The exact same-namespace Account workload is authenticated before decoding or storage access; the client verifies the exact Game Design workload before sending and on response. Its closed version-1 request contains only `schema_version`, configured `target_namespace`, a distinct canonical non-nil `read_request_id`, and complete canonical `original_account_binding` bytes. The read identity is distinct from the original operation, request, commit and fence identities. Unknown fields or changed namespace, request or binding bytes fail closed.

The response echoes the complete request and carries `UNKNOWN`, `COMMITTED`, or `DEFINITIVELY_ABORTED`. `UNKNOWN` has no result. A terminal response carries canonical `account-draft-owner-readback/v1` bytes for `GAME_DESIGN`, the exact original operation/commit/fence/input and full Account binding, and the immutable final evidence. Commit evidence is retained atomically with synchronized visibility and the complete APPLIED participant vector; no-commit evidence is retained atomically with the exact final-abort tombstone and complete definitive participant vector. Existing workflow status alone is not backfilled into a result. Reads reject ambient transactions, verify the backing owner evidence, and never manufacture no-commit from missing rows or time. The [Account fence contract](../account-service/api-contracts.md#account-owned-authored-draft-authorization-fence) alone owns two-owner settlement; this Game Design vector cannot replace Account's independent World readback.

The adapter remains unregistered. Component storage and transport proof do not establish protected Account currentness, live authoring composition, a published release or runtime activation; remaining gates belong to the [authoring tracker](../../../project-management/implementation-tracking/game-authoring-publishing-and-activation.md#current-status).

### Synchronized Draft visibility owner read

`ReadDraftSynchronizedVisibility` is a read-only Game Design owner RPC for normal Draft visibility. It does not authorize writes, accept owner results, repair coordination state, release content, publish a Version, or activate a World. Only the exact same-namespace `world-management-service` workload may call it. Game Design authenticates that peer before decoding the request or reading owner data; the World client authenticates the exact Game Design server workload before sending the request and validates the complete closed response.
Expand All @@ -167,7 +177,7 @@ The closed request contains only `schema_version=1`, `target_namespace`, distinc

The response echoes the schema version, namespace, read ID, and exact target, then carries the complete canonical `DraftCommitBinding` as `binding_json` with `binding_digest`, its `workflow_state`, and the retained synchronized `fence`. The fence fields are `request_id`, `commit_id`, `input_digest`, exact `result_vector_json`, and `created_at`. The binding JSON is the authority for the base commit, ordered revisions, full affected owner/aggregate/scope/epoch tuples, and required-owner set; these are not duplicated into the request or reduced to a partial fence shape. World validates the returned binding and digest, all echoes, and the complete result vector against that binding. Every required result must be terminal `APPLIED` for the exact commit and binding digest, with the exact owner result identity/bytes and all declared epochs. `STORED_PERMISSION_UNVERIFIED`, missing, extra, changed, ambiguous, or partial results do not qualify.

The owner reads the durable synchronized fence and returns its exact retained binding and result vector. Later partial owner work does not advance or replace that fence; if no valid synchronized fence and complete result vector can be read, the RPC fails closed. The RPC is an unregistered candidate. World’s local selector remains always denied because no canonical authoritative `APPLIED` World result-to-retained-graph carrier or real producer exists; fixture bytes or a retained graph alone are insufficient. Current implementation and proof limits are tracked in [Game Authoring, Publishing, and Activation](../../../project-management/implementation-tracking/game-authoring-publishing-and-activation.md#current-status).
The owner reads the durable synchronized fence and returns its exact retained binding and result vector. Later partial owner work does not advance or replace that fence; if no valid synchronized fence and complete result vector can be read, the RPC fails closed. The RPC remains an unregistered candidate. World's local selector requires its exact original Account-bound result-to-retained-graph journal; fixture bytes or permission-unverified history alone are insufficient. Protected Account commit-order verification and live owner composition remain unavailable. Current implementation and proof limits are tracked in [Game Authoring, Publishing, and Activation](../../../project-management/implementation-tracking/game-authoring-publishing-and-activation.md#current-status).

Full-version publication selects an existing authored Draft through `PublishVersionRequest`: canonical `tenant_id` and `version_id`, stable `publish_request_id`, positive canonical decimal `expected_version_state_epoch`, `notes`, and the exact `selected_commit_request_id`, `selected_commit_id` and `selected_commit_digest`. The first durable selection binds all of those fields to the synchronized commit and its complete owner evidence. A tenant/request identity cannot select a second Version. Changed or omitted selection input conflicts before a new attempt or attachment to a workflow; an exact retry retains the original selection instead of substituting the current Draft. Game Design resolves private storage keys from its persisted canonical association. Private tenant or Version keys do not replace the canonical target or publication-workflow identity.

Expand Down
Loading
Loading