--- id: PLN-0085 ticket: studio-packer-rgba8888-asset-pipeline title: RGBA8888 Tests, Fixtures, and Conformance Updates status: done created: 2026-05-23 completed: 2026-05-23 ref_decisions: - DEC-0037 tags: - tests - fixtures - conformance - rgba8888 --- ## Objective Update packer tests and fixtures so RGBA8888 is the asserted source of truth and RGB565-specific expectations are removed. ## Background `DEC-0037` requires tests and fixtures to stop proving RGB565 behavior. The code base has parser, walker, details, materializer, and workspace service tests that mention `convertedRgb565`, `originalArgb8888`, 15-color limits, magenta color-key behavior, and RGB565 payload sizes. ## Scope ### Included - Update packer unit tests and integration-style workspace tests. - Update fixture `asset.json` files under packer test resources. - Add conformance-oriented assertions for RGBA channel order, alpha, index `0`, 16 usable colors, and removed color-key behavior. ### Excluded - Manual regeneration of `test-projects/main` and `fragments`. - Production code changes except minor compile-fix test helpers. - Runtime repository tests. ## Execution Steps ### Step 1 - Update parser and details tests **What:** Replace palette payload fixtures with `rgba8888`. **How:** Rewrite test JSON snippets and assertions that mention `originalArgb8888` or `convertedRgb565`. **File(s):** - `prometeu-packer/prometeu-packer-v1/src/test/java/p/packer/services/PackerAssetDeclarationParserTest.java` - `prometeu-packer/prometeu-packer-v1/src/test/java/p/packer/services/PackerAssetDetailsServiceTest.java` ### Step 2 - Update glyph walker tests **What:** Assert new palette extraction semantics. **How:** Add image fixtures in tests that cover: 16 colors, 17-color failure, alpha 0, partial alpha, magenta as ordinary color, and index `0` as ordinary. **File(s):** - `prometeu-packer/prometeu-packer-v1/src/test/java/p/packer/repositories/PackerGlyphBankWalkerTest.java` ### Step 3 - Update materializer and workspace service tests **What:** Assert RGBA8888 runtime payload and metadata behavior. **How:** Update tests that read `assets.pa`, measured bank size, payload offsets, and palette byte expectations. Replace RGB565 byte checks with RGBA byte checks. **File(s):** - `prometeu-packer/prometeu-packer-v1/src/test/java/p/packer/repositories/PackerRuntimeAssetMaterializerTest.java` - `prometeu-packer/prometeu-packer-v1/src/test/java/p/packer/services/FileSystemPackerWorkspaceServiceTest.java` - `prometeu-packer/prometeu-packer-v1/src/test/java/p/packer/services/PackerRuntimePatchServiceTest.java` - `prometeu-packer/prometeu-packer-v1/src/test/java/p/packer/services/PackerRuntimeRegistryTest.java` ### Step 4 - Update packer fixture assets **What:** Replace fixture `asset.json` palette fields with `rgba8888`. **How:** Edit packer test fixtures under `src/test/resources/fixtures` so canonical palette declarations do not contain `convertedRgb565`. **File(s):** - `prometeu-packer/prometeu-packer-v1/src/test/resources/fixtures/**/asset.json` ### Step 5 - Add stale-contract guards **What:** Add tests or quality checks that catch old RGB565 palette contract residue. **How:** Add assertions in existing tests or a focused repository quality test that normal packer specs/tests/fixtures do not contain `convertedRgb565` or RGB565 glyph palette payload expectations. **File(s):** - Existing packer test suites under `prometeu-packer/prometeu-packer-v1/src/test/java` ## Test Requirements ### Unit Tests - Parser, details, mapper, glyph walker, and workspace service unit tests must all pass. ### Integration Tests - Run the relevant Gradle test task for `prometeu-packer-v1`. ### Manual Verification - Search for `convertedRgb565`, `originalArgb8888`, `RGB565`, `rgb565`, `2048`, and magenta color-key references in packer tests and fixtures. ## Acceptance Criteria - [x] Tests use `rgba8888` as canonical palette data. - [x] Tests assert RGBA channel order and alpha preservation. - [x] Tests assert 16 usable palette entries. - [x] Tests assert magenta is ordinary or no longer special. - [x] Tests assert 4096-byte palette blocks where payload size is checked. - [x] Packer test fixtures no longer rely on `convertedRgb565`. ## Dependencies - Depends on `PLN-0082`, `PLN-0083`, and `PLN-0084`. ## Risks - Some stale generated fixture data may be easier to regenerate than hand-edit. - Overbroad residue checks could flag historical discussion artifacts; scope checks to normal specs, code, tests, and fixtures.