Conformance expect returns input-error status for unreadable images #256

Closed
Andretuta wants to merge 2 commits from upstream-pr/256 into main
Andretuta commented 2026-11-24 02:54:08 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Andretuta on 2026-11-24T02:54:08Z.


Carried over from old PR 9987 by lucastayaralvarenga-ui in the original Leonida repository, which went private on 23 Nov 2026. The code is the branch old-pr/9987, exactly that PR's last commit. All carried-over PRs are listed in #17.
Opened as a draft, and the CI runs the opening started were cancelled so 250 PRs don't fill the queue. Re-run CI here when you review it.
lucastayaralvarenga-ui: this is your work. Feel free to take it over, by pushing to the branch or opening your own PR and closing this one.


Original description (mentions and #N references are disabled; the numbers refer to the old repository):

Restores #7167 after the repository-transfer closure. The original PR cannot be reopened by its author (viewerCanReopen: false). This resubmission uses the same branch and unchanged head a631bc68c4ce2ad4f7fb1993e6611aedfcf486da. Original independent review/test evidence: https://github.com/ProjectLeonida/Leonida/pull/7167#issuecomment-7111095925.

An unreadable image in compare.py expect now returns exit 2, matching the tool's documented input-error contract. The command still reports every scene, and readable images with mismatched pixels return 1. This also updates the built-in selftest and the conflicting exit-code note in COMPARE.md. Following review, the expect documentation explicitly lists exit codes 0, 1 and 2, including image-error precedence in mixed runs.

Claimed in coordination.

Rebased onto main 1ce6eb5f5. Tested head a631bc68c on Windows with Python 3.12.16 and synthetic inputs only. The regression's missing and corrupt images failed on the original parent. All four input states pass on this head, including mixed image errors and pixel mismatches. The four transparency tests and all 22 built-in selftest checks pass. Compilation, git diff --check and the game-data check pass. CPU-only, no GPU run.

AI-assisted (Codex).

Fresh integration verification against ProjectLeonida/Leonida main "d083a2cc3": clean merge, tests/test_conformance_expect_status.py: 1 test with 4 input-state subtests; tests/test_conformance_png_transparency.py: 4 tests; compare.py selftest: all 22 checks passed. Whitespace and changed-file game-data checks passed. Windows, Python 3.12.16, CPU only, synthetic inputs; no GPU run. AI-assisted (Codex).

Resubmission claim: https://github.com/ProjectLeonida/Leonida/issues/9677#issuecomment-7116960294

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5465191887 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/256). Originally posted by [Andretuta](https://github.com/Andretuta) on 2026-11-24T02:54:08Z. --- > Carried over from **old PR 9987** by `lucastayaralvarenga-ui` in the original Leonida repository, which went private on 23 Nov 2026. The code is the branch `old-pr/9987`, exactly that PR's last commit. All carried-over PRs are listed in #17. > Opened as a draft, and the CI runs the opening started were cancelled so 250 PRs don't fill the queue. Re-run CI here when you review it. > `lucastayaralvarenga-ui`: this is your work. Feel free to take it over, by pushing to the branch or opening your own PR and closing this one. --- Original description (mentions and `#N` references are disabled; the numbers refer to the old repository): Restores `#7167` after the repository-transfer closure. The original PR cannot be reopened by its author (`viewerCanReopen: false`). This resubmission uses the same branch and unchanged head `a631bc68c4ce2ad4f7fb1993e6611aedfcf486da`. Original independent review/test evidence: https://github.com/ProjectLeonida/Leonida/pull/7167#issuecomment-7111095925. An unreadable image in `compare.py expect` now returns exit 2, matching the tool's documented input-error contract. The command still reports every scene, and readable images with mismatched pixels return 1. This also updates the built-in selftest and the conflicting exit-code note in COMPARE.md. Following review, the `expect` documentation explicitly lists exit codes 0, 1 and 2, including image-error precedence in mixed runs. Claimed in [coordination](https://github.com/ProjectLeonida/Leonida/issues/7049#issuecomment-7106575790). Rebased onto main `1ce6eb5f5`. Tested head `a631bc68c` on Windows with Python 3.12.16 and synthetic inputs only. The regression's missing and corrupt images failed on the original parent. All four input states pass on this head, including mixed image errors and pixel mismatches. The four transparency tests and all 22 built-in selftest checks pass. Compilation, `git diff --check` and the game-data check pass. CPU-only, no GPU run. AI-assisted (Codex). Fresh integration verification against ProjectLeonida/Leonida main "d083a2cc3": clean merge, tests/test_conformance_expect_status.py: 1 test with 4 input-state subtests; tests/test_conformance_png_transparency.py: 4 tests; compare.py selftest: all 22 checks passed. Whitespace and changed-file game-data checks passed. Windows, Python 3.12.16, CPU only, synthetic inputs; no GPU run. AI-assisted (Codex). Resubmission claim: https://github.com/ProjectLeonida/Leonida/issues/9677#issuecomment-7116960294
MoonEyes commented 2026-11-28 07:07:09 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-28T07:07:09Z.


Thanks a lot for this, @Andretuta. We checked and this pull request is a draft that has the same three files, byte for byte, as #1322 (which says it carries this draft over); the kept one is #1322. To keep the queue clear and avoid reviewing the same change twice, I am closing this one in favour of #1322. If you think this is a mistake, please reopen it and let us know.

AI-assisted (Claude Code, Claude Opus 5.5).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7235727730 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/256#issuecomment-7235727730). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-11-28T07:07:09Z. --- Thanks a lot for this, @Andretuta. We checked and this pull request is a draft that has the same three files, byte for byte, as #1322 (which says it carries this draft over); the kept one is #1322. To keep the queue clear and avoid reviewing the same change twice, I am closing this one in favour of #1322. If you think this is a mistake, please reopen it and let us know. AI-assisted (Claude Code, Claude Opus 5.5).

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
ProjectLeonida/mandy!256
No description provided.