fix: mod-api on Windows, second round: renames, mods' network, test mode and the checks #3037

Merged
HumanBean merged 44 commits from llun/Longshot:fix/mod-api-windows-2 into mod-api 2026-12-03 02:43:49 +00:00
Member

Summary

For #2822 (into mod-api). The second round of testing mod-api on Windows 11, every fix in one pull request as in #2938. Each bug fix comes after the test that shows it, except the include order, which an existing check shows.

Fix What was wrong Where
The builder renames a file for the sandboxed game by the target folder's handle Windows refuses SetFileInformationByHandle with a folder's handle (error 87; 123 in the real %APPDATA% under a packaged app). So every rename went by the folder's path, the branch meant for Wine, which the game could point elsewhere after the check; on 123 it failed. A screenshot taken over the control bridge was lost, so dev.py smoke failed Windows
Mods' network and Discord status keep their link The game's end of the builder's network pipe read bytes, not messages: two waiting answers came as one and the game dropped the link, about every 10 s. And the builder waited for the game in a read of the handle it answers on, which Windows runs one after the other, so an answer waited for the game's next message. The builder's end is overlapped now: a read waits on its own while other threads write. An empty message ends that link; it does not hold the builder's thread Windows
A mod can reach a server on the internet The builder took a connection for made while Windows was still making it, and set its options too soon: every connection to another computer failed (error 10022). One to this PC is made at once, so the tests passed Windows
A mod's tests in the game reach the servers the mod may They run as tests:<mod>, which has no manifest, so their network was nothing ("the network is not available here"). They are told to the builder by their mod's id and held to its manifest; the builder judges them as it judges the mod. It knows the mods of HOS_MOD_TESTS now and asks about them in its own window, as about any mod: no yes, no network all
The game's test mode finds a mod outside the mods folder The confined game looked for it before the builder's file layer was in: "no mod to test was found". ChloeNow's work, from #2747, with their authorship; mod-api already has that pull request's builder half. Only the context and one stand-in changed Windows
A mod's tests can save a screenshot, and get its path Their id, tests:<mod>, has a :, which Windows takes in no folder's name; and it is no running mod's id, so the answer was null at once (every system) Windows / all
The texture memo shifts a one-word handle as the draw does tex_desc_memo.h's copy of handle_of (#2920) does not know shift_single_word (#2866, the same day): a texture found that way could be the wrong one. The memo is on by default; main had this too when checked (d53dbe94b) all
The tar filter for Python before 3.12 lets nothing out of the folder A name with a \ or a : left it on Windows, and a link unpacked through another link left it on Linux. A link already there, at a member's own place, led the write outside on both (review's L1) all
vk_memory.cpp includes vk_work.h last again Its macros count only what comes after it (test_pass_barrier's rule) all

Nine crates' tests build when run alone on Windows (they get host-sys' stand-in, for tests alone), and cargo fmt --all works in a checkout inside another one. The example mods magic-item and tough-octoroks named an actor and a file the game does not have; they, and the guide pages that name the file, name the right ones. The rest is tests: more than 40 game-free checks that failed on mod-api on this PC pass again, and a Linux-only one is left to Linux. Most had fallen behind renderer code that moved. Where the renderer has a fast way beside the old one, the check now runs both. test_input_movie's unused counter is dyst's fix, from #2188.

Read first: files_windows.rs rename, sandbox_windows.rs message_pair and MessageEnd, net-broker's sock.rs connected, then tex_desc_memo.h c2_handle_of.

Testing

Tested: Windows 11 (build 26300), RTX 5080, driver 621.47, no MSVC (Rust's gnullvm host, the repository's llvm-mingw), the sandbox on. On a98c9cbe0, on mod-api @ ab5592e2c (rebased onto its one later commit, ours unchanged): dev.py smoke passes (Kokiri Forest, 900 frames, the menu opened, the screenshot saved).

  • On a98c9cbe0, in the game, with a development mod whose permissions were written into the run's own test profile: its fetch is answered (status 200) 3 times of 3 over 1500 frames on one link. A host that does not exist fails. Before the fix all 3 failed.
  • On a98c9cbe0, in the game, a mod's own tests: with no window to ask in, the builder declines and the listed server is refused. With a yes in the run's own test profile (written there, not clicked), it answers 200. A server not listed is refused both times.
  • On a98c9cbe0, in the game, a packed mod (mod pack, mod add) loads and runs. Switched off in the Mods tab by the menu's keys it stops and profile.json says off; switched on it starts again, its stored data kept.
  • By hand, with the builder at 6390ffb41 (and one local line, so that game may show its windows) and that game: a packed mod's requests are refused until a person clicks Accept in the builder's window, which names the mod and the server; then they answer 200, and trust.json holds the yes with its copy's from.
  • On 0d0c44675 (before the last rebase), in the game, the overlapped network link: dev.py smoke passes, a development mod's 3 fetches and a tested mod's answer 200, and the Discord status shows the place, the hearts and the time on a person's profile.
  • On c3efe29eb, on mod-api @ e9dd5aec5: what its three later commits can affect, and what changed here: 1311 Rust tests (build-core, build-driver, net-broker, api, key-names, game-ui, longshot-game) and 11 Python checks pass, and lint. test_ui_renderer was behind e9dd5aec5 and is fixed here.
  • On e4741a8bf, in the game, magic-item and tough-octoroks apply with nothing left out; before, the Shock Stone stood in Kokiri Forest and an Octorok read 12 of 12 life.
  • On 615d8e26e, in the game: a mod's tests store data in each scope and save a screenshot.
  • Before the rebase onto mod-api @ b15d47e30, the same diff but for two tests that are now mod-api's own, on b9bf697bb, in the game:
    • dev.py smoke passes and saves its screenshot. On 582b6a1ab it failed only on that ("the PNG could not be written").
    • A probe mod's network link went and came back all through a run before the fix and stays up after it. Its storage and screenshot tests pass too. (Its network test was too loose: it took a refusal for a pass.)
    • The Discord mod, with Discord Canary: "connected", "status set", and the place and hearts in the status. Whether the profile showed it was not seen.
    • A mod at a 285-character path with spaces and accents loads, reloads after an edit, keeps its data over a restart and saves screenshots; HOS_CRASH_TEST writes the crash record, and the minidump with HOS_CRASH_MINIDUMP=1; the Controls rows read, and Walk speed is saved.
  • The new tests fail without their fixes: rename by handle and the junction swapped in after the check (error 87), two messages read as one, an answer held behind a read, an empty message that held the read, a connection taken for made too soon, the test mode's start order, the tests' screenshot folder and answer, the shifted handle, the tar names and links (a link at a member's own place too, on Windows and Linux). All pass here.
  • Rust (x86_64-pc-windows-gnullvm), on e4741a8bf (before mod-api's ab5592e2c): test_lifter passes whole, so cargo fmt, clippy with warnings as errors, and cargo test --release of the whole workspace. On this head (6390ffb41), what mod-api's two later commits can affect: the 7 crates they change (1195 tests) and 75 Python checks, all pass. On a98c9cbe0, net-broker's 26 and clippy of build-driver and api.
  • game-sites' tests failed by chance when run together: 56 of 800 runs. The tests share one phase and one list of what is retired; they take turns now: 0 of 2000. No bug of the game's was found behind it.
  • One of net-broker's tests had passed for the connect bug's reason. It has a longer time now: Windows takes 2 s to say a port is closed.
  • test_reshade_fx passes. test_lifter had failed on three things, all fixed here: cargo fmt --all in a checkout inside another one, a path with no drive in a build-driver test, and a build-tools test whose own program loads libunwind. mise run lint passes.
  • Wine 9.0 (Ubuntu's, in WSL). On 4cdd23cea, test_builder_files_wine.py's programs and folders, built on Windows and run by its own steps: 27 checks pass, renames among them, with no file made outside the roots (Wine made no junction). On this head's build-core, before the last rebase (which does not touch it): the 9 file service tests and the 5 pipe tests pass. the_cache_takes_files_folders_renames_and_removes never ended there, on mod-api alone too (it kept a folder's handle open): it ends now. build-core's tests do not run whole there, on mod-api alone either: one needs the AppContainer Wine does not have.
  • Python, on mod-api @ 45441c842, every check that runs on Windows and test_present_aspect_vulkan (821, test_lifter apart): 809 pass and 12 failed. Eleven are behind newer renderer and save code; test_vk_desc_span_fast needed this pull request's one-word shift. All 12 are fixed here and pass, with lint. Where mod-api had fixed a check too, its version is kept.

Still to test:

  • Linux: the suite and the game once through a start, expecting no change (by hand or CI).

Measurements

Not measured: fixes and tests, none of them for speed.

Risks

  • Sandbox. Nothing lets the game reach more. The rename is decided by the same rules, reached through the same checked folder, and now fails where it fell back to a path. New refusal tests: a folder swapped for a junction after the check, and names that are streams, devices, .. or wildcards. The network pipe keeps its owner-only access, one instance and its check of who opened it. The test mode's start runs later inside the container, never earlier outside it.
  • Mods' connections on Windows now work where they failed. Which servers a mod may reach is decided before the connect, as it was.
  • A mod's tests hold the mod's grants, no more, as everywhere else. The builder allows nothing it did not: a mod under test needs the player's yes, which testing it is not. Its test fails if it is let through unasked.
  • A Wine that refuses NtSetInformationFile with a folder's handle would refuse the confined game's renames; Wine 9.0 takes it.
  • gpu/vk/tex_desc_memo.h: a texture found by one shifted word is now the draw's own choice. RX_VK_TEX_DESC_MEMO=0 turns the memo off.
  • A player notices nothing else after updating. A revert is enough.

Checklist

Ready for review

  • One topic, on current main; the title is a Conventional Commit. (On mod-api, several fixes in one pull request, as asked.)
  • Tested on my own PC, in the game for a change the game runs, as Testing says.
  • mise run test passes (any failure that also fails on main is named). (As Testing says: not all on one head.)
  • 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.
  • Host code builds on Windows (llvm-mingw) and Linux, with UTF-8 paths. (Windows only, here.)
  • Docs updated.
  • 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 For [#2822](https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/2822) (into `mod-api`). The second round of testing `mod-api` on Windows 11, every fix in one pull request as in [#2938](https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/2938). Each bug fix comes after the test that shows it, except the include order, which an existing check shows. | Fix | What was wrong | Where | |---|---|---| | The builder renames a file for the sandboxed game by the target folder's handle | Windows refuses `SetFileInformationByHandle` with a folder's handle (error 87; 123 in the real `%APPDATA%` under a packaged app). So every rename went by the folder's **path**, the branch meant for Wine, which the game could point elsewhere after the check; on 123 it failed. A screenshot taken over the control bridge was lost, so `dev.py smoke` failed | Windows | | Mods' network and Discord status keep their link | The game's end of the builder's network pipe read bytes, not messages: two waiting answers came as one and the game dropped the link, about every 10 s. And the builder waited for the game in a read of the handle it answers on, which Windows runs one after the other, so an answer waited for the game's next message. The builder's end is overlapped now: a read waits on its own while other threads write. An empty message ends that link; it does not hold the builder's thread | Windows | | A mod can reach a server on the internet | The builder took a connection for made while Windows was still making it, and set its options too soon: every connection to another computer failed (error 10022). One to this PC is made at once, so the tests passed | Windows | | A mod's tests in the game reach the servers the mod may | They run as `tests:<mod>`, which has no manifest, so their network was nothing ("the network is not available here"). They are told to the builder by their mod's id and held to its manifest; the builder judges them as it judges the mod. It knows the mods of `HOS_MOD_TESTS` now and asks about them in its own window, as about any mod: no yes, no network | all | | The game's test mode finds a mod outside the mods folder | The confined game looked for it before the builder's file layer was in: "no mod to test was found". **ChloeNow's work**, from [#2747](https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/2747), with their authorship; `mod-api` already has that pull request's builder half. Only the context and one stand-in changed | Windows | | A mod's tests can save a screenshot, and get its path | Their id, `tests:<mod>`, has a `:`, which Windows takes in no folder's name; and it is no running mod's id, so the answer was null at once (every system) | Windows / all | | The texture memo shifts a one-word handle as the draw does | `tex_desc_memo.h`'s copy of `handle_of` (#2920) does not know `shift_single_word` (#2866, the same day): a texture found that way could be the wrong one. The memo is on by default; `main` had this too when checked (d53dbe94b) | all | | The tar filter for Python before 3.12 lets nothing out of the folder | A name with a `\` or a `:` left it on Windows, and a link unpacked through another link left it on Linux. A link already there, at a member's own place, led the write outside on both (review's L1) | all | | `vk_memory.cpp` includes `vk_work.h` last again | Its macros count only what comes after it (`test_pass_barrier`'s rule) | all | Nine crates' tests build when run alone on Windows (they get host-sys' stand-in, for tests alone), and `cargo fmt --all` works in a checkout inside another one. The example mods `magic-item` and `tough-octoroks` named an actor and a file the game does not have; they, and the guide pages that name the file, name the right ones. The rest is tests: more than 40 game-free checks that failed on `mod-api` on this PC pass again, and a Linux-only one is left to Linux. Most had fallen behind renderer code that moved. Where the renderer has a fast way beside the old one, the check now runs both. `test_input_movie`'s unused counter is dyst's fix, from [#2188](https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/2188). Read first: `files_windows.rs` `rename`, `sandbox_windows.rs` `message_pair` and `MessageEnd`, net-broker's `sock.rs` `connected`, then `tex_desc_memo.h` `c2_handle_of`. ## Testing **Tested:** Windows 11 (build 26300), RTX 5080, driver 621.47, no MSVC (Rust's gnullvm host, the repository's llvm-mingw), the sandbox on. On a98c9cbe0, on `mod-api` @ ab5592e2c (rebased onto its one later commit, ours unchanged): `dev.py smoke` passes (Kokiri Forest, 900 frames, the menu opened, the screenshot saved). - On a98c9cbe0, in the game, with a development mod whose permissions were written into the run's own test profile: its `fetch` is answered (status 200) 3 times of 3 over 1500 frames on one link. A host that does not exist fails. Before the fix all 3 failed. - On a98c9cbe0, in the game, a mod's own tests: with no window to ask in, the builder declines and the listed server is refused. With a yes in the run's own test profile (written there, not clicked), it answers 200. A server not listed is refused both times. - On a98c9cbe0, in the game, a packed mod (`mod pack`, `mod add`) loads and runs. Switched off in the Mods tab by the menu's keys it stops and `profile.json` says off; switched on it starts again, its stored data kept. - By hand, with the builder at 6390ffb41 (and one local line, so that `game` may show its windows) and that game: a packed mod's requests are refused until a person clicks Accept in the builder's window, which names the mod and the server; then they answer 200, and `trust.json` holds the yes with its copy's `from`. - On 0d0c44675 (before the last rebase), in the game, the overlapped network link: `dev.py smoke` passes, a development mod's 3 fetches and a tested mod's answer 200, and the Discord status shows the place, the hearts and the time on a person's profile. - On c3efe29eb, on `mod-api` @ e9dd5aec5: what its three later commits can affect, and what changed here: 1311 Rust tests (build-core, build-driver, net-broker, api, key-names, game-ui, longshot-game) and 11 Python checks pass, and lint. `test_ui_renderer` was behind e9dd5aec5 and is fixed here. - On e4741a8bf, in the game, `magic-item` and `tough-octoroks` apply with nothing left out; before, the Shock Stone stood in Kokiri Forest and an Octorok read 12 of 12 life. - On 615d8e26e, in the game: a mod's tests store data in each scope and save a screenshot. - Before the rebase onto `mod-api` @ b15d47e30, the same diff but for two tests that are now `mod-api`'s own, on b9bf697bb, in the game: - `dev.py smoke` passes and saves its screenshot. On 582b6a1ab it failed only on that ("the PNG could not be written"). - A probe mod's network link went and came back all through a run before the fix and stays up after it. Its storage and screenshot tests pass too. (Its network test was too loose: it took a refusal for a pass.) - The Discord mod, with Discord Canary: "connected", "status set", and the place and hearts in the status. Whether the profile showed it was not seen. - A mod at a 285-character path with spaces and accents loads, reloads after an edit, keeps its data over a restart and saves screenshots; `HOS_CRASH_TEST` writes the crash record, and the minidump with `HOS_CRASH_MINIDUMP=1`; the Controls rows read, and Walk speed is saved. - The new tests fail without their fixes: rename by handle and the junction swapped in after the check (error 87), two messages read as one, an answer held behind a read, an empty message that held the read, a connection taken for made too soon, the test mode's start order, the tests' screenshot folder and answer, the shifted handle, the tar names and links (a link at a member's own place too, on Windows and Linux). All pass here. - Rust (`x86_64-pc-windows-gnullvm`), on e4741a8bf (before `mod-api`'s ab5592e2c): `test_lifter` passes whole, so `cargo fmt`, clippy with warnings as errors, and `cargo test --release` of the whole workspace. On this head (6390ffb41), what `mod-api`'s two later commits can affect: the 7 crates they change (1195 tests) and 75 Python checks, all pass. On a98c9cbe0, net-broker's 26 and clippy of build-driver and api. - `game-sites`' tests failed by chance when run together: 56 of 800 runs. The tests share one phase and one list of what is retired; they take turns now: 0 of 2000. No bug of the game's was found behind it. - One of net-broker's tests had passed for the connect bug's reason. It has a longer time now: Windows takes 2 s to say a port is closed. - `test_reshade_fx` passes. `test_lifter` had failed on three things, all fixed here: `cargo fmt --all` in a checkout inside another one, a path with no drive in a build-driver test, and a build-tools test whose own program loads libunwind. `mise run lint` passes. - Wine 9.0 (Ubuntu's, in WSL). On 4cdd23cea, `test_builder_files_wine.py`'s programs and folders, built on Windows and run by its own steps: 27 checks pass, renames among them, with no file made outside the roots (Wine made no junction). On this head's build-core, before the last rebase (which does not touch it): the 9 file service tests and the 5 pipe tests pass. `the_cache_takes_files_folders_renames_and_removes` never ended there, on `mod-api` alone too (it kept a folder's handle open): it ends now. build-core's tests do not run whole there, on `mod-api` alone either: one needs the AppContainer Wine does not have. - Python, on `mod-api` @ 45441c842, every check that runs on Windows and `test_present_aspect_vulkan` (821, `test_lifter` apart): 809 pass and 12 failed. Eleven are behind newer renderer and save code; `test_vk_desc_span_fast` needed this pull request's one-word shift. All 12 are fixed here and pass, with lint. Where `mod-api` had fixed a check too, its version is kept. **Still to test:** - Linux: the suite and the game once through a start, expecting no change (by hand or CI). ## Measurements Not measured: fixes and tests, none of them for speed. ## Risks - **Sandbox.** Nothing lets the game reach more. The rename is decided by the same rules, reached through the same checked folder, and now fails where it fell back to a path. New refusal tests: a folder swapped for a junction after the check, and names that are streams, devices, `..` or wildcards. The network pipe keeps its owner-only access, one instance and its check of who opened it. The test mode's start runs later inside the container, never earlier outside it. - Mods' connections on Windows now work where they failed. Which servers a mod may reach is decided before the connect, as it was. - A mod's tests hold the mod's grants, no more, as everywhere else. The builder allows nothing it did not: a mod under test needs the player's yes, which testing it is not. Its test fails if it is let through unasked. - A Wine that refuses `NtSetInformationFile` with a folder's handle would refuse the confined game's renames; Wine 9.0 takes it. - `gpu/vk/tex_desc_memo.h`: a texture found by one shifted word is now the draw's own choice. `RX_VK_TEX_DESC_MEMO=0` turns the memo off. - A player notices nothing else after updating. A revert is enough. ## Checklist ### Ready for review - [ ] One topic, on current `main`; the title is a Conventional Commit. (On `mod-api`, several fixes in one pull request, as asked.) - [x] Tested on my own PC, in the game for a change the game runs, as Testing says. - [ ] `mise run test` passes (any failure that also fails on `main` is named). (As Testing says: not all on one head.) - [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. - [ ] Host code builds on Windows (llvm-mingw) and Linux, with UTF-8 paths. (Windows only, here.) - [x] Docs updated. - [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)
llun added 19 commits 2026-12-02 22:06:22 +00:00
Two of the three fail on mod-api on Windows: the rename by handle is refused with error 87, and the service then renames
by the folder's path.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
SetFileInformationByHandle makes the new name a whole path even when it is given a folder's handle, and Windows refuses
the two together: error 87, or 123 in the real %APPDATA% under an MSIX app. So every rename of the confined game went by
the folder's path (the branch meant for Wine), which the game could point elsewhere after the check, and on 123 failed:
a screenshot asked through the control bridge was lost. NtSetInformationFile takes the handle and the name. The rename by
path is gone: what the handle refuses fails.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Also compares unpacked names with /, so the check passes on Windows.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
A name with a \ or a : left the folder on Windows, and a link unpacked through another link was resolved from where its
name says, not from where it lands (on every system).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Its macros count the commands that do GPU work, in every file that includes it, and only over what comes after it
(tests/test_pass_barrier.py's rule).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Windows: paths compared as the system writes them, a counter nothing reads (clang refuses it; test_input_movie's is
dyst's, #2188), and the posix window's keys left to Linux.
Every system: the checks that cut the renderer's code follow where it moved, the small textures' pool is checked too, and
the write-back's checks run with RX_VK_WB_CPU_WORDS_FAST off, on and compared.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
It fails: the memo's c2_handle_of (#2920) does not know shift_single_word (#2866, the same day).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The checks that cut the recording, the staging arenas, the presents, the imports and the buffer binds follow where the code
went; the recording's run with RX_VK_PART_ADAPTIVE's own check, the arenas' with RX_VK_TEX_BTREE_FAST off and on.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The texture cache's and the uploads' checks: the small textures' pool, SIEVE's visited bit, the upload command buffer begun
at its first use, and the GPU-owned ranges with RX_VK_TEX_BTREE_GET_FAST off, on and compared.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The reproducible link's copy of lld finds the DLLs llvm-mingw keeps beside lld, and the toolchain's folders are compared as
paths, not as text.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Two of the three fail: the game's end of a pipe reads two waiting messages as one, and a write waits behind a read of the
same end.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The sandboxed game's end of the builder's network pipe read bytes, not messages, so two answers that waited came as one and
the game dropped the link, every 10 s. And the builder waited for the game in a read of the handle it answers on, which
Windows runs one after the other: an answer went out only once the game sent something more. The pipe's other rights, its
owner-only access and its checks are as before.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
From ChloeNow's #2747 (commit 48cf1f896), its stand-in of
user_dir_early as mod-api has it now.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
On Windows the confined game ran game_start_args before hos_sandbox_start, which installs the builder's file layer inside
the container. The test mode's start then could not read the folder it tests (outside the folders the container reaches by
itself), took it for an empty folder of mods, and set LONGSHOT_DEV_MODS empty: "no mod to test was found" for a mod outside
the mods folder, though the sandbox had granted the folder. Inside the container the start now runs after the sandbox's
start; outside it, and with the sandbox off, it runs first as before.

From ChloeNow's #2747 (commit c0973f894), on mod-api's start as it is
now. The builder's half of that pull request is in mod-api already.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Their id, tests:<mod>, has a ':', which Windows takes in no folder's name: the ~ mod storage already uses.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
fix(modapi): a screenshot a mod's tests ask for is answered with its path
Some checks failed
PR description / Title and description (pull_request_target) Has been cancelled
9f0a505ad2
Their id is tests:<mod>, which is no running mod's, so the answer was null at once though the picture was then saved.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Author
Member

Tested in game: Windows 11, RTX 5080, driver 621.47, sandbox on, this head (9f0a505ad): dev.py smoke passes (Kokiri Forest, 900 frames, the menu opened, the screenshot saved). Before the rebase (the same diff but for two tests): a probe mod's network, storage and screenshots, the Discord status, a mod reloading from a long accented path, a restart, a crash record and the Controls rows.

Tested in game: Windows 11, RTX 5080, driver 621.47, sandbox on, this head (9f0a505ad): dev.py smoke passes (Kokiri Forest, 900 frames, the menu opened, the screenshot saved). Before the rebase (the same diff but for two tests): a probe mod's network, storage and screenshots, the Discord status, a mod reloading from a long accented path, a restart, a crash record and the Controls rows.
Owner
@review
BeanBot left a comment

Recommendation: Request changes. The tar filter can still write outside its destination when an existing leaf is a symlink. The Windows fixes have useful smoke-test evidence, but Wine and Linux compatibility remain untested.

The change fixes several Windows mod and sandbox failures, corrects a texture-handle calculation, tightens archive filtering and updates checks. It also replaces Wine’s path-based rename fallback, so compatibility needs a Wine run.

Blocking (1): must change before merging.

  1. L1 scripts/helpers.py:110: The destination check resolves only the parent, so it does not reject an existing leaf symlink that points outside the extraction folder. (more on the line) Do: Resolve and validate the full destination for regular files before extraction, and add a test with a pre-existing leaf symlink pointing outside.

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

  • L2 builder/crates/build-core/src/files_windows.rs:697: The replacement rename path has not been exercised on Wine, where the previous path fallback was used. (more on the line) Do: Run the Wine rename check and a sandboxed screenshot or equivalent rename on Wine.
  • L3 gpu/vk/tex_desc_memo.h:108: The renderer change and the shared code have not been exercised in a Linux game run. (more on the line) Do: Run the Linux checks and a game start through a representative scene, including affected Tier 1 hardware as available.

@fix can do L1.

Checks: Still running: PR description / Title and description (pull_request_target).

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

Does it help: Unproven overall. The author reports a passing Windows smoke run on this head and successful network and mod tests before the rebase; Wine and Linux have not been tested. This is not a performance change.

Other systems: The rename change affects Wine; the texture memo and archive filter also run on Linux. The reported game run covers Windows with an RTX 5080, while Linux and Wine remain untested.

Switches: No production switch added, changed or removed.

Reviewed: 9f0a505ad2 against b15d47e303: Read the repository rules, PR template, standards, commit log, production diffs and selected callers and tests. The full diff output was truncated; several changed test files and surrounding production files were only skimmed, so this is not a complete review of every changed file.; nothing run (a code review).

Checked and fine:

  • The Windows smoke run on this head saved its screenshot.
  • The changed commits record AI assistance.
  • The renderer API and shader files are not changed, and no production switch is added.

Testing: Read-only review; no builds, scripts or tests were run.

Overlaps and merge order: The description identifies #2747 as the source of the test-mode work and #2822 as the parent track; no independent overlap search was possible.


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

**Recommendation: Request changes.** The tar filter can still write outside its destination when an existing leaf is a symlink. The Windows fixes have useful smoke-test evidence, but Wine and Linux compatibility remain untested. The change fixes several Windows mod and sandbox failures, corrects a texture-handle calculation, tightens archive filtering and updates checks. It also replaces Wine’s path-based rename fallback, so compatibility needs a Wine run. **Blocking (1)**: must change before merging. 1. **L1** `scripts/helpers.py:110`: The destination check resolves only the parent, so it does not reject an existing leaf symlink that points outside the extraction folder. (more on the line) **Do:** Resolve and validate the full destination for regular files before extraction, and add a test with a pre-existing leaf symlink pointing outside. **Testing before merging (2)** (runs on the systems it can change; it doesn't hold the recommendation) - **L2** `builder/crates/build-core/src/files_windows.rs:697`: The replacement rename path has not been exercised on Wine, where the previous path fallback was used. (more on the line) **Do:** Run the Wine rename check and a sandboxed screenshot or equivalent rename on Wine. - **L3** `gpu/vk/tex_desc_memo.h:108`: The renderer change and the shared code have not been exercised in a Linux game run. (more on the line) **Do:** Run the Linux checks and a game start through a representative scene, including affected Tier 1 hardware as available. `@fix` can do L1. **Checks:** Still running: `PR description / Title and description (pull_request_target)`. <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Unproven overall. The author reports a passing Windows smoke run on this head and successful network and mod tests before the rebase; Wine and Linux have not been tested. This is not a performance change. **Other systems:** The rename change affects Wine; the texture memo and archive filter also run on Linux. The reported game run covers Windows with an RTX 5080, while Linux and Wine remain untested. **Switches:** No production switch added, changed or removed. **Reviewed:** 9f0a505ad23f against b15d47e303d1: Read the repository rules, PR template, standards, commit log, production diffs and selected callers and tests. The full diff output was truncated; several changed test files and surrounding production files were only skimmed, so this is not a complete review of every changed file.; nothing run (a code review). **Checked and fine:** - The Windows smoke run on this head saved its screenshot. - The changed commits record AI assistance. - The renderer API and shader files are not changed, and no production switch is added. **Testing:** Read-only review; no builds, scripts or tests were run. **Overlaps and merge order:** The description identifies #2747 as the source of the test-mode work and #2822 as the parent track; no independent overlap search was possible. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.</sub>
@ -679,3 +695,3 @@
let leaf = leaf_of(n2);
let replace = access == 1;
match rename(&h, Some(&dir), leaf, replace) {
match rename(&h, &dir, leaf, replace) {
Member

L2 (should fix): The replacement rename path has not been exercised on Wine, where the previous path fallback was used.

When: A Wine version that rejects the new handle-relative call would fail sandboxed game renames, including screenshot saves.

Do: Run the Wine rename check and a sandboxed screenshot or equivalent rename on Wine.

**L2** (should fix): The replacement rename path has not been exercised on Wine, where the previous path fallback was used. *When:* A Wine version that rejects the new handle-relative call would fail sandboxed game renames, including screenshot saves. **Do:** Run the Wine rename check and a sandboxed screenshot or equivalent rename on Wine.
@ -104,6 +105,8 @@ struct PeekResult {
uint32_t h = c2_read_word(s, ns, d.cbuf_offset + k * step);
if (d.has_secondary) {
h = (h << d.shift_left) | (c2_read_word(s, ns, d.secondary_cbuf_offset + k * step) << d.secondary_shift_left);
} else if (d.shift_single_word) { // (as vk_draw.cpp's handle_of)
Member

L3 (should fix): The renderer change and the shared code have not been exercised in a Linux game run.

When: The changed texture-handle path is enabled by default on Linux as well as Windows, but the reported game run covers only Windows.

Do: Run the Linux checks and a game start through a representative scene, including affected Tier 1 hardware as available.

**L3** (should fix): The renderer change and the shared code have not been exercised in a Linux game run. *When:* The changed texture-handle path is enabled by default on Linux as well as Windows, but the reported game run covers only Windows. **Do:** Run the Linux checks and a game start through a representative scene, including affected Tier 1 hardware as available.
@ -101,0 +107,4 @@
# (where the member lands, the links already unpacked followed: what a relative link is resolved from)
folder = os.path.realpath(os.path.join(dest, os.path.dirname(member.name)))
if not plain(member.name) or ".." in member.name.split("/") or not inside(folder):
Member

L1 (blocking): The destination check resolves only the parent, so it does not reject an existing leaf symlink that points outside the extraction folder.

When: If the destination already contains out/file as a symlink to an outside file, a regular tar member named file passes the parent check and tarfile opens the symlink for writing, overwriting the outside file.

Do: Resolve and validate the full destination for regular files before extraction, and add a test with a pre-existing leaf symlink pointing outside.

**L1** (blocking): The destination check resolves only the parent, so it does not reject an existing leaf symlink that points outside the extraction folder. *When:* If the destination already contains `out/file` as a symlink to an outside file, a regular tar member named `file` passes the parent check and tarfile opens the symlink for writing, overwriting the outside file. **Do:** Resolve and validate the full destination for regular files before extraction, and add a test with a pre-existing leaf symlink pointing outside.
The keys' names are read from their own crate, the FPS counter's rows are the Debug tab's, version 88's cursor is the last of
MkwVkHost's members, and Linux's cursor check covers the shape the UI asks for.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The host tells the mods' storage of the staged files and of the Commit: once, only when it is made.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
docs: code-mods and key-names have their READMEs
Some checks failed
PR description / Title and description (pull_request_target) Has been cancelled
16d6ee8048
tests/test_crate_readmes.py asks one of every crate.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
HumanBean left a comment

Recommendation: Wait. The code looks right to me and each fix is still needed on today's mod-api; what is left before it can land is the Wine run for the rename change, a Linux pass, the hand tests in Still to test, and then a rebase once mod-api's own rebase onto main is done. Thank you for this round, llun: the tests ahead of each fix make it easy to follow.

Code-only review: I read the diff and the code around it, and ran nothing from the PR.

Against today's mod-api

The PR's parent is b15d47e30, which is mod-api's tip right now, so it already sits on top of today's work (the Insert menu fixes, the round of #2822 review fixes, and HD haptics over the pads pipe). The forge's "not mergeable" looks stale: the merge base it reports is that same commit. I found no textual or behaviour overlap:

  • Network pipe: the net-broker changes on mod-api (ipc_conn.rs and its PeekNamedPipe) are about the broker's own IPC links to the outside, such as Discord's pipe. This PR changes the other link, the game↔builder frame pipe in channel.rs net_channel. On b15d47e30 the builder still reads that link with a blocking read on a handle that other threads write_all to through a clone, and the game's end (host/net_engine.c) still reads in byte mode. So both halves of the fix are still needed.
  • Pads pipe (type 16, haptics): the pads and files connections are served in Serving::run, which reads and replies on one thread and never writes from another. So read_message isn't needed there, and the PR rightly leaves it alone. The one change those pipes get is PIPE_READMODE_MESSAGE on the client end in pipe_pair. builder_link/slots.rs already sets that mode itself, so the pads and files ends behave as before.
  • Rename and open handling: today's checks of paths before an open come before the rename and don't touch rename() or the old Wine fallback. The PR's change stays local to rename() and its caller.
  • Still to come: mod-api's rebase onto main will move this base again. Everything here except tex_desc_memo.h, vk_memory.cpp, helpers.py and the renderer tests is mod-api-only, so expect only a mechanical rebase. The tex_desc_memo.h fix applies to main too, as the Summary says, and could be split out to main on its own if you want it there sooner.

Per fix

  • Rename by the folder's handle (files_windows.rs): this is correct, and it is a real sandbox fix. The path fallback could be redirected after the check, and the new junction-swap test shows the handle route can't be. The cost is the one in Risks: there is no fallback now, so Wine either takes RootDirectory in NtSetInformationFile(FileRenameInformation) or every confined rename fails there. As far as I know Wine does take it, but I couldn't verify that. Please run test_builder_files_wine.py (or ask someone with Wine to) before this lands; see the inline note.
  • Pipe message mode + read_message: this is correct. Polling every 4 ms adds at most about 4 ms to each mod network message and matches what the game's end already does. There is one small edge case inline.
  • Test mode after hos_sandbox_start in the container (hos_main.c): the order is right, and the Linux main is unchanged. Inside the container hos_options_choose() now runs before game_start_args, against the old comment's "before the options file". I found nothing in the options choice that reads LONGSHOT_DEV_MODS or HOS_MOD_TESTS, so I think it's fine, but I haven't traced it fully.
  • tests:<id> screenshots (gfx.rs): this is fine. :→~ matches storage.rs and profiles.rs, and stripping tests: to find the running mod is narrow.
  • tex_desc_memo.h: this now matches vk_draw.cpp handle_of exactly. The new eligibility clause also keeps a shift_left >= 32 single word out of the memo rather than shifting by it, which is good.
  • tar filter (helpers.py): the checks are now stricter: \ and : are refused, and links are resolved through the real path of the folder already unpacked. This is fine.
  • vk_memory.cpp include order: fine.
  • Tests that fell behind: I skimmed them and none is weakened. They follow code that moved (the small textures' pool, adaptive parts, OS-neutral path joins), and the counters removed from test_game_menu_mouse_buttons.py were never checked.

Testing

What exists: in-game runs on Windows 11 / RTX 5080 (smoke on this head, and before the rebase the probe mod's network, storage and screenshots, Discord, a long accented path, a crash record and Controls), the Rust tests of the crates touched on the rebased head, and the new failing-then-passing tests. CI on the head hasn't reported yet. What's missing: Wine (test_builder_files_wine.py), Linux (the suite and one start), the hand tests on Windows for a mod's confirmed web request and for a mod switched off and on or a packed mod, and the whole Python suite on the rebased head.

Small nits are inline.

🤖 Generated with Claude Code

https://claude.ai/code/session_017vw8e2fJhRpDrY7pgVx6oJ

**Recommendation: Wait.** The code looks right to me and each fix is still needed on today's `mod-api`; what is left before it can land is the Wine run for the rename change, a Linux pass, the hand tests in *Still to test*, and then a rebase once `mod-api`'s own rebase onto `main` is done. Thank you for this round, llun: the tests ahead of each fix make it easy to follow. Code-only review: I read the diff and the code around it, and ran nothing from the PR. ## Against today's `mod-api` The PR's parent is `b15d47e30`, which is `mod-api`'s tip right now, so it already sits on top of today's work (the Insert menu fixes, the round of #2822 review fixes, and HD haptics over the pads pipe). The forge's "not mergeable" looks stale: the merge base it reports is that same commit. I found no textual or behaviour overlap: - **Network pipe:** the net-broker changes on `mod-api` (`ipc_conn.rs` and its `PeekNamedPipe`) are about the broker's own IPC links to the outside, such as Discord's pipe. This PR changes the other link, the game↔builder frame pipe in `channel.rs` `net_channel`. On `b15d47e30` the builder still reads that link with a blocking `read` on a handle that other threads `write_all` to through a clone, and the game's end (`host/net_engine.c`) still reads in byte mode. So both halves of the fix are still needed. - **Pads pipe (type 16, haptics):** the pads and files connections are served in `Serving::run`, which reads and replies on one thread and never writes from another. So `read_message` isn't needed there, and the PR rightly leaves it alone. The one change those pipes get is `PIPE_READMODE_MESSAGE` on the client end in `pipe_pair`. `builder_link/slots.rs` already sets that mode itself, so the pads and files ends behave as before. - **Rename and open handling:** today's checks of paths before an open come before the rename and don't touch `rename()` or the old Wine fallback. The PR's change stays local to `rename()` and its caller. - **Still to come:** `mod-api`'s rebase onto `main` will move this base again. Everything here except `tex_desc_memo.h`, `vk_memory.cpp`, `helpers.py` and the renderer tests is `mod-api`-only, so expect only a mechanical rebase. The `tex_desc_memo.h` fix applies to `main` too, as the Summary says, and could be split out to `main` on its own if you want it there sooner. ## Per fix - **Rename by the folder's handle** (`files_windows.rs`): this is correct, and it is a real sandbox fix. The path fallback could be redirected after the check, and the new junction-swap test shows the handle route can't be. The cost is the one in Risks: there is no fallback now, so Wine either takes `RootDirectory` in `NtSetInformationFile(FileRenameInformation)` or every confined rename fails there. As far as I know Wine does take it, but **I couldn't verify that**. Please run `test_builder_files_wine.py` (or ask someone with Wine to) before this lands; see the inline note. - **Pipe message mode + `read_message`**: this is correct. Polling every 4 ms adds at most about 4 ms to each mod network message and matches what the game's end already does. There is one small edge case inline. - **Test mode after `hos_sandbox_start` in the container** (`hos_main.c`): the order is right, and the Linux `main` is unchanged. Inside the container `hos_options_choose()` now runs before `game_start_args`, against the old comment's "before the options file". I found nothing in the options choice that reads `LONGSHOT_DEV_MODS` or `HOS_MOD_TESTS`, so I think it's fine, but I haven't traced it fully. - **`tests:<id>` screenshots** (`gfx.rs`): this is fine. `:`→`~` matches `storage.rs` and `profiles.rs`, and stripping `tests:` to find the running mod is narrow. - **`tex_desc_memo.h`**: this now matches `vk_draw.cpp` `handle_of` exactly. The new eligibility clause also keeps a `shift_left >= 32` single word out of the memo rather than shifting by it, which is good. - **tar filter** (`helpers.py`): the checks are now stricter: `\` and `:` are refused, and links are resolved through the real path of the folder already unpacked. This is fine. - **`vk_memory.cpp` include order**: fine. - **Tests that fell behind**: I skimmed them and none is weakened. They follow code that moved (the small textures' pool, adaptive parts, OS-neutral path joins), and the counters removed from `test_game_menu_mouse_buttons.py` were never checked. ## Testing What exists: in-game runs on Windows 11 / RTX 5080 (smoke on this head, and before the rebase the probe mod's network, storage and screenshots, Discord, a long accented path, a crash record and Controls), the Rust tests of the crates touched on the rebased head, and the new failing-then-passing tests. CI on the head hasn't reported yet. What's missing: Wine (`test_builder_files_wine.py`), Linux (the suite and one start), the hand tests on Windows for a mod's confirmed web request and for a mod switched off and on or a packed mod, and the whole Python suite on the rebased head. Small nits are inline. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_017vw8e2fJhRpDrY7pgVx6oJ
@ -679,3 +695,3 @@
let leaf = leaf_of(n2);
let replace = access == 1;
match rename(&h, Some(&dir), leaf, replace) {
match rename(&h, &dir, leaf, replace) {
Owner

Refusing instead of falling back to the folder's path is the right call for the sandbox. Since this removes the Wine branch outright, though, a Wine whose NtSetInformationFile ignores or refuses RootDirectory here would fail every confined rename (the cache, saves written as temp-then-rename). I couldn't verify Wine's behaviour from here, so I'd hold the merge for a run of tests/test_builder_files_wine.py.

Refusing instead of falling back to the folder's path is the right call for the sandbox. Since this removes the Wine branch outright, though, a Wine whose `NtSetInformationFile` ignores or refuses `RootDirectory` here would fail every confined rename (the cache, saves written as temp-then-rename). I couldn't verify Wine's behaviour from here, so I'd hold the merge for a run of `tests/test_builder_files_wine.py`.
@ -926,0 +953,4 @@
if ok == 0 {
return Err(std::io::Error::last_os_error());
}
if whole > 0 || left > 0 {
Owner

An edge case, not a bug today: a zero-length message reports whole == 0 && left == 0 as well, so it would never be read, and it would block every message behind it while this loops. Every frame has a header, so it can't happen now. A short comment saying so (or reading when PeekNamedPipe reports a message of 0 bytes) would keep the next user of pipe_pair from falling into it.

An edge case, not a bug today: a zero-length message reports `whole == 0 && left == 0` as well, so it would never be read, and it would block every message behind it while this loops. Every frame has a header, so it can't happen now. A short comment saying so (or reading when `PeekNamedPipe` reports a message of 0 bytes) would keep the next user of `pipe_pair` from falling into it.
@ -0,0 +2,4 @@
sandbox only once the broker's file layer is in.
The test mode's start (game_start_args, game/crates/longshot-game/src/mod_tests.rs) looks at the folder it is given (has
it mod.json? else the mods in it) and sets LONGSHOT_DEV_MODS from what it found. On Windows the sandboxed game is the
Owner

Nit: the test mode looks for mod.toml (as hos_main.c's comment says), not mod.json; and line 20's tests/test_broker_files_wine.py is tests/test_builder_files_wine.py.

Nit: the test mode looks for `mod.toml` (as `hos_main.c`'s comment says), not `mod.json`; and line 20's `tests/test_broker_files_wine.py` is `tests/test_builder_files_wine.py`.
llun force-pushed fix/mod-api-windows-2 from 16d6ee8048
Some checks failed
PR description / Title and description (pull_request_target) Has been cancelled
to ae6cd779f9
Some checks failed
PR description / Title and description (pull_request_target) Has been cancelled
2026-12-02 22:19:31 +00:00
Compare
Author
Member

To the review:

  • L1, fixed. The finding was right: with a link already at a member's own place, the filter let a file, a folder or a hard link through, and the write followed the link outside. It now resolves the whole destination and refuses it when that is outside the folder. A link member is still allowed there, since tarfile removes what is there first and does not follow it. The test came first (73782ad37): it fails without the fix (ae6cd779f) and passes with it, on Windows and on Linux, with a link to a file, to nothing yet and to a folder, and through extractall too.
  • L2, open. There is no Wine on this PC, so test_builder_files_wine.py has not run. If a Wine refuses NtSetInformationFile with a folder's handle, renames fail there; they don't go back to a path. It stays in Still to test.
  • L3, open. test_helpers_extract, test_fs_save_commit and test_cursor_hidden_linux pass on Linux (WSL). The rest of the Linux checks and a game start on Linux can't run on this PC. They stay in Still to test.

Also pushed: the branch is on mod-api @ 72711731c (no conflicts), with fixes for seven checks that fail on mod-api too (test_menu_i18n, test_fps_stats, test_cursor_hidden_linux, test_program_hooks, test_screensaver, test_fs_save_commit, test_crate_readmes).

To the review: - **L1**, fixed. The finding was right: with a link already at a member's own place, the filter let a file, a folder or a hard link through, and the write followed the link outside. It now resolves the whole destination and refuses it when that is outside the folder. A link member is still allowed there, since `tarfile` removes what is there first and does not follow it. The test came first (73782ad37): it fails without the fix (ae6cd779f) and passes with it, on Windows and on Linux, with a link to a file, to nothing yet and to a folder, and through `extractall` too. - **L2**, open. There is no Wine on this PC, so `test_builder_files_wine.py` has not run. If a Wine refuses `NtSetInformationFile` with a folder's handle, renames fail there; they don't go back to a path. It stays in Still to test. - **L3**, open. `test_helpers_extract`, `test_fs_save_commit` and `test_cursor_hidden_linux` pass on Linux (WSL). The rest of the Linux checks and a game start on Linux can't run on this PC. They stay in Still to test. Also pushed: the branch is on `mod-api` @ 72711731c (no conflicts), with fixes for seven checks that fail on `mod-api` too (`test_menu_i18n`, `test_fps_stats`, `test_cursor_hidden_linux`, `test_program_hooks`, `test_screensaver`, `test_fs_save_commit`, `test_crate_readmes`).
Author
Member

Thanks for the review. Pushed, on mod-api @ 72711731c:

  • Empty message (read_message): fixed, not only noted, since what the game writes is not trusted. An empty message did hold the builder's thread: the new test (7641c9a75) times out without the fix (677accb9f). PeekNamedPipe reports no bytes for it, so the pipe's message count is asked too (FSCTL_PIPE_PEEK), and the read ends the link, as the plain read did before. Tested with the game still there and with it gone. build-core's 162 tests and clippy pass.
  • mod.toml and test_builder_files_wine.py: the two names are corrected (4cdd23cea).
  • hos_options_choose() before game_start_args: traced. It only asks the builder for the settings file's place (game_builder_said("settings", …)) and reads no switch, so nothing there can depend on LONGSHOT_DEV_MODS or HOS_MOD_TESTS.
  • Wine, Linux, the hand tests: still open, in Still to test. There is no Wine on this PC and no Linux to run the game on, so someone with them has to run test_builder_files_wine.py, the Linux suite and one start. I agree the merge waits for Wine.
  • Not mergeable / the base: rebased since your review; it will be rebased again after mod-api's own rebase onto main.
  • The Python suite is running whole on this branch; its result goes into Testing.
Thanks for the review. Pushed, on `mod-api` @ 72711731c: - **Empty message** (`read_message`): fixed, not only noted, since what the game writes is not trusted. An empty message did hold the builder's thread: the new test (7641c9a75) times out without the fix (677accb9f). `PeekNamedPipe` reports no bytes for it, so the pipe's message count is asked too (`FSCTL_PIPE_PEEK`), and the read ends the link, as the plain read did before. Tested with the game still there and with it gone. build-core's 162 tests and clippy pass. - **`mod.toml` and `test_builder_files_wine.py`**: the two names are corrected (4cdd23cea). - **`hos_options_choose()` before `game_start_args`**: traced. It only asks the builder for the settings file's place (`game_builder_said("settings", …)`) and reads no switch, so nothing there can depend on `LONGSHOT_DEV_MODS` or `HOS_MOD_TESTS`. - **Wine, Linux, the hand tests**: still open, in Still to test. There is no Wine on this PC and no Linux to run the game on, so someone with them has to run `test_builder_files_wine.py`, the Linux suite and one start. I agree the merge waits for Wine. - **Not mergeable / the base**: rebased since your review; it will be rebased again after `mod-api`'s own rebase onto `main`. - The Python suite is running whole on this branch; its result goes into Testing.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
PeekNamedPipe shows a message of no bytes as no message: the game could hold the builder's thread with one (HumanBean's review).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
docs(tests): the test mode's start check names the files it means
Some checks failed
PR description / Title and description (pull_request_target) Has been cancelled
4cdd23cea2
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Author
Member

L2, Wine: run, and the renames work. Wine 9.0 (Ubuntu's, in WSL), on 4cdd23cea. I said there was no Wine here; I have since installed it.

test_builder_files_wine.py's two programs were built on Windows with llvm-mingw, then run under Wine by the test's own steps (its folders, its arguments, its verdict): 27 checks pass, none fail. Among them: MoveFileExW over another file, the CRT's rename(), a rename out of the cache refused. No file was made outside the roots. Wine made no junction, so that part did not run. build-core's own rename tests pass there too.

Two other build-core tests do not pass under Wine:

  • the_cache_takes_files_folders_renames_and_removes never ends. This pull request does not change it. Its log repeats the deletes that clean up its folder, so I take it to be the cleanup; I did not trace it further or run it on mod-api alone.
  • an_empty_message_ends_the_read, new here, times out: Wine 9.0 does not count an empty message. A game that sent one there would stop its own network link. Longshot's frames each have a header, so none is sent.

Not run on Wine: the game itself, or a sandboxed screenshot (Wine has no AppContainer).

**L2, Wine: run, and the renames work.** Wine 9.0 (Ubuntu's, in WSL), on 4cdd23cea. I said there was no Wine here; I have since installed it. `test_builder_files_wine.py`'s two programs were built on Windows with llvm-mingw, then run under Wine by the test's own steps (its folders, its arguments, its verdict): **27 checks pass, none fail**. Among them: `MoveFileExW` over another file, the CRT's `rename()`, a rename out of the cache refused. No file was made outside the roots. Wine made no junction, so that part did not run. build-core's own rename tests pass there too. Two other build-core tests do not pass under Wine: - `the_cache_takes_files_folders_renames_and_removes` never ends. This pull request does not change it. Its log repeats the deletes that clean up its folder, so I take it to be the cleanup; I did not trace it further or run it on `mod-api` alone. - `an_empty_message_ends_the_read`, new here, times out: Wine 9.0 does not count an empty message. A game that sent one there would stop its own network link. Longshot's frames each have a header, so none is sent. Not run on Wine: the game itself, or a sandboxed screenshot (Wine has no AppContainer).
The launcher manifest's reads the builds' names however they are listed; the real-Vulkan present fixture has DLSS Frame Generation's call (it runs only where it is asked for, so nothing showed it).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
test: the debug page's key and OpenFile's core are checked with the newest keybind and storage code
Some checks failed
PR description / Title and description (pull_request_target) Has been cancelled
68dc72c7b6
The stand-ins for a Keybind that listens and for the mods' storage notes, and checks of both.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
test(builder): the check of a path by its text runs on Windows with its drive
Some checks failed
PR description / Title and description (pull_request_target) Has been cancelled
b4103061a8
A path with no drive is no whole path on Windows: the test failed there, and its refusals held for that reason alone.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
build(rust): oxc's formatter crates are their own roots, so a nested checkout is formatted
Some checks failed
PR description / Title and description (pull_request_target) Has been cancelled
8785034572
cargo fmt --all in a worktree inside another checkout took that one for the two excluded crates' workspace and failed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
test(rust): nine crates' tests build when run alone on Windows
All checks were successful
PR description / Title and description (pull_request_target) Successful in 7s
615d8e26ec
They reach host-sys through content, whose host functions a test has not: linking failed on Windows unless another crate of the run brought the stand-in (host-sys' fake). Tests alone; no build of the builder or the game takes it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
On Windows a connect to any host but this PC ends at once with an invalid argument.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
fix(mods): Windows: a mod's connection is made once its connect is done
Some checks failed
PR description / Title and description (pull_request_target) Has been cancelled
887dbd382a
Windows gives a socket its peer's address while it still connects, so it was taken for connected and its options set too early: every connection that was not to this PC failed with an invalid argument. Asked with select now.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Author
Member

Pushed, on mod-api @ 72711731c (887dbd382):

  • A mod could not reach any server on the internet on Windows. The builder's engine asked for the socket's peer address to know the connect was done; Windows gives that while it still connects, so the options were set too soon and every connection to another computer failed (10022). select is asked now. The test came first (411dd1b5b). In the confined game a development mod's fetch is answered 200, 3 times of 3; it failed 3 of 3 before.
  • A correction. I said a probe mod's network test passed. It was too loose: it took a refusal for a pass. The link did stay up, but no request was answered until this fix.
  • For you to decide: a mod's tests in the game get no network. They run as tests:<mod>, which neither the game's grant (since b15d47e30) nor the builder's bounds know, so they are told "the network is not available here". I left it, since it is about who the sandbox lets out. The fake game's server covers most of it; the message could say so.
  • Also in: four more checks behind newer code, a path test of build-driver that could not pass on Windows, nine crates' tests that did not link alone on Windows, and cargo fmt --all in a checkout inside another one. The Rust and Python runs are in Testing.
  • Seen, not changed: game-sites' tests fail now and then when run together (9 of 200 runs; 0 of 100 one at a time). One counts what the others change; I have not looked into the rest.
Pushed, on `mod-api` @ 72711731c (887dbd382): - **A mod could not reach any server on the internet on Windows.** The builder's engine asked for the socket's peer address to know the connect was done; Windows gives that while it still connects, so the options were set too soon and every connection to another computer failed (10022). `select` is asked now. The test came first (411dd1b5b). In the confined game a development mod's `fetch` is answered 200, 3 times of 3; it failed 3 of 3 before. - **A correction.** I said a probe mod's network test passed. It was too loose: it took a refusal for a pass. The link did stay up, but no request was answered until this fix. - **For you to decide: a mod's tests in the game get no network.** They run as `tests:<mod>`, which neither the game's grant (since b15d47e30) nor the builder's bounds know, so they are told "the network is not available here". I left it, since it is about who the sandbox lets out. The fake game's server covers most of it; the message could say so. - **Also in:** four more checks behind newer code, a path test of build-driver that could not pass on Windows, nine crates' tests that did not link alone on Windows, and `cargo fmt --all` in a checkout inside another one. The Rust and Python runs are in Testing. - **Seen, not changed:** `game-sites`' tests fail now and then when run together (9 of 200 runs; 0 of 100 one at a time). One counts what the others change; I have not looked into the rest.
Built by cargo test alone for Windows' gnullvm, the test's program loads libunwind.dll, which keep refuses, rightly: a program's headers made here stand in for it then.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
test(sites): the tests that run the phase or retire take turns
Some checks failed
PR description / Title and description (pull_request_target) Has been cancelled
4d20f5e784
They share one phase and one list of what is retired, so about 1 run in 12 failed by chance (a let-go half done by another test, a count another moved, an ended thread's number given to a new one). One counted its hook in after the removal it was to hold back.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Author
Member

Pushed (4d20f5e78), tests only:

  • game-sites' chance failures are fixed. 56 of 800 runs failed before; 0 of 2000 after. The tests share one phase and one list of what is retired, so one's half-done reclaim, count or thread changed another's answer. They take turns now. One also counted its hook in after the removal it was to hold back. I found no bug of the game's behind any of them.
  • test_lifter passes whole on this head: fmt, clippy and every Rust test. The last thing in its way was a build-tools test whose own program loads libunwind when built by cargo test alone.
  • The description has both.
Pushed (4d20f5e78), tests only: - **`game-sites`' chance failures are fixed.** 56 of 800 runs failed before; 0 of 2000 after. The tests share one phase and one list of what is retired, so one's half-done reclaim, count or thread changed another's answer. They take turns now. One also counted its hook in after the removal it was to hold back. I found no bug of the game's behind any of them. - **`test_lifter` passes whole** on this head: fmt, clippy and every Rust test. The last thing in its way was a build-tools test whose own program loads libunwind when built by `cargo test` alone. - The description has both.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
fix(mods): a mod's tests in the game reach what the mod may
All checks were successful
PR description / Title and description (pull_request_target) Successful in 33s
610aa6d8cc
They run as tests:<id>, which has no manifest, so their network was nothing ("the network is not available here"). They hold the mod's grants: they are told by its id and held to its manifest, as the mod is. The builder judges them as it judges the mod.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Author
Member

Pushed (610aa6d8c), after the answer that tests should match the game:

  • A mod's tests in the game now reach what the mod may. The test came first (be3e6c7f1). They are told to the builder by their mod's id and held to its manifest. The builder's rules are unchanged.
  • In the sandboxed game: with the mod named to the builder (LONGSHOT_DEV_MODS, as mod run does), a listed server answers 200 and one not listed is refused.
  • Still refused: a plain dev.py game-tests run. The builder only knows the mods it was told of, and the test mode names its mods inside the game, after the builder started. Two ways to let them through: take the mods of the HOS_MOD_TESTS folder as development mods (no question asked), or know them and ask in the builder's window as for any mod. I did neither: the first lets every mod tested reach its servers with no yes from anyone, since the test mode grants a mod all its manifest lists.
  • Found, not changed: two example mods name things the game does not have. magic-item copies Weapon_Bomb (it is Obj_Bomb), and tough-octoroks patches an EnemyParam file (it is MaxLife in Life/LifeParameters/Enemy_Octorok.game__life__LifeParameters.bgyml). With those names both work in the game; content.md, files.md and dev.md name the EnemyParam file too.
Pushed (610aa6d8c), after the answer that tests should match the game: - **A mod's tests in the game now reach what the mod may.** The test came first (be3e6c7f1). They are told to the builder by their mod's id and held to its manifest. The builder's rules are unchanged. - **In the sandboxed game:** with the mod named to the builder (`LONGSHOT_DEV_MODS`, as `mod run` does), a listed server answers 200 and one not listed is refused. - **Still refused: a plain `dev.py game-tests` run.** The builder only knows the mods it was told of, and the test mode names its mods inside the game, after the builder started. Two ways to let them through: take the mods of the `HOS_MOD_TESTS` folder as development mods (no question asked), or know them and ask in the builder's window as for any mod. I did neither: the first lets every mod tested reach its servers with no yes from anyone, since the test mode grants a mod all its manifest lists. - **Found, not changed:** two example mods name things the game does not have. `magic-item` copies `Weapon_Bomb` (it is `Obj_Bomb`), and `tough-octoroks` patches an `EnemyParam` file (it is `MaxLife` in `Life/LifeParameters/Enemy_Octorok.game__life__LifeParameters.bgyml`). With those names both work in the game; `content.md`, `files.md` and `dev.md` name the `EnemyParam` file too.
llun force-pushed fix/mod-api-windows-2 from 610aa6d8cc
All checks were successful
PR description / Title and description (pull_request_target) Successful in 33s
to 078929a2d0
Some checks failed
PR description / Title and description (pull_request_target) Has been cancelled
2026-12-03 00:22:34 +00:00
Compare
test: the HUD layer's check has main's newest frame generation's stand-ins
All checks were successful
PR description / Title and description (pull_request_target) Successful in 6s
e4741a8bf5
NVIDIA DLSS Frame Generation asks for the HUD copies too.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
llun force-pushed fix/mod-api-windows-2 from e4741a8bf5
All checks were successful
PR description / Title and description (pull_request_target) Successful in 6s
to a98c9cbe0d
Some checks failed
PR description / Title and description (pull_request_target) Has been cancelled
2026-12-03 00:52:48 +00:00
Compare
llun force-pushed fix/mod-api-windows-2 from a98c9cbe0d
Some checks failed
PR description / Title and description (pull_request_target) Has been cancelled
to 6390ffb41c
All checks were successful
PR description / Title and description (pull_request_target) Successful in 8s
2026-12-03 01:01:27 +00:00
Compare
Author
Member

Pushed, rebased onto mod-api after its move to main (@ 982a45f82). The page shows only this pull request's changes again.

  • A mod under test is asked about, as any other: the builder knows the mods of HOS_MOD_TESTS now and asks in its own window. No yes, no network. It follows ab5592e2c: a yes is the copy's it was given to, and a changed mod is asked about again. The test fails if a mod is let through unasked.
  • The two example mods (magic-item, tough-octoroks) and the guide pages name what the game has. Both apply in the game.
  • In the sandboxed game, new: a packed mod loads; in the Mods tab it switches off (it stops) and on again (it starts, its data kept).
  • Checks: test_lifter whole and 821 Python checks passed on 45441c842. Twelve checks that had fallen behind newer code are fixed; where mod-api had fixed one too, its version is kept.
  • Still open: Linux, and a click in the builder's window.
Pushed, rebased onto `mod-api` after its move to `main` (@ 982a45f82). The page shows only this pull request's changes again. - **A mod under test is asked about**, as any other: the builder knows the mods of `HOS_MOD_TESTS` now and asks in its own window. No yes, no network. It follows ab5592e2c: a yes is the copy's it was given to, and a changed mod is asked about again. The test fails if a mod is let through unasked. - **The two example mods** (`magic-item`, `tough-octoroks`) and the guide pages name what the game has. Both apply in the game. - **In the sandboxed game, new:** a packed mod loads; in the Mods tab it switches off (it stops) and on again (it starts, its data kept). - **Checks:** `test_lifter` whole and 821 Python checks passed on 45441c842. Twelve checks that had fallen behind newer code are fixed; where `mod-api` had fixed one too, its version is kept. - **Still open:** Linux, and a click in the builder's window.
Author
Member

Pushed (c3efe29eb), on mod-api @ e9dd5aec5. One part of it replaces code you reviewed:

  • The network pipe is read another way. read_message, which looked for a message every 4 ms, is gone, and the NtFsControlFile call with it. The builder's end is overlapped now (message_pair, MessageEnd): a read waits on its own while other threads write. The pipe's name, its one instance, its owner-only access and the check of who opened it are as they were, and the pads and files pipes are not changed.
  • Why: on Wine 9.0 an empty message held the read, since Wine does not count one. It ends the link now, on Windows and on Wine: the 5 pipe tests pass on both.
  • In the sandboxed game, before the last rebase: mods' requests answer 200, and the Discord status shows on a profile.
  • the_cache_takes_files_folders_renames_and_removes ends under Wine. It never did, on mod-api alone too: it kept a folder's handle open.
  • test_ui_renderer asked for the Compact key's old fixed keys; it reads the bound key now.
Pushed (c3efe29eb), on `mod-api` @ e9dd5aec5. One part of it replaces code you reviewed: - **The network pipe is read another way.** `read_message`, which looked for a message every 4 ms, is gone, and the `NtFsControlFile` call with it. The builder's end is overlapped now (`message_pair`, `MessageEnd`): a read waits on its own while other threads write. The pipe's name, its one instance, its owner-only access and the check of who opened it are as they were, and the pads and files pipes are not changed. - **Why:** on Wine 9.0 an empty message held the read, since Wine does not count one. It ends the link now, on Windows and on Wine: the 5 pipe tests pass on both. - **In the sandboxed game, before the last rebase:** mods' requests answer 200, and the Discord status shows on a profile. - **`the_cache_takes_files_folders_renames_and_removes` ends under Wine.** It never did, on `mod-api` alone too: it kept a folder's handle open. - **`test_ui_renderer`** asked for the Compact key's old fixed keys; it reads the bound key now.
llun force-pushed fix/mod-api-windows-2 from 6390ffb41c
All checks were successful
PR description / Title and description (pull_request_target) Successful in 8s
to c3efe29eb8
Some checks failed
PR description / Title and description (pull_request_target) Failing after 6s
2026-12-03 01:33:10 +00:00
Compare
Author
Member
@review
BeanBot left a comment

Recommendation: Approve. The code is ready: only testing is left. The tar extraction fix covers the reported leaf-symlink case, and the Wine rename run passed. The renderer and shared changes still need a Linux game run, and the pull request is reported as not mergeable. Recommend approval; not approved on the forge.

This combines Windows sandbox, mod networking and test-mode fixes with a texture lookup correction, safer archive extraction and repaired checks. The fixes have reported Windows coverage, but Linux game behavior remains unverified.

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

  • L3 gpu/vk/tex_desc_memo.h:108: The renderer change and the shared code have not been exercised in a Linux game run. When: The changed texture-handle path is enabled by default on Linux as well as Windows, but the reported game run covers only Windows. Do: Run the Linux checks and a game start through a representative scene, including affected Tier 1 hardware as available.

Since the last review (on 9f0a505ad2)
Resolved: L1 (The destination check resolves only the parent, so it does not reject an existing leaf sym…); L2 (The replacement rename path has not been exercised on Wine, where the previous path fallba…)
Still open: L3 (The renderer change and the shared code have not been exercised in a Linux game run.)

Checks: Still running: PR description / Title and description (pull_request_target).

Also noticed (1; not asked for, not blocking)
  • The pull request is reported as not mergeable and its description check is still running.
More: does it help, other systems, switches, what was read

Does it help: Yes for the reported fixes: the author reports three successful external fetches after three failures before, and 27 Wine file-service checks passing. This is not a performance change.

Other systems: Windows and Wine have reported runs; Wine 9.0 passed the rename checks but could not exercise junctions or an AppContainer. Linux extraction checks passed, while the Linux game and renderer still need a run.

Switches: No switches added, changed or removed.

Reviewed: c3efe29eb8 against e9dd5aec5d: Read AGENTS.md, CONTRIBUTING.md, the pull request template, scripts/helpers.py, net-broker/src/sock.rs, game API networking and the texture memo; inspected the rename path, extraction tests, key networking diffs, commit list and reported runs. The remaining changed files and surrounding code were not read in full; the repository review checklist was not present.; nothing run (a code review).

Checked and fine:

  • The extraction filter checks the resolved destination of regular files, directories and hard links, including an existing leaf symlink.
  • The reported Wine run exercised the replacement rename path.

Testing: No code or tests were run in this review. The author reports Windows game and test runs, Wine checks, and selected Linux extraction checks; a Linux game run remains outstanding.

Overlaps and merge order: The pull request targets mod-api; no other overlapping pull requests were independently checked.


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

**Recommendation: Approve.** The code is ready: only testing is left. The tar extraction fix covers the reported leaf-symlink case, and the Wine rename run passed. The renderer and shared changes still need a Linux game run, and the pull request is reported as not mergeable. Recommend approval; not approved on the forge. This combines Windows sandbox, mod networking and test-mode fixes with a texture lookup correction, safer archive extraction and repaired checks. The fixes have reported Windows coverage, but Linux game behavior remains unverified. **Testing before merging (1)** (runs on the systems it can change; it doesn't hold the recommendation) - **L3** `gpu/vk/tex_desc_memo.h:108`: The renderer change and the shared code have not been exercised in a Linux game run. *When:* The changed texture-handle path is enabled by default on Linux as well as Windows, but the reported game run covers only Windows. **Do:** Run the Linux checks and a game start through a representative scene, including affected Tier 1 hardware as available. **Since the last review** (on 9f0a505ad23f) Resolved: L1 (The destination check resolves only the parent, so it does not reject an existing leaf sym…); L2 (The replacement rename path has not been exercised on Wine, where the previous path fallba…) Still open: L3 (The renderer change and the shared code have not been exercised in a Linux game run.) **Checks:** Still running: `PR description / Title and description (pull_request_target)`. <details> <summary>Also noticed (1; not asked for, not blocking)</summary> - The pull request is reported as not mergeable and its description check is still running. </details> <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Yes for the reported fixes: the author reports three successful external fetches after three failures before, and 27 Wine file-service checks passing. This is not a performance change. **Other systems:** Windows and Wine have reported runs; Wine 9.0 passed the rename checks but could not exercise junctions or an AppContainer. Linux extraction checks passed, while the Linux game and renderer still need a run. **Switches:** No switches added, changed or removed. **Reviewed:** c3efe29eb84a against e9dd5aec5d54: Read AGENTS.md, CONTRIBUTING.md, the pull request template, scripts/helpers.py, net-broker/src/sock.rs, game API networking and the texture memo; inspected the rename path, extraction tests, key networking diffs, commit list and reported runs. The remaining changed files and surrounding code were not read in full; the repository review checklist was not present.; nothing run (a code review). **Checked and fine:** - The extraction filter checks the resolved destination of regular files, directories and hard links, including an existing leaf symlink. - The reported Wine run exercised the replacement rename path. **Testing:** No code or tests were run in this review. The author reports Windows game and test runs, Wine checks, and selected Linux extraction checks; a Linux game run remains outstanding. **Overlaps and merge order:** The pull request targets mod-api; no other overlapping pull requests were independently checked. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.</sub>
llun changed title from WIP: fix: mod-api on Windows, second round: renames, mods' network, test mode and the checks to fix: mod-api on Windows, second round: renames, mods' network, test mode and the checks 2026-12-03 01:36:58 +00:00
BeanBot left a comment

Recommendation: Approve. The code is ready: only testing is left. The fixes have reported Windows game coverage, but the renderer and shared changes have not had the Linux game run requested before merge. Recommend approval; not approved on the forge.

The change fixes Windows sandbox renames, mod networking and test mode, corrects texture handle selection and tar extraction, and updates checks and examples. It removes several reported failures at the cost of a broad set of changes that still needs Linux game coverage.

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

  • L3 gpu/vk/tex_desc_memo.h:108: The renderer change and the shared code have not been exercised in a Linux game run. When: The changed texture-handle path is enabled by default on Linux as well as Windows, but the reported game run covers only Windows. Do: Run the Linux checks and a game start through a representative scene, including affected Tier 1 hardware as available.

Since the last review (on c3efe29eb8)
Still open: L3 (The renderer change and the shared code have not been exercised in a Linux game run.)

Checks: Still running: PR description / Title and description (pull_request_target).

Also noticed (1; not asked for, not blocking)
  • The pull request is reported as not mergeable and its description check is still running.
More: does it help, other systems, switches, what was read

Does it help: Yes for the reported Windows failures: the author reports three of three network requests succeeding after the fix versus three failures before it, plus successful sandbox smoke and mod tests. This is not a performance change.

Other systems: Windows and Wine have reported coverage, including 27 Wine file checks and five pipe tests; Wine could not exercise junction creation or AppContainer. Linux shared code and Vulkan rendering still need a game run.

Switches: No switches added, changed or removed. The existing RX_VK_TEX_DESC_MEMO switch remains enabled by default.

Reviewed: c3efe29eb8 against e9dd5aec5d: Read AGENTS.md, CONTRIBUTING.md, the pull request template and gpu/vk/tex_desc_memo.h in full; reviewed the supplied description, comments, review, ledger and CI results, and the diff summary and commit list. The remaining changed files and full diff were not read in this re-check.; nothing run (a code review).

Checked and fine:

  • The texture memo applies the single-word shift and excludes unsupported shift counts from its fast path.
  • The reported Windows game and Wine runs cover several of the changed sandbox and network paths.

Testing: No commands from the project or tests were run. The author reports Windows game and automated checks and Wine checks; a Linux game start exercising the renderer and shared changes remains outstanding.

Overlaps and merge order: No current overlap established; the earlier review found no overlap with the then-current mod-api changes.


Automated code review by BeanBot (gpt-6.1-terra), asked for by BeanBot, as llun took it out of WIP. Nothing was run; a maintainer decides.

**Recommendation: Approve.** The code is ready: only testing is left. The fixes have reported Windows game coverage, but the renderer and shared changes have not had the Linux game run requested before merge. Recommend approval; not approved on the forge. The change fixes Windows sandbox renames, mod networking and test mode, corrects texture handle selection and tar extraction, and updates checks and examples. It removes several reported failures at the cost of a broad set of changes that still needs Linux game coverage. **Testing before merging (1)** (runs on the systems it can change; it doesn't hold the recommendation) - **L3** `gpu/vk/tex_desc_memo.h:108`: The renderer change and the shared code have not been exercised in a Linux game run. *When:* The changed texture-handle path is enabled by default on Linux as well as Windows, but the reported game run covers only Windows. **Do:** Run the Linux checks and a game start through a representative scene, including affected Tier 1 hardware as available. **Since the last review** (on c3efe29eb84a) Still open: L3 (The renderer change and the shared code have not been exercised in a Linux game run.) **Checks:** Still running: `PR description / Title and description (pull_request_target)`. <details> <summary>Also noticed (1; not asked for, not blocking)</summary> - The pull request is reported as not mergeable and its description check is still running. </details> <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Yes for the reported Windows failures: the author reports three of three network requests succeeding after the fix versus three failures before it, plus successful sandbox smoke and mod tests. This is not a performance change. **Other systems:** Windows and Wine have reported coverage, including 27 Wine file checks and five pipe tests; Wine could not exercise junction creation or AppContainer. Linux shared code and Vulkan rendering still need a game run. **Switches:** No switches added, changed or removed. The existing RX_VK_TEX_DESC_MEMO switch remains enabled by default. **Reviewed:** c3efe29eb84a against e9dd5aec5d54: Read AGENTS.md, CONTRIBUTING.md, the pull request template and gpu/vk/tex_desc_memo.h in full; reviewed the supplied description, comments, review, ledger and CI results, and the diff summary and commit list. The remaining changed files and full diff were not read in this re-check.; nothing run (a code review). **Checked and fine:** - The texture memo applies the single-word shift and excludes unsupported shift counts from its fast path. - The reported Windows game and Wine runs cover several of the changed sandbox and network paths. **Testing:** No commands from the project or tests were run. The author reports Windows game and automated checks and Wine checks; a Linux game start exercising the renderer and shared changes remains outstanding. **Overlaps and merge order:** No current overlap established; the earlier review found no overlap with the then-current mod-api changes. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by BeanBot, as llun took it out of WIP. Nothing was run; a maintainer decides.</sub>
llun force-pushed fix/mod-api-windows-2 from c3efe29eb8
Some checks failed
PR description / Title and description (pull_request_target) Failing after 6s
to ff6d3ddbc8
Some checks failed
PR description / Title and description (pull_request_target) Failing after 6s
2026-12-03 02:07:42 +00:00
Compare
HumanBean left a comment

Recommendation: Wait. I've re-read the code at ff6d3ddbc, and I would approve it once Linux has run it.

Thank you for the quick and thorough follow-ups, llun. The code that replaced what I reviewed reads well:

  • MessageEnd uses an event and an OVERLAPPED per call, and GetOverlappedResult waits for the I/O to end, so nothing outlives its buffer. A broken pipe or an empty message ends the link.
  • The select check in sock.rs applies to Windows alone.
  • tested_mods is asked about like any player's mod, and the yes is bound to the copy it was given for. grant_of maps tests:<id> to its mod's own grants and manifest.

The Wine run covers my earlier point about the rename, and the empty-message fix covers the other.

What still holds the approval:

  • Linux. Nothing has run there beyond three checks in WSL. This head changes code Linux runs as well: tex_desc_memo.h (the memo is on by default), the network grants for tests: and the builder's bounds, game-sites, and hos_main.c. It needs a Linux compile of the host and game (llvm-mingw and Linux, the unticked box), the suite, and one start into a scene.
  • The description check fails on the head. Three boxes are unticked (one topic, mise run test on one head, host builds on Linux). The new HOS_MOD_TESTS hint also needs an answer: as far as I can tell it reads an existing switch, so it can be deleted with a word why.
  • By hand: the builder's window asking about a mod under test, and a click on it, is still in Still to test.

Once a Linux run is posted and the description check passes, this can be approved.

🤖 Generated with Claude Code

https://claude.ai/code/session_017vw8e2fJhRpDrY7pgVx6oJ

**Recommendation: Wait.** I've re-read the code at ff6d3ddbc, and I would approve it once Linux has run it. Thank you for the quick and thorough follow-ups, llun. The code that replaced what I reviewed reads well: - `MessageEnd` uses an event and an `OVERLAPPED` per call, and `GetOverlappedResult` waits for the I/O to end, so nothing outlives its buffer. A broken pipe or an empty message ends the link. - The `select` check in `sock.rs` applies to Windows alone. - `tested_mods` is asked about like any player's mod, and the yes is bound to the copy it was given for. `grant_of` maps `tests:<id>` to its mod's own grants and manifest. The Wine run covers my earlier point about the rename, and the empty-message fix covers the other. What still holds the approval: - **Linux.** Nothing has run there beyond three checks in WSL. This head changes code Linux runs as well: `tex_desc_memo.h` (the memo is on by default), the network grants for `tests:` and the builder's bounds, `game-sites`, and `hos_main.c`. It needs a Linux compile of the host and game (llvm-mingw and Linux, the unticked box), the suite, and one start into a scene. - **The description check fails on the head.** Three boxes are unticked (one topic, `mise run test` on one head, host builds on Linux). The new `HOS_MOD_TESTS` hint also needs an answer: as far as I can tell it reads an existing switch, so it can be deleted with a word why. - **By hand:** the builder's window asking about a mod under test, and a click on it, is still in *Still to test*. Once a Linux run is posted and the description check passes, this can be approved. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_017vw8e2fJhRpDrY7pgVx6oJ
HumanBean force-pushed fix/mod-api-windows-2 from ff6d3ddbc8
Some checks failed
PR description / Title and description (pull_request_target) Failing after 6s
to b63d69b651
Some checks failed
PR description / Title and description (pull_request_target) Failing after 7s
2026-12-03 02:35:50 +00:00
Compare
HumanBean approved these changes 2026-12-03 02:36:09 +00:00
HumanBean left a comment

Approve.

I rebased this onto mod-api fc5275ca (the head was ff6d3ddb, now b63d69b6): your 44 commits one by one, still yours. One conflict, in tests/test_ui_renderer.py: mod-api and your last commit had both updated the compact key's check, and I kept yours.

Checked on Linux on the rebased head (CachyOS, RTX 3090):

  • cargo fmt --check, cargo clippy --workspace --all-targets -D warnings
  • cargo test --workspace --exclude modtool
  • tests/run_all.py: 865 passed, 12 skipped, 2 failed (test_lifter, test_vk_wb_cpu_words_fast; both fail on main too)
  • dev.py rt
  • dev.py smoke: PASS (in play from kokiri-start, 900 frames, the Insert menu opened)

With the Wine and Windows runs you reported before the rebase, that covers what my earlier comment was waiting on.

Not covered, for the record: modtool's tests were not rerun on the rebased head, nothing was run on Windows after the rebase, and the builder's window asking about a mod under test has not been clicked by hand. The description check still wants its unticked boxes.

🤖 Generated with Claude Code

https://claude.ai/code/session_017vw8e2fJhRpDrY7pgVx6oJ

**Approve.** I rebased this onto `mod-api` fc5275ca (the head was `ff6d3ddb`, now `b63d69b6`): your 44 commits one by one, still yours. One conflict, in `tests/test_ui_renderer.py`: `mod-api` and your last commit had both updated the compact key's check, and I kept yours. **Checked on Linux on the rebased head** (CachyOS, RTX 3090): - `cargo fmt --check`, `cargo clippy --workspace --all-targets -D warnings` - `cargo test --workspace --exclude modtool` - `tests/run_all.py`: 865 passed, 12 skipped, 2 failed (`test_lifter`, `test_vk_wb_cpu_words_fast`; both fail on main too) - `dev.py rt` - `dev.py smoke`: PASS (in play from `kokiri-start`, 900 frames, the Insert menu opened) With the Wine and Windows runs you reported before the rebase, that covers what my earlier comment was waiting on. **Not covered, for the record:** `modtool`'s tests were not rerun on the rebased head, nothing was run on Windows after the rebase, and the builder's window asking about a mod under test has not been clicked by hand. The description check still wants its unticked boxes. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_017vw8e2fJhRpDrY7pgVx6oJ
HumanBean merged commit 0577b0cfd5 into mod-api 2026-12-03 02:43:49 +00:00
HumanBean deleted branch fix/mod-api-windows-2 2026-12-03 02:43:50 +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!3037
No description provided.