make_game: preserve crash reports when a retry fails setup (BUILD-PIPELINE-RETRY-CRASH-REPORT) #846

Merged
TheGeogeo merged 1 commit from upstream-pr/846 into main 2026-11-29 15:44:38 +00:00
TheGeogeo commented 2026-11-24 14:29:46 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by TheGeogeo on 2026-11-24T14:29:46Z.


Claimed in the coordination issue as: BUILD-PIPELINE-RETRY-CRASH-REPORT

What and why

After make_game.py confirms a module crash with an isolated checker probe, a retry can exit during setup before writing its work report. The stage reports the setup failure but loses the confirmed crash details. Write pipeline_crashes.json before taking that error path so the module name and SHA-256 are preserved.

This carries forward my earlier ProjectLeonida/Leonida PR #9992. PR #285 handles the separate case of a stale report that cannot be removed at startup. Both changes merge together cleanly.

Tested

After a rebase on main 6293c1c4 (eb4bdfdc, same patch as 29b8dbc7), on Windows 11, Python 3.12.4: tests/test_make_game_pipelines.py 19 OK, tests/test_make_game_preflight.py 98 run, OK (1 skipped); test_tool_stdout_encoding.py, test_docs_cli_flags.py and test_text_write_line_endings.py OK; git diff --check and the no-game-data check clean.

  • Windows, Python 3.12.4. The new synthetic regression failed against d0da7dad because pipeline_crashes.json was missing.
  • python -I -B tests/test_make_game_pipelines.py: 19 passed.
  • python -I -B tests/test_make_game_pipeline_batches.py: 15 passed.
  • python -I -B tests/test_make_game_pipeline_preflight.py: 19 passed and 1 skipped (POSIX execute permissions).
  • Merged #285 (b3a8c538) without conflicts in a temporary worktree and reran python -I -B tests/test_make_game_pipelines.py: 20 passed.
  • git diff --check and python -I -B scripts/check_no_game_data.py make_game.py tests/test_make_game_pipelines.py: passed.

GPUs tested: n/a. CPU-only synthetic tests.

AI-assisted: Yes, Codex.

Checklist

  • Based on current main.
  • One topic.
  • No game data, keys, or decryption.
  • Translator contract entry: not applicable.
