make_game: scope interrupted shader-shard reuse to translator inputs #452

Closed
EdenBendheim wants to merge 1 commit from upstream-pr/452 into main
EdenBendheim commented 2026-11-24 05:40:12 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by EdenBendheim on 2026-11-24T05:40:12Z.


Claim: https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7123162857

What changed

  • make_game.py: Use translation_sources_digest() (the explicit translator dependency list already used for completed translations) instead of hashing all top-level tools/ files when checking interrupted shader-shard plans on resume. Unrelated tools/ additions or edits now preserve completed shards; translator module or gfx10_formats.json edits still invalidate them, and legacy shard plans rebuild cleanly once.
  • tests/test_make_game_resume.py: Covers shard reuse after unrelated tool edits, invalidation on translator/format-table edits, and one-time recovery from a legacy plan (with LF writes pinned).

Testing & Disclosure

  • AI-assisted: Implemented with Codex (gpt-6.2-sol) and reviewed with Codex (gpt-6.2-astra).
  • Environment: macOS 27.3, Apple M1 Max (CPU-only, synthetic fixtures, zero game data).
  • Verified on ubiquitarianism/leonida main (8f481cf16): test_make_game_resume.py full suite (16/16), test_make_game_dry_run.py (24/24), check_no_game_data.py, LF check — all passed.
<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5466779862 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/452). Originally posted by [EdenBendheim](https://github.com/EdenBendheim) on 2026-11-24T05:40:12Z. --- Claim: https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7123162857 ### What changed - **`make_game.py`**: Use `translation_sources_digest()` (the explicit translator dependency list already used for completed translations) instead of hashing all top-level `tools/` files when checking interrupted shader-shard plans on resume. Unrelated `tools/` additions or edits now preserve completed shards; translator module or `gfx10_formats.json` edits still invalidate them, and legacy shard plans rebuild cleanly once. - **`tests/test_make_game_resume.py`**: Covers shard reuse after unrelated tool edits, invalidation on translator/format-table edits, and one-time recovery from a legacy plan (with LF writes pinned). ### Testing & Disclosure - **AI-assisted:** Implemented with Codex (`gpt-6.2-sol`) and reviewed with Codex (`gpt-6.2-astra`). - **Environment:** macOS 27.3, Apple M1 Max (CPU-only, synthetic fixtures, zero game data). - **Verified on `ubiquitarianism/leonida` `main` (`8f481cf16`):** `test_make_game_resume.py` full suite (16/16), `test_make_game_dry_run.py` (24/24), `check_no_game_data.py`, LF check — all passed.
PierreEbele commented 2026-11-24 21:02:50 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by PierreEbele on 2026-11-24T21:02:50Z.


Reviewed 805d47615: the interrupted-shard plan now fingerprints
TRANSLATION_SOURCES instead of every file in tools/. Ran tests/test_make_game_resume.py on the
PR tree (16/16) and against main (the PR's copy fails there in exactly the 4 cases this changes),
plus the interrupt/translator-flags/cleanup/empty-translation/stage-resume/merge/cmake-deps
suites on the PR tree and on a simulated merge with current main — all pass. Also probed a real
rdna2spirv.py --shard run with a Python audit hook on both trees: it opens only
TRANSLATION_SOURCES files (0 misses, incl. gfx10_formats.json and the in-process assembler), so
the narrower fingerprint cannot reuse stale shards across a translator edit. AI-assisted review.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7144403725 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/452#issuecomment-7144403725). Originally posted by [PierreEbele](https://github.com/PierreEbele) on 2026-11-24T21:02:50Z. --- Reviewed 805d47615: the interrupted-shard plan now fingerprints TRANSLATION_SOURCES instead of every file in tools/. Ran tests/test_make_game_resume.py on the PR tree (16/16) and against main (the PR's copy fails there in exactly the 4 cases this changes), plus the interrupt/translator-flags/cleanup/empty-translation/stage-resume/merge/cmake-deps suites on the PR tree and on a simulated merge with current main — all pass. Also probed a real rdna2spirv.py --shard run with a Python audit hook on both trees: it opens only TRANSLATION_SOURCES files (0 misses, incl. gfx10_formats.json and the in-process assembler), so the narrower fingerprint cannot reuse stale shards across a translator edit. AI-assisted review.
MoonEyes commented 2026-11-28 17:59:14 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-28T17:59:14Z.


Hi @EdenBendheim, thanks for this pull request. It currently conflicts with main (conflicting file(s): make_game.py), so it carries the needs rebase label. CONTRIBUTING.md asks authors to rebase their branch on main; once it merges cleanly the label goes within the hour, and reviews start with the pull requests that do. Could you update the branch when you have a moment? If you no longer plan to continue with it, please say so here.

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

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7243440305 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/452#issuecomment-7243440305). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-11-28T17:59:14Z. --- Hi @EdenBendheim, thanks for this pull request. It currently conflicts with `main` (conflicting file(s): `make_game.py`), so it carries the `needs rebase` label. CONTRIBUTING.md asks authors to rebase their branch on `main`; once it merges cleanly the label goes within the hour, and reviews start with the pull requests that do. Could you update the branch when you have a moment? If you no longer plan to continue with it, please say so here. AI-assisted (Claude Code, Claude Opus 5.5).
aslan2142 commented 2026-12-01 11:51:43 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-12-01T11:51:43Z.

Review: CHANGES_REQUESTED


Reviewed against current main: scoping interrupted shader-shard reuse to TRANSLATION_SOURCES in make_game.py looks good, but this branch currently conflicts with main in make_game.py. Please rebase onto current main so CI runs cleanly.

(AI-assisted review.)

<!-- greyfinch-sync:ubiquitarianism/leonida:review:6130689500 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/452#pullrequestreview-6130689500). Originally posted by [aslan2142](https://github.com/aslan2142) on 2026-12-01T11:51:43Z. **Review:** CHANGES_REQUESTED --- Reviewed against current `main`: scoping interrupted shader-shard reuse to `TRANSLATION_SOURCES` in `make_game.py` looks good, but this branch currently conflicts with `main` in `make_game.py`. Please rebase onto current `main` so CI runs cleanly. *(AI-assisted review.)*
aslan2142 commented 2026-12-01 17:20:48 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-12-01T17:20:48Z.


Closing this PR because the legacy C++ Vulkan runtime (and legacy Python shader compiler) is now considered deprecated in favor of the new Rust Vulkan runtime (in progress) and the Rust DX12 runtime (d3d12/) available now. Thank you for the contribution! If you believe this PR was closed by mistake (for example, if it still applies to active tools, d3d12/, or general docs), please feel free to reopen it.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7319152071 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/452#issuecomment-7319152071). Originally posted by [aslan2142](https://github.com/aslan2142) on 2026-12-01T17:20:48Z. --- Closing this PR because the legacy C++ Vulkan runtime (and legacy Python shader compiler) is now considered deprecated in favor of the new Rust Vulkan runtime (in progress) and the Rust DX12 runtime (`d3d12/`) available now. Thank you for the contribution! If you believe this PR was closed by mistake (for example, if it still applies to active tools, `d3d12/`, or general docs), please feel free to reopen it.

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!452
No description provided.