# V2 Hotfix Delivery

This runbook covers `TODOS.phase-72.72.12.2.8`: a hotfix delivery system for
small data-only patches that modify game balance, fix exploits, or correct data
errors without requiring platform certification.

The implementation lives in `@v2/hotfix-delivery-service` at
`apps/v2/hotfix-delivery-service/`. Its contract is
`V2/ue/Content/V2/LiveOps/HotfixDelivery_V2_Contract.json` and the validation
gate is `V2/ue/Tools/check-v2-hotfix-delivery.py`.

## Hotfix Manifests

Hotfix packages define:

- `hotfixId`
- `hotfixKind`
- `environment`
- `publishedAt`
- `expiresAt`
- `minClientBuildId`
- `rolloutPercent`
- `dataOnly`
- `requiresPlatformCertification`
- `requiresClientPatch`
- `contentHash`
- `signatureId`
- `operations`

Supported hotfix kinds are `balance`, `exploit-fix`, and `data-error`. Supported
operation target domains are `game-balance`, `exploit-mitigation`, and
`data-correction`.

## Delivery Planning

`buildV2HotfixDeliverySurface` publishes active signed manifests and grouped
hotfixes by kind. `planV2HotfixDelivery` compares the client installed hotfix
IDs against active hotfixes for the requested environment and returns only the
missing packages.

Hotfixes must be small data-only patches. The service rejects manifests that
require platform certification or a client patch before they can be delivered.

Primary APIs:

- `buildV2HotfixDeliverySurface`
- `planV2HotfixDelivery`

Service endpoints:

- `GET /v2/live-ops/hotfixes/{environment}/manifest`
- `GET /v2/live-ops/hotfixes/{environment}/delta/{clientBuildId}`
- `POST /v2/live-ops/hotfixes/{environment}/{hotfixId}/acknowledge`

## Operator Flow

1. Author a data-only hotfix for balance, exploit mitigation, or data
   correction.
2. Sign the manifest and publish it through `buildV2HotfixDeliverySurface`.
3. Deliver only missing active packages through `planV2HotfixDelivery`.
4. Track acknowledgements through the hotfix acknowledgement endpoint.
5. Keep `requiresPlatformCertification: false` and `requiresClientPatch: false`
   for every package.

## Gates

- `hotfix-delivery-package`
- `hotfix-delivery-data-only`
- `hotfix-delivery-balance`
- `hotfix-delivery-exploit-fix`
- `hotfix-delivery-data-error`
- `hotfix-delivery-no-platform-certification`
- `hotfix-delivery-validation`
- `hotfix-delivery-ci-wired`

## Verification

```sh
pnpm --filter @v2/hotfix-delivery-service test
pnpm --filter @v2/hotfix-delivery-service typecheck
pnpm --filter @v2/hotfix-delivery-service lint
pnpm --filter @v2/hotfix-delivery-service build
python3 V2/ue/Tools/check-v2-hotfix-delivery.py
```
