Skip to content

Builder: the damaged-texture check after an unpack shows its progress - #1764

Merged
hckrman101 merged 1 commit into
NotRexed:mainfrom
nullifyshot:builder/damaged-check-progress
Nov 10, 2026
Merged

hckrman101 merged 1 commit into
NotRexed:mainfrom
nullifyshot:builder/damaged-check-progress

Conversation

@nullifyshot

@nullifyshot nullifyshot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

After a fresh unpack, the first build looks stuck for minutes on "the game was read from this .nup before: reading it again is skipped". It is checking every game file for damage (#1002), but it says nothing while it does.

What changed

  • nx2/nup.py: damaged_game_files lists the romfs .zs files first, then calls progress(done, total) after each file it opens. stand_in_damaged passes it on. Without a callback it works as before.
  • nx2/make_game.py:
    • Before the check starts, it now prints: "checking your game files for damaged textures (once after an unpack): every .zs file is opened, which can take minutes".
    • A new file_progress sends @@progress up to 4 times a second, plus once at the end. The Builder's bar moves within its Read your game files row.
    • It prints a plain line at each 10%, for the log and for terminals, e.g. checked 40,874 of 102,185 files (40%, 6 s).
  • tests/test_damaged_check_progress.py (game-free) checks:
    • the per-file reports and that the damaged file is still found
    • how often @@progress goes out, and the last one at 1.000
    • the 10% lines' text, including large numbers
    • that stand_in_damaged_files announces the check and passes the progress on

The check itself, the .hookshot_romfs_checked marker and what gets replaced are unchanged. So is the protocol: the Builder already reads @@progress for the current stage.

Tested

Windows 11, Ryzen 9 9900X3D, using the v2.0.13 Builder's tools (Python 3.14.7), with a full dump freshly unpacked by the v2.0.13 Builder. That's 102,185 .zs files.

  • Before: the first v2.0.13 build after the unpack printed that line, then nothing for several minutes. The check opened about 300 files a second with almost no CPU in use. Windows Defender's real-time protection was on.

  • After: the changed check run on the same romfs, read-only:

    checked 10,219 of 102,185 files (10%, 1 s)
    ...
    checked 102,185 of 102,185 files (100%, 15 s)
    

    It sent 60 @@progress lines, the last at 1.000, and found 0 damaged files. This run took 15 s because the files were already cached from the build's first pass.

  • Tests: tests/test_damaged_check_progress.py, tests/test_make_game_cache.py and tests/test_missing_nup.py pass. The two changed files byte-compile. I didn't run the full tests/run_all.py locally.

Not tested:

  • The bar in the Builder's window. Only the lines it reads were checked.
  • Linux.

After a fresh unpack, the first build checks every romfs .zs file for damage (NotRexed#1002). It opens about 102,000 files
and printed nothing until done: the Builder sat on "the game was read from this .nup before: reading it again is
skipped" for minutes (about 5 on a Windows PC with Defender scanning each open), and looked stuck.

- nup.damaged_game_files lists the files first, then reports each one it opened (progress(done, total)).
- make_game says the check is starting, sends @@progress for the Read row's bar at most 4 times a second, and a
  plain line at each tenth ("checked 40,874 of 102,185 files (40%, 6 s)") for the log and terminals.
- tests/test_damaged_check_progress.py: the reports, the found file, the lines' throttle and text.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@hckrman101
hckrman101 merged commit ef028cb into NotRexed:main Nov 10, 2026
7 of 9 checks passed
DUDUYG added a commit to DUDUYG/Hookshot that referenced this pull request Nov 10, 2026
…nup_stand_in, NotRexed#1764)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
NotRexed added a commit that referenced this pull request Nov 10, 2026
…ram Files message (#1889)

* fix(builder): honor DLSS opt-in when updating a game (#1643)

Use the saved license-accepted DLSS choice during updates, including after the builder restarts, while preserving existing DLSS installations. Exercise the real update decision without WPF, NVIDIA files or a game.

Assisted-by: OpenAI Codex
(cherry picked from commit c3aa9c0)

* fix(build): invalidate DLSS objects when SDK headers change (#1648)

Include the selected NGX header tree in the DLSS compilation job dependencies. Preserve content-based reuse across SDK relocation and keep unrelated and non-NGX jobs unchanged.

Assisted-by: OpenAI Codex
(cherry picked from commit c716137)

* Builder: a game folder it cannot write to stops at once with the reason

A game folder under Program Files stopped the build minutes in, inside nup.py, with a bare "PermissionError: [WinError 5]"
on its .game folder (a player on Discord, v2.0.14). make_game now writes a small check file into the folder before anything
is read; refused, it names the folder, says Program Files needs administrator rights when the folder is under it, and asks
for a folder of the player's own.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 71635f3)

* Builder: the damaged-texture check after an unpack shows its progress

After a fresh unpack, the first build checks every romfs .zs file for damage (#1002). It opens about 102,000 files
and printed nothing until done: the Builder sat on "the game was read from this .nup before: reading it again is
skipped" for minutes (about 5 on a Windows PC with Defender scanning each open), and looked stuck.

- nup.damaged_game_files lists the files first, then reports each one it opened (progress(done, total)).
- make_game says the check is starting, sends @@progress for the Read row's bar at most 4 times a second, and a
  plain line at each tenth ("checked 40,874 of 102,185 files (40%, 6 s)") for the log and terminals.
- tests/test_damaged_check_progress.py: the reports, the found file, the lines' throttle and text.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 6ad9f1c)

* tests: test_nup_stand_in's stand-in of nup.stand_in_damaged takes the progress (#1764)

Since #1764 the Python source checks fail on main: make_game.stand_in_damaged_files now passes a progress callback,
and this check's stand-in took the romfs alone (TypeError: <lambda>() takes 1 positional argument but 2 were given).
The stand-in takes it now, and the check also says each check was given one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 167685b)

* Builder: the damaged-texture check uses what the extraction saw, no ~100,000 files opened again

(cherry picked from commit b039629, #1885, ported to the v2.0.14 line:
its extract has no ProgressSink, so HeadSink wraps the file directly)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(update): Linux downloads are GETs again (the URL was passed as the POST body)

linux_update._request built Request(url, url, ...): Request's second argument is the body, so every update
download was a POST with a str body and stopped before connecting: "POST data should be bytes, an iterable of
bytes, or a file object. It cannot be of type str" (Discord, Arch Linux, 2.0.13 -> 2.0.14). From main's
df9a52e, this part only (the rest builds on Linux updater changes this line does not have).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Issai <279266118+Arkex-ai@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: breakthetargets <81792782+breakthetargets@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant