make_game: keep checking pipelines when the previous crash report is locked (OLD-10015) #1337

Closed
github-bot wants to merge 1 commit from gh-pr/1337/head into gh-pr/1337/base
Owner

@⁠ambroseautomation on GitHub · 2026-11-24 21:59 UTC · original
ambroseautomation:carry/old-10015-pipelines-locked-crash-report → main · +39 −8 · 2 files · 1 commits · closed without merging

Summary

Coordination item: OLD-10015 (carry-forward of old-pr/10015, preserving original author AGInformatique81).

Problem & Root Cause

When make_game.py removes a previous pipeline crash report before or after running vk_pipeline_check, Windows can raise PermissionError (OSError) if the report file is still open/locked (e.g., by an editor, antivirus, or log viewer), aborting the pipelines stage unnecessarily.

Implementation

  • Handles OSError when removing the previous crash report in make_game.py so the pipelines stage continues checking pipelines instead of crashing when the file is locked.
  • Adds regression tests in tests/test_make_game_pipelines.py.

Tests Run

Environment: Windows 11 Pro 64-bit, Python 3.12.10, synthetic fixtures only (no game data).

  • python -I -m py_compile make_game.py tests/test_make_game_pipelines.py — PASS
  • pytest tests/test_make_game_pipelines.py -v — 19/19 PASS (including test_a_locked_old_crash_report_does_not_prevent_a_clean_check)
  • python -I scripts/check_no_game_data.py make_game.py tests/test_make_game_pipelines.py — PASS

Disclosure

AI-assisted: yes (carry-forward, rebase onto current main, and local verification; original implementation by AGInformatique81).

**@⁠ambroseautomation** on GitHub · 2026-11-24 21:59 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1337) `ambroseautomation:carry/old-10015-pipelines-locked-crash-report` → `main` · +39 −8 · 2 files · 1 commits · closed without merging ## Summary Coordination item: `OLD-10015` (carry-forward of `old-pr/10015`, preserving original author `AGInformatique81`). ### Problem & Root Cause When `make_game.py` removes a previous pipeline crash report before or after running `vk_pipeline_check`, Windows can raise `PermissionError` (`OSError`) if the report file is still open/locked (e.g., by an editor, antivirus, or log viewer), aborting the pipelines stage unnecessarily. ### Implementation - Handles `OSError` when removing the previous crash report in `make_game.py` so the pipelines stage continues checking pipelines instead of crashing when the file is locked. - Adds regression tests in `tests/test_make_game_pipelines.py`. ## Tests Run Environment: Windows 11 Pro 64-bit, Python 3.12.10, synthetic fixtures only (no game data). - `python -I -m py_compile make_game.py tests/test_make_game_pipelines.py` — PASS - `pytest tests/test_make_game_pipelines.py -v` — 19/19 PASS (including `test_a_locked_old_crash_report_does_not_prevent_a_clean_check`) - `python -I scripts/check_no_game_data.py make_game.py tests/test_make_game_pipelines.py` — PASS ## Disclosure AI-assisted: yes (carry-forward, rebase onto current `main`, and local verification; original implementation by AGInformatique81).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:47:53 +00:00
github-bot closed this pull request 2026-11-26 09:47:53 +00:00
Author
Owner

@⁠whoalin1 on GitHub · 2026-11-24 23:41 UTC · original

Verified on Windows host (AI-assisted review).

  • python -I tests/test_make_game_pipelines.py: 19 tests OK, including the new test_a_locked_old_crash_report_does_not_prevent_a_clean_check which simulates PermissionError on os.remove of pipeline_crashes.json.
  • compileall clean on make_game.py and the test file.
  • Logic check: dropping only inflight+skip up front and wrapping report removal in try/OSError is correct; record_crashes now returns bool so the fail() diagnostic only mentions pipeline_crashes.json when the write actually succeeded. The locked-file path leaves the stale report in place and logs a warning, which matches the stated intent.

DUPLICATE NOTE: this PR's tree is byte-identical to #1319 (same diff, same resulting tree — verified with git diff between the two head commits: 0 lines). Only one should be merged; the other closed as duplicate.

**@⁠whoalin1** on GitHub · 2026-11-24 23:41 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1337#issuecomment-7147691630) Verified on Windows host (AI-assisted review). - `python -I tests/test_make_game_pipelines.py`: 19 tests OK, including the new `test_a_locked_old_crash_report_does_not_prevent_a_clean_check` which simulates PermissionError on os.remove of pipeline_crashes.json. - `compileall` clean on make_game.py and the test file. - Logic check: dropping only inflight+skip up front and wrapping report removal in try/OSError is correct; record_crashes now returns bool so the fail() diagnostic only mentions pipeline_crashes.json when the write actually succeeded. The locked-file path leaves the stale report in place and logs a warning, which matches the stated intent. DUPLICATE NOTE: this PR's tree is byte-identical to #1319 (same diff, same resulting tree — verified with git diff between the two head commits: 0 lines). Only one should be merged; the other closed as duplicate.
Author
Owner

@⁠ambroseautomation on GitHub · 2026-11-25 12:47 UTC · original

Closing as a duplicate of earlier PR #1319 (opened 2026-11-24T21:50:28Z). Thanks @⁠MoonEyes for catching the overlap.

**@⁠ambroseautomation** on GitHub · 2026-11-25 12:47 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1337#issuecomment-7162853089) Closing as a duplicate of earlier PR #1319 (opened 2026-11-24T21:50:28Z). Thanks @⁠MoonEyes for catching the overlap.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.