Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
78223b2
Add guarded World topology and immutable graph owner storage
benhook1013 Oct 13, 2026
9910448
Merge commit '4d44a941b79beeff86cff48d30b0d39088ebca25' into codex/do…
benhook1013 Oct 13, 2026
40ff159
Merge commit 'f21641c3fa1ea3635c135a07da46ad030467f6b5' into codex/do…
benhook1013 Oct 13, 2026
3533ec9
Merge commit '9786e4045f0eab2211705cd18f7bd348b75a37a8' into codex/do…
benhook1013 Oct 13, 2026
b41a1f8
Merge commit '29c581230c08ee48124bce86cb848b3bbb944ddc' into codex/do…
benhook1013 Oct 13, 2026
b6a0032
Merge commit '1e22da1c29774c0be075a61bfbcd6252a945c0a3' into codex/do…
benhook1013 Oct 14, 2026
3ae5fff
Fix canonical spawn snapshot codec and stable owner binding bytes
benhook1013 Oct 14, 2026
a9223d8
Align publication gate with World digest schema three
benhook1013 Oct 14, 2026
817a8de
Merge commit '46298808aeea2acef84e6aa94dd8181cc864076d' into codex/do…
benhook1013 Oct 14, 2026
54afe86
Stabilize World evidence replay and verify frozen capture guards
benhook1013 Oct 14, 2026
33860ed
Align World component proof status and remaining capture limits
benhook1013 Oct 14, 2026
f4e63c0
Align Game Design tracker with required World schema three
benhook1013 Oct 14, 2026
8e6f7b7
Merge commit '5092dea304' into codex/document-world-guarded-graph-fro…
benhook1013 Oct 14, 2026
c6939a4
Merge commit '1014878843ba109f685938cd4b1a4f0f0a9c38cd' into codex/do…
benhook1013 Oct 14, 2026
9233137
Merge commit '6232d1c452f2e065c860dd510d233f0fb6a914b1' into codex/do…
benhook1013 Oct 14, 2026
3d196cf
Merge commit 'c97f79484a4e9ec4e3796ce77d7bc90d010c4225' into codex/do…
benhook1013 Oct 14, 2026
379bc23
Merge commit '12a6dfa1069a20e18820a0f26f4f33204dc5f7d9' into codex/do…
benhook1013 Oct 14, 2026
90bfbce
Merge commit '24c0e8aff9568c9524de29e6d219a07c44f20c57' into codex/do…
benhook1013 Oct 14, 2026
122d6a8
Allow Game Session proof jobs thirty minutes
benhook1013 Oct 14, 2026
b89069d
Merge commit '3cc84e859a983b1d5d43b21a6b8609a933c08659' into codex/do…
benhook1013 Oct 14, 2026
b254cbe
Merge remote-tracking branch 'origin/develop' into codex/document-wor…
benhook1013 Oct 14, 2026
c4bc94d
Merge remote-tracking branch 'origin/develop' into codex/document-wor…
benhook1013 Oct 14, 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
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -990,8 +990,8 @@ jobs:
permissions:
contents: read
id-token: write
# Account and World PostgreSQL proofs can run close to 20 minutes before Gradle post-job cleanup.
timeout-minutes: ${{ (matrix.module == 'account-service' || matrix.module == 'world-management-service') && 30 || 20 }}
# Account, World and Game Session proofs can run close to 20 minutes before Gradle post-job cleanup.
timeout-minutes: ${{ (matrix.module == 'account-service' || matrix.module == 'world-management-service' || matrix.module == 'game-session-service') && 30 || 20 }}
strategy:
fail-fast: false
matrix:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

This API contract is target-state canonical; implementation coverage is partial and must not be inferred from target examples alone.

