Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
e3402e6
Bind World launch writes to protected installation registry
benhook1013 Nov 3, 2026
a4a88df
Record registry checks and held public runtime boundary
benhook1013 Nov 3, 2026
a2c3001
Merge branch 'codex/gameplay-runtime-owner-catalogs-20261103' into co…
benhook1013 Nov 3, 2026
c224627
Record source-built held-admission registry qualification
benhook1013 Nov 3, 2026
2d5db32
Qualify registry migration history and Python checks
benhook1013 Nov 3, 2026
88efce1
Merge commit 'aed49f9cfd' into codex/gameplay-protected-installation-…
benhook1013 Nov 3, 2026
5a516b8
Qualify World installation parsing with enabled static analysis
benhook1013 Nov 3, 2026
f0101fd
Compose run-owned fixture allocation with current World installation …
benhook1013 Nov 3, 2026
ca004f1
Merge commit '1120fc3b47074262c089b26ba795b4f75f5b4cf0' into codex/ga…
benhook1013 Nov 3, 2026
2412822
Merge commit '41a6215ba9835397940954ff1458ec197ec4c224' into codex/ga…
benhook1013 Nov 3, 2026
5b44677
Merge branch 'codex/gameplay-runtime-owner-catalogs-20261103' into co…
benhook1013 Nov 3, 2026
a548b82
Merge branch 'codex/gameplay-runtime-owner-catalogs-20261103' into co…
benhook1013 Nov 3, 2026
dd85e9f
Merge branch 'codex/gameplay-runtime-owner-catalogs-20261103' into co…
benhook1013 Nov 3, 2026
2201d2f
Merge branch 'codex/gameplay-runtime-owner-catalogs-20261103' into co…
benhook1013 Nov 3, 2026
5020922
Merge branch 'codex/gameplay-runtime-owner-catalogs-20261103' into co…
benhook1013 Nov 3, 2026
9a72b5d
Merge commit '575576370016229d79ba94b8b3533483d1ea9a13' into codex/ga…
benhook1013 Nov 3, 2026
f9f952c
Merge commit 'a2a37c4a1194868ab4f9cbb6050ccbd1c80f8057' into codex/ga…
benhook1013 Nov 3, 2026
3ec044c
Merge commit '78b9bef5f9c569da1e727268d5820057dbd80eb9' into codex/ga…
benhook1013 Nov 3, 2026
9646e31
Merge commit '97ac9b386790b550ee58dabc6c449114991c89b2' into codex/ga…
benhook1013 Nov 3, 2026
4213f66
Merge commit 'e29b15b89b7afeba10542c5d3d06251276a655e7' into codex/ga…
benhook1013 Nov 3, 2026
631d9fa
Fix protected installation review findings and retained preparation r…
benhook1013 Nov 6, 2026
b8a8369
Strengthen installation artifact ceiling proof and correct test attri…
benhook1013 Nov 6, 2026
c799120
Link protected installation prerequisite from active gaps
benhook1013 Nov 6, 2026
55d95f7
Reconcile protected installation review branch with current catalog p…
benhook1013 Nov 6, 2026
6f20459
Address final CLI installation proof and identity qualification findings
benhook1013 Nov 6, 2026
5445ac0
Merge finalized owner-catalog review fixes into protected installatio…
benhook1013 Nov 6, 2026
4b6e4a5
Deny uncomposed activation before acquiring Account protection
benhook1013 Nov 6, 2026
a8fd092
Preflight installation readiness before Account protection
benhook1013 Nov 6, 2026
d7a9d89
Preserve authenticated committed replay without registry composition
benhook1013 Nov 6, 2026
9905025
Run installation vectors for inventory-only changes
benhook1013 Nov 6, 2026
4a1d160
Exercise registry truncate guard past foreign-key restriction
benhook1013 Nov 6, 2026
49d95aa
Merge develop after PR 3386 integration
benhook1013 Nov 6, 2026
31ae0d5
test(game-session): allow bounded positive cleanup fsync latency
benhook1013 Nov 7, 2026
02407d9
Merge current develop infrastructure updates into installation registry
benhook1013 Nov 7, 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
10 changes: 10 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,10 @@ jobs:
with:
requirements: ${{ (needs.changes.outputs.lightweight_only == 'true' && needs.changes.outputs.design_docs_changed == 'true' && needs.changes.outputs.validation_python_changed != 'true') && 'yaml' || 'ci' }}

