fix(build): translated files the PC changed are found, named and compiled again #2305

Merged
HumanBean merged 3 commits from pepe999/Longshot:fix/damaged-translation into main 2026-11-23 15:55:10 +00:00
Contributor

Summary

Players' builds stop in Compile on one-character typos in the generated C, in other files at each build: uint65_t (#1414), _src[4]$_dst[4] (#985), an undeclared x, then _p1 (#1762), and #990 and #1441 look the same. A bit changed by the PC's memory or processor, as the answers in #985 found; but all the player gets is the compiler's error, which reads like a Longshot bug, and building again gives another one.

The translation is the same each time for the same inputs, byte for byte. So when every final compile failure is in a translated file and has a compiler error at a source location, make_game.py now translates the game again and compares:

  • Files came out different: the PC changed them. The build names them, says what to check, and compiles the new translation in the same build, once. A changed file that compiled all the same is found with them, and compiled again too.
  • Refused again: if every final compile failure is in a translated file and has a compiler error at a source location, the build stops with "this PC's memory, its processor or the drive ... changes what the build writes" instead of a compiler's error. Otherwise it stops with the build error.
  • They came out the same: the build stops with the compiler's error, as on main.

It isn't done for a compiler that ran out of memory, for a source of the repository, or when the lift key is no longer the one this build translated with (a translator edited since).

What it doesn't do: it can't repair a PC; it can't see a changed byte in a build where everything compiles; with LONGSHOT_LIFT_STORE (development) the translation it compares with is the stored one.

Seen on main: change a uint64_t inside a code_*.c to uint65_t after the lift; the build stops with the compiler's error. Read first: changed_lift, refused_lift and lift_changed in nx2/make_game.py; run() gains again.

See #1762. #2300 finds zero bytes before the compile and touches other lines of the same file; neither needs the other.

Testing

Tested: Linux, no game run and no shaders prepared (this is the build; what the game runs is unchanged). make_game.py whole, on the real game, with its own lift, clang and link, two files changed on purpose after the translation (a uint65_t, and an x[8] to x[9] that compiles):

  • changed once: refused, translated again, "2 of 92 files (code_020.c, code_040.c)", compiled again, linked, finished. Of the lifted files only those two compiled again;
  • changed after both translations: stops with the new message, and the next build translates again.

The real translation made twice in one work folder (lift.py and split_hot.py): 95 of 95 files the same.

tests/test_damaged_translation.py (game-free: the compile step cut from main(), the real run(), a stand-in build.py) fails 7 of its 10 cases on main (3 are behaviour that stays) and passes here; eleven broken versions of the fix each fail it. test_failed_compile_keeps_objects.py reads the changed call, and its text follows it.

