# V2 Asset Version Control CI Validation

This guide covers `TODOS.phase-72.72.20.1.15`: CI validation that Git LFS
pointers are valid and binary assets are not accidentally committed as regular
Git blobs.

## Source Of Truth

- Manifest:
  `V2/ue/Build/AssetPipeline/v2-asset-version-control-ci-validation.json`
- Checker: `V2/ue/Tools/check-v2-asset-version-control-ci-validation.py`
- Report: `V2/ue/Saved/CI/AssetVersionControlCiValidationReport.json`

## What CI Checks

The checker scans tracked paths under `V2/ue` whose extensions are declared in
`v2-binary-asset-attributes.json`. For each binary asset it verifies:

- effective attributes include `filter=lfs`, `diff=lfs`, `merge=lfs`, and
  `-text`
- the Git object stored in the index is a Git LFS pointer
- the pointer has the Git LFS spec `version`, a 64-character `oid sha256`, and a
  positive `size`
- no tracked V2 binary asset is an inline Git blob

This is intentionally scoped to V2 so unrelated legacy assets cannot hide a V2
asset pipeline failure.

## Remediation

If CI reports an inline binary Git blob, confirm the asset matches
`V2/ue/.gitattributes`, then renormalize it:

```bash
git add --renormalize <asset>
python3 V2/ue/Tools/check-v2-asset-version-control-ci-validation.py
```

Malformed pointers should be regenerated by re-adding the source file through
Git LFS. Do not hand-edit pointer files.

## Validation Commands

```bash
python3 V2/ue/Tools/check-v2-asset-version-control-ci-validation.py --self-test
python3 V2/ue/Tools/check-v2-asset-version-control-ci-validation.py \
  --json-report V2/ue/Saved/CI/AssetVersionControlCiValidationReport.json
python3 -m json.tool V2/ue/Build/AssetPipeline/v2-asset-version-control-ci-validation.json
python3 V2/ue/Tools/check-v2-ci-workflow.py
```