- name: Run installation inventory offline vectors
if: ${{ needs.changes.outputs.lightweight_only != 'true' }}
run: python3 dev-tools/deploy/test-runtime-installation-inventory.py

- name: Set up Node for Python Markdown contracts
if: ${{ needs.changes.outputs.lightweight_only != 'true' || needs.changes.outputs.validation_python_changed == 'true' }}
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
Expand Down Expand Up @@ -1099,6 +1103,12 @@ jobs:
with:
requirements: none

- name: Set up Python for installation inventory composition
if: ${{ matrix.module == 'game-design-service' }}
uses: ./.github/actions/setup-python
with:
requirements: yaml
Comment thread
benhook1013 marked this conversation as resolved.
Resolved

- name: ⚙️ Set Up Java
uses: actions/setup-java@b843ebf9b913146b38da2eaa7aeddf76074ae1ad # v6
with:
Expand Down
4 changes: 4 additions & 0 deletions DEVELOPER_SETUP.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ The following tools are not strictly required to build or run the stack, but the
- **Redis CLI (`redis-cli`)** and **RedisInsight** – useful for inspecting transient gameplay/session state in the local Redis instance and browsing keys like `session:*`, `tick:*`, and `timer:*`.
- **Kubernetes CLI (`kubectl`)** and optionally **Helm** – install `kubectl` if you work on `k8s/`, Kustomize overlays, or overlay validation CI. Local validation uses `kubectl kustomize`, so this is effectively required for Kubernetes-related changes.

## Game Design Cross-Service Checks

