# VREL-001..010 + VREL-021..030 — Production asset release gate

Status: IN PROGRESS  
Parent batch: #244  
Parent blocker: #230  
Issue: #245  
Branch: `agent/vrel-001-030-production-gate`

## Delivered candidate scope

### VREL-001..010 — canonical validator
- VREL-001 — one registry owns Drawer White/Gray and Lunch Blue/Pink/Green canonical runtime paths.
- VREL-002 — report mode returns success while emitting truthful readiness.
- VREL-003 — enforce mode returns non-zero while canonical production media is incomplete.
- VREL-004 — missing/empty files are rejected.
- VREL-005 — PNG signature is validated.
- VREL-006 — IHDR width/height are parsed and sanity checked without inventing one mandatory export dimension.
- VREL-007 — canonical reusable cutouts require an alpha-capable PNG color type.
- VREL-008 — files above the production-standard 1.2 MiB review ceiling are rejected for stable admission.
- VREL-009 — every run writes a machine-readable JSON report with per-variant issues and metadata.
- VREL-010 — end-to-end validator tests cover missing, enforce-blocked, structurally valid RGBA, invalid signature, missing alpha and oversize scenarios using temp-only synthetic headers.

### VREL-021..030 — CI/publication safety
- VREL-021 — PR workflow runs report mode after the full Flutter tests.
- VREL-022 — main runs enforce mode before stable owner-visible publication.
- VREL-023 — Android release APK candidate is built and uploaded before enforcement, preserving engineering inspection when production photography is incomplete.
- VREL-024 — stale-main publication guard still runs only after production enforcement succeeds.
- VREL-025 — publication cannot run when enforcement fails because `main_guard` is not eligible.
- VREL-026 — staged verified receipt records production readiness and readiness-report SHA-256.
- VREL-027 — validator output names every affected variant/path and issue.
- VREL-028 — main enforcement blocks upload a dedicated JSON diagnostic artifact.
- VREL-029 — workflow contract tests lock ordering/conditions and receipt fields.
- VREL-030 — rollback/recovery procedure is below.

## Current truthful readiness

At branch creation, main has the canonical product directories but no five production PNG binaries. Therefore a current report must be `BLOCKED` for visual publication while Flutter Analyze/tests/APK engineering validation can remain Green. This is expected and is not permission to fabricate missing photography.

## Stable publication rollback/recovery — VREL-030

If an admitted product asset later regresses:
1. Revert/remove only the bad canonical production asset or the commit that admitted it; do not overwrite protected `Images/` masters.
2. The production gate must return `BLOCKED`, which prevents a newer `Last verified APK` publication while still allowing an engineering candidate artifact to be inspected.
3. Restore the last known-good approved source/export under the same canonical path only after source/geometry/color/alpha QA passes.
4. Re-run PR Analyze, full Flutter tests, production readiness report and Android release APK.
5. Merge only the approved correction.
6. On main, require production enforcement success plus the stale-main SHA guard before the verified APK can advance.
7. Record the replacement source/export receipt and new APK source SHA; never hand-edit `Last verified APK` to bypass the gate.

## Guardrails
- `Images/` remains read-only.
- No source photography is synthesized by this wave.
- Product Master and released variant IDs remain unchanged.
- No UI, catalog, Favorites or Amazon behavior changes.
- The 1.2 MiB hard ceiling comes from `docs/ui/CREATIVE_ASSET_PRODUCTION_STANDARD.md`, which targets <=900 KB and requires investigation above 1.2 MB.

## Required validation before merge
- [ ] Flutter Analyze Green.
- [ ] Full Flutter tests Green, including VREL gate tests.
- [ ] PR readiness report shows the exact current missing/invalid canonical assets and does not fail PR validation.
- [ ] Android release APK candidate Green/uploaded.
- [ ] PR merged to stable main.
- [ ] Main confirms engineering gates remain Green and stable publication stays blocked until production assets are actually READY.