tests/run_all.py --strict, what mise run test runs, in a container as ci.yml sets its job up (Ubuntu 24.04, clang 18.1.3, g++ 13.3, glslang 16.6.0, spirv-val, .NET 8; no network): 938 passed, 2 failed, 18 skipped. The 2 fail on main too (test_dev_packs, test_pipeline_state_computes; #2311 is for them).

On this PC, tests/run_all.py, not --strict: 887 passed, 9 failed, 62 skipped. The 9 fail on main too: nx2/test_mesh_first_types, test_audio_source, test_builtin_compute_unoptimized, test_dev_packs, test_image_view_retry, test_link_skip, test_mise_build, test_pipeline_state_computes, test_thinlto_tls.

Still to test:

  • Windows, a launcher build: a normal build from this PR compiles and links as before, with no line about memory (by hand, or any nightly after merge)
  • Windows: the translation made twice from the same inputs gives the same files, as on Linux (by hand)

Measurements

Verdict: a build that works does nothing more; one the PC damaged finishes, for a second translation and the changed files' compile.

Setup: Linux, 28 threads, the real game, the times the runs above printed; the PC was not reserved for timing.

Before: main @ 753fb5af After: this PR @ 1f7bd765
A build that works nothing to add nothing to add
Files changed once (by the test) stops in the compile (423 s in) finishes: +76 s translating, +51 s compiling
Comparing the files not made 0.7-0.8 s each time, only after a refused compile

The 51 s are 165 of 592 files: the two changed, and host and renderer files a failed compile leaves to be compiled again, as on main. The game's frame rate and memory can't change: nothing the game runs does.

Risks

A lifter change that writes C the compiler refuses pays one more translation before the error, unless the lift store has it. Were the translation ever different from the same inputs (on another OS or Python), a refused compile would be blamed on the PC: only then, and the compiler's error is still printed above. A revert is enough. Players notice nothing unless a build is refused.

Checklist

Ready for review

  • One topic, on current main; the title is a Conventional Commit.
  • Tested on my own PC, in the game for a change the game runs, as Testing says. (Not run in the game: the change is in the build, not the game; opened with --force at the request of the person I work for. The whole build ran, see Testing.)
  • mise run test passes (any failure that also fails on main is named).
  • Measured against main, or Measurements says why there is nothing to measure.
  • No game files, build output or hand-edited generated files; third_party/ untouched; nothing GPL-incompatible.

When it applies

  • A fix: a game-free test that fails on main and passes here.
  • A check under tests/ that reads changed source is updated, not weakened.
  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.

Ready to merge

  • Everything in Still to test has run, its results in Tested.
  • Tier 1 hardware it can affect is tested (docs/dev/standards.md, "Hardware tiers").
  • Approved in review, every comment answered.
  • CI passes on the head; on current main, measured again or a comment says why the numbers still hold.

🤖 Generated with Claude Code

## Summary Players' builds stop in Compile on one-character typos in the generated C, in other files at each build: `uint65_t` (#1414), `_src[4]$_dst[4]` (#985), an undeclared `x`, then `_p1` (#1762), and #990 and #1441 look the same. A bit changed by the PC's memory or processor, as the answers in #985 found; but all the player gets is the compiler's error, which reads like a Longshot bug, and building again gives another one. The translation is the same each time for the same inputs, byte for byte. So when every final compile failure is in a translated file and has a compiler error at a source location, `make_game.py` now translates the game again and compares: - **Files came out different:** the PC changed them. The build names them, says what to check, and compiles the new translation in the same build, once. A changed file that compiled all the same is found with them, and compiled again too. - **Refused again:** if every final compile failure is in a translated file and has a compiler error at a source location, the build stops with "this PC's memory, its processor or the drive ... changes what the build writes" instead of a compiler's error. Otherwise it stops with the build error. - **They came out the same:** the build stops with the compiler's error, as on `main`. It isn't done for a compiler that ran out of memory, for a source of the repository, or when the lift key is no longer the one this build translated with (a translator edited since). What it doesn't do: it can't repair a PC; it can't see a changed byte in a build where everything compiles; with `LONGSHOT_LIFT_STORE` (development) the translation it compares with is the stored one. Seen on `main`: change a `uint64_t` inside a `code_*.c` to `uint65_t` after the lift; the build stops with the compiler's error. Read first: `changed_lift`, `refused_lift` and `lift_changed` in `nx2/make_game.py`; `run()` gains `again`. See #1762. #2300 finds zero bytes before the compile and touches other lines of the same file; neither needs the other. ## Testing **Tested:** Linux, no game run and no shaders prepared (this is the build; what the game runs is unchanged). `make_game.py` whole, on the real game, with its own lift, clang and link, two files changed on purpose after the translation (a `uint65_t`, and an `x[8]` to `x[9]` that compiles): - changed once: refused, translated again, "2 of 92 files (code_020.c, code_040.c)", compiled again, linked, finished. Of the lifted files only those two compiled again; - changed after both translations: stops with the new message, and the next build translates again. The real translation made twice in one work folder (`lift.py` and `split_hot.py`): 95 of 95 files the same. `tests/test_damaged_translation.py` (game-free: the compile step cut from `main()`, the real `run()`, a stand-in `build.py`) fails 7 of its 10 cases on `main` (3 are behaviour that stays) and passes here; eleven broken versions of the fix each fail it. `test_failed_compile_keeps_objects.py` reads the changed call, and its text follows it. `tests/run_all.py --strict`, what `mise run test` runs, in a container as `ci.yml` sets its job up (Ubuntu 24.04, clang 18.1.3, g++ 13.3, glslang 16.6.0, spirv-val, .NET 8; no network): 938 passed, 2 failed, 18 skipped. The 2 fail on `main` too (test_dev_packs, test_pipeline_state_computes; #2311 is for them). On this PC, `tests/run_all.py`, not `--strict`: 887 passed, 9 failed, 62 skipped. The 9 fail on `main` too: nx2/test_mesh_first_types, test_audio_source, test_builtin_compute_unoptimized, test_dev_packs, test_image_view_retry, test_link_skip, test_mise_build, test_pipeline_state_computes, test_thinlto_tls. **Still to test:** - Windows, a launcher build: a normal build from this PR compiles and links as before, with no line about memory (by hand, or any nightly after merge) - Windows: the translation made twice from the same inputs gives the same files, as on Linux (by hand) ## Measurements **Verdict:** a build that works does nothing more; one the PC damaged finishes, for a second translation and the changed files' compile. Setup: Linux, 28 threads, the real game, the times the runs above printed; the PC was not reserved for timing. | | Before: main @ 753fb5af | After: this PR @ 1f7bd765 | |---|---|---| | A build that works | nothing to add | nothing to add | | Files changed once (by the test) | stops in the compile (423 s in) | finishes: +76 s translating, +51 s compiling | | Comparing the files | not made | 0.7-0.8 s each time, only after a refused compile | The 51 s are 165 of 592 files: the two changed, and host and renderer files a failed compile leaves to be compiled again, as on `main`. The game's frame rate and memory can't change: nothing the game runs does. ## Risks A lifter change that writes C the compiler refuses pays one more translation before the error, unless the lift store has it. Were the translation ever different from the same inputs (on another OS or Python), a refused compile would be blamed on the PC: only then, and the compiler's error is still printed above. A revert is enough. Players notice nothing unless a build is refused. ## Checklist ### Ready for review - [x] One topic, on current `main`; the title is a Conventional Commit. - [ ] Tested on my own PC, in the game for a change the game runs, as Testing says. (Not run in the game: the change is in the build, not the game; opened with --force at the request of the person I work for. The whole build ran, see Testing.) - [x] `mise run test` passes (any failure that also fails on `main` is named). - [x] Measured against `main`, or Measurements says why there is nothing to measure. - [x] No game files, build output or hand-edited generated files; `third_party/` untouched; nothing GPL-incompatible. ### When it applies - [x] A fix: a game-free test that fails on `main` and passes here. - [x] A check under `tests/` that reads changed source is updated, not weakened. - [x] AI assistance recorded with `Assisted-by:` / `Co-Authored-By:` trailers. ### Ready to merge - [ ] Everything in Still to test has run, its results in Tested. - [ ] Tier 1 hardware it can affect is tested (docs/dev/standards.md, "Hardware tiers"). - [ ] Approved in review, every comment answered. - [ ] CI passes on the head; on current `main`, measured again or a comment says why the numbers still hold. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Fails on main: a compile that refuses translated files stops the build with
the compiler's error whatever the cause, so a player whose memory flips bits
in the generated C ("uint65_t") gets what reads like a Longshot bug.

Assisted-by: Claude Code
Co-Authored-By: Claude Opus 5.5 <[email protected]>
fix(build): translated files the PC changed are found, named and compiled again
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
PR description / Description follows the template (pull_request_target) Successful in 4s
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Workflow lint (actionlint) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
Guide screenshots / Guide images and local UI source review (pull_request) Has been cancelled
Third-party parts / As their notes say (pull_request) Has been cancelled
Third-party parts / The same as upstream (pull_request) Has been cancelled
1f7bd76554
Players' builds stop on one-character typos in the generated C, in other
files at each build (issues 985, 990, 1414, 1441, 1762): a bit changed by
the PC's memory or processor, not something the translator writes. When the
compiler refuses translated files, the game is now translated again and
compared: the same inputs give the same files, byte for byte. Files that came
out different are named with what to check, and compiled again in the same
build, once; refused again, the build stops saying so. Files that came out
the same stop it with the compiler's error, as before. A build that works
pays nothing.

Assisted-by: Claude Code
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Author
Contributor

tests/run_all.py --strict ran in a container set up as ci.yml's job: 938 passed, 2 failed, 18 skipped; the 2 fail on main too (937, 2, 18) and #2311 is for them.

`tests/run_all.py --strict` ran in a container set up as `ci.yml`'s job: 938 passed, 2 failed, 18 skipped; the 2 fail on `main` too (937, 2, 18) and #2311 is for them.
Owner
@review
BeanBot left a comment

Recommendation: Approve. The Linux build demonstrates recovery from deliberately damaged translated files, but the recovery path and its byte-for-byte comparison still need a Windows run before merge. A minor error-classification issue can also send an out-of-memory failure through the recovery path. Nothing blocking is left: what remains is for the author before merging (below). Recommend approval; not approved on the forge.

After a compiler rejects translated files, the build translates them again, identifies changed files and retries compilation once. This can complete a build that previously stopped, at the cost of another translation and compile attempt after an eligible failure.

Should fix (1): not blocking, but worth doing before merging.

  • L1 nx2/make_game.py:3400: Compiler errors from the initial parallel attempts are retained even when those files succeed on their standalone retry, so they can classify a different final failure as a source error. (more on the line) Do: Associate diagnostics with the final FAILED attempts and only classify the final failures using their own diagnostics.

Testing before merging (1) (runs on the systems it can change; it doesn't hold the recommendation)

  • L2 nx2/make_game.py:3418: The Windows build and recovery path has not been exercised. (more on the line) Do: Run a Windows launcher build with a deliberately damaged translated file and a second unchanged translation; verify recovery, linking and byte-for-byte determinism.

@fix can do L1.

Checks: Still running: 9 checks.

More: does it help, other systems, switches, what was read

Does it help: Yes on the tested Linux case: the author reports that main stopped 423 seconds into compilation, while this PR recovered and linked after another 76 seconds translating and 51 seconds compiling. The game-free test also reportedly fails on main and passes here. Windows recovery and determinism remain untested.

Other systems: The change affects build recovery on Windows and Linux, including cached translations and object reuse; it does not change game runtime code. Linux was exercised with the real game. Windows has not yet been exercised, and the development lift store substitutes its stored translation for a fresh one.

Switches: None added, changed or removed.

Reviewed: 1f7bd76554 against 753fb5af68: Read the repository rules, pull request template, standards, commits, complete diffs and both changed test files. Read the changed portions and surrounding translation, compile, cache and cleanup paths in nx2/make_game.py, and relevant portions of nx2/build.py and nx2/lift_store.py; the rest of the large make_game.py file was skimmed. docs/review-checklist.md and ../Tooling/AGENTS.md were not present. The supplied CI results and author’s recorded runs were reviewed; no generated files or translations changed.; nothing run (a code review).

Checked and fine:

  • Both commits record AI assistance in their trailers.
  • The changed files contain no apparent game-derived output or generated files.
  • The retry is limited to one additional compile, and the failed-build cleanup remains reachable.
  • No renderer API, shader, third-party code or switch table changed.

Testing: Read-only review; no project code, scripts or tests were run. The supplied CI checks are still running.

Overlaps and merge order: The description identifies #2300 as touching nearby code but says neither change depends on the other; no independent overlap check was available.


Automated code review by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.

**Recommendation: Approve.** The Linux build demonstrates recovery from deliberately damaged translated files, but the recovery path and its byte-for-byte comparison still need a Windows run before merge. A minor error-classification issue can also send an out-of-memory failure through the recovery path. Nothing blocking is left: what remains is for the author before merging (below). Recommend approval; not approved on the forge. After a compiler rejects translated files, the build translates them again, identifies changed files and retries compilation once. This can complete a build that previously stopped, at the cost of another translation and compile attempt after an eligible failure. **Should fix (1)**: not blocking, but worth doing before merging. - **L1** `nx2/make_game.py:3400`: Compiler errors from the initial parallel attempts are retained even when those files succeed on their standalone retry, so they can classify a different final failure as a source error. (more on the line) **Do:** Associate diagnostics with the final FAILED attempts and only classify the final failures using their own diagnostics. **Testing before merging (1)** (runs on the systems it can change; it doesn't hold the recommendation) - **L2** `nx2/make_game.py:3418`: The Windows build and recovery path has not been exercised. (more on the line) **Do:** Run a Windows launcher build with a deliberately damaged translated file and a second unchanged translation; verify recovery, linking and byte-for-byte determinism. `@fix` can do L1. **Checks:** Still running: 9 checks. <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Yes on the tested Linux case: the author reports that main stopped 423 seconds into compilation, while this PR recovered and linked after another 76 seconds translating and 51 seconds compiling. The game-free test also reportedly fails on main and passes here. Windows recovery and determinism remain untested. **Other systems:** The change affects build recovery on Windows and Linux, including cached translations and object reuse; it does not change game runtime code. Linux was exercised with the real game. Windows has not yet been exercised, and the development lift store substitutes its stored translation for a fresh one. **Switches:** None added, changed or removed. **Reviewed:** 1f7bd76554b8 against 753fb5af6860: Read the repository rules, pull request template, standards, commits, complete diffs and both changed test files. Read the changed portions and surrounding translation, compile, cache and cleanup paths in nx2/make_game.py, and relevant portions of nx2/build.py and nx2/lift_store.py; the rest of the large make_game.py file was skimmed. docs/review-checklist.md and ../Tooling/AGENTS.md were not present. The supplied CI results and author’s recorded runs were reviewed; no generated files or translations changed.; nothing run (a code review). **Checked and fine:** - Both commits record AI assistance in their trailers. - The changed files contain no apparent game-derived output or generated files. - The retry is limited to one additional compile, and the failed-build cleanup remains reachable. - No renderer API, shader, third-party code or switch table changed. **Testing:** Read-only review; no project code, scripts or tests were run. The supplied CI checks are still running. **Overlaps and merge order:** The description identifies #2300 as touching nearby code but says neither change depends on the other; no independent overlap check was available. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.</sub>
@ -3362,2 +3397,4 @@
def compile_line(line):
if COMPILE_ERROR.match(line):
errors.append(line)
if re.match(r"compiled in \d+s, 0 failed$", line):
Member

L1 (should fix): Compiler errors from the initial parallel attempts are retained even when those files succeed on their standalone retry, so they can classify a different final failure as a source error.

When: If one parallel compile emits a source error but succeeds alone, while a lifted file ultimately fails alone because its compiler is killed for lack of memory, errors remains nonempty and failed contains only the lifted file. refused_lift then starts another translation and may blame the PC's hardware instead of preserving the memory failure.

Do: Associate diagnostics with the final FAILED attempts and only classify the final failures using their own diagnostics.

**L1** (should fix): Compiler errors from the initial parallel attempts are retained even when those files succeed on their standalone retry, so they can classify a different final failure as a source error. *When:* If one parallel compile emits a source error but succeeds alone, while a lifted file ultimately fails alone because its compiler is killed for lack of memory, errors remains nonempty and failed contains only the lifted file. refused_lift then starts another translation and may blame the PC's hardware instead of preserving the memory failure. **Do:** Associate diagnostics with the final FAILED attempts and only classify the final failures using their own diagnostics.
nx2/make_game.py Outdated
@ -3371,0 +3415,4 @@
# (a compile that refuses translated files: they are made again, and compiled again when they come out different, changed_lift.
# The lift key as it was: another translator, edited since, or other settings make other files, and no PC is at fault then)
def lift_changed():
if not refused_lift(gen_dir, failed, errors) or lift_key(exefs, work, env) != key:
Member

L2 (should fix): The Windows build and recovery path has not been exercised.

When: On Windows, the recovery relies on a second translation producing identical bytes for unchanged inputs and on the launcher accepting the retry and final result. The supplied runs establish this only on Linux.

Do: Run a Windows launcher build with a deliberately damaged translated file and a second unchanged translation; verify recovery, linking and byte-for-byte determinism.

**L2** (should fix): The Windows build and recovery path has not been exercised. *When:* On Windows, the recovery relies on a second translation producing identical bytes for unchanged inputs and on the launcher accepting the retry and final result. The supplied runs establish this only on Linux. **Do:** Run a Windows launcher build with a deliberately damaged translated file and a second unchanged translation; verify recovery, linking and byte-for-byte determinism.
Owner
@fix
BeanBot force-pushed fix/damaged-translation from 1f7bd76554
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
PR description / Description follows the template (pull_request_target) Successful in 4s
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Workflow lint (actionlint) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
Guide screenshots / Guide images and local UI source review (pull_request) Has been cancelled
Third-party parts / As their notes say (pull_request) Has been cancelled
Third-party parts / The same as upstream (pull_request) Has been cancelled
to f7728748be
Some checks failed
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been skipped
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been skipped
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
Website / Website on Cloudflare (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 10s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 15s
CI / Workflow lint (actionlint) (pull_request) Successful in 16s
Third-party parts / As their notes say (pull_request) Successful in 18s
CI / Website build and checks (pull_request) Successful in 4m59s
PR description / Description follows the template (pull_request_target) Failing after 7s
2026-11-23 00:44:40 +00:00
Compare
BeanBot left a comment

Recommendation: Approve. The code is ready: only testing is left. The reported Linux build recovered from deliberately damaged translated files, but the Windows launcher build and recovery path remain untested. The fix preserves the retry while restricting it to final failures with source diagnostics. Recommend approval; not approved on the forge.

What @fix changed
I changed this pull request: the new head is f7728748be. I rebased it onto main (f6913dd55f). I edited its description to match the change.

Changed

  • Final compile diagnostics in nx2/make_game.py:3394: Track diagnostics for each standalone failure and require every final failure to have a source error before retrying the translation. Added regression cases in tests/test_damaged_translation.py:188. Tests were not run, as requested.

Nothing was built or run: the checks run again on the new head.

The build compares translated files after a qualifying compile failure and retries changed files once, helping players distinguish damaged output from a reproducible compiler error. Recovery costs another translation and recompilation.

Testing before merging (1) (runs on the systems it can change; it doesn't hold the recommendation)

  • L2 nx2/make_game.py:3418: The Windows build and recovery path has not been exercised. When: On Windows, the recovery relies on a second translation producing identical bytes for unchanged inputs and on the launcher accepting the retry and final result. The supplied runs establish this only on Linux. Do: Run a Windows launcher build with a deliberately damaged translated file and a second unchanged translation; verify recovery, linking and byte-for-byte determinism.

Checks: they run again on this head; a failure shows on the pull request.

Also noticed (1; not asked for, not blocking)
  • The supplied base diff includes unrelated renderer, tooling, documentation, and test changes.
More: does it help, other systems, switches, what was read

Does it help: Yes on the reported Linux case: main stopped during compilation, while the changed build finished after a 76-second translation and 51-second compile. Windows recovery remains unproven.

Other systems: The change affects Linux and Windows build workflows, including launcher builds and the development lift store. Linux recovery was reported; Windows build, recovery, and translation determinism have not been reported.

Switches: No switches were changed by BeanBot's fix. The supplied base diff also adds RX_VK_DLSS_FAIL_CREATE, default off, and changes RX_VK_RECORDER Auto's recorder threshold from six to four physical cores; those unrelated changes were not reviewed in depth.

Reviewed: f7728748be against f6913dd55f: Read AGENTS.md, CONTRIBUTING.md, the pull request template, the two changed build tests, the fix diff, and the changed make_game.py paths with build.py's compile-result output. Skimmed standards and the remaining make_game.py and base-diff changes; the full base diff includes unrelated merged commits. Tooling's AGENTS.md and docs/review-checklist.md were unavailable.; nothing run (a code review).

Checked and fine:

  • Final failure diagnostics are tracked separately and cleared before the retry.
  • The fix retains the translation comparison and retry path.

Testing: No commands that execute project code or tests were run. The reported Linux tests predate BeanBot's fix, and CI has not run on this head.

Overlaps and merge order: #2300 touches other lines in make_game.py; the description says neither change depends on the other.


Automated code review by BeanBot (gpt-6.1-terra), asked for by BeanBot, after its fix. Nothing was run; a maintainer decides.

**Recommendation: Approve.** The code is ready: only testing is left. The reported Linux build recovered from deliberately damaged translated files, but the Windows launcher build and recovery path remain untested. The fix preserves the retry while restricting it to final failures with source diagnostics. Recommend approval; not approved on the forge. **What `@fix` changed** I changed this pull request: the new head is f7728748bea6. I rebased it onto `main` (f6913dd55f60). I edited its description to match the change. **Changed** - **Final compile diagnostics in nx2/make_game.py:3394**: Track diagnostics for each standalone failure and require every final failure to have a source error before retrying the translation. Added regression cases in tests/test_damaged_translation.py:188. Tests were not run, as requested. Nothing was built or run: the checks run again on the new head. The build compares translated files after a qualifying compile failure and retries changed files once, helping players distinguish damaged output from a reproducible compiler error. Recovery costs another translation and recompilation. **Testing before merging (1)** (runs on the systems it can change; it doesn't hold the recommendation) - **L2** `nx2/make_game.py:3418`: The Windows build and recovery path has not been exercised. *When:* On Windows, the recovery relies on a second translation producing identical bytes for unchanged inputs and on the launcher accepting the retry and final result. The supplied runs establish this only on Linux. **Do:** Run a Windows launcher build with a deliberately damaged translated file and a second unchanged translation; verify recovery, linking and byte-for-byte determinism. **Checks:** they run again on this head; a failure shows on the pull request. <details> <summary>Also noticed (1; not asked for, not blocking)</summary> - The supplied base diff includes unrelated renderer, tooling, documentation, and test changes. </details> <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Yes on the reported Linux case: main stopped during compilation, while the changed build finished after a 76-second translation and 51-second compile. Windows recovery remains unproven. **Other systems:** The change affects Linux and Windows build workflows, including launcher builds and the development lift store. Linux recovery was reported; Windows build, recovery, and translation determinism have not been reported. **Switches:** No switches were changed by BeanBot's fix. The supplied base diff also adds RX_VK_DLSS_FAIL_CREATE, default off, and changes RX_VK_RECORDER Auto's recorder threshold from six to four physical cores; those unrelated changes were not reviewed in depth. **Reviewed:** f7728748bea6 against f6913dd55f60: Read AGENTS.md, CONTRIBUTING.md, the pull request template, the two changed build tests, the fix diff, and the changed make_game.py paths with build.py's compile-result output. Skimmed standards and the remaining make_game.py and base-diff changes; the full base diff includes unrelated merged commits. Tooling's AGENTS.md and docs/review-checklist.md were unavailable.; nothing run (a code review). **Checked and fine:** - Final failure diagnostics are tracked separately and cleared before the retry. - The fix retains the translation comparison and retry path. **Testing:** No commands that execute project code or tests were run. The reported Linux tests predate BeanBot's fix, and CI has not run on this head. **Overlaps and merge order:** #2300 touches other lines in make_game.py; the description says neither change depends on the other. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by BeanBot, after its fix. Nothing was run; a maintainer decides.</sub>
HumanBean changed title from WIP: fix(build): translated files the PC changed are found, named and compiled again to fix(build): translated files the PC changed are found, named and compiled again 2026-11-23 15:55:01 +00:00
HumanBean deleted branch fix/damaged-translation 2026-11-23 15:55:10 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MagicBeanDev/Longshot!2305
No description provided.