- The authored-world source-retention cut adds the publication-attempt owner association to source intake and immutable receipt storage, canonical tenant-key protection, UUID-backed version identity, complete launch binding, and publication-fence binding. Focused physical PostgreSQL and mTLS proof is recorded for the tracked World boundary; the exact source revision, check scope, and limitations are recorded in the [World runtime tracker](../../../project-management/implementation-tracking/world-runtime-and-movement.md#authored-world-source-retention-status). This does not implement graph snapshot capture, frozen topology, canonical preparation/execution artifacts (including V62/V63), runtime activation, or gameplay admission, and does not claim external database application. Graph snapshot capture and V28 remain deferred to the next owner-digest/topology stage because capture requires digest schema 3 while the current World digest producer emits schema 2. The graph implementation is preserved locally; its duplicate publication-binding clauses must be reconciled when V28 is resumed. The canonical persistence boundary is recorded in [Runtime and Data](./runtime-and-data.md#authored-world-source-retention).
- The authored-world source-retention cut adds the publication-attempt owner association to source intake and immutable receipt storage, canonical tenant-key protection, UUID-backed version identity, complete launch binding, and publication-fence binding. Focused physical PostgreSQL and mTLS proof is recorded for the tracked World boundary; the exact source revision, check scope, and limitations are recorded in the [World runtime tracker](../../../project-management/implementation-tracking/world-runtime-and-movement.md#authored-world-source-retention-status). The source-retention cut itself does not implement graph snapshot capture, frozen topology, canonical preparation/execution artifacts (including V62/V63), runtime activation, or gameplay admission, and does not claim external database application. A separate component-owner candidate includes graph capture and the ordinary schema-3 digest writer; focused component proof is recorded in the tracker, while its exact checkpoint producer and positive frozen capture remain unqualified. It does not expose a new public publication/activation surface. The canonical persistence boundary is recorded in [Runtime and Data](./runtime-and-data.md#authored-world-source-retention).
- The current World Management gameplay bridge serializes runtime room ids as `R-<roomInstanceRowId>` and rejects scoped decimal `roomInstanceId` values such as `1021`. That storage-derived encoding is not the canonical target identity defined by the [Identifier Glossary](../../system-architecture-identifier-glossary.md).
- The bridge, cross-service callers, examples, and focused proof have not migrated together to the scoped decimal `roomInstanceId` contract. The checked-in proof still exercises the legacy encoding.
- The typed `ApplyRoomAmbientStatePatch` contract below is target-state: the current service has no complete handler or durable operation/digest-bound guard, so player-significant ambient mutations remain on the fenced Game Session admission/reconciliation path and are not direct table writes.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Implementation Status

- The authored-world source-retention cut adds source intake and immutable receipts, protection for canonical UUID-to-legacy World tenant-key associations, UUID-backed Game Design version identity, complete launch binding, publication-fence linkage, and the publication-owner association specified below. Its forward-only migrations are `V23.1` and `V24`–`V27.2`; they preserve existing `V1`–`V23` history and do not establish that any external database has applied them. Focused physical PostgreSQL and mTLS proof for the tracked World boundary, including its exact revision and scope, is recorded in the [World runtime tracker](../../../project-management/implementation-tracking/world-runtime-and-movement.md#authored-world-source-retention-status). Graph snapshot capture remains deferred to the next V29–V32 owner-digest/topology stage: capture requires digest schema 3, but the current World digest producer emits schema 2. The graph implementation and V28 are preserved locally for that follow-up and are not part of this cut. No frozen topology, canonical preparation/execution artifact (including V62/V63), activation, gameplay-admission readiness, or external database application is claimed. See [World API Contracts](./api-contracts.md#grpc-apis).
- The authored-world source-retention cut adds source intake and immutable receipts, protection for canonical UUID-to-legacy World tenant-key associations, UUID-backed Game Design version identity, complete launch binding, publication-fence linkage, and the publication-owner association specified below. Its source-retention migrations are `V23.1` and `V24`–`V27.2`; the guarded component-owner stage adds `V1003`–`V1007.1`. These forward-only migrations preserve existing `V1`–`V23` history and do not establish that any external database has applied them. Focused physical PostgreSQL and mTLS proof for the tracked World boundary, including its exact revision and scope, is recorded in the [World runtime tracker](../../../project-management/implementation-tracking/world-runtime-and-movement.md#authored-world-source-retention-status). The guarded component-owner candidate includes graph capture and the ordinary schema-3 digest writer; focused component proof is recorded in the tracker, while its exact checkpoint producer and positive frozen capture remain unqualified. No frozen topology, canonical preparation/execution artifact (including V62/V63), activation, gameplay-admission readiness, or external database application is claimed. See [World API Contracts](./api-contracts.md#grpc-apis).
- The current room-cache implementation remains an unversioned TTL-only payload and must use authoritative reads until the target opaque component-version and invalidation proof exists.
- World V22 directly renames `room_instance` and `room_instance_exit` columns and renames `idx_room_instance_exit_from` to `idx_room_instance_exit_from_record`; older-binary compatibility and retained-data rollout proof remain open in [Shared Runtime Contracts and Persistence](../../../project-management/implementation-tracking/shared-runtime-contracts-and-persistence.md#unit-5b-persistence-review-consequences).
- Historical migration status is incomplete: `V16__runtime_world_event_scope.sql` dropped and recreated `world_event` while changing its legacy template-region reference to a runtime-instance reference, without recorded retained-row mapping or backfill evidence. The current repository cannot reconstruct rows already dropped. This is a retained-data deployment blocker: an affected deployment must first record either a verified no-data boundary or an explicit owner disposition/mapping, with exact readback and lifecycle/admission-isolation evidence; future remediation must add migration and focused proof before contraction is claimed.
Expand All @@ -26,9 +26,9 @@ A fresh intake completes its authenticated Game Design source read before openin

World Management retains exact authored-source evidence as owner-local source data. The intake receipt binds the target namespace, canonical tenant UUID, world selector, source operation and evidence digest, and immutable request/receipt identities. World reserves numeric tenant keys already present in its data and prevents those legacy keys from being reused for a canonical authored tenant association; it does not reinterpret or migrate existing `V1`–`V23` rows into the new UUID identity.

The version identity joins that source receipt to the exact Game Design version and its captured state evidence. A complete launch binding retains the resolved descriptor and release-attestation evidence under the same source/version identity. The publication fence in this cut binds that source/version identity to its exact publication attempt; it does not capture or freeze the authored graph. Graph snapshot storage is deferred until the World digest schema is upgraded from 2 to the schema 3 required by capture, in the next V29–V32 owner-digest/topology stage. These records are evidence and retention boundaries, not a second Game Design version authority or a runtime lifecycle/admission state.
The version identity joins that source receipt to the exact Game Design version and its captured state evidence. A complete launch binding retains the resolved descriptor and release-attestation evidence under the same source/version identity. The publication fence in this cut binds that source/version identity to its exact publication attempt; it does not capture or freeze the authored graph. The separate guarded graph/capture candidate retains component evidence under the same owner and uses schema 3; this does not supply Account authorization, synchronized APPLIED or a released snapshot. These records are evidence and retention boundaries, not a second Game Design version authority or a runtime lifecycle/admission state.

The original six forward-only migrations are `V23.1__world_authored_source_intake.sql` for canonical source association, legacy-key reservations, and intake receipts; `V24__world_canonical_tenant_mutation_guard.sql` for owner-qualified row mutation; `V25__world_design_publication_fence.sql` for the publication fence and attempt binding; `V26__world_complete_launch_binding.sql` for complete launch binding; `V27__world_authored_version_identity.sql` for UUID-backed version identity and exact Game Design state evidence; and `V27.1__world_publication_owner_binding.sql` for the exact publication-attempt association to that identity. V27.1 adds the version-identity unique tuple required by the composite foreign key and five publication-attempt owner-binding columns: schema version, canonical version UUID, version-identity operation UUID, Game Design version id, and intake request digest. Its closed check constraint permits only schema 0 with all four identity fields null or schema 1 with every field present and valid; the composite foreign key binds the attempt's complete source, intake, tenant, namespace, and version tuple to the exact version-identity row. Retained V25–V27 attempts acquire the schema-0/null representation and remain immutable and nonpromotable. No UUID is inferred from a numeric key or coincidence, and V25's checksum is unchanged. The V27.1 clauses were extracted from the deferred V28 graph-snapshot migration; when V28 is later integrated, reconcile its duplicate publication-binding clauses while preserving its graph-snapshot additions. The additive `V27.2__world_legacy_tenant_claim_concurrency.sql` correction preserves canonical-tenant refusal checks while allowing unchanged-tenant legacy updates without serializing them on the tenant claim row; new or changed legacy tenant claims use insert-if-absent followed by claim-kind validation. Existing migrations are not rewritten. `V28__world_authored_graph_snapshot.sql` and its graph-capture implementation remain preserved locally for the next V29–V32 owner-digest/topology stage; no physical snapshot proof is claimed in this cut. Focused physical PostgreSQL and mTLS proof for the tracked World boundary is linked in the [World runtime tracker](../../../project-management/implementation-tracking/world-runtime-and-movement.md#authored-world-source-retention-status). See [V27.1 migration](../../../../services/world-management-service/src/main/resources/db/migration/V27.1__world_publication_owner_binding.sql).
The original six forward-only migrations are `V23.1__world_authored_source_intake.sql` for canonical source association, legacy-key reservations, and intake receipts; `V24__world_canonical_tenant_mutation_guard.sql` for owner-qualified row mutation; `V25__world_design_publication_fence.sql` for the publication fence and attempt binding; `V26__world_complete_launch_binding.sql` for complete launch binding; `V27__world_authored_version_identity.sql` for UUID-backed version identity and exact Game Design state evidence; and `V27.1__world_publication_owner_binding.sql` for the exact publication-attempt association to that identity. V27.1 adds the version-identity unique tuple required by the composite foreign key and five publication-attempt owner-binding columns: schema version, canonical version UUID, version-identity operation UUID, Game Design version id, and intake request digest. Its closed check constraint permits only schema 0 with all four identity fields null or schema 1 with every field present and valid; the composite foreign key binds the attempt's complete source, intake, tenant, namespace, and version tuple to the exact version-identity row. Retained V25–V27 attempts acquire the schema-0/null representation and remain immutable and nonpromotable. No UUID is inferred from a numeric key or coincidence, and V25's checksum is unchanged. The separate V1003 graph-snapshot migration uses that installed publication-owner association without duplicating its V27.1 binding clauses. The additive `V27.2__world_legacy_tenant_claim_concurrency.sql` correction preserves canonical-tenant refusal checks while allowing unchanged-tenant legacy updates without serializing them on the tenant claim row; new or changed legacy tenant claims use insert-if-absent followed by claim-kind validation. Existing migrations are not rewritten. The guarded owner stage adds unchanged V1003–V1007 donor migrations and forward V1007.1 legacy-concurrency repair above the installed Saga frontier V1002. Its graph/capture storage remains representation evidence; current frozen producer and proof status are recorded separately in the tracker. Focused physical PostgreSQL and mTLS proof for the tracked World boundary is linked in the [World runtime tracker](../../../project-management/implementation-tracking/world-runtime-and-movement.md#authored-world-source-retention-status). See [V27.1 migration](../../../../services/world-management-service/src/main/resources/db/migration/V27.1__world_publication_owner_binding.sql).

World Management owns both version-scoped template topology and runtime world-instance state, but the two surfaces are strictly separated. Stable playable identity and replacement classification are governed by [ADR 0122](../../decisions/adr-0122-stable-playable-state-namespaces-for-runtime-replacement.md); this document records only World Management's storage and owner-local consequences:

Expand Down Expand Up @@ -180,7 +180,7 @@ Implementation Notes:
- Current concrete `room` digest fields include `id`, `zoneId`, `name`, `description`, `nameLocalizedVariantsJson`, and `descriptionLocalizedVariantsJson`.
- Current concrete `room_exit` digest fields include `id`, `fromRoomId`, `toRoomId`, `direction`, and `cost`.
- Current concrete `generation_rule` digest fields include `id`, `name`, `scopeType`, `scopeId`, and `value`; generation-rule mutations that carry a subtree scope must validate that declared scope, share the same scope epoch, and participate in `REPLACE_SCOPE` / `SEED_APPEND_ONLY` enforcement.
- Current concrete `world_entity_spawn_binding` digest fields include `id`, `roomId`, `entityTemplateType`, `entityTemplateId`, `spawnCount`, and `respawnDelaySeconds`.
- Current concrete `world_entity_spawn_binding` digest fields include `id`, `roomId`, `entityTemplateType`, `entityReference`, `spawnCount`, and `respawnDelaySeconds`.

- Included objects:
- version-scoped topology tables such as `region_template`, `zone_template`, `room_template`, `terrain_template`, `room_exit_template`, and equivalent normalized topology relations;
Expand All @@ -196,7 +196,8 @@ Implementation Notes:
- stable table ordering;
- primary-key ordering within each table;
- deterministic encoding for included semantic fields.
- Current implementation note: the concrete first-slice table order is `regions`, `zones`, `rooms`, `roomExits`, `generationRules`, then `worldEntitySpawnBindings`, each ordered by ascending primary key. Null string values are canonicalized as empty strings before hashing. The current World digest schema version is `2` because scoped generation-rule metadata is now hashed.
- Current implementation note: the concrete first-slice table order is `regions`, `zones`, `rooms`, `roomExits`, `generationRules`, then `worldEntitySpawnBindings`, each ordered by ascending primary key. Null string values are canonicalized as empty strings before hashing. The current ordinary World digest schema version is `3`; scoped generation-rule metadata and tagged Entity spawn references are included in its deterministic projection.
- `entityReference` uses an explicit tagged representation. `RETAINED_PRIVATE_KEY` carries a positive private numeric key in `templateId`, encoded as a canonical decimal string; `CANONICAL_UUID` carries exact non-nil UUID values for `tenantId`, `versionId`, and `templateId`. Mixed or partial representations are rejected.
- `digestSchemaVersion` must increment whenever included tables, field-selection rules, or canonical serialization semantics change.

Publish gating fails closed if World Management cannot attest a digest consistent with this manifest.
Expand Down
Loading
Loading