Reject shader indexes with a non-object root before pipeline checks (PIPELINE-INDEX-TOP-LEVEL-OBJECT) #2042

Merged
alexandersato0830 merged 1 commit from upstream-pr/2042 into main 2026-11-28 10:47:39 +00:00
alexandersato0830 commented 2026-11-25 18:50:26 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by alexandersato0830 on 2026-11-25T18:50:26Z.


Claimed in the coordination issue as: PIPELINE-INDEX-TOP-LEVEL-OBJECT

What and why

The native checker expects a top-level JSON object for the translated shader index. The build wrapper currently accepts any nonempty JSON value, then clears previous pipeline crash diagnostics and launches the checker. Reject an array, string, number or other non-object at the shared pipeline prerequisite, before touching those diagnostics.

Tested

  • py -3.14 -I tests/test_make_game_pipelines.py passed all 19 tests. The new synthetic regression failed for all three inputs on 9f9a7c5f3. With the fix, every input is rejected before the checker runs and the previous crash report stays intact.
  • py -3.14 -I tests/test_make_game_preflight.py ran 98 tests with two platform-dependent skips and no failures.
  • git diff --check and the source-only check passed on Windows 11 with Python 3.14.

GPUs tested: n/a (synthetic index, mocked checker)

AI-assisted: yes (Codex)

Checklist

  • Based on current main.
  • One topic.
  • No game data, keys or decryption.
<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5497225652 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2042). Originally posted by [alexandersato0830](https://github.com/alexandersato0830) on 2026-11-25T18:50:26Z. --- Claimed in the coordination issue as: [PIPELINE-INDEX-TOP-LEVEL-OBJECT](https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7171444495) ### What and why The native checker expects a top-level JSON object for the translated shader index. The build wrapper currently accepts any nonempty JSON value, then clears previous pipeline crash diagnostics and launches the checker. Reject an array, string, number or other non-object at the shared pipeline prerequisite, before touching those diagnostics. ### Tested - `py -3.14 -I tests/test_make_game_pipelines.py` passed all 19 tests. The new synthetic regression failed for all three inputs on `9f9a7c5f3`. With the fix, every input is rejected before the checker runs and the previous crash report stays intact. - `py -3.14 -I tests/test_make_game_preflight.py` ran 98 tests with two platform-dependent skips and no failures. - `git diff --check` and the source-only check passed on Windows 11 with Python 3.14. GPUs tested: n/a (synthetic index, mocked checker) AI-assisted: yes (Codex) ### Checklist - [x] Based on current `main`. - [x] One topic. - [x] No game data, keys or decryption.
sodove commented 2026-11-28 10:12:01 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by sodove on 2026-11-28T10:12:01Z.


#2042 | head 9200934dd0a2856f5552f75978313ed78395ee0e | python3 -I tests/test_make_game_pipelines.py -v | red: 19 run, 3 failures | green: 20 passed | Red → green

The baseline accepted a non-object shader index where the tests expected it to stop and preserve the previous report.

Pinned main 33db04a7010e81c40a7a6a15624525aa0c4a3a58, merged into this PR head. Ubuntu 26.04.1 (WSL2), Python 3.14.4. Full suite: not run. AI-assisted: OpenAI Codex. Batch claim.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7237739086 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2042#issuecomment-7237739086). Originally posted by [sodove](https://github.com/sodove) on 2026-11-28T10:12:01Z. --- #2042 | head `9200934dd0a2856f5552f75978313ed78395ee0e` | `python3 -I tests/test_make_game_pipelines.py -v` | red: 19 run, 3 failures | green: 20 passed | **Red → green** The baseline accepted a non-object shader index where the tests expected it to stop and preserve the previous report. Pinned main `33db04a7010e81c40a7a6a15624525aa0c4a3a58`, merged into this PR head. Ubuntu 26.04.1 (WSL2), Python 3.14.4. Full suite: not run. AI-assisted: OpenAI Codex. [Batch claim](https://github.com/ProjectLeonida/mandy/issues/1608#issuecomment-7237628300).
DadaCap commented 2026-11-28 10:47:41 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by DadaCap on 2026-11-28T10:47:41Z.


Merged, thank you @alexandersato0830!

What it does: Reject shader indexes with a non-object root before pipeline checks (PIPELINE-INDEX-TOP-LEVEL-OBJECT)

How it was checked: sodove tested this PR at head 9200934dd on main 33db04a70: the PR's own test fails on main and passes with this PR merged in (his result is linked from the batch summary in #1608). We then re-ran the same test locally on Windows 11 and got the same verdict: on main, red (3 failures); with the PR, green (20 OK).

CI: the red jobs on this PR fail the same way on main, or on the older main it was built on (the cs_dpp_cmp.asm translator fixture, since fixed on main, and the Windows runner's Visual Studio setup), so none comes from this change.

Merged one by one with 20 other PRs of the same reviewed batch, pinned to the tested head.

AI-assisted (Claude Code, Claude Opus 5.5), posted for the maintainers.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7238126662 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2042#issuecomment-7238126662). Originally posted by [DadaCap](https://github.com/DadaCap) on 2026-11-28T10:47:41Z. --- Merged, thank you @alexandersato0830! **What it does:** Reject shader indexes with a non-object root before pipeline checks (PIPELINE-INDEX-TOP-LEVEL-OBJECT) **How it was checked:** sodove tested this PR at head `9200934dd` on main `33db04a70`: the PR's own test fails on main and passes with this PR merged in (his result is linked from the batch summary in #1608). We then re-ran the same test locally on Windows 11 and got the same verdict: on main, red (3 failures); with the PR, green (20 OK). **CI:** the red jobs on this PR fail the same way on main, or on the older main it was built on (the `cs_dpp_cmp.asm` translator fixture, since fixed on main, and the Windows runner's Visual Studio setup), so none comes from this change. Merged one by one with 20 other PRs of the same reviewed batch, pinned to the tested head. AI-assisted (Claude Code, Claude Opus 5.5), posted for the maintainers.
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!2042
No description provided.