Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
a2d1a4f
Prepare direct-text JOIN client identity and Account-owned scope eval…
benhook1013 Oct 31, 2026
7fb79c8
feat(game-session): prepare immutable direct-text catalog snapshots
benhook1013 Oct 31, 2026
009a87f
Merge commit '4a82c900562c4d8f3d092b3f3d9d192fa02ab5d9' into codex/ga…
benhook1013 Oct 31, 2026
03e3460
docs(game-session): record bounded snapshot receiving proof
benhook1013 Oct 31, 2026
271be76
feat(game-session): prepare canonical direct-text world selection
benhook1013 Oct 31, 2026
9eb78c4
feat(game-session): retain exact Account-issued direct-text scope
benhook1013 Oct 31, 2026
be518be
Merge commit '10f595af813f6f74e38b892accd89c289660fccd' into codex/ga…
benhook1013 Oct 31, 2026
de4fa51
feat(game-session): preserve direct-text transport and world menus
benhook1013 Oct 31, 2026
038e2de
feat(game-session): retain public world menus in bounded Redis storage
benhook1013 Oct 31, 2026
f0da657
Merge commit '90cddd7b8fbfabc0f3317c7e5ad80c548f63bdd5' into codex/ga…
benhook1013 Oct 31, 2026
15e3fee
Merge commit '393d4f1f0678f5e904dc2fc1449c8a5cc125f3f7' into codex/ga…
benhook1013 Oct 31, 2026
a01d021
Merge commit '8d3baf4fe45da35fa09ffc00bf350f3c4c3fc493' into codex/ga…
benhook1013 Oct 31, 2026
880adf7
Prepare retained direct-text authenticated lobby and frozen JOIN orig…
benhook1013 Oct 31, 2026
ef13461
Record fresh authenticated lobby startup qualification
benhook1013 Oct 31, 2026
821e570
Align consolidated direct-text scope and retain selection diagnostics
benhook1013 Oct 31, 2026
045755e
Fix retained WORLDS menu loss and qualify deterministic discovery
benhook1013 Oct 31, 2026
33c9109
Record current direct-text fix smoke and cleanup proof
benhook1013 Oct 31, 2026
22aad3d
Use Account scope evaluation as snapshot metadata and retain strict e…
benhook1013 Oct 31, 2026
1d2b862
Clarify malformed menu recovery and preserve resource failure causes
benhook1013 Oct 31, 2026
6e2b5c3
Clarify direct-text caller authentication and malformed menu recovery…
benhook1013 Oct 31, 2026
b27dd64
Align lobby capability anchors and verify dispatched JOIN identities
benhook1013 Oct 31, 2026
d78ea72
Merge commit '06af63c283689203a0150aaa6fa65e3d0f8cae51' into codex/ga…
benhook1013 Oct 31, 2026
809a012
test: strengthen menu fingerprints and align scope contracts
benhook1013 Nov 1, 2026
4f25e3b
Merge commit 'e4ae9bafa2c67f14f50d5dc378649f25dda23f22' into codex/ga…
benhook1013 Nov 1, 2026
f289e83
Cache verified world-menu scripts and recover only proven NOSCRIPT loss
benhook1013 Nov 1, 2026
9745a99
Avoid duplicate direct-text menu reads and interpreter dispatch
benhook1013 Nov 1, 2026
178cc94
Merge commit 'b5e4a2af25eaf70e2e706db774d688a7d969521d' into codex/ga…
benhook1013 Nov 1, 2026
8195391
Fail over Ubuntu archive downloads through signed HTTPS mirrors
benhook1013 Nov 1, 2026
63c9560
Merge commit '3f3ae090e1a2eff220ce0989eb05b2f8ec991b71' into codex/ga…
benhook1013 Nov 1, 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
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ Ordinary Account gRPC methods use canonical Account UUID text for Account-valued
- `IssuePlayerBootstrapToken` – authenticate a first-party player account and issue the short-lived `player-bootstrap` token profile used only for gameplay bootstrap.
- `ListBootstrapWorlds` – list caller-visible worlds for first-party gameplay bootstrap.
- `ListBootstrapRealms` – list caller-visible realms for a selected world during first-party gameplay bootstrap.
- `IssueDirectTextConnectScope` – implemented local internal Account RPC for issuing a direct-text connect scope. Game Session text `REALMS` dispatch to this RPC remains pending under #2898. The request carries authenticated caller context in typed `PlayerExecutionContext` plus the server-resolved target; Account validates caller context separately from the short-lived scope and returns an opaque `connectScopeId` bound to the evaluated routing snapshot. It is distinct from `ListBootstrapRealms`, which is first-party discovery, and `JoinPublicProductionMembership`, which is the membership mutation. Reachable missing or invalid routing evidence fails as `ADMISSION_POINTER_UNAVAILABLE`; a changed exact routing pair fails as `CONNECT_SCOPE_MISMATCH`; unavailable authority fails as `AUTH_UNAVAILABLE`. Fresh Account membership checks remain required separately at applicable admission gates. The canonical scope and transport requirements remain owned by [Authentication](../../system-architecture-authentication.md#direct-text-realms-to-join-scope-normative); this local status does not claim direct text-client end-to-end proof.
- `IssueDirectTextConnectScope` – implemented local internal Account RPC for issuing a direct-text connect scope. Game Session text `REALMS` dispatch to this RPC remains pending under #2898. The request carries typed `PlayerExecutionContext` scope data plus the server-resolved target. The certificate-derived Game Session mTLS workload identity authenticates the caller; Account validates the context against that trusted caller and Account-owned records separately from the short-lived scope, and returns an opaque `connectScopeId` with its expiry. After routing and entitlement validation, Account samples its own immutable `evaluatedAt` and binds it into the issued scope snapshot; this timestamp is not supplied by or inherited from the retained routing snapshot. Game Session retains the returned timestamp rather than deriving one from its clock or the expiry. Missing, ambiguous, or unavailable entitlement records fail as `ENTITLEMENT_UNAVAILABLE`, distinct from reachable missing or invalid routing evidence (`ADMISSION_POINTER_UNAVAILABLE`), a changed exact routing pair (`CONNECT_SCOPE_MISMATCH`), or unavailable routing authority (`AUTH_UNAVAILABLE`). An authoritative entitlement that denies gameplay returns `TENANT_BILLING_BLOCKED`. This RPC is distinct from `ListBootstrapRealms`, which is first-party discovery, and `JoinPublicProductionMembership`, which is the membership mutation. Fresh Account membership checks remain required separately at applicable admission gates. The canonical scope and transport requirements remain owned by [Authentication](../../system-architecture-authentication.md#direct-text-realms-to-join-scope-normative); this local status does not claim direct text-client end-to-end proof.
- `ListBootstrapCharacters` – list caller-visible characters for the selected opaque server-issued `connectScopeId` target during first-party gameplay bootstrap. The exact realm snapshot resolves and carries `playableStateScope` to the character-query boundary; neither clients nor Account derive a physical storage key, and the route world/realm must match the resolved scope.
- Bootstrap discovery and join use the canonical realm catalog and admission-pointer contract in [Multi-Tenancy](../../system-architecture-multi-tenancy.md#realm-catalog-and-admission-pointer-contract). The existing canonical resolver for the exact-snapshot `stateScope` to `playableStateScope` projection is owned there. REST bootstrap character discovery/creation and direct-text `CHARS`/creation are transport-local producers of that same server-derived projection; neither path accepts a caller-selected value, derives a storage key, or carries the projection through `JOIN` or connect-token issuance. Missing or mismatched proof that the REST and direct-text producers apply the same resolver is implementation drift, not a second resolver contract. Character-query input remains owned by the [Entity Management API contract](../entity-management-service/api-contracts.md#grpc).
- `JoinPublicProductionMembership` – implemented local internal Account API for explicit public-production `JOIN`; the canonical membership lifecycle and freshness contract are owned by [Authentication](../../system-architecture-authentication.md) and its local persistence/transaction consequences by [Account Runtime and Data](./runtime-and-data.md#membership-and-entitlement-authority). It accepts the server-issued scope and request identity, and does not expose the removed implicit membership writer. Durable recovery/reconciliation for an operation left `PENDING` after an unknown database commit outcome, exact-final-head PostgreSQL runtime proof, direct text-client end-to-end proof, and membership-generation snapshot proof remain open.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ The sections below define the target-state runtime contract. Current implementat

- **Current first-party receiving boundary:** Game Session's prepared receiver verifies the Gateway-signed context and rechecks the canonical target and retained private-handle evidence. When that first-party context is present, bare `LOGIN` and `PLAY` return `FIRST_PARTY_AUTHORITY_UNAVAILABLE` before legacy Account authentication, Entity resolution, or gameplay binding effects. Recovery from registry loss still requires the persisted compact JWS to remain valid; registry loss does not extend its expiry. The public Gateway cookie path is currently denied and its gameplay-route readiness is `OUT_OF_SERVICE`; no first-party wire success or admission is claimed. Account context production, shared replay fencing, and dedicated Gateway key qualification remain open.

- **Direct-text WORLDS menu retention:** the manually composed menu store and one-key Redis script retain only the public `WORLDS` UI snapshot under the tenantless proxy-UUID family. The numeric transport session ID and the exact observed proxy UUID remain separate correlation values; neither an observed UUID nor Redis `ACL WHOAMI` establishes authenticated receiving custody or LOGIN/JOIN authority. Missing, expired, reset, or source-stale menu state requires a fresh `WORLDS` request and cannot recreate or clear authentication state. Production protected-connection binding, receiving-chain provenance and hidden rebind remain gaps; the source has no deployed ACL change. Focused component and physical Redis proof is recorded in the owning tracker, without establishing genuine receiving custody or registration. See [the Redis menu contract](../../system-architecture-redis.md#direct-text-worlds-ui-menu) and [Player Access and Session](../../../project-management/implementation-tracking/player-access-and-session.md#direct-text-join-client-and-command-receiving-preparation).

- Canonical authored-world launch preparation is an evidence-only source boundary: it checks committed catalog/source evidence, performs authenticated Game Design resolve plus independent exact descriptor readback, persists the immutable preparation snapshot, and verifies committed readback. It is not wired into GameInstanceServiceImpl, game_instances, World activation, admission, or PLAY; validation of this new proof family is deferred.

- Game Session V11 adds nullable `gameplay_command.account_uuid` storage and repository round-trip mapping alongside the retained numeric `account_id`. Historical commands remain without an inferred UUID, and no producer or session carrier supplies or consumes this field yet; prepared `String` account-identity carriers still contain numeric row-id text and do not prove UUID consumption. Opaque internal carrier preparation and its retained-record/proof limits are tracked in [Player Access and Session](../../../project-management/implementation-tracking/player-access-and-session.md#current-status). The focused migration and repository PostgreSQL cases are present but skip locally while Docker is disabled; Account UUID ownership remains in [Account Runtime and Data](../account-service/runtime-and-data.md) under [ADR 0020](../../decisions/adr-0020-scoped-domain-and-operational-identifiers.md).
Expand Down Expand Up @@ -81,6 +83,14 @@ The sections below define the target-state runtime contract. Current implementat
- Credential brute-force defense remains delegated to Account Service, which owns one login-attempt policy across transport paths using trusted source context. Game Session consumes the resulting auth outcomes when binding gameplay sessions but does not implement separate credential-abuse logic. The target ordinary gameplay limiter is an in-process session-front-end token bucket under [ADR 0034](../../decisions/adr-0034-layered-abuse-controls-without-attacker-triggered-account-locks.md); the current implementation still uses a Redis-backed per-session limiter and does not yet prove the target role isolation or loss behavior. Before a restart or takeover initializes a replacement bucket, the target owner atomically reserves from the binding's shared bounded cumulative handoff budget, so retries or concurrent replacements cannot reset or double-consume the remaining allowance. Optional coarse shared abuse windows remain outside the per-command fast path.
- No single Game Session process may become the hidden source of truth for reconnectable gameplay state. If the service needs a value to survive non-edge restart or permit same-type takeover, that value must live in Redis or PostgreSQL-backed coordination rather than only in process memory. Realm admission additionally requires a fresh World lifecycle row/epoch read under [ADR 0123](../../decisions/adr-0123-database-authoritative-temporal-coordinated-world-lifecycle.md); Temporal status is coordination evidence, not admission authority.

### Direct-text authenticated lobby companion

The separately owned `game_session_direct_text_authenticated_lobby_scope`, `game_session_direct_text_authenticated_lobby_current` and `game_session_direct_text_authenticated_lobby_join` tables retain pre-admission lobby scope and JOIN-original state. They reference the original LOGIN journal without adding realm, tenant-admission or JOIN lifecycle to that minimal journal or its closed live-context codec. The [Authentication contract](../../system-architecture-authentication.md#direct-text-realms-to-join-scope-normative) owns the caller-bound scope and logical-attempt behavior.

New scope and dispatch claims serialize with original LOGIN abandonment through the parent row lock and exact original-coordinate/witness comparison. Current selection is separate from retained attempt history: replacing a selection or observing expiry cannot erase an older uncertain JOIN. A frozen JOIN original is committed and independently read back before dispatch becomes possible; an uncertain reply never resets that original or supplies a new request identity. Positive exact-original receipts may be retained after custody is lost, without applying them to a replacement transport or granting admission.

This companion preserves the existing SQL retention hold. Direct deletion, truncation and invalid identity/state transitions are refused; no expiry-based release or cleanup API is supplied. Before this owner becomes reachable, new scope intake per original LOGIN must be bounded and qualified under repeated and concurrent REALMS requests. Intake refusal must preserve all retained scopes and uncertain JOIN originals; expiry, selection replacement or capacity pressure cannot evict them. The current preparation does not implement that intake bound or establish a retention/archival horizon, so live registration remains held on capacity qualification as well as lawful release. Parent token disposal is not a membership JOIN outcome. Full negative-terminal qualification, unknown-result recovery and lawful release remain at their owning later boundary. Rows, decoded state and matching witnesses do not establish live socket authentication; each operation still needs its current verified Account result and protected receiving custody. Credentials and compact tokens are excluded from stored lobby state. Production composition and proof status are recorded in [Player Access and Session](../../../project-management/implementation-tracking/player-access-and-session.md#direct-text-join-client-and-command-receiving-preparation).

### Protected Human initial-admission storage

The protected reservation retains the complete Account protection and original owner association on the Game Session attempt. A separate immutable runtime-completion record binds that protection to the exact launch, captured `STARTING` row version, and completed `RUNNING` row version; this completion changes no admission pointer or terminal. The manually composed, final completion repository explicitly requires its caller's active writable `READ COMMITTED` transaction at runtime, without Spring transaction-proxy registration. The existing initial-admission owner later writes the pointer, matching append-only audit, and immutable protected attempt/intent terminal together, while the Account-purpose read exposes the retained exact terminal for settlement. Protected abort terminalizes only its own retained attempt and intent. Its `EXPECT_CLOSED` storage lookup verifies the immutable original CLOSED request/catalog/audit without locking a later current pointer; positive commit retains the current-origin checks. Legacy unprotected rows remain readable but are not adopted as protected attempts. These local storage owners remain unregistered; the [API contract](./api-contracts.md#initial-admission-bind) owns the cross-owner behavior and the [Player Access tracker](../../../project-management/implementation-tracking/player-access-and-session.md#original-startsession-source-protection-storage) records proof and remaining limits.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ This table highlights representative prefixes and their intended Redis role. It
| `retry:{tenantRegionTag}` | **Coordination Redis** | Game Session Service | Retry queues for tick effects. Uses idempotent Lua semantics; reset only through documented coordination reset flows. |
| `tick-executor-lease:{tenantRegionTag}` | **Coordination Redis** | Game Session Service | Region leadership and executor lease. Must obey shard-local Lua rules; coordination resets and failover must follow the patterns in [Tick System and Runtime Design](./system-architecture-ticks.md). |
| `session:game:{tenantGameplayTag}:<gameInstanceId>:<sessionId>` | **Coordination Redis** | Game Session Service | Gameplay session binding and reconnect state. Treated as volatile coordination data with derived expiry; removed when sessions end or expire. Recreated as part of normal login/reconnect flows, not by manual key edits. Region- and tenant-scoped recovery requests record either `--preserve-sessions` or `--invalidate-sessions`; no policy is inferred. Cluster recovery requires explicit `--invalidate-sessions` because the cluster token-registry cutover forces reauthentication and cannot preserve a usable gameplay binding. |
| `session:game:direct-text-worlds:v1:<proxyConnectionId>` | **Coordination Redis** | Game Session Service | Tenantless, full-key-hashed, reset-sensitive storage for only the original public direct-text WORLDS UI menu. The proxy UUID is observational correlation, not authentication or gameplay-session authority. The original five-minute expiry is never refreshed; loss, reset, or expiry requires fresh WORLDS discovery. |
| `session:game:index:character:{tenantGameplayTag}:<playableStateNamespaceId>:<characterId>`, `session:game:index:account-tenant:{tenantGameplayTag}:<accountId>`, `session:game:index:tenant:{tenantGameplayTag}` | **Coordination Redis** | Game Session Service | Secondary gameplay-session indexes over the canonical `session:game:*` records. The character index enforces controller uniqueness `{tenantId, playableStateNamespaceId, characterId}` and retains `{sessionId, gameInstanceId, bindingGeneration}` as value/evidence; server-derived `playableStateScope` remains binding/routing evidence, not a uniqueness dimension. Character, account-tenant, and tenant index rebuilds come from the durable active-binding inventory, followed by exact session/index readback and reconciliation; an empty Redis key never proves that a character is unbound. These indexes are not separate authority. The existing `<gameInstanceId>:<characterId>` character-index shape is current implementation drift and remains behind the [legacy controller-index migration gate](./system-architecture-session-behavior.md#legacy-controller-index-migration-gate). Binding ownership and takeover semantics remain in [ADR 0132](./decisions/adr-0132-namespace-scoped-single-character-controller.md) and [Session Behavior](./system-architecture-session-behavior.md#session-and-identity-management). |
| `sessionctx:*` | **Coordination Redis** | Game Session Service | Bootstrap/session-context keys for pre-auth transport context and authenticated session lookup indexes. Not region-local gameplay authority; gameplay commands still require authenticated `LOGIN` / `PLAY` state and region binding. |
| `session:auth:token:<tokenHash>` | **Coordination Redis** | Account Service | One versioned server-side issued-token record per revocable `control-ui`, player-bootstrap, or receiver-specific private player-delegation JWT as described in [JWT and Token Contracts](./system-architecture-jwt-and-token-contracts.md). Ownership is split from `session:game:*`. Region- and tenant-scoped resets preserve these records; a cluster reset closes protected admission, completes the Account repair/reset cutover, then drops them as physical cleanup and forces reauthentication/token re-issuance. |
Expand Down
Loading
Loading