Local `:game-design-service:crossServiceTest` and `:game-design-service:check` runs require `python3` and PyYAML because the owner-composition test launches the runtime installation inventory producer. From the repository root, activate a Python virtual environment and install the existing pinned YAML profile with `python3 -m pip install --require-hashes -r config/python/yaml-requirements.txt`. Keep that environment active when invoking the [canonical Gradle wrapper](design/developer-workflows/validation-and-runtime-proof.md#local-gradle-execution), so the test can find `python3` and its dependencies. CI installs the same YAML profile through the repository setup action.

## Windows + WSL Tooling

If you develop from Windows, prefer running build and package-management tools inside WSL with Linux-native toolchains.
Expand Down

Large diffs are not rendered by default.

16 changes: 16 additions & 0 deletions design/architecture/system-architecture-deployment-runbook.md
Original file line number Diff line number Diff line change
Expand Up @@ -228,3 +228,19 @@ If a deployment causes instability:
| **Hobby / Self-Hosted** | Resolve target manifests/charts → provide `FIREMUD_PREFLIGHT_RENDER_PATH` and run the canonical operator preflight (`./dev-tools/deploy/preflight.py hobby-self-hosted`), with no stage-overlay fallback, then capture the partial/static-only report → apply manifests/charts from the operator environment with normal steady-state processing; only for first-live or reopen after restore hold normal workloads at zero or behind restore-safe traffic quarantine → verify live state, monitor rollout, and run recovery-safe generic smoke only (no login, session/reconnect, or player-connectivity checks before finalization) → for first-live or reopen events do not treat `PREFLIGHT-BACKUP-003` as traffic authorization; keep traffic closed and follow the canonical [Backup & Disaster Recovery recovery lifecycle](./system-architecture-backup-recovery.md#recovery-controller-continuation) until its owner-defined finalized success state → expose traffic only after that terminal state, then run player-facing connectivity verification and record canonical deployment evidence (`manifestRef`/`chartVersion`, preflight report, rollback reference) | Re-apply previously known-good manifest/chart reference and confirm health only when the prior release remains compatible with the current schema, secret/config contract, mounted file-path contract, and external bindings; if not, follow the documented forward remediation path |

Overlay PRs should include a clear deployment intent payload: target environment, service image digests, source commit/tag, rollback digest set (or explicit `roll-forward-only` marker), and (for production) an attestation reference under `design/operations/deployments/production/attestations/`. Attestation schema and validation requirements are defined in `design/architecture/system-architecture-promotion-attestation.md`. CI validates overlay images and preflight policy contracts via [`.github/workflows/validate-kustomize-overlays.yml`](../../.github/workflows/validate-kustomize-overlays.yml) before merge.

## Runtime Ownership Installation Inventory

World owns the versioned runtime-family registry and frozen required-owner sets under [ADR 0123](./decisions/adr-0123-database-authoritative-temporal-coordinated-world-lifecycle.md). The deployment/installation boundary supplies a distinct protected exact-installation inventory as its completeness root. This inventory reuses the exact identity and input binding of [ADR 0177](./decisions/adr-0177-exact-plan-authorized-automated-production-deployment.md); it is separate from preflight reports, release manifests, workload certificates and non-authorizing JWT readiness observations. Rendering or hashing a candidate inventory does not authorize installation or registration. The protected current-installation source must independently establish that the exact inventory is the current completed installation and hold that identity through the World commit. Missing, stale, incomplete or mismatched evidence is unavailable.

The closed UTF-8 JSON artifact schema is `firemud-runtime-installation-inventory/v1`. Its exact root fields are `schema`, `artifactId`, `installationId`, `environment`, `generation`, `clusterUid`, `namespaceUid`, `namespace`, `sourceCommit`, `renderedManifestDigest`, `declarationsDigest`, `executor`, `inputBindings` and `members`. Artifact and installation IDs are non-nil UUIDs; generation and Kubernetes incarnation UIDs are bounded opaque identities, not counters inferred by consumers. Environment uses the existing deployment environment classes. Namespace is the exact workload namespace. The source commit is an immutable full Git SHA; digests use `sha256:` followed by lowercase hexadecimal. `executor` has exactly `identity` and `versionDigest`, binding the protected installation executor and its immutable version. Exact original artifact bytes and their digest are retained; consumers do not replace them with reserialized JSON.

`inputBindings` has exactly five arrays: `migrations`, `configurations`, `mountedResources`, `secretContracts` and `externalBindings`. Each binding has exactly `name`, `version` and `digest`; names are unique within their category. Empty arrays explicitly declare no relevant input in that category; omitted categories are invalid. Secret references alone do not bind secret-contract versions, and secret contents are not placed in the artifact. The protected installation source must verify every applicable input, including references outside the rendered manifest.

Each `members` entry identifies one actual ordinary or init container in a rendered workload. Its exact fields are `workloadApiVersion`, `workloadKind`, `workloadNamespace`, `workloadName`, `containerKind`, `containerName`, `image`, `ownerId`, `ownership`, `catalogSources` and `families`. The container kind is `APPLICATION` or `INIT`; images are immutable OCI digest references. Workload/container identities are unique and sorted. Inventory generation enumerates actual Pod specifications in supported Pod, Deployment, StatefulSet, DaemonSet, ReplicaSet, Job and CronJob resources. It must not select only matching image names, omit sidecars/init containers, or infer owners from successful responders. Unknown resource kinds require an explicit supported classification rather than silent omission. Every enumerated container needs an exact protected ownership declaration; missing, duplicate or extra declarations refuse generation.

Ownership is `RUNTIME_OWNER` or `NO_INSTANCE_STATE`. The latter requires empty catalog and family arrays and grants no ownership over future state. Runtime owners have a nonempty owner ID and catalog sources. Each catalog source has exactly `sourceId`, `contract`, `epoch` and `digest`; IDs are unique within the member and epochs are positive decimal strings. Each family has exactly `familyId`, `catalogSourceId`, `replacementClass` and `cleanupContract`. Family identity is unique across the artifact's owner/family pairs, and its source must resolve in the same member. Replacement class is `S1`, `S2`, `S3` or `UNRESOLVED`. A cleanup contract has exactly `operation`, `requestIdentity`, `acknowledgement` and `retention`, naming versioned owner contracts rather than inventing deletion authority. Unresolved classification or missing cleanup/catalog evidence blocks qualified launch writes; inventory and registry evidence is not FRESH initialization or admission.

The internal generator takes exact rendered bytes and a distinct closed declaration document, verifies complete rendered container membership and binding formats, hashes the exact rendered/declaration bytes, and emits deterministic candidate artifact bytes. Declared external input facts still require independent verification by the protected installation source. That generator is below the protected installation authority boundary. World registration obtains artifact bytes only from its configured protected current-installation source, never from ordinary registration request payloads. It retains immutable artifact identity, registration revision and exact readback, rejects conflicting retries and changes, and freezes the complete required-owner set before applicable launch writes. Registration and classification changes invalidate dependent snapshots under the owning contracts. The concrete local persistence and write predicates belong to [World Runtime and Data](./microservices/world-management-service/runtime-and-data.md); capability and proof status belongs in [Realm Routing and Playable State](../project-management/implementation-tracking/realm-routing-and-playable-state.md).

This boundary does not implement or authorize the whole ADR 0177 executor, rollout or recovery programme. Default runtime registration, actual protected installation delivery, signer/custody qualification and activation retain their existing holds. An internal producer or controlled protected-source fixture must not be reported as genuinely installed external authority.
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ The full direct-text `WORLDS` -> `LOGIN` -> `REALMS` -> conditional `JOIN` -> co

## Active Gaps

- The [protected installation registry prerequisite](#protected-installation-registry-prerequisite) still lacks a protected current-installation source; default and runtime registration remain denied, and all-owner epoch/applicability and FRESH manifest collection remain unavailable.
- Later gameplay-state families, especially loadouts, abilities, authored effects, richer resource tables, and any new character-creation or social/runtime consumer, still need explicit adoption of `{tenantId, gameInstanceId, playableStateScope}` before they become live. They must not reopen tenant-wide or bare-character shortcuts.
- Entity Management owns actor rows and the Account relationship/projection to those rows remains an evolving Account/Entity seam. Actor rows carry account and tenant identity, but neither membership nor that relationship establishes one implicit gameplay namespace across realms.
- Text `JOIN`/`Join & Play` dispatch remains unimplemented; the Account-local explicit writer is separate. Text `PLAY` lifecycle/generation validation is implemented; its outcome rules remain with the canonical owner linked above. Current connect-token issuance remains held before replay and authority reads. Full caller-target/atomic authority, connect-token membership/version reread, `allowNewGameplayBindings`, grant lifecycle/expiry, and lease-commit boundaries remain gaps; no membership is created implicitly.
Expand Down Expand Up @@ -166,3 +167,15 @@ No competing implementation is recorded for visible realm addressing, world-qual
| Social Groups | Live/recent friend-presence projection with realm and playable-state scope | Account-presence/friend-presence contracts |
| Game Logic | Preserve and validate complete routing/playable-state attestation for gameplay calls | Authenticated outbound gameplay gRPC |
| Logging & Admin | Tenant-guarded pointer audit, cutover, and runtime-state operator reads | REST over Game Session control-plane authority |

## Protected Installation Registry Prerequisite

The internal candidate producer, closed World artifact parser, World registration/readback owner and forward V1048 storage predicates are implemented as a receiving boundary. The [deployment owner](../../architecture/system-architecture-deployment-runbook.md#runtime-ownership-installation-inventory) owns the artifact contract and completeness rules; [World Runtime and Data](../../architecture/microservices/world-management-service/runtime-and-data.md#protected-installation-registry-and-frozen-required-owners) owns registry persistence, invalidation and launch predicates. The producer enumerates rendered application and init containers, including unrelated sidecars, and requires exact ownership declarations and explicit resource-kind classification. It binds exact rendered/declaration bytes and all declared input categories. This produces candidate bytes only.

At `631d9faa38d2b41dc2670ecc38c30546ccdb7995`, all sixteen offline producer tests pass locally and in CI, including an exact-byte interoperability vector also consumed by the World parser. Receiving proof 291 passes owning generation, ten parser units, twelve actual registry PostgreSQL cases and seventeen catalog PostgreSQL cases with no failures, errors or skips (2m10). Proof 293 qualifies the final forward migration and explicit installation composition in preparation/protected activation: 33 units, 42 PostgreSQL cases and nineteen actual Account/Game Session/World mTLS composition cases pass with no failures, errors or skips (11m52). Existing first-JOIN, materialization, activation, retained terminal retry and fixed-preset original-row/xmin assertions remain present. Separate controlled installation facts bound the full owner-chain cases; the isolated launch receiver additionally tests the installed storage predicate without bypassing canonical materialization guards. These results do not establish a genuinely installed external authority, process-death, private FRESH initialization, complete owner cleanup, custody or fresh-image proof. Selected World main/unit/integration/cross-service analysis and formatting pass in proof 296; the aggregate exposed three documentation blank-line failures, corrected and passed in proof 298. Fresh source-built baseline proof 300 built all eleven service jars and the changed World image, but failed because the existing Gateway qualification gate intentionally remained unready, cascading to TCP Proxy readiness. Authenticated teardown completed and independent inspection found no remaining project containers, networks or volumes. This remains a failed baseline. Separately attributed source-built held-admission proof 303 passes at receiving commit a2c3001e: all eleven service jars and the changed World image are rebuilt, Gateway/Telnet deliberate denial and the isolated direct-backend LOGIN → PLAY → LOOK path pass, authenticated teardown completes, and independent inspection finds no remaining project containers, networks or volumes. The Gateway handshake is loopback inside the run-owned container; successful public admission and host-published ingress remain unproved. Attempt 302 refused its malformed capability token before stack startup and supplies no runtime credit.

Retained receiving proof 383 reports 39 focused World cases: ten artifact/parser, seventeen catalog PostgreSQL and twelve installation-registry PostgreSQL cases, plus selected analysis, formatting and documentation checks. The retained receiving record does not identify its exact source commit, so this report is not exact-head qualification of the current branch. Separately attributed source-built held-admission runtime 334 passed on `5a516b89b6351e649aab90173bf44450f04aa984`: rebuilt images, deliberate public-edge denial, isolated backend LOGIN → PLAY → LOOK and authenticated cleanup. Runtime 334 is not fresh runtime proof of `4213f6607a30250d36b8cf15a83a9e14fec8b19c` or these later fixes. Earlier failed baseline proof remains a failure.

The package-scoped run-owned fixture preparation path has only integration test-factory and reflective cross-service test callers; successful physical fixtures explicitly compose controlled installation facts. There is no production/RPC caller or fixture-flag-based protected installation source. Uncomposed fixture preparation remains held under the [World data owner](../../architecture/microservices/world-management-service/runtime-and-data.md#protected-installation-registry-and-frozen-required-owners); no SQL exemption or fake default source is provided.

The real protected current-installation producer/delivery and its authority through commit are unavailable; default source and runtime registration remain denied. This is an open prerequisite, not a capability-rating upgrade. Remaining work includes genuine installed completeness, all-owner epoch/applicability collection, FRESH manifests, private runtime/World materialization and aggregation into the existing canonical CLOSED owner. Production/default registration, signer/custody, activation/first-OPEN and Unit1B holds remain in force.
Loading
Loading