feat(build): Translate shows its progress as each of the lift's steps ends #359

Open
madebyjordan wants to merge 1 commit from madebyjordan/Longshot:feat/lift-progress into main
Contributor

Why

During a first build the progress bar sat at the start of Translate for its whole 3-4 minutes and then jumped to the end, so the build looked stuck. Now it moves as each of the lift's steps ends.

What changed

  • build: lift_progress() in nx2/make_game.py is the lift's on_line. It says @@progress as each lift step ends, from the lines PhaseClock already reads: a step's lift: <step> in <s>s line, or the discovery's.
  • build: lift_weights() weights each step by what it took in this PC's last whole lift (the phases in build_times.json). Without a record, or one missing a step, it uses LIFT_STEPS: the seven steps' seconds on a Ryzen 5 5600 under Windows (discovery 47, coverage 25, emit and write 100, big chunks split 18, patches 10, output size 38, runtime tables 12).
  • build: main() passes lift_progress(work) to the lift's run().
  • tests: tests/test_build_times.py checks that each step moves the bar to its end, that other lines and repeats say nothing, and both weightings: the last lift's, and a record missing a step. tests/test_lift_cleanup_error.py's stand-ins for run() take the on_line.

Flags and settings

None.

Measurements

A change to what the build prints; the game doesn't run it. So it's measured by its game-free checks, and by the progress it gives for a real lift.

main: cf605c85 (2026-11-14)
this PR: feat/lift-progress @ 6b2c63aa
Hardware: Ryzen 5 5600, 16 GB, Windows 11
Method:

  • The real lift's output (nightly-34's exefs, the standalone lift as make_game.py runs it) was fed through lift_progress with LIFT_STEPS's weights. The table gives the fraction it reports at each step's end, and when that step ended.
  • python -I -B tests/run_all.py --jobs 4 on main and on this PR merged with the other four build PRs of this batch.
Translate's bar when this step ends (seconds into the lift) main @ cf605c85 this PR @ 6b2c63aa
image and discovery (50 s) 0% 19%
coverage (63 s) 0% 29%
emit and write (161 s) 0% 69%
big chunks split (173 s) 0% 76%
patches (180 s) 0% 80%
output size and page-mark groups (204 s) 0% 95%
runtime tables and standalone files (216 s) 0% 100%
main @ cf605c85 this PR @ 6b2c63aa
tests/run_all.py --jobs 4 483 passed, 6 failed, 70 skipped 486 passed, 6 failed (the same 6 as main), 70 skipped

Testing

Tested:

  • tests/test_build_times.py and tests/test_lift_cleanup_error.py.
  • The progress a real Windows lift gives, as above.
  • The step names LIFT_STEPS matches against the ones the lift prints on current main: coverage and the runtime tables in nx2/lift.py; emit and write, big chunks split, patches and output size and page-mark groups in nx2/chunks.py; and the discovery line.

Not tested:

  • A whole build in a launcher, with its bar on screen. The bar shows the @@progress lines it already shows for other steps.
  • The game isn't affected.

Needs other testers: None.

Screenshots

No screenshot: the bar is the launchers' existing one, which already shows @@progress for the other steps. What changes is the values it gets during Translate, in the table under Measurements, from a real lift.

Risk and rollback

If the lift's step names change, the bar falls back to holding still during Translate, as on main; nothing fails. Reverting the commit removes the progress.

Checklist

For everyone

  • One topic.
  • The title is a Conventional Commit (type(scope): description).
  • Rebased on current main.
  • python -I -B tests/run_all.py run and passing (any failure that also fails on main is named above).
  • Tested in the game, or what wasn't is named under Testing.
  • Testing filled in: what was tested, what wasn't, and what needs other testers (with test requests).
  • Measured: main and this PR at named commits, on the same PC, scene and settings, at least 2 interleaved runs each, the median reported.
  • No game files, dumps, build output or generated files.
  • third_party/ untouched (a new folder with a PROVENANCE.md instead).
  • The license is OK: GPL-3.0-or-later, nothing incompatible and nothing decompiled.

If applicable

  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.
  • A check under tests/ that reads changed source updated in this PR, not weakened.