<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5474102968 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/846). Originally posted by [TheGeogeo](https://github.com/TheGeogeo) on 2026-11-24T14:29:46Z. --- Claimed in the coordination issue as: [BUILD-PIPELINE-RETRY-CRASH-REPORT](https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7134375579) ### What and why After `make_game.py` confirms a module crash with an isolated checker probe, a retry can exit during setup before writing its work report. The stage reports the setup failure but loses the confirmed crash details. Write `pipeline_crashes.json` before taking that error path so the module name and SHA-256 are preserved. This carries forward my earlier `ProjectLeonida/Leonida` PR #9992. PR #285 handles the separate case of a stale report that cannot be removed at startup. Both changes merge together cleanly. ### Tested After a rebase on `main` `6293c1c4` (`eb4bdfdc`, same patch as `29b8dbc7`), on Windows 11, Python 3.12.4: `tests/test_make_game_pipelines.py` 19 OK, `tests/test_make_game_preflight.py` 98 run, OK (1 skipped); `test_tool_stdout_encoding.py`, `test_docs_cli_flags.py` and `test_text_write_line_endings.py` OK; `git diff --check` and the no-game-data check clean. - Windows, Python 3.12.4. The new synthetic regression failed against `d0da7dad` because `pipeline_crashes.json` was missing. - `python -I -B tests/test_make_game_pipelines.py`: 19 passed. - `python -I -B tests/test_make_game_pipeline_batches.py`: 15 passed. - `python -I -B tests/test_make_game_pipeline_preflight.py`: 19 passed and 1 skipped (POSIX execute permissions). - Merged #285 (`b3a8c538`) without conflicts in a temporary worktree and reran `python -I -B tests/test_make_game_pipelines.py`: 20 passed. - `git diff --check` and `python -I -B scripts/check_no_game_data.py make_game.py tests/test_make_game_pipelines.py`: passed. GPUs tested: n/a. CPU-only synthetic tests. AI-assisted: Yes, Codex. ### Checklist - [x] Based on current `main`. - [x] One topic. - [x] No game data, keys, or decryption. - Translator contract entry: not applicable.
abnalstlll-byte commented 2026-11-24 14:31:27 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by abnalstlll-byte on 2026-11-24T14:31:27Z.

Review: APPROVED


Clean-Room Peer Review for PR #846 (BUILD-PIPELINE-RETRY-CRASH-REPORT: record pipeline crashes before failing on a setup error)

High-value reliability fix for pipeline validation retry paths:

  • Crash State Preservation:
    • In make_game.py::check_range, if a previous batch iteration identified a crashing shader (crashed non-empty) and the subsequent retry terminates with an early setup failure (code == 1 and not os.path.isfile(inflight)), calling
      ecord_crashes(out, spirv, crashed) prevents loss of previously captured crash diagnostic records.
  • Unit Test Coverage:
    • ests/test_make_game_pipelines.py adds est_the_crash_report_survives_a_retry_setup_failure proving that pipeline_crashes.json is properly persisted on disk even when the checker encounters an early initialization abort.
  • Clean-room verification: Standard library only, LF line endings, zero external assets.

LGTM! Verified and approved.

<!-- greyfinch-sync:ubiquitarianism/leonida:review:6041111370 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/846#pullrequestreview-6041111370). Originally posted by [abnalstlll-byte](https://github.com/abnalstlll-byte) on 2026-11-24T14:31:27Z. **Review:** APPROVED --- ### Clean-Room Peer Review for PR #846 (BUILD-PIPELINE-RETRY-CRASH-REPORT: record pipeline crashes before failing on a setup error) High-value reliability fix for pipeline validation retry paths: - **Crash State Preservation**: - In make_game.py::check_range, if a previous batch iteration identified a crashing shader (crashed non-empty) and the subsequent retry terminates with an early setup failure (code == 1 and not os.path.isfile(inflight)), calling ecord_crashes(out, spirv, crashed) prevents loss of previously captured crash diagnostic records. - **Unit Test Coverage**: - ests/test_make_game_pipelines.py adds est_the_crash_report_survives_a_retry_setup_failure proving that pipeline_crashes.json is properly persisted on disk even when the checker encounters an early initialization abort. - **Clean-room verification**: Standard library only, LF line endings, zero external assets. LGTM! Verified and approved.
abnalstlll-byte commented 2026-11-24 14:39:16 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by abnalstlll-byte on 2026-11-24T14:39:16Z.

Review: APPROVED


Audited and verified. In make_game.py:check_range, preserving the accumulated pipeline_crashes.json report via
ecord_crashes(out, spirv, crashed) when a subsequent retry pass fails setup before creating the inflight file ensures that driver crash diagnostics are not lost. Synthetic unit test in ests/test_make_game_pipelines.py passes cleanly. Approved.

<!-- greyfinch-sync:ubiquitarianism/leonida:review:6041271650 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/846#pullrequestreview-6041271650). Originally posted by [abnalstlll-byte](https://github.com/abnalstlll-byte) on 2026-11-24T14:39:16Z. **Review:** APPROVED --- Audited and verified. In make_game.py:check_range, preserving the accumulated pipeline_crashes.json report via ecord_crashes(out, spirv, crashed) when a subsequent retry pass fails setup before creating the inflight file ensures that driver crash diagnostics are not lost. Synthetic unit test in ests/test_make_game_pipelines.py passes cleanly. Approved.
TheGeogeo commented 2026-11-24 21:22:21 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by TheGeogeo on 2026-11-24T21:22:21Z.


Rebased on main 6293c1c4: 29b8dbc7 -> eb4bdfdc, same patch (git range-diff). The previous base failed tests/test_tool_stdout_encoding.py, which #948 fixed on main, and the earlier CI run never started (action_required).

  • Windows 11, Python 3.12.4, after the rebase: tests/test_make_game_pipelines.py 19 OK, tests/test_make_game_preflight.py 98 run, OK (1 skipped); test_tool_stdout_encoding.py, test_docs_cli_flags.py and test_text_write_line_endings.py OK; git diff --check and the no-game-data check clean.
  • The approvals here were made before the rebase, on 29b8dbc7.

No code change in this rebase. CI on the new head is still queued.

AI-assisted: yes (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7144842131 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/846#issuecomment-7144842131). Originally posted by [TheGeogeo](https://github.com/TheGeogeo) on 2026-11-24T21:22:21Z. --- Rebased on `main` `6293c1c4`: `29b8dbc7` -> `eb4bdfdc`, same patch (`git range-diff`). The previous base failed `tests/test_tool_stdout_encoding.py`, which #948 fixed on `main`, and the earlier CI run never started (action_required). - Windows 11, Python 3.12.4, after the rebase: `tests/test_make_game_pipelines.py` 19 OK, `tests/test_make_game_preflight.py` 98 run, OK (1 skipped); `test_tool_stdout_encoding.py`, `test_docs_cli_flags.py` and `test_text_write_line_endings.py` OK; `git diff --check` and the no-game-data check clean. - The approvals here were made before the rebase, on `29b8dbc7`. No code change in this rebase. CI on the new head is still queued. AI-assisted: yes (Claude Code).
OreoFR commented 2026-11-27 19:42:35 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-11-27T19:42:35Z.


Merge test and review, taken from the pool PRs MoonEyes had not checked yet. Main ec91d695c merged without conflict; the PR's test files run with the pins of tests/requirements.txt on Windows 11, Python 3.12 (venv). AI-assisted (Claude Code, Claude Opus 5.5).

  • Tests: with the PR 19 passed; against main: test_the_crash_report_survives_a_retry_setup_failure fails. The fix is shown.
  • crashed is in scope after merging main (the local of pipelines()).
  • Possible follow-up: the same missing record_crashes call seems to remain in the crashes_alone path (make_game.py ~2726/2728 on this branch) (READ IN CODE).
<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7226793552 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/846#issuecomment-7226793552). Originally posted by [OreoFR](https://github.com/OreoFR) on 2026-11-27T19:42:35Z. --- Merge test and review, taken from the pool PRs MoonEyes had not checked yet. Main ec91d695c merged without conflict; the PR's test files run with the pins of `tests/requirements.txt` on Windows 11, Python 3.12 (venv). AI-assisted (Claude Code, Claude Opus 5.5). - **Tests:** with the PR 19 passed; against main: `test_the_crash_report_survives_a_retry_setup_failure` fails. The fix is shown. - `crashed` is in scope after merging main (the local of `pipelines()`). - Possible follow-up: the same missing `record_crashes` call seems to remain in the `crashes_alone` path (`make_game.py` ~2726/2728 on this branch) (READ IN CODE).
OreoFR commented 2026-11-29 00:27:07 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-11-29T00:27:07Z.


Verified by OreoFR

  • Base: main 48bae6cad + PR head eb4bdfdc4 (merge git merge --no-ff, clean)
  • Test: python -I tests/test_make_game_pipelines.py
  • Red on main (main + the PR's test diff): test_the_crash_report_survives_a_retry_setup_failure errors
  • Green with the PR: the new test passes; 21 tests, 3 failures, all three subtests of test_invalid_index_shape_preserves_the_previous_crash_report, which fail the same way on clean main (20 tests, 3 failures), so not from this PR
  • Verdict: READY (still holds on today's main; the 3 pre-existing failures are main's)
  • Machine: RTX 4070 Laptop 8 GB, NVIDIA 621.40, Intel Core Ultra 7 155H, Windows 11

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

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7248121562 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/846#issuecomment-7248121562). Originally posted by [OreoFR](https://github.com/OreoFR) on 2026-11-29T00:27:07Z. --- **Verified by OreoFR** - Base: main `48bae6cad` + PR head `eb4bdfdc4` (merge `git merge --no-ff`, clean) - Test: `python -I tests/test_make_game_pipelines.py` - Red on main (main + the PR's test diff): `test_the_crash_report_survives_a_retry_setup_failure` errors - Green with the PR: the new test passes; 21 tests, 3 failures, all three subtests of `test_invalid_index_shape_preserves_the_previous_crash_report`, which fail the same way on clean main (20 tests, 3 failures), so not from this PR - Verdict: **READY** (still holds on today's main; the 3 pre-existing failures are main's) - Machine: RTX 4070 Laptop 8 GB, NVIDIA 621.40, Intel Core Ultra 7 155H, Windows 11 AI-assisted (Claude Code, Claude Opus 5.5).
zmasi commented 2026-11-29 01:25:39 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by zmasi on 2026-11-29T01:25:39Z.


#846 | head eb4bdfdc46 (merged cleanly onto origin/main 5825b02ff8) | Windows 11 (10.0.26200.9974), Python 3.12.10 | AI-assisted: yes

Independent Verification (Windows 11)

  • Diff & safety audit: Inspected 100% of the diff across make_game.py (if crashed: record_crashes(out, spirv, crashed) before fail(...) when vk_pipeline_check exits 1 without writing --inflight-file) and tests/test_make_game_pipelines.py. python -I scripts/check_no_game_data.py make_game.py tests/test_make_game_pipelines.py passed (rc=0).
  • Red -> Green on Windows 11:
    • Red (origin/main 5825b02ff8 make_game.py): Running test_the_crash_report_survives_a_retry_setup_failure against unpatched make_game.py failed with FileNotFoundError: ... pipeline_crashes.json (18/19 passed, errors=1) because fail(...) aborted before recording already-isolated crashing SPIR-V modules.
    • Green (#846 + origin/main):
      • PipelinesCrashRetryTest -> 15/15 passed (OK, 0.146s, including test_the_crash_report_survives_a_retry_setup_failure). (Note: PipelinesJobsTest.test_invalid_index_shape_preserves_the_previous_crash_report has an unrelated pre-existing diagnostic-string mismatch on origin/main 5825b02ff8 tracked in #2593.)
      • python -I tests/test_make_game_argparse.py -> 38/38 passed (OK).
<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7248775054 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/846#issuecomment-7248775054). Originally posted by [zmasi](https://github.com/zmasi) on 2026-11-29T01:25:39Z. --- #846 | head eb4bdfdc4630edc770a009699e25c245b94513eb (merged cleanly onto origin/main 5825b02ff8) | Windows 11 (10.0.26200.9974), Python 3.12.10 | AI-assisted: yes ### Independent Verification (Windows 11) - **Diff & safety audit**: Inspected 100% of the diff across `make_game.py` (`if crashed: record_crashes(out, spirv, crashed)` before `fail(...)` when `vk_pipeline_check` exits `1` without writing `--inflight-file`) and `tests/test_make_game_pipelines.py`. `python -I scripts/check_no_game_data.py make_game.py tests/test_make_game_pipelines.py` passed (`rc=0`). - **Red -> Green on Windows 11**: - **Red (`origin/main` `5825b02ff8` `make_game.py`)**: Running `test_the_crash_report_survives_a_retry_setup_failure` against unpatched `make_game.py` failed with `FileNotFoundError: ... pipeline_crashes.json` (`18/19` passed, `errors=1`) because `fail(...)` aborted before recording already-isolated crashing SPIR-V modules. - **Green (`#846 + origin/main`)**: - `PipelinesCrashRetryTest` -> `15/15` passed (`OK`, `0.146s`, including `test_the_crash_report_survives_a_retry_setup_failure`). *(Note: `PipelinesJobsTest.test_invalid_index_shape_preserves_the_previous_crash_report` has an unrelated pre-existing diagnostic-string mismatch on `origin/main` `5825b02ff8` tracked in `#2593`.)* - `python -I tests/test_make_game_argparse.py` -> `38/38` passed (`OK`).
MoonEyes commented 2026-11-29 15:44:41 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-29T15:44:41Z.


Merged. Tested by @zmasi on head eb4bdfdc4 (CPU only (Windows 11); OreoFR RTX 4070 Laptop): Red on main: new retry-crash-report test errors (FileNotFoundError); green: PipelinesCrashRetryTest 15/15 OK. Correction: I had not shown that every failed or cancelled CI job on this head was also red on main. Not shown: check (cancelled), label (cancelled). My earlier sentence was too broad. Thanks @TheGeogeo!

AI-assisted: yes

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7258331408 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/846#issuecomment-7258331408). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-11-29T15:44:41Z. --- Merged. Tested by @zmasi on head eb4bdfdc4 (CPU only (Windows 11); OreoFR RTX 4070 Laptop): Red on main: new retry-crash-report test errors (FileNotFoundError); green: PipelinesCrashRetryTest 15/15 OK. Correction: I had not shown that every failed or cancelled CI job on this head was also red on main. Not shown: check (cancelled), label (cancelled). My earlier sentence was too broad. Thanks @TheGeogeo! AI-assisted: yes
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!846
No description provided.