## Why During a first build the progress bar sat at the start of Translate for its whole 3-4 minutes and then jumped to the end, so the build looked stuck. Now it moves as each of the lift's steps ends. ## What changed - build: `lift_progress()` in `nx2/make_game.py` is the lift's `on_line`. It says `@@progress` as each lift step ends, from the lines `PhaseClock` already reads: a step's `lift: <step> in <s>s` line, or the discovery's. - build: `lift_weights()` weights each step by what it took in this PC's last whole lift (the `phases` in `build_times.json`). Without a record, or one missing a step, it uses `LIFT_STEPS`: the seven steps' seconds on a Ryzen 5 5600 under Windows (discovery 47, coverage 25, emit and write 100, big chunks split 18, patches 10, output size 38, runtime tables 12). - build: `main()` passes `lift_progress(work)` to the lift's `run()`. - tests: `tests/test_build_times.py` checks that each step moves the bar to its end, that other lines and repeats say nothing, and both weightings: the last lift's, and a record missing a step. `tests/test_lift_cleanup_error.py`'s stand-ins for `run()` take the `on_line`. ## Flags and settings None. ## Measurements A change to what the build prints; the game doesn't run it. So it's measured by its game-free checks, and by the progress it gives for a real lift. main: cf605c85 (2026-11-14) this PR: feat/lift-progress @ 6b2c63aa Hardware: Ryzen 5 5600, 16 GB, Windows 11 Method: - The real lift's output (nightly-34's exefs, the standalone lift as `make_game.py` runs it) was fed through `lift_progress` with `LIFT_STEPS`'s weights. The table gives the fraction it reports at each step's end, and when that step ended. - `python -I -B tests/run_all.py --jobs 4` on main and on this PR merged with the other four build PRs of this batch. | Translate's bar when this step ends (seconds into the lift) | main @ cf605c85 | this PR @ 6b2c63aa | |---|---|---| | image and discovery (50 s) | 0% | 19% | | coverage (63 s) | 0% | 29% | | emit and write (161 s) | 0% | 69% | | big chunks split (173 s) | 0% | 76% | | patches (180 s) | 0% | 80% | | output size and page-mark groups (204 s) | 0% | 95% | | runtime tables and standalone files (216 s) | 0% | 100% | | | main @ cf605c85 | this PR @ 6b2c63aa | |---|---|---| | `tests/run_all.py --jobs 4` | 483 passed, 6 failed, 70 skipped | 486 passed, 6 failed (the same 6 as main), 70 skipped | ## Testing **Tested:** - `tests/test_build_times.py` and `tests/test_lift_cleanup_error.py`. - The progress a real Windows lift gives, as above. - The step names `LIFT_STEPS` matches against the ones the lift prints on current main: `coverage` and the runtime tables in `nx2/lift.py`; `emit and write`, `big chunks split`, `patches` and `output size and page-mark groups` in `nx2/chunks.py`; and the discovery line. **Not tested:** - A whole build in a launcher, with its bar on screen. The bar shows the `@@progress` lines it already shows for other steps. - The game isn't affected. **Needs other testers:** None. ## Screenshots No screenshot: the bar is the launchers' existing one, which already shows `@@progress` for the other steps. What changes is the values it gets during Translate, in the table under Measurements, from a real lift. ## Risk and rollback If the lift's step names change, the bar falls back to holding still during Translate, as on main; nothing fails. Reverting the commit removes the progress. ## Checklist ### For everyone - [x] One topic. - [x] The title is a Conventional Commit (`type(scope): description`). - [x] Rebased on current `main`. - [x] `python -I -B tests/run_all.py` run and passing (any failure that also fails on `main` is named above). - [x] Tested in the game, or what wasn't is named under Testing. - [x] Testing filled in: what was tested, what wasn't, and what needs other testers (with test requests). - [x] Measured: main and this PR at named commits, on the same PC, scene and settings, at least 2 interleaved runs each, the median reported. - [x] No game files, dumps, build output or generated files. - [x] `third_party/` untouched (a new folder with a `PROVENANCE.md` instead). - [x] The license is OK: GPL-3.0-or-later, nothing incompatible and nothing decompiled. ### If applicable - [x] AI assistance recorded with `Assisted-by:` / `Co-Authored-By:` trailers. - [x] A check under `tests/` that reads changed source updated in this PR, not weakened.
feat(build): Translate shows its progress as each of the lift's steps ends
Some checks are pending
PR description / Description follows the template (pull_request_target) Successful in 7s
CI / Conventional Commit title (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Blocked by required conditions
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Blocked by required conditions
CI / Workflow lint (actionlint) (pull_request) Blocked by required conditions
Third-party parts / As their notes say (pull_request) Blocked by required conditions
Third-party parts / The same as upstream (pull_request) Blocked by required conditions
Website / Website on Cloudflare (pull_request_target) Has been skipped
6b2c63aa62
The builders' bar sat at Translate's start for its whole 4 minutes and then jumped to its end, because the lift sends no
progress: it looked stuck.

- make_game.py: lift_progress, the lift's on_line, says '@@progress' as each lift step ends (its "lift: <step> in <s>s"
  line, or the discovery's), from the lines PhaseClock already reads. The steps are weighted by what they took in this
  PC's last whole lift (build_times.json's phases, lift_weights), else by LIFT_STEPS: the seven steps' seconds on a
  Ryzen 5 5600 under Windows (discovery 47, coverage 25, emit and write 100, big chunks split 18, patches 10, output size
  38, runtime tables 12).
- tests/test_build_times.py: each step moves the bar to the end, other lines and repeats say nothing, the last lift's
  weights and a record missing a step. tests/test_lift_cleanup_error.py: its stand-ins for run() take the on_line.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
madebyjordan changed title from WIP: feat(build): Translate shows its progress as each of the lift's steps ends to feat(build): Translate shows its progress as each of the lift's steps ends 2026-11-14 04:24:52 +00:00
Some checks are pending
PR description / Description follows the template (pull_request_target) Successful in 7s
CI / Conventional Commit title (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Blocked by required conditions
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Blocked by required conditions
CI / Workflow lint (actionlint) (pull_request) Blocked by required conditions
Third-party parts / As their notes say (pull_request) Blocked by required conditions
Third-party parts / The same as upstream (pull_request) Blocked by required conditions
Website / Website on Cloudflare (pull_request_target) Has been skipped
This pull request doesn't have enough approvals yet. 0 of 1 approvals granted.
Some workflows are waiting to be reviewed.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u 'feat/lift-progress:madebyjordan-feat/lift-progress'
git switch 'madebyjordan-feat/lift-progress'
Sign in to join this conversation.
No reviewers
No milestone
No project
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.

Dependencies

No dependencies set

Reference
MagicBeanDev/Longshot!359
No description provided.