WIP: feat(saves): save slots as a system mod: Save as New, a save list, 50 slots a quest, a set number of autosaves (#2643) #2818

Draft
dyst wants to merge 1770 commits from dyst/Longshot:feat/save-slots-sysmod into mod-api
Member

Summary

The game has 6 save slots a quest, shared between its autosaves and one manual save. This adds a built-in mod, system/save-slots:

  • Save as New (X on the pause menu's System tab) saves the game into a new slot, through the game's own Save.
  • Pause > Save with two or more manual saves opens a list of them: A saves over one, X saves into a new one, B goes back. With none or one it is the game's own Save.
  • 50 slots a quest, and one row in Gameplay, Autosaves to keep (1 to 40, 6 by default, after a restart). Nothing a player saved is ever deleted.
  • Continue and Load list every save there is, never fewer than the game's 6 places.

Past the game's 6 the two quests take turns over the folders (slot_12, 14, ... and slot_13, 15, ...), so neither writes the other's. An emulator or Hookshot shows only its own 6 of each. docs/dev/reference/saves.md has the table. See #2643.

The core gives the mod: a part pane copied into a layout as the game builds it (game_core::layouts, site layout.build; the list's prompt bar has two slots and needs a third), the buttons the game was given (host_sys::input::buttons_given, #2641), a guest thread's TLS slot, the options and the loading mods before the mods start (#2644), and ui.paneDirty as a core site, as two mods use it now.

Read first: game/mods/save-slots/README.md (every site it uses and why), then slots.rs (which slot a save takes), files.rs (which folder), game/crates/game-core/src/layouts.rs.

It stands alone. Its prompts are clickable once the clickable prompts branch (#2642, its PR follows) is in, and on a wider picture its list's bar is stretched until #2817 is in.

Testing

Tested: Windows 11, RTX 3080, a build of mod-api 4c498c8aa with this branch, the clickable prompts branch and the Widescreen fix merged (c9c84b690), headless through the control bridge with the sandbox off (HOS_SANDBOX=0), against plain 4c498c8aa where it says so. Not run with this branch alone.

  • 21:9 and 16:9, in play, System tab: Save as New (X) asks, and the confirm saves into slot 9, whose folder is slot_18. Save then opens the list of two manual saves, the new one first; B goes back to the System tab.
  • The folders there before (slot_00 to slot_05, slot_12, slot_14, slot_16) are all still there; slot_18 is the new one.
  • 21:9: the file select with these saves, Continue into play.
  • No crash in any of the runs, and the game ends on request each time.

Saving over an entry, and X in the list into a new save, were run before the rebase (an earlier build) and not again on this one.

cargo test: the mod's 18 pass; game-core 350 pass (346 on plain mod-api). The mod's saved row is in tests/test_menu_ini_keys.py's FROZEN (save_autosaves). Two amends since then changed comments only. cargo test fails on the same four tests here and on plain mod-api on this PC, and on no other: api a_content_mods_changed_module_runs_again_and_its_outputs_are_served, longshot-game a_folder_of_mods_tests_each_of_its_folders, a_mods_profile_sits_inside_the_launchers_save_folder, a_separate_mod_moves_the_saves_into_its_profile_and_records_it. cargo fmt --check names the same four files as plain mod-api does. The checks under tests/: 19 fail here and the same 19 on plain mod-api on this PC. mod-api was squashed to 9e6b9c578 as this opened, so until the branch is moved onto it the diff here shows the old history as well: only the top commit is this change. The commit applies to 9e6b9c578 unchanged; it has not been built there.

Still to test:

  • Master Quest: Save as New and the list, expecting the folders slot_13, 15, ... and the normal game's saves untouched (by hand)
  • A long game with many saves: the list scrolled, the autosaves rotating past their count, expecting a manual save never taken (by hand)
  • Linux: the same, and a save folder moved between Windows and Linux (by hand)
  • The mod turned off with saves past 6 on disk: expecting the game's own 6 as they were, the others untouched (by hand)

Known limits: the list's third prompt is drawn by the pause menu's own "Save as New" showing through, not by the overlay (its slot lookup does not reach the copied pane yet; README, "Not yet"). "Save as New" is English only.

Measurements

Not measured: no timing run yet.

Risks

Saves: the slot choosers (save.chooseAuto, save.chooseManual), the caption manager's size and the folder numbering (save.fileSlot*) are the game's own below slot 6. Saves past 6 are in new folders that older Longshot builds ignore, so going back to one hides them without losing them; the launcher's free-slot placement assumes 6. layout.build changes a layout's shared resource once, for the one layout a mod names. Turn the mod off in the Mods tab for the game's own saves.

Checklist

Ready for review

  • One topic, on current mod-api; the title is a Conventional Commit.
  • 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 mod-api is named). Not run whole yet: the crates' tests above.
  • Measured against mod-api, 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

  • Host code builds on Windows (llvm-mingw) and Linux, with UTF-8 paths. (Windows built; Linux not yet.)
  • A check under tests/ that reads changed source is updated, not weakened (input_background_test.c defines hos_hid_given).
  • Screenshots of the same spot on mod-api and here, for a change that shows on screen.
  • 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 mod-api, measured again or a comment says why the numbers still hold.

🤖 Generated with Claude Code

## Summary The game has 6 save slots a quest, shared between its autosaves and one manual save. This adds a built-in mod, `system/save-slots`: - **Save as New** (X on the pause menu's System tab) saves the game into a new slot, through the game's own Save. - **Pause > Save** with two or more manual saves opens a list of them: A saves over one, X saves into a new one, B goes back. With none or one it is the game's own Save. - **50 slots a quest**, and one row in Gameplay, **Autosaves to keep** (1 to 40, 6 by default, after a restart). Nothing a player saved is ever deleted. - Continue and Load list every save there is, never fewer than the game's 6 places. Past the game's 6 the two quests take turns over the folders (`slot_12, 14, ...` and `slot_13, 15, ...`), so neither writes the other's. An emulator or Hookshot shows only its own 6 of each. `docs/dev/reference/saves.md` has the table. See #2643. The core gives the mod: a part pane copied into a layout as the game builds it (`game_core::layouts`, site `layout.build`; the list's prompt bar has two slots and needs a third), the buttons the game was given (`host_sys::input::buttons_given`, #2641), a guest thread's TLS slot, the options and the loading mods before the mods start (#2644), and `ui.paneDirty` as a core site, as two mods use it now. Read first: `game/mods/save-slots/README.md` (every site it uses and why), then `slots.rs` (which slot a save takes), `files.rs` (which folder), `game/crates/game-core/src/layouts.rs`. It stands alone. Its prompts are clickable once the clickable prompts branch (#2642, its PR follows) is in, and on a wider picture its list's bar is stretched until #2817 is in. ## Testing **Tested:** Windows 11, RTX 3080, a build of `mod-api` 4c498c8aa with this branch, the clickable prompts branch and the Widescreen fix merged (c9c84b690), headless through the control bridge with the sandbox off (`HOS_SANDBOX=0`), against plain 4c498c8aa where it says so. Not run with this branch alone. - 21:9 and 16:9, in play, System tab: **Save as New** (X) asks, and the confirm saves into slot 9, whose folder is `slot_18`. Save then opens the list of two manual saves, the new one first; **B** goes back to the System tab. - The folders there before (`slot_00` to `slot_05`, `slot_12`, `slot_14`, `slot_16`) are all still there; `slot_18` is the new one. - 21:9: the file select with these saves, Continue into play. - No crash in any of the runs, and the game ends on request each time. Saving over an entry, and X in the list into a new save, were run before the rebase (an earlier build) and not again on this one. `cargo test`: the mod's 18 pass; `game-core` 350 pass (346 on plain `mod-api`). The mod's saved row is in `tests/test_menu_ini_keys.py`'s FROZEN (`save_autosaves`). Two amends since then changed comments only. `cargo test` fails on the same four tests here and on plain `mod-api` on this PC, and on no other: `api` `a_content_mods_changed_module_runs_again_and_its_outputs_are_served`, `longshot-game` `a_folder_of_mods_tests_each_of_its_folders`, `a_mods_profile_sits_inside_the_launchers_save_folder`, `a_separate_mod_moves_the_saves_into_its_profile_and_records_it`. `cargo fmt --check` names the same four files as plain `mod-api` does. The checks under `tests/`: 19 fail here and the same 19 on plain `mod-api` on this PC. `mod-api` was squashed to 9e6b9c578 as this opened, so until the branch is moved onto it the diff here shows the old history as well: only the top commit is this change. The commit applies to 9e6b9c578 unchanged; it has not been built there. **Still to test:** - **Master Quest**: Save as New and the list, expecting the folders `slot_13, 15, ...` and the normal game's saves untouched (by hand) - A long game with many saves: the list scrolled, the autosaves rotating past their count, expecting a manual save never taken (by hand) - Linux: the same, and a save folder moved between Windows and Linux (by hand) - The mod turned off with saves past 6 on disk: expecting the game's own 6 as they were, the others untouched (by hand) **Known limits:** the list's third prompt is drawn by the pause menu's own "Save as New" showing through, not by the overlay (its slot lookup does not reach the copied pane yet; README, "Not yet"). "Save as New" is English only. ## Measurements Not measured: no timing run yet. ## Risks Saves: the slot choosers (`save.chooseAuto`, `save.chooseManual`), the caption manager's size and the folder numbering (`save.fileSlot*`) are the game's own below slot 6. Saves past 6 are in new folders that older Longshot builds ignore, so going back to one hides them without losing them; the launcher's free-slot placement assumes 6. `layout.build` changes a layout's shared resource once, for the one layout a mod names. Turn the mod off in the Mods tab for the game's own saves. ## Checklist ### Ready for review - [ ] One topic, on current `mod-api`; the title is a Conventional Commit. - [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 `mod-api` is named). Not run whole yet: the crates' tests above. - [ ] Measured against `mod-api`, 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 - [ ] Host code builds on Windows (llvm-mingw) and Linux, with UTF-8 paths. (Windows built; Linux not yet.) - [x] A check under `tests/` that reads changed source is updated, not weakened (`input_background_test.c` defines `hos_hid_given`). - [ ] Screenshots of the same spot on `mod-api` and here, for a change that shows on screen. - [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 `mod-api`, measured again or a comment says why the numbers still hold. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
dyst added 1770 commits 2026-11-29 20:12:23 +00:00
game/DESIGN.md: the contract the Rust port of the game side and the mod API follows: the crates and what each owns,
the Mod trait, the threads and the MainThread token, the undo journal, settings by key, the script engine, the site
chains, the post-process interface, the native C mods removed, the bugs fixed on the way, and where each C file goes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8e3nBDxBnhodLguFyEt
As the full mod API (2596a0e3) vendors them, unmodified: the interpreter the script crate binds, with Longshot's one
translation unit beside it, and the usingCtx helper compiled TypeScript may import.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8e3nBDxBnhodLguFyEt
As Phase 5's tip (2596a0e3) has them: modapi/'s schema and shipped JavaScript moved to game/modapi/ (the layout of
the game/ boundary), assets/modding/ (docs, examples, packages, templates, the system mods) and tests/mod_vectors/.
modapi/generate.py is not taken: the schema crate replaces it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8e3nBDxBnhodLguFyEt
No C mods and no wasm (game/DESIGN.md, "What was removed"): the module longshot/native and the permission native
leave the schema, with the example native-hello, the guide's native.md and the fake game's stand-in for a native
library. A mod.json that asks for native is refused by the loader. The generated files (longshot.d.ts, the reference,
the permission table) follow at the next schema-gen run; the guide's links to native.md go with the docs pass.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8e3nBDxBnhodLguFyEt
The workspace at the repository's root (the builder joins it with the game/ boundary; until then it keeps its own,
left out here), with the builder's edition, Rust and rustfmt, and clippy's pedantic group for the game's crates.
longshot-rs is the one staticlib the game links. guest is the only crate that touches guest memory: GuestPtr<T>
checks every access (the null page, alignment, the window) and marks what it writes, Pod and pod! say what a guest
address may hold, GuestCtx wraps a hook's registers and calls into the game. host-sys stands in for host/game_host.h:
its C declarations, a safe wrapper for each, and a stand-in host for game-free tests (the feature fake). The other
crates are empty for now, each with its place in game/DESIGN.md; the design names the hook-site runtime game-sites,
since the builder has a crate sites.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8e3nBDxBnhodLguFyEt
The flags and slots the lifted code names, made from game/sites.def by build.rs (with each site's form from the site
table), and the runtime behind them, ported from host/game/sites.c, phases.c and modsites.c, with #2272's
self-review fixes:

- a site's chain: handlers around the core, the core its owner and subscribers with one answerer, published whole;
  the owner alone in the slot as before (a C owner directly, a Rust one through a plain trampoline);
- the site's callee kept and put back before each handler and the core (a handler's own game calls reach other
  replace sites);
- the chain's place is the guest context's, for a C handler's hos_site_next, so a fiber that resumes on another OS
  thread goes on in its chain; a Rust handler carries its place in its SiteCx;
- a removed handler is let go only once the site's readers are seen at zero (remove_then);
- outcome sites take no owner, handler or subscriber at run time: only the engine's, installed at start;
- a live rule table published again is not retired;
- the frame phases, with the MainThread token only the acquire phase makes, and MainCell;
- the mods' slot pool and its one call.

game/sites.def is the union of #2272's list (with its outcome lines) and the mod API's sites and tables. The C
functions (hos_site_set, _add, _subscribe, hos_table_publish, game_phase_run ...) stay, for the host's own C on
sites. Vslot sites are not ported: the list has none.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8e3nBDxBnhodLguFyEt
The game's C is ported from 0fc27a42, where #2272's self-review fixes already are: they are listed as ported, and
only the two Skip title bugs remain fixed on the way.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8e3nBDxBnhodLguFyEt
The parts every service, engine and native mod builds on: Value (and ToValue/FromValue with the schema's checks:
an int's range, finite numbers, bytes and values' limits), ErrorClass (the C's status numbers kept as stable codes)
and ApiError, CallCx (the main thread's token when the call is on it, the mod, its context, what the engine lends),
Promise and the settlements queue, the Mod trait and ModCx of native system mods, the settings' declarations, the
loader's ScriptHost, and the bindings' contract, which build.rs makes from the schema.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8e3nBDxBnhodLguFyEt
Ported from host/modapi/journal.c: a mod's writes to the game's saved state (flags, items, memory, placements) with
their values before and after, following the game's saves (asked, written, loaded), undone newest first where the
game still holds the mod's value, items waiting for play, bounded with "at least" counts. New: live effects (a
handler, a rule, a row, a pass, a claim...), each with its undo, all taken down when the mod is turned off, so
system mods and script mods are undone the same way.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8e3nBDxBnhodLguFyEt
A stand-in for the header the game/ boundary writes, by what longshot-game exports: start-up and the frame phase,
the input hooks, the control bridge's game commands, the input movie's hooks, the mods' RomFS layers and sound
mix, the game's menu rows by key (laid out by the Game settings mod), and the post-process passes the renderer
draws (CRT, colour vision, a mod's shader).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8e3nBDxBnhodLguFyEt
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8e3nBDxBnhodLguFyEt
The content crate's foundation: the strict JSON reader of host/mod_json.c over
serde_json (its depth, members, size, duplicate-key and NUL rules kept, the
differences documented), BYML read into a tree and written back (host/byml.c,
every limit kept), and SARC's members, puts and merge (the archive half of
host/restbl.c). miniz_oxide is added for the zip packages' and PNGs' inflate.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8e3nBDxBnhodLguFyEt
Ported from host/texts.c: HOS_TEXTS read by the switches' rule,
<game>/texts/<name> served for mals/<name>, a mod's own file wins, the first
four served are logged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8e3nBDxBnhodLguFyEt
Ported from host/romfs_layers.c/h. Last layer wins with every copy kept, made
files, the served paths (at most 4), the map reload's opened-paths set
(lock-free, capped), dev-mode rebuilds (changes, keep, publish), dir extras.
A lookup takes the live Arc<Table> under a read lock that only a publish's
pointer swap holds for writing; a replaced table is freed when its last
reader drops it (no 16-table retired list, no leak past it). The Mods tab's
move copies the table and publishes the copy instead of writing the live one.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8e3nBDxBnhodLguFyEt
Ported from host/mod_archive.c/h, the zip format read here instead of through
miniz's reader, with every check the C made: the end record (two records,
several disks, Zip64 and its locator, nothing between the central directory
and its record), each entry's central and local headers, methods,
encryption, UTF-8 names (Info-ZIP 0x7075 with its CRC-32), every name rule
and the case folding, overlap, a name twice and file-and-folder. Entries are
inflated with miniz_oxide's streaming core, held to their size and the
ratio, their CRC checked and archive magic refused. Also SHA-256 (whole and
incremental), the unpack into a fresh .unpack-* folder renamed into
<cache>/<sha256>, and the sweep. Without unsafe there is no openat walk:
folders are made with create_dir and checked not to be links, files with
create_new (O_EXCL / CREATE_NEW).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8e3nBDxBnhodLguFyEt
Ported from host/mod_patch.c/h: patch files read strictly (crate::json's
rules, then the patch rules and every message of the C), conflicts between
layers, and the ops applied to a byml::Document, with failures returned in
Applied. Texts ops are parsed here and applied by content::text. A second
read of the text keeps how each number was written (an int or a float, a
64-bit int's exact digits), which decides a new value's type as in the C.

Fixed on the way: a placement set to an array made every int in it a float
for any key (now only Translate, Rotate and Scale, as the C's comment said);
hash map keys past 64 bits were read as 2^64-1 (now refused); and past 64
reported paths a conflict could be reported twice.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8e3nBDxBnhodLguFyEt
Ported from host/mod_assets.c and the formats it needs: PNG decoded to RGBA8
(host/png_decode.c, inflate by miniz_oxide, CRC-32 built at compile time),
BFRES models read and their textures renamed (host/bfres_edit.c), and
one-texture BNTX files written from RGBA8 (host/bntx_write.c: the GOB
swizzle, NVN's block heights, the sRGB mip halving and the header bytes
kept). BC7 blocks are encoded by the host's bc7enc through a host-sys call
proposed with this port (host_sys::image::bc7_block). A skin's files come
back together, so a failure part way no longer leaves some written.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8e3nBDxBnhodLguFyEt
Ported from host/mod_text.c at 336075ba: MSBT read and written with every
limit and message of the C; the named tags as a Tags table passed by
parameter, Tags::game() the build's seven rows (the C's global
msbt_tags_use had no caller); the tagged check, encode and text; and texts
patches applied to a text archive over sarc::put (256 MiB). Ops the C left
out without a word (a message file over 16 MiB, an archive over 256 MiB, a
created file's name the archive refused, which it even counted as applied)
are now failed with their reason.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8e3nBDxBnhodLguFyEt
Ported from host/mod_read.c/h: BYML read in place with no tree, the JSON
byte for byte the C's (its own %.9g and %.17g formatting), the table index,
row and document JSON, placements whole or in parts, text archives (32
message files kept read; a failed read no longer takes a slot), plain text,
archive codes and name checks.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8e3nBDxBnhodLguFyEt
content::ainb::model (host/mod_ainb_model.c): behaviour trees read strictly
into their sections and written back with every offset computed again, the
same bytes when nothing changed; nodes appended, strings found or appended,
links, node comparison. content::ainb::add (host/mod_ainb_add.c): the schema
builder and its text format, new nodes added to a tree against it, and the
check of a tree that gained nodes. Schema lines are no longer cut at 511
bytes (a long tags list ran into the next line), nor shapes and values at
the C's buffers. The files join the crate with content::ainb, next.

Ported from untested C (Phase 5's behaviour-tree calls).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8e3nBDxBnhodLguFyEt
content::ainb ports host/mod_ainb.c: the AINB 0x408 reader with bounds, its
JSON view laid out as the C's, the param/input/blackboard/link/root changes
(an op now given as JSON, not re-read from text), the bones a tree names,
renaming, and a content stage's tree (new nodes through ainb::add, then the
changes, then ainb::add::check). A link or table offset outside the file is
no longer read as 0 (which let a change write over the header), and a vec3
with a non-number is refused before anything is written.

Ported from untested C (Phase 5's behaviour-tree calls).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8e3nBDxBnhodLguFyEt
The content stage's pack builder (host/mod_content_pack.c): pack specs read
(names, donors, skin), the new or in-place ActorParam, component changes
through Work references (copied under the new name), relative changes,
add-file and add-from (with the files a donor's component needs), removals
checked against the actor's behaviour trees, two mods' clashes on one game
actor, and a component as its actor sees it. A changed game actor whose
ActorParam is no dictionary is now refused (the C wrote its Components into
the root array, or said out of memory). Every limit of the C is kept.

The tree lines (content.tree) are behaviour-tree calls: ported from
untested C.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8e3nBDxBnhodLguFyEt
Ported from host/mod_content.c: each kind's checks with the C's messages,
the mod-owned names (word, placement hash, flag and tree names), plan.json
and its read-back, and every output file byte for byte as the C wrote them
(rows, texts, placements, changes, flags, typed patches, pause-menu slots,
pack specs, trees, copied assets), returned as a list in the C's order.
Values are copied out of a declaration as the mod wrote them. The cases of
tests/mod_vectors/content.json run as a data-driven test.

Fixed on the way: the C checked only the first 162 component names of a kit
for one named twice, where a kit can name 192; every name is checked now.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8e3nBDxBnhodLguFyEt
Two host calls content needs: hos_prompts_romfs (the prompts the host builds over a RomFS path) and
game_host_bc7_block (bc7enc stays the host's third-party C). miniz_oxide joins the workspace's libraries, for
content's zip packages and PNGs, with its reason in game/DESIGN.md.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8e3nBDxBnhodLguFyEt
discord and mod-inspector join the native system mods' place (game/DESIGN.md): their packages' paths, the fake
game's lookup of a checkout's system mods (mod-tools' systemModFolder and isSystemFolder) and the schema's notes
follow. The guide's pages follow with the docs pass.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8e3nBDxBnhodLguFyEt
The first of game.h's functions: hos_game_layout (ported from host/game_layout.c: cache/ and logs/ made, an older
build's files moved once, never over one there), the host's RomFS calls over content's layers (hos_romfs_resolve,
_file, _dir_extras, romfs_opened, and their game.h names), game_post_passes (the list the gfx service publishes,
kept until the generation changes twice) and game_free.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8e3nBDxBnhodLguFyEt
docs/dev/reference/hooks.md names game/sites.def and game-sites for each site's slot and what runs there, the
core's callbacks installed at start, the Rust callback's shape, the C functions kept for the host's own C, and the
tables as Rust values retired by their readers. The site tables' paths stay the host's until the game/ boundary.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8e3nBDxBnhodLguFyEt
Ported from host/oot_autoload.c, the game and the host behind a trait, for the system mod the API wires later:
the hook path (A on the title, the file list and the check as the game waits on each, the repeats, the 4th wait
ending it, no more once a load begins after the check's A), the fallback after 45 s and the timed path, the
newest save's lookup, and the waits the sites tell.

Fixed (game/DESIGN.md, "Fixed on the way"): the skip's clock stops while the Insert menu holds it, so a menu left
open on the title past 120 s no longer makes it give up; and a press a screen took as it opened (the fallback's A
landing as the file list opened) is counted as that screen's own, so it is not pressed again on top and the
presses match the log.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8e3nBDxBnhodLguFyEt
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8e3nBDxBnhodLguFyEt
Ported from host/oot_area_names.c: the table, the suffixes taken off (_MQ, _Alternative, _Child, _Adult), a map
the table lacks spelt out. The export other mods call is wired with the API.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8e3nBDxBnhodLguFyEt
A mod's JavaScript and TypeScript formatted by oxc's formatter (oxfmt's engine) from the game binary, so a mod's
author needs no Node to keep its sources tidy (Node stays optional, for type checking). The crate mod-format: the
author's files (.ts, .tsx, .mts, .cts, .js, .mjs, .cjs, .jsx; not node_modules, dist, dot files or the made .d.ts),
oxfmt's defaults 120 wide or the mod's .oxfmtrc.json, a file that does not parse named and left alone, --check
writing nothing and exiting 1 for each file not formatted. game.h's game_mod_format runs it for the exe's mod tool;
longshot mod's command table gets format (Node's host has none and says so), and longshot-mod forwards it to the
game. oxc does not publish its formatter: it comes from oxc's repository at crates_v0.157.0, the compiler's
release, with the shared oxc crates patched to that tag (game/DESIGN.md, "Libraries"). The guide's tools page says
how.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8e3nBDxBnhodLguFyEt
The design's rule: a mod's author needs the game binary alone; Node is for type checking, and for the three
commands that still need it until they move into the binary (the fake game's tests, shaders, sites port).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8e3nBDxBnhodLguFyEt
The strict JSON rules of host/mod_json.c (api::json, shared with the
mods.json and store readers), then serde's tree, then every check of
host/mod_manifest.c with its top-level field at fault, passing
tests/mod_vectors/manifest.json. A manifest that asks for the removed
permission native, or has a native block, is refused saying native
mods are no longer supported.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8e3nBDxBnhodLguFyEt
api::loader ports host/mods.c's list and host/modapi/loader.c: the mods
folder's emulator mods, manifest folders and packages, one row each in
mods.json's order (system mods first, a legacySwitch carried once), the
manifests resolved (api::loader::resolve, passing
tests/mod_vectors/resolve.json, Tarjan without recursion), each mod's
start prepared and made one a frame in load order through ScriptHost or
Mod, the switches that take effect at once, and the Mods tab's snapshot
and edits. api::loader::list and trust keep mods.json and
mods-trust.json byte for byte; api::loader::switch is mod_switch.c's
decision as data. api::system checks script system mods against the
build's SystemTable by their tree hash. Files go through api::disk.

Builds once api::perms and api::services land (next commits).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8e3nBDxBnhodLguFyEt
api::perms ports host/modapi/perms.c: each mod's grants (origins
normalized, at most 64; names this Longshot does not know kept as
mods.json has them), the four prompts and their caps, the menu's answer
from its own thread applied at the next acquire phase, permissions.has
and request, the page's switches and permissions.changed. The grants an
answer gives are handed to the loader to write on the main thread.
api::claims ports host/modapi/claims.c: a declared claim is kept for its
declarer, a holder is counted, a refusal names the holder.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8e3nBDxBnhodLguFyEt
api::storage ports host/modapi/storage.c: each mod's global, profile
and save data in its files (format 1, byte for byte), written by one
writer thread from shared snapshots, global and profile a second after
their last change; a newer version's or format's file refused and kept,
one that is not a store kept aside as .bad; the game's save notes from
any thread acted on at the frame (request, read, written, created,
deleted, staged, unstaged), driving the undo journal's save_asked,
saved and loaded; the title screen; storage.save.loaded; the settings'
own store beside the data. storage.save.flags is ported from untested C.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8e3nBDxBnhodLguFyEt
api::settings::Settings ports host/modapi/settings.c: a script mod's
declared settings kept in its settings store, read back checked
(the default when a value is no longer one of its values), changed by
the mod, the player (the Mods tab's rows, the host's $soundVolume and
$debugKey) and a save, told once a setting a frame; legacyOption taken
once from the options file; a system mod's settingSwitches for the run.
The game's own settings (native SettingDecls) live in
longshot_options.ini through the OptionsFile trait, reach the menu as a
published snapshot of rows with a setter from its thread, and site
handlers through Published<T> atomics stored on each change.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8e3nBDxBnhodLguFyEt
api::services::Services holds the journal, permissions, claims, storage
and settings typed, the manifests the loader chose and the mods that
run: a mod's start opens its storage and settings (a system mod's
legacyOption taken once), its stop undoes every live effect newest
first and frees its claims and grants; the services' events
(storage.save.loaded, settings.changed, permissions.changed) are handed
to the loader's frame to fire. ModCx now lends a ModApi: its id, its
grants, and typed accessors to settings (with Published<T>), storage
(checked against storage), claims and its journal.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8e3nBDxBnhodLguFyEt
The storage writer now keeps the job it runs where a slot's load looks
(a slot read while its write ran was read from the disk's older copy);
permissions.request lets go of its lock before it drops a promise it
could not queue; a mod.json refused as a whole says mod.json: <why>.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8e3nBDxBnhodLguFyEt
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8e3nBDxBnhodLguFyEt
Schema::load(root) reads game/modapi/schema/*.toml and makes every check
modapi/generate.py's load() made (keys, names, since, types, functions,
events, filters, interfaces, handles, features, the write rules, the C
names' uniqueness, every permission and unit used), each refusal a
SchemaError naming the file and the item. The schema's sha256 is
generate.py's schema_hash, byte for byte (SHA-256 written here: the
workspace has no hashing crate).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8e3nBDxBnhodLguFyEt
system_mods reads the script system mods (game/mods/<name> first, then
assets/modding/system/<name>; a folder with a Cargo.toml is a native mod
and left out), hashes each as nx2/system_mods.py's tree_hash does (the
same files left out, the same order, links refused) and checks its
manifest's "system" object, permissions and "ipc" as generate.py's
emit_system_mods did.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8e3nBDxBnhodLguFyEt
emit makes every repository file generate.py made from the schema and
still has a reader, byte for byte as the Python made it (its wrap,
md_anchor, ts_type, json.dumps of a string, the blank line before a
brace taken out): longshot.d.ts, the fake game's schema.json, reference.md,
permissions.md, scripting.md's generated blocks and the fake game's
copies of the shipped JavaScript; and the packages' version and the fake
game's services checks. The first lines name game/tools/schema-gen and
game/modapi/schema/ instead of modapi/generate.py and modapi/schema/.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8e3nBDxBnhodLguFyEt
What api's build.rs writes into $OUT_DIR/bindings.rs, as api/src/bindings.rs
describes: the version and hash; Permission (name, risk, told, bit, ...),
Risk, Feature, Namespace, Phase, Thread and HandleType; one enum per
schema enum and one struct per record (ToValue, FromValue for the ones an
argument or a filter takes, valid(), a field whose feature the build lacks
read as null); one <Namespace>Api, <Interface>Api and <Handle>Api trait
for the services and ApiServices to reach them; FUNCTIONS with a thunk
each that checks the context, the permission, the feature, the handle and
every argument as emit_header's C thunks did, then the result; EVENTS
(with their filters), FILTERS, CONSTANTS, MODULES (the shipped JavaScript
by include_str!), the write rules, typed resolvers for the async
functions, and checks at compile time (and in a test) that the schema's
error classes and contexts are api's ErrorClass and Context.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8e3nBDxBnhodLguFyEt
What generate.py's host/modapi/system_mods.h held, as Rust for a build
script to include: each system mod's name, tree hash, flags (on, always,
required) and legacy switch, the local endpoints their "ipc" declares,
their off and setting switches, and system_switch_of.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8e3nBDxBnhodLguFyEt
schema-gen [--check] [--root <repo>] loads the schema, writes every file
emit::outputs makes that differs (CR LF read as LF), or with --check
writes nothing and exits 1 naming each stale or missing file, a package
whose version is not the API's and a fake the fake game lacks, as
modapi/generate.py --check did; 2 for a schema that fails its checks.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8e3nBDxBnhodLguFyEt
The vendored interpreter (third_party/quickjs-ng: longshot_quickjs.c, libregexp, libunicode, dtoa) and
shim/qjs_shim.c compiled with the cc crate, with nx2/build.py's QUICKJS_FLAGS. qjs::sys declares the C the
crate calls; qjs wraps it in counted values (a context freed after its last value), native functions as
Rust closures, and an allocator that charges a mod's heap counter.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8e3nBDxBnhodLguFyEt
Every limit of modrt_internal.h keeps its value (crate::limits). The accounting is game-free and tested:
deadlines on the thread's CPU time with the wall clock's hard cap, the cost line a warning or fault says,
a slow frame's numbers, the history inspect() reads, 3 faults a minute, 100 log lines a second, the
collector's plan. The watchdog's registry is the crate's one shared structure. A mod's own files are read
inside its folder, never through a link (loader.c's and files.c's rules).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8e3nBDxBnhodLguFyEt
runtime.c's calls under budgets (the frame's 8 ms cut, the wall clock's cap, the 500 ms overrun stop, the
cost line, rejections, 3 faults a minute), the entry's 1 s, the collector at the frame's end; bindings.c's
API objects from api::bindings (read in one file, bind/tables.rs), values both ways with every check, the
thunks' CallHost (the call's promise, a callback called now or kept), subscriptions, events, filters'
drafts, promises' settling, handles and the prelude (unchanged JS); modules (the API's, Longshot's own
JavaScript with its native parts, the mod's files, JSON modules). TypeScript, workers and the test mode
come in their own commits.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8e3nBDxBnhodLguFyEt
script::ts calls oxc 0.157.0 directly (host/ts's transform, same options and VERSION): no library of its
own and no C ABI; the usingCtx helper of third_party/oxc-runtime served by include_str!. The modcache/js
records (LSTS2, SHA-256 keyed), system mods' modules compiled ahead in memory and never from the cache,
the compile's time out of every budget. sourcemap.c's mapping of a fault's first frame.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8e3nBDxBnhodLguFyEt
worker.c's pool, owned by the host (no global list): a worker's interpreter charges its mod's heap,
runs its entry then one message a turn under 10 s, the longest-waiting worker first, one thread at a
time (its runtime moved whole between the pool's threads); messages as checked JSON, 1 MB each, 64 and
8 MB waiting each way, charged to the mod's heap; faults and stops told to the mod, and a worker still in
its turn when its mod goes left to end on its own thread.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8e3nBDxBnhodLguFyEt
The running mods in load order; start (the runtime made, its entry run within 1 s), the frame's begin
and end (every mod's budget, the 4 ms all-mods warning), events (a scope-mod event to its one mod, a
handle's to its subscribers), filters' rounds (exclusive last), the promises' settlements within 64 or
2 ms a frame, kept callbacks, the together source's deliveries and the workers' step, stop and reap.
Each call lends the runtimes the services and the main thread's token for its length.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8e3nBDxBnhodLguFyEt
testing.c's runner: tests:<id>'s runtime, its made entry over test/'s files, longshot/testing (runner.js
over its native part: mod, save, destinations, teleport, age, result, faults, say, report, filter) and the
live run of mod_test with results.json's shape. modrt_eval_start/poll: the code compiled as a module of
the mod's folder and evaluated as one of its callbacks, its promise handled, its default export as JSON.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8e3nBDxBnhodLguFyEt
FilterSpec gains check_draft (the draft read as its record, as an argument is) and gives readonly as the field
names; the script adapter reads the generated tables as they are: &dyn ApiServices thunks, EventFilter's parse,
ConstValue's Text and Record, Namespace's member and parent.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8e3nBDxBnhodLguFyEt
The range check took abs(), which i64::MIN has none of.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8e3nBDxBnhodLguFyEt
build.rs writes $OUT_DIR/system_mods.rs from game/mods (api::system::built); bindings.rs's doc says the services
take &self, a left-out options record is &R::default(), and what the filters and constants carry.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8e3nBDxBnhodLguFyEt
The oot crate's module tree, and what every service builds on:

- mem: bounded reads and writes of the game's records (game_peek_at,
  game_guest_at), and Field<T>, a typed field offset;
- locations: the named locations of locations.def, resolved from the host
  once (a test sets its own);
- call: the Caller trait over a hook's GuestCtx and the thread's own
  context, and GameCallError;
- flags: GameDataMgr's containers (host/game/flags.c, flag_set.c), with
  game_flag_number_as_game's past-the-count-reads-entry-0 rule;
- layout:🎏 the containers' layout.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8e3nBDxBnhodLguFyEt
video: the camera's turn-speed scale, the movie frames, the whole-frame
counters, the loops kept on one pose, the ocarina's note wait and the
game's part of the present step (nn_vi.c, nn_hid.c and their oot_sites.c
callbacks). bridge: the control bridge's oot_state, oot_sample, oot_watch
and oot_poll as typed functions (control.c).

Fixed on the way: a stale ocarina note wait no longer clears a wait a site
re-armed at the same moment (compare-exchange), and the graphics module's
and the loops' reads are bounded.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8e3nBDxBnhodLguFyEt
The mod API's game services of host/game/{camera,pad,player,rays,state,
texts,watch}.c, typed: the camera's last view and override under sequence
counts, the pad over the host's publish, Link and the game's state read
bounded, the rays' lock-free slots, the texts' pool and the watches of maps,
saves and flags.

Fixed on the way: a build naming no actors.vtable took any actor whose
first word is 0 for Link; a NaN replacement stick was undefined behaviour;
the texts' reads of the screen and names are bounded.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8e3nBDxBnhodLguFyEt
Holding the pause through DebugPause, the pause types, the 2D layers found
and hidden (host/game/pause.c). The pause-menu slots (game_pause_entry,
game_pause_row_bit, and DebugPause's camera row cleared while held) are the
mod API's Phase 5: ported from untested C.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8e3nBDxBnhodLguFyEt
The game parts of host/hos_main.c and host/input_movie.c: the destinations,
teleports, age switch and their ticket queue, the map lock and the
Inventory page's counts (travel); the opening skip with the mods' skips
first, the save trace and Transition autosave, loading and Link seen
(session); Link's update, flight, Movement speed and the free camera
(debug); with their engine callbacks from host/oot_sites.c. The options
they read become typed knobs the API sets.

Fixed on the way: the age switch compared an unread map name; the
teleport follow-up's log printed a map the resend had cleared; with no
hold, a controller or actor of 0 matched the flight's; ticket 0 read as
waiting; the free camera's view reads are bounded.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8e3nBDxBnhodLguFyEt
oot::sysmods: everything the system mods (Field of view, text speed and
size, Damage taken, sprint, widescreen UI, Skip title, cheats, heart
containers, shadows, Voice language, area names, Discord) read, write or
call in the game, so each mod is written on the api crate with no raw
offset. The one system-mod outcome site, options.voiceWritten, gets its
engine callback here; it follows the saved option while the published
knob sysmods::knobs::VOICE_FOLLOW is on (off: the game as shipped).

Fixed on the way: a refused call in the voice callback answers "not
written" rather than a stale x0; an area name over 95 bytes is cut on a
character boundary.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8e3nBDxBnhodLguFyEt
host/game/{items,rewards,rules,skips,songs}.c, typed: the items' watch on
its own sites, give, take and the pouch's counts; the placement drops,
event gifts, shop prices and bottle fills; the damage, actor-life and
scale rules with their tables laid out as the C's; the mods' skipped
events and the song names. Caller gains stack_pointer, for the bindings
that build a frame below the caller's stack; travel takes the pouch's
counts as the service now gives them.

Fixed on the way: a build naming no life vtable took a component reading 0
named Player for Link; the song list read before the RomFS index was ready
stayed empty for the run; the items' sinks are told after the poll lets go
of its state, so a sink that gives an item no longer deadlocks; the damage
and actor-life tables are published both or neither.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8e3nBDxBnhodLguFyEt
host/game/{actors,spawn,queries}.c, typed: the actors.update site's
lock-free record, the list and its generations, the mods' writes with
their tickets and lit bombs, spawning and despawning with #68's gate and
the respawn flags, and the answers to the behaviour-tree queries. Their
tables keep the C's layout; longshot-game exports the hos_* functions the
lifted rule C calls around the safe Rust.

Fixed on the way: a build naming no controller method or no actors.vtable
matched a slot or first word of 0; a write its site marked dropped was
counted as made; a list slot's generation could wrap to 0.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8e3nBDxBnhodLguFyEt
host/game/attach.c: models bound to an actor's bones, the slots' hand-over
and generations, and the actors.binds table the bind site reads. The C's
model bind was read from the lifted code and never run in the game.

Fixed on the way: a bind whose guest cells were half written called the
game anyway; it now ends Refused.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8e3nBDxBnhodLguFyEt
host/oot_high_fps.c and its oot_sites.c callbacks: the sound job at 60 Hz,
the music's time and flags, the physics solver's steps, the horse's jump,
the floor carry, the drive target, the cloth's gate and time, the song
cues, the steering rates and the jump's takeoff, each rule a pure function
with its tests. The time slot and the cloth's clock are named locations.

Fixed on the way: the time slot, the drive controller and target and the
body's position are read bounded; an unreadable one gives the game's own
value.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8e3nBDxBnhodLguFyEt
host/oot_barrier.c: the job threads wait for their work on the host's
wait-on-address, the protocol over traits and tested (a wake before the
arm, between the look and the wait, a stray wake, a timeout).
host/oot_heap_retry.c: the OptimizeChangeBank thread's allocations tried
again in the full heap's parents. With their engine callbacks.

Fixed on the way: an unreadable barrier word falls back to the game's own
sleep instead of faulting.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8e3nBDxBnhodLguFyEt
host/oot_tex_compact.c, oot_ocb_hold.c (its switch now the setting
ocb_hold::set_hold_ms, 2000 ms by default as the C's) and
oot_damaged_files.c, with their engine callbacks.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8e3nBDxBnhodLguFyEt
host/oot_state_tap.c: the control bridge's samples, watches and flag
changes scan, its JSON lines kept byte for byte (tested), and the bridge
over it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8e3nBDxBnhodLguFyEt
host/oot_menu.c: pointing and clicking in the game's own menus, with the
menu.focus and menu.update callbacks; the input movie's menu choices go
through the host's movie.

Fixed on the way: an item key set by the mouse is written through the
bounded write, which marks its pages for the renderer's watch.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8e3nBDxBnhodLguFyEt
engine::install installs every HOS_SITE_ENGINE line of game/sites.def
that belongs to the core (host/oot_sites.c): the features' callbacks from
their modules, Voice language's outcome site over its knob, the host's own
features on sites (the mouse look, the button prompts, the camera
centering, the upscalers' jitter) read here and handed over through
host-sys, and the host's C callbacks for the zstd decodes, the scene
format and dynamic resolution. A test checks that every outcome site has
its engine callback and none is a system mod's. The bridge and travel
agree on the game's situation and Link's progress.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8e3nBDxBnhodLguFyEt
The rewrite drops the environment switches that only kept a settled fix's
C-era A/B or an experiment: HOS_FPS_CLOTH, HOS_FPS_TAKEOFF, HOS_FPS_MOVIE,
HOS_FRAME_CARRY and HOS_REALTIME_WINDOW (each now its shipped default),
HOS_OOT_TELEPORT_EVENT and HOS_OOT_TELEPORT_STARTER (the teleport's event
and starter fixed), HOS_VOICE_OPTION_FOLLOW (the Voice language mod's knob
replaces it), HOS_TEXT_SIZE and HOS_SHADOW_STABLE (the mods' settings).
travel also hands Link's progress to the player service as it takes it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8e3nBDxBnhodLguFyEt
bridge::sample_ask, sample_cancel and watch reach state_tap::ask, cancel
and watch, the bridge's checked Watch handed over as the tap's.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8e3nBDxBnhodLguFyEt
The game's state reads whether a movie plays from video's own record of
the movie players' updates (a quarter second, as nn_vi.c's
MOVIE_STALE_NS), not a host call; travel takes its guest strings from the
same system-region allocator as spawn, attach and texts.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8e3nBDxBnhodLguFyEt
The Atmosphere cheat file read into its cheats (names, master cheats, words) and
each cheat's switch key, the C's "cheat_" and FNV-1a 32 of "<mod>/<name>"
with "#2", "#3" for repeats, hashed over the name's own bytes. A word is now
exactly eight hex digits: the C's strtoul also took 0x123456, +1234567 and
-1234567.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8e3nBDxBnhodLguFyEt
Opcodes 0 to A and C0 to C3 decoded as dmnt decodes them (C4, B, D, E and the
F.. extensions not supported), and run over a Memory trait (reads and writes of
the game's mapped ranges, the regions' bases, main's code) with the buttons
held. Registers clear per run, the static registers stay; a run stops after
1 << 20 opcodes.

Fixed on the way:
- regions 2 and 3 (alias, ASLR) were base 0 plus the offset, so a cheat of
  theirs read and wrote whatever guest address its offset happened to be;
  they now reach nothing.
- a write starting before main's code but running into it was let through
  (only its first byte was checked).
- opcodes 1 and 9 compared or computed with the whole value word at widths 1
  and 2; dmnt cuts it to the width.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8e3nBDxBnhodLguFyEt
Each mod's cheats/<build id>.txt (any case) found through a CheatSource, its
cheats classified (heading, data, master, not supported with the reason), the
switches read from and kept in a SwitchStore, and every cheat that is on run
at each presented frame from the 60th. Errors are a thiserror enum with stable
codes; the load's log lines are the caller's to write. A file that cannot be
read or is over 4 MiB is now reported: the C passed over it silently.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8e3nBDxBnhodLguFyEt
Heart protection, No-clip flight, Movement speed and Free camera as
api::settings::SettingDecl for the mod's manifest: the menu's labels and help,
the keys its ini_key makes of their labels today, Store::Options, shown while
debug_tools is on, and HOS_OPT_CHEAT_* 32, 33, 36 and 35 as legacy_id. The
cheat action (34), a one-shot command and no row, is declared apart.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8e3nBDxBnhodLguFyEt
The manifest, the permissions it needs (memory.read, memory.write, input.read,
and a read of other mods' cheats folders that no permission gives yet), what it
needs of the memory, input and storage services behind its traits, and its
start, frame and stop.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8e3nBDxBnhodLguFyEt
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8e3nBDxBnhodLguFyEt
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8e3nBDxBnhodLguFyEt
The high-fps A/Bs (HOS_FPS_CLOTH, HOS_FPS_TAKEOFF, HOS_FPS_MOVIE, HOS_FRAME_CARRY), HOS_REALTIME_WINDOW, the
teleport's experiment overrides, HOS_OCB_HOLD_MS, and the switches the system mods' settings replace
(HOS_VOICE_OPTION_FOLLOW, HOS_TEXT_SIZE, HOS_SHADOW_STABLE): the Rust game side reads none of them.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8e3nBDxBnhodLguFyEt
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8e3nBDxBnhodLguFyEt
hos_rules_*, hos_rewards_*, hos_actor_{writes,binds,lights} and hos_query_answer: each casts the table the site
loaded back to oot's and calls its safe function; a null table leaves the game's value.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8e3nBDxBnhodLguFyEt
CallOpts (sp, x8, LR) with GuestCtx::call_with and call_own_thread_with; GuestCtx::run, the lifted call a replace
site stands in for, over a new host/game/game.c game_run; vreg/set_vreg, z(); own_thread_sp. The stand-in host runs
a fake function on a context and gives a stack pointer of the own thread.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
host-sys fpe::{fma32, div32} over builder/rt's recomp_fpe_fma32/div32 (the stand-in host: the host's own float ops);
GuestCtx::fpe_fma32/fpe_div32 take and give a float's bits as u32. oot's steer rate passed them as u64: now u32.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
GuestPtr<u8|u16|u32|u64>::{load_atomic, store_atomic, compare_exchange, fetch_or}: checked as read and write are,
sequentially consistent, a write's pages marked.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
A weak stand-in in host/game/game.c answers none until the lift writes the table; the stand-in host's are set by
the test.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
features::{mouse_camera, prompts_text_draw, prompts_text_layout, prompts_glyph, jitter_clip} over mouse_native.c,
prompts.c and rx_backend.c; sites::{zstd_stream, zstd_frames, scene_format, dynres_*, fixed_scale_*} as function
pointers for Handler::C (hos_zstd.c's decodes, oot_sites.c's renderer callbacks); no-op callbacks under fake.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
mem::sys_alloc (hos_sys_alloc), romfs::{head, read_zs} (hos_romfs_head, zs.c's hos_zs_read_romfs),
files::{romfs_rel, resolve_read} (nn_fs.c), info::main_image (the generated image.c's hos_main_*), each with the
stand-in host's. On the way: romfs::stat answered a folder as a file of size 0, and romfs::list took an empty
folder for none and a missing one for an empty one (hos_romfs_stat gives 2 for a folder, hos_romfs_list -1 for none).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
input::{flight_axes, free_camera_axes, move_stick_held, stick, drag, clear_toggles} over nn_hid.c;
movie::{active, playing, action, action_taken, link, clock, menu, menu_take, menu_done, MenuChoice} over
input_movie.c; mouse::{game_menu, game_menu_gone, game_pointer, wheel_take, left_held} over display.c. Two small C
stand-ins declared in hos.h where the host had no function: hos_input_movie_clock (input_movie.c's static
movie_clock, -1 with no recording) and hos_mouse_left_held (oot_menu.c's own GetAsyncKeyState test). The stand-in
host keeps each as a test sets it and records what the code gave.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
sync::{available, wait_on, wake_all} and sched::{vcore_away, vcore_back, chain, note_slept, Chain};
paths::ab_value (hos_ab_side_now, hos_ab_value_at) and control::on (hos_control_on), the host's flags read as
atomics. C stand-ins in hos_thread.c, declared in hos.h, where the host had none: hos_wait_bound, hos_wait_on,
hos_wake_all (oot_barrier.c's WaitOnAddress binding, for any caller) and hos_note_slept (the thread-local
Breakdown counter, which Rust cannot reach).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
A second context of a runtime (Context::new_realm), import() let through to
the loader, Hooks::normalize_with (attributes), ModuleKind::Own, the tools'
intrinsic (performance), resolve_module, set_import_meta and view_bytes_of. A
mod's runtime calls none of them: its behaviour is unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
script::modtool runs an SDK's lib/game-cli.js main(argv) in QuickJS-ng: a
loader for files (TypeScript compiled as it loads), node:* (shim.js, the C's
subset plus structuredClone, URL and node:module's SourceMap) and longshot:*;
longshot:native (files, the process, processes, the bridge's socket, deflate,
CRC-32, SHA-256) and longshot:host (the game's parts through ToolHost, and
realms: contexts of the runtime whose modules a linker names, for the fake
game's node:vm). Errors are Node's, a time limit is node:vm's, and
process.exit stops the interpreter instead of the process.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
game.h's game_mod_tool(argc, argv) takes the whole command line: --help and
--version [--json] answered here, mod <command> run by script::modtool with the
game's parts (GameParts: the version, mod-format, the manifest reader,
content's BYML, SARC and MSBT readers, the BARS asset names ported from
host/audio_source.h, and the host's zstd decoder); -1 for any other line.
game_mod_format stays.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Both mains (Windows' and Linux') call game.h's game_mod_tool before anything
of the game starts, and return its exit code when the command line is the
tools'.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The fake game's node:vm is lib/vm.js: Node's own in Node, and under the game
host-game.js's subset over the tool's realms (createContext, Script,
SourceTextModule, SyntheticModule, runInContext, runInThisContext), which the
link check and runScript use too. node:assert/strict is lib/assert.js, the same
on both hosts. The entry's exports are taken once its evaluation began (both
hosts give a namespace then); the test runner registers Node's TypeScript hooks
in Node alone (the game's loader compiles a test itself). longshot mod test
with no --game runs the fake game on either host.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
bin/longshot-mod.js hands test (against the fake game) to the game the mod
belongs to when its tools run the fake game (they have lib/vm.js), else runs
it in Node as before; a checkout is now known by game/crates/script's modtool.
tools.md: test is the game's own, with lib/assert.js; Node keeps shaders and
sites port.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The generated <Namespace>Api traits take &self, so the journal, permissions, claims, storage, settings and the
mods' manifests move into RefCells; the loader borrows them. A live effect's undo is given &Services, so a service can
run it from its own release as well as from a mod's stop.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
services.c's has() and version, and longshot/log (a line each call, controls and direction marks shown as spaces,
100 lines a second a mod, the last 200 kept for the inspector), over host-sys. The feature list of every build
(services.c, services_game.c, services_input.c) by schema name, over what oot finds in the build. The Store,
storage.save, storage.save.flags, settings and permissions traits wired to the first pass's services. A slot table
for the objects mods hold by handle (owner and generation, so a reused or another mod's handle is stale).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
services_game.c, game_events.c and text_shown.c over oot: the state and Link read once a call, the frame they
were read in; game.flags read by the game's own hash. The game's moments (map loads, save requests, watched flags,
the pause) watched only while a running mod with state.read listens, polled once a frame and fired in order; the
textShown filter over content's tagged text, a changed text handed back to the game.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
writes.c: game.flags.set and player.set checked in the C's order (deny list, play, the flag, its kind, its range
read now), queued and made after the frame's update listeners, each a write in the undo journal; Link's life held to
a write for four frames. The deny list and ranges are game.flags.toml's, as tables (the bindings do not carry them).
The journal's game half (UndoGame) over oot.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
timers.c: time.after, every and gameStarted, and game.after in game time, called in load order at the frame's
timers point through the script host's kept callbacks. dev.c: dev.enabled and dev.keep (the init's value kept for
the next instance of the mod).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
camera.c and input.c over oot's camera, pad and pause: camera.state and the override under the claim camera,
game.pause counted over every mod's pauses, the HUD hidden while any hide is held, the projection of a world point
through the frame's view; input's actions, pad state, presses, rumble, the pointer's capture and the pad filter.
Each override, pause, hide, action and capture is a live effect in the journal: a stopped mod's are taken back.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
items.c over oot's item service: items.checked and items.granted polled while a mod holds items.read or
items.grant; grants queued in longshot_mod_items.txt (queued, given, saved), one given a frame, a save loaded puts the
given ones back; held and remove. Each give and take is a write in the undo journal.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
rules.c: every running mod's rules made into oot's tables at the rules point, in load order then the order added,
only for a kind that changed; rewards and prices under their claims, taken with a mod's first and given back with its
last; the host's map published for rules that name one. One handle type for every kind (a slot table), each rule a
live effect in the journal.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
actors.c, attach.c and spawn.c over oot: the list watched while a mod needs it, its events and hits fired in the
schema's order, list() answered once a frame per query (result_key), writes and lights handed to the game after
update, bones bound and unbound, the mods' answers to behaviour queries published per query, spawns followed to their
key and despawns' respawns journaled as placement writes. Attachments, answer hooks and spawned actors are live
effects in the journal.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
world.c, travel.c and worldstate.c over oot's rays and travel queue: rays settled once cast or given up after 4
frames, travel and setAge settled by ticket, the world's states read and set through the game's Bool setter (each a
journaled flag write).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
What only longshot-game can give the services (the memory map, the files the game is served, the post-process
passes' and the world layer's sinks, the audio output and decoder): traits here, set once at start; the services run
without them, a part missing reading as absent.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
memory.c: ranges checked against the host's map (one part, never code or read-only data for a write), reads at the
call, writes queued and made after update, each journaled with the bytes it replaced; immediate in-order reads and
writes for system mods. romfs.read and size over the files the game is served (the host's index when no layer map is
given).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
hooks.c: mod_sites.txt read and its slots defined and chained, listen, sites and setValue; every visit recorded
on its thread and told at the next frame's hooks point. Unlike the C, a serial site's listener no longer runs inside
the game's code on the main thread: no script runs off the acquire phase (DESIGN, Threads). A row hooking one of the
game's own sites by name is listed but not hooked here.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
gfx.c and gfx_world.c: an effect's .glsl and its .glsl.spv read from the mod's folder, checked by the renderer's
template through PostSink and held to the source it was compiled from, its params set by name; the CRT and
colour-vision system mods' passes beside them; every pass published whole when one changed, by point, load order and
the order made. The world layer's shapes checked and capped, followed actors placed each frame, published through
WorldSink. Each a live effect in the journal. PostSink and WorldSink are implemented by longshot-game.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
files.c: paths kept inside the mod's folder (no link followed, the author's dot folders and node_modules unread),
text, bytes and json read on a reader thread of their own and settled there, the sync reads at the call, list, exists
and size.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
content.c's declarations into content's plan for the running content module, every mod's kept for the session so
its own names resolve (items, actors, spawns, answers); content.read's calls checked and read on a reader thread
through the host's ContentReader (the layers' files and their zstd are the host's).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
audio.c, audio_mix.c and audio_groups.c, ported from untested C: sounds of the mod's folder decoded on a thread
of their own (WAV here, Ogg Vorbis through the host's AudioDecode), voices with volume, pan, pitch, loop, a low pass
and a send to the mod's reverb, placed voices heard from the camera each frame, the bus's limiter, the game's groups'
gains and ducks under the claim audio.groups. The host's mixer thread runs Mixer::mix and groups_frame. Streaming is
not ported: a streamed sound is decoded whole. Sounds and ducks are live effects in the journal.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Services::frame(main, phase, frame, dt, scripts) steps every service once a phase in the events' order (frame,
storage.save.loaded, update, the items' and actors', settings and permissions changed, the actions', the game's
moments), runs the filters at their points, the journal's undos, and the frame's end (rules' tables, the world's
answers, placed sounds, passes and the world layer). The storage's own step is now save_frame. ScriptHost gains
fire_handle, filter, filter_subscribed, subscriptions, call_kept, callback_live, release_callback and deliver, each
with a default that does nothing so the script crate builds until it overrides them. Services implements ApiServices:
every accessor is the services themselves.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
For the cheats mod and the post-process system mods, each refused to any mod that is not a system mod: memory
written and read at once (journaled), the main module's and heap's bases and the code's end, the pad as raw
HidNpadButton bits, the build id, whether mods were on at the start (not Safe start), the other mods' cheats/ files
listed, and post-process passes of their own. The loader tells the services the mods' folder and Safe start.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Generated pages (permissions.md, the reference) are made again by cargo run -p schema-gen.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The text.letterStep site's handler, the text_speed and text_size settings
(same keys and HOS_OPT numbers), over oot::sysmods::text. Replaces
host/oot_text_step.c, host/oot_text_size.c and nn_vi.c's text scale.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The camera.lens site's handler and the field_of_view setting (same key,
HOS_OPT_FOV's number), over oot::sysmods::fov. Replaces host/oot_fov.c and
oot_sites.c's hos_site_camera_lens.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The player.lifeHit and player.lifeWrite sites' handlers and the
damage_taken setting (same key, HOS_OPT_DAMAGE_TAKEN's number), over
oot::sysmods::damage with the Debug tab's heart protection. Replaces
host/oot_damage.c and oot_sites.c's hos_site_life_hit/hos_site_life_write.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
HOS_SHADOW_STABLE's three choices become the setting shadow_steady_fit.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The services are `&self` throughout (each keeps its state in a cell), so the
engine lends them as a shared borrow (`LentRef`) in place of the
once-at-a-time `LentMut`. A callback a service calls now (`call_now`) may
call the API again: the refusal "the API cannot be called from a callback the
API is calling now" is gone, as the adapter already puts back what the outer
call holds (`CallFrame`) and no service holds a borrow across a call back
into a script.

`NativeSpec::call` and `HostHooks` take the concrete `&Services` (lent
beside the thunks' `dyn ApiServices`, on the main thread only). The hooks'
defaults ask the services themselves (`ServiceHooks`, was `NoHooks`): a
filter's claim through `Services::claims`, `game.flagChanged`'s refusal
through `Services::flag_watch_refused` with every mod's live subscription to
it (the runtimes of a thread are kept weakly in `Shared` for that).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
`fire_handle`, `filter`, `filter_subscribed`, `subscriptions`, `call_kept`,
`callback_live`, `release_callback` and `deliver` are the trait's now (they were
inherent methods the services never reached, or missing): handle events,
filters, timers, hooks' listeners, answer hooks and the game's watches reach
the scripts.

`call_kept` gives back what the callback returned (`undefined` as null, so a
timer that returns nothing keeps running; a result that is no value as null,
said in the log), `None` when it is gone, threw or ran out of time.
`subscriptions` lists each running mod's live subscriptions to an event with
their filters, in load order.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
`script::NATIVES`, the game's table: the together source's `running`,
`claimant` and `claims`, and the UI's `project` (state.read) and
`hideGameHud` (camera.write, its undo `showGameHud`), over
`api::services::Services`. The engine defines `self`, `checkPermission`,
`caller` and `callerHas` (no call between mods is made in this build, so none
has a caller) and the UI's `actorRef`.

An undo now hands the service's result back unchanged, not made the script's
and read back. The members without a service side yet are listed in the
module's documentation.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
`api::bindings::MODULES` carries each JavaScript module's source and path;
the adapter kept only whether it had one and embedded the three sources a
second time with include_str!. The table is the one source now (no second
copy in the binary, no list of sources by specifier to keep in step with the
schema), and a source's group is its folder (`game/modapi/ui/runtime.js`: ui).

The rest of script::bind's reading of the tables matches what
game/crates/schema/src/emit/rust.rs writes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The machine's Env wired to the game: the row (skip_title_screen, legacy id 44),
the Insert menu's hold, Link in play, the loading flag, the newest save (oot's
finder: saves.rs was a copy of it), the build's two sites, the frame and A
pressed through oot::pad. Its handlers on menu.buttonWait and
menu.buttonWaitNoDecideAnim are journaled and taken off when the skip is over.
The crate is sysmod-skip-title.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
HOS_OPT_CHEAT_ACTION (34) carried one action at a time and was set back to 0
once taken: no setting. It is the command cheat_action, its old number kept
for input movies (command::by_legacy_id), run from the Debug tab, the bridge's
!cheat and a movie's replay while the mod runs with the Debug tools on.

The Debug tools row (debug_tools, saved by the menu) is declared by the mod
its cheat rows hang on. The cheat rows were never saved by the menu (no value
in its table), so they hold for the run only: settings::PER_RUN, put back to
their defaults at each start. The crate is sysmod-cheats.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Memory, Buttons, CheatSource and SwitchStore over memory_read_now and
memory_write_now, memory_bases, pad_hid (0 while the Insert menu is open, as
the C), cheat_files, build_id, mods_on_at_start and the mod's global storage
(the switches move out of mods.json's "cheats"). The rows set oot::debug's
knobs while the Debug tools (or HOS_OOT_CHEATS) are on; heart protection
follows HOS_OOT_PROTECT_HEARTS until its row is touched, as the C's -1 did.
The Mods tab's list and switches go through tab (for game.h's cheat_info and
cheat_set). The journal puts the knobs back and empties the list at the stop;
the cheats' memory writes stay, as the C left them.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The crate's copy of the table goes: name() is oot::sysmods::area_names's. The
C showed the names only in the Discord status, which is the discord script mod
now and names places as the player's game does; a native mod cannot export to
a script yet, so the mod declares itself and changes nothing until it can.
The crate is sysmod-area-names.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Ported from host/oot_heart_containers.c's taken and want: the count of the
boss containers Link took, given to the game side through
oot::travel::set_heart_containers_source, for player.state()'s heartPieces
and the Discord status's pieces of heart. The ids are read once, on a thread
of their own, at the first ask; off, the count (and so the pieces) is not
known, the game as shipped. The crate is sysmod-heart-containers.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
A cheat rewriting a value the game keeps changing made one entry a frame, filling the journal's 4096 in about
70 s and pushing out other mods' changes. The entry keeps its first "before" and the latest bytes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The mods' cameras' field of view and the Debug tab's heart protection no longer depend on the Field of view and
Damage taken mods running: the core serves them, and Field of view's handler takes camera.lens's place while it
runs.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The Debug tab's cheat rows were never saved by the menu; as Store::Options they were written to the options file
and put back at each start. Store::Run keeps them in memory, the default at every start.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
ModApi::site_handler puts a handler on a site the mod's manifest lists (hooks.unsafe), journaled so the mod's stop
takes it off; ModApi::log writes under the mod's id; ModSettings::get_of and published_of read another system mod's
setting, and a row's shown_if may name one (system/<name>:<key>).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Text, Field of view, Damage taken, Skip title and Shadows put their handlers on through ModApi::site_handler, which
checks the manifest's sites, in place of each calling the chain itself; Shadows logs its fit through ModApi::log;
Damage taken is Normal, and its row hidden, while the Cheats mod's Debug tools are off, as the C had it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
PaneSizes::restore writes the game's value back into every field still holding the scaled one; the mod's journal
runs it after its handler is off.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
longshot-game gives api's services what only it can (Services::set_hosts): the game's memory over
hos_mem_region and the guest window, the files the game is served (a mod's layer, else the RomFS
folder), the post-process passes for the renderer (with spirv, block, enabled, revision, owner, and the
renderer's reports through game_post_report), the world layer as a list (game_world_draws), the mods'
audio mix pulled by the host's mixer (game_audio_mix, called in nn_audio.c after the game's frame),
content.read's reader (content_read.c's reads over content::read and the RomFS layers) and the loader's
packages over content::archive. fx_spirv_check and fx_spirv_source are ported (spirv.rs) for the
PostSink's check. host/nn_applet.c exports hos_game_language for the reader's default language.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
game_init installs oot's engine callbacks and adds the runtime's step to the acquire phase (order 50);
the runtime (Services with its hosts, the loader over content and the options file, QuickJsHost) is made
at its first run, on the game's main thread, and the loader finds the mods there. Each frame: the loader's
frame, the workers, Services::frame, the control bridge's jobs. NATIVE_MODS is the compile-time list of
native system mods, empty with its spot marked. --mod-dev is read in game_mod_tool; game_shutdown writes
the stores (hos_close_finish). game.h follows what is exported.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The travel bridge and the state tap's exports keep their C names (hos_oot_destination, _teleport_ask,
_teleport_result, _teleport_cancel, _age_ask, _state, _current_map, _stats, _player_seen(_ns), _loading,
_flight_shortcut_ready, _sample_ask, _sample_cancel, _sample, _watch, _poll) over oot's travel, bridge,
session and debug, with game.h's game_control_* beside them. game_control_mods ports control_mods.c as one
JSON request and answer: the list, the lines, and mod_restart/mod_test/mod_eval jobs (script::eval, the live
test runner) with eval's gates. game_input_line takes "!cheat <n>" (nn_hid.c calls it in place of
hos_oot_live_action); game_movie_age, game_movie_setting (by legacy id), game_camera_scale, game_presented.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
game_menu_* lay the settings service's rows (api::settings::MenuHandle) out as GameMenuRow, made again when
its snapshot changes, the list before kept; a set goes through the handle to the next acquire phase.
The options file's lines go through game_options_load (vk_menu.cpp's reader hands every line), and the lines
the game side read or set are written back by the renderer's save (game_options_key/_value), which leaves
them out of the file's lines it keeps (game_options_has), so no key is written twice.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
nn_fs.c's OpenFile keeps its call: the export takes oot::fixes::damaged_files::stand_in's answer and writes
the stand-in's host path back when it fits.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
game_cheat_action, !cheat <n> and a movie's option 34 run the mod's command (refused unless it runs with the Debug
tools on); game_cheat_count, game_cheat_info and game_cheat_set replace host/cheats.c's hos_cheat_info and
hos_cheat_set.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Ported from host/oot_sprint.c's hos_sprint_input and hos_sprint_step. A toggled sprint that a reset ends while
the game's menu is up is now logged as every other end is.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Ported from host/nn_hid.c's walk_held, walk_percent and move_keys_stick: the keyboard stays the host's, which
hands this what it read.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The handlers on sprint.link and sprint.stance over oot::sysmods::sprint, the input and Walk key entry points
the host's controller reads reach through game.h, and system/sprint-walk: its manifest, its rows published to
the threads that read them, everything taken down by its journal when it stops.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The rows of gpu/vk/menu/widescreen.cpp with their keys, and the Custom placement's transform of a HUD group
(host/hos_wide_ui.c's place_axis and hud_transform).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The widescreen part of host/hos_main.c's boot over oot's size math, the keep mask of host/rx_backend.c's
host_wide_menus, and the picture's values the sites read on any thread.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
host/hos_wide_ui.c's layout lists, its RULES and classify, over names given as text or as the game's strings.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Ported from host/hos_wide_ui.c (ozwaldorf's pane planner, NotRexed/Hookshot#2843): the node table, the shape's
numbers of each present, the plan across and up and down, the custom groups, and the game threads' side that
notes each pane as its transform is made and moves it by the plan. The panes' memory goes through a trait,
the game's over oot::sysmods::widescreen, so the planner is tested on fake panes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Its lists' widths restored and every noted pane's transform marked to be made again: the C never stopped, so
this is new.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
host/rx_backend.c's host_wide_menus around the planner's tick, and host/hos_wide_ui.c's hos_gameplay_hud_screen
split in a begin and an end the host's wrap calls around the game's update.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
host/hos_wide_ui.c's hos_wide_ui_bg and hos_wide_ui_bg_draw over oot's picture record, pack and draw. No lock
is held across a call into the game, and a drawer whose pieces are being drawn is left alone at its own
draw's site, in place of the C's per-thread flag.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Every wide.* and ui.* site of game/sites.def handled over oot::sysmods::widescreen, and system/widescreen: its
manifest, its rows published to the presenting thread, Reset HUD placement, and everything taken down by its
journal when it stops.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Each function is declared once, with one signature, in #2411's sections (the
start, the frame, input, the control bridge, the renderer's table, files,
audio, the Insert menu's rows) plus the game side's own (settings, the options
file's lines, post-process passes, the world layer). Where the Rust replaces a
#2411 C function it takes #2411's name and signature: the control bridge's
game_state, game_current_map, game_destination, game_teleport_*, game_age_ask,
game_sample_*, game_watch, game_poll; game_flight_shortcut_ready;
game_live_action; hos_sprint_input; hos_wide_ui_tick; hos_gameplay_hud_toggle;
hos_cheat_info/hos_cheat_set; hos_perf_info/hos_perf_tracking;
hos_mods_romfs/hos_mods_file/hos_mods_dir_extras; hos_stand_in_damaged;
hos_game_layout(_log). Ours that duplicated those (game_control_*,
game_cheat_count/_info/_set with GameCheatRow, game_romfs_resolve,
game_romfs_opened, game_input_line, the second game_phase_run) are gone; the
(C) mark is on what is still #2411's C (the Mods page's list in mods.c, the
GameMenuRow data in menu/rows.c).

Kept ours on purpose:
- game_init returns int (1 made, 0 made before): the Rust start is safe to call
  twice and says so, where #2411's void one only read a switch
  (HOS_OOT_PROTECT_HEARTS, now the cheats system mod's). It is called once,
  after the RomFS index (hos_mods_init) and before the guest's first
  instruction: the mod runtime's layers and loader need the index, so the early
  call before the renderer is gone.
- The game's settings come from the system mods' declarations through the
  settings service's MenuHandle, not from static rows: a setting is its mod's,
  turned off with it and laid out by the Game settings mod. Both stay, so ours
  is renamed: GameSettingRow, GAME_SETTING_*, game_settings_generation,
  game_setting_count/_row/_get/_set/_text/_hint. #2411's GameMenuRow and
  game_menu_rows are unchanged, so gpu/vk/menu/game_rows.cpp still builds.

Call sites the header changes: hos_main.c calls game_init and game_mod_tool
through game.h; the Discord status (now the discord script system mod), the C
cheats' start and frame (now the cheats system mod) and Skip title's per-poll
presses (now the skip-title mod through the input service) are no longer
called from hos_main.c, nn_vi.c and nn_hid.c; nn_hid.c's !cheat writes
game_live_action again, as #2411 has it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
longshot-game exports what #2411's host and renderer already call, by #2411's
names and signatures, so the C it replaces can go without touching a caller:

- the control bridge: hos_oot_* and the game_control_* copies become
  game_current_map, game_state, game_destination, game_teleport_ask,
  game_teleport_result, game_teleport_cancel, game_age_ask, game_sample_ask,
  game_sample_cancel, game_sample, game_watch (HosControlGameWatch), game_poll;
  game_control_mods stays (the bridge's mod commands are the game side's own).
  hos_oot_stats, hos_oot_player_seen(_ns), hos_oot_loading and
  hos_oot_flight_shortcut_ready are no longer exported: their only callers were
  #2411's discord_rpc.c and oot_autoload.c, which system mods replace, and the
  shortcut is game_flight_shortcut_ready.
- the live input's !cheat: game_live_action, an exported int (AtomicI32) that
  nn_hid.c stores into as #2411 does; the acquire phase takes it and runs it
  through the Cheats mod's command. game_input_line is gone.
- the Mods tab's cheats: hos_cheat_info (texts kept for the run, as cheats.c's
  were) and hos_cheat_set, in place of game_cheat_count/_info/_set and
  GameCheatRow. game_cheat_action stays.
- the performance summary: hos_perf_info and hos_perf_tracking (new module
  perf), over oot::travel's place, with the host's hos_movie_stats and version.
- the RomFS: hos_mods_romfs, hos_mods_file, hos_mods_dir_extras(rel, all, fn,
  arg) in place of hos_romfs_resolve/_file/_dir_extras and the game_romfs_*
  copies; all 0 leaves out what the game's own folder lists, in any case (as
  hos_romfs_case found it), from the host's RomFS listing. romfs_opened is not
  exported (its C caller, romfs_layers.c's reload, is the Rust's now).
- the game's settings: GameSettingRow and game_settings_generation,
  game_setting_count/_row/_get/_set/_text/_hint.

vk_menu.cpp takes game_options_* from game.h, which it includes, instead of
declaring them again.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The lines the host's reads, the present and the site handlers keep (log::say,
at most 64, from any thread) are written at the mod's frame, and at its stop,
through ModApi::log, under the mod's id, as shadows does. Nothing outside the
mods takes their queues any more (log::take was waiting for longshot-game to
drain it). Reset HUD placement's failure, which runs with the API at hand,
goes to ModApi::log at once, as a warning.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The two system mods join the workspace (members, sysmod-sprint-walk and
sysmod-widescreen), longshot-game's dependencies and NATIVE_MODS, and
longshot-game exports what the host calls of them (new module sysmods):

- hos_sprint_input, #2411's signature (blocked: SPRINT_BLOCKED, _AWAY,
  _PAUSE), over sysmod_sprint_walk::input;
- game_walk_read(down, readable) and game_walk_stick(x, y, walking, out[2]),
  new in game.h: nn_hid.c's walk_held and move_keys_stick, with the Walk mode
  and speed the mod's settings. nn_hid.c is not switched to them here: its
  statics would be left unused, and deleting them is the lead's step;
- hos_wide_ui_tick, #2411's signature: the host's hos_wide_keep_mask (set by
  rx_backend.c's host_wide_menus just before) is the renderer's mask, forced
  when HOS_WIDE_KEEP is set (read once, as strtoul did);
- hos_gameplay_hud_toggle, #2411's;
- hos_gameplay_hud_screen, the builder's wrap of the HUD screens' update
  (not game.h: the lifted code calls it): hud_update_begin, the update,
  hud_update_end;
- game_wide_picture(want, output_w, output_h, out), new in game.h: the boot
  picture, Picture::for_screen at HOS_WIDE_MAX_PX, given to the mod's sites
  and logged. hos_main.c's start calls it in place of its own size math and
  keeps its hos_wide_* words for nn_applet.c and rx_backend.c.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
hos_guest_bytes is hos_guest_range out of line, for the game's Rust (guest::GuestPtr) to copy in and out with
volatile accesses; hos_free frees what hos_romfs_read and hos_zs_read_romfs allocated, by the C library that
allocated it. hos_guest_mark marked only the pages of a range's first and last byte (A64_MARK): a write of the
Rust's longer than a page left the pages between unmarked, so the renderer's captures missed them. It marks
every page.

hos_guest_wait32 and hos_guest_wake32 move beside hos_wait_on in hos_thread.c, on the same WaitOnAddress bound
from kernelbase.dll: game_guest.c called WaitOnAddress and WakeByAddress* directly, which on Windows needs
Synchronization.lib, which the game does not link.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
hos_site_callee is a C thread-local the lifted code's replace-site hooks store, which Rust cannot name: the site
chains (game/crates/game-sites) keep the site's own and put it back before each handler, through
hos_site_callee_get and hos_site_callee_set (host/game_call.c). The weak hos_locations_resolved's comment named
game.c, which has none: it is host/game_call.c's.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
What the mods' time budgets count (hos_thread_cpu_ns: Windows' GetThreadTimes, the thread's CPU clock on Linux)
and what the game side's notes of a slow call name (hos_thread_major_faults: getrusage's on Linux, -1 where they
are not counted), in host/hos_thread.c, for game/crates/host-sys's time module.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
hos_game_folder (a new host/game_host.c, for what game_host.h gives out of line) is the game folder in UTF-8,
the executable's or the one above bin/, worked out once with hos_paths.h's hos_game_path_*. The RomFS and user
folders (hos_romfs_dir, hos_user_dir: host/nn_fs.c's, set by hos_main.c at the start) and main's extent
(hos_main_base, hos_main_size, hos_main_code_end: the lift's gen/image.c) are declared in game_host.h, where
game/cheats.c and the game's Rust read them, instead of where each reader used them.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
hos_switch is getenv as longshot_env.h's env_on reads a switch (inline there), and hos_write_whole is
hos_atomic_file.h's hos_atomic_write (inline there): the game's Rust reads its switches and writes its stores and
the options' game lines through them, in host/game_host.c.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
A setting kept in longshot_options.ini that a mod changes, not the menu, reached the file only at the menu's next
write. hos_options_save (host/game_host.c) asks the menu's writer (gpu/vk/vk_menu.cpp save) through
rx_option_set's new HOS_OPT_OPTIONS_SAVE, a number no row has: the file is written again under the menu's lock,
the game side's lines with it (game_options_value).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The Debug tools' free camera read its keys with GetAsyncKeyState and tested the window in front and the Insert
menu itself (game/oot_tools.c); the game's Rust (its Debug tools, the mods' keybinds) asks the host instead:
hos_input_taken (the Insert menu open, or another window in front) and hos_key_down by a Windows key code, up
whenever the input is not the game's (host/game_host.c, on host/posix's keyboard on Linux).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
hos_mouse_camera, which game/oot_sites.c declared where it called it, is in game_host.h's input part. The header's
list names what the game's Rust binds besides and where each is; hos.h's host-memory word wait says it is not the
guest word's (hos_guest_wait32).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Every extern declaration of host-sys is now a function or global the host defines: game_host_guest_range is
hos_guest_bytes, game_host_mark hos_guest_mark (in 1 GiB parts: its size is 32 bits), game_host_ctx hos_ctx, the
site callee hos_site_callee_get and _set, the clocks hos_thread_cpu_ns and hos_thread_major_faults, the present
count the host's hos_present_count, the build id hos_main_build_id, the folders hos_game_folder, hos_romfs_dir
and hos_user_dir (mods, cache and system_mods worked out from them, HOS_MODS first), switches hos_switch, the
options' write hos_options_save, files hos_write_whole and hos_free, keys hos_key_down (by a Windows key code: the
keybind names' table moves here from oot::pad, which forwards to it) and hos_input_taken. The guest-word waits
hos_guest_wait32 and hos_guest_wake32 are bound (mem::wait32, mem::wake32). The menus' mouse is Windows only, as
host/display.c is.

What game_host.h has no function for answers as a host without it: the network engine (never available, every
open refused), the mod API's controller watch, presses, rumble and pointer capture (no read, nothing applied).
BC7 blocks have no host encoder in this tree (bc7enc is not in it): image::bc7_block encodes mode 6 in Rust.
hos_wait_on and hos_wake_all stay: they wait on the job barriers' own words in host memory, which
hos_guest_wait32 cannot address. The fake host gives a guest thread a context of its own (set_own_sp), keeps
guest-word wakes, and keys folders by paths::Dir.

longshot-game's host.rs still names game_host_free: ffi keeps it as a deprecated Rust forward to hos_free.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The Debug tools asked for "Page Up" and "Page Down", which are no keybind's names ("PageUp", "PageDown"):
the host's key table knows neither, so the keys read up and the free camera and the flight could not climb or
sink by the keyboard, as game/oot_tools.c's VK_PRIOR and VK_NEXT did.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The rebase onto #2411 kept this branch's guest (GuestPtr over Pod, GuestError, GuestCtx with calls) and left
#2411's src/host.rs and src/atomic.rs orphaned. One implementation remains: GuestPtr's atomics, which check the
address as a read does and mark every write, gain #2411's swap, fetch_add, fetch_sub and fetch_and (for u8 to
u64), and a 32-bit word's wait, wake_one and wake_all over hos_guest_wait32 and hos_guest_wake32 (through
host-sys's mem::wait32 and wake32, as every host call goes). host.rs's declarations were host-sys's already
(hos_guest_load and hos_guest_store are not needed: reads and writes copy through hos_guest_bytes), and its
option() is host_sys::options::renderer. #2411's API migrates so: Scalar is Pod, GuestCtx::read/write/read_ptr
are GuestPtr::read/write/read_non_null, GuestCtx::regs is gone (x, vreg_* and the rest remain), and
GuestAtomicU32/U64 are GuestPtr<u32>/<u64>'s own methods. Its one caller, oot::fov, is rewritten over
oot::sysmods::fov in its own commit.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
#2286 made game_call refuse a null context: host code calls the game only with the calling thread's own. The
guest crate's call_own_thread and call_own_thread_with (oot's OwnThread caller: the flags, items, pause,
respawn and verb-name calls from the acquire phase) still passed null, so every one was refused. They pass
hos_ctx's context (host_sys::call::current_ctx), and refuse at once with the new CallError::NotGuestThread
(code 3) on a thread that is no guest thread. game_call.h's comment still said NULL meant the calling thread's
own: it says NULL is refused. The fake host's set_own_sp gives the test thread a context of its own.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Field of view is a system mod (game/mods/fov, over oot::sysmods::fov::lens), but game/oot_sites.c's camera.lens
still calls #2411's hos_oot_fov, whose oot::fov and oot::options the rebase left out of the crate (and over
#2411's own guest API, gone with the merged guest crate). oot::fov is the C site's export again: the row's
percentage from the option the Insert menu row keeps (HOS_OPT_FOV, oot::options::FOV), and the mod's
lens for the rest, so the C site and the mod do one thing. oot::options keeps #2411's id, which the C site and
the parity test read.

tests/test_oot_fov_rust.py builds a library of the oot crate alone (guest, host-sys, game-sites and oot in a
workspace of its own, a staticlib over oot) instead of liblongshot_rs.a, which now holds every game crate and
the mod API, whose host calls a test program cannot give; the program links it with --gc-sections and gives
hos_guest_bytes and hos_guest_mark, which the Rust's reads and writes now go through. The planted changes move
to where the logic is (layout/sysmods.rs, sysmods/fov.rs): the clamp's bound and the event check as before,
and the row's range in place of the 100 % shortcut, which lens's second return at 100 % hides.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The guest and host-sys crates' parts, Field of view's pattern (the C site's hos_oot_fov over the system mod's
lens, guest memory through GuestPtr), and the stand-ins: host-sys binds game_host.h by its names, what has no
host function answers as a host without it, every host function the Rust needed and where it is, and where
hos_site_callee and oot_sites.c's hos_site_* go next.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The scene format for Native HDR, the dynamic resolution's three sites and the
fixed scale's two read and write host/nn_vi.c's variables: they move out of
game/oot_sites.c into host/render_sites.c and are declared in game_host.h,
which host-sys binds them by. The core still installs them as the engine's
callbacks on their sites. test_scene_format, test_dynres_sites and
test_fixed_scale_sites cut the callbacks from their new file.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
HOS_WIDE_UI, HOS_WIDE_UI_LOG, HOS_HUD_MAX_RATIO and HOS_HUD_FULL_RATIO were read by game/hos_wide_ui.c, which the
widescreen system mod replaces (its HUD layout setting, the limits as constants): GONE, 2026-11-23. HOS_DISCORD and
HOS_DISCORD_APP_ID stay: the Discord system mod's mod.json names them (offSwitch, settingSwitches), so their rows
say that now. A64_CAMERA_DIAGNOSTICS is not an RX_/HOS_/LONGSHOT_ name, so it has no row to mark GONE; its read goes
with game/oot_wide_sites.c. The other dropped switches of the reports were marked GONE already.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
What the game's C fed the host, or read from it, now goes through game.h's
Rust:

- nn_hid.c: the Walk key and the movement keys' tilt are the sprint-walk
  mod's (game_walk_read, game_walk_stick); walk_held, walk_percent and
  move_keys_stick go. The ocarina's note wait, which oot_sites.c wrote into
  hos_oc_wait, hos_oc_last_kind and hos_oc_beat, is read with game_note_wait,
  game_note_wait_poll (the stale wait and its log line) and game_note_kind.
- nn_vi.c: realtime_step's game part (the limiter, the engine's rate, the
  frame's seconds, the Camera and Game speed rows) is game_presented; the
  text speed's and camera's scales (hos_text_scale, hos_camera_scale) are the
  text mod's and game_camera_scale. The movie pacing reads
  game_movie_seen_ns; hos_movie_frames, the whole-frame counters and the
  loops' step (frame_whole.h, loop_step.h, carry_fractions) were only
  reached from oot_sites.c and are oot::video's now.
- hos_thread.c: GetSystemTick tells the game side who read the clock
  (game_clock_read), which finds its graphics module there; hos_gfx_module
  goes.
- input_movie.c: a replay sets the settings it recorded through
  game_movie_setting instead of answering rx_option (hos_input_movie_option
  goes), and a recording reads them with game_movie_setting_value. The
  file's option lines keep their ids.

game.h gains game_note_wait, game_note_wait_poll, game_note_kind,
game_clock_read, game_movie_seen_ns and game_movie_setting_value
(longshot-game's input.rs). game_host.h drops what only the game's C read
(hos_oc_beat, hos_text_scale, hos_frame_whole*, hos_loop_*,
hos_movie_frames).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Deleted, each replaced by the Rust game/DESIGN.md's map names:

- oot_barrier.c/h: oot::fixes::barrier
- oot_heap_retry.c: oot::fixes::heap_retry
- oot_high_fps.c/h: oot::fixes::high_fps
- oot_ocb_hold.c/h: oot::fixes::ocb_hold
- oot_tex_compact.c/h: oot::fixes::tex_compact
- oot_damaged_files.c: oot::fixes::damaged_files (hos_stand_in_damaged,
  longshot-game's romfs.rs)
- oot_menu.c: oot::menus (the menus' mouse)
- oot_state_tap.c: oot::state_tap (game_sample_*, game_watch, game_poll,
  longshot-game's control.rs)

Their engine callbacks are oot::engine's; the host calls the exports by the
same names, which the C defined too (a clash at link).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Deleted, each replaced by its system mod (game/DESIGN.md's map):

- oot_text_step.c, oot_text_size.c: mods/text
- oot_damage.c: mods/damage
- oot_sprint.c: mods/sprint-walk (hos_sprint_input, game_walk_read,
  game_walk_stick: longshot-game's sysmods.rs)
- oot_autoload.c/h: mods/skip-title (game_autoload_input's work is the mod's
  own frame)
- oot_heart_containers.c/h: mods/heart-containers
- oot_shadow.c, oot_shadow_fit.c: mods/shadows
- oot_voice.c: mods/voice-language, over the core's options.voiceWritten
  callback
- oot_area_names.c/h: mods/area-names
- oot_wide_sites.c, hos_wide_ui.c: mods/widescreen (hos_wide_ui_tick,
  hos_gameplay_hud_toggle, hos_gameplay_hud_screen, game_wide_picture)
- cheats.c: mods/cheats (hos_cheat_info, hos_cheat_set, game_cheat_action:
  longshot-game's cheats.rs)
- discord_activity.c/h, discord_rpc.c: the discord script system mod, which
  already did this over longshot/ipc (its test/make-golden keeps showing how
  golden.json was made from the old C, which it takes from history)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Deleted, each replaced by the Rust game/DESIGN.md's map names:

- oot_tools.c (hos_main.c's game half: the Debug tab's tools, the bridge's
  game commands, the opening's skip, the save trace, Link's pose, game_init),
  oot_teleport_check.h: oot::{travel, session, debug, player} and
  longshot-game's control, input, cheats and perf (game_current_map,
  game_state, game_destination, game_teleport_*, game_age_ask,
  game_flight_shortcut_ready, game_live_action, hos_perf_info,
  hos_perf_tracking, game_init)
- game_layout.c/h: longshot-game::layout (hos_game_layout,
  hos_game_layout_log)
- flags.c/h: oot::flags

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Deleted: game/sites.c and sites.h (the sites' flags and slots, the handler
chains, the data rules' values and tables), game/phases.c (the frame phases)
and game/oot_sites.c (the engine's callbacks). game-sites' build.rs makes
every hos_site_on_*/hos_site_fn_* and hos_table_* the lifted code names from
sites.def, its ffi.rs the hos_site_*/hos_table_*/hos_value_* functions and
game_phase_*; the mod-site pool (hos_modsite_*) is modsite.rs's; each engine
callback is installed at start by oot's engine.rs (the renderer's from
host/render_sites.c, the zstd decodes from host/hos_zstd.c).

hos_site_callee, the thread-local a replace site's hook stores, was defined
by sites.c and read by host/game_call.c's accessors: it is the host's now,
in game_call.c. sites.def stays the list; its HOS_SITE_ENGINE names are the
C's old callback names, labels for the reader.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
game/mods.c's RomFS index (every mod file indexed at the start), the
resource size table's merge and its fallback, hos_mods_romfs, hos_mods_file
and hos_mods_dir_extras go: longshot-game's romfs.rs exports those names over
content::layers, which serves the mods' files, the size table with the
button prompts' entries, and the prompts' and the texts' own files. Its
cheats' part goes too (hos_mods_count, hos_mods_dir, hos_mod_cheats_dir,
hos_mod_cheat_count, hos_mods_cheat_switch, hos_mods_cheat_set): the cheats
system mod finds the cheat files and keeps its switches in its own storage;
mods.json's "cheats" is kept as the file has it.

What stays is game.h's (C) part: the Mods page's list, its order and
switches in mods.json, the ExeFS patches' state (hos_mods_init,
hos_mod_info, hos_mod_edit, hos_mods_changed). A mod's line on the page no
longer counts its RomFS files nor the files a mod lower takes (the index
that counted them is gone): it says what the mod has.

game/texts.c (the texts' PC wording, hos_texts_romfs) goes: content::texts.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
With game/oot_sites.c gone nothing calls hos_oot_fov: the Field of view mod's
handler on camera.lens is the lens's one caller (over
oot::sysmods::fov::lens), and the core's engine callback there serves the
mods' cameras at the game's angle. oot::fov (fov.rs, the crate's one
no_mangle and its #[allow(unsafe_code)]) and oot::options (the option id it
read) go: oot exports nothing and has no unsafe.

fov.rs's tests move to sysmods::fov as tests of lens, with the cases of the
C check they replaced: the percentage and a zoom from its angle, the bounds,
non-lens angles, 100 and unknown percentages untouched, and another view, an
event or any broken link keeping the game's angle.

Deleted: tests/test_oot_fov_rust.py, tests/oot_fov_parity.c and
tests/fixtures/oot_fov.c. They linked an oot-only staticlib and compared the
old C with hos_oot_fov case for case; the export they drove is gone, the C
is no longer the reference (its cases are the Rust tests above), and
retargeting them to sysmods::fov::lens would need a new export from oot,
which exports nothing now. tests/test_oot_fov.py keeps the site's place and
words, and checks the core's and the mod's hold on the site and the
setting's key, range, default and old id (51) instead of cutting the C
callback from oot_sites.c and compiling the fixture.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Ported, each still checking the host code it was written for:

- test_input_background, input_background_test.c, test_walk_key: nn_hid.c
  hands the Walk key and the movement keys to game.h's game_walk_read and
  game_walk_stick (the sprint-walk mod's, tested by its walk.rs); the
  fixtures give a stand-in that does what the mod does, so the cases keep
  checking the host's key reads, gates and bindings. test_walk_key's wiring
  reads the mod's settings (keys walk_mode and walk_speed, old numbers 49 and
  50, the speed's range and default) and nn_hid.c's calls instead of the
  renderer's rows.
- test_ocarina_notes: the note wait comes from game_note_wait,
  game_note_wait_poll and game_note_kind; a stand-in over the fixture's wait
  and beat keeps the cases (the stale wait itself is oot::video's NotePoll,
  tested by a_wait_nobody_ticks_goes_stale).
- test_hold_toggle: the Linux pause focus hook that drops the latch is
  oot::menus' focus; read from its source.
- test_hle_guest_ranges, test_host_guest_writes: the entries of
  game/oot_tools.c, oot_menu.c and oot_high_fps.c go with those files (the
  Rust reaches guest memory only through guest's checked, marking
  GuestPtr).
- test_no_release_lookup reads longshot-game's lib.rs for oot_tools.c.
- screensaver_test.c: a comment.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
game/mods.c keeps the Mods page alone (the list, its order and switches,
the ExeFS patches' state); its RomFS index, the size table's merge and its
cheats' functions are gone.

- test_mods_list.py: built from mods.c, mods_list.c and options_path.c
  alone (no romfs.c, restbl.c, romfs_index.c, nor the zs, prompts and texts
  stubs mods.c no longer reaches). The "cheat" and "switch" ops go:
  the cheats' switches are the cheats system mod's own storage now
  (game/mods/cheats), and mods.c passes mods.json's "cheats" through as
  the file has it. Each cheats check is now that check: the file's
  "cheats" (a switch, a value that is not one, a key twice, the old
  longshot_mods.txt's cheat line imported) is written back exactly, and a
  start with no change writes nothing. Every check of the list stays.
  New mods_page(), from test_mods_sizes.py: the Mods tab's lines (RomFS
  files, ExeFS patch files built in or waiting against exefs_patches.txt,
  cheats, past the last mod), a move and its move back counting as no
  change, and the order and switches read at the next start.
- test_mods_sizes.py deleted: the rest of it drove the deleted index
  (which mod serves a path, a long path left out, nothing served with no
  mods) and the size table's merge. Serving is content::layers' now, with
  its tests (the_last_layer_wins_and_keeps_the_others,
  a_folder_and_a_file_keep_the_last_alone, made_files_and_served_paths,
  lists_a_folders_extras, an_entry_the_games_folder_lists_in_any_case_is_not_added,
  keys_are_lower_case_with_slashes ...). Not ported, so this coverage is
  lost with the C: the resource size table fitted to mods' grown files
  (each served file's entry raised, the mods' own tables merged in) has
  no Rust counterpart yet (content serves a table whole or with the
  prompts' entries; RESTBL fitting is SARC parts only).
- test_mods_size_table.py: keeps merge_restbl's checks (host/prompts.c,
  which stays); its Linux fixture over game/mods.c and prompts.c (what the
  size table, the font and a mod's file are served as, and the documented
  file-mod example of docs/dev/reference/mods.md) goes with the index it
  drove.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The key that says whether the prebuilt liblongshot_rs.a is a tree's read
longshot-rs/ and game/crates/ only. The native system mods (game/mods/*) are
crates linked into it, api's build makes its tables from game/mods and the
mod API's schema (game/modapi), game-sites' build makes the sites' slots from
game/sites.def and game/sites/sites.toml, and script compiles QuickJS-ng and
includes oxc's usingCtx helper: a change to any of them left the key as it
was, so a developer's tree linked the stale prebuilt library. They are the
key's now (a script mod's node_modules and cargo's target left out). The test
tree no longer names oot's fov.rs, which is gone.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
realtime_step's game part (the engine's limiter, its nominal rate, the frame's
seconds) is game.h's game_presented, oot::video's, and the movie pacing reads
game_movie_seen_ns.

Ported:
- test_frame_rate_cap_30: the movie's last update comes from a stand-in
  game_movie_seen_ns.
- test_pacing_policy: the host's cap, ticker, interval, acquire sleep, overlay
  and swapchain rows stay; a spy checks realtime_step hands the game the cap
  it paces at (the movie boost and its expiry too). The rows' game-step and
  nominal-rate columns go with the code that made them.
- test_video_hold_early: its note names the game side's movie.frameCount.

Deleted:
- test_realtime_rate: realtime_rate is gone; oot::video's
  the_rate_follows_the_clock_and_its_debt checks the quantizer and its debt.
- test_frame_carry_cap60: carry_fractions and the host's whole-frame and loop
  counters are gone; oot::video's fractions_are_carried_by_the_rule_of_the_c,
  a_counters_fractions_are_carried_only_when_asked,
  substeps_are_handed_out_when_carried and
  a_loop_of_one_frame_moves_in_whole_frames_and_draws_its_start cover them.
- test_frame_rate_cap_step: the step above 60 is oot::video's
  (real_time_writes_the_frames_rate_and_a_timed_cap_its_seconds,
  the_limiter_is_raised_for_the_cap_and_put_back_at_60,
  per_frame_at_60_gives_the_game_its_own_step); the frame.seconds rule's
  text is builder/crates/sites' (its MulF32 tests); the cap's selection stays
  checked by test_frame_rate_cap_30 and test_pacing_policy.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
game/DESIGN.md's "Where each C file went": every file on the left is
deleted; what is left of the game's C is the Mods page (mods.c, mods_list.c)
and the static menu rows (menu/rows.c). The rows say where hos_site_callee
went (the host), the renderer's six site callbacks (host/render_sites.c),
oot::fov and oot::options (gone with hos_oot_fov), mods.c's parts, and the
host's game parts with the game.h functions that replace them.

game/README.md: what is here now; the Rust's pattern told by the Field of
view mod's handler rather than the C site's hos_oot_fov; the stand-ins for
hos_site_callee and host_sys::sites updated, and two new ones: the two
lists of mods (the Mods page's and the loader's), and the size table's
merge for grown files that content::layers does not do.

docs/dev/reference: the mods, input, control bridge, hooks and upscalers
pages name the Rust where they named the deleted C.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
host/input_movie.c no longer answers rx_option with a replay's rows
(hos_input_movie_option is gone): a recording reads the game's settings it holds
with game.h's game_movie_setting_value, and a replay sets the recorded ones
with game_movie_setting where the game's differ. The fixture keeps a fake
game's settings behind those two; the option lines and a recorded replay's
lines are checked as before. One check follows the new behaviour: a setting a
replay set stays after the replay ends (the old rows went back to the
player's menu then).

The wiring's game parts read the Rust that replaced oot_tools.c and
oot_menu.c: oot::menus' tick plays the recorded menu choices while a replay
plays and records the mouse's, and oot::debug gives the recording Link's
position (read only while one is active, under the tools' lock, put back
through his controller) and the Debug tools' actions before and after they are
taken. rx_option is checked not to ask the recording any more.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The rows the system mods now own leave gpu/vk/menu: crt.cpp, colour_vision.cpp, walk.cpp and widescreen.cpp go whole,
Sprint's row (sprint.cpp keeps apply_sprint_layout), Shadow resolution (detail.cpp) and their opts fields (sprint,
walk_mode, walk_speed, hud_*, crt_filter, crt_lines, colour_vision, shadow_res, damage_taken) with them. Keys are unchanged:
each is the owning mod's SettingDecl now, placed by game/mods/game-settings.

- MkwVkHost version 49 replaces version 48's game_menu_rows (game/menu/rows.c) with the game side's table: the settings
  (game_setting_count/_row/_get/_set/_text/_hint, game_settings_generation), the options file's game lines
  (game_options_*), the Debug tab's actions (game_cheat_action) and the post-process passes (game_post_passes). The
  renderer's module never names a game.h function directly: the options file's direct game_options_* calls
  (unresolvable in longshot_vk) go through it too. vk_api.h includes game.h for the types.
- gpu/vk/menu/game_rows.cpp draws every game setting in place by key (tab, section, after/before, order), as an unsaved
  row that reads the game's value before it is drawn and sets it as the player does; Sprint's controls follow the Sprint
  setting (apply_sprint_layout). It makes the Accessibility section when a row goes there.
- The Debug tab's panel keeps its layout: Heart protection, No-clip flight, Free camera and Movement speed show and set the
  cheats mod's settings by key; Debug tools and Damage taken (debug_tools.cpp) are unsaved rows mirroring the cheats and
  damage mods' settings. Option 34's plumbing goes: each action (mark, return, clock, pouch, age, teleport, inventory) calls
  game_cheat_action when pressed (cheat_action, menu_take_cheat_action, HOS_OPT_CHEAT_ACTION's answer gone), as do
  HOS_OPT_CHEAT_HEARTS/FLIGHT/CAMERA/SPEED's answers, the renderer's flight state and its HOS_OOT_PROTECT_HEARTS read (the
  cheats mod reads it).
- The CRT and colour-vision passes read game_post_passes (menu_game_passes: the CRT pass's filter and lines, colour
  vision's mode) in place of opts; the Ultrawide menus side reads the widescreen mod's setting.
- vk_replay.cpp's option callback no longer answers the game's rows (Walk, Sprint, the HUD, Shadow resolution, Damage
  taken, the cheats); the Quality preset puts Shadow resolution back to Auto through the shadows mod.
- HOS_SKIP_OPENING's override of the old Skip opening row goes: the renderer cannot set a game setting for one run.
- menu_i18n.h: the HOS_WIDE_UI hint, no text of anything now, leaves every table.
- docs/dev/reference/architecture.md: the game's rows as the system mods' settings.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
- test_menu_ini_keys.py: the system mods' keys count, from the Game settings mod's table (game/mods/game-settings
  LAYOUT), each held to its owner (MOVED: the old opts value to "game:<owner>"); FROZEN keeps every key, and gets
  shadow_steady_fit, the shadows mod's new line, on purpose. The cheats mod's run-only rows and Reset HUD placement save no
  line. A game/menu row from before is not counted twice.
- test_menu_modules.py, test_menu_sections.py, test_menu_slider_ends.py, test_settings_table.py: the menu built with no
  game has none of the system mods' rows (CRT, Accessibility's Colour vision, Ultrawide menus, Shadow resolution, the HUD,
  Walk, Sprint...): they are left out, and the settings page's lines for them are checked to be there by label.
- test_menu_i18n.py: the system mods' texts (game/mods/*/src) are the menu's texts too: the menu draws and translates them.
- test_damage_debug_menu.py: Damage taken is debug_tools.cpp's own int now (menu_damage_taken_row); the Debug tools'
  warning sets the cheats mod's setting. What Damage taken does while the tools are off is the damage mod's (the
  renderer's menu_damage_taken is gone), so that assert goes with it.
- test_menu_save_atomic.py: stand-ins for menu_game_options_* (save() reaches the game side's lines through them).
- test_crt_policy.py, upscale_independent_test.cpp: the CRT filter is read from the CRT system mod's pass
  (menu_game_passes).
- test_option_ids.py: Sprint's 97 stays reserved beside Walk's 49 and 50 (the sprint-walk mod's legacy ids).
- test_crt_options.py is deleted: it compiled gpu/vk/menu/crt.cpp's two rows (defaults, labels, keys, presets), which are
  gone; the rows are the CRT system mod's settings, checked by game/mods/crt's unit tests (off_makes_no_pass,
  the_slot_follows_the_rows, the_rows_keep_their_keys), and the pass by test_crt_policy.py and
  upscale_independent_test.cpp.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Ported to read the Rust that replaced game/oot_tools.c, oot_state_tap.c,
flags.c and game_layout.c:

- test_pipeline_tour and scripts/tours/route.py: the bridge's teleport and age
  actions, the hour action, the destinations (child and adult maps), the
  refusals' texts and the state tap's event, loading and age are read from
  oot's debug.rs, travel.rs (DESTINATIONS, Refusal) and state_tap.rs; the
  cache files from longshot-game's layout.rs; the switches from the game
  side's crates and mods; the options' keys also from the system mods'
  settings. The menu's actions are matched in either form
  (cheat_action.store or menu_game_action). scripts/pipeline_tour.py drops
  HOS_TEXT_SPEED, a switch gone (text_speed=3 in its options stays).
- test_cheat_items: also checks oot's travel.rs INVENTORY_ITEMS and
  INVENTORY_PROBES are the header's, in its order (the game side's copy of
  the list an edit's action indexes).
- test_bug_report (the map line, oot::travel), test_perf_report (the pose's
  gates, oot::travel's perf_pose and perf_place), test_parity_gates (the save
  trace's line, oot::session), scripts/parity_gates.py, scripts/tours/
  drive.py, control_test.c, display_startup_failure_test.cpp: the new place.

Deleted, the C they built gone:

- test_debug_tools_linux: it followed oot_tools.c's #ifdefs; the Rust tools
  have no platform condition (oot::debug, the cheats mod).
- test_game_flags, game_flags_test.c: oot::flags' tests (the_hash_is_murmur3,
  a_flag_is_found_by_probing_past_a_collision, bools_floats_and_texts,
  bool64_finds_then_remembers and the rest).
- test_game_layout: longshot-game's layout.rs
  (moves_once_renames_the_pipeline_cache_and_never_overwrites).
- test_teleport_check: oot::travel's only_a_dropped_request_is_sent_again.
- test_teleport_minimap_flag: the repair is travel.rs's teleport, through
  GameData::set_bool_queued (no unit test drives it: a gap).
- test_oot_song_inventory: oot::travel's songs_and_masks_are_counted_their_way.
- test_oot_first_night: the C it built (oot_inventory_refresh's repair of the
  first adult night's time lock, Longshot #1064) has no Rust: the repair is
  not ported, reported to the lead rather than kept as a test of nothing.
- test_perf_pose, perf_pose_test.c: the angles are oot::debug's
  (angles_stay_within_the_relays_range,
  camera_angles_come_from_the_eye_and_target); the gates (rate, event,
  stale, title) are read from travel.rs by test_perf_report.
- test_oot_state_tap: oot::state_tap's tests (the_core_line_is_the_cs_byte_for_
  byte, a_request_is_answered_by_the_next_tap, the watches' and the
  changes').

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
game/oot_sites.c and the core's C (oot_high_fps.c, oot_barrier.c,
oot_heap_retry.c, oot_ocb_hold.c, oot_tex_compact.c, oot_menu.c,
oot_damaged_files.c, oot_tools.c's update hooks, phases.c) are gone, and with
them nn_vi.c's whole-frame counters, loops and movie frames: the tests that
cut and compiled them go. Each site's registration is oot::engine's, checked by
its every_callback_names_a_site_of_the_def_once and
every_outcome_site_has_its_engine_callback; the behaviour by the modules'
own tests:

- test_high_fps_fixes, test_drive_target, test_floor_carry_step,
  test_horse_jump_step, test_jump_takeoff_step, test_oot_cloth_60,
  test_oot_cloth_time, test_song_note_cue, test_saved_turn_rate:
  oot::fixes::high_fps (a_driven_target_carries_last_updates_shortfall,
  a_floor_carries_in_full_on_a_short_frame,
  a_horse_step_of_the_whole_frame_is_not_slow_motion,
  a_backflip_gets_the_rest_of_its_takeoff_step,
  the_cloth_keeps_the_clock_below_60_fps, the_cloth_solves_once_a_60th...,
  a_note_flag_read_again_before_the_job_ran_is_the_same_note,
  the_steering_rate_divides_only_for_a_step_under_one, ...).
- test_oot_barrier: oot::fixes::barrier (ten, the wakes and waits).
- test_oot_heap_retry: oot::fixes::heap_retry (seven).
- test_ocb_hold: oot::fixes::ocb_hold (eight).
- test_tex_compact: oot::fixes::tex_compact (three).
- test_oot_menu_mouse, test_menu_hooks: oot::menus (seven).
- test_camera_speed, test_movie_frame_count, test_ocarina_wait,
  test_loop_step, test_frame_whole, test_scarecrow_timing,
  test_water_substeps, test_web_floor_steps, whole_sites.py: oot::video
  (a_turn_speed_is_scaled_and_left_alone_at_100_percent,
  the_camera_scale_takes_50_to_400_percent,
  a_movie_player_counts_the_frames_time_and_keeps_its_fraction,
  the_note_sites_arm_and_end_the_wait,
  whole_frames_are_cut_as_the_lifted_code_cuts,
  substeps_are_handed_out_when_carried,
  a_loop_of_one_frame_moves_in_whole_frames_and_draws_its_start, ...).
- test_camera_centering, test_oot_jitter: oot::engine
  (the_follow_yaw_skip_keeps_the_base, the_jitter_goes_to_the_third_lane_only).
- test_player_update_sites, test_movement_speed,
  test_flight_yields_to_events, test_free_view_anchor: oot::debug
  (movement_speed_scales_only_walking_speeds, the flight's and the view's
  tests).
- test_opening_skip, test_oot_transition_autosave: oot::session
  (the_opening_skip_arms_on_its_requests_and_skips_its_timelines,
  the_opening_skip_off_drops_the_arm, only_the_transition_autosave_is_dropped).

Ported, keeping what is still the host's:
- test_game_phases: the empty run's one relaxed load is read in game-sites'
  phase.rs (the phases' behaviour is its tests'); the acquire's wiring in
  nn_vi.c and nvn_native.c stays checked. game_phases_test.c goes with
  phases.c.
- test_damaged_rom_files: the stand-in's choice is oot::fixes::damaged_files';
  the test reads the table's three pairs, OpenFile's call for a read and the
  export.
- test_hos_ab: HOS_OOT_BARRIER_WAIT's reader is found in the game side's Rust
  (paths::ab_value).
- test_present_trace: hos_cheats_frame is no stub any more.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The renderer draws every game setting from game.h's game_setting_* now
(gpu/vk/menu/game_rows.cpp, MkwVkHost 49), so #2411's static rows
(Field of view, Text speed and size, Skip title screen, Skip opening,
Discord status, Ultrawide menus), each a system mod's setting with the same
key, go with game_menu_rows and game.h's GameMenuRow block.
host/rx_backend.c's vk_host gives version 49's entries in their order:
game_settings_generation, game_setting_count, game_setting_row,
game_setting_get, game_setting_set, game_setting_text, game_setting_hint,
game_options_load, game_options_key, game_options_value, game_options_has,
game_cheat_action, game_post_passes. The builder's plan no longer looks for
game/menu/*.c. What is left of the game's C is the Mods page.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
host/nn_hid.c read No-clip flight and Free camera with rx_option
(HOS_OPT_CHEAT_FLIGHT, _CAMERA) and set flight with rx_option_set: the
renderer no longer keeps those rows (they are the cheats system mod's), so
the double-tap shortcut and the free camera's input routing were off. They
read the settings by key through game.h (no-clip_flight, free_camera, -1 /
off while debug_tools is off, as the hidden rows were) and the shortcut sets
no-clip_flight with game_setting_set, made at the game's next frame.

game/options.h says what its ids are now: the system mods' settings' old
numbers (legacy ids), for input recordings, and names the mods where it
named the deleted C.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The system mods' C (oot_text_step.c, oot_text_size.c, oot_damage.c,
oot_sprint.c, oot_autoload.c, oot_heart_containers.c, oot_shadow.c,
oot_shadow_fit.c, oot_voice.c, oot_wide_sites.c, hos_wide_ui.c, cheats.c,
discord_*) is gone; the tests that compiled it go, each covered by its mod's
crate and oot::sysmods:

- test_text_size, test_text_speed: game/mods/text and oot::sysmods::text.
- test_oot_damage: game/mods/damage and oot::sysmods::damage.
- test_skip_title: game/mods/skip-title (machine.rs, told.rs) and
  oot::sysmods::skip_title; test_dev_ab keeps the bench's key and screens.
- test_heart_containers: game/mods/heart-containers and oot::sysmods::hearts.
- test_oot_shadow, test_oot_shadow_fit: game/mods/shadows and
  oot::sysmods::shadows.
- test_oot_voice_option: game/mods/voice-language and oot::sysmods::voice.
- test_wide_sites, test_wide_ui, test_hud_layout, test_hud_layout_row,
  test_oot_wide_bubble, test_oot_wide_save_picture,
  test_oot_camera_clearance, test_movie_shape, widesites.py:
  game/mods/widescreen (panes.rs, hud.rs, picture.rs, names.rs, ...) and
  oot::sysmods::widescreen. (Two host checks went with them: rx_backend.c
  calling hos_wide_ui_tick each present, and hos_wide_keep_mask's narrow-screen
  rule.)
- test_discord_activity: the discord script system mod's own tests
  (game/mods/discord/test, golden.json).
- test_cheat_vm: game/mods/cheats (vm.rs, program.rs, parse.rs).
- test_prompts_size_table: it served the size table through game/mods.c's
  hos_mods_romfs and its fixture (test_mods_size_table.build_fixture), both
  gone; the serving order is content::layers' (made_files_and_served_paths).
  host/prompts.c's raised font entry has no test left: a gap.

Ported:
- test_sprint: the fake-game check of oot_sprint.c and the sites' callbacks
  go (the sprint-walk mod's machine.rs, oot::sysmods::sprint); the host's
  binding, read_input and npad_states checks stay, the Sprint row is read as
  the mod's setting (sprint=, HOS_OPT_SPRINT 97, off) with the renderer's
  apply_sprint_layout.
- test_dev_ab: the Skip title setting's key, sites and screens from the mod.
- test_native_zstd, test_mouse_native: the zstd decodes' and the mouse look's
  sites are checked by the core's registrations in oot's engine.rs and
  host-sys's bindings (the C callbacks they cut are gone).
- sitecheck.py, sitetable.py: their default source is host/render_sites.c,
  the callee the host's.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
test_site_chain compiled game/sites.c (hos_site_add, hos_site_remove,
hos_site_next) with a stand-in site list. The handler chains are game-sites'
chain.rs now, whose tests check the same rules:
an_owner_alone_is_called_through_the_plain_trampoline,
handlers_wrap_the_core_lowest_priority_first,
one_answerer_and_the_outranked_are_told_or_left_out,
outcome_sites_take_nothing_at_run_time,
the_callee_is_put_back_before_each_handler,
a_removed_handler_is_let_go_after_the_grace. tests/run_all_times.json drops
the one deleted test it timed; scripts/devtools' and the tour's notes name the
Rust the C became.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
tests/test_oot_state_tap.py went with game/oot_state_tap.c; oot::state_tap's
own tests check the snapshots, the watches and the changes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
game/menu/rows.c's row went with the C and no mod declared it, so oot::session's knob was never set. The mod
declares the row (same key, old number 52), sets the knob at its start and when the row changes, and puts the
game's opening back when it stops.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The renderer builds its menu once, at its first use, which can come before the first acquire phase makes the mod
runtime; the game's rows were then missing for the run. Until the settings service publishes, the rows are the
native mods' manifests', with the options file's values, laid out as Game settings does.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Mod-to-mod exports and calls, the network and IPC through game_host.h,
the UI channel and the inspector, hot reload and settling in parts,
serial in-place listeners and engine rows, Ogg streaming (lewton), the
batch --mod-tests run, the controller, and the Mods page in Rust, with
their game_host.h and game.h functions.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
longshot-game's host.rs declared hos_zs_read, hos_fs_save_root/_end, hos_mem_region, hos_game_language,
hos_movie_stats and hos_wide_keep_mask itself; host-sys binds them now (files::zs_read, files::save_root,
mem::region, info::{game_language, movie_stats, wide_keep_mask}), each with its fake branch, and game_host.h
declares the save root's and the language's.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The design says turning a mod off undoes everything it did; the port only undid live effects and left writes for
the Mods tab's undo. mod_stopped asks the journal's undo too, which puts each write back at the next frame where the
game still holds the mod's value. The cheats mod's writes, merged by address, are undone the same way.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
game/oot_tools.c's oot_first_night_fix went with the C and was not ported: a save outside Hyrule Field that
still held HrlField_isFirstNightTime_Adult could never leave night. The map refresh clears it, once, never while
an event plays; HOS_OOT_FIRST_NIGHT_FIX=0 leaves it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
oot::travel published them for the menu, but nothing sent them on: the Switch age row and the Inventory page showed
unknown. The acquire step sends the renderer what changed (rx_option_set, OOT_CHEAT_ITEM_BASE + i and
OOT_CHEAT_AGE_ID), as oot_tools.c did; host-sys binds rx_option_set.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The renderer answers HOS_OPT_MEMORY_TIER (3998) with the tier its Quality preset or Auto picked, and the Shadows mod
reads it: Auto is the game's size on Minimum and Low, Highest from High up, as menu_shadow_res chose, in place of
High everywhere.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
A build's locations.toml may now hold [[location]] tables beside its sites
(the C era's format: a function = "f_<address>" or a data = <address>).
sites::named checks each against the lift's functions, main's data and the
game's list (game/crates/oot/src/locations.rs); locations_c writes the
host's hos_locations_resolved from them.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The 72 names game/crates/oot/src/locations.rs reads, each its function or
datum in build e0f3ccfa, as the C era's host/game/sites/<build>/locations.toml
gave them ([[location]] tables, names and addresses only).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The lift checks the build's [[location]] tables (sites::named) before it
lifts anything, and writes gen/locations.c every time: the host's
hos_locations_resolved with each name and address, or none for a build
without a table. The tables' key holds the game's list
(game/crates/oot/src/locations.rs), the compile builds locations.c with
the lift's other C, and the shader preparation's driver keeps it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The lift now writes gen/locations.c in every build, with the build's
named locations or none, so the host's stand-in is never the definition.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Points Location's doc at the lift's gen/locations.c, and checks each
variant's ident is its name with each dot an underscore, as the builder
reads the list.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The pads' poll plays a mod's level on both motors while it lasts, at the
Vibration strength row's scale (and a pad's own percent), and the game's
own rumble resumes after it. Ported from the mod API branch's
hos_sdl_rumble_mod.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
host/game/pad.c of the mod API branch, moved to the host as hos_pad_* and
hos_pointer_* (game/DESIGN.md, "The controller"), declared in their own
section of game_host.h. npad_states calls hos_pad_hook after the frame
step's buttons: the player's read recorded when watched, then a mod's
replacement, the buttons kept and the presses. A held pointer leaves the
mouse look (nn_hid.c mouse_stick, mouse_native.c) and hos_pointer_take
hands the mod the motion at the menu's sensitivity. The mouse tests'
stand-ins gain hos_pointer_held, and mouse_stick's checks a held capture.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
host_sys::input's pad_watch, pad_read, pad_publish, pad_press, rumble,
pointer_take and pointer_hold call game_host.h's hos_pad_*, hos_pointer_*
and hos_rumble_mod in place of answering as a host without them. HID_BITS
maps the API's button order to the HID's bits both ways and the sticks
scale between -1..1 and +-32767; the fake keeps the host's records (HID
bits, +-32767 sticks, presses by bit, the pointer, the rumbles), so the
tests see what reaches the host. native.rs's HID map is now this one.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The player's read reaches the service in the API's order from the host's
HID bits, once a frame, a torn copy keeping the last; a stopped mod's
presses are let go to the other mods' end and its rumble ended, another
mod's left alone.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The mod tool's file natives (and its module loader, and host.format) now
check each path against a fence (script::modtool::fence). game-cli.js
confines the command once, before any of the mod's code runs, with
native.confine(write, read); a second confine is refused. The SDK's
folder (read only) and the run's own scratch folder in the system's temp
folder (os.tmpdir()) are always in it. A path outside, or one that
reaches outside through .. or a link, is refused with ERR_ACCESS_DENIED
and a stable .reason (modtool.fence.outside, .dotdot, .link, .loop).
A command that never confines itself is confined to its default (the
current folder, the mod's) when the mod's code could first run: a realm
made, or a module loaded from outside the SDK.

Paths are resolved as the system walks them (links followed, .. the
real parent), the roots the same way; a stat on the way to a root and a
mkdir on the way to a writable root are allowed, so mkdirSync's
recursive works.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
A realm's code can outlive realmDispose: QuickJS keeps a context while
its objects live, and the realm's handle stays alive while a call into
it is on the stack (a mod's code that stops its own realm). An import
then reached the module hooks with a context the tool no longer listed,
which they took for the tools' own: the tools' loader, which gives
longshot:native and every file. The hooks now give the tools' loader to
the tools' context alone and refuse any other they do not know.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
lib/fence.js works out the folders a command needs from its arguments
(its mod's folder by default; new's mod in mods/, data --out's file,
dev's copy in mods/, run's and allow's Dev profile, the game folder to
read, where a tsc, node or git was found) and game-cli.js's main
confines the command to them (host.confine) before it runs, so before
any of the mod's code. The game a command finds then is pinned
(game-find.js's pinGame): finding it again would read folders above the
mod's. Node confines nothing.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Under the game each vm context is a realm of the tool's one runtime,
which keeps it, and its modules, until H.realmDispose: nothing called
it, so a test run's memory grew with its tests. lib/vm.js now has
disposeContext, contextMark and disposeContexts (the game's realms
disposed; nothing in Node, whose collector frees its contexts). The
test runner disposes every realm a test made at its end; the fake game
disposes a mod's old realm at a hot reload and a worker's when it ends;
the link check and runScript dispose theirs when done.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The finish copies mod-tools' bin/, lib/ and package.json from the tree
(assets/modding/packages/mod-tools) into the game folder's sdk/tools/,
where the game's longshot mod looks for its entry, so it runs with no
LONGSHOT_SDK. They go in with the build's other files, each by its bytes
(a changed file is copied again), and a file of sdk/tools/ the builder
put there that the tools no longer have is taken out. A tree without
mod-tools ships none.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
A release's longshot-builder builds from its carried tree, which the
finish now takes the game folder's sdk/tools/ from: SOURCES adds
mod-tools' bin/, lib/ and package.json (not its tests).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
tools.md says which folders each command reads and writes under the
game, the scratch folder, and the ERR_ACCESS_DENIED refusal and its
reasons (and that the programs a command starts are not confined).
game/README.md's stand-ins: the game folder carries the SDK's tools
alone, the processes and the bridge's socket are not confined.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
host_sys::paths::options_file binds host/options_path.c's hos_options_file
(game_host.h includes options_path.h): mods.json sits beside the settings
file, which the loader needs to find it as game/mods.c did (the user folder
--user names, not only HOS_OPTIONS_FILE's).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
api::services::features::present lists the features of this build from
the oot probes and whether the audio mix knows the game's groups, so the
loader's resolve can be given them at game_init, before the services are
made (game/DESIGN.md, Still to port 9: Loader::scan). Services::feature
asks the same function.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The loader's start is two parts (game/DESIGN.md, Still to port 9). Loader::scan
needs no MainThread nor services: the folders, mods.json, packages, the
system mods put first, the resolve, and the Mods tab's first snapshot (its
page rows without settings or permissions until the services are made).
Loader::start, at the first acquire phase, lists each mod's grants and
manifest with the services, declares the native mods' settings and
prepares the chosen mods with code; it scans first when nothing did.

What game/mods.c did besides the list is the loader's now:
- the game folder's mods.json copied into the user folder once, when that
  has none and it is a list (carry_state), else this run keeps the game
  folder's;
- modcache/mods_json.txt naming the list's place for the builder, taken
  away when the list is the game folder's or not there (note_state_file),
  and written again after a write makes the list first;
- longshot_mods.txt read once when there is no mods.json, written into it
  and kept aside as longshot_mods.txt.imported.
None of the three runs with a list of the run's own (LoaderConfig::own_list:
HOS_OPTIONS_FILE or HOS_MODS_LIST) or in Safe start.

The tab's snapshot gains changed (0 while the order and the switches are
the start's, else a number for them: mods.c's state_key, a live row's
switch left out since it takes effect at once), list_bad and unsaved. The
log says "mods: none in <folder>" and "mods: N mods from <folder>" as
mods.c did (scripts/parity_gates.py's gate 5 reads them).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The loader's scan reads the build's exefs_patches.txt as game/mods.c's
exefs_status did: each patch file of a mod of the emulators' layout
(exefs/*.ips, *.pchtxt) hashed (FNV-1a, the build's third column) and
found built in, waiting for the next build, for another game version, or
not applicable with the build's reason; the files built in whose mod is
off or gone counted in the log. A row's lines say it as mods.c's mod_text
did (Row::exefs, exefs_note).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The tab's rows gain asks and warning (a manifest mod's sites.toml, its
code, waits for the player to accept the warning: docs unsafe.md) and
build (its sites accepted and not in the game's build as they are now, or
ExeFS patches of a mod that is on waiting for the next build), as
game/DESIGN.md's GameModRow has them. The code is hashed as sha256 of
sites.toml, kept as the mod's "accepted" in the trust file when the
player accepts (Edit::Accept, game_mod_edit's op 4), and found built when
the build's mod_sites.txt names the mod with that hash; until then the
mod is held back whole, and its switch is the start's (not live).

The permission prompt's answer is an edit too (Edit::Answer), made at the
next acquire phase: the menu's thread reaches the prompt through the tab's
handle, before the services are made as after.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Nothing filled content::layers since game/mods.c's RomFS index went
(92416923): hos_mods_romfs answered the game's own file for every path, so
no mod's RomFS file was served. Loader::publish_layers builds the start's
table from each mod that loads with a romfs folder, a layer each in the
list's order (a mod lower in it wins a file two have), and publishes it
whole; a package that loads with RomFS files is unpacked into the cache
first, and its start uses that folder. Links are left out, as the disk's
reads leave them (a mod's files are its own folder's); the C's walk left
out folder links only. The log says "mods: <mod>: N RomFS files" as the
C did.

Disk::meta gives a file's size and last write, which the layers keep.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
game.h's new section (game/DESIGN.md, Still to port 9): GameModsSnapshot,
GameModRow, GameModPage, GameModSetting, GameModPermission, GameModPrompt
(the mod API branch's MkwVkMod* of gpu/vk/modpage.h, field for field) and
game_mods_snapshot, game_mod_edit, game_mod_setting_set,
game_mod_permission_set, game_mod_prompt_answer. longshot-game::mods_page
turns the loader's newest TabSnapshot into that C block (built again only
for a newer snapshot; the newest two kept, so a pointer stays valid until
the next call as the contract says) and queues the menu's edits by id; a
setting's value is checked against its row before it is queued.

game_init makes the loader (runtime::loader_config: mods.json beside the
player's settings file, host_sys::paths::options_file, as game/mods.c had
it; the features from api::services::features::present), runs its scan,
publishes the start's RomFS layers and hands the tab to mods_page, all
before the guest's first instruction; the runtime takes the scanned loader
at the first acquire phase and starts its mods.

game/mods.c's (C) part of game.h is still there: the renderer moves to the
new functions next, and the C goes after it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
MkwVkHost's mod_info, mod_edit and mods_changed (game/mods.c's, by index)
are replaced by mods_snapshot, mod_edit_id, mod_setting_set,
mod_permission_set and mod_prompt_answer, filled by host/rx_backend.c with
game.h's game_mods_snapshot, game_mod_edit, game_mod_setting_set,
game_mod_permission_set and game_mod_prompt_answer (game/DESIGN.md, Still
to port 9). cheat_info and cheat_set stay.

gpu/vk/vk_menu.cpp's Mods tab reads its lines from the snapshot and sends
its edits by id: a picked-up mod is followed by its id once the game made
every edit sent, never moves above a system mod, and a required system
mod is not switched off; Enter on a mod whose code asks accepts its warning
(op 4); the help line says what waits for a build and which switches apply
at once. The restart question reads the snapshot's changed. The permission
prompt and a script mod's page are drawn when the branch's modpage drawing
joins, from the same snapshot.

Left out of version 50: ui_snapshot and ui_post (Still to port 3), whose
game.h functions do not exist yet; they come with that part.

Tests: test_mods_menu ported to a fake host of snapshots and edits by id
(the same checks, and the system mod, the moves by id and the acceptance);
test_hos_ab's table order and test_menu_text_field's cut of restart_values
follow the new fields.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The Mods page's C is gone with hos_mods_init, hos_mod_info, hos_mod_edit
and hos_mods_changed (game.h's last (C) lines): the loader's scan in
game_init does what hos_mods_init did, and the renderer reads
game_mods_snapshot (MkwVkHost version 50). host/hos_main.c calls
game_init alone where it called both. One reader of mods.json is left in
the game, api::loader::list.

Tests, each with its reason:
- tests/test_mods_list.py is removed: it built game/mods.c and
  mods_list.c into a stand-in game and compared their reading of mods.json
  with the build's. The game's half is the loader's now, tested over
  MemDisk in game/crates/api/src/loader/tests.rs (where the list is, the
  carry into the user folder, the build's note, longshot_mods.txt's import,
  a list that is not one, what a write keeps, Safe start, the restart
  number); api::loader::list's own tests check the text. Its check that
  the game and the build take and refuse the same texts has no game program
  to drive any more: it needs one of the Rust reader to come back.
- tests/test_fs_links.py loses its RomFS-walk part: it cut index_romfs out
  of game/mods.c, which had not had it since 92416923 (the walk is
  Loader::publish_layers', which leaves out links, tested in the loader's
  tests). Its file system checks stay.
- tests/test_parity_gates.py reads gate 5's two log lines in the loader's
  source; tests/test_crash_dialog.py and test_low_memory_notice.py anchor
  on game_init() where they anchored on hos_mods_init(image).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
DESIGN.md: Still to port 9 says it is ported and where the port departs
from the design (MkwVkHost version 50 without §3's ui_snapshot and ui_post,
the prompt and a mod's page not drawn yet, no frame times, a native mod's
buttons, changed and live rows, a list of the run's own, the sites'
acceptance, the RomFS layers the scan publishes); the map moves game/mods.c's
Mods page and mods_list.c/h to api::loader and longshot-game::mods_page,
and says no game C is left; Fixed on the way 42: the tab's edits wrote
mods.json on the menu's thread. game/README.md: no C of the game's own,
game.h has no (C) line, the scan runs in game_init, and the Mods tab's
stand-ins.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
docs/dev/reference/mods.md's code table and parity-gates.md's gate 5 rows
name api::loader (Loader::scan, publish_layers, list, tab) and content's
layers where they named game/mods.c and mods_list.c; game-files' README
and its mods example say the test that compared the two readers went
with the C.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
game_mods_snapshot moves the newest block into before in two statements
(not two borrows of the guard in one), its test checks a setting's number
within a margin (clippy's float_cmp), and runtime.rs brings AudioOut into
scope for groups_known.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The renderer hands the options file's lines over (game_options_load) when
it starts, which is after game_init now that the loader's scan runs there:
the system mods' switches from before they were mods (legacySwitch) were
not there to carry over. game_init reads the file's lines first
(options::preload, split as the renderer splits them); the renderer's own
hand-over gives the same lines again.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
content::assets::bc7 is Richard Geldreich, Jr.'s bc7enc (the encoder host/bntx_write.c
compiled from third_party/bc7enc) in Rust: opaque blocks in mode 6 or mode 1 over the
estimated partition (the 64 patterns by use, with the filter bank), blocks with alpha in
mode 6, 5 or 7; principal-axis endpoints refined by least squares, the single-colour
tables, the perceptual YCbCr error, the uber levels. Params::for_texture is the C texture
writer's settings. Tests decode every block and compare the error with the mode-6
stand-in's on made images.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The mode-6 stand-in in host-sys was arithmetic, not a host call: the texture writer
encodes with content::assets::bc7 and host-sys keeps only the boundary.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
game_host.h's hos_zs_content_size, hos_zs_romfs_content_size, hos_zs_write,
hos_romfs_case and hos_prompts_font_entry, which the size table's fit needs:
host_sys::files::{zs_content_size, zs_write}, host_sys::romfs::{zs_content_size, case}
and host_sys::prompts::font_entry, each with its stand-in host's answer.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
content::restbl ports host/restbl.c and game/mods.c's fit_sizes (deleted with #2411):
the RESTBL read and written, entries raised, a mod's table merged over the game's,
the estimates and the growth in proportion; restbl::fit makes the game's table with
every mod's table for this version merged, another version's only for its own mod's
files, the prompts' font entry raised, and each served file's entry raised to its size
(in the game's case when the mod's differs). The host is a trait (HostSizes, through
host-sys), so the tests run on a made-up game.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The fit is written to modcache/rsizetable.zs and served whole at the game's table's
path, where the host's opens (hos_mods_romfs) and the prompts (hos_mods_file) already
ask the layers; a rebuild drops the live table's merged one first. Without a fit the
last mod's own table is served as before, the prompts' entries merged in.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
game_host.h gains hos_mem_copy_out (host/game_guest.c): the guest range checked against
the window, then ReadProcessMemory on the own process on Windows, which neither faults
into commit_on_touch nor commits a page the game has not touched or gave back, and
fails for it; a plain copy where the window is mapped whole (Linux, the web). As the
mod API branch's hos_mem_copy_out. host_sys::mem::copy_out binds it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
GameMemory::copy_out read the guest window directly: on Windows a read of a heap page
the game had not touched, or had given back, faulted and committed it. It is refused,
as the C's memory.read refused it ("unmapped").

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Fixed on the way 42 and 43 (the fit sizes the file served; a rebuild fits again);
the stand-ins lose the mode-6 BC7 encoder and the unguarded memory read, and the size
table's says who calls the fit.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Spelled out where the tables of different lengths meet in one expression, so the
types never rest on inference through a tuple.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
game_host.h gains the three functions game/DESIGN.md's "Still to port" names for the mods' image
thread (3) and batch --mod-tests (7): an environment switch set at the start, the game quit with an
exit code through the close's own path, and a thread run below the game's priority.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
host/broker_net.c, broker_net.h, broker_net_frame.h and ipc_endpoint.h come from the mod API
branch unchanged but for one line: bnet_ipc_allowed reads the build's system mods' endpoints
from game.h's game_system_ipc (longshot-game::net) instead of modapi/system_mods.h.

host/net_link.c holds the one link and gives the game side game_host.h's hos_net_*: opened at
the first grant or open, let go when the engine goes (no new link for 10 s), and closed with its
engine's threads waited for at hos_close_finish. broker_net.c includes broker_grants.h, which the
sandbox's port brings.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
host_sys::net binds game_host.h's hos_net_* (available, grant, open, send, close, poll ->
Poll::{Event, None, Gone}), its fake an in-memory engine a test scripts (fake::net); the stand-in
that answered every open "no engine" goes. host_sys::run binds hos_switch_set, hos_quit and
hos_thread_background. has("net") and has("ipc") ask the engine for their own kind.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
HeapCounter moves from script into api::call (script::heap re-exports it), so a service can hold
a HeapCharge of a mod's heap: bytes given back when it is dropped, from any thread. CallHost gains
charge (bytes counted against the calling mod's heap) and fault (a fault of the calling mod's,
without a throw); the engine's two hosts implement them.

ScriptHost gains, each with a default that does nothing, what the together step crosses runtimes
with: caller_left_ns, export_call (ExportCall, ExportOutcome), settle_now, charge_ns, and two the
design did not name: heap_charge (an answer queued is charged to its caller's heap, as together.c
did) and workers (the workers' messages, moved into the together step). ApiError gains mod_call
and net.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The host's half of longshot/mods (together.c in the C): load, call, listen, emit and the
registries' add, remove, list and watch, each refused in a worker; mod: imports checked against
the importer's manifest (import_ok) and linked against what the loader resolved (set_resolved);
raw_data, has_net and holds_by_name for spec 12.5 and an export's guard.

Values cross as JSON text. Calls, answers and loads are queued and run at the together step
(together_step, in Services::frame after the game's events): at most 8 rounds, each delivering
the emits in order, telling each changed registry's watchers, then running the queue through the
engine (export_call, settle_now). The caller pays: a call or an answer of a caller whose budget
is spent waits for its next frame, and what waits holds a HeapCharge of its sender's heap. An
export answering with a pending promise answers later through together_answer.

The writes, memory and actor-writes steps and the journal's frame move after the together step,
so what an export or an event's listener asks to write is made in the same frame. A stopped mod's
listens, entries and watches are journal Lives; together_gone drops what is queued of it and
answers its callers not-running.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The Rust's ipc_pattern_ok was reconstructed without the C, and differed from the grammar the
manifest reader, the game's side and the network engine share (host/ipc_endpoint.h): it took one
range of single digits, no $HOME, and any printable character in a part, so a manifest the engine
would open could be refused, and one it refuses taken. It is the header's now, with the endpoint's
check and match (ipc_endpoint_check, ipc_endpoint_matches) beside it, and bnet_headers_ok and
bnet_method_ok ported as headers_ok and method_ok, for services::net.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The game's side of mods' WebSockets, HTTPS requests and local IPC (net.c in the C): the natives'
service halves (net_connect, net_fetch, net_send, net_close, net_limits, ipc_connect, ipc_send,
ipc_close, ipc_connected, ipc_limits, ipc_pid), each refused in a worker, with the C's checks: the
origin granted, the scheme, the headers and method (the engine's rules), the limits, and ipc held
with the endpoint declared. A mod's grant is sent before its first connection and again when its
grants change (net_regrant, from the permissions' changes).

At the together step net_step polls at most 512 of the engine's events, settles promises and
delivers the rest (net-message, net-close, ipc-open, ipc-data, ipc-closed); the engine gone ends
every connection, marks every grant unsent, and asks for no link for 10 s. net_gone closes a
stopped mod's connections and withdraws its grant.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The engine's side of calls between mods (game/DESIGN.md "Still to port", 1 and 2):

- NativeSpec gains rejects: a member that answers with a promise (load, call, netConnect,
  netFetch) makes it through the mod's own call host (bind::native_call), and an error it returns
  is that promise rejected, never a throw. A native member's object or list argument is a
  structured value (a list's trailing undefineds left out); one refused reaches the service as
  Value::Text with why.
- script::NATIVES wires load, call, listen, emit, regAdd, regRemove, regList, regWatch, netConnect,
  netFetch, netSend, netClose, ipcConnect, ipcSend, ipcClose and ipcConnected to their services;
  netLimits, ipcLimits and ipcPid are the engine's own (a worker's source reads them).
- caller() is the mod whose call of an export runs now (ModState::caller), callerHas asks the
  services what it holds.
- mod:<id> resolves through Services::import_ok and loads as a module of the callee's exports,
  each a function over the call path (always a promise).
- QuickJsHost implements caller_left_ns, export_call (script::export: the export run under the
  caller's budget, its time and its faults the caller's through ModState::fault_to, its answer
  converted under at least 1 ms, a pending promise answered by reactions), settle_now,
  charge_ns, heap_charge and workers. A delivery's or a settle_now's bytes are a Uint8Array.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Before the loader's frame, the runtime gives the services the manifests a mod: import or a call
links against (every mod that loads, and the build's system mods); the workers' messages are no
longer delivered from runtime::frame: the services' together step does it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
DESIGN.md says parts 1 and 2 of "Still to port" are ported and names each departure with its
reason, maps together.c, net.c and the network engine's files to their places, and adds two
fixes to "Fixed on the way". game/README.md names the new host functions and the engine's one
stand-in (broker_grants.h comes with the sandbox's port), and drops the network from host-sys's.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
lewton 0.10.2 (with ogg 0.8 and tinyvec): pure, safe Rust that decodes
Ogg Vorbis a packet at a time, which streamed voices need, with no C to
vendor in place of the C's stb_vorbis (game/DESIGN.md, Still to port 6).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
host/audio_dsp.h ported for the mods' bus (api::services::audio_mix::dsp):
the transposed direct form II biquad, the cookbook's low pass, and the
I3DL2-style feedback delay network reverb, with their impulse tests. The
mixer takes them in place of its Schroeder stand-in in a later commit.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
A fade of 0 takes one audio frame instead of jumping, and a duck's
release brings the music back only when it was the lowest standing, to
the next lowest. Taken by the mixer in a later commit.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
api::services::audio_mix::decode: a sound's Pcm is 16-bit samples, 1 or
2 channels, at its file's rate, as audio_mix.c kept them, so a mod's 32
MB is what the guide says (the stand-in kept stereo floats resampled to
48 kHz: up to 8 times the memory for a mono 22 kHz file, and a second
resampling). The WAV reader is the C's: its checks and messages, a
refusal before a result past the mod's bytes is made, and 5.1 mixed down
without its LFE.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
audio_mix as audio_mix.c: a sound loaded { stream: true } keeps its Ogg
file's bytes, each voice of it gets a decoder of its own (the new
AudioStreams and StreamDecoder traits) and a ring of 1.5 s, which the
decoding thread opens and tops up 4096 frames at a time with no lock
held, rewinding a looping one; the mixer reads the ring by the frame's
number, silent and counted on an underrun. Limits: a streamed file 32
MB, 8 streamed voices a mod, 64 in all.

The mixer's stand-ins go: each voice is resampled once from its sound's
rate by its pitch, its gains ramped across the audio frame (a change, a
placed voice's gain, a stop's fade), through its biquad low pass and
into its mod's audio_dsp.h reverb, which rings out its tail with the
mixer's gate open. Nothing is allocated or freed on the mixer thread.
The game's groups move as audio_groups.c's.

On the way: a file that cannot be read makes a failed sound, as the
guide says, instead of an ArgumentError; voice.moveTo places a voice of
play() from then on; setEffects past the mods' 8 reverbs is a
LimitError; a call of more than 1024 frames is mixed whole (the C cut
it short). longshot-game gives no decoder yet (the next commit).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
hosts::Ogg decodes a file whole (AudioDecode) and opens streamed ones
(AudioStreams): 16-bit samples at the file's own rate, a file of more
than 2 channels mixed down in Vorbis's order, the length from the last
page's granule. A stream reads a packet at a time and rewinds by
opening its bytes again. Ogg sounds play again; the tests decode two
sine-wave fixtures made for them with ffmpeg's lavfi (nothing of the
game's).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
DESIGN.md: Still to port 6 says what was built and what changed from its
draft (decoders give 16-bit samples at the file's rate, the mixer
resamples once; a stream rewinds by opening again), lewton joins the
libraries, the map gains audio_dsp.h and stb_vorbis, and the C's cut of
a long audio frame is a fix on the way. README.md: the Ogg stand-in goes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
host/broker_frame.h (the broker's frames and its policies' plain checks), host/json_keys.h (the top-level keys of a JSON
document, which broker_frame.h reads) and host/dbus_proxy.h (what the broker lets through to the session bus), as the
mod API branch has them.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The broker (the game's executable started again as `longshot --broker`) holds a mod's network grant to its own
mod.json and keeps a confined game's change of the trust file only when it narrows it. The C manifest, package and
trust-file readers it used are gone with the C mod runtime, so it asks the Rust's, through four functions of
game/game.h that need nothing of game_init:

- game_mod_id_valid: the loader's id rule;
- game_manifest_net: a manifest's required network permissions and a system mod's ipc patterns, when it is that id's;
- game_package_manifest: a .lsmod's or .zip's mod.json, through content::archive;
- game_trust_record: api::loader::trust::record, a request kept only when it narrows the file, written in place.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
host/broker.c: the process the game starts before it confines itself (`longshot --broker`), which keeps what the
confined game may not have: crash reports and performance summaries sent with the system's curl, links and folders opened,
a systemd scope, a file saved in Downloads, the session bus through host/broker_dbus.c's filter, the trust file's
narrowing, and mods' network on a channel of its own. host/broker.h is the branch's.

Fitted to this tree: the trust file's change is checked and written by the game side's reader (game_trust_record, the
request's payload made by host/broker_trust.h), and host/broker_grants.c reads manifests and packages through
game_manifest_net and game_package_manifest. Mods' network is served only once host/broker_net.h is in the tree (it
comes with the network engine); until then the net channel answers BROKER_E_NONE.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
host/sandbox_linux.c and host/sandbox_plan.h from the mod API branch: Landlock for files and a seccomp filter that leaves
no network socket, applied in main() before any thread, the broker started first. A run confines itself whatever mods are
on (HOS_SANDBOX unset or 1); 0 turns it off, strict refuses to start unconfined. The branch's look for a script mod that is
on is gone, and with it its C readers of mods.json, packages and manifests.

Fitted to this tree's host:
- the user folder is the one main() chose before the sandbox (saves_dir's move runs there, outside it);
- the player's .nup the RomFS is read from in place is read alone, its path taken from the index's header
  (hos_romfs_index_nup_of, new);
- mods.json, mods-trust.json and the items journal where the game side keeps them (the game folder's mods.json unless
  HOS_MODS_LIST or HOS_OPTIONS_FILE say otherwise; the journal in the user folder), each made before its rule;
- the user folder's recordings/ (input recordings) written, modcache/ always made;
- language.txt made first (hos_language_txt_ensure, from the branch's host/nn_applet.c).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
host/sandbox_windows.c, host/sandbox_win_plan.h and host/broker_windows.c from the mod API branch: the game starts itself
again inside an AppContainer with no capability (no network), granted the game folder read, its own folders, the user
folder's and the drivers' caches written, and the outer process stays outside as its broker over a named pipe. Every run
relaunches so by default (HOS_SANDBOX=0 off, strict refusing to start unconfined); a step that fails leaves the run
unconfined, with its log lines.

Fitted to this tree: no look for a script mod (and none of the C mod readers it took); mods.json, mods-trust.json and the
items journal where the game side keeps them; the player's .nup granted read; the user folder's recordings\ written; the
trust file's narrowing through game_trust_record; mods' network served once host/broker_net.h is in the tree.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
host/hos_main.c starts the process sandbox: Linux's main() runs the broker's own work first (`--broker`), then chooses
the user folder (user_dir_early: saves_dir's move of an older build's user/ runs before the sandbox, which lets the game
write only the folders inside the new place) and confines the process before SDL, the sound or Vulkan start a thread;
Windows' main relaunches the game in the AppContainer after the settings file is chosen. Not for --prepare-shaders.
game_main logs what the sandbox did and calls game_set_confined with whether files and the network are both confined, so
a player's script mods start in a confined game, as the game side requires.

HOS_SANDBOX (0, off, false or no turn it off; strict refuses to start unconfined) has its row in gpu/vk/switches.def, with
the broker's own LONGSHOT_BROKER_FD, LONGSHOT_BROKER_PIPE and LONGSHOT_SANDBOX_NOTE and HOS_MODS_LIST, which the sandbox
reads; longshot_env.txt sets none of the first four. The game side takes HOS_SANDBOX's off words as the host does.

From the mod API branch: a restart hands the broker's channel to the new run (hos_relaunch.c), and the crash window's
helper sends its report, opens links and asks for its scope through the broker, which it is handed a channel to.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The trust file (mods-trust.json) is read-only to a confined game, and every run is confined now: a player's unsafe grant
taken back was written nowhere and came back at the next start. When its write in place fails, the loader asks the
sandbox's broker (host_sys::files::trust_set, over game_host.h's new hos_trust_set and host/broker.h's
hos_broker_trust_set), which keeps the change when it narrows the file and refuses the rest; a yes to the unsafe tier
still lasts the run alone.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
A confined game has no network and may not write Downloads or start the desktop's browser. MkwVkHost (version 50) gives
the renderer the broker's broker_perf_send, broker_save_download and broker_open (host/broker.h), each -1 when no broker
serves the game: the performance summary is posted by the broker, and Save my pipeline list saves its zip in Downloads
and opens the folder and the issue through it, as on the mod API branch. Without a broker the renderer does each itself,
as before.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The renderer keeps the SPIR-V every game folder shares in a shader store outside the game folder (gpu/vk/spirv_pack.h:
LONGSHOT_SHADER_STORE, else $XDG_CACHE_HOME/longshot/shaders or %LOCALAPPDATA%\\Longshot\\shaders), which the mod API
branch's sandbox did not know: confined, it could not open its lock and every start ran without it. It is made first and
written (a folder LONGSHOT_SHADER_STORE names only when it is narrow, on Linux). On Windows DLSS's runtime
(%LOCALAPPDATA%\\Longshot\\ngx, RX_VK_DLSS_DIR) is granted read, as Linux's rules read it already.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
docs/dev/reference/sandbox.md from the mod API branch, fitted to this tree: every run confined by default, what
game_set_confined tells the loader, the .nup and the shader store, mods.json and the items journal where the game side
keeps them, the user folder chosen before the sandbox, the trust file and the broker's narrowing of it (a section of its
own), the game side's readers the broker uses, and the network engine still to come. Linked from the developer docs.

The modding guides (unsafe.md, scripting.md, lifecycle.md, dev.md) no longer say the game runs unconfined with no script
mod on: a player's script mod waits only in a game the system could not confine, and the loader's row and log line say
so. An unsafe grant given lasts the run; one taken back is kept by the broker.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Without host/broker_net.h in the tree, host/broker_windows.c's pipe_pair, give and the net thread, and the counters both
brokers keep for the net channel, were left unused, which a -Wall -Wextra -Werror build of the Windows files (the
sandbox's test with LONGSHOT_MINGW) refuses. They are built with the engine alone.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
tests/test_sandbox_linux.py, test_sandbox_windows.py, test_sandbox_save_folders.py and test_broker_frame.py from the mod
API branch, fitted to this tree:
- every run confined but with HOS_SANDBOX's off words (0, off, false, no), on Linux and in the Windows relaunch decision;
- the files where the game side keeps them (mods.json the game folder's, the items journal the user folder's, the trust
  file beside the list, the game folder's own for a list in its user/), the user folder main() chose, the player's .nup
  read alone, the shader store, DLSS's runtime on Windows and the input recordings' folder;
- host/hos_main.c telling the game side (game_set_confined with both confined), and the game side's HOS_SANDBOX=0 taking
  the host's off words and no other;
- the broker's trust-file gate (the game's channel, the file named at the start, the run's limit) over a stand-in of
  game_trust_record, whose narrowing api::loader::trust's test checks; its net channel tested when host/broker_net.c is
  in the tree, else answered BROKER_E_NONE; MkwVkHost's version 50.
None of them was run here.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
tests/test_dbus_proxy.py as the branch has it: host/dbus_proxy.h's strict reading of the D-Bus format, its list of calls
and its authentication, and host/broker_dbus.c between a stand-in bus and a client. docs/dev/reference/sandbox.md names
it. Not run here.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
broker_grants.c is the sandbox's, reading manifests through game.h; the net channel waits for the engine's files
(BROKER_HAS_NET); host-sys and longshot-game own the trust file's broker call and the broker's readers. Fixed on the way:
no host called game_set_confined, and a confined game's grant taken back was lost.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
A serial site reached between two phases is told through the host's InPlace
(Hosts::in_place) and Services::visit_now: a filter's sealed draft read back
at each argument's type and written into the registers, its answer the
site's. A row naming one of the game's sites adds a handler to that site's
chain at its first listener and removes it at its last (the Retired guard
kept until the grace period); an outcome site or one this Longshot lacks is
listed with the chain's note and never hooked. Clashes are said once and
noted on each mod's Mods tab row. ScriptHost gains hook_filter and fault_mod.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The switches HOS_MOD_TESTS_ONLY, _OUT, _PLAYER_LIST and _TIMEOUT get their
rows, from the mod API branch's, with the Rust files' paths. Skip title is on
for a test run; a live mod_test is refused in the test mode.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
host/mod_watch.c and mod_watch.h of the mod API branch, unchanged but
the header's comment, which names the game side's api::watch as what
reacts. inotify on Linux, ReadDirectoryChangesW on Windows, a sleep a
wake ends elsewhere; game-free. game_host.h re-exports the header
(game/DESIGN.md, Still to port 4).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
mod_watch.h's open, wait, wake, stats and close as ModWatch (closed when
dropped; wait and stats one thread's at a time under a lock, wake any
thread's), and the walk's mod_watch_hash and mod_watch_file_sig. The
stand-in host has no notices: open gives None and the walks 0.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
host/modapi/watch.c in Rust: the folder table (256 folders) under a lock,
each notice placed by its path (a script folder's reload, a served
folder's layers, the mods folder looked at again, mods.json read again,
an overflow a look at everything), a change due once its folder is quiet
0.3 s and its files' hash moved (where walked, once two walks agree), and
the thread lsmod-watch over host_sys::watch. Watch::frame hands the main
thread what is due unless a co-op room holds the mods; Watch::request,
all and hold are any thread's. Unit tests: the debounce, which changes
count, the walked mode, the requests and their limit, a hold.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The loader owns hot reload's watch (Loader::watch), started at the end
of its start unless HOS_MODS_WATCH=0, the game's test mode or a safe
start; a folder script mod's folder is watched from its start (even when
its entry fails) until it is turned off. At the frame's end, before the
switches' stops: Shift+F8 (an edge), then what is due. Loader::reload:
dev.reloading (order 17, to the mod alone), its dev.keep values taken as
JSON as it holds them (ScriptHost::take_kept; one that cannot be keeps
its last copy, logged), what the listener asked to write dropped, its
stop without lifecycle.stopping, and a start from its files at the next
frame with the grants of now. A mod that faults in its listener stays
stopped until its next change; one that does not run starts again.

The engine hands back the same object for a key dev.keep holds
(CallHost::kept_as) and reads it back at the reload under the callback
budget. HOS_MODS_WATCH gets its row in switches.def.

Fixed on the way: QuickJsHost::stop destroyed a mod without telling the
next reap, so a script mod turned off in the Mods tab never had what it
made undone (Services::mod_stopped). The reap now tells it, as the
trait says and the loader's tests assumed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
{"cmd":"mod_reload","mod":id} answers {} once Watch::request queued the
reload (made at the next frame's end), or refused: no such mod, no
folder script mod (a package, a system mod), or 32 waiting. The watch is
taken from the loader at the bridge's first frame.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Settlements queue Settled::{Whole, Part}: Settlements::part (and
Promise::part) take an answer in parts from any thread, pending_bytes
counts the parts not yet handed to the mods, and set_hooks tells a
reader of a promise let go (its mod stopped) and of a settle that took
answers. The engine parses each part in the mod's runtime and defines
its members on the promise's array (one settlement of the frame's 64
each); the last resolves it, a rejection drops the parts, and a part
that does not fit in the mod's heap rejects it with LimitError.

content.read's reader thread sends what ContentReader::read_parts makes
through a PartSink that waits while more than 8 MiB wait to be handed
and stops a read whose promise was let go. longshot-game's reader sends
a map's placements in parts of about 64 KiB (the C did; the whole answer
was past what a value holds for a large map). Unit tests: the queue's
bytes and hooks, the parts in order, a rejection after parts, and
dev.keep's held object read back.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
DESIGN.md: section 4's Built note (the public calls, Watch::request's
signature for the inspector, where the reloads run and the order that
changed, the engine's new methods, what is not built, the host's part,
the parts' calls and where the waiting is), host-sys's and api's rows,
the C files' map, and fixed on the way 42. README.md: the stand-in line
for what the watch finds besides a folder script mod's files, in place
of mod_reload's refusal.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Watch::start takes Option<&Path>; Some(&list) was an Option<&PathBuf>.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The schema's TOML comments, its permissions' host lines and a few doc texts named host/modapi/*.c, host/game/*.h,
host/mod_manifest.c, generate.py and the C bindings' lsapi_* names. Each now names the Rust module that does it
(api::services::*, api::loader, api::manifest, oot::*, game_sites::modsite, content::*, longshot-game::*), or says
it is still to port. Doc text only: no id, name, type or permission changed. reference.md, permissions.md and
longshot.d.ts are not regenerated here.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The contributors' page on the schema named the C that is gone: host/modapi/*.c and its generated headers, the
lsapi_* bindings, generate.py, the C runtime's step names and its tests. It now names the crates (schema and
schema-gen, api with its services and its build-time bindings, script with QuickJS-ng and oxc, oot, game-sites,
content, longshot-game) and the system mods under game/mods; lists what schema-gen writes and what api's build.rs
makes; says how the Rust bindings, handles, filters, interfaces and the value model map onto the schema; gives the
acquire phase's order as Loader::frame and Services::frame run it; and rewrites "Adding to the API" for a service
in api::services. The UI's host side and the inspector are said to be still to port.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
api::services::writes keeps the deny list and the ranges as tables of its own (DENY, RANGES); the generated FLAG_*
tables are not read by it. Say so in game.flags.toml and api-schema.md, and that the two change together.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The authors' guides and their "For contributors" sections named host/modapi/*.c, host/game/*.h, host/mods.c,
host/mod_manifest.c, host/mod_archive.c and the C runtime's functions. A guide for authors now names no source file
where one did not help (lifecycle, packages, rules, manifest, settings); a contributors' section names the Rust module
(api::services::*, api::loader, api::system, api::claims, script::worker, script::natives, game_sites::modsite,
oot::flags, content::archive, longshot-game::*). ui-channel.md says the UI's game side is still to port (its Rust
names are game/DESIGN.md's design), textures.md that the texture packs' and recipes' code is not in the Rust yet,
and system-mods.md that the inspector's service is still to port. Paths of game/modapi's JavaScript gain their game/.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
hooks.md said a change to host/game/'s C compiles only the host again and that game_call is host/game/game.h's: the
game side is Rust under game/crates/, and game_call is host/game_call.h's, reached through host-sys. The
architecture's texture flowchart named oot_damaged_files.c, now oot::fixes::damaged_files.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
NaN-safe comparisons spelled out, iterators for index loops, the TAU
constant, const assertions for the layouts, a type alias for a test's call
log and doc lists that no longer start a line with '+'.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
A Safety section on each table site's function, a '?' for the runtime's
start and a doc list item that no longer reads as a link definition.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
A type alias for the published tables' list, and the chain's next() kept
by name (every mod calls it) with an allow and its reason.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
One allow(unsafe_code) on the qjs module (lib.rs's) instead of two, and a
type alias for a module record's parts.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
as_chunks for the build id's digit pairs, a type alias for a test's cheats
folder and a doc list item that no longer reads as a link definition.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
as_chunks for the MurmurHash3 words and the tree's commands, iterators for
index loops, struct update syntax in two tests and a type alias for the
message files written.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Error types for a refused settings file (storage::Refused) and a setting
that is not a keybind (settings::NotKeybind) in place of (); type aliases
for the setting switches, a keybind, the reader's requests; a write's
refusal boxed and a UI undo's mount boxed; iterators for index loops; a
const assertion; and the mix-down's 0.7071 kept as a named constant (the
C's value, not quite 1/sqrt(2)) with an allow.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The guide and the C both refuse exports, net and ipc without "runtime" (and a
runtime needs "api" and "entry"), so the together and net tests' manifests
were the wrong side. "con~x.json" is no Windows device name (the stem ends at
the first '.'), as the C's device_name says; the test now checks "con.x/y".

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
host/restbl.c restbl_grow gives a .bgyml or .byml file at least 8 bytes an
added byte plus 4 KiB (a ControllerSetParam grown in proportion failed to
load); the port had dropped it. The test's bfres case wanted an allowance
the C never gave a bfres (1120, not 2112); it now checks both kinds.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
word_in took "liftable" in "QueryUnliftableState": after a lower-case letter
only a word starting with a capital begins (the C had the same slip).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
bc7enc's mode 6 (the C's encoder) writes alpha 254 for that cut-out's solid
pixels; the clear ones must stay 0. serde_json writes 1e300 as 1e+300 (as
JSON.stringify does). The C's put_str, which read.rs ports, escapes a byte
that is not UTF-8 as \ufffd; the docs said a bare U+FFFD.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The bridge queue's "none taken" is taking 0, so asking after ticket 0 (never
issued) said Waiting once an ask was done; it is Gone.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
ACTOR_SIZE is the actor's bytes checked before its fields are touched; the
serial at 0x458 is past it and read on its own, checked (the C's game_peek_at),
so the test now checks the fields the spawner does touch. The skips test's
player hold (+0xf25 from BASE + 0x3100) lay past its 0x4000 map.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
QuickJS-ng 0.18 loads and resolves a module's imports while it compiles it,
so realmModule's compile asked for every import before link() had given a
linker, and any module with an import failed ("this context links only in
link()"). realmModule now checks the syntax with oxc (Node's constructor
throws a SyntaxError at once) and keeps the source; link() compiles it with
the linker set, and a module it imports is compiled as it is loaded. The
unused Context::resolve_module goes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The export test's manifests export without a runtime, which the guide and the
C refuse. A raw context has no eval until JS_AddIntrinsicEval. The runner's
entry is run([[file, ns], ...]) as the C's entry_of writes it. The fence test's
path.join took its ".." out, so the refusal was "outside", not "dotdot".

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The cheat rows are Store::Run, as the module says (the menu never saved
them). The opcode C0 test's store, 0410_0000, offsets by r0, which the test
had set to 7, so it wrote heap + 0x87; it now offsets by r2 (0), as dmnt's
0TMR00AA reads.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The mod declares two rows, Skip title screen and Skip opening (52); the test
counted one.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
As hos_wide_ui_tick's ui_on, the plan runs whenever fill_x is not 1, which a
wider picture always makes; the HUD stays in the middle (ex and ey 0).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The rows the system mods took over lost the menu's value texts: Field of view showed "100" for "100% (original)", and
Walk speed and the HUD placement rows lost their "%". A SettingDecl has a Format now (its unit, and the default's own
text), which the menu's row text and the settings' spec (unit) use; the 13 "100% (original)" translations are back.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Since the game's rows became the system mods' settings, kept by the game side outside opts, the report's "Changes from
the defaults" skipped them all. GameSettingRow carries its default now (MKWVK_API_VERSION 53), and the report takes each
game row's value now and default from the game side (menu_game_row_values), so Field of view at 110 reads
"Field of view: 110% (default: 100% (original))". tests/test_bug_report_defaults.py checks it is listed, from the game
side's value rather than the menu's copy, and that one at its default is not.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The game's table of its script system mods (game/mods/<name> with no crate: Discord status, the mod inspector) is
hashed from their shipped files, and the game trusts a system_mods/<name>/ folder only when it hashes to that entry;
but no step of the build put them there, so a run logged "the built-in mod system/discord is not installed". The
finish copies each one's shipped files (the schema crate's system_mods::folders and shipped_files, the same rule as
the table's), and takes out one the build no longer ships. A test installs one and checks its hash against the
source's.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
A Windows game cross-built on Linux stopped at the game's Rust: the build scripts' cc looked for
x86_64-w64-mingw32-clang on the PATH, and cargo for a linker of that name. rust::cc_env gives cargo's run the
toolchain's own clang and clang++ with its target flags, llvm-ar, and llvm-mingw's driver as the target's linker (else
its clang told the target). With it the whole Windows game folder links here (longshot.exe, longshot_vk.dll, the
AppContainer sandbox and the broker's Windows C among them).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The sandbox lets the game write only its own folders and the control socket's (host/sandbox_plan.h control_dir, which
says shots go there), but the client asked for shots in the run's shots/ folder or wherever the caller named: with the
sandbox on, as by default, every shot failed ("the PNG could not be written"). The client library asks the game to
write a shot into the socket's folder under a name of its own, then moves it to the asked path itself, reading it
through no link (the game can write that folder) and at most 256 MB. Game-free tests: the fake game refuses a path
outside its socket's folder, as the sandbox does, and a session's shot still lands; a link left in the stage is not
followed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
A confined game hung in "loading" after its save's file list: gmd::SaveDataMgr called nn::fs::Commit again and again
(every sample of it in save_copy's flush or save_journal's directory syncs), each one refused. save_journal syncs the
user folder and the folder it is in, and the sandbox (host/sandbox_plan.h) lets the game only list the user folder and
not open its parent at all: the open failed with EACCES, the commit with it, and the game asked again without end.

Those two folders' entries are made at the start, before the game is confined: host/sandbox_linux.c now syncs them
there, and save_sync_outer counts a folder the game may not open (ERROR_ACCESS_DENIED) as one this run did not change.
The save's own folders are synced as before. tests/test_fs_save_commit.py's new case refuses the parent's open as
Landlock does (its mode 0311) and commits: it fails on the old source and passes here.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
A check run's Discord status system mod connected to the PC's Discord and set a live status from a headless test.
Every run a tool starts, longshot_bridge.start_session (launch, ab, the parity gates, the routes) and tours/drive.py's
start_game (the pipeline tours), now has HOS_DISCORD=0, the mod's offSwitch, unless the caller's env sets it. A
player's game is unchanged. tests/test_longshot_ctl.py checks the fake game is started with it, that a caller's own
value stands, and that drive's start drops a shell's value for the run's.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The launcher's save picker sets HOS_START_SLOT=<0-99> for one run. The Skip title mod then presses through the title as
it does for the newest save, and on the file list moves the cursor from the newest save to slot_NN (d-pad down or up,
one slot a press, the list taken to show the profile's saved slots in their numbers' order) before its A. It is
followed with the Skip title row off too, and the row is never changed. A slot with no save (no progress.sav, or an
empty one), or a value that is no slot, leaves the title screen's file list for the player with a log line; with no
save at all the title screen stays, so nothing starts a new game or loads another slot silently. A build without the
button-wait sites, or a game that tells no wait in 45 s, gets no blind presses with a slot chosen.

Unset, nothing changes. In gpu/vk/switches.def (test_switch_table), docs/dev/reference/switches.md and the user docs.
Game-free tests in the mod: the slot's resolution against save folders (moves, a missing or empty slot, no slot, no
save), and the machine's presses (the row off, moves down and up, the list left, never blind). The list's order is an
assumption until a game run on a profile of several saved slots checks it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
#2286 keeps a run's saves in a launcher profile's folder (host/save_dir.h, HOS_SAVE_DIR or LONGSHOT_PROFILE's saves/,
an unusable one refusing the start). This is the game side's and the sandbox's part of it.

- The sandbox gives the folder's save/ and save-work/ the user folder's rights, the folder itself listed (Linux's
  sandbox_plan.h, made and synced before the rules; Windows' sandbox_win_plan.h). Both mains choose the folder before
  the sandbox starts (hos_save_dir_choose), so the rule names the folder game_main uses.
- The game side: host-sys's Dir::Saves (game_host.h hos_saves_root); the Skip title mod's newest-save lookup, and with
  it HOS_START_SLOT's slot check, read it.
- sandbox.md says so.

Game-free tests: test_sandbox_linux and test_sandbox_windows (the rules, another profile's not granted),
test_sandbox_save_folders (the folders nn_fs writes there are the ones granted), oot's newest-save lookup.

A --user named on the command line is seen before that early choice (user_named_early sets hos_user_named, as game_main's own parse does later), so a developer's --user still wins over a profile's saves/.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The mods' per-save data (modstore/save/<uid>/slot_NN) stayed in the user folder, so two profiles sharing it shared a
mod's data for their slot 0. With a save folder of the run's own (HOS_SAVE_DIR, or a profile's saves/: host/save_dir.h,
#2286's) it goes to <saves>/modstore/save/<uid>/slot_NN (api's storage save_root, longshot-game's runtime
save_storage_root); the global and profile stores stay in the user folder. save_dir.h makes the folder's modstore/
with save/ and save-work/, before the process sandbox, and both sandboxes grant it as they do those. Unset, as before.

Tests: api's storage (the per-save stores under the profile's folder, never shared, unset as before), longshot-game's
runtime, test_sandbox_linux, test_sandbox_windows and test_sandbox_save_folders (modstore/ granted),
test_fs_save_commit (made).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
#2286 moved a Windows game's saves to %APPDATA%\Longshot (hos_main.c
saves_dir) when no --user names a folder. The Windows sandbox still granted
the game folder's user\, so a confined game could not write its saves.

- main chooses the user folder before the sandbox, as Linux's does
  (user_dir_early, now on both): an older build's user\ is moved before the
  grants.
- sandbox_windows.c's found_of grants that folder, and the broker tells the
  confined game which one it granted (LONGSHOT_SANDBOX_USER, set by the outer
  process alone: refused from longshot_env.txt, a switches.def row), so the
  game does not choose again from inside the container.
- HOS_SAVE_DIR's paths are as long as the host's (SAVE_DIR_MAX is
  HOS_PATH_CAP, hos_paths.h), and user_dir_early's buffers too.

An unset HOS_SAVE_DIR keeps the saves in that user folder (hos_saves_root).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
- host-sys: romfs::read_zs_named over game_host.h's hos_zs_read_romfs_named
  (#2286): the heart containers' map files are read with bcett.byml.zsdic
  named, for a frame that names no dictionary.
- oot::sysmods::fov's tests take #2411's new parity cases: a null first
  camera refuses, no EventMgr (or its slot holding null) is no event.
- tests/test_game_boundary.py plants its game-side crossings in the script
  crate's shim: game/oot_menu.c is gone.
- build-compile's host_sources test: the checkout compiles no C of game/ (the
  game side is Rust); game/menu/ no longer is a source folder.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
gate_now (Link's update's gate for the spawns and despawns) was only tested
through the pure gate(); this runs it over the stand-in's memory: the play
clock ticking, and EventMgr's event word behind the named location's holder,
with an unrelated word of the holder at the same offset. It fails today: the
gate reads the holder's word.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
state.eventMgr is the manager's holder: the spawner's gate read the word at
+104 of the holder itself, an unrelated field. Non-zero, every spawn and
despawn was held until its 20 s timeout; zero, they ran during cutscenes, which
the gate is there to stop. It now asks state::event(), which follows the holder
as the state line and the C (oot_sprint.c) did; the spawner's own copy of the
offset goes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The C's wide.movie (game/oot_wide_sites.c) had two branches: wider than 16:9 it
narrowed the viewport's x to the middle 16:9, narrower (below 16:9 x 0.99) it
moved y in, bars above and below. The port kept the first only, so on a Steam
Deck (16:10) or a 4:3 screen movies fill the height, stretched. This checks
both over the stand-in's memory, at 16:9, 21:9, 4:3 and 16:10; it fails now.
The site hands movie the picture's ratio for it (unused yet).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The port of wide.movie kept only the C's branch for a picture wider than 16:9
(x narrowed to the middle 16:9) and returned otherwise, so on a Steam Deck
(16:10) or a 4:3 display a movie filled the height, stretched. Below 16:9 by
more than 1% its viewport's y is now moved in by (1 - ratio / 16:9) / 2 of its
height each side, as hos_site_wide_movie did (MOVIE_MIN_Y and MOVIE_MAX_Y, the
viewport's +12 and +20).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
A player's fallback build of the game's Rust reads the tree the builder copies
(build-driver's TREE), which has no assets/modding/docs; api's build.rs loads
the schema, and the load refuses a module whose guide page is missing, so the
fallback build stops ("guide assets/modding/docs/ui.md is missing"). This
loads a small schema with a shipped JavaScript module and no docs folder; it
fails now.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The schema's load (which api's build.rs runs) refused a shipped JavaScript
module whose guide page was missing from assets/modding/docs. A player's
fallback build (a key that does not match the prebuilt liblongshot_rs.a) reads
the tree the builder copies, which has no docs, so it stopped there. The guide
pages change nothing a build makes: their check moves to Schema::check_guides,
which schema-gen runs (and --check), and the repository's schema test.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Two things the cheats' port lost:

- Knobs::apply put the flight away when its row was off but never turned it on:
  the row is the flight itself (the double-tap shortcut flips it, host/nn_hid.c),
  as menu_player_flight answered it to the C. The knob now follows the row while
  the tools are on.
- Damage taken read the Debug tools row of the Cheats mod's settings, so it
  ignored HOS_OOT_CHEATS and stayed on with the Cheats mod switched off and the
  row left at 1 (review S19). The Cheats mod now publishes the tools' state as
  it applies its knobs (oot::debug::tools_on: off when it stops), and Damage
  taken gates on that.

oot::debug also gives Movement speed's percent as Link's update takes it
(speed_percent), for the input movie's recording.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The old recorder wrote the renderer's answers for HOS_OPT_* 32, 33, 35, 36 and
55: 36 Link's speed in percent (100 to 300), 32 and 33 -1 while untouched or the
tools off. The port hands them to menu::set as row values, so every recording's
first line ({"cmd":"option","id":36,"v":100}) becomes choice 100, clamped to
3x, and -1 turns heart protection and flight on; a replay also wrote the
player's settings and needed the replaying run's Debug tools. This checks the
five at the first frame and changes after, with the tools off, and that a
recording takes the same values back; it fails now.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
game_movie_setting handed an old movie's HOS_OPT_* values to menu::set as the
rows' values. They are the old renderer's answers: 36 is Link's speed in
percent (every recording's 100 became the 3x choice), 32 and 33 are -1 while
untouched or the tools off (-1 turned heart protection and flight on); and a
replay wrote the player's settings (Damage taken is kept in the options file)
and needed the replaying run's Debug tools.

The five Debug rows a movie holds (32, 33, 35, 36, 55) are now knobs of
oot::debug::movie: a replay sets them for the rest of the run, over the rows,
without the player's settings or the tools (-1 for heart protection: the run's
own), as the old replay answered rx_option; a recording takes them as the old
renderer answered them, so old and new recordings hold the same values.
Damage taken reads the movie's choice first.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Nothing in this build's renderer draws or answers the permission prompt, runs a
mod's shader passes or draws the world layer. A player's script mod lacking a
grant waited for a prompt no one sees, permissions.request's promise never
settled, and gfx.effect and gfx.world were said to be there. These check that,
with no renderer drawing them, gfx.effect, gfx.world and permissions.request
are absent, and a mod lacking a grant waits with no prompt queued, its row
saying it cannot be asked and the mods.json line that grants it. They fail now.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Nothing in this build's renderer draws or answers the permission prompt
(GameModsSnapshot.prompt, game_mod_prompt_answer), runs a mod's shader passes
(GAME_PASS_SHADER, game_post_report) or draws the world layer
(game_world_draws). With the sandbox on by default, a player's script mod that
lacked a grant waited for a prompt no one saw, permissions.request's promise
never settled, and has() said gfx.effect and gfx.world were there.

The host now says what the renderer draws (Hosts::drawn, api::services::host::
Drawn; longshot-game's: nothing yet). What it does not draw is absent:
permissions.request, gfx.effect and gfx.world are false in has() and a
manifest's requires, and their calls throw NotAvailableError. With no prompt
drawn nothing is asked: a mod that lacks a grant waits, its row saying this
Longshot cannot ask and the mods.json line that grants it, and a switch-on is
not held for an answer. The prompt's machinery is unchanged for the per-mod
page that will draw it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
GuestCtx held a &mut Ctx for the hook's length, while host/hos_thread.c sets
the same context's poll from another thread (an interrupt request): a &mut
claims every byte alone, so that store was undefined behaviour in Rust's model,
though nothing reads poll on this side today (review S15). GuestCtx now holds a
NonNull<Ctx> with the borrow's lifetime, and reaches the registers field by
field (a reference to x or vreg covers none of poll); host-sys's Ctx has poll
as an AtomicU32 (same layout, checked), so a shared &Ctx beside the host's store
is sound.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
SiteCx::site() read the site from the chain, and the plain trampoline (a site
whose only callback is a Rust owner) runs with an empty chain, so its owner was
told SiteId(0), another site's (review S16; latent: no owner asks today). The
SiteCx now carries the site's index itself; the chain no longer keeps it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
hos_site_subscribe and hos_site_unsubscribe had no caller, and unsubscribe let
a subscriber go without the grace period the Rust's removals wait for, so a C
caller that freed its user pointer after it could be called on it once more
(review S17). Nothing in the tree subscribes from C; the Rust's chain::subscribe
stays. hooks.md no longer lists them.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The port matched HOS_SKIP_OPENING against eight exact words, so =TRUE, =2 or
=" 1" (on for the C, as for every switch) and an empty value (off) fell
through to the row (review S18). It now takes the switches' one rule
(oot::sysmods::switch_value_off: empty, 0, false, off or no in any case, with
spaces around, is off; anything else on), and only an unset switch leaves it to
the row.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The Discord status sends only an art asset's key of the application as its
picture (a link would have Discord fetch it from outside the PC). A
discord_image=https://... carried over from an older build silently became
"longshot" (review S20): the log now says so once for each such value, and
graphics-and-controls.md's table says a link is no longer sent.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The banner is new with the port (the C showed area names only in the Discord
status), English only, and changes what every player sees: its row is off out
of the box, for the player to turn on (review S21).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
graphics-and-controls.md still said HOS_WIDE_UI overrides HUD layout, a switch
switches.def marks GONE (review S25). The placement rows are listed from
Middle 16:9 on (the setting's shown_if takes no value yet) and used at Custom.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The deleted test_prompts_size_table (#1109, #1192: a table not the game's
crashed the start) left host/prompts.c's raised font entry untested (review
S24). test_mods_size_table now runs hos_prompts_font_entry, cut out of
host/prompts.c over a made-up game folder, with host/restbl.c's parse, raise
and write: the entry grows by what the prompts' font is larger than the game's,
stays when it has room, and nothing is raised with no prompts' font or no font
in the RomFS. (What the table is served for is content::layers', with its own
tests; the damaged textures' stand-in is oot::fixes::damaged_files', tested in
Rust, and nn_fs.c's two lines that ask it stay checked from the source.)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The deleted test_oot_state_tap ran about 40 end-to-end modes; the Rust's tests
did not cover the changes scan meeting a table the game moved or resized (a
save loaded, a table grown), which parity gate 5 depends on (review S23). This
runs whole passes over a stand-in GameDataMgr: a change in place is reported, a
moved table with a value changed on the way is a fresh baseline with nothing
reported, a change after it is, and the same for a resized table.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The mod's handler scaled the angle itself and never called next, so a handler
after it on camera.lens never ran (review nit). It now hands its row down the
chain (oot::sysmods::fov::with_row) and calls next; the core's callback, last
in the chain, scales once by that row (row_now, 100 without the mod) and tells
a mod's camera.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
HOS_TEXT_SPEED went with the Text speed system mod (switches.def GONE), so the
parity gates' runs no longer had text at once (review nit). A run now writes
its own options file with text_speed=3 and names it with HOS_OPTIONS_FILE; the
scenario's hash takes the options too.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
mods_tick clamped the held mod's place to 0..count-1, undefined for std::clamp
when the snapshot had no rows (review nit). With no rows it now lets the mod go.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
mod.d.ts's first line said 0.3.0, mod.json 0.4.0 (review nit).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The row's legacy id mapped HOS_OPT_SHADOW_RES 56 onto the row's choices, but the
old renderer answered 56 with the size it resolved (0 the game's, 1 2200, 2
3072), not the row's choice (review nit). No input movie holds 56, so the row
takes no legacy id; the constant stays, documented.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
set_life refuses a life outside 1 to the actor's most only when it knows the
most at the call; a write queued without it could put 0 or less, a defeat the
game did not make (review nit). write_life clamps to 1 to the most.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Two refused game calls (a function this build lacks) went on wrongly (review
nit): heap.cpuAlloc's tryAlloc left x0 the heap pointer, then taken as the
allocation; the barrier's sleep returned at once, so the job's loop spun. The
first now answers 0 (no allocation, the retry in the heap's parents follows);
the second waits the game's own 20 us on the host.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
gpu/vk/menu/crt.cpp's hint told the player a CRT filter is bypassed while the
game presents Native HDR (PQ); the CRT system mod's hints are static, and the
game side cannot see the renderer's present, so the line was lost (review
nit). game_rows.cpp's hint for crt_filter says it again from
present_native_pq, before asking the game side.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The groups' notes named host/game/*.c files that never existed (the mod API's
first plan) and the Text speed group the text size's file alone (review nit).
They name game/crates/oot's modules, and both text files.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
take_shot opened want + ".part" with open(..., "wb"), which follows a link
there (review nit). It is now unlinked first and made with O_CREAT | O_EXCL |
O_NOFOLLOW, as the stage's read is.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
game_list skipped a locations! line with a trailing comment or the last line
without its comma, both valid Rust, so such a name went unchecked (review nit).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The builder picks a script system mod's shipped files with the schema crate,
and the table the game trusts was hashed by it; the game hashes the installed
folder with its own code (api::system::tree_hash). Nothing checked the two
agree, so a change of one (LEFT_OUT_TOP, the line format) would have the game
refuse its own mods (review nit). This installs each system mod of the tree as
the builder does and checks the game's hash is the compiled table's.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
A script's small keys were clamped to the most a dungeon holds, but the count
ever got and the grant reported added the whole ask (review nit: a grant of 5
with 8 of 9 held reported 5). Both now take what the clamp let in, and nothing
is reported when none went in; the count ever got cannot overflow.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
has() answered by the build's named locations alone, so the damage, actor-life,
heal, fall, rupee, reward, price and bottle rules, item grants and actor writes
said yes in a build whose site table places none of their sites, and their
hooks never fired (spec audit, work item 1). game-sites now holds each build's
placed sites (game/sites/<build id>/locations.toml, read by its build.rs;
game_sites::placed, looked up once a run), and a feature whose sites none is
placed is absent: has() false, its calls NotAvailableError.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The C era's table placed text.opened, text.set, physics.stepped,
physics.steppedOther, items.pouchAdd, items.pouchAdded, save.load and
actors.update; the port's table did not, so the texts' filters, the rays'
physics step, item grants and their answers, the save's load and the actors'
list never ran (spec audit, gap 3). Their definitions and the supported
build's locations are back, from the C era's tables (masked words and offsets
only); their handlers are game/crates/oot's (texts, rays, items, actors). The
19 rule sites (rules.*, rewards.*, actors.write, actors.bind, the query
answers, actors.lights) wait for their rules in the Rust lifter.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
longshot-mod reads mods_api= from the game folder's longshot_version.txt to warn
of a mod whose "api" the game keeps off, but the builder never wrote it (spec
audit, item 10). It is the tree's schema's [api] version.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Gate 5 (nothing started) reserved the process name longshot-broker for the mod
system, but the sandbox starts its broker in every confined run before it
confines itself, mods or none (crash reports, links and folders opened go
through it), so a vanilla run failed the gate (spec audit, item 10). The broker
is listed as the sandbox's; its mods' log lines stay reserved, and lsmod-
processes still fail.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The spec audit's docs pass (item 11): game/README.md's Stand-ins dropped the
stale game_set_confined line (the host calls it) and lists the content stage
and typed patches not run, the rule sites not placed, texture packs, recipes and
the BWAV writer not ported, and the unsafe tier's build side; DESIGN.md no
longer maps reload.c and recipes.c to ported services; content.rs no longer
says the loader drives the stage; textures.md and dev.md say packs and the
layers' rebuild while the game runs are not in this Longshot.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
has() answered yes for content.item, content.patch and the other content
stage declarations, and for gfx.textures, but the game runs no content module
and has no texture packs (spec audit, item 1). A declaration is a feature once a
content stage has begun this session (Services::content_staged), so not at the
loader's resolve, and a manifest's requires of one is not met; content.read
stays (the game's data, read without a stage). gfx.textures is absent.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
menu_game_setting is asked each present (the ultrawide menus setting) and went
through every game row with a strcmp each time (review nit). The place last
found is tried first.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
A retired table is kept until its readers' count is seen at zero, so a reader
that never left kept every table published after it, growing without a word
(review nit). Past 1024 waiting, the log says so once; they are still kept, as
freeing one under a reader would be worse.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The review's S22: a player's fallback build of liblongshot_rs.a needs the
network the first time (crates.io, and github.com for oxc's crates at their
tag); measured from an empty target folder with the crates fetched: 23 s,
189 crates, 115 of them oxc's.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
request_in, the client's side of host/broker_windows.c, read every reply into
one static buffer, though the game's channel (chan_lock) and the side channel
(side_lock) each hold only their own lock. A performance summary sent on the
renderer's thread could then overwrite a NET_CHANNEL or TRUST reply the game's
thread was reading: a wrong status, a wrong handle taken or closed, or a channel
dropped. hos_broker_crash_send kept its reply in a static too.

The check reads both functions and refuses any static in them. It fails here.
(The source check's marker for start_confined is brought up to its signature,
which gained the user folder in the base: the check stopped there before.)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
request_in (host/broker_windows.c) read every reply into one static buffer
while the game's channel and the side channel each held only their own lock:
a performance summary's send on the renderer's thread could overwrite a
NET_CHANNEL or TRUST reply the game's thread was reading, giving a wrong
status, a wrong handle taken (and used or closed) or a dropped channel.
hos_broker_crash_send kept its reply in a static too.

Each call now mallocs its own buffer, as Linux's client does.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
On Windows the record of the grants (sandbox_grants.txt) was kept in the user
folder, which is the game folder's user\ (written by the container) when the
game keeps it there or --user names a folder under a written one. The
unconfined --sandbox-revoke then trusted the record's own SID line, which
sbxw_sid_ok let be S-1-15-2-1 (ALL APPLICATION PACKAGES), and its paths, to
which no never list applied: a game taken over could have the launcher strip
other apps' ACEs, rewrite a DACL above the player's folders, or wipe the record
so its grants were never taken back.

The checks: the record has no SID of its own (the first form, with one, is
refused); sbxw_record_keep drops a record's path at or above the never list's
folders; the record's folder is %LOCALAPPDATA%\Longshot\sandbox
(sbxw_record_dir), and the plan grants nothing at or above it; in the sources,
--sandbox-revoke derives the SID from the container's name and revoke rewrites
a DACL only when it holds an ACE of the container's. They fail here (the
functions are not there).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The record of the grants (sandbox_grants.txt) was kept in the user folder,
which the container writes when it is the game folder's user\ (an older
layout kept) or a --user under a written folder; and the unconfined
--sandbox-revoke took the record's own SID line (sbxw_sid_ok let it be
S-1-15-2-1, ALL APPLICATION PACKAGES) and its paths with no never list. A game
taken over could have the launcher strip other apps' ACEs or rewrite DACLs
above the player's folders, or wipe the record so its grants were never taken
back.

- The record is now %LOCALAPPDATA%\Longshot\sandbox\sandbox_grants.txt
  (sbxw_record_dir): this PC's, as ACLs are (%APPDATA% may roam), outside every
  grant; the plan refuses any grant at or above that folder
  (SbxwInput.record_dir), so a switch naming %LOCALAPPDATA%\Longshot is not
  granted. One record serves every game and user folder; --sandbox-revoke's
  --user is taken and left.
- The record names no SID (its form is 2; the first, with one, is refused):
  --sandbox-revoke derives the container's from CONTAINER_NAME.
- sbxw_record_keep drops a record's path at or above the never list (the
  player's folders, Windows', Program Files, ProgramData, the record's own),
  and revoke rewrites a DACL only when it holds an explicit ACE of the
  container's.
- sandbox.md no longer says the container cannot change a file it could.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
broker_url_allowed matched the prefix alone, so
https://<pages>/Longshot/../../evil and %2e%2e (or %2f, %5c) after it passed,
and a browser opens them above the prefix: a link the broker was meant to
refuse.

The path after the prefix (before its query or fragment) now has no "." or
".." segment and no '.', '/' or '\\' percent-encoded (broker_url_rest_ok). The
query and the fragment are left as they were (the issue form's body is there).
tests/test_broker_frame.py has the cases.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The filter refused only socket families and io_uring_setup. A user namespace
(clone or unshare with CLONE_NEWUSER) and a network namespace with it make the
confined game root of a network of its own: netlink then reaches nf_tables and
the rest of the kernel's root-only code, the commonest way from a process to
the kernel. setns, userfaultfd, keyctl, add_key, request_key, perf_event_open
and bpf stayed open too, and the game uses none of them.

The filter now refuses clone and unshare with a namespace flag, setns,
userfaultfd, the keyrings' calls, perf_event_open and bpf with EPERM, and
clone3 (whose flags are behind a pointer) with ENOSYS, so glibc falls back to
clone. A thread's or a process's clone and unshare of the files or the cwd
pass. The filter's labels are worked out once (a table of the calls per
architecture), and the test's BPF interpreter takes AND. HOS_WATCH's data
breakpoints (perf_event_open) now need HOS_SANDBOX=0, as sandbox.md says.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Below Landlock ABI 9 (every kernel before 7.1, SteamOS 3.8's 6.16 among them)
pathname UNIX sockets are open: a script that took the confined game over
could reach the session bus and ask systemd --user (StartTransientUnit) to run
a program unconfined. host/hos_main.c still told the game side the run was
confined, so a player's script mods started.

hos_main.c now tells the game side hos_sandbox_lets_scripts(): on Linux files
and the network confined and Landlock ABI 9 or later (sandbox_plan.h
sbx_lets_scripts, a restart's too); on Windows the container and no
capability, as before. Below ABI 9 the log says why a script mod is held;
HOS_SANDBOX=0 runs them unconfined, the player's own choice. Mods of files
alone and the system mods load as before.

Chosen over stating the gap: there is no other way to close a pathname socket
from inside on those kernels (seccomp cannot read connect's address, Landlock
cannot before ABI 9), and a mount namespace would need user namespaces, which
the filter now refuses and some distributions turn off. The cost: on kernels
before 7.1 a player's script mods need HOS_SANDBOX=0 until the kernel is newer.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The rules gave /dev/shm read-write on every run, and with it the Steam
client's and JACK's shared memory, though only the Steam overlay needs it; and
Mesa's and NVIDIA's shader caches were the ones the compositor and the
browsers share (~/.cache/mesa_shader_cache*, ~/.cache/nvidia), where a game
taken over could plant an entry another program's driver reads. Neither was in
sandbox.md's "What stays open".

- /dev/shm is granted only when Steam started the game (SbxInput.steam, set
  where Steam's folders are found), and the log says so. Wayland's buffers and
  the sound's shared memory are memfds, not files there.
- When neither the player nor Steam names one, the game names its own caches
  before any thread starts: MESA_SHADER_CACHE_DIR=$XDG_CACHE_HOME/longshot/mesa
  and, on NVIDIA, __GL_SHADER_DISK_CACHE_PATH=$XDG_CACHE_HOME/longshot/nvidia
  (both drivers make their folders under it). The first start after this
  compiles Mesa's shaders once more.
- sandbox.md lists /dev/shm under Steam, a cache someone named, AMDVLK's and
  /proc's oom_score_adj (another review nit) under "What stays open".

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
#2286's HOS_SAVE_DIR takes a share's whole path on Windows (\\server\share\...). The sandbox's AppContainer has no
network, so a start whose saves are on a share is not relaunched into it (the log says why; HOS_SANDBOX=strict
refuses), rather than confined with saves it cannot write.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
sandbox.md and sandbox_plan.h say HOS_SANDBOX is read from the real environment
only, but the file HOS_ENV_FILE names set anything, HOS_SANDBOX and the
broker's LONGSHOT_BROKER_* and LONGSHOT_SANDBOX_* among them; such a file can
lie where a confined run writes.

The sandbox's switches are now one list (hos_main.c env_sandbox_own), refused
from longshot_env.txt as before and from HOS_ENV_FILE's file too, with a line
on standard error. tests/test_env_file.py has the case.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
host/json_keys.h, the strict JSON reader the C broker's checks once used, has
no user left but its test: the trust file's change is the game side's
(game_trust_record) now. It goes, with its checks in test_broker_frame.py and
its line in sandbox.md. broker_frame.h and broker.h named host/mods_trust.h
and host/mods.c, and ipc_endpoint.h host/mod_manifest.c and
host/modapi/net.c, all gone: they name the game side's code that took their
place.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
crash_send and perf_send checked the file the game handed over with fstat (a
plain file, at most 8 MiB or 1 MiB) and then gave curl that same file, which
it read to the end: the game could keep writing it in between and have the
broker send more than the limit.

The broker now copies the file into a memfd of its own, refusing it when it
holds more than the limit by then, and gives curl the copy.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
curl_common pinned the checked address with CURLOPT_RESOLVE only when its
list entry could be made: out of memory, the pin was skipped and libcurl
looked the host up itself, past the private-address rule. curl_common now
says when it could not pin the address, and the fetch or WebSocket fails
("out of memory") instead of connecting.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
- read_message kept an assembler for every connection a peer started a
  message on and never ended, each up to 1 MiB: the game's side (untrusted
  to the broker) could grow the broker without end. A side now has at most 64
  messages in progress and 16 MiB in all; past either the link ends.
- On Windows pipe_put wrote under the pipe's lock with a blocking WriteFile
  that has no time limit, and pipe_close took that same lock before its
  CancelIoEx: a peer that stopped reading held the close forever. pipe_close
  now cancels the pending write until it has the lock, and a write checks
  the pipe is not closing once it has the lock.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
- game/sites/sites.toml's notes on frame.whole* and anim.loopStep named
  host/frame_whole.h, host/loop_step.h and game/oot_sites.c, which are gone:
  they name game/crates/oot's video.rs and engine.rs.
- tests/test_ocarina_notes.py's staleness case reads as if it checked the
  half-second timeout, which is its stand-in's: it says the timeout is
  NotePoll's (with its own Rust test) and that what it checks is the host
  giving the keys back.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The stand-in host's mapped ranges were byte vectors, aligned to 1, against
GuestPtr's assumption that an aligned guest address is an aligned host one
(review leftover); they are 8-byte words placed to keep the guest's alignment.
ffi.rs's doc said the network engine had no declarations; hos_net_* are there.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Two of the move's leftovers: the base's Python tests that fed the game the
builder's exefs_patches.txt and checked mods.json was read by one rule went
with the C. The loader now reads a list written by game-files' list_text, and
ModsList::parse and game-files' parse_list take and refuse the same lists, with
the same ids and switches.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
About 55 notes in game/sites/sites.toml and the supported build's
locations.toml named game/oot_*.c files and host functions that went with the
move to Rust (review leftover). They name the Rust module or system mod now
(oot::fixes::high_fps, oot::session, mods/shadows, ...), and the host's C
where it is still the host's. Comments only.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The mid IR read and wrote the host's globals with volatile loads and
stores alone, so a rule over a table could not count itself into the
table's readers or load its pointer with the orderings the retirement of
an old table relies on (docs/dev/reference/hooks.md, when a replaced
table is freed). HostAtomicLoad and HostRmw are a host global's atomic
load and read-modify-write of an ordering, written to LLVM as load atomic
volatile and atomicrmw volatile, as clang writes C's __atomic builtins on
a volatile object; Order has Relaxed (monotonic) for a first look.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The Rust lifter knew mul_f32, scale_f32 and note_u64 alone, so the mod
API's rule sites (damage, actor life, heals, falls, rupees, rewards,
gifts, prices, bottles, actors' writes and binds, query answers, lit
bombs) could not be placed. The fourteen rules over a table of
nx2/hooks.py at 2596a0e3 (life_rules_hit, spawn_rules_max/life,
scale_rules(_by), reward_rules_drop/gift/count, price_rules,
bottle_rules, actor_writes, actor_binds, query_answer, actor_lights) are
in sites' Rule with their arguments, and their lowering is
builder/crates/edits/src/rules.rs: one relaxed load of the table's
pointer while off (the life rule tests next < old first); while on, the
readers' counter's sequentially consistent add, the pointer's
sequentially consistent load, the call of the game side's function
(longshot-game's tables.rs) with the context, the table and the
registers, the answer's 32 bits zero-extended into its register, and the
counter's release. game/sites.def's HOS_TABLE lines are read as values of
the type table, and a table's line whose identifier is not its name's
stops the lift (its readers' counter would be another's).

The C read the pointer into a local it tested in another block; the mid
IR keeps a value in its block, so the call is made with the pointer as
loaded, and a table unpublished between the two loads reaches the game
side's function as null, which answers the game's value or does nothing
(the register is kept by a select).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The C era's table placed rules.lifeHit, rules.lifeInitMax, rules.lifeInit,
rules.heal, rules.fall, rules.rupees, rewards.drop, rewards.dropOther,
rewards.gift, rewards.giftCount, rules.price, rules.priceOther,
rules.bottle, actors.write, actors.bind, the three actors.answers and
actors.lights; the port's did not, as the lifter had no rules over a
table, so their features were absent (has() false). Their definitions
and the supported build's locations are back from 2596a0e3's tables
(masked words, offsets and guards only), rules.lifeHit before
player.lifeHit and actors.write and actors.bind after actors.update, as
there. The repository check holds rule sites to their line of the rule's
type and to no word count, as the C era's did (actors.answers.isThrown's
signature is 13 words).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The content context had no runtime: Place::Content was only compared against, so a manifest's "content" module could not run at all. api::script::ContentRunner is the stage's engine side, and script::ContentModules runs a module once in a runtime of its own, the services lent and no main thread (as a worker's are). settings.get works in the content context (read only, off the main thread), as the schema says.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
host/romfs_merge.c had no port: content::patch, content::text and content::pack were library-only, so nothing a mod's patches/ or a content stage made reached the game. content::merge makes them into files the layers serve: typed patches onto the served or game file (or onto a pack member in every pack that carries it, via modcache/members.txt), member files (romfs/<archive>.zs/...) into their archive and the carriers, and the stage's new packs; each written once in modcache/files/ by the content it is made of. Conflicts and failed ops are logged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Services::content_begin/end/added had no caller and Loader::publish_layers served each mod's romfs/ alone, so content.* declarations were unreachable, owner/name:id names never resolved and save.flags was checked nowhere. Loader::content_stage (game_init, before the first file opens) runs each loading mod's content module in list order, keeps its plan in modcache/content/plans/ (a kept plan goes through content_added), writes its outputs to modcache/content/<key>/, and hands the declarations to the runtime's services at start. publish_layers adds each layer's stage outputs, member files and patches/ and runs content::merge before the size table's fit. The stage's declarations are features at the loader's resolve now.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
game/README.md's stand-ins, DESIGN.md's port map, and the modding docs (content.md, files.md, dev.md) say what the Rust game side does now and what it does not make yet (archive merges, skins, tree schema, sounds, the cache sweep, rebuilds while running).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The C's host/bwav_write.c, host/ktx2_decode.c, content.c's make_bntx and make_bwav, and the rules of
host/texture_packs.c and host/modapi/recipes.c had no port: content.sound's bwav: recipe and the bntx: one
had no maker, and the game side could not read a texture pack or a recipe.

content::assets::bwav writes a 48 kHz DSP-ADPCM BWAV (the coefficient pairs by k-means of the frames'
predictors, each frame's pair and scale by least squares), reads one's tables and decodes as the mixer's
step does; its tests are tests/bwav_write_test.c's (a sweep, a chord with noise, silence, a click, a
full-scale square, files of 1 to 15 samples, the loop's context, the CRC, the resampling).
content::assets::ktx2 reads an uncompressed 8-bit KTX2's first level; content::assets::recipe parses
bntx:, bwav: and zs: and makes a model's texture from a PNG or KTX2; png gains an RGBA writer.
content::textures holds the numbers the renderer knows an upload by (XXH64 in 64 MB pieces, the
shape-free signature), the BRTI walk, the texture index (keyed by the RomFS's texture files and sizes),
the kept hashes, recipe.json (render targets, the upscale recipe checked and keyed) and an upscale job.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Texture packs (gfx.textures) were gone from the Rust tree: no game side read a pack, the renderer had no
override, and has("gfx.textures") was false.

api::textures::start runs in game_init after the layers are published: each mod that loads and lists
gfx.textures (Loader::texture_packs, a minimal hook beside romfs_root) has its recipe.json read and its
textures/ named from the texture index (made once from the RomFS's .bntx.zs headers through the host's
new zs stream binding), a later pack winning; each replaced texture's numbers come from the file the game
is served, kept in modcache/texture_hashes.txt. An upscale recipe's job is written on an lsmod-upscale
thread (the pictures decoded by the renderer's mkwvk_texture_decode, given the game as
hos_texture_decode), and a done job's images serve the mod under its own. longshot-game exports
game_texture_replacement*, which MkwVkHost version 54 hands the renderer.

The renderer's half is the C era's: gpu/vk/texture_pack.h's two-stage lookup at a first whole upload,
the override image used by sampled views of the whole texture, dropped when the GPU writes the texture
or its storage changes, the resolved views and reused descriptor sets stale by texture_pack_generation;
texture_decode.cpp decodes block-linear plain, BC1-BC5, BC7 and ASTC level 0. has("gfx.textures") is true.
Game-free tests: api::textures's (ported from tests/test_texture_packs_host.py), tests/test_texture_pack.py
and tests/test_texture_decode.py.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
A mod's recipe.json could ask for the sun's shadows at 2200 or 3072, and nothing read it: the C's
menu_shadow_res took gfx_recipe where the row was Auto, and its Rust port did not.

resolution_with takes the recipe's level (api::textures::target_level) where the row is Auto; a size the
player chose wins. Tested game-free.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
textures.md said the game side was not ported and named nx2/texture_index.py, which this tree has not;
api.toml's gfx.textures note, game/README.md's stand-in and DESIGN.md's C-file table said the same, and
the architecture had neither the packs' nor the recipes' rules.

Each now says what the code does: the index's format, the hashes' file, the modules that hold the
packs, the recipes and the BWAV writer, and the renderer's rules (Texture packs replace at upload,
Render-target recipes). README keeps one line: the output recipes' makers have no writer to call them
until the content stage runs.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The stage's writer refused bwav: outputs ("the BWAV writer is not ported") and
made bntx: from a PNG alone. It now makes each recipe with the content crate's
makers: bntx: with recipe::make_bntx (PNG or KTX2), bwav: by decoding the mod's
WAV or Ogg Vorbis (the audio service's decode, given the stage's Ogg decoder),
reading the game's stream it replaces for its channels and loop, and writing the
BWAV with bwav::from_sound. A game-free test makes a mod's mono WAV a stereo,
looping stream served in the game's place.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The self-test's planted side door, hos_romfs_dir, is declared in
host/game_host.h now, and its planted game header, game/flags.h, is gone, so
the self-test stopped proving the check sees either crossing. It plants
hos_broker_launch (host/broker.h) and game/oot_cheat_items.h.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Every play(), playAt() and playOn() takes one of the 512 voice handles every mod shares, and only a stopped mod
gave its handles back: neither voice.stop() nor a voice that ended freed one. A mod that played a click 512 times
left every mod's next play() refused with "the mods' voices are full".

The tests play a 10 ms sound 600 times, stopping each voice, and 600 times letting each end; both fail at the 513th
play now.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The audio service's 512 voice handles, shared by every mod, were freed only when a mod stopped: voice.stop() left
its handle taken, and so did a voice that ended on its own. After 512 plays every mod's play() was refused. And when
the handles were full, the mixer had already started the voice: a looped sound played on with no handle to stop it.

voice.stop() now takes its handle out (and its place); each frame's audio step gives back the handles of voices the
mixer no longer plays (one lock: Mixer::heard_voices), and so does a play that finds the handles full before it
refuses. A refused play stops the voice it started.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
draft_back reads a filter's draft back with no depth cap and no limit on what it visits. A filter that sets a field
of the draft to the draft (`d.n.back = d`) makes it recurse until the stack overflows, which aborts the game; a draft
whose objects each hold the next one twice, 48 deep, makes it visit 2^48 objects.

The test reads back both: the cycle overflows the stack now.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
draft_back recursed into every object a filter left in its draft, with no depth cap and no count of what it read.
The draft is only sealed, so a filter can set a field to an object, the draft itself included: `d.n.back = d`
recursed until the stack overflowed and aborted the game, and a chain of objects each held twice by the one before
made it visit 2^depth of them. No JavaScript runs while it reads, so the deadline it runs under could not stop it.

The draft is now read at most VALUE_DEPTH (64) records deep and VALUE_BYTES (256 KB) of names and strings in all, as
json_value holds a value; past either the draft is refused with why, as a draft of another kind already is.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
spirv::check adds 1 to a decoration's value (`Location 0xFFFFFFFF`) and sums a params member's offset and size in
u32 (`Offset 0xFFFFFFFC`), both values the mod's .spv gives. With overflow checks on and panics aborting, either one
aborts the game when a mod asks for its effect.

The test builds the least module the template takes, checks it passes, then gives it such a location and offset.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
check kept a decoration's value +1 (`words[w + 3] + 1`) and summed a params member's offset and size in u32
(`o + 4 * n`), both numbers a mod's .spv gives. The C wrapped silently; here overflow checks are on and a panic
aborts the game, so `OpDecorate %1 Location 0xFFFFFFFF` or a member `Offset 0xFFFFFFFC` killed it when the mod asked
for its effect.

A decoration's value +1 is now checked, and one that has no room refuses the shader; the offset's end is summed in
u64. The rest of spirv.rs swept: a counted loop's last value is checked arithmetic (its step is any 32-bit constant),
the nested loops' product saturates, and the loop scans read an instruction's operands only when it is long enough to
have them (they read in bounds before, but another instruction's words).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
sourcemap.rs sums a map's VLQ values in i32 (two `+/////D`, i32::MAX each, overflow the column), adds 1 to a source
line of i32::MAX when it shows it, and reads the four bytes before `sourceMappingURL=` as a str slice, which panics
when they split a character (`€€sourceMappingURL=`). Each aborts the game when a mod's error names its module.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The source map decoder summed a map's VLQ values in i32 with plain +, so two segments of i32::MAX (`+/////D`)
overflowed and aborted the game the first time the mod's error named its module; a source line of i32::MAX
overflowed again when shown 1-based. And the look for `//# sourceMappingURL=` sliced the four bytes before each match
as a str, which panics when they split a character of the mod's .js (`€€sourceMappingURL=`).

A VLQ value past i32 and a sum that leaves i32 now end the map there (what came before is kept, as for text that is
not VLQ); the line and column are shown through i64; the comment's prefix is compared as bytes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
trimmed walked a list's trailing undefineds back from its `length`, one native property read each. A mod that passed
`a.length = 2 ** 32 - 1` to a together native (emit, call, a mod: import's function) made about 4e9 reads in native
code, which the interrupt never sees: the game froze for minutes.

A list longer than a value's bytes (VALUE_BYTES) is now passed on as it is, and the conversion refuses it at once.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
After a kept callback returned, its result was converted (its toJSON run, its getters read) with the deadline the
call put back, none: the mod's code in toJSON ran with nothing to stop it but the stray-poll guard, and nothing said
why. A callback returning `{ toJSON() { for (;;) {} } }` was cut only by that guard, silently.

Both conversions (bind's callback_call and the engine's Runtime::call) now run under DESCRIBE_NS, as a filter's draft
is read back and an export's answer is; a conversion the interrupt cut is the mod's OverBudget fault.

The test needs the stand-in host's clock to move while the script runs (it stands still between a test's moves, so
no deadline could pass): host_sys::fake::set_tick makes each read of it move it on.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The fence's doc and tools.md read as if a test file could not reach outside the mod's folder. It cannot through
`fs`, but the mod's code runs in the tools' own context: that context keeps eval and Function, shares its objects
with the realms it makes and holds the natives on its global (`__longshotNatives`), so the mod's code can reach
longshot:native's unfenced spawnSync and spawnDetached, and node:child_process, and a program it starts runs with the
user's rights.

Confining those modules to the SDK's own importers would not close that while the natives sit on the shared global,
and taming the tools' realm (a realm of its own for the mod's tests, no shared objects) is a redesign of the tool. So
the docs now say what the fence is: it keeps a mod's fs calls inside its folder by accident; a command runs only on a
mod whose code you trust, as npm test does.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Two findings of the review in the one file (S4, S6):

- An undo that waited for play (items out of play) kept the mod in the asked list, and the next frame undid every
  unsaved write of that mod's: when the mod had started again meanwhile, what its new run wrote was undone too. The
  writes an undo covers are now marked when it is asked; the frames undo those alone, and a later write is never
  merged into one of them.
- A flag write was a new entry each time, so a mod writing a flag every frame filled the 4096 entries in about 68 s
  and then evicted other mods' undo entries, each eviction a Vec::remove(0); and every write rebuilt every mod's
  counts from all the writes under the counts' mutex. A mod's writes of one flag are now one entry until a save takes
  it (its first "before" kept, dropped when it is back to it), as memory writes already were; the writes are a
  VecDeque; the counts are kept per mod as writes come and go, recounted only after a save, a load or an undo.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The journal learns of a save (asked, written, loaded) from the storage service's notes, and the notes were wanted
only once some running mod had storage, settings, audio or UI settings attached. A mod that only writes flags, alone,
never had its writes marked saved: the player saved, the mod stopped, and its saved flag was reverted, against
game/DESIGN.md's "a save asked marks what was made so far, that save written makes it saved".

Every mod's start now turns the notes on (Storage::watch); they cost a queue push per save event.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
romfs.read with an offset and a length, on a game file no mod overrides, read the whole file through the host's
index on every call and cut the part out: a mod reading a large file in parts read it whole each time (a 500 MB file
read 500 MB per call). host_sys::romfs::read_at reads the part through the host's open/read-at calls (the stand-in
host slices its own bytes), and the service reads only the part asked.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Each visit of a serial site, told in place or at the frame's end, cloned every Row of its slot whole (its owner,
hash, engine and note Strings, its argument list, its retired handlers) and formatted the listener's name for each
row, whether or not a listener was there to be told; the frame's step also built every row's argument record.

The visit now takes what its listeners need (a Told: the name, the form, the listeners, and the arguments and their
places as Arcs the row shares), only for rows with listeners, and builds the record and the name once a row, when a
live listener is there.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
A text a mod sets (content.texts, its patches) was refused only for a NUL. U+000E and U+000F went into the message
file as they were, and the game's MSBT reader takes them as a tag's header: it reads a group, a type and a size from
the text after, and reads past the text's end.

The C0 controls but tab, line feed and carriage return are now refused (text.control), naming the character; a tag
is written {...}, which the game's files decode to.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
write went through every entry for each of the label table's slots, hashing each label again: slots x entries x a
label's length, about 6e13 steps for a crafted 15 MB message file with many slots and labels. The labels are now put
in their slots once (in their texts' order, as before), then written slot by slot.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The sweep of the content crate's parsers for overflow on a mod's bytes (overflow checks are on and a panic aborts the
game) found two sums in bfres::rename_textures, which a skin's texture renames run on a model a mod serves: the string
pool's count + the names added, and relocation section 0's size + the pool's growth, both u32 words of the file that
nothing checked. A count or size of 0xFFFFFFFF aborted the game. Both are now checked, and refuse the file
(bfres.no_string_pool, bfres.relocations_past_end).

Swept and found bounded: read.rs, bin.rs, byml.rs, sarc.rs, archive/ (zip, names, sha256), text/ (msbt, tags),
restbl.rs, assets/ (png, bntx, bc7 spot-checked, mod.rs's fska and anim checks, the rest of bfres), ainb/, json.rs,
patch/, pack.rs, plan/, layers.rs, texts.rs.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The sweep of the api crate's handlers of mod input for overflow found one: an image's id is a process-wide counter's
fetch_add(1) + 1, never given back, so after 2^32 images (64 a batch, about an hour of a mod's batches that each
show new files and reset) the plain + overflowed and aborted the game. It wraps now, skipping 0 (no image's id).

Swept and found bounded: manifest/ (version, permission, setting), json.rs, value.rs, storage.rs, settings/,
services/ui/ (ops, tree, props, canvas, snapshot), loader/ where it reads a mod's files, and mod-format.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
parse_arg sliced `&reg[1..]` before checking the register's letter, so a list line whose register starts with a
character of more than one byte panicked. The list is the build's, not a mod's, but a panic aborts the game: the
first byte is checked to be ASCII first.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
rules.skips.add refused a skip past every mod's limit (SKIPS_MAX) with a message naming the per-mod one
(SKIPS_PER_MOD). It names SKIPS_MAX now.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Each visit where two mods answered at one point ran the whole clash path again: the site's name scan
(SiteId::by_name), the game-sites registry's global lock for report_clash, and the notes' text formatted, all before
anything said it was known. The pair of rows is now checked first (the hooks' table is set once, so its indexes stay
the rows'), and a pair seen goes no further.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
apply_one cloned the patch, all its ops, to apply one op of it, for each op: quadratic up to the 10k ops a patch
holds. It now makes the one-op patch from the patch's other fields.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The size table's fit gave a file the game has not an estimated entry by its CRC, unless the table had an entry of
that CRC already. When that entry was the game's own for another file (a CRC-32 collision), the new file was left
with the other file's size, and raising it would have raised the other's. Such a file now gets a named entry of its
own (Restbl::raise_named), which the game reads before the hashed ones.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
sarc's merge (and put) wrote every member it was given, sorted by hash, without checking that two members of
different names had different hashes. A mod's member whose name collides with another's made an archive in which the
game, which finds members by hash, reads one of the two for both. arc_write now refuses it (sarc.hash_clash); a name
held several times (the layout archives' groups) is still one name.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
to_json and bones walked each node's tables as far as the file's counts said, up to 65535 entries a table, and
to_json wrote one of the file's strings for each: a crafted tree made billions of steps and a text of gigabytes.
Neither is reached by a mod's call today; bounded before they are: at most 4M entries looked at, a JSON text of at
most 64 MB (to_json gives None past either), and at most 4096 bones.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The comment said an odd side's last row or column was "taken once"; the code makes the level half the side rounded
down and reads only the 2x2 blocks inside it, so that row or column is left out.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
hand_over cleared a scope's dirty mark as it queued the write, and the writer thread only logged a write that failed:
the data stayed unwritten until the mod changed it again (perhaps never, then lost at the close). The writer now
notes a failed global or profile write, and the next hand-over marks that scope dirty again, so it is written once
quiet (a second later) or at the close's flush.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
write_in_place (the trust file, which the sandbox's rule names so it cannot be moved over) wrote, cut and returned
with no fsync: a crash or power cut soon after could lose the player's answers while the game took them as kept. It
syncs the file now. (Written in place, a crash in the middle of the write can still leave it half old; the file is
small and written whole in one call.)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The menu thread's edits for the main thread went into an unbounded Vec: with the main thread stalled (a long load),
a menu sending edits grew it without end. At most EDITS_QUEUED (256) wait now; past them the newest are dropped,
and the log says so once.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
`longshot mod format` wrote each changed source over itself with fs::write: a crash or a full disk midway left the
mod's source half written. It now writes a temporary file beside it, syncs it, keeps the file's permissions and moves
it over the source.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
closure_trampoline gave JS_EXCEPTION with no exception pending when its context's Rust side was gone (a realm
disposed while one of its functions was still reachable): the caller's catch got whatever the context last held. It
throws a ReferenceError saying the context was disposed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
file_is, which an import's resolution uses to pick ./x.js, ./x.ts or ./x.tsx, looked at the joined path without the
name checks read_file makes (part_ok): on Windows a part a mod's file may not have (a drive, a device, a trailing dot)
could look outside the mod's folder and tell whether a file is there. It checks each part first.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
content::merge served the copy lowest in the list whole when several mods shipped one archive, passed a pack spec's
skin lines over, never checked a mod's model or animations, refused every tree that adds nodes (no schema was made)
and never swept modcache/files/. Ported from host/mods.c's merge_archives, romfs_merge.c's content_skin and model,
skeleton and animation checks, host/modapi/content.c's ainb_schema and modcache.c's modcache_trim:

- several layers' whole copies of a game archive are made one (sarc::merge), with a record beside it so a start with
  the same copies reads none of them and still says the conflicts; a member file decides against the copy that changed
  the member, not the lowest copy;
- a new pack's model (the mod's, or a game model of modelOf) and animations are checked against it, a model that
  cannot be used leaves the actor out; its skin is made after it and served under the skin's project;
- ainb_schema makes modcache/ainb-schema.txt from the game's NodeDefinition files and trees, and the packs' trees
  read it as schema:ainb;
- sweep removes the files no mod uses, oldest first, past about 1 GiB (Rom gains host_files and remove).

Game-free tests for each over the in-memory Rom.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
A change of a folder mod's served files while the game ran was only logged for the next start, the content stage
never made the tree schema, and modcache/files/ was never swept. Now:

- Loader::hot_layers (loader/hot.rs, from host/mods.c's hos_mods_hot and hot_layers): the changed mod's content
  stage run again (content_stage_one, through LayersHost::stage), the layers built again beside the live table with
  the merged-file step, a path wanting a larger size-table entry than the start's held to the next start, the table
  published, each path said 'served anew from its next load';
- api::services::reload (from reload.c): the map's reload offered when a rebuild changes a path the map loaded, made
  at once in dev mode; services::game polls the map loads for it;
- publish_layers enables the layers' rebuilds while the watch is on and sweeps modcache/files/;
- the content stage makes the tree schema when a mod's tree adds nodes;
- longshot-game sets runtime::HotLayers with the RomFS game_init read.

The Mods tab's line for the offer is not drawn (another change's page).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
game/README.md's stand-ins, DESIGN.md's port table and hot reload notes, and assets/modding/docs content.md,
files.md and dev.md no longer say archives are not made one, skins and trees that add nodes are passed over, the cache
is not swept or the layers are not rebuilt while the game runs; they say what is still not ported (the rescan,
mods.json read again, the Mods tab's reload line, changeActor clashes, a pack copying a later new pack).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Below Landlock ABI 9 (kernel 7.1) Landlock has no right for a pathname socket, so a confined game could reach the
session bus (and through it systemd --user), the system bus and every other local service of the user's, and a
player's script mods were held there (SteamOS 3.8's 6.16 among them).

Now, as Flatpak and bubblewrap do, the game hides them before Landlock and seccomp: a helper process (fork, one thread)
makes a user and mount namespace mapping the user's own ids alone (setgroups deny), makes / private, mounts a private
tmpfs over /run, /tmp and $XDG_RUNTIME_DIR, and binds back only what the rules name there (Wayland, PipeWire,
PulseAudio, X11's folder and cookie, the broker's bus filter, TMPDIR, udev, the system log, Steam's runtime, the
control bridge, the working folder), links on the way made again. The game joins it (setns) and drops every
capability, so it cannot unmount a tmpfs. A failing step leaves the game as it was. The broker starts first and stays
outside; seccomp still refuses namespaces after. Abstract sockets are scoped from ABI 6 with the folders.
DBUS_SESSION_BUS_ADDRESS names the broker's filter, or is unset.

sbx_lets_scripts stays the one gate: files and the network confined, and ABI 9 or the private folders. Where they
cannot be made (Ubuntu's AppArmor restriction, kernel.unprivileged_userns_clone=0, user.max_user_namespaces=0, a
Flatpak, a thread already running, root, a bus outside the hidden folders, an abstract bus below ABI 6), script mods
are held and the log line, and hos_sandbox_held_why for the Mods tab, say why and what lets them. A restart finds the
folders the run before made in /proc/self/mountinfo.

tests/test_sandbox_linux.py: the folders hidden and the paths bound back for given environments, the bus's address,
the gate for every combination, the held reasons, mountinfo, the order (broker, private folders, Landlock, seccomp)
and the fallbacks over the stand-in, and the real namespace in a child process over the test's own folders when the
system allows one.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
docs/dev/reference/sandbox.md: the ABI table's row for 9, the abstract sockets' paragraph, SteamOS (script mods run
there now), the session bus, and a section on the private folders: what is hidden and bound back, whole or not at all,
a restart, what stays open, and each reason they cannot be made with what lets them (an AppArmor profile, the
sysctls). No new switch.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The sandbox now knows why it holds a player's script mod (host/sandbox.h
hos_sandbox_held_why: user namespaces blocked by a sysctl or AppArmor, a thread
already running, a bus it cannot hide), but the Mods tab said only "the game is
not confined". The host hands the reason over (game/game.h game_set_held_why),
and the loader's held line says it, with HOS_SANDBOX=0 as the player's own
choice; with no reason given the general line stays. A game-free test.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
pad.state() had the buttons and sticks alone; the spec's gyro and device kind were never built. The host now
gives the game side the newest motion reading by the rule GetSixAxisSensorStates hands it out with
(hos_pad_motion, host/nn_hid.c: Motion controls on, a pad with a gyroscope, its motion counting now) and Auto's
button prompts face of the first controller (hos_pad_device, host/prompts.c). PadState gets device (PadDevice:
nintendo, xbox, ps4, ps5, steamDeck, keyboard) and gyro (PadGyro: rate in degrees a second, accel in G, the
Switch's frame; null while the game is given a pad lying still), both read once a frame and read-only in a
filter's draft. The bindings' record reader takes a nullable record field (a draft hands gyro back).

Tests: the state's kind and motion from the stand-in host (turns a second as degrees, a reading that is no
number none, every host number's kind), and the draft's read-only fields. The fake game's setPad takes device
and gyro. Docs: input.md (author's and developer's).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
camera.override(rig) took only { fov }; the spec's rig (an eye attached to Link, a look by input, pitch limits,
a blend) was never built, and first person (10.5) needs it. A rig is now data oot::camera's view hook works out
each time the game builds its view, so a view on Link has no frame of delay: attach "player" puts the eye at
Link's feet plus an offset turned by his facing (his actor's position and rotation, bounded reads), look
"input" or "fixed" looks along a yaw and pitch (the right stick turns an input rig at the acquire phase,
120 and 90 degrees a second, held to pitchMin and pitchMax), look "target" at setTarget's point, and
blendSeconds eases in from the game's view. The handle gets setOffset, setAngles and angles(); a setter that
does not fit the rig is a ContextError. bone, near, collide and drivePlayerFacing need what the game side cannot
reach without new sites or layouts (game/README.md's Stand-ins says which).

Tests: the rig on Link (his feet, facing, absent), its look by angles or point, the blend; the API's defaults,
refusals and the stick's turn within the limits. The fake game draws a rig on game.player. Docs: camera.md.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The manifest's "saves" was parsed and never read, and nothing kept a progression mod away from the player's own
saves. Every save now lives in a profile (api::profiles): with no such mod the player's own, byte for byte as
before, with nothing written beside them; with mods that declare "saves": "separate" or ask for save.flags,
a profile of theirs, <saves>/save/.profiles/<ids@names>/, with its own save/, save-work/ and modstore/ (so the
mods' per-save data goes with it). game_init chooses it after the loader's scan, before the guest's first
instruction, and the host keeps the run's saves there from then on (hos_saves_profile, host/nn_fs.c: made and
checked as HOS_SAVE_DIR's folder is, a dotted folder inside the save folder the sandbox already gives the game;
one that cannot be used ends the start rather than open the player's saves). A profile records its mods and
versions (profile.json, the log says what changed) and whether it is vanilla-compatible (not, with a save.flags
mod). longshot/storage's saves.profile(name) picks one per seed or room from the next start (names.json beside
the profiles); saves.current() says which plays. Services::saved_flags_allowed is the content stage's
allow_saved: a mod's saved flags only in its own profile that is not vanilla-compatible.

Tests: the choice (default, separate, one per name, save.flags, hashed long names, names checked), the names and
record files, the service's profile() and current(), and game_init's move of the saves and the mods' save data
into the profile over the stand-in host. Docs: storage.md, docs/user/saves.md, docs/dev/reference/saves.md,
game/README.md's Stand-ins.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The save profiles' hook was left for the content stage: the stage gave
content_begin allow_saved from the grant alone, so a save.flags mod could add
flags in a run playing the player's own saves. The stage's services now hold the
run's profile (game_init chooses it before the stage, and hot reload's stage
keeps it), and allow_saved is the grant and Services::plays_in_flags_profile: the
run plays in the mod's own profile that is not vanilla-compatible. A game-free
test; the README's stand-in is now what is done.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
A launcher's profile (HOS_SAVE_DIR) and a mod's own profile compose: the mod's
folder is <HOS_SAVE_DIR>/save/.profiles/<id>, inside the save subtree the
sandbox grants for HOS_SAVE_DIR, with its record and the mods' per-save data
there, never the user folder's.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The lift writes a hook as hos_site_on_<ident> and hos_site_fn_<ident>; the mods' pool had one array of flags and
values the lifted code could not name, so a mod's site could not be placed without new forms in the edits. build.rs
now makes, for each of the 256 slots, hos_site_on_modsite_s<k>, hos_site_fn_modsite_s<k> (a trampoline that calls
hos_modsite_call(c, k)) and hos_modsite_value_<k>: the build places slot k as the site modsite.s<k> with the forms
and code it already has. enable and set_value go through tables of them; tests call a slot's trampoline.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
A manifest mod's sites.toml (the unsafe tier, spec 8.3) was read by the game, but no build ever placed it. sites'
new modsites module ports nx2/mod_sites.py: a mod's table checked with the mods' rules, each site found by its
signature (or the function its builds name for this build), its guards checked, placed by the same place() against
the lift, each mod whole or not at all: one that does not resolve, fit, or that meets a game site at a branch, a
replaced instruction, a jump or a host-wrapped function leaves the mod out with why, never stopping the lift. Sites
of several mods at one point share a slot; a row naming a game site by name is checked against the build's table.

The lift takes the build's tables in LiftOptions::mod_sites (in its key; none changes nothing), places them after the
game's own into the same placement and writes gen/mod_sites.txt (format 2, the game's reader's). Tests: the mods'
rules, placement over the made-up lift (sharing, whole-or-nothing, builds, rules, engine rows, a branch clash) and a
whole lift that hooks f1 and keys and lists the mods.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The builder never gave the lift a mod's sites.toml, applied a folder with mod.json's exefs/ as an emulator mod's
(local/<folder>, on, with no permission or acceptance: the game says those are not applied), and had no switch
tables, so loader::switch had nothing to read.

- game_files::code_mods: the manifest mods as the game walks them (packages read from the game's unpacked copy),
  mods.json's order, mods-trust.json's acceptances, and the code hash the game makes (sites.toml alone: its SHA-256;
  with exefs/ patch files: one SHA-256 over each file's name, size and bytes).
- build-driver's modsites: each mod with sites.toml taken when it asks for hooks.unsafe and its code is accepted,
  on or off; handed to the lift; the game folder's mod_sites.txt is the lift's list with a whole-mod line for each
  mod left out before it.
- patches::collect: a manifest mod's exefs/ only under the permission exefs and its acceptance, under its id at its
  place in the list.
- game_files::switches: a mod whose patches write data only is built in on or off behind a switch; exefs_switch.txt
  lists each switched byte, the game's own first; exefs_patches.txt notes the switch. Mods with code stay as before.

Tests for each (code_mods' hash, trust path, order and exefs gate; the switch plan and table; modsites' collect and
list).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Services::sites_read had no caller, so a mod's own sites could never be listened to; loader::switch::apply had no
caller; a manifest mod's exefs/ was never its code.

- Loader::start reads mod_sites.txt into the hooks service when a mod has code.
- code_status hashes a manifest mod's code as the builder does (its sites.toml, and with the permission exefs its
  exefs/ patch files), waits for a build until mod_sites.txt and exefs_patches.txt have it as it is now, and holds a
  mod whose sites the build could not place with the build's reason (not available for this game version).
- exefs_status lists a manifest mod's exefs/ files under its id, and a switched file as built in, on or off.
- loader::switch::parse reads exefs_switch.txt whole or not at all; longshot-game's switches::apply sets each switch
  as its mod is at the start (Loader::switch_on) and writes the bytes into main before the guest's first instruction.
- The exefs permission's host line says where it is used now.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The table's format had vslot sites (a virtual method's slot), but the lift stopped on one. The lift now checks each
(sites::vslot): the slot, the vtable's address plus 8 bytes a method, lies in main's data and holds the address of a
function the lift found (and the one a location's function names); one that does not stops the lift naming it. The
slot's address goes into gen/locations.c as vslot.<site>. At game_init, game_sites::vslot::install puts in each such
slot a host call (hos_hostcall) whose thunk runs the site's flag and slot, as a code site's hook does, then calls the
method the slot held (a64_icall). Tests: the slot checked and named over a made-up image, a bad slot refused, the
thunk calling the method after the site.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
unsafe.md pointed at nx2/mod_sites.py, which this tree has not, and said code modules are built in and free space is
moved, neither true; manifest.md said a manifest mod's exefs/ is never applied; hooks.md had vslot sites as planned
and no section for a mod's own sites; game/README.md's Stand-ins said nothing of the build side was built. Each now
says what the code does, and what is still to come (code mods switched without a build, code modules, a table
checker, sites port).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
A mod's exefs/subsdk0..9 was never loaded: six of nine public code mods ship one (spec 8.5). game_files::modules
ports nx2/exefs_modules.py: the module files of the mods that are on (a manifest mod's only under exefs with its code
accepted; its modules are now in its code's hash on both sides), each left out with why when it is not an NSO the
loader reads, is past 64 MB (128 MB in all), or holds a system call that makes or maps code memory (exlaunch-style
start-ups write branches into code the lift has no instructions of). A replacement main, sdk or rtld is never
loaded. The read stage appends the taken modules after the game's last module (named mod<n>.<file>), so the image
builder relocates and binds them, the lift translates them and image.c starts them after the game's. The game folder
gets exefs_modules.txt; the loader gives each row its modules' state (built in, waits for a build, left out with why)
and the Mods tab note says it. Tests: taken and left out, the code-writer refusal, the loader's three states.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
unsafe.md, using-mods.md, mods.md and game/README.md's Stand-ins said code modules are not loaded. They now say a
module is built in after the game's modules, which ones are left out and why, and that an exlaunch-style start-up run
at build time and switching code mods without a build are still to come.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
With no menu open, a click on one of the mods' windows went where any other
click goes: on Linux it captured the mouse for the camera, on Windows it went
to the game's menu, and the window never saw it. The C era's host kept the
windows' places (MKWVK_UI_RECT_MSG, which the renderer still posts) and
published such a click for the renderer alone.

The pointer test checks both hosts: on Windows a click published as the
mod window's reaches the renderer's mailbox and not the game's; on Linux a
click inside a posted window's place is published without a capture, one
outside it captures the mouse as before, and none once the windows are gone.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The renderer posts the mods' windows' places (MKWVK_UI_RECT_MSG, WM_APP + 13)
whenever they change, but neither host read them: with no menu open, a click
on a mod's window captured the mouse on Linux and reached the game's menu on
Windows, and the window never got it.

As the C era's host did: display_pointer.h keeps the places (HosUiRects, set
where the message arrives, read at a click), and a click inside one while no
menu has the mouse is published to the renderer's mailbox only (Windows:
mod_window_press, before the game's menus; SDL: before the capture).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
GameModPage's frame_ms and frame_avg_ms were always 0: the C block was made
from the loader's rows, which know nothing of the script engine. While the
Mods tab is read (game_mods_snapshot with reading 1), the runtime's acquire
phase now publishes each running script's last frame and running average
(script::ModStats) to mods_page, and the next block's pages carry them; a page
that is not running shows 0. A closed tab costs the runtime nothing.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The game side's snapshot (game_mods_snapshot) carried a manifest mod's page and
the permission prompt, but the renderer drew only the list: a player could not
grant a permission, answer permissions.request or change a script mod's
setting in the game, and vk_modui.h named a draw_mod_page_view that did not
exist.

Ported from the C era's vk_menu.cpp (Longshot-mods-full-api), over the
snapshot's rows by id:
- the list: Left and Right switch a mod, Enter opens its page (picking a mod
  up moves to its page's Move in the list);
- a mod's page: its switch (Enter accepts a code's warning; Off for a mod
  running mods need is asked twice), its Permissions page (an optional one
  switched, asked twice to grant: game_mod_permission_set), its declared
  settings as the menu's own rows (game_mod_setting_set by the setting's id:
  toggle, choice, slider, number and text typed, color, keybind; Delete its
  default), the debug page's key, its own SettingsPage in the rows' place
  (modui_draw_settings), what it has, Start again, Move in the list, Debug;
  its help box shows the script's frame times;
- the permission prompt (page 6), over everything, answered by the player's
  own fresh presses only (prompt_keys, as the C era's: a quiet time, nothing
  held, a move never confirms), by the prompt's serial (game_mod_prompt_answer);
- menu_mod_keys and menu_mods_debug_closed answer vk_modui.cpp: a mod's bound
  keys close its window, and a debug page closed goes back to its mod's page;
  a debug page's key opens it in play.

tests/test_mods_menu.py drives the list and the page against a fake snapshot;
tests/test_mod_prompt_keys.py (the C era's) checks the prompt's keys.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The B9 fix made permissions.request absent and the prompt never queued while
no renderer drew it (Hosts::drawn, all false in longshot-game). The Mods tab
now draws the prompt and answers it (gpu/vk/vk_menu.cpp page 6,
game_mod_prompt_answer), so hosts::drawn says prompts: a switch-on, a start
that lacks a grant and permissions.request ask the player again. A mod's
shader passes and the world layer are still not drawn and stay absent.

longshot-game's test checks what its renderer draws and that has() follows
it; the B9 tests, which run over a host that draws nothing, say so.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Spec 11.5's <SettingRow id> was missing from longshot/ui: a custom
SettingsPage had to lay out its own rows from the input elements and keep
them in step with mod.json's settings by hand.

SettingRow is a component of the reconciler (runtime.js): it reads the
setting's description from the game (native.settings.spec(id), script::natives
setting_spec_json over the mod's manifest; the fake game's uiSettingSpec over
the same declarations) and its value with useSetting, and draws the input its
type takes, labelled: a Toggle, a Choice, a Slider, a Keybind, or a TextInput
that sets a number, a text or a color on Enter (a value that is not one of the
setting's leaves it as it was; a secret's value is never shown). An id
mod.json does not declare is UnknownNameError, as settings.get's.

Declared in longshot-ui.d.ts (and longshot.d.ts, ui-runtime.js made again by
schema-gen); the ui-cases example has a case and a test for it, and
natives.rs a test of the description of each type. ui.md shows it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
game/README.md's stand-ins said the permission prompt and a script mod's page
were not drawn, their frame times 0, and a click on a mod's window reached
the game; game/DESIGN.md said the same of section 9 and of the window's
thread. All three are built now. settings.md describes the page as this
tree draws it (Delete puts back a default, the cheats are on the list, Start
again and Move in the list, the frame times), and scripting.md the
Permissions page a mod's page opens.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
A page just opened has its title at the selection's place until the next
key settles it on the first line that can be chosen (mods_tick); the check
read the selection before that. It presses Up once first, as it does on a
mod's own page.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The renderer drew neither: gpu/vk/modui_world_off.cpp stood in for the
world layer (every World root over the picture, never tested against the
scene), the Insert menu's pass rows took only the CRT filter and colour
vision, so a mod's GAME_PASS_SHADER pass was never drawn, and nothing
called game_post_report. The C era's renderer half is brought back over
the game side's lists:

- Screen effects (vk_effects.cpp, fx_spirv.h, the fx shaders): the
  GAME_PASS_SHADER passes of game_post_passes taken when its generation
  moves (fx_list.h, their SPIR-V and params copied at once), checked
  against the template again, made pipelines and drawn before the upscale
  and after it; each one's state, GPU time and reason reported through
  game_post_report. A mod's page in the Mods tab lists its effects with a
  switch of the player's for the session, and its help gives their GPU
  time beside its script's.
- The world layer (vk_world_layer.cpp, vk_world_depth.cpp, the world
  shaders): game_world_draws copied into the renderer's primitives when
  its generation moves (world_list.h: a box its 12 edges, a circle its
  48 segments, a billboard's image copied once by an id the game side
  now gives it, GameWorldDraw.image_id), drawn on the gameplay upscale's
  picture with the scene's depth; the World roots tested at their point
  and drawn in the scene with occlude="depth" (the overlays' offscreen
  atlas in vk_imgui.cpp, the scene camera kept in vk_temporal.cpp).
- MkwVkHost version 55: game_post_report and game_world_draws, last, in
  host/rx_backend.c's table too. Switch rows RX_VK_FX, RX_VK_FX_BUDGET_US
  and RX_VK_WORLD.

With no mod's effect or shape, each poll compares one generation and the
dispatch path asks one relaxed load. Game-free tests: test_gfx_effects.py
(the template, fx_list.h, the wiring), test_gfx_world.py
(world_list_test.cpp, world_layer_test.cpp, the wiring),
test_world_depth.py (world_depth_test.cpp), and test_mods_menu.py's
effect lines; the MkwVkHost tail checks of test_broker_frame.py and
test_texture_pack.py take version 55's two members.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
hosts::drawn() said the renderer drew neither a mod's shader passes nor
the world layer, so gfx.effect, gfx.world and its members were absent
(has() false, NotAvailableError). The renderer draws both now
(gpu/vk/vk_effects.cpp, vk_world_layer.cpp), so Drawn says so, and the
test that held them absent holds them present.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
A World root was mounted under ui.hud, as a label drawn over the picture
with the HUD. It is drawn in the scene now, tested against its depth, as
the world layer's shapes are: the spec's 11.6 gives it gfx.world. The UI
service's grants (UiGrants.world), its surface's permission, longshot/ui's
mount(), the fake game and longshot-mod's scan ask gfx.world; enemy-names
asks for it; the schema's notes and the generated files follow. A test
mounts a World root with ui.hud alone (refused, naming gfx.world) and with
gfx.world (taken).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
game/README.md's stand-ins and DESIGN.md said the world layer and the
effects were not in this tree; architecture.md's rule 5 named the
stand-in. They say what is true now, architecture.md has the rules of
both again (screen effects, the world layer), and the authors' docs
(gfx.md, world.md, ui.md, ui-channel.md) say the renderer draws them, not
yet seen in a game run, with the player's switch of an effect and a World
root's permission gfx.world.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
longshotCheckout and trustedCheckout told a checkout by its scripts/dev.py and host/modapi/. The mod API moved
to game/modapi/ with the game side's port to Rust, and host/modapi/ is gone, so no folder was a checkout any
more: `longshot-mod test --game` on a mod inside the checkout (or with LONGSHOT_CHECKOUT set) no longer went
through the checkout's dev.py, and longshotCheckout(HERE) returned null. The mod tools' tests 67 ("the game in
its test mode, or dev.py game-tests inside a checkout") failed on its assert that the checkout is found, and 68
(audit N12) on path.join(null) when it set LONGSHOT_CHECKOUT to that checkout.

The marker is now game/modapi/. Test 68's stranger repository makes an empty game/modapi/ in place of
host/modapi/, so it still looks like a checkout and the audit N12 case (a dev.py found by walking up is never
run) is still the one tested.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The test that each library mod's committed mod.d.ts is what `longshot-mod types` writes now walked
assets/modding/examples/ and assets/modding/system/. The system mods moved to game/mods/, so the second
readdirSync threw ENOENT and the test (92) failed before checking anything.

It walks assets/modding/examples/ and game/mods/ now, and asserts the Discord system mod (game/mods/discord,
the system mod with exports) is among the libraries found, so a later move cannot drop the system mods
from the check without failing it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The game's test runner (game/modapi/testing/runner.js, copied for the fake game into lib/testing-runtime.js)
lists in FAKE_ONLY the FakeGame members a test may use only in the fake game, so that the real game refuses
them with FakeOnlyError. It still listed "native", the fake game's stand-in for native C mods, which was
removed with them (feat(mods)!: native C mods removed): FakeGame has no native member. The mod tools' test 63
("the fake game's helpers the real game refuses are the fake game's own") failed on it: "native is in the
runner's FAKE_ONLY but not a FakeGame member". The list was wrong, not the test.

"native" is out of FAKE_ONLY in runner.js, and lib/testing-runtime.js is written again from it by
cargo run -p schema-gen.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Nothing ran assets/modding/packages/mod-tools/test/*.test.mjs: not tests/run_all.py, not a mise task, not the
Forgejo or CircleCI workflows. The C era's tests/test_mod_tools.py did, and the test files still say it runs
them, but it did not come over to this tree. So they broke unseen when the system mods moved to game/mods/,
the mod API to game/modapi/ and the native C mods went (four of 92 failing).

tests/test_mod_tools.py runs them with node --experimental-vm-modules --test and fails when node fails, any test
fails or is cancelled, none passed, or the Node is older than 22 (the package's engines). Node is PATH's (or
--node); with none it prints "SKIP: node not installed" and exits 0, the tests/ convention for a skip found at
run time. It declares no {tool} placeholder on purpose: run_all.py's --strict fails any check whose declared
tool is missing, and no CI image has Node yet. Its docstring says CI should install the Node release pinned in
the file (NODE_VERSION v24.22.3 and its NODE_SHA256, release.yml's) once CI's migration is done.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
longshot-mod test --game takes a checkout's dev.py game-tests for a mod inside the checkout its tools come
from (or with LONGSHOT_CHECKOUT naming one), as assets/modding/docs/testing.md, game/DESIGN.md and
HOS_MOD_TESTS_OUT's switch say, but this tree had no such command: the C era's scripts/devtools/gametests.py
did not come over. Once the checkout was found again (game/modapi/), that route ended in dev.py's "invalid
choice".

scripts/devtools/gametests.py is the C era's command fitted to this tree: the game's test mode is the Rust
side's (game/crates/longshot-game/src/mod_tests.rs; test files as game/crates/script/src/testing.rs
find_tests takes them: no .cts, four folders deep, no links), the bridge's start_session without the romfs it
no longer takes, and its start one job of the PC's queue in shared mode (dev.py queue run game-tests --mode
shared). Each run gets a folder of its own under the development folder's runs/game-tests/ for its reports
(HOS_MOD_TESTS_OUT), user folder and log; the shell's game switches are left out and said; the reports are
taken only whole and with the game's own exit code. The target is required: the C era's suite,
tests/game-features/, is not in this tree. A save that is not in assets/saves/ and a run folder too long for
HOS_MOD_TESTS_OUT are refused before anything starts.

tests/test_dev_game_tests.py (the C era's, ported) checks it game-free: the mods a target holds, the test
files, the plan, --dry-run, the refusals, the arguments longshot-mod passes, the queue job, and a run with the
bridge stood in for. The mod tools' game-test.test.mjs runs the checkout's dev.py with what gameCommand
builds plus --dry-run, and checks the choice of route: a system mod of the tools' own checkout goes through
its dev.py, a mod elsewhere runs the game, and a LONGSHOT_CHECKOUT that is no checkout runs the game.
docs/dev/developing.md and testing.md say how it runs.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The built-in registries (keybinds, hud, markers, commands) were lists mods
shared with nothing in the game reading them: no keybind conflicts, no command
palette, no marker layer, no way to move or hide a mod's HUD.

services/shared.rs is the engine's side of them:

- keybinds: every running mod's keybind settings (and its debug page's key),
  with the "keybinds" entries for keys bound another way, as one list; two
  that share a key (any case) or a chord (its buttons as a set, a setting's
  Switch labels read as PadButton's names) clash.
- commands: { id, label, help?, args? } entries, each argument a toggle, a
  choice, a number or text with a default. Services::command_run checks the player's
  arguments against the entry as the mod gave it now and delivers "command"
  to its mod at the next together step; longshot/mods' command(entry, run)
  adds the entry and hears it.
- hud: each mod's HUD roots by key (a <Hud id>, which Hud now takes with a
  title, else "#n" by mount order), labelled by the mod's "hud" entries; the
  player's place (another region, or hidden) is kept in the mod's store
  ($hudLayout, a host setting never on its page) and applied as the UI's
  snapshot is built.
- markers: { x, y?, z, map?, label?, color? } entries of running mods on this
  map, as world-layer shapes (a ring, a line up, the label), published with the
  mods' own shapes by gfx.rs; made again only when the entries or the map
  change.

The Mods tab's snapshot carries the view (TabSnapshot::shared), and its edits
run a command (Edit::Command) and move a HUD root (Edit::Hud). A malformed
entry stays in the registry and is left out of what the game resolves, counted.

Tests: chords, clashes, the strict reading of commands and markers, the HUD
layout's text; a command run reaches its mod once with its arguments; the
keybinds list and its clashes across two mods; the marker layer by map; a HUD
root moved and hidden in the snapshot and kept in the store.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The engine's view of Longshot's own registries reaches the menu: game.h's
GameModsSnapshot carries the bindings with their clashes (GameModKeybind), the
palette's commands and their arguments (GameModCommand, GameModCommandArg) and
the mods' HUD roots (GameModHudRoot), built by mods_page.rs from the loader's
TabSnapshot::shared.

The Mods tab's list has an "Across mods" part under the mods, each line a page:

- Keybinds: every running mod's keys and chords, a clash marked and named in
  the help; a keybind setting is rebound there as on its mod's page (its row's
  setting, game_mod_setting_set), an entry the mod binds itself is shown only.
- Commands: the palette, each command with its arguments under it (Left and
  Right choose a value); Enter runs it, sent as game_mod_setting_set's
  "$command" key with the arguments' JSON.
- HUD layout: each mod's HUD roots, Left and Right through its own place, the
  nine regions and hidden, sent as the "$hud" key.

The two keys go through game_mod_setting_set so MkwVkHost is unchanged; the
game side reads them as the Commands and HUD pages' edits (shared_edit). These
are the Mods tab's own lines, not the model's rows, and save nothing in
longshot_options.ini (a HUD root's place is kept in its mod's store).

tests/test_mods_menu.py walks the three pages against a fake snapshot; the
game side's tests check the C block and the edits' JSON.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Icon was the built-in vector set alone, so a tracker could not show the
game's item pictures (the Ship of Harkinian item tracker's case).

Icon takes `item`, an item's name ("Item_Bomb", a mod's new item's too). The
mod's image set reads it as a source of its own beside the mod's PNGs: on the
images' thread, the host's ItemIcons (longshot-game's textures.rs) reads the
file the game is served for UI/Tex/Icon/<item>.bntx.zs, takes its first plain
2D texture and has the renderer's decoder make level 0 RGBA8. The pixels go to
the UI snapshot alone (the renderer draws them in the Icon's square, tinted
only when the Icon gives a colour); no script sees them and nothing is kept or
written. An item with no icon, or one the decoder does not take, is drawn as
an empty place, said once in the log.

The image set's sources are now a file, an item's icon, or a thumbnail's src
(`capture:<n>`, for longshot/capture next, which fails until then), all under
its caps (64 images, 16 MiB). The types and the fake game take `item`, and the
Hud's `id` and `title` that the HUD layout page goes by.

Tests: an item's icon through a reader of made-up icons, one it has not, the
name's check, and an Icon's image in the snapshot.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The enemy editor's thumbnails (spec 18) had no way in: longshot/capture was
named in spec 9's table and not built.

capture.toml: thumbnail({ rect?, size? }) gives a Thumbnail handle (src(),
state(), failure(), save(name), release()); load(name), saved() and
remove(name) give back the ones a mod kept. Permission ui.window. A handle has
no read: its src (capture:<n>) is what an <Image> (or a Canvas's image
command) shows, and only the mod's own src resolves.

The game side (services/capture.rs) lists each ask in the mods' UI snapshot,
version 11 (MkwVkUiSnapshot.captures: an id, the part of the picture as
fractions, the size 16 to 256 a side) until the renderer answers. The renderer
(vk_modui.cpp thumbs_tick, vk_replay.cpp thumb_ask) copies the part at the
present's point the control bridge's shots are taken from (the scene, no
overlay, no menu, no mod UI), blitted into a 256 x 256 image of its own, reads
it back once the GPU is past it and posts MKWVK_UI_EVENT_CAPTURED with the
RGBA8 rows (MKWVK_UI_VALUE_PIXELS), or none when it could not. longshot-game's
game_ui_post keeps such an answer apart from the mods' events (8 at most) and
the next frame's start takes it (capture_frame); an ask unanswered for 4 s
fails. The pixels stay with the service and the mod's image set (counted in
its caps). save() writes a PNG under <user>/modstore/captures/<mod>/, which no
mod's file API reads. MkwVkHost is unchanged; rx_backend.c's and ui.rs's
layout checks hold the snapshot's new size.

Caps: 16 thumbnails a mod, 4 pending; 64 saved. has("capture") is the host's.
The fake game takes a thumbnail at the frame after it was asked (or fails it,
game.captureFails) and keeps saved ones in game.thumbnailsSaved.

Tests: the ask's checks; a thumbnail asked in the snapshot, answered through
the sink, shown, released; one unanswered failing and the pending cap; one
saved to the game's folder and loaded again; the C block's captures and the
answer's checks; the image set's thumbnail source.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The guides said the engine's side of the built-in registries, the game's item
icons and longshot/capture were not built.

- mods-together.md: what the game does with keybinds, commands, hud and
  markers, each entry's shape, and command() of longshot/mods.
- input.md: two mods' keys that clash are shown and rebound on the Keybinds
  page.
- ui.md: <Icon item>, thumbnails of the picture (longshot/capture), and the
  player's HUD layout by a Hud's id and title.
- ui-channel.md: the image set's two new sources, Icon's item, and the
  snapshot's version 11 with the thumbnails' asks and answer.
- game/DESIGN.md: api::services::shared in the together step's section.
- game/README.md's Stand-ins: what the pages leave out (native mods' keybind
  settings, Longshot's own bindings, a text argument), the icon's path, the
  marker layer drawn only with the world layer, and that none of it has run in
  the game.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The builder and the game each find the player's mods their own way, but a
check that the game's build still matches the mods needs both to describe
them identically. The new crate mods-stamp (game/crates/mods-stamp, no
dependency but serde) takes the facts each side found (each mod's code files,
its code hash and acceptance, mods.json's order and switches, the build's
switch table) and makes the stamp: the mods whose code a build takes, the
parts it takes (sites on or off; patches when on or a switch; code modules
when on), in mods.json's order, with a hash of the canonical list and of the
accepted set. compare() says what needs a build: a mod added, removed or
changed, a move among the mods whose order matters (patches, code modules),
or the accepted set; switching a data-only switch or a sites mod, or moving
sites-only mods, is none. SHA-256 and hex move here from api::system (which
re-exports them) so both sides hash with one code.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
A build left no note of which mods' code it took, so nothing could tell,
before the game starts, that a mod added, changed, accepted or reordered
since needs an update. A build now writes the stamp (mods-stamp) into the
game folder's record as "mods" (absent in an earlier builder's record), made
by game_files::code_mods::stamp from the same mods folder, list, trust file
and switch table the build read. game_files::code_mods::current_stamp(game,
user, env) is the one call the builder makes before it starts the game:
mods_stamp::compare of the record's stamp with it says what needs an update
first. A package's code is its sites.toml alone, as the game hashes it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The game side makes the stamp from its own scan (Loader::mods_stamp: each
manifest mod's code files and hash, each emulator-layout mod's ExeFS files and
code modules, the trust file, mods.json and the build's switch table), so the
two sides can be held to one answer. A test builds a mods folder on disk
(accepted and unaccepted manifest mods, a data-only switch, code patches with a
module, a files-only mod), and checks the game's stamp is the builder's
current_stamp, before and after switching mods.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Turning on a mod with code patches or code modules, or accepting a mod's
code, in the Mods tab changes nothing until the game is built again, and the
menu's restart only started the same build again. The loader now names the
mods that are on and whose code waits for a build (Loader::rebuild_needed:
the existing waits-for-a-build state, ExeFS files not in the build's list, a
code module not taken), puts them in the tab's snapshot, and counts them in
the restart question's key, so accepting a mod's code asks for the restart
too. At the window's close for that restart the host asks
game_restart_via_builder (game.h): when such mods are waiting and the game
holds the channel of the builder that started it (#2286's
host/builder_channel), the game sends restart_to_apply over it
(bc_restart_to_apply) and the host exits normally with 0; the builder builds
the game and starts it again. With no channel the game starts itself again
as before, and the Mods tab says the code applies once the game is started
from the builder. Switching a data-only switch, a sites mod, files or scripts
needs no build and restarts as before. No exit status of its own: the
channel says it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The cheats of the mods that were on at the start (the cheats system mod's list) were all on the Mods
tab's list, under the mods, a heading each folder. A mod's things are on its page everywhere else, so
its cheats go there too: under Cheats, before About, switched as before.

The tab's row names the folder it brings cheats from (TabRow::cheats_folder, GameModRow.cheats_folder:
the name the cheats system mod lists them under), and the menu lists each cheat on the page of the row
that names its folder. A cheat whose folder has no row (none today: every folder with cheats/ is a
row) stays on the list. The row's detail says its cheats are on its page.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The list gets lines of its own:

- Reload the map to see the change, first, while services::reload offers it (a rebuild changed files
  the map loaded): Enter calls MapReload::now, made at the next frame. Its offer was ready with no
  line to take it. The line stays to say how the last reload went (busy, or why it failed).
- Restart now, while the order or a switch waits for the next start: the restart question's own
  Restart now (everything saved, the window closed), so a mod whose code waits for a build goes
  through the builder (game_restart_exit, unchanged); the line says when a build comes first.
- Safe start, last: the next start loads no mods but Longshot's own, once, and the game restarts now.
  The ask is a file in the user folder (safe_start_once) that the next start's loader config takes
  (deletes), so it holds for that one start whatever starts the game again (the restart, the builder
  after a build, the player). In that start the line restarts the game with its mods; in a game
  started with HOS_NO_MODS, which a restart keeps, it only says so.

The snapshot carries the offer, whether this start is a Safe start (and whose) and how many mods wait
for a build (TabSnapshot::reload and ::safe_start, GameModsSnapshot.reload_*, .safe_start,
.nrebuild); game_mod_edit takes the two actions as ops 6 and 7 with no row (made at once on the
menu's thread: neither is the loader's edit).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
What the build did with a mod's code modules (exefs/subsdk*: built in, waiting for a build, or left
out and why) was run into the end of its note, after the list's and the ExeFS patches' notes. It is
now its page's Code modules line (TabRow::modules, GameModRow.modules: modules_note), between what
it has and its notes, and what it has counts its modules; the note no longer carries them.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
A TextInput on a mod's own settings page (a mounted SettingsPage, and a SettingRow of a text, number
or color setting, which is one) was drawn in the Mods tab but never typed there: Enter did nothing,
and only a window took typing. Enter on it now opens the menu's own field over it (modui_settings_text;
its text drawn in the TextInput's place, modui_settings_typing), and the field's Enter sends a change
and a submit to the mod as a window's Enter does (modui_settings_text_set). Text the field cannot
hold (past 63 characters, or not printable ASCII) is not cut short by an edit: the help says to type
it in the mod's window.

The menu's field types without a keyboard when it is given characters to cycle (the D-pad at the
caret, the shoulders add and remove one), as the Custom output size's is; a mod's text, number and
color rows and the settings page's field now have them, so a controller alone never meets a dead row.
In play, a window's TextInput takes a keyboard's typing alone: opened with the controller, its prompts
now say a keyboard types there instead of waiting for typing that cannot come.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The Mods tab's Keybinds page showed the keybind settings of mods with a manifest's settings and the
registry's entries. Two kinds of key a mod can clash with were missing:

- A native system mod's keybind settings (the game's settings menu's rows, declared through
  Settings::declare_native): Settings::native_keybinds reads them, and Services::keybinds lists them
  with the mods' (shown only: the game's settings menu sets them), their clashes found with the rest.
  None declares one today; the next one is listed without more.
- Longshot's own keys, which the renderer alone knows: the menu's (Insert, F1, Esc, as the Menu
  shortcut row says) and the game's keyboard controls (the Controls page's). The page lists them
  under their own heading after the mods' keys, read only, each saying where it is set; a mod's key
  that is one of them is marked as a clash, and both helps name the other.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The Commands page set a toggle, a choice and a number argument with Left and Right, but a text
argument kept its mod's default: the menu typed none. Enter on it now opens the menu's own field
(keyboard and controller alike, as a mod's text setting is), drawn in the argument's place; its
Enter keeps the text as the argument's value until the command runs, Esc puts it back. A default
the field cannot hold (past 63 characters, an escape other than a quote's or a backslash's, a byte
past printable ASCII) is kept, and the help says so, rather than cut short by an edit.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The command palette was the Mods tab's Commands page alone: reaching a mod's command in play took
the menu, the Mods tab and its line. A key of its own now opens it over the game: the Controls tab's
Command palette key (key command_palette_key, frozen: None or F2 to F9, None by default so no key is
taken from the game or the mods unless the player picks one; gpu/vk/menu/menu_settings.cpp). Pressed
in play, the menu opens straight on the Commands page, and Back closes the menu there rather than
going up to the list. With no command offered the key does nothing. The key is listed with
Longshot's own on the Keybinds page, so a mod's key on it shows as a clash.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The undo is automatic, as game/DESIGN.md and the code have it: any stop of a mod (the player's
switch, its faults, a failed start, a reload) puts back its writes to the game's state that no save
holds, at the next frame's writes, each only where the game still has the mod's value; writes already
in a save stay, and a save loaded drops the unsaved entries. The modding guides described a player's
Undo line on the page instead (lifecycle.md, writes.md, actors.md, and respawn's lines in the schema:
actors.toml, types.toml, regenerated into reference.md and longshot.d.ts); they now say what the game
does.

The page of a mod that is off or stopped says what its stop did, on a Changes line: "Turned off: 12
changes undone, 3 kept (already saved)", with those left as the game has them and those that wait for
play. The journal keeps each mod's last stop's undo as far as it went (Counts::undone and ::left,
reset at the next stop and at a load); loader::tab::changes_text words it, TabRow's page carries it
(Page::changes, GameModRow.changes).

A new game-free test covers the stop around a save and a load: the saved write is not undone, one the
game changed since is left, the rest is put back, and writes a load dropped are never undone.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
A mod's ExeFS patches that write the game's code were translated as the
build found the mod, so turning such a mod on or off needed a build (the
Modding API spec's 8.4 says it should not). The lift now takes the
switches' table (LiftOptions::switches, the read stage's exefs_switch.txt:
for every byte a switch writes, the game's own and each switch's) and, for
every function holding a code word a switch writes, walks the function
again over each other state of its switches (cfg's Discovery::over and
walk_again: the plan's entries and jump tables known, the misses tried
again as the discovery does), growing its switches when a walk meets
another one's words. Each state is a version, f_<entry>__s<state>, lifted
from that state's words and tables beside the function in its unit
(Program::version); the function itself, lifted with every switch on,
starts with a test of its switches' bytes, hos_patch_on[n] (an element of
a host array: mir's Global::element), and tail calls the version of their
state when they are not all on (lift::switch::dispatch, mir's
Dest::Version). The places a version calls are entries: the game's own
words' calls where a switch writes, before the discovery, and any further
call a version's walk meets, the discovery done again with them (at most
three times).

The lift's key holds the switches' numbers and bytes, not which is on, so
flipping a switch keeps the lift; a function's key holds its switches and
each version's inputs. The cost is a switched function's versions: one more
function lifted and compiled per state (a function one switch changes, one
more). No switch, no change to the lift.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
A function a switched mod's code changes is lifted for every state of its
switches and picks its version at its entry from hos_patch_on[n]. The game
defines that array (longshot-game's switches.rs, exported by name) and sets
each switch's byte, 1 while its mod is on at this start, with the switch
table's bytes, before the guest's first instruction.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The read stage made only mods of data switches; a mod with code was built
as the build found it, and switching it waited for a build. Now that the
lift translates a switched function for each state of its switches, the
read stage makes a switch of a mod with code too (game_files::switches::
plan), on or off, and gives the lift the switches' table. Not switched, and
built as before: a mod with code past the first eight in the list
(CODE_SWITCH_MAX: each costs the build its functions once more per state),
one with a code module (taken only while it is on, and its patches call
into it), one that writes one of main's import stubs (the lift sees a call
of a stub as one of its target, found in the image as every switch has
it), and one sharing a byte with a mod that is no switch (now until no
switch shares one with a mod left out for that). The game lists such a mod's
files as switched, so turning it on or off asks for a restart and no build
(Loader::rebuild_needed, and so the builder's Restart to apply); the stamp
already counted a switch as built whatever its state. Docs: the builder's
"Switching a code mod", mods.md, unsafe.md, using-mods.md, game/README.md.

Measured (this PC, the builder's own timings, shared store, fresh work folder each): no mod 53.3 s
(lift 4.9, compile 44.9, 2 of 888 units compiled); two code mods as switches changing 3 functions, one of them
by both (5 more versions lifted) 55.6 s (lift 5.1, compile 45.9, 3 of 888 units compiled): about +2 s, the
switched functions' units compiled again. The cap of 8 code switches stays.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
A code module that writes the game's code at its start-up (exlaunch and the
like) is left out by the build with its reason, which the log and the Mods
tab's left-out line show. The spec's plan, running that start-up once at
build time in a confined AArch64 emulator, is deferred with no stand-in:
game/DESIGN.md's new Deferred section (revisit after #2286 and the new IR
settle), unsafe.md, using-mods.md and game_files::modules say so.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
`camera.override({ near })` sets the gameplay projection's near plane, 0.01 to 10 metres, so a view inside Link's
head does not draw the inside of his face. It is written at `camera.lens`, where x20 is the camera's
sead::PerspectiveProjection (the site's next instruction stores the angle at its +0xa0): the near plane at +0x98 and
the dirty byte at +0x8, which agree with the ratio at +0xb0 and the dirty store `wide.cameraRatio` already read. The
game's own near plane is kept and put back at the first update with none; a projection other than the one written
is never written back (its camera may be gone).

`has("camera.override.near")` follows `camera.lens` being placed; a rig giving `near` on a build without it is a
NotAvailableError, in the game and in the fake game. Read from the code, not yet seen in a run.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
`camera.override({ drivePlayerFacing: true })` turns the game's own player camera with the mod's view, so the left
stick walks Link where the view looks and the game's camera is behind him when the override ends. At
`camera.update`, the player camera's update's entry, the core's callback now sets the camera's yaw (+0x1a4, the
field host/mouse_native.c turns, in oot::layout::camera) in place of the mouse look for that update: one of the two
turns it, never both. The mouse look starts again from the camera's own angles after an update it missed, instead
of putting back where the mouse had left them.

The view's yaw less the player camera's is not assumed: the view site compares the game's own view with the yaw the
camera had at its update and takes the nearest multiple of 90 degrees (within 20), so the rig drives the yaw once
the game has built one view of its own. Only while the camera is the view (its state 3 or 4, its angles a camera's).

`has("camera.override.drivePlayerFacing")` follows `camera.update` and `camera.view` being placed; a NotAvailableError
otherwise, in the game and in the fake game. Read from the code, not yet seen in a run.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
`camera.override({ collide: true })` keeps the eye out of the walls between it and its pivot (Link at the offset's
height on a rig on Link, the target on a "target" rig in the world; another rig is an ArgumentError), 0.2 m in front
of what a ray from the pivot hits and at least 0.1 m from it.

The ray cannot be cast at the view site: the game's query takes the physics world's lock, which the step holds
while it waits on job batches (oot::rays). So the camera service asks one ray a frame through oot::rays, from the
pivot to the eye as the rig puts it and a clearance beyond, takes its answer the next frame as the rig's reach, and
the view site pulls the eye in along the line to the pivot within it. A wall is felt a frame or two after the eye
reaches it. A ray not cast in 4 frames is asked again; releasing the override cancels it.

`has("camera.override.collide")` is false while `world.ray` is (Preview: no run has shown the game's rays), like it
through the same casts; the fake game has it once a test gives a world to cast against (allowRay), and casts at once.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
content::assets::gltf reads a .glb (its JSON and BIN chunks) or a .gltf (its buffers and images
beside it, or data: URIs) into one static mesh: the default scene's triangles with each node's
transform applied (normals by the inverse transpose, the winding turned round under a mirroring
node), each material's base colour (factor, PNG texture, alpha mode and cutoff). The file is a
mod's, untrusted: every offset, stride, count and index is checked with checked arithmetic and
every size capped (Limits: the world layer's 200,000 triangles, 64 MB), nothing panics on any
input (a test truncates and flips every byte of a GLB). Written on serde_json and the PNG decoder
the crate has rather than the gltf crate: no new dependency in the game binary, and no reader
whose accessor iteration trusts the file under panic=abort.

Not read: skins, animations, morph targets, the other PBR inputs, vertex colours, samplers; a JPEG
texture, a sparse accessor or a required extension is refused, saying so.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
A handle may be an async function's result (load.rs ASYNC_RESULTS), its resolver settling the
Promise with Value::Handle, which the engine already makes the handle's object (bind::to_js). For
gfx.model, whose Model is made off the game's thread.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
gfx.model(path) reads a mod's .glb/.gltf on a reader thread of its own (api::services::models,
over content::assets::gltf; files beside it in the mod's folder only, never through a link) and
settles with a Model handle once it is held; a mod's models hold at most 64 MB once read (charged
while a handle, a shape or a published list holds them) and 4 read at once. gfx.world.model(model,
at, options?) draws it as a WorldShape: yaw, pitch, roll, scale, a tint, occlusion and distances;
setRotation and setScale; follow(actor) moves and turns it with the actor. A mod's model shapes
draw at most 200,000 triangles. has("gfx.model") and has("gfx.world.model") follow Drawn.models.

The game side publishes the models as their own list with the shapes (game_world_models,
GameWorldModel and GameModelMesh in game.h; MkwVkHost version 56). The renderer copies and checks
each mesh once by its id (gpu/vk/world_models.h: every index, part and texture in range, a bad
mesh never drawn), uploads it once into a buffer and images, and draws the models before the
shapes in a pass of their own (draw_models; shaders/model.vert, model.frag): vertices pulled by
the index buffer, a depth image of the picture's size so the parts hide each other, opaque and
masked parts then blended ones, both sides lit by one light from above, each fragment tested
against the scene's depth as the shapes are. The mod tools' fake game checks a model's path and
that it is glTF 2.0.

Not done: skinning and animation, the other PBR inputs, JPEG textures, bone attachment, the
scene's sun direction (one fixed light), sorting blended parts. Not run in the game yet: the
checks a run must make are in assets/modding/docs/world.md.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
`camera.follow(view, actor)`, also `view.follow(actor)`, puts the override's eye on any actor in Link's place: its
feet plus the rig's offset, turned with its facing, worked out where the game builds its view, as `attach: "player"`
is on Link. An Actor is a handle, which an options record cannot hold, so it is a method of the override (the
camera namespace's, as `actors.attach` is the actors'), with its own feature `camera.follow`.

The view site reads the actor at the address the main thread published, checked as a game actor each time; the
main thread marks it gone once the actors' list drops it, and the game's view is drawn from then on. It returns
false for an actor the list does not have now.

A view on a bone goes through it: attach a hidden actor to the bone with `actors.attach` and follow that actor
(assets/modding/docs/camera.md has the recipe, for Link's "Head"). A rig's own bone, read at a site after the
skeleton's update with no frame of delay, stays a later improvement, and hiding a part of Link's model a leftover;
game/README.md records both.

`has("camera.follow")` follows the actors' list and the game's state; the fake game follows its listed actors.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
#2286 moved the launcher profile's reader and writer to builder/crates/launcher-profile, which keeps profile.json's
"mods" as a key it does not read. The Mod API's part goes on top of it, in game/crates/profile-mods:

- ProfileMods on launcher_profile::Profile: "mods" read and written in its place (ModEntry: id, on, and the entry's
  other keys as written, the loader's "granted" and "version"); parse and read refuse a "mods" not of the format
  (an array of objects, each one "id" string and at most one "on" boolean).
- The folder's trust.json (the game's rule for a profile.json's trust file) and mods/, read_trust.
- expand: the switches a profile stands for that are the game's to set, HOS_MODS_LIST (profile.json) and HOS_MODS
  (mods/), an explicit one winning; the settings, saves and start slot are the host's (host/longshot_profile.h).
- stamp: the mods' stamp (mods-stamp) of the code mods found in the profile's mods/ with its order, switches and
  trust.
- build_driver::play::mods_stamp, #2286's extension point, filled: the profile's code mods (game_files::code_mods::found,
  split out of stamp) stamped by profile_mods::stamp name its build folder (builds/<the list's hash, 16 hex>), none
  when no mod's code is taken.
- The build's mods are the profile's alone (#2286's one mod format, BuildOptions::profile): game_files::code_mods reads
  the profile's mods/, its profile.json's order and switches and its trust.json (no game-folder list, no --user, no
  package or emulator-layout mod), and build_driver::read::manifest_mods fills patches::collect with the accepted
  manifest mods' exefs/ (exefs_mods); the code modules, the sites (modsites::collect) and the record's stamp follow
  the same list. mods_stamp takes the profile alone.

Tests: profile-mods' own (the mods read, written in place with the rest kept, refused when not of the format, the
switches, the stamp from the profile's list and trust), play's a_profiles_code_mods_name_its_build, read's manifest_mods, code_mods' order and
exefs gate on a profile.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
A launcher profile's list of mods is its profile.json (HOS_MODS_LIST names it): the same list as mods.json, but each
mod's switch is "on", and the file is more than the list (its name, its game, its upscalers, the launcher's and the
builder's keys). The loader read and wrote only "enabled", and wrote "mods" first whatever the file's order, so a
switch on the Mods tab would have written "enabled" beside the launcher's "on" and moved the profile's keys.

ModsList now takes the switch's key (SwitchKey: "on" for a file named profile.json, profile_mods::FILE) and
keeps "mods" where the file has it among the other keys (mods.json too); a profile's file without "mods" gets it
after its keys. A profile's file that is not a list is never put aside as .bad (it is the launcher's): the change is
kept unsaved, and the log says so. The trust file's rule (trust::path) gives a
profile.json trust.json beside it (on Windows in any case); every other list keeps <stem>-trust.json.

Tests: a profile's list read and written (on, the keys in place, "enabled" no switch of a profile's), mods.json's
"mods" kept in its place, the Mods tab's switch written into profile.json as "on" with every other key kept, and a
profile's file that is no list left as it is. trust::path's place for a profile.json.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The builder starts the game with the profile's folder (LONGSHOT_PROFILE), and #2286's host takes its settings.ini,
saves/ and start_slot from it (host/longshot_profile.h). The mods are the game side's: at game_start_args, before the
sandbox and the loader look, the game sets the switches the profile stands for (game/crates/longshot-game/src/
profile.rs over profile_mods::expand): HOS_MODS_LIST its profile.json, HOS_MODS its mods/; one the environment set
already wins, and the start's standard error says what was set. The host chooses the settings file and the save folder
before the sandbox too, so the sandbox grants exactly the profile's mods/ (read), saves/ (its save tree), settings.ini
and profile.json (in place) and trust.json (read), and nothing else of the folder. The sandboxes' trust_path_of
(host/sandbox_linux.c, host/sandbox_windows.c) follow the game's rule for that trust file: a profile.json's is
trust.json beside it (on Windows in any case).

Tests: the expansion through the host's switches (an explicit one kept, the host's three left alone), and
tests/test_sandbox_profile.py: the switches the game sets are the ones the sandbox reads, the settings file's and the
save folder's choices take the profile's from longshot_profile.h and come before the sandbox, which grants what they
chose, and Linux's and Windows' plans over a profile grant exactly its parts.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The cheats' switches moved from mods.json's "cheats" to the cheats mod's global storage (the same keys), and the
loader only kept the old object as written: a player's cheats switched on in an older build started off. A launcher
profile has no "cheats" at all.

The loader hands the list's older switches to the services at its start (each key once, its last switch; a value
that is no switch left out), the native API gives them to a system mod (ModApi::legacy_cheats), and the cheats mod
takes each key its storage has not got yet (cheats::carry_legacy: a switch set since is the player's and wins), with
a log line. The list is left as it is, for an older build.

Tests: the loader's hand-over of an older list's cheats, and carry_legacy's once-only take.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
docs/dev/reference/profiles.md, #2286's contract for the launcher, the builder and the game, gets the Mod API's part:
the folder's trust.json, mods/ and saves/modstore/; profile.json's "mods" (its order, "on", the loader's keys, the
rules a list must keep); the trust file's rule; the mods' switches the game sets from LONGSHOT_PROFILE (HOS_MODS_LIST,
HOS_MODS); the sandbox's grants; the build's mods stamp (play::mods_stamp over profile_mods::stamp); and the cheats.

The pages it touches say the same: mods.md (a profile's list, its "on", HOS_MODS; the cheats' switches the cheats
mod's own), sandbox.md (a profile's grants, its trust file), saves.md (a mod's own save folder), switches.md
(LONGSHOT_PROFILE's mods), builder.md (features=), using-mods.md, game/README.md and DESIGN.md (the profile-mods crate).

"Profile" now means the launcher's alone: what spec 9.6 calls a save profile is "a mod's own save folder" in the
storage guide, saves.md and the schema's texts (storage.saves, SaveProfile; the API keeps its names), and
storage.profile is the launcher profile's list. The schema's outputs are generated again (schema-gen).

game/DESIGN.md's Deferred: a game→launcher action (open Mods) is a separate design, later; the game knows no launcher.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The contract for the settings menu as a system mod: the renderer declares every row of its Insert menu as data
(MkwVkSettingDecl: key, page, section, kind, label, help, range, default, choices, opens, verb, widget, flags, in
the menu's order) and keeps each row's effect; a row's state (value, shown, fixed, text, hint, locked) and its
set, press and typed text go by key, in the shape of game.h's game_setting_* the other way round. The host wraps
them as rx_setting_*, the game side reads them through host_sys::renderer_settings (with a stand-in renderer for
game-free tests). Version 57: 56 is another branch's. docs/dev/reference/settings-declarations.md is the contract,
for a Rust renderer to implement the same.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
gpu/vk/vk_menu.cpp's decl_build walks the rows as drawn (row_order of every tab and page, the core's own and every
module's, the game's rows among them) and makes each one a declaration: its key as the options file holds it, its
kind (a debug tool's row CUSTOM debug_tool, Custom output size TEXT, the Controls row a LINK to its page, whose grid
is the CUSTOM bindings row), its texts translated, its default from a fresh Options, its flags from its setting.
Built again when the menu's language changes. A state, a value's text and a set (menu_setting_set, as the control
bridge's) answer by key under the menu's lock; a press and a typed text wait for menu_tick, the menu's own thread.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
game/mods/settings reads the renderer's declarations when their generation moves on, and the rows of the page
shown while the Insert menu is open, and draws them as one tree of the generic elements: Tabs, a Section a heading,
a Toggle, Choice, Slider, Button, TextInput or Text a row, focusKey the row's key (view::build). A slider whose texts
are its number and a unit is a Slider with that unit; one with texts of its own a Choice of them. A link opens its
page under a Back button; a button that asks again is armed by its first press. The player's changes go back by key
(set, press, text). A native mod hears its UI through ModApi::ui_take_events (the events of a mod with no onEvents,
kept for it). It is mounted as its own settings page, beside the menu that still draws the rows itself.

tests/test_settings_decls.py makes the menu as built (tests/menu_model_fixture.py) the declarations list
game/mods/settings/tests/menu_rows.tsv, as decl_build does, and checks FROZEN's renderer keys are declared; the
mod's test draws that list whole, every row and heading of every tab and page.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
A handle whose release is one of its own methods (a camera override, pause, pointer capture, effect, model, world
shape, sound, duck, thumbnail, action) never got [Symbol.dispose], so `using` threw "not a function" in the game.
Its release is now its dispose too, as a namespace's release is; a test checks every such handle of the schema.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
With HOS_HEADLESS on Linux the menu's Restart now (the Mods tab's too) and Quit did nothing: the menu posted only to a
window, and the main thread waited on the game's thread without looking at the asks. The menu now posts either way
and the windowless main thread takes Restart now and Quit as a window's loop does, so a scripted run can restart over
the builder's channel (restart_to_apply) or quit from the menu.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
longshot-builder play --safe-start (the launcher's Safe start) sets LONGSHOT_SAFE_START=1 for one start. The game reads
it at its loader config: no player mods start that run, system mods still do, and the Mods tab's last line says
"Started without mods (safe start)". The old ask, a safe_start_once file in the user folder, goes: the user folder is
not the profile, so the builder never saw it. The tab's line now only says how to ask for one. Its switches.def row,
docs and a game-free test of the variable.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The loader reads mods only from LONGSHOT_PROFILE: its profile.json is the one list ("on"), its trust.json the one
trust file, its mods/ the manual mods ({id, path: "mods/<name>", on}). A source mod ({id, version, hash, on}) is
read through loader::source's ModStore/ModFiles, which the modtool's mod-store implements later; this build has
NoStore, so one is logged as not readable yet and its entry kept. LONGSHOT_DEV_MODS (mod run, and now the test
mode's tested mods) adds development mods, never written into the list. No profile: the system mods alone.

Gone: HOS_MODS, HOS_MODS_LIST, HOS_MOD_TESTS_ONLY, HOS_MOD_TESTS_PLAYER_LIST (GONE rows), mods.json and its
"enabled", <stem>-trust.json and the game folder's user/ trust rule, the carry of mods.json into the user folder,
modcache/mods_json.txt, longshot-game's profile.rs and profile_mods::expand. The sandboxes (Linux, Windows) and the
broker take the list, trust file, mods/ and the development mods from the same variables.

Hot reload follows the profile: <profile>/mods/ and profile.json by notices, LONGSHOT_DEV_MODS folders walked
(scripts, served files, shape). A profile.json change applies its switches while the game runs (the Mods tab's own
write changes nothing, so it logs nothing); a code change re-checks the mods' code against the build (Restart to
apply). The builder channel's profile_changed is not read: the game side has no event reader.

Also: the Mods tab's Has row lists what a mod has (script, hook sites, ExeFS patches, code modules, RomFS files,
patches/, textures, content module), the code warning names what the mod brings and drops Rebuild for mods, and a
confined game with no builder channel sends the player to the launcher or Longshot.exe mod to accept code (a
trust_request hook is left for the channel's request_trust). mod-tools' mod run plays <game>/dev as a profile.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
storage.save data has one store, <saves>/modstore/save/<uid>/slot_NN/. A mod's separate saves keep their game saves
in their own tree (save/.profiles/<p>), unchanged; their mods' data is slot_NN/.profiles/<p>/ of the one store
(StorageConfig::save_profile), never <p>/modstore. Data an older Longshot kept there is moved once at the start that
plays the profile (api::profiles::move_mod_saves: written, checked, then deleted; never over a file the store has).

Also: build-driver's verify no longer treats mods.json as the player's; docs for portal mods as source mods, the
profile's mods folder, and five dead anchors.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
How the camera API works in the game, linked from the modding docs but missing: the view read at the view and lens sites through the shared records, an override and its rig (near plane, driving the player facing beside the native mouse look, colliding by rays), what is not yet there (a bone rig, hiding Link's head), and the pause manager and the 2D layer behind game.pause and hideGameHud.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Linked from the modding docs and the code but missing: the rays cast on the physics step and their slots, travel and the age switch through the one map-change queue, the world's state by name, the shapes and models handed to the renderer, and the actors' places these follow; what a game run must confirm of the rays and the states.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
content.md and items.md linked docs/dev/game-tests.md, which does not exist: they point at developing.md's section on a mod's own tests in the game. tools.md named four Python checks of which only test_mod_tools.py exists: it names the Rust tests that check longshot mod now, and says sites port cannot run yet (its nx2 script went with the Python lift).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Linked from the modding docs and the code but never written: the actor list and its fields, writes, bombs, answers, attaching, spawning and the rules' hooks; the packs and scripted components; the trees' changes, new nodes and calls into a mod. With the anchors the links use.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Linked from the modding docs but never written: placements, shops, bottles and rupee gains; the merged data and new flags; the asset formats and the glTF state (no BFRES conversion yet). With the anchors the links use.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Linked from the modding docs and the code but never written: the map, save, flag and pause events, textShown and the three read fields; the audio threads, sounds, streams and groups; the input frame, actions and rumble. With the anchors the links use.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The help said "Windows' volume" on Linux too. On Windows it still does; elsewhere it says the system's volume, translated
into every language of gpu/vk/menu_i18n.h.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The user's rule for the settings' contract: no CUSTOM kind. MKWVK_SETTING_CUSTOM (and its widget) goes:

- The Controls page's grid is a BINDING for each control (bind_<name>, under the bindings heading): its state's value
  says it is at its defaults, its text names its two gamepad inputs, two keys and toggle; renderer_setting_set(key,
  MKWVK_BIND(slot, code)) binds one input, taking it from the control that had it; a press puts its defaults back.
  Reset to defaults is a BUTTON.
- The Debug tools' panel's 12 rows are TOGGLEs, CHOICEs, BUTTONs and LINKs, set and pressed by key; their presses go to
  game_cheat_action as the panel's do. A CHOICE's verb is a press acting on the value chosen (Set time, Change
  quantity). Teleport and Inventory are pages of their own: a BUTTON for each place, a TOGGLE or SLIDER for each item.
- A declaration's confirm is the question asked before a press acts or a toggle is turned on (Restart, Quit, Debug
  tools, the resets): the CONFIRM flag goes (menu::Setting.confirm is the question now, translated).

The Settings mod draws a binding as a line of Choices, Keybinds, a Toggle and Reset, a choice's verb as a button beside
it, and a question as a dialog in the page's stead. tests/test_settings_decls.py makes the new rows (and fails on a
CUSTOM one); menu_rows.tsv made again.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Setting a BINDING to an input another control uses no longer takes it silently. renderer_setting_text(key, value |
MKWVK_BIND_ASK) is the question ("F7 is used by Jump.", translated; "" when no other control uses it); a set of such
an input returns -3 and changes nothing, and value | MKWVK_BIND_SWAP is the player's Swap: each control that used the
input gets the slot's old input in its place. The host's rebind_control learns three flags for it: HOS_REBIND_PROBE
(report the conflicts only), HOS_REBIND_SWAP and HOS_REBIND_ONE_KEY (a key binds that slot alone, where the Controls
grid's one key cell clears the second).

The Settings mod asks the question as a dialog, Swap chosen first, Cancel beside it (sysmod-settings'
a_binding_asks_before_it_takes_another_controls_input); tests/test_settings_decls.py checks the flags are the same bits
on both sides and that binding_take takes an input in use only with Swap.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
A setting's declaration was the place of its row only while Game settings was off: the mod's LAYOUT table put its own in
its stead. Now the declaration is the place. The rows keep today's places on screen, so the menu looks the same:
widescreen's rows are in the Screen section (its declaration said the tab's top), Damage taken and the cheat rows sit
after Debug tools and Heart protection at the tab's top with LAYOUT's orders (theirs said Player and Camera & world).

- game/mods/game-settings goes, and with it the settings service's layout hook (ModApi::menu_layout, set_layout) and
  longshot-game's startup lay_out.
- A system mod's mod.json setting may say its "place" (tab, section, after or before, order), as a native one's
  SettingDecl section does; a player's mod naming it is refused (assets/modding/docs/settings.md).
- game/crates/longshot-game/tests/menu_places.tsv is LAYOUT's places, and longshot-game's
  every_system_mods_row_keeps_its_place checks each declaration against it (tab, section, order, anchor, owner);
  tests/test_menu_ini_keys.py and tests/test_recomplauncher_json.py read it in LAYOUT's stead.

Discord's discord_status keeps its line in the table as its mod.json's legacySwitch: no row of the menu draws it today.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The mods' UI had no way to keep a chosen line of a long column in view: a Scroll scrolled with the wheel and the focus
of a window, and a settings page (the Mods tab's area, soon the Insert menu's body) did not scroll inside at all, so a
line the keys reached below the area's end stayed off it.

- A Scroll takes `selected` (a child's index, MKWVK_UI_FLAG_HAS_SELECTED as Tabs' and List's): the renderer scrolls
  it the least that shows that child whole each time it changes, the wheel free between (vk_modui.cpp).
- modui_draw_settings lets the page's Scrolls and Lists scroll and its uncontrolled Tabs switch, as a window's, and
  keeps the focused control in view: its Scroll moved, else the page's own scroll, now in and out (*scroll).
- modui::reveal_delta is the one rule for both and for a window's focus.

tests/test_modui_scroll.py compiles modui_layout.cpp with a Scroll of 30 rows whose 21st is past the view's end and
checks it is brought in; api's a_scroll_takes_the_child_it_keeps_in_view checks the prop. ui.md, ui-channel.md and the
types say it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The user's decision: Discord's discord_status is no row of the Insert menu and has no place. It was in
menu_places.tsv as the mod's legacySwitch though no row drew it; the line goes, and tests/test_menu_ini_keys.py keeps
the retired key from the system mods' manifests' legacySwitch instead, so FROZEN is unchanged. game/mods/discord's
README.md says so beside its manifest (a manifest holds no note), as do system-mods.md and architecture.md, whose list
of the game's rows named Discord status.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
system/mods-tab (longshot-game's mods_tab: it reads the loader's tab, which lives there) draws the Mods tab with the
generic elements, mounted in a slot the Settings mod puts in its Mods tab's body. Its texts are today's: the old
drawing's (vk_menu.cpp draw_mods) and the loader's (detail, note, state, warning, the Changes line).

- The list: Reload the map, Restart now (Build, then start with the builder's channel), each mod a line (its name
  opens its page, a Toggle its switch), Across mods (Keybinds, Commands, HUD layout), Safe start (the builder's: said, nothing to press); a mod picked up from
  its page moves with Move up and Move down until Put down.
- A mod's page: its switch (Off for a mod running mods need asked once, naming them), its code's warning and Accept,
  Permissions, its settings as inputs, About (Version, State, Changes, Has, Code modules, Notes), Start again, Move in
  the list. Back (@back, focused first) goes up a page to the line that opened it.
- Its edits are the loader's by id, the reload of the map and Restart now (the menu's restart row). A code mod the confined game cannot accept has its warning (the loader's) and no Accept.
- Another page joins as a view::Extra (ModsTab::add_page): a line on the list, its own nodes and events. The
  modtool's Get mods is meant to be one.

Its lines reach past the area: the settings page keeps the focused one in view (the commit before). Not on it yet: a
folder's cheats, screen effects, a mod's own settings and debug pages, a command's arguments, a key rebound on the
Keybinds page, the permission prompt. mods_tab's tests and the Settings mod's
the_mods_tab_is_a_slot_the_mods_tab_mod_fills check it; settings-declarations.md and game/README.md say it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The Debug tab's Menu drawn by mods row (menu_mod_ui, off by default, a module of its own: gpu/vk/menu/mod_ui_menu.cpp,
its key in FROZEN) makes the menu draw the Settings system mod's tree as its body, the Mods tab mod's in its Mods tab,
instead of its own tabs and rows, so the two drawings can be compared in the game before the old one goes. Nothing of
the old drawing is removed; the restart and close posts are untouched.

The menu keeps its frame (the banner without its tab strip, opening and closing, the help box, the prompts) and gives
the tree its keys (menu_host_draw, menu_host_tick): Up, Down, Left, Right and Enter as on a mod's settings page, a
TextInput typed in the menu's field, the tab keys to the page's Tabs (modui_settings_tab), Back to its @no or @back
control (modui_settings_back), else the menu closes; the help box shows the focused control's help
(modui_settings_help). The page keeps the focused control in view. The row is in the hosted tree's Debug tab too.

settings-declarations.md, architecture.md, ui-channel.md and game/README.md say it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Main's #2452 (game/oot_heap_retry.c, game/oot_sites.c) came in beside this stack, which had moved that C to
game/crates/oot. Ported to the Rust: the five more CPU allocations of a material block's build (heap.objectAlloc,
heap.objectBuffer, heap.objectBufferOther, heap.blockBuffer, heap.blockObject, each reading the heaps' holder where
its function keeps it), the hand-over of the rest of a build to the parent that had room (HOS_GPU_ALLOC_REST) with
f_804566e0's two free-size reads given the build's own heap (heap.restOwn, heap.restEnd), the third count of
HOS_GPU_ALLOC_TEST_FAIL and HOS_GPU_ALLOC_TEST_FILL. The sites, their locations and switches.def's rows came with
main; the game-free tests are the module's own.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Main's #1841 (game/hos_wide_ui.c's title strips, tests/test_title_card_reveal.py and test_title_card_strips.py) came
in beside this stack, which had moved that C to the Widescreen system mod (game/mods/widescreen). Ported there, on the
pause background's own way of packing and drawing a picture in pieces: at ui.pictureConstants each of the area card's
eight frame quarters is packed three times, a strip each (the ornaments at their own size, the plain line between
drawn to reach the picture's side, every texture's and generated coordinate set's cut composed in so the reveal runs
on); the drawer keeps the first strip's pack and the other two are drawn before it at ui.pictureDraw. The plan names
the quarters (Rule::TitleFrameLeft, TitleFrameRight), leaves them unwidened across on a wider screen and publishes how
far the frame reaches (Shape::title_ex: the whole extra half width above 16:9, the HUD's move below, 0 at Middle 16:9).
A record or material the guards do not know is drawn as the game packed it.

On main the strips had lost their hooks in the builder's rewrite (no site or patch called hos_wide_title_prepare,
_draw or _reset); here they need none of their own. The two Python tests compiled the deleted C and go; the module's
Rust tests stand in for them (the strips' geometry and mirroring, short and long widths, the record's cut and the
generated coordinates meeting at the joins, the guards, the slots) and panes.rs's for the plan.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
api::system::tree_hash hashes through mods_stamp::tree_hash, which the mod tools' content hash uses too: one hash of a
folder's files for a system mod, a store entry and a repo's release.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
A crate for every mod tool in the builder: run(args, cx) is what the builder's mod command calls, with its context
(BuilderCx: the profile, the game input, the version folder, the cache, the output mode, the play path and the
confirmation window). The commands are stubs but format; a mod's shipped files and its content hash are shared; the
mod operations (ops) are defined once for the CLI and the builder's channel (modhook::serve).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
docs/dev/reference/mod-ops.md: every operation the builder's modtool answers (sources, browsing, the store and the
profile, trust), its arguments, result and errors; the three front ends (the builder's channel, mod serve, the
command line) on one dispatcher; what the game may not do.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
modtool runs the game's crates on host-sys's fake host (and oot's and game-sites'), and oxc_resolver turns on
serde_json's preserve_order. One cargo invocation unifies features, so clippy and cargo test over the whole workspace
would compile the game's real host paths out of the checks. ci.yml and mise.toml's rust task now check the workspace
without modtool, then modtool alone; tests/test_game_features.py fails if the game's own build (longshot-rs) ever
gets fake, preserve_order or modtool.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
A new crate low in the graph (the game's api and the builder's modtool both
depend on it; it depends on neither api nor script), and blobstore, the blob
layer under it, shared with the builder.

- blobstore (builder/crates/blobstore): files kept once by their SHA-256 at
  blobs/<h[..2]>/<h>, put through a temporary file beside them (hashed while
  written, flushed, checked against an expected hash, renamed with
  build_core::fsx), never changed, read with a size cap and re-hashed only on
  verify; listed and removed for a collection.
- mod-store: <cache>/mods/versions/<id>/<version>.json, one record per
  installed version (its source, its content hash, the trust hash, path ->
  size and blob for every file, installed and last used), written last and
  whole. Put from bytes, files or an opened .lsmod, refusing another content
  hash than the release's; remove, touch, keep; check_pin says what a pin
  lacks (no record, another hash, missing blobs) so modtool fetches it again.
  The collection removes versions no profile pins, keeping each mod's last
  used loose version for 14 days and versions the player keeps, then blobs
  no record names (never one written in the last hour).
- ModFiles: one mod's files read the same way over a record (RecordFiles), a
  folder (FolderFiles: a dev mod, a manual mod in the profile's mods/) or a
  package (PackageFiles: a manual .lsmod), every path checked by the
  archives' rules.

content gains check_file_name (the archive's name rules for one file's path)
and mods-stamp tree_hash_of_digests (the tree hash from each file's SHA-256,
for a store that hashed each file as it wrote it).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
`mod show <id>[@version]` says a version of the store (without a version,
the one installed last): its files with their sizes and blobs, its source,
content hash, install and last-use dates, blobs missing from a cleared
cache, and the mod's other versions; `--output json` gives the same.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
docs/dev/reference/mod-store.md: where sources' mods (the builder's cache)
and manual mods (the profile's mods/) are, the record's format with an
example, ModFiles and its three implementations, what a pin lacks, the
writes, the collection's rules, and what the game's sandbox must add.
mod-ops.md links it and gives store_gc's dry_run and result; the
builder's layout module lists <cache>/mods.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The code files a folder mod's acceptance is of (its sites.toml, and with exefs its ExeFS patches and code modules)
are read by api::loader::folder_code_files, which the loader's own code status now calls, and api::loader::is_code_file
says the same rule for a reader that has a mod's file list rather than a folder (the mod store's records, modtool's
walk). Longshot.exe mod's request_trust hashes the same files, so the hash it records is the one the loader compares.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
profile.rs: profile.json's "mods" (each {id, on} with a source's version and content hash, or a manual mod's
path in the profile's mods/; every other key kept as written, in its place), read strictly and written whole
(profile.json.new moved over); add, move and remove a pin, a new order with switches; trust.json beside it in the
loader's trust format, written in place through api::loader::trust; a mod's files (a manual one's folder or .lsmod,
a source one's from the store: a hook for the store crate), its manifest, content hash and code hash; every known
profile's source pins for the store's clean-up. The edit lock is one function, a minimal stand-in of #2286's
launcher_profile::edit_lock until that crate is here.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
A profile's mod's files are mod-store's: a source mod's release through its store record (the pin's version and
content hash checked with Store::check_pin; a release not held whole is not_found, to install again), a manual mod's
folder (its shipped files) or .lsmod in the profile's mods/ read in place. Its manifest, code files (by the loader's
rule, a store file read against its blob's hash) and content hash come from them, and resolve sees every release the
store holds. The source shown in the trust window is the store record's URL.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
modhook: Request (id, op, args and the cancel flag the builder sets), serve for the game's channel and perform for
every front end, a Task for the handlers (progress, profile_changed, check for cancel), unknown_op, bad_args and an
args cap; done ends every request. set_mods: a new order with switches, strict (an id not in the profile, twice, or
left out refused; only on set; granted and trust never touched), under the edit lock, profile_changed with
code_changed. request_trust: the builder's window with the mod's facts; on Accept the code hash and the required
unsafe grants written to trust.json as the loader reads them, after the files are read again under the lock; on
Decline nothing. resolve: the loader's own resolver over the store's and the profile's mods. mod serve: the same JSON
lines over stdin and stdout for a launcher, one request at a time, a pending cap (busy), cancel, a 1 MiB line cap.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
CURL, CURL_SAFE and downloader move from build-driver's runtimes.rs into build_core::curl, so modtool's mod
sources download with the same curl and the same options as the runtimes and the tools' store (no .curlrc, HTTPS
alone and on every redirect, a stalled download given up) without modtool depending on build-driver. runtimes.rs
re-exports them; nothing else changes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The source, browse and store ops of docs/dev/reference/mod-ops.md, one implementation for the game's channel, the
launcher and the command line (service.rs, through modhook::perform):

- net.rs, the one module that touches the network: HTTPS downloads with the system's curl (build_core::curl),
  capped in bytes, with progress and cancel; git's refs (ls-remote) and a shallow fetch of one commit with the git
  command (no prompt, no hooks, no links, https and ssh only). A FakeNet serves URLs and git trees in memory for
  the tests.
- repo.rs: longshot-repo.json v1 read strictly (unknown keys refused at every level, https URLs, content hashes,
  ids and versions as the manifest reader takes them) and its .sig, Ed25519 over the file's bytes in base64,
  verified with the key accepted when the repo was added (ed25519-dalek, verify_strict). A changed key is
  key_changed until source_add is sent again with accept_key. OUR_REPO is None: there is no key of ours yet.
- sources.rs: a source is a git URL (a repo with longshot-repo.json at its root, or a single mod with mod.json at its
  root or at ?path=/--path), an https longshot-repo.json, or an https .lsmod. The kind is found and shown;
  source_add adds only with yes. A single git mod's releases are its tags (v1.2.0, or the manifest's version at
  that commit), and with follow_branch its default branch's newest commit as a pre-release; their content hashes
  are computed here. An .lsmod is one release, a new one when its content changes. Kept per PC under the cache:
  <cache>/mods/sources.json in the player's order, each source's listing beside it.
- install/update fetch a release from git or its files (mirrors in turn), check our content hash before anything is
  kept (hash_mismatch otherwise), put it in mod-store and pin it in the profile (profile::edit, under the edit
  lock); ensure fetches a pinned version again by hash after the cache was cleared, and says the newest release when
  the source no longer has it. remove (all_profiles from the CLI), add_file (into the profile's own mods/),
  store_gc (mod-store's gc over every known profile's pins; also after an update).
- search (text, tags, sort, pages; one entry per id, the player's source order deciding, the clash listed),
  details (releases, readme, licences, vendored packages from vendor/vendor.json), installed and check_updates.
  Icons and screenshots are downloaded into <cache>/mods/media, PNG or JPEG only, capped in bytes and pixels
  (media.rs); the game is given local paths.
- import.rs: an emulator-layout mod (romfs/, exefs/, cheats/ and no mod.json) converted once into a manifest mod in
  the profile's mods/local~<slug>/, id local/<slug>, its mod.json made (exefs asked for when it has patches); its
  cheats are left out, since a manifest mod's are not run.
- The game may not add, remove or order sources, add a file, import, collect the store, read another profile or
  remove from all profiles, and installs only by id, configured source, version and sha256, all matching the
  source's listing; a URL a request names is never fetched.
- Commands: mod source add|list|remove|refresh|order, search, details, installed, install, update, remove, add,
  import, gc; --output json's result is the op's. error.rs carries an op's code (Error::Op) to the JSON document.

Tests on the fake network: each source kind, a repo's changed key refused then accepted, a bad signature, an unknown
field, a single mod's tags and followed branch, an .lsmod source's update, installs from git and from mirrored files
with a hash mismatch refused, update and remove, a clash between two sources and the order deciding, the game's
forged requests, a cleared cache fetched again, the command line in text and JSON, a file and emulator mods
imported.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
mod check [folder] [--types]: the mod as the game would take it, without
running it. The manifest by api's reader; lib/lint.js's rules ported
(lint.rs): permissions the source uses against those declared, read with
the game compiler's parser (scan.rs: oxc's module record and tokens, so a
comment or a string is never code), API modules, mod: imports against
dependencies, JSON imports and literal longshot/files paths by the files
service's own path rule, net origins, the game's own formats outside
romfs/, mod data's output anywhere in the folder, budget hints. Every
shipped module compiled by script::ts (JavaScript parsed), and linked from
the entry and the content module as script::modules resolves imports;
PNGs and glTF models by content's readers; sites.toml by the builder's
sites::modsites. --types writes the API types and runs TypeScript 7's
tsgo when installed (exit 77 when not). Findings are lines, and
{file, line?, col?, severity, code, text} in --output json's result,
which a failure now keeps too.

mod types: types/longshot.d.ts (schema-gen's, built in) and
types/longshot-env.d.ts (the mod's required features and settings).
mod init: mod.json and src/main.ts from the template, tsconfig.json for
tsgo, .gitignore, README, the types; no Node or npm.

api::services::files::path_ok and script::modules::content_module are
pub for the check; oxc_syntax is a workspace dependency (the module
record's import names).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
mod pack [folder] [--out FILE]: <owner>.<name>_<version>.lsmod of the
mod's shipped files, after the same checks as mod check (without types).
The zip is written here (zip.rs: deflate by miniz_oxide or stored, UTF-8
names, 1980-01-01 times, so the same files make the same bytes) and read
back by content::archive before it is written, so what the game would
refuse is never made. The result gives the file, its size and the mod's
content hash (hash::of_files).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
mod anim <file.gltf|.glb> [--out FILE] [--fps 30] [--loop] [--name NAME]:
the port of mod-tools' lib/assets.js (readGltf, sampleGltf, writeAnimFile)
byte for byte: BFRES 10 of FSKA, the curves only. The examples' puff.gltf
makes puff.anim.bfres again exactly. mod check now takes an .anim.bfres
outside romfs/ that mod anim makes again from the glTF beside it as the
author's own (lint.js's authoredAnim), and says to keep the glTF when it
cannot; the example check has no exception left. content's glTF GLB, data:
URI and %-escape readers are pub for it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
mod vendor [folder] [--condition NAME]: each npm import of the mod's scripts (src/, test/, tests/) is
resolved in the node_modules/ the author installed with oxc's resolver (exports with the conditions
import, module and default, then module and main), and only the files reached are copied into
vendor/<name>@<version>/, each package's own imports followed and rewritten to relative paths the
game's loader takes unchanged. The licence files and the TypeScript declarations beside each module
come along; vendor/longshot-vendor.json (shipped) records each package's name, version, licence,
content hash and files, and the specifier each import was, so a second run gives the same tree, takes
an update and removes a package no longer imported, and never touches a folder it did not make.

Refused: Node's built-ins, native addons (.node, binding.gyp), packages exported only for require,
and CommonJS that calls require(); CommonJS that requires nothing (module.exports, exports.x, UMD) is
made an ES module. An import TypeScript drops is left alone. Nothing of a package runs, npm is never
contacted, and nothing is written unless all of it can be done.

oxc_resolver 11.24.3 is new: from the same project as the compiler's oxc (its own release line, no
crate shared with oxc 0.157), and package.json's exports maps, their conditions and subpath patterns
done as Node and the bundlers do them, which a resolver of our own would have to match case by case.
It adds about 30 crates to the lock: simd-json (with halfbrown, value-trait, simdutf8, float-cmp,
ref-cast, ryu), dashmap (crossbeam-utils, lock_api, parking_lot_core, scopeguard, hashbrown 0.14 and
0.16, foldhash), tracing (tracing-core, tracing-attributes), json-strip-comments, once_cell, rustix
(errno, linux-raw-sys) on Linux and macOS, redox_syscall, and windows 0.62 (windows-core,
-collections, -future, -implement, -interface, -link, -numerics, -result, -strings, -threading) on
Windows. It turns on serde_json's preserve_order, but only in a build with modtool in it:
longshot-rs's own build keeps serde_json's default features (cargo tree -p longshot-rs). oxc_ast and
oxc_semantic are the compiler's own crates.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Cargo turns a feature on for every crate of one invocation: a workspace-wide check (cargo clippy --workspace, cargo test
--workspace) builds the game's crates with host-sys's fake through modtool, whose mod test runs on it. host_sys::FAKE
says which a build has; game_init aborts with a line on stderr when it is on, so a game never runs on no host. DESIGN.md
says to build the game and the builder in separate cargo invocations.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
build_driver::modhook's stubs give way to the modtool crate: run calls modtool::run, serve calls
modtool::modhook::serve (an untrusted caller), and hello lists modtool::ops::HOOK_OPS (every op but set_mods, the
builder's own). with_modtool makes modtool's context of the builder's: the same profile, game, version and cache,
--output json as JSON and every other mode as text, its play and confirmation handed to the builder's own; channel
events map progress (done/total as a fraction), done and profile_changed.

The storage budget's "mods" kind is the mod store's: its entries are the versions its own collection would let go
(no profile beside this program's pins them, the grace period over), checked again before each removal, a removal
taking the record and the collection after it the blobs no record names. read::manifest_mods adds the profile's
source mods with ExeFS code (modtool::profile::store_code_mods: through the store's records, their code files put
once in <cache>/mods/code/<hash>/, taken when on and accepted as they are now) to the manual ones game_files finds.

modtool's edit lock is launcher_profile's (it waits for another edit, and has its stale rule), and
profile::profiles_beside gives the profiles beside one without a context.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The game's own test runner (runner.js, longshot/testing) gains a fake mode, for Longshot.exe mod test: TestHooks gives a
fake game's JavaScript (its members of a test's game), its calls (native.fake), and the one test to run; the runner then
reports game.isReal false, does not wait for play, and resumes a test after each whole frame (QuickJsHost::tests_step)
rather than at game.frame. start_fake_tests takes the test files it is given. The seams under the services: Services::
set_removed_features (a build that lacks features), oot::actors::fake_update (the site actors.update as a fake game
reaches it, feature fake). testing-runtime.js regenerated.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Longshot.exe mod test [folder] [--filter TEXT] [--echo] runs test/, tests/ and src/**/*.test.ts with a game of their own
for each test: the mod in the game's own script engine over the API's own services, and the game under them faked
(testing_game): GameDataMgr's flags, Link and the actors laid out in the stand-in host's guest memory as oot reads them
(the list watched from the mod's start), the clock, the controller and keys, the camera's hooks, the renderer's side of
the UI with each applied batch mirrored to the test, the stores in memory. A test's game is runner.js's in its fake
mode, with fake.js's members (setup, UI readers and the player's side, input, camera, actors, flags, settings,
permissions, features, claims, stored data). --output json gives each test's name, file, ok, ms and error. Rust tests
over made-up mods; every example's tests run as an ignored test (83 of 208 pass: the fake game is not whole yet).

Example tests changed to the real services' texts (no assertion removed): ui-cases' cut-short flush (/Timeout/ to the
engine's interrupt text) and refused batch (no "Refused: " prefix); rupee-alarm's off-step setting (/step of 10/ to the
settings service's "not one of the setting's values").

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The site actors.write as a fake game plays it (oot::actors::fake_writes over game_sites::rules::with_published, feature
fake): each actor's update makes its published writes the fake game's way (life, a hit, place, rotation, shown) and notes
them for game.actorWrites; each fake actor has a character controller whose vtable names the game's methods. A checked
place is its placement's Bool64bitKey flag set (game.checkPlace). Neither is seen by the example tests yet: see the
report.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
An actor updates after the acquire phase in the game's frame, so a write published in a frame is made in that frame;
the fake game made it at the next frame's start, a frame late. A Rust test of a write made, and a diagnosis test that
runs one example with its log (MT_EXAMPLE, ignored).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
oot's scan treats an empty id taking one as the fake's fill, in fake builds only. item-tracker's reset test checks
its places after the first frame, as the game's watch takes its copy then.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The pouch is recorded at oot's game-call boundary (pouchCount and addOrRemove as fake functions over counts by name);
an add hits items.pouchAdd/pouchAdded through game_sites::chain::fake_hit, so oot's watch and the api's items service
run as in the game. A pickup is the game's update's: seen at the next poll. check-gift's tests check their places
after the first frame, as item-tracker's.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The content stage runs the mod's content module before its entry through the loader's services and the script
crate's content runtime, its outputs made by the content crate against the default fake RomFS (game.content). The
network plays the broker over host_sys::fake::net: a test's servers (game.net.server) are told after each frame what
the mods opened, sent and closed, and answer at the next frame's poll; an origin with no server cannot be resolved,
and a server on the player's own network is refused without net.lan, in the broker's words. runner.js tells the
fake game of each frame before the test resumes. echo-client's tests wait the frames the network takes, and expect
the broker's wording.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The fake renderer takes the lists the gfx service publishes (a WorldSink, the renderer drawing the world layer and
its models) and gives a test what it would draw: a box as its 12 edges, a circle as its segments, a billboard as its
text or quad. game.gfx.world.shapes is the service's own list of a mod's shapes (Services::world_shapes_of).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
setActor's body, velocity, lift and thrownVelocity: the actor's physics' main rigid body and its velocity, and its
liftable component's state and thrown velocity, where oot reads them; a body's velocity is written through the
fake actors.bodySetVelocity.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
saveGame, loadSlot, reload, deleteSlot and copySlot: the world keeps each slot's flags as the game's save does (a
load puts them back, the Bool64 container with them); the items' and longshot/game's watches hear the save request
and the save.load site, and the mods' stores hear the notes the game's file system sends (held until the mod has
started, as the game starts its mods before the player loads). seedStorage writes a store's file on the fake disk;
storedData(scope, slot) reads a slot's file. game.fresh({ strict }) starts the game again for the same mod, its disk
kept: save-tally and misbehaving use it in place of a second FakeGame. check-gift checks a place again through a
load of a save from before its check; its save and load are a frame apart. echo-client's long line comes from the
server: the broker stops the socket (1009).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Its update read its goal flags on the title screen too, where the game's flags still hold the last save's
(oot/src/state.rs: "the flags keep the last save's, which are not now's"), while storage.save there is empty
(storage.md: no playthrough on the title; api storage.rs Storage::frame empties the working save data when the title
is seen). game.update fires every frame, the title's included (api services/frame.rs), so the mod wrote firstDone
again on the title. It skips the title now.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
A mod's system/ dependencies run beside it, as the game runs the ones its build ships (from system_mods/ beside the
game, else this checkout's game/mods): started first with every permission they list, linked while switched off
(game.systemMod(name, { off: true })) so an optional import of one still resolves, their settings and logs reached
through game.systemMod(name). game.discord() is a fake Discord app at an IPC endpoint, played in Rust over the
network engine (the broker's "nothing listens there" when none): it answers the handshake with READY, each command,
each ping, and keeps what it was sent. discord-status uses it in place of system/discord's fake-discord.js, its frames
a tenth of a second (a whole second each way is longer than system/discord's handshake wait). turnOff() stops the mod
as the Mods tab does; longshot/time's gameStarted() is the fake game's fixed 1700000000. copySlot's comment cites the
launcher's slot copy.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
It depends on api alone, and mod test's fake renderer checks a mod's shader as the game does: one check, shared.
longshot-game's post sink calls api::spirv::check.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The fake renderer runs the gfx service's passes (Drawn: effects on): a mod's shader is checked by the renderer's own
check (api::spirv), and each pass reports what a test says (game.gfx.report), read back as the effect handle's info()
reads it. game.gfx.effects is the service's own list of a mod's effects (Services::effects_of: its shader's path, its
point, its params by name read from its block, each float's shortest decimal).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The game's Bool setter (flags.setBool) is a fake function that queues the value, made at the frame's end as the game
makes it at its next update; the fake game holds every container (Enum and UInt too), setFlag takes { kind }, and a
switch reads 0 or 1 as flags.get gives it. game.writes is the writes service's own trace of the mod's attempts. A test's
setters refuse a non-finite number before it becomes JSON. A restart reaps the old session's mod at once, so its stop
is not the new one's. misbehaving expects the real wording of the Timeout, has() and flags.has() faults.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The log's dropped lines are counted in the game's own log (api longshot.rs log_line, at the mod's next line after the
second), which game.hostLogs reads (the stand-in host's log). log's parts take anything (reference.md), so the lone
surrogate goes to a flag's name, an ArgumentError of script::bind::values. After the stop of 3 faults the game's
frames go on: the test checks the mod heard nothing (no new lines, no new faults). examples.md says so.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
game.damage plays the site rules.lifeHit: the hit goes through the published "rules.life" table (oot::rules::life),
for Link through his own life component (the life components' class, named "Player"), its source Link or another;
game.rules and game.rulesPublished read the published table. The queries' sites are in the fake build, and
game.answers(query) reads what the mods answered from its table. Link is a GameActor updated each frame he plays, as
in the game, so the list removes a gone actor at the next frame. A stopped mod is let go at once, as the loader stops
one. damage-tuner waits the frame its stop takes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
It depends on api alone (and lewton), and mod test's fake game decodes a mod's sounds as the game does: one decoder,
shared. longshot-game's hosts re-export it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The spawner's routines (oot::spawn, #68's) are played at oot's game-call boundary: a create request the game takes is
made into an actor at its next update, taken, placed and deleted; Link's update (oot::spawn::fake_link_update) runs each
frame he plays, with the play clock ticking; game.spawned and game.refuseSpawn. The rewards' drop site is played after
the placements' drop reader (game.dropFor, game.rewards). game.memory maps parts of a host's GameMemory. The stores see
the title screen where the game starts, so a new game's playthrough opens; a load ends in play, a slot with no save a
new playthrough in the map played before the title; a restart waits for the store writer and holds its save notes for
the new session. game.claims lists the claims held. octorok-ambush and custom-enemy wait the second a spawn may take
(the play clock's tick after the ask), the two long ambush tests with a timeout of 4200 frames; chest-swap and
save-tally wait the frame a stop or the title takes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The fake game decodes with the game's own Ogg decoder (api::services::ogg) and runs the mixer as the host's mixer
thread does: each frame the decoding thread waited for and a frame's samples mixed, so voices play on and end. The
mixer shows a mod's sounds and voices (Mixer::sounds_of, voices_of) and the service its placed voices
(Services::audio_of); game.audio's plays are the voices seen to start. The fake camera looks from (0, 1.6, 3) toward
(0, 1, 0) until a test sets it, as the fake game's always has, so a placed voice has its gain and side. The Ogg tests'
files move with the decoder.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A profile entry {"id", "version", "hash"} is read from the builder's mod store (HOS_MOD_STORE, set by the
builder's play) at a folder in no disk: api::store_disk::StoreDisk lays each pin's record over the files the game
reads (Store::check_pin, RecordFiles), and the RomFS layers serve the blobs themselves (Disk::host_path). A pin the
store lacks whole is said and left out. The sandbox reads the store's blobs/ and versions/ (Landlock, the
AppContainer). The loader takes a list sink, so with a channel the profile is the builder's to write.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
builder_link: one client owns the channel for the run (the host hands it the ends, bc_take), says hello and sends
the ops, matching answers by id and keeping progress and profile_changed (now with code_changed from build-driver).
It keeps the game's limits first: only the game's ops, no URL, install and update only of a release search or
details listed. The Mods tab's switches and order go as set_mods, a code warning accepted as request_trust, a
restart through the builder as restart_to_apply. mods_store is the Get mods page's model (list, install, update,
remove, trust, status, Restart to apply), its view to come on the mods' UI; without a channel it is read only.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
- request_trust takes permissions to grant (the Mods tab's permission page sends them with a channel). The game is
  untrusted: at most TRUST_PERMISSIONS_MAX names (every permission the schema has), each known (else bad_args) and
  declared by the mod, required or optional (else refused), checked before the window shows anything. Each grant
  is a fact of the window; only Accept writes it, an unsafe one into trust.json, a safe one into the entry's
  granted.
- HOS_MOD_STORE is LONGSHOT_MOD_STORE, with its switches.def row.
- The loader's watch leaves store pins out (they never change). The builder's profile_changed is a tab edit: the
  loader reads the profile again, takes the switches it changed (a live one at once) and offers the restart that
  loads a pin added, moved or taken out.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The loader takes each folder in LONGSHOT_DEV_MODS as a mod where it is: on with no list entry, in place of a mod of the same id, its script watched there for hot reload. The Linux sandbox and the Windows plan read the folders.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Moved from longshot-game's mod tool natives, which now call it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
mod run checks the mod and plays the profile with its folder linked in (dev mode). mod data lists the player's own game's names with the game's readers, marked with the game-data notice. mod publish makes the repo entry from a package or a git pin, and with --repo adds it to a static repo's signed longshot-repo.json; --new-key writes a key pair. pack's packing is shared; Net gains git_local.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The modtool stack was written on 563ca4e5, before this line's "the game's mods come only from its profile" gave the
loader its development mods (LoaderConfig::dev_mods, Row::dev) and its own list (list_path(), mods_dir()). Its copies
of the same go: find_dev_mods, its second Row::dev and DEV_MODS (its two tests, on the old /u/mods.json layout, with
them: the profile-only loader's own cover the same), and the Windows sandbox's second dev_mods list. On Linux the
modtool's dev_mod_dirs stays, the stricter of the two (never the home, the root or a system folder), in place of
dev_mods_read. find_pins and profile_changed read the profile's list through list_path() and ModsList::parse, and
find_pins runs with the profile's other mods; a source entry is find_pins' (the store read in place through
StoreDisk) when the builder's mod store is laid over the disk, find_sources' otherwise. The fake game's ServicesConfig names no save profile (save_profile, also this line's).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
A source mod was read two ways: in place through StoreDisk when LONGSHOT_MOD_STORE names the builder's store
(find_pins), else through the loader's ModStore, which the game filled with NoStore and so only ever left it out.
LoaderConfig::store, ModStore, NoStore, the unpacking into modcache/sources and the folder reader go; source.rs keeps
the entry kinds. Without the store there are no source mods, and the log says so in one line. The test of the old
path becomes one of that; mods.md and profiles.md say the one path.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Both platforms already hold development mods' folders (LONGSHOT_DEV_MODS) to the narrow rule: Linux through
dev_mod_dirs' sbx_folder_narrow, Windows through the plan's never list and its refusal of a drive's root, which every
grant goes through. Now each sandbox's test says it for these folders.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
assets/modding/packages/mod-tools (the Node tools and their fake game) and the game binary's
`longshot mod` (longshot-game's modtool.rs over script::modtool, which ran mod-tools' JavaScript in
QuickJS) go: every command is the builder's `mod` now. The game's exe keeps --version and --help,
and `longshot mod` says to use Longshot.exe mod. With them go tests/test_mod_tools.py, the SDK's
sdk/tools/ copy (an older build's is still taken out), the release sources' mod-tools paths,
schema-gen's schema.json, fake services check and JavaScript copies, the LONGSHOT_SDK switch,
and script's QuickJS realm and loader helpers only the tool used.

The test API's declarations, longshot/testing (Tests, FakeGame, Assert, the setup API), are
game/modapi/testing/longshot-testing.d.ts now, written by mod types into types/. mod init's
tsconfig.json and .gitignore are the template's files. mod format leaves types/ and vendor/ alone.
Messages that named longshot-mod shaders say to compile with glslang (docs/modding/gfx.md).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Each example drops its package.json (and first-mod its mise.toml); its tsconfig.json and
.gitignore are mod init's; its tests import their types from longshot/testing; its README says
Longshot.exe mod test, check --types and pack. The new-mod template's README, AGENTS.md and test
say the same.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
tools.md is every Longshot.exe mod command with its options and --output json result (run linking
the folder in, in dev mode, the game's own reload, the game's exit code; data's sources, refusal
inside a mod and notice; publish's package release or --git pin, --repo/--key/--url/--name, key
formats, --new-key, no version twice, the entry printed without --repo). testing.md: mod test on
the game's engine over a Rust fake game, longshot/testing, the strict frames() rule, the game's
test mode. publishing.md (new): sources (repos, single mods, git or release files), the
longshot-repo.json v1 format and its signature, key acceptance, the content hash, source order and
clashes, vendored npm packages. packages.md: mod vendor. The tutorial and every other guide and
dev reference name Longshot.exe mod instead of longshot-mod and the game's longshot mod.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Builds carry no sdk/ any more. The guides, agents.md, api-schema.md, the tutorial and the template's
README and AGENTS.md point at assets/modding/ on the forge instead.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
host/control.c passes mods and mod_* requests to game_control_mods (a new mods hook of HosControlGame) and replies
with its answer's fields, or its {code, why} refusal as the bridge's error. The game had the commands
(longshot-game::control_mods) but nothing routed them. The protocol's mods section documents them.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
A control bridge client (bridge.rs) and the commands that talk to the running game: status, log [--follow],
reload, restart, eval, shot, press, stick, sequence, teleport, wait, raw, stop. mod run turns the bridge on at the
profile's own address (and --eval sets HOS_CONTROL_EVAL); mod dev is mod run. mod test --game plays the profile in
the game's test mode and reads its reports, --live runs the tests in the running game. where and doctor report the
builder's paths and the bridge; allow trusts a mod through request_trust and the builder's window. A negative number
is a plain argument (stick L -1 0).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Longshot.exe mod shaders [folder] [--check] compiles every .glsl in a mod's folder (outside dot folders,
node_modules and dist) into a .glsl.spv beside it, as the old Node command did with glslangValidator -V -g
-S frag --target-env vulkan1.0, but with shaderc (glslang inside the builder, built from source and linked
statically), so no author installs glslang. Each module keeps its source and is checked with the game's own
api::spirv::check; a shader error names its file and line. --check compares each .spv with a fresh compile.

naga was tried first: its GLSL reader takes no combined sampler2D, the effect template's picture.

The docs, the API's generated docs and the game's messages now say Longshot.exe mod shaders instead of the
hand-run glslang command.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
shaderc-sys builds glslang from source with CMake, and link-cplusplus links the C++ runtime as a shared library,
which a player's system may lack. scripts/longshot_builder.py now turns cc's C++ library off and links libstdc++.a
(Linux) or llvm-mingw's libc++.a and libc++abi.a (Windows) in; on Linux with the sysroot, C and C++ are compiled by
the bundle's clang against the sysroot (clang++ is a link to it), so glibc 2.35 and its GCC 13 libstdc++ agree.
It stops early, saying so, without cmake (or ninja on a Windows host). CI gets CMake and Ninja from
scripts/ci_cmake.sh: ci_rust.sh runs it, and the build-windows and vulkan-dlss jobs call it before
longshot_builder.py; build-linux's apt list has them. The developer docs say so.

sepia-photo's effects/sepia.glsl.spv is compiled again by Longshot.exe mod shaders, and a test keeps every
example's .spv what mod shaders --check asks. tests/test_gfx_effects.py passes on the new module unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The old tools' types --game, ported: longshot-components.d.ts and .json (each
actor component type's paths and their BYML types, through the Work/ files
they name, and ContentComponents augmented with each reference) and
longshot-ainb-schema.txt (content's SchemaBuilder over the game's trees),
written beside mod.json from the game's files where the builder has them
(mod data's romfs and zstd dictionaries; data.rs's open_romfs and decoder are
now the crate's). The files never ship (files::LEFT_OUT). Tested on a made-up
romfs.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The old tools wrote a library's published declarations with tsc. Here each
module's declarations are oxc's isolated declarations (oxc_isolated_declarations
0.157, from the same tag as the compiler's oxc, added to the workspace's patch),
read from the AST and printed with oxc_codegen: each name of mod.json's
exports followed through export-from and export-star, its return type made
Promise<Awaited<R>>, its JSDoc and the package imports its types need kept.
What oxc cannot say of an export from its text (an unwritten parameter or
return type) is a problem naming the place, and nothing is written.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The old tools' skeleton command, ported: Model/<model>.bfres.zs read where the
builder has the game's files (mod data's romfs and dictionaries), its bones
read by content's model reader (a new bfres::skeleton: each bone's name,
parent and rest pose, a quaternion or Euler angles by its flags), written as a
glTF of nodes (Euler angles made quaternions in the old order, quaternions
made unit with anim.rs's normalize). --out must end in .skeleton.gltf, the
name files.rs never packs. content's hand-made model file is offered to other
crates' tests behind a testkit feature.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The old tools ran nx2/mod_sites_port.py, which went with the old builder. Now
in Rust on the builder's crates: the table read by sites::modsites'
parse_mod_table, the --to and --from images by the lift's image reader, and
each site looked for in main's code step for step as modsites' find_one does
(the signature once, or the place builds names among several, then the
guards). find_one is not made public: the sites crate is in the whole lift's
key (EDITS_SOURCES), so any change there makes every player's next build lift
again. A longer signature is offered from --from's words; --write puts each
found site's function into its inline builds (or a new builds line after its
signature). Tested on made-up images.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
check makes the declarations again as mod types --lib does and compares them
with mod.d.ts (its first comment lines, which name the tool, aside): a stale
one, or one that cannot be made again, is a problem telling the author to run
mod types --lib.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
When mod types --game wrote longshot-components.json and
longshot-ainb-schema.txt in the mod's folder, the fake content stage checks
each item's and actor's components and params, and each tree's new nodes,
against them, as the old JS fake game's checkComponents and checkTreeAdds did;
what it finds is in game.content's problems. Docs say so (and that check
finds a stale mod.d.ts).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The examples all pass on the fake game now (photo-mode's dispose included, fixed in #2434's line), so
every_example_passes_its_tests is no longer ignored.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
manifest::native reads a built-in Rust mod's mod.json (included at compile time, parsed once) into the Manifest
the loader takes: the system mods' reader checks it first, then what is a built-in's alone: "rust", its crate,
and a setting's "native" object (store, legacyId, presetExempt, shownIf, defaultText, hints) and button type.
Every reader of files refuses "rust" (a mod's code is a script unless the build compiled it in): a game-free
test and a manifest vector. manifest.md lists description and rust.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
A built-in mod's sites may be defined in its own game/mods/<name>/sites.toml: sites::Tables::definition_files finds
them in the mods' folders as a player's mod's are found, the core's table first, then the mods' by folder name, and
owned_definitions refuses a site defined twice. game-sites' build.rs reads the same files for the sites' forms, and
a lift's key covers them. A repository test checks that every site has one owner and that the sites are the one
table's before the split (site_owners.txt), sites at one instruction in the same order. hooks.md says where a
built-in mod's sites go.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
game/mods/fov/mod.json, in the player's format, declares the mod (its id, version, description, hooks.unsafe, the
camera.lens site it handles) and its Field of view setting with its place on the Gameplay tab; the crate reads it at
compile time ("rust": "sysmod-fov") in place of the Manifest it built in code, and a test checks that it parses
and that its setting's key is the code's. camera.lens stays the core's site: its core callback serves the mods'
cameras too (oot::sysmods::fov keeps the shared lens). test_oot_fov.py reads the manifest; test_menu_i18n.py takes
a built-in Rust mod's texts from its mod.json.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
game/mods/text/mod.json declares the mod and its two settings with their places, read by the crate at compile time;
its site text.letterStep moves from game/sites/sites.toml into the mod's own sites.toml, and the site's callback
(the letter step, the panes' kept sizes) from oot::sysmods::text into the mod's src/hooks.rs: oot keeps the layout
it reads. A test checks the manifest and that its keys are the code's; site_owners.txt names the new owner.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
game/mods/area-names/mod.json declares the mod (state.read, ui.hud) and its Area name banner setting with its place
on the Gameplay tab; the crate reads it at compile time in place of the Manifest and the setting it built in code.
A test checks that it parses and that its setting's key is the code's. The mod has no site of its own.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
game/mods/colour-vision/mod.json declares the mod and its Colour vision correction setting in the Graphics tab's
Accessibility section; the crate reads it at compile time in place of the Manifest and the setting it built in
code. Its tests check that it parses, that its key is the code's, and that the row's choices are the modes the pass
takes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
game/mods/crt/mod.json declares the mod and its CRT filter and CRT lines settings (their hints, the lines shown
only with a filter) in the Graphics tab's Screen section; the crate reads it at compile time in place of the Manifest
and the settings it built in code. Its tests check that it parses and that its keys and choices are the code's.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
game/mods/heart-containers/mod.json declares the mod (state.read, romfs.read; no setting, no site); the crate reads it at
compile time in place of the Manifest it built in code, and a test checks that it parses.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
game/mods/voice-language/mod.json declares the mod; the crate reads it at compile time in place of the Manifest it
built in code, and a test checks that it parses. Its site, options.voiceWritten, stays the core's: an outcome site,
which only the engine sets at start (oot::sysmods::voice, over the knob the mod publishes).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
game/mods/settings/mod.json declares the mod (ui.settings; no setting, no site); the crate reads it at compile time in
place of the Manifest it built in code, and a test checks that it parses. Its UI code is unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
game/mods/damage/mod.json declares the mod, the two sites it handles and its Damage taken setting (after Heart
protection on the Debug tab, shown while Debug tools are on); the crate reads it at compile time in place of the
Manifest and the setting it built in code, and its tests check the manifest against the code's keys and choices.
player.lifeHit and player.lifeWrite stay the core's sites: heart protection's core callback is on them too.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
game/mods/cheats/mod.json declares the mod and its Debug tab rows (Debug tools, kept in the options file; the cheat
rows, kept for the run, shown while Debug tools is on, each with its old HOS_OPT_CHEAT_* number); the crate reads it
at compile time in place of the Manifest and the rows it built in code, and puts the run's rows back from it. A
setting kept on an options line may have a - in its key (no-clip_flight), as the menu wrote it. Its tests check
the manifest against the code's keys and Movement speed's percents.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
game/mods/skip-title/mod.json declares the mod, the two button-wait sites it handles and its Skip title screen and
Skip opening settings with their places; the crate reads it at compile time in place of the Manifest and the
settings it built in code. menu.buttonWait and menu.buttonWaitNoDecideAnim move into the mod's own sites.toml, and
their callbacks' game access (the wait's screen, the newest save) from oot::sysmods::skip_title into the mod's
src/hooks.rs. test_dev_ab.py reads the built-in mods' settings from their mod.json.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
game/mods/shadows/mod.json declares the mod, the three shadow sites it handles and its Shadow resolution (the
quality presets' row) and Steady sun shadows settings in the Graphics tab's Detail section; the crate reads it at
compile time in place of the Manifest and the settings it built in code. The three sites move into the mod's own
sites.toml, and their callbacks' game access (the cascade size, the steady fit) from oot::sysmods::shadows into the
mod's src/hooks.rs.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
game/mods/sprint-walk/mod.json declares the mod, the two sprint sites it handles and its Walk mode, Walk speed and
Sprint settings on the Controls tab; the crate reads it at compile time in place of the Manifest and the settings it
built in code, and its tests check the manifest against the code's keys, old numbers and Walk speed's range.
sprint.link and sprint.stance move into the mod's own sites.toml, and their game access (Link's state, the
stillness, the stance) from oot::sysmods::sprint into the mod's src/hooks.rs. test_sprint.py reads the manifest.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
game/mods/widescreen/mod.json declares the mod, the 23 wide.* and ui.* sites its handlers use and its settings in
the Graphics tab's Screen section (Ultrawide menus, HUD layout, the Custom placement's nine rows, Reset HUD
placement); the crate reads it at compile time in place of the Manifest and the settings it built in code, and its
tests check the manifest against the code's keys, ranges, old numbers and sites. The sites move into the mod's own
sites.toml. Its callbacks were the mod's already (src/sites.rs); oot::sysmods::widescreen stays, shared with
longshot-game's picture and present tick.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
system-mods.md has the built-in Rust mods' layout (mod.json in the player's format with its rust entry and a
setting's native object, sites.toml, src/hooks.rs) as an example for authors, and notes that mod check does not yet
check a built-in mod (a hook to add: the system mods' reader for a script one, api::manifest::native for a Rust
one). game/DESIGN.md, game/README.md, api-schema.md, switches.md and oot::sysmods's docs say where a built-in
mod's sites and callbacks are now.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
a_removed_handlers_guard_passes_after_the_grace counted its stand-in reader in after remove_retired, so another
test's retire::reclaim on its own thread could let the removal go in between and the guard passed too early (seen
once in a full workspace run). The reader is counted in first, as a hook that loaded the old chain is: no other
reclaim can let it go while it is in.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The list was written with a stand-in moved over it. A confined game's sandbox names profile.json by its rule, so the
move was refused (and one that went through would lose the rule): a switch logged "switched on" and never reached
the file, so Restart to apply came back with the mod off. It is written in place now, as the trust file is.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The builder wrote profile.json with a file moved over it (launcher_profile::Profile::write, modtool's Profile::write):
a confined game's grant names the file itself, so after the Mods tab's set_mods the game could no longer read the
profile (EACCES). Both write it in place now, profile.json.bak holding the text while it is written (inode test).
The game waits for the builder's answer to its last set_mods before it asks restart_to_apply, so a switch is in the
profile before the game ends. The Mods tab's batches take two id ranges in turn: a batch's reset no longer meets a
create of an id it removed (longshot/ui refused "node 1 was removed by this batch").

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The Insert menu's settings (the renderer's declarations, rows, texts, set/press/text and bindings) and the Mods tab's
data and edits (the list with each mod's page, cheats, keybinds, commands, HUD roots, the permission prompt; setMods,
edit, restartToApply) as two schema modules behind the system-only permissions settings.host and mods.host, so the
menu can be drawn by TypeScript system mods while Rust keeps the data. state() is { channel, why, ops }; errors
SettingsHostError and ModsHostError { code, text }; events only to holders; every API Promise now carries its call
number. longshot-game gives the tab's host part (mods_host.rs).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
system/menu (game/mods/menu) draws the menu's tabs, pages and rows from longshot/settings-host; system/mods-tab
(game/mods/mods-tab) draws the Mods tab in its slot from longshot/mods-host, now with the cheats, command arguments,
keybind rebinding and the permission prompt. The native Mods tab mod goes. The Menu drawn by mods row hosts
system/menu's page, or the engine's fallback (no mod: a UI tree of the engine's own, shown only while a menu mod does not run; resume, resolution, turn mods off, quit); a hosted Keybind waits for
its key and an @close control closes the menu. Parity tests draw the C++ menu's every row (menu_rows.json, written by
tests/test_settings_decls.py) through Longshot.exe mod test, which now reads a system mod's folder as the game does.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The renderer declares its page-5 question (Restart Needed, Keep changes? with the Output resolution preview's
countdown) as a QUESTION, @ask: its state the text and seconds, its texts the title and answers, a set the answer.
The TS menu draws it over everything while it waits, so draw_ask is not needed with the menu drawn by mods. Each
confirm dialog and a binding's question get the old drawing's title and yes (Enable Debug Tools?, Reset bindings?,
Binding already in use / Rebind) through renderer_setting_text's MKWVK_TEXT_* values.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
onReset (Delete: an input's default asked for), a Slider's own value texts (options) and commitOnRelease, a multiline
TextInput, a pad Keybind (the next gamepad button, by its Switch name), Compare (a before and after split with a
divider the player drags: ReShade's comparison, and the screen effects' later), ModPage (another mod's settings page
in place: the Mods tab's page of a mod that draws its own), and a Window's dock and passInput (a strip over the live
game, for the tune bar). The menu hosts a page's mouse, Delete and pad Keybinds. The TS menu and Mods tab use them.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The renderer answers @fx:<mod id> with a mod's screen effects as it runs them (point, the mod's and the player's
switches, state, GPU time, why), read-only but for the player's switch; longshot/mods-host gives them as each page's
effects and sets the switch with edit("effect"). The TS Mods tab lists them as toggles, and shows a mod's own
settings page in place with ModPage. Read-only on gfx: vk_effects' fx_effects_of and fx_player_set only.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The old menu's tune mode as the TS menu's own: each slider row has Tune, an @close: control (pressed, then the menu
closes), which mounts the row's slider in a window docked at the screen's bottom with passInput, so the game keeps
its input and its picture while the value changes; Done takes it down. The menu mod asks ui.window for it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The new props took the props' table to 70, past the 64 bits a node's has held: it is 128 now. The hosted question
(page 5) gives the page no wheel, as the old drawing's question did (tests/test_rumble_menu.py). Fixed after the
full check.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Fixed after the full check: longshot-game's ui test says the snapshot's new version, and the menu's question test
gives the confirm dialog's words before declaring the rows (they are read with the declarations).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
options.voiceWritten moves from game/sites/sites.toml into game/mods/voice-language/sites.toml, and its callback (the
game's question asked, the saved option followed) from oot::sysmods::voice into the mod's src/hooks.rs. The site is an
outcome site, so it takes no handler at run time: the mod lists its engine callback (hooks::ENGINE_CALLBACKS) and
longshot-game installs it at start right after the core's (NATIVE_ENGINE), whether the mod runs or not. The knob it
read (oot::sysmods::knobs, one knob) becomes the mod's own switch, FOLLOW, on while the mod runs and back off through
the journal. oot::engine::MOD_OUTCOME_SITES names the outcome sites a mod's crate answers; oot's coverage test and a
new longshot-game test keep the two lists the same. site_owners.txt names the new owner; the site list is unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
camera.lens is not moved into game/mods/fov: the core's engine callback there serves the public camera API (oot::camera's
fov_hook and near_hook, under api::services::camera) whether the Field of view mod runs or not, and the mod's handler
only hands its row down the chain. The site table's comment, the mod's docs and system-mods.md (a new table of the sites
that stay the core's, and why) say so. No site moves; the shared lens logic stays in oot::sysmods::fov.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
player.lifeHit and player.lifeWrite are not moved into game/mods/damage: the core's engine callbacks there are heart
protection (oot::debug::hearts_protected, set by the Cheats mod's row, an input movie or the test runs' switch), which
must work whether Damage taken runs or not. Owned by the damage mod, the sites would make Cheats depend on Damage taken,
and heart protection would go with it when it is off; kept core, each mod uses the site it needs and neither knows the
other. The site table's comment, the mod's docs and system-mods.md's table of core sites say so. No site moves.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
oot::sysmods::cheats (the cheat file's name, the regions' bases, checked reads and writes) and its layout
(layout::sysmods::cheats::HEAP_BASE) had no caller left: the Cheats mod (game/mods/cheats) has its own build id and
file name (cheats::BuildId), regions (memory::Region) and memory (system_mod's ApiMemory, over the API's memory
service). The mod has no hook site, so nothing else moves.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
oot::sysmods::discord (what host/discord_rpc.c read from the game: the map, the place, the age, life and rupees) and its
layout (layout::sysmods::discord's flag hashes) had no caller left: the Discord status is the discord script system mod
(game/mods/discord), which reads the game through the API (state, player, content.read.mapName). The layout test's
assertion on its Life hash goes with it. oot::sysmods::area_names loses its last caller in oot.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
oot::sysmods::hearts (the containers' placement ids read from the player's RomFS, their flags, the pieces' sum) had the
Heart containers mod as its one caller: it moves into game/mods/heart-containers/src/containers.rs. The mod has no hook
site, so no sites.toml; it now names host-sys (the RomFS and the log) itself.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
oot::sysmods::area_names (each map's place in English, the suffixes' rules) had the Area names mod as its one caller
once the Rust Discord status was removed: it moves into game/mods/area-names/src/places.rs. The Discord script mod
names the place through the API (content.read.mapName), not this table. The mod has no hook site, so no sites.toml.
oot::sysmods now holds only what the core shares with the mods: Field of view's lens, Damage taken's life writes,
the widescreen picture and the event and switch helpers.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
api::manifest::schema builds the draft 2020-12 schema of mod.json from the
reader's own limits, permission table and key names: every field described in
manifest.md's wording, enums for permissions, runtimes, scopes and places,
patterns for ids, versions, origins, paths and dependencies, the rules between
fields (runtime needs api, content needs content.add, local multiplayer, raw
game data never with a way off the PC). Built-in-only fields (rust, a setting's
native and place, legacyOption, ipc, system) are in it, described as such.

Longshot.exe mod schema prints it; mod init and mod types write
types/mod.schema.json and name the served copy in mod.json's "$schema"
(https://longshot.magicbean.dev/schemas/mod.schema.json, planned: the site has
no route yet). Every built-in mod's and example's mod.json names it. Tests: the
schema is a valid 2020-12 schema; every built-in, example and template manifest
passes it; the shared vectors agree with the parser, but for a named list of
rules a schema cannot say. jsonschema 0.29.1 (no default features) is api's
dev-dependency.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The schema is made by game/crates/api (manifest/schema.rs); `cargo run -q -p api
--example mod_schema` writes the copy in website/public/schemas/, and the test
the_website_serves_this_schema fails while it differs. public/_headers serves it as
application/schema+json, cached an hour, to any origin; npm run check checks the
built site has it at its $id.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
longshot/gfx's gfx.outputEffect (extension 1 of the built-in mods' audit): a mod's effect of 1 to 8 fragment
passes at present, after the game's HUD, frame generation's made frames and the window's scaling, before
Longshot's overlays. Each pass draws an image of a size and format the mod chooses ({ scale } or
{ lines, maxScale }, rgba16f or rgba8; the last draws the output) and samples up to four inputs (the pass
before's, the picture, an earlier pass's), nearest or linear, clamped or black outside. The renderer fills
the params named SourceSize, OutputSize, FinalViewportSize (libretro's names), hdr, paperWhite and peakNits.
On the SDR picture the passes see it as the display shows it; with hdr: true, while the game presents HDR,
linear nits (Rec. 2020): the HDR pass grades into an RGBA16F image first (hdr_encode.comp's HDR_NITS),
the effects run over it, and hdr_pq.comp encodes their image. An effect without hdr runs before the
expansion, and is bypassed (unsupported, saying so) while the game presents its own HDR.

The template's check (fx_spirv.h, api::spirv) takes up to four samplers and reports them (inputs);
gfx.effect's keep the picture alone. Built-in mods reach the same code through ModApi::gfx over the
shaders they carry. The fake game lists an output effect's passes, images, inputs and fills, and
EffectInfo.reason says why one is not drawn here. game.h's GamePass carries an output effect's passes
(GAME_PASS_OUTPUT_FX at GAME_PASS_PRESENT, GameOutStep): MKWVK_API_VERSION 58. The modding API's version
stays 0.1 (bumped when the release is cut: api-schema.md). Example: assets/modding/examples/scanlines.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Extension 2 of the built-in mods' audit: each present tells the output effects whether the game drew its
3D world (vk_draw.cpp's world_drawn_at in the last 3 presents, the fact the ultrawide menu sides use, kept
in wide_sides_tick's world_now for frame generation's display thread too). A pass reads it as the param
worldDrawn the renderer fills (1 or 0), and an effect's when ("always", "world", "noWorld") draws it only
in frames with or without the world: in the others it costs nothing and is waiting. GamePass.when and
GAME_FILL_WORLD_DRAWN: MKWVK_API_VERSION 59. The fake game lists each output effect's when.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Extension 3 of the built-in mods' audit: gfx.renderer() answers { tier, hdr, nativeHdr, menuOpen }: the
memory and quality tier the Quality preset or Auto picked (1 to 5, null before it is known), whether the
renderer presents HDR10, whether that is the game's own HDR picture (Native HDR, where an output effect
without hdr is bypassed), and whether the Insert menu is open. The renderer answers one new option,
HOS_OPT_RENDER_STATE (its bits), beside HOS_OPT_MEMORY_TIER, read through the post sink when a mod asks;
built-in mods reach it through ModApi::gfx. The fake game's game.gfx.setRenderer sets what it answers.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The CRT system mod draws the filter itself through the public longshot/gfx (ModApi::gfx, the code a script
mod's gfx.outputEffect reaches): game/mods/crt/effects/downsample.glsl into a raster of the mod's size
({ lines: 240/480/720, maxScale: 0.5 }, RGBA8), then lottes.glsl, hyllian.glsl or zfast.glsl at the
output's size, sampled nearest (zfast linear) with a black edge. The four are the renderer's compute
adapters ported to fragment passes with the same math (the pixel centre is gl_FragCoord, SourceSize and
OutputSize the renderer's params, style a float param; the box's loops counted, 32 texels each way, the same
sums in the same order), compiled beside them by Longshot.exe mod shaders and carried in the mod's code.
The effect takes the SDR picture only, so the renderer runs it before an HDR expansion and bypasses it on
Native HDR as before; the mod reads gfx.renderer() each frame and sets the filter row's hints to the
"Bypassed: ... Native HDR" line (ModSettings::set_hints, a native choice row's hints changed at run time).
crt_filter and crt_lines keep their keys. It stays a Rust mod: a script mod's settings have no
options-file line or Insert-menu place.

Gone from the renderer: crt_policy.h, the four crt_*.comp and their headers, vk_framegen.cpp's CRT pass,
the CRT decoding and hint in menu/game_rows.cpp, GAME_PASS_CRT and PostKind::Crt, scripts/shaders.py's
crt set. tests/test_crt_policy.py checks the output effects' lines size is the old raster for every output
size, test_crt_shaders.py the fragment ports against the pinned upstream math and their .spv's sources,
test_upscale_independent.py the scaler's routing into the output effects, test_gfx_effects.py the
renderer's taking of an output effect's passes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The colour-vision system mod recolours the picture itself through the public longshot/gfx (ModApi::gfx):
one pass, game/mods/colour-vision/effects/correct.glsl, the renderer's colour_vision.glsl functions word
for word, at present after the CRT filter (order 10 after its -10) and before Longshot's overlays. It
takes nits (hdr: true): on the SDR picture it decodes the display's colours, corrects them in Rec. 709 and
encodes them again, as the present's pass did; while the game presents HDR it corrects the light in nits
(Rec. 2020, up to 10,000 nits) over the HDR pass's nits image before PQ, as hdr_encode.comp did, Expanded
and Native alike. Its mode is a param, set in place when the row changes; colour_vision keeps its key.

The Insert menu's palette correction stays the renderer's (it is drawn after every output effect): it
reads the mod's colour_vision setting (menu_colour_vision_mode) while the mod's effect runs
(fx_output_ran_of). Gone: vk_colour_vision.cpp/.h, colour_vision.frag and .glsl, the correction fused into
hdr_encode.comp (its push constants keep their 48 bytes), the present's colour-vision route, the pass
decoding in menu/game_rows.cpp, GAME_PASS_COLOUR_VISION, PostKind::ColourVision, the system mods' fixed
passes (ModApi::post_pass_*) and GamePass.params: MKWVK_API_VERSION 60. game/DESIGN.md's post-process
interface says what stays the engine's and why: present and capture routing (through the output effects
generically), the HDR pass's nits stage, the menu's palette, the Native HDR bypass of SDR-only effects.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
tests/test_output_fx_parity.py, game-free on a Vulkan device (run_vulkan_fixtures.py runs it on lavapipe):
the renderer's old passes, kept as fixtures (tests/fixtures/output_fx_parity: crt_*.comp, colour_vision.frag
and hdr_encode.comp with its fused correction), and the mods' shipped shaders with fx.vert, hdr_encode.comp's
HDR_NITS variant and hdr_pq.comp, each recorded as the renderer records it (record_crt's compute passes and
images; fx_output_run's fragment passes, images, samplers and fills; framegen_hdr's nits stage) over the same
synthetic pictures. Every CRT filter at each lines setting at 720p and 1080p, a larger and a smaller picture
(the raster compared too); each colour vision mode on the SDR picture (same size and scaled), in Expanded
HDR at 100% and 150% contrast, and in Native HDR. One 8-bit step or one 10-bit PQ code at most.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Effect.setSplit(share | null): an output effect's last pass is drawn right of a line at that share of the
width, and left of it the picture the effect was given (fx_copy.frag, in the same rendering, a scissor
each side), so the frame itself shows before and after with nothing captured and no pass more.
longshot/ui's Compare drives it as a divider alone (ui.md, gfx.md). GamePass.split: MKWVK_API_VERSION 61.
The fake game lists each output effect's split; the scanlines example has a Before and after setting
and its test. ReShade has no such hook yet.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
A release's risk is the riskiest of its permissions by the schema's tiers (low, medium, high, unsafe; a permission
the schema does not have counts as unsafe), with unsafe and replaces_game_files (a release that ships romfs/: a
repo says so, a single mod's is read from its files). search gives the newest release's tier for each mod and leaves
mods of the unsafe tier out unless asked (--unsafe, the op's "unsafe": true); details gives it for the mod and for
each release.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
A release lists its dependencies as its mod.json writes them (a repo's release says so, a single mod's are read
from its manifest; checked by the manifest's own reader), and details gives them for each release. install plans
first: the release asked for, then every required dependency (and theirs) the profile does not have at a version it
takes, each the newest release its source lists that it takes; the plan installs what is needed before what needs
it, and a dependency no source can give stops the install before anything is fetched. --plan (the op's "plan":
true) only answers {plan: [{id, version, sha256, source, needed_by}], missing: [{id, needs, range, why}]}.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
A release may give its API's minor number (api_minor, from a single mod's mod.json "api"); it fits this game when
its major is this game's and its minor no newer, or for a 0.x API the same: the loader's own rule. details gives
fits (true, false, or null when a 0.x release gives no minor) for the mod and each release, with the game's
game_api; search gives it for each mod's newest release and --fits (the op's "fits": true) keeps only those that
fit.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
A repo's release may give its licence (licence, or license as mod.json spells it; a single mod's is its manifest's)
and withdrawn: a release its source took back is never the newest, an update or a dependency, and is installed only
when named by its version. A mod may give categories beside its tags. search shows each mod's newest release's
licence and its categories; details gives each release's licence and withdrawn, the mod's categories, and the newest
release's licence among its licences.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
mod pin <id> <version> installs the mod at that release when the profile has another, then pins it there
("pinned": true in its profile.json entry); updates, check_updates and installed's update offer then leave it,
and an update named for it is refused saying so. mod unpin <id> lets it move again. installed gives "pinned":
the version it is pinned at, or null. Neither op is the game's.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
tags (the op and mod tags [--source URL]) counts, over every mod the sources offer (each once, as search has it), its
tags and its categories, folded to lower case: {tags: [{name, mods}], categories: [{name, mods}]}, by name. The game
may ask it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
source_refresh (the op; mod source refresh [url]) fetches the named source again, or every source when none is
named, and answers the sources list (only the one refreshed when named). A failed fetch is kept in that source's
error, its listing before it kept, as sources --refresh does. Not the game's: it has sources' refresh.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
mod add replaced a mod of the profile with the same id without a word and kept what the player had granted it.
Now a replace is refused without --replace (the op's "replace": true), and one whose files are not the same
(another content hash) drops the mod's grants: its profile.json entry's granted and its trust.json acceptance and
unsafe grants, so the player is asked again. --plan ("plan": true) only answers what it would add: {id, version,
sha256, replaces, same_content, code, permissions}. The answer says {id, version, sha256, replaced,
grants_dropped, code, restart}.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
A .zip is read as a package is (content::archive: no entry out of its folder, no link or special file, the size and
ratio caps). mod add takes a zip of a mod's folder (its one top folder holding mod.json is the mod) and unpacks it
into the profile's mods/<owner>~<name>/; mod import unpacks a zip of emulator mods into a scratch folder of the
cache and converts what it holds, a zip that is one mod named by the zip's own name. The launcher's own unpacker is
no longer needed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
An emulator's own layout keeps a mod at contents/<title id>/<name>/romfs: import now looks up to four folders below
the one given for folders in the emulators' layout (a mod's own folders, a folder with mod.json, dot folders and
links not looked in), each named by its own folder.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
import's --name (the op's "name") gives the one mod the path holds its name; its id is made from it (local/<slug>)
as from a folder's name. A path holding more than one mod with --name is bad_args.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
add's answer and each of import's mods carry code (true when it brings code: hook sites or ExeFS patches, which the
next start builds into the game) and restart (a running game must restart for it), as install's code does.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The launcher's ModsEmulators.Scan, in the builder: Eden and its forks (one emulator where they share a data
folder), yuzu, suyu, sudachi, citron, torzu and Ryujinx, by their data folders on Linux and Windows; each one's
mods for this game's title id (yuzu's family: load/ or its qt-config.ini's load_directory, and sdmc's atmosphere
contents; Ryujinx: mods/contents and sdcard's), with the emulator's switch (DisabledAddOns, Ryujinx's mods.json;
null when not known) and whether it holds code (exefs). Read only, no link followed. Answers {emulators: [{name,
data_folder, mod_folders, problem}], mods: [{emulator, name, folder, source, enabled, code}], looked}.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Removing a mod of the profile's own folder (an add or an import) now deletes its folder or file in mods/ as well,
its read-only bits cleared first as the launcher's DeleteTree does; only a name directly in the profile's mods/ is
ever deleted, and no link is followed. --keep-files (the op's "keep_files": true) keeps them. The answer gives
"deleted": the paths deleted.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
enable/disable (the ops; mod enable <id>, mod disable <id>) set a mod's "on" in profile.json in place, under the
profile's edit lock, the rest of the file as it was. The answer: {id, on, changed, code, restart} (code: a code
mod's switch changed, which the next start builds in). Not the game's: its Mods tab has its own switch.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
tools.md's sources table gains tags, pin/unpin, enable/disable, emulators, source refresh [url], search's --unsafe
and --fits, install --plan, add's --plan/--replace and .zip, import's .zip, depth and --name, remove's --keep-files,
and a list of the JSON results a launcher reads (stable: keys only added). mod-ops.md's ops table, Summary and
Details follow.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
fix(modtool): check_built_in is the built-in mods' test's, so it is built for tests alone
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, build (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 25s
CI / Workflow lint (actionlint) (pull_request) Successful in 43s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 44s
Third-party parts / As their notes say (pull_request) Successful in 58s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 1m1s
CI / What the change needs (pull_request) Successful in 1m3s
PR description / Description follows the template (pull_request_target) Successful in 1m20s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Has been cancelled
CI / longshot-builder end to end (synthetic game) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
3509a8a9b6
Clippy's -D warnings refused it as never used outside the test that checks every built-in mod.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
style(modtool): rustfmt over repo.rs
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, build (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 28s
PR description / Description follows the template (pull_request_target) Has been cancelled
CI / What the change needs (pull_request) Has been cancelled
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Has been cancelled
CI / longshot-builder end to end (synthetic game) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Lint (pre-commit, ShellCheck) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Workflow lint (actionlint) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
Guide screenshots / Guide images and local UI source review (pull_request) Has been cancelled
Third-party parts / As their notes say (pull_request) Has been cancelled
b7c686a368
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
request_trust's confirmed (mod allow <id> --yes --sha256 HASH [--permissions a,b]) records trust with no window,
exactly as the window's Accept does: the mod's code accepted, the unsafe tier it requires granted, and only
permissions its mod.json declares (bad_args for one the schema lacks, refused for one it does not declare). It
needs the content hash the player was shown and refuses with content_changed when the files are not it now; the
game can never send it (refused). The answer is the op's {accepted}.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
order (the op; mod order <id> --up|--down|--to N) moves one mod in profile.json, in place under the profile's edit
lock, every other key kept. System mods stay first and in their place (system_mod for one; nothing moves before
them); a mod that is not there is not_found; one of up, down, to (bad_args otherwise). The answer: {id, from, to,
order} (places from 1, order the ids as they now are). Not the game's: its Mods tab moves them.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
remove of a path (mods/<name>, a full path in the profile's mods/, or a bare name) that is not an installed id
deletes that folder or file, by the rules of a mod of one's own: only a name directly in mods/, no link followed,
read-only bits cleared. One that profile.json names is refused (remove it by its id); one that is not there is
not_found. The answer: {id: null, path, profiles: [], deleted}.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Each mod gains romfs_files and romfs_bytes, patches (its ExeFS .ips and .pchtxt) and modules (its other ExeFS files),
cheats (its cheat files), and already: the profile's mods/ folder with the same files, by the launcher's
fingerprint (the paths and sizes under romfs/, exefs/, cheats/, and the bytes of the code and cheat files up to
1 MiB), or null. Links are never followed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The launcher no longer checks these itself, so the builder does, for mod enable/disable and the channel's
set_mods alike (one check, switch_allowed): a required system mod cannot be switched off (system_required); a
system mod this build does not have cannot be switched (system_not_loaded); a mod the profile does not have is
not_found; and a mod whose code waits for the player's acceptance of its warning, or whose required unsafe
permissions are not granted, cannot be switched on (needs_trust). Switching off is otherwise always allowed, and a
switch to what it already is changes nothing. A refused set_mods writes nothing.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
docs(modtool): order, allow --yes, removing a stray folder, emulators' details and the switch rules' codes
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, build (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 25s
PR description / Description follows the template (pull_request_target) Successful in 1m12s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 57s
CI / Workflow lint (actionlint) (pull_request) Successful in 45s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 41s
CI / What the change needs (pull_request) Successful in 1m15s
Third-party parts / As their notes say (pull_request) Successful in 54s
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Failing after 2m0s
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Failing after 5m50s
CI / Website build and checks (pull_request) Failing after 38s
CI / longshot-builder end to end (synthetic game) (pull_request) Successful in 3m1s
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Failing after 6m38s
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Failing after 6m55s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
34995d71ef
tools.md's table and its launcher results, and mod-ops.md's ops and error codes, follow the last launcher gaps.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The CRT, colour-vision and scanlines shaders compiled again by the builder's own glslang (shaderc, pinned by
Cargo.lock), so mod shaders --check matches them; the scanlines example names mod.json's schema as the others do.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
test_gfx_effects refuses a sampler past bindings 0 to 3 rather than any second one (an output effect's pass may
sample four); test_vulkan_fixtures_ci's summary expects one passed fixture more.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Colour vision's HDR parity failed with no clue where: mode-0 cases now separate the nits stage's round trip (one
code, or Native's codes kept exactly) from the correction, and a failing case prints its first differing pixels.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
Colour vision's HDR parity failed by up to 191 PQ codes: its correction takes small differences of large nits,
which RGBA16F lost in the dark channels of saturated colours (with no correction, the nits round trip matched).
One pass cannot avoid the image: its nits are the HDR pass's (the expansion, the contrast grade, Native's decode),
which an effect is given, not redoes. So, generically: an output effect's nitsFormat "rgba32f" makes the nits it is
given (hdr_encode.comp's HDR_NITS32) and its last pass's image full floats, allocated only while such an effect
runs; a pass's own image may be "rgba32f" too. On a small or integrated GPU (device_policy.h's low-VRAM rule,
small_vram_textures) they stay half floats, said once in the log. GamePass.hdr 2 and GAME_OUT_RGBA32F:
MKWVK_API_VERSION 62. The colour-vision mod asks for full floats; the parity test runs them so.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PPtvLKUijhrMa4pue
The same generic split as Effect.setSplit, for the player's ReShade preset: left of the line the picture without
it, right of it the preset's. No pass more: ReShade's last copy back (a blit, its ping images' format not the
picture's) covers only the right part. The game side sets it through rx_option_set(HOS_OPT_RESHADE_SPLIT = 3996,
ten-thousandths of the width, -1 none: reshade::set_split); the last mod to set it holds it, and its stop clears it.
The fake game keeps the line (game.gfx.reshadeSplit); ModGfx::set_reshade_split for Rust mods.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
chore(gfx): the generated API files for nitsFormat and setReShadeSplit, and fmt
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, build (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 27s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 51s
CI / Workflow lint (actionlint) (pull_request) Successful in 55s
PR description / Description follows the template (pull_request_target) Successful in 1m4s
Third-party parts / As their notes say (pull_request) Successful in 1m4s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 1m7s
CI / What the change needs (pull_request) Successful in 1m33s
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Failing after 2m48s
CI / Website build and checks (pull_request) Failing after 41s
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Failing after 2m47s
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Failing after 6m11s
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Failing after 7m35s
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Successful in 33s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Successful in 2m52s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Has been cancelled
CI / longshot-builder end to end (synthetic game) (pull_request) Has been cancelled
7f9f027e71
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The feature `runtime` (on by default) is the whole API. Without it, api is
json, manifest, settings::decl and mods::{Enabled, Manifest}, and its
bindings are their permissions' part alone (schema::emit::rust_permissions,
$OUT_DIR/permissions.rs), with serde_json and thiserror as its only
dependencies. A build script can then check a built-in mod's mod.json with
the game's own reader (api::manifest::native) without compiling the game's
crates for the build: longshot-game's registry of native mods, next.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
longshot-game's build.rs walks game/mods/*/: each folder with a Cargo.toml
is a built-in Rust mod (crate sysmod-<name>). Its mod.json is read by the
game's own reader (api without its runtime feature, a build-dependency), so a
bad one fails the build with the mod's name and the reader's error. The
generated registry (src/registry.rs) holds, for each, its folder's name, the
mod.json embedded, that text parsed once into a &'static Manifest, and its
constructor; and NATIVE_ENGINE, each crate's hooks::ENGINE_CALLBACKS. The
hand-kept NATIVE_MODS and NATIVE_ENGINE lists are gone.

No mod is made to read its manifest: the loader (its scan, its settings'
declarations, the sites a mod's handlers may use), the Insert menu's start-up
rows, the places test and the input movies' old option numbers read the
registry's. The constructor runs only when the loader starts the mod; a mod
that needs its manifest has cx.manifest() (the services keep it from the
start). Mod::manifest() is gone from the trait.

Each crate loses its MANIFEST, LazyLock, include_str, expect and manifest()
block and its parse test: its lib.rs keeps its code and one line,
api::native_mod!(<the mod>, keys: [..]), which is its pub fn new() -> impl
Mod, checks at compile time that each setting key its code reads is in its
mod.json (api::manifest::native::declares), and gives its tests manifest().
One registry test checks every built-in mod's manifest; tests/registry.rs
holds the workspace's members, its dependencies and longshot-game's to the
folders, and checks that longshot-game names a mod's crate only for its named
bridges to the host, never its constructor.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The registry finds a built-in Rust mod by its folder's Cargo.toml, so its
mod.json names no code. The key goes from every built-in mod.json, from the
built-in reader (api::manifest::native) and from mod.json's schema (and the
website's copy); the readers of files no longer refuse it, so its shared test
vector goes too. modtool's check_built_in and the Python tests tell a Rust
mod by its Cargo.toml. The docs say so.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The help box read the focused row before the page was drawn, after the overlay had cleared the settings focus: it is
read after the page now. A text row with no text shows None, as the old menu; Tune and Done have a width of their own,
so the slider gives up the room instead.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The 6.4 ms frame was the menu's first read of the declarations at the game's start, which waits for the upscalers' start-up
probe: the menu now reads only while it is open. Open, a row whose state did not change keeps its object and the page's
ask and open functions stay the same, so its line is not drawn again (and asks the renderer no texts). The fake renderer
counts its reads (game.menu.reads), and a test holds both: no read while closed, no line drawn again with no change.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
longshot/ui's memo(component, isEqual?) draws a component again only when its props changed by their parts (or as
isEqual says): the menu's lines use it instead of their own bookkeeping, and ui-cases' memo case tests it. The
declarations are read on a thread of their own: decls answers ready: false at once until they are, changed fires once
they are, and the menu shows Loading meanwhile (the fake renderer's hold tests it), so no system mod waits on the
renderer's lock or its list's first build.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The fake renderer's declarations are read in decls itself unless held, as the tests expect; the memo test was put in
the wrong place in reconciler.test.ts; schema-gen's files for decls' ready.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
test(menu): the renderer's texts given before the page is drawn
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, build (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 26s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 48s
CI / Workflow lint (actionlint) (pull_request) Successful in 49s
Third-party parts / As their notes say (pull_request) Successful in 57s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 1m1s
PR description / Description follows the template (pull_request_target) Successful in 1m10s
CI / What the change needs (pull_request) Successful in 1m14s
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Failing after 3m23s
CI / Website build and checks (pull_request) Failing after 36s
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Failing after 2m29s
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Failing after 6m24s
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Failing after 7m51s
CI / longshot-builder end to end (synthetic game) (pull_request) Successful in 2m44s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
c20a220fce
A value's text is read when its row is drawn (memo): the test gave them after the first drawing.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The play and update paths check a game's patches against the hook sites (build-driver's clashes::refuse) through
the same Tables::load as the lift: a site defined in game/mods/<name>/sites.toml alone is read and placed, and a
location naming a site nothing defines still stops. (A builder older than the mods' own tables stopped on
menu.buttonWait this way.)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
game-sites' build.rs and sites::Tables::host give each built-in mod's site that is not a data rule (and has no line)
a flag and a slot from the mod's own definition, under the same identifier, so the lifted code names the same two
symbols. Text speed and size's text.letterStep loses its HOS_SITE_ENGINE line: the mod puts its handler on it by
name at start. A test checks every built-in mod site has its slot and text.letterStep has no line.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
oot::layout::sysmods::text moves to game/mods/text/src/layout.rs (only this mod reads it). Comments that cited the
gone host/oot_text_step.c, oot_text_size.c and nn_vi.c's text_scale, gameplay.cpp's game/menu/rows.c and
vk_api.h's option 5 now say what is there.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Timed, ignored benches for extension 4's choice (in-place handlers on worker data sites): text.letterStep's
dispatcher alone, the text mod's native handler and a prototype handler language (option A) in
game/mods/text/tests/hit_cost.rs; QuickJS-ng calls of a small handler with its marshalling, bare and through the
mod runtime's budgeted call (option B) in script's runtime tests.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
fix(api): mod.json's schema renders the same whichever crates are built with api
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, build (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 20s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 32s
CI / Workflow lint (actionlint) (pull_request) Successful in 33s
PR description / Description follows the template (pull_request_target) Successful in 43s
Third-party parts / As their notes say (pull_request) Successful in 38s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 43s
CI / What the change needs (pull_request) Successful in 58s
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Failing after 2m12s
CI / Website build and checks (pull_request) Failing after 41s
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Failing after 2m27s
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Failing after 5m26s
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Failing after 6m1s
CI / longshot-builder end to end (synthetic game) (pull_request) Successful in 2m59s
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Successful in 1m0s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Successful in 15m15s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Successful in 21m37s
a7229b13f8
The schema's objects kept their keys in serde_json's map order: sorted when
nothing in the build turns on serde_json's preserve_order, insertion order
when something does, as a workspace-wide build does. So text() depended on
the crates built together, and the website's copy (written sorted, by
`cargo run -p api --example mod_schema`) failed the_website_serves_this_schema
inside run_all's test_lifter while passing under `cargo test -p api`.

text() now sorts every object's keys before it writes (Value::sort_all_objects),
so the file is the same under either feature set. A test renders the schema
built in reverse key order and checks it is the same text, and that the top
level's properties are sorted in the file.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
A release's longshot-builder now carries liblongshot_rs.a for its own
platform the way it carries its pack: longshot-builder's build.rs embeds
the file LONGSHOT_GAME_RUST names (compressed with ruzstd), beside
LONGSHOT_SOURCES. scripts/longshot_builder.py build --sources builds the
library from the same tree first, with the pinned Rust, and from-source
does the same for the builder it makes. The library says its target: the
program's own, or LONGSHOT_GAME_RUST_TARGET's (a developer's test of
another platform's library, as a cross build of the Windows game).

A build of the tree the program carries links that library (build-driver
gives build-compile a rust::Carried for that tree alone, written to the
work folder's rust-carried/ when it changed); any other build (a
checkout, --root, another platform, a builder that carries none) builds
the tree's own Rust with cargo, as before.

Gone: longshot-rs/prebuilt/<platform>/ in the pack, its sources.key and
the key compare in build-compile's rust.rs (source_key, READ_TOO),
`longshot-builder dev rust-key`, and the release step that made them
(longshot_builder.py game-rust in build-linux.yml and build-windows.yml).
The Linux dry run still checks the program links the carried library;
the Windows one, run by the Linux builder over the unpacked pack, can't
see it, so the Windows program's own first start under Wine must say it
carries it (`sources`: "the game's Rust: carried for windows-x64").

Tests: the carried library is linked for the carried tree and its
platform, cargo builds any other (a stand-in cargo); the carried
library is written for the carried tree alone, again only when it
changed; the dry run's checks with and without --root.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
A pure move, nothing in the files changed: assets/modding/docs/ is
docs/modding/, assets/modding/examples/ is docs/modding/examples/, and
assets/modding/templates/new-mod/ is docs/modding/template/ (beside
the examples, not among them: every examples walker would take its
{{id}} placeholders for a mod).
None of them is shipped by a build, so assets/ keeps only what one does.
The paths that point at them follow in the next commits.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
After the move: the links of every doc, README and example (relative
ones recomputed for each file's new depth), mod init's include_str!s of
its template (docs/modding/template/), modtool's examples walkers (mod
check's, mod test's every-example test, the examples' shaders and their
.spv freshness), the manifest test's folders (the template now under
none of them twice), schema-gen's outputs and what its emitters write
(reference.md, permissions.md, the guide, the d.ts's and the mod.json
schema's doc links, the C and Rust comments), the doc-anchor test (one
docs/ root now; the old place refused), api-schema.md's layout, and the
gfx tests' example paths. The website and the release's tree read none
of these folders.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
assets/modding/packages/api/ (longshot.d.ts and a private package.json
whose version schema-gen checked) is gone, and with it assets/modding/:
api's build.rs writes the declarations into $OUT_DIR from the schema
(schema::emit::dts), beside the Rust bindings, and api::bindings::DTS
holds them; modtool's mod types writes that text into a mod's types/.
schema-gen no longer writes or checks the file, nor the package's
version (paths::OUT_DTS, PACKAGES, emit::check_packages). The docs say
where the declarations come from now, and the generated reference says
"included in the API's longshot.d.ts" for @longshot/api.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
refactor(mods): system mods are read from game/mods alone
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 25s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 50s
CI / Workflow lint (actionlint) (pull_request) Successful in 52s
Third-party parts / As their notes say (pull_request) Successful in 1m0s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 1m5s
PR description / Title and description (pull_request_target) Successful in 1m11s
CI / What the change needs (pull_request) Successful in 1m26s
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Failing after 2m56s
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Failing after 1m36s
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Failing after 5m7s
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Failing after 2m20s
CI / Website build and checks (pull_request) Failing after 39s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Successful in 6m55s
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Successful in 1m40s
CI / longshot-builder end to end (synthetic game) (pull_request) Successful in 19m26s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Successful in 15m20s
eb59967d64
The schema crate also looked in assets/modding/system/ for script system
mods, a folder they moved out of: the mod API has not shipped, so no
build needs the old place. paths::SYSTEM_MOD_DIRS is SYSTEM_MOD_DIR,
game/mods; the system mods' table and the declarations' list read that
folder alone (no name hidden by another place's), and the generated
table's first lines name it alone.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Since the modding docs moved to docs/modding/, the examples and the mod template `mod init` writes
(docs/modding/examples/, docs/modding/template/) counted as docs: no --tested-in-game asked for a change to them, a
switch their code adds unseen, the Docs box suggested for them. They are mods, code a game runs: MOD_CODE is in
GAME_PATHS, and is_code() says what counts as code for the switches and the tests' reads; their .md files are docs still.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The hosted page's help box had an empty title ("", not none) and the focused control's help alone: a row with no help
text drew an empty box, and no row was named in it as the menu's own rows are. The box's title is now the focused
control's name (its label, its title, or a Button's words: modui_settings_title), then its help and the hint; with none
of them, as on a tab's strip, the box is not drawn.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The renderer's layout took the room of a row too wide back from every child without a width of its own, in proportion:
a Slider, which takes the whole room it is given, and the Tune Button beside it both shrank, and the Button showed
"T...". The menu's fixed width={96} did not help: 96 virtual px is less than the word and the Button's padding. The
inputs that fill their room (Toggle, Choice, Slider, TextInput, Keybind) now give it up first, down to kInputMinW, and
only then does the rest give up its share. The menu's Tune and Done lose their fixed width.

tests/test_modui_row.py lays out that line with the real layout (gpu/vk/modui_layout.cpp) at the menu column's widths;
it fails before this change. The fake game's tests passed because the fake game lays nothing out.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The row's key stays autosave: (a saved key does not change); its label, which the TS menu and the engine's both show, is
"Autosave" now. The golden row lists, the debug tools' order test and the player docs follow.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The TS menu's tabs were the window style's boxed buttons, at the page's left, and its first focusable control: the focus
started on the Graphics title and stayed on it while Q and E chose other tabs (the stale ring of the in-game shots), as
nothing moved it. A Tabs on a settings page the menu shows (any mod's: drawn by modui_draw_settings) is now the menu's own
tab bar: its titles centred, the shown one light on the dark inset with the gold line, the tab keys' caps (Q and E, L and
R with a controller) at its ends. The tab keys and a click choose a tab; the arrow keys never stop on a title, the first
focus is the first control they reach, and a tab change lets go of a focus left on the bar, so the new tab's first
control has it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
At the TS menu's first opening its script spent 3.0 ms in settingsHost.decls (5.3 ms in the frame, over the 2 ms a
script is warned at): the answer read off the script's thread was written as JSON on the script's thread, then read back
to be checked, then parsed by the script. It is written where it is read now, and decls hands over that text. And
Json::from_value, which every service's JSON answer goes through, checks the value itself instead of writing it and
reading it back. The menu starts the read at its start, so its first opening takes the answer ready.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The loader built the Mods tab's rows again at every frame the Insert menu was open, and stateChanged, fired for each new
snapshot, had system/mods-tab read modsHost.tab and draw the tab again at every frame (2.1 to 3.2 ms of its script a
frame, warned over and over; 4.4 ms the first time) on whatever tab the menu showed. The UI service now tells when a
mod's slot fills were all left out of the last snapshot though their owner has a UI (ui_slot_hidden: the menu on another
tab than the Mods tab); mods.host's step neither asks the loader for fresh rows nor fires stateChanged then, and fires it
only when the snapshot's content moved, not for each snapshot the loader builds. The tab's data is built when the Mods
tab is first shown, no longer in the frame the menu opens with its declarations' read. When it cannot be told (no
snapshot drawn, the owner with no UI: the fake game's tests) it is read as before. A screen effect's GPU ms on a mod's
page is the one read when the tab last moved.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Colour vision's HDR fallback could not be told from the log: on a small or integrated GPU (RX_VK_TEST_VRAM_MB=4096 makes
one) an effect that asks for full-float nits gets half floats, and only a line said once for all of them told it. The
line logged as each output effect is made now names its nits: "HDR nits in rgba32f", "HDR nits in rgba16f (rgba32f
asked: a small or integrated GPU)", "HDR nits in rgba16f", or "SDR only".

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
In the game the TS menu's tab strip, now the menu's tab bar, sat at the top of the page column, too narrow for its seven
titles: Debug was cut off past E (l4mf-1's shots). The page's first Tabs now has its strip on the menu's banner, where the
menu's own tabs are and which the hosted menu left empty (modui_settings_tabs_away, modui_draw_settings_tab_bar), and the
layout keeps no room for it in the page (Inputs.strip_away). A Tabs drawn in a page (a mod's own settings page) fits its
titles to its room, its padding and then its letters smaller, before it cuts one.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
l4mf-1: modtool's menu test ("closed, the menu reads nothing a frame") failed on the declarations' read started at
the menu's start; the read is the menu's first opening's again, and costs that opening 1.2 ms now (3.0 before), its
answer written off the script's thread. And the stateChanged condition wrapped as cargo fmt wants it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The allowance at the start (the policy's small_vram_textures, the HDR nits
fallback and the rest) and vram_usage's in play now count no device-local
heap for more than RX_VK_TEST_VRAM_MB makes it. Before, the test switch
lowered the VRAM but not the allowance, so a 24 GB card at 4096 still read
21 GB allowed and never took the small card's path.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
menu_mod_ui is on by default, so F1 (or Settings) opens the TS menu with no
option set. Off brings back the C++ drawing until that drawing is deleted.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
A setting's "native" object is gone: its fields are the setting's own and any mod's, read by the one reader
(manifest::setting::read): store ("options": kept in longshot_options.ini under its id, which may hold a -;
"run": for the run alone; in place of scope), place (its row in the Insert menu), presetExempt, shownIf (one of
the mod's own settings, or <mod id>:<id>), hints (a line an option) and defaultText. A built-in Rust mod's
settings are made SettingDecls from the same SettingSpecs (settings::decl::decl_of); a script mod's are declared
into the settings service at its start and leave at its stop, so they are kept where their store says and their
rows with a place join the menu's, told to the mod by settings.changed. A mod whose options key another mod's
setting holds, or (a player's mod) one of the renderer's own rows, does not start (Settings::refused).

What only a system mod may have: a "button", and legacyOption and legacyId until input movies name settings by
key (the clean break removes both).

New: settings.setHints(id, hints | null), a choice's hints in place of its declaration's (the CRT filter's
"bypassed" lines), and the fake game's menuRow(id), optionsLine(key) and setOptionsLine(key, text) (its longshot_options.ini). The schema, the shared vectors, settings.md, system-mods.md
and DESIGN.md say the same; the built-in mods' mod.json files are flattened, their keys unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Both were Rust only because a script mod's settings had no options-file line or Insert-menu place; with one setting
format they are script system mods over the public API alone: each an output effect of longshot/gfx made from its
settings (src/crt.ts, src/correct.ts: the same passes, sizes, formats, inputs, params, order and nits format the Rust
mods gave), the shaders in effects/ unchanged, the settings in mod.json with their keys (crt_filter, crt_lines,
colour_vision), "store": "options" and their places. The CRT filter's "bypassed while the game presents Native HDR"
hints go through settings.setHints. A refused effect after a change is logged and tried again at the next change.

Their tests run on the fake game (Longshot.exe mod test; modtool's TypeScript system mods test runs them): each
filter and raster, each mode, the rows' places, the options lines read and written, the hints, turning off. The
pixels are test_output_fx_parity.py's (the same .spv files). The crates sysmod-crt and sysmod-colour-vision are gone
from the workspace, the registry finds the folders as script system mods.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
When a mod stopped (turned off, faulted, its start failed), Services::ui_gone took its UI away, but the test's view
(fake.js's Ui, made of the batches the game applied) kept the last tree: game.ui.hud() still showed what a stopped mod
had drawn. Each stop now hands the view a host op, "gone", which takes the mod's trees and mounts down; it is not one of
the mod's commits (game.ui.commits and lastBatch leave it out).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The banner of the place's name was Rust only for its options-file line and its Insert-menu row. Now a script system mod:
the names' table and rules (src/places.ts, the Rust places.rs case for case, the C's 95-byte key included), when it
shows, fades and goes (src/banner.ts: a new map in play, 3 s whole, 1 s fading; loads and the title screen take it
down, the title screen forgets the map), and a HUD root at the top centre holding a Canvas (src/main.tsx), drawn as the
Rust mod's ops drew it. area_name_banner keeps its key, store and place.

Its tests (Longshot.exe mod test; modtool's TypeScript system mods test runs them) step the banner alone and through
the fake game's maps, check what it draws, its row and its options line. The crate sysmod-area-names is gone.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
game/DESIGN.md says the rule and gives each mod that stays Rust its reason and what would move it: shadows' fit (in
place on worker sites, until the site runtime measures close enough), sprint-walk (a synchronous pad filter and worker
sites), widescreen's per-pane UI (game function calls, wrapped hooks, a per-present tick), voice-language (it answers
an outcome site) and cheats (immediate memory writes in its VM's order, raw HID, cheat files). The others wait for
the hooks work. system-mods.md lists the CRT filter, Colour vision and Area names among the script system mods.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The format's reader (table.rs, with its tests), the signatures and the host's list move from the lifter's sites
crate into site-table, which needs only toml: game-sites' build.rs can then read the tables with the lifter's own
reader instead of a second one of its own. It is a game crate, so a player's tree (which carries game/, not builder/)
has it, and the game library's source key (game/crates) holds it on both sides. sites re-exports every name it had,
so its users are unchanged; the made-up tables of the reader's tests are site-table's fixtures (feature fixtures),
for sites' tests too. The lift's EDITS_SOURCES hashes site-table's sources as well, each file by its crate's name,
and key_crates.rs says why it is not in the lifter's own key.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Format 3, read by site-table for every owner: the core's game/sites/sites.toml, each built-in mod's
game/mods/<name>/sites.toml and a player's unsafe mod's sites.toml. A row is the site: its definition, what
finds it in any build (signature, signature_offset, guards, offset), and an entry for each supported build,
builds.<id> = { fn = "f_...", ... }, keyed by the build id's first 8 or more hex digits, holding where it is
there and what of the rest differs (an offset, an anchor, a vslot's slot, or the arguments in other registers:
the same names and types, checked). Long entries are a [site.builds.<id>] table of the row. The anchor key in
becomes within (in is no key now). hot = true marks the sites known to be reached many times a frame (the UI's
per-pane sites, anim.loopStep*, actors.update, heap.*, barrier.*): metadata only, to be confirmed by a hit-count
run. game/sites/<build>/locations.toml is gone: every site's entry moved into its owner's row (the mods' into
their own files), and the named locations are [[location]] tables of the core's file with builds entries too.

For each site the builder uses its entry for the build (its signature checked there), else its signature alone
(sites::find_unlocated), else: a built-in mod's required site leaves that mod out with why (logged, never a
stop), an optional site is not placed, and a required core site makes the build unsupported when no core site
names it and stops it when one does. The HOS_SITE_OUTCOME check reads every owner's rows, so a mod left out
does not trip it. A player's mod reads the same rows with the mods' rules on top (its entries hold fn, offset,
signature, signature_offset, guards and args; old format 1 tables are refused saying so), its list rows carry
the build's registers. game-sites' build.rs reads the tables with site-table: the forms, the mods' slots, and
PLACED, each supported build's placed sites by its key (the same left-out rule). The lift's key holds every
owner's file. The supported build's sites, their order and owners (site_owners.txt) are unchanged, so the lifted
output is the same.

New repository tests: a supported build's every site placed by its entry, none left out; a mod uses only the
core's sites and its own (its mod.json and sources); only game/mods/text names its site. tests/sitecheck.py reads
the new rows; the site-event example is converted.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
A build with no place for one of a built-in mod's required sites leaves the whole mod out (site_table::load);
the loader now holds such a mod back at the start (not available for your game version, naming the sites)
instead of starting it on hooks that never run. It asks game_sites::placed_in_build, which reads the same
tables' placed sites (PLACED) and is None for a build the tables do not name at all: nothing is held back
there, as nothing is placed. A game-free test holds a made-up mod whose second site no table has.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Longshot.exe mod sites port reads a mod's sites.toml (a player's, or a built-in mod's in game/mods/<name>) with
the tables' reader and, for the --to build: says which sites already have an entry; finds each other one by its
own signature, else by another build's entry's (the --from build's first, its offset, signature and guards
carried into the new entry), else with --from by that build's code grown into a longer signature; and lists the
ones it cannot find. --write adds each found one's builds.<id> = { fn = ... } line to its row, before any
subtable of it, with a key no other of the row's starts, and reads the file back first. The search is the lift's
own (sites::modsites::find_one, now public) rather than a copy.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
docs/dev/reference/hooks.md documents format 3: every key, where it goes (row or entry) and who may use it (the
core and built-in mods, or a player's mod too), the builds entries with an example of per-build arguments, how
each site is found in a build, hot, within, the named locations, and the lift's new messages. unsafe.md and
tools.md say how a player's mod lists builds and ports them; system-mods.md and game/DESIGN.md say a built-in mod
holds its sites with their entries and is held back when a build has none, the text mod as the whole example
(and the api crate's build, not schema-gen, writes a system mod's types into longshot.d.ts); game/README.md,
setup.md and builder.md lose the per-build locations files.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The header comment named the per-build locations.toml files, which are gone: it now names the core's sites.toml
[[location]] tables and their builds entries. The comment is the only change to the generated file.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
mod sites port's entry search folds its if into the let chain (clippy), and its test's third site has a signature
found nowhere, so the written table is still one the build takes. The named locations' test writes a location with
both fn and data in one entry (two entries of one key are not TOML). test_switch_table.py reads site-table as it
reads the schema crate: its HOS_* names are game/sites.def's macros, not switches.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Nothing of the site tables has shipped, so the one format every owner's sites.toml is written in is format 1,
with no history: the reader takes format = 1 alone and says so for any other, its messages name no older form
(a build's entry that is not a table, the key in), and every table in the repository (the core's, the built-in
mods', the example, the tests') and hooks.md and unsafe.md say format = 1.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The hooks had one permission, hooks.unsafe, for anything at a site. Power is now rated by what a write can
reach: hooks.observe (low) hears the game's own sites, hooks.change (medium) lets a filter change them, and
hooks.unsafe keeps a mod's own sites and data rules' values. Each tier holds the ones below it
(permission::HOOK_TIERS, in Grants::has), so a mod granted hooks.unsafe is unchanged.

- api.toml: the two permissions appended last, so no permission's number moves; schema-gen's docs regenerated.
- hooks.toml: listen and sites take hooks.observe; setValue stays hooks.unsafe. api::services::hooks checks
  each row's tier at listen (Row::tier).
- The build (build-driver modsites::collect) takes a sites.toml whose rows only name the game's sites from a
  mod holding hooks.observe or above (sites::modsites::table_tier); mod check says the same.
- Acceptance by content hash still applies to every sites.toml, whatever its tier (an open question).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The state a hit reads and the state it sends back, the ground for rules and the site runtime: no mutable
state is shared between a game thread's hit and the mod's script.

- game_sites::snapshot: 128 cells, one a mod that declares a snapshot. The script publishes a whole one with
  one pointer swap; a hit counts itself in, reads, counts itself out; the one replaced is retired with the
  cell's reader count, as a rule's table is.
- game_sites::capture: a buffer a capture, a lane per game thread (one writer, the script the reader, no
  lock), each a last value (under a sequence count), a count or a 16-record ring; overflow counted.
- game_sites::scratch: 16 values a mod keeps between hits on one thread, zeros for a new claim of its cell.
- mod.json's "snapshot" (names and types: f32, i32, u32, bool, or a table of up to 64), read by
  site-table's snapshot::Layout, so the manifest reader, the rules' reader and mod check share it; the
  website's mod.schema.json regenerated.
- longshot/hooks' publish(values) sets the named fields over the last snapshot and swaps it in; the mod's
  start claims its cell, its stop lets it go.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
A mod's rules change and read a site's arguments and fields at every hit, natively, from the values its
script publishes: the second of the four ways to answer a site, between events and handlers.

- site-table's rules reads rules.toml (format = 1): set, scale, add, min, max, or, and on a place by an
  operand; when (an AND of up to four comparisons); keep (f32 fields scaled from the game's own value);
  capture (up to four places and a bounded UTF-8 or UTF-16 string, as last, count or ring); answer.
  A place is an argument or a field at most two pointers deep; an operand a number or a snapshot value.
- game_sites::program checks each rule against its site's arguments and the mod's snapshot, rates it by
  what it reaches (Tier: observe, change, unsafe), and runs every mod's rules at a site in load order in
  one Program, one link of the site's chain inside the mods' listeners. keep's tables are the engine's, one
  a field of a site, so several mods' factors multiply, and a field no rule keeps gets the game's value back.
- Each site now knows its owner (core or the built-in mod whose sites.toml defines it): a mod uses the
  game's sites and its own, never another mod's.
- longshot/hooks: setRules(text) and captures(name); a mod's folder's rules.toml is put in place before
  its entry runs (the loader and mod test), and a rule past the mod's tier stops its start.
- mod check reads rules.toml with the same checks (rules, rules.permission).
- The inline value templates (table.rs Rule, the edits' site code) are unchanged: the lift is the same.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Hot is measured, not declared. Every hit of a site's dispatcher and of a mod's own slot is counted in the
hitting thread's own lane (game_sites::lane, shared with the capture buffers): no lock, no contention.
One hit in 16 a thread is timed and counts for the others. A site with only its owner in its slot (the
plain trampoline) counts nothing, so the game's own callbacks cost what they did.

- game_sites::stats: the counters, and Frames, which the hooks step reads once a frame: each site the
  mods' rows and rules use gets its last frame's hits and time. A site over 0.5 ms a frame for 30 frames in
  a row is said once in the log.
- SiteInfo gains hits, timeUs and overBudget. hooks.sites() lists the mod's rows, then the sites its rules
  use.
- longshot/mods' inspect() gives each mod's sites, and the mod inspector's page of a mod lists them
  (0.5.2).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The third way to answer a site: a mod's src/sites.ts, whose handlers run at the hit on the game thread
that reached it, for a decision that needs that hit's data.

- script::sites: one small QuickJS interpreter a mod a game thread, made at the thread's first hit (1 MB
  heap, 128 KB stack, no game API; its code imports only handle and fields from longshot/sites). A
  handler gets the site's arguments as a draft, the mod's snapshot (frozen, made again when it changed)
  and the thread's scratch object. With hooks.unsafe, fields.get reads a guest value and fields.set
  drafts a write.
- Drafts are applied only when the handler returns in budget, every value read back first; a throw or a
  cut-off leaves the hit untouched. The budget is 200 us a hit, asked every 64 steps: Longshot's
  longshot_qjs_poll_every sets QuickJS's step count, which upstream resets to 10,000. Eight misses in a row
  switch the handler off for that site, with a log line.
- What a handler returns is not read, and outcome sites refuse handlers: no answers on worker sites.
- api::script::SiteRuntime and ScriptHost::site_runtime (QuickJsHost makes script::sites::Sites).
  Services::handlers_start puts a mod's handlers in their chains before its entry runs (the loader and mod
  test). The tier is hooks.change at the game's sites and hooks.unsafe at the mod's own. A mod's stop
  takes them off and retires its runtime; each thread frees its interpreter at its next hit.
- Shadows' steady fit is the first measured case: game/mods/shadows/src/sites.ts ports SteadyFit, and
  tests/site_runtime.rs runs it through the site runtime on 300 written hits for parity with the native fit
  (the same boxes and basis rows), plus an ignored timing of both.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
A mod for the in-game check of rules, the snapshot, captures and per-site stats. mod.json declares a
snapshot and asks for hooks.change. rules.toml scales camera.lens's angle by snapshot.fov and captures
it. The script publishes the factor and logs each second the site's hits and time (hooks.sites()) and the
newest angle captured.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
ModApi::site_handler asked whether the mod was a system mod, and for hooks.unsafe at any site. It now goes
by the tiers every mod's handlers, rules and listeners have: hooks.change at the core's sites, hooks.unsafe
at the mod's own, never another mod's. The site must still be in its manifest. No hook gate asks whether
a mod is a system mod. DESIGN.md says so, and that a native built-in mod cannot start a site runtime: it
has no script host and no shipped folder at run time.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The core named mods: oot::layout::sysmods held every built-in mod's registers, fields and addresses, and
oot::sysmods::widescreen and oot::call::sysmods held Widescreen's site logic and its pause-menu calls.
For the mods l4ts doesn't port, these are now the mods' own:

- sprint-walk, shadows and voice-language each get a src/layout.rs, with the tests that check their
  addresses;
- widescreen gets src/layout.rs and src/wide.rs (the site logic, the layouts and panes, and the picture's
  pack and draw calls), and longshot-game reads the picture from sysmod_widescreen::wide;
- the replace site's own function call is the core's generic oot::call::callee.

Field of view, Damage and Skip title screen stay in oot::sysmods until their ports. Byte-identical code;
no behaviour changes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
rules.toml beside the text mod says Text speed and Text size as two rules on its own site text.letterStep:
scale the step's time by the published speed, and keep the pane's text scale (two f32 fields through the
control's wrapper) at the game's own value times the published size. tests/parity.rs runs the rules
through game-sites' interpreter and the native letter_step on copies of the same panes, 360 written hits.
It goes through every speed and size, with panes the game writes between hits and a pane not set up. The
step times and pane scales match after every hit, and so do the values given back when the mod stops.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The text system mod was a native crate whose handler stepped the text panes at text.letterStep. It is
now TypeScript. rules.toml, which matched the native handler on written hits in the commit before, does
the work natively at every hit. src/main.ts only publishes the two settings' numbers, speed and size,
into the snapshot mod.json declares. Its settings keep their keys and rows (text_speed and text_size,
store options, legacyId 5 and 10). Its site stays its own (site_owners.txt unchanged: system/text). Turning
it off takes its rules away, and each pane's text scale goes back to the game's.

- game/mods/text: mod.json (runtime js, its snapshot; 2.0.0), src/main.ts, src/text.ts (each choice's
  number), test/text.test.ts (its rows, options lines and numbers).
- The crate sysmod-text goes: its sources, tests (hit_cost's bench too), and its places in the workspace
  and longshot-game. The repository test that nothing outside its folder names its site goes with it.
  game-sites' tests read the mod's rules.toml itself, so the parity's expectations hold the file.
- mod check reads a built-in script mod's sites.toml in the core's format (as it did for the Rust ones).
- DESIGN.md, system-mods.md and hooks.md say so.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
game/mods/settings (system/settings) drew the same tree as the TS menu on its own settings page. It
goes whole: its crate, its workspace entry, longshot-game's dependency (the native-mods registry is
made from the folders, so its entry goes with the folder), its tests and its parity list
menu_rows.tsv (tests/test_settings_decls.py now writes and checks the TS menu's menu_rows.json
alone). It declared no setting, so no key moves and FROZEN is unchanged. The docs that named it
name the menu system mod.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
A button has no value, so the menu's set of one changed nothing and its mod never heard it: a
button declared by a native system mod did nothing. A press is now told (setting_changed) each
time, though no value moved. Test: each_press_of_a_button_is_told_to_its_mod.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The Debug tab's panel was the C++ menu's code: its rows, their presses (game_cheat_action) and the
Teleport and Inventory pages, over game/oot_cheat_items.h. The cheats mod now declares them as its
settings, drawn as any mod's rows: Mark position, Return to mark, Set time (by Time of day), Change
quantity (by Pouch item and Change by), Teleport (by Teleport to), Switch age, and an item choice for each
inventory section (a choice holds 64 at most) with one Amount, the last chosen item's, which follows
the game's count and sets it. Each is kept for the run alone and shown
while the Debug tools are on. A press runs the same action as before (command::run). Turning the
tools on turns the renderer's Autosave row off, as the menu did.

The inventory's items (labels, pouch names, kinds, sections) and the teleport sections are the
mod's data, game/mods/cheats/debug.json; tests check them against oot::travel's lists and the rows'
choices. New keys are run-only, never saved: FROZEN is unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The Insert menu draws no row of its own now. vk_menu.cpp keeps its frame (the dimmed game, the
banner with the logo and the version, the help box, the prompts), opening and closing, the restart
question's logic (drawn by the menu mod as "@ask"), the text field a hosted TextInput is typed in,
and the routing of the keys, the gamepad and the mouse to the hosted tree (system/menu's page, or
the engine's fallback when the menu mod does not run). Gone with the drawing: the tabs and rows, the
Controls page's grid (its BINDINGs stay declared), the Debug tools' panel with its Teleport and
Inventory pages (the cheats mod's rows now) and game/oot_cheat_items.h (the cheats mod's
debug.json), the Mods tab and its permission prompt (the mods-tab system mod's), the tune bar, the
quick debug overlay and the Debug tools' own dialog. vk_menu.cpp goes from 8230 lines to 4323.

The Menu drawn by mods row (menu_mod_ui, gpu/vk/menu/mod_ui_menu.cpp) goes, and its key leaves
tests/test_menu_ini_keys.py's FROZEN: it was new in #2434 and never shipped. The renderer's
debug_tools.cpp module goes (Debug tools and Damage taken are the cheats and damage mods' game
rows, drawn in place; FROZEN keeps their keys, now game:CHEATS and game:DAMAGE); its Autosave row
is gpu/vk/menu/autosave.cpp. The Compact menu key and Command palette key rows are hidden, their
lines kept, until the mods open the tune strip and the Commands page from play.

MkwVkHost version 63: the Mods tab's seven members (mods_snapshot, mod_edit_id, mod_setting_set,
mod_permission_set, mod_prompt_answer, cheat_info, cheat_set) are mod_keys (each mod's debug page
key and keybind keys, for play) and mods_state (the waiting permission prompt, which opens the menu
for the Mods tab mod to show it, and the mods' changed number for the restart question), and
game_cheat_action goes. longshot-game's mods_page.rs (the C block) and debug_tab.rs go, the tab's
data functions move into mods_host.rs, and cheats.rs keeps only the live input's !cheat and an input
movie's action. renderer_setting_text("menu_language", MKWVK_TEXT_LANG_CODE) gives the menu's
language code, for the mods' translations.

Tests of the deleted drawing go (test_menu_tune, test_mods_menu, test_mod_prompt_keys,
test_menu_mouse_scroll, test_menu_empty_tab, test_damage_debug_menu); test_cheat_items reads the
cheats mod's data, the tour and its test read the cheats mod's rows, and menu_rows.json is the menu
without the panel's rows. Not run in the game yet.

Left for later: longshot-game still names mod-specific code in sysmods.rs (the system mods' start, which
waits on the hooks' step g) and mods_host's link to the cheats mod's tab; both want a generic extension first.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
A mod's texts in the player's language: its folder's strings/<lang>.json (a language code each,
en.json, pt-BR.json; a JSON object of texts by key, nested objects joined with '.'), looked up with
t(key, vars?) in the menu's language (renderer_setting_text("menu_language", LANG_CODE): the Menu
language row, Auto worked out to the game's), then the language's first part, then English, then
the key itself (said once when the mod's en.json lacks it too). '{name}' is filled from vars.
lang() and langs() say the language now and the ones strings/ has. No permission; the files are
read at a mod's first lookup and again when it starts again.

Longshot.exe mod check checks strings/ as the game reads it (a language code's .json, an object of
texts); a mod test sets the language with game.menu.setLang(code). settings-host's texts are
documented as English, which the menu mod translates. docs/modding/i18n.md; schema-gen outputs.
Tests: lookup and fallback, placeholders, the file and code rules, mod check's.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The renderer gives every text in English now (vk_menu_i18n.cpp's tr is the text itself; it keeps the
Menu language row's list and the game's language), and the menu system mod shows each in the menu's
language through longshot/i18n: game/mods/menu/strings/<lang>.json, the 13 languages of
gpu/vk/menu_i18n.h moved as they were (each keyed by its English text), and src/tr.ts, which also
translates a text made from a printf format ("3 of 9" from "%d of %d", src/formats.ts) through the
format's translation, as the C++ lookup did. src/host.ts is settings-host with its texts
translated as they are read; the menu's own words (Tune, Done, Cancel, Swap, Loading) are translated
too, with new entries for the four the tables lacked. What the renderer draws itself, the FPS counter
and the start-up screen, is English now.

tests/test_menu_i18n.py reads the strings files (every language of the row has one, every text is
the menu's, conversions kept); test_menu_i18n_count and test_share_message_i18n, which compiled the
C++ tables, go; test_framegen_by_row reads the strings files. A mod test checks a label and a made
text in French.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
LONGSHOT_SET="<mod id>:<key>=<value>[,...]" sets mods' settings for one run, over the player's,
never written to the options file or a mod's storage: the settings service's run value
(longshot-game run_set.rs, asked after a mod test's own and before a system mod's switch table). A
value is read as the options file writes it; one the setting does not take is logged and the
player's kept, a malformed entry logged and left out. longshot-builder play --set id:key=value
(repeatable, before --) passes it.

It replaces the switches that each set one setting: HOS_OOT_CHEATS (system/cheats:debug_tools=1),
HOS_OOT_PROTECT_HEARTS (system/cheats:heart_protection=1, now with the Debug tools on, as the row),
HOS_SKIP_OPENING (system/skip-title:skip_opening=1) and HOS_DISCORD_APP_ID (system/discord:appId=<id>);
HOS_DISCORD goes too (HOS_SYSTEM_MODS_OFF=discord). Each is a GONE row of switches.def. HOS_ASPECT
stays: it takes any ratio (2.3889), which the Aspect ratio row cannot hold. The cheats mod's own
switch reads and its heart-protection-until-touched rule go; discord's mod.json names no switch, so
the offSwitch/settingSwitches table is empty (its code stays, for a later cleanup). The test runs'
scripts (the pipeline tour, ab.py, the bridge's TEST_RUN_ENV, the parity gates) and their tests use
the new ways; docs: switches, system mods, build, control bridge, the player's guide.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The Debug tab's last line, About >, opens a page of the menu mod's own (@about): the third-party
parts Longshot ships, each with its licence and link (game/mods/menu/src/credits.ts, one a folder of
third_party/, Tracy left out as developer builds alone have it), and the mark of the upscaler in use,
NVIDIA DLSS, AMD FSR or Intel XeSS, only while the Upscaler row names it. A mod test checks the
credits and that a vendor's mark shows only with its upscaler; tests/test_menu_credits.py keeps the
list and each licence the same as third_party/*/PROVENANCE.md.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
What the C++ menu drew itself and the menu system mod could not know, now in the declarations: a
module button's own text (Apply / Applied, Start test / Stop test) comes as its state's text; a row
that takes a restart, changed from what the game started with, has "Takes effect after a restart" as
its hint's last paragraph (the old After restart tag); Sprint's binding row has the old Controls
page's help (how Sprint starts, what ends a toggled sprint). src/tr.ts translates a text of
paragraphs one paragraph at a time.

The menu's translations lose the 909 entries (of 13 languages) whose English the renderer no longer
says: the C++ Controls grid, the Debug tools' pages (the cheats mod's rows now), the Mods tab (the
mods-tab system mod's, not translated yet), the tune bar and the prompts. tests/test_menu_i18n.py
counts a paragraph as a text, and drops the checks of texts that went (the plural forms, the Controls
hint, the text field's editing bar).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The checks that read the C++ menu's drawing and keys read what took their place: a press runs in
settings_decl_tick (the bug report, the weak laptop button, Save my pipeline list, a locked button),
a button's text and a hidden row in menu_decl_state, a step in menu_setting_set's set_row (Vibration,
Vibration strength), the tab names in kTabLabels, the Mods tab's screen effects in the mods-tab
system mod, MkwVkHost's version 63 members (hos_ab), the text field's place in menu_tick. What went
with the drawing goes from them: the Controls grid's navigation and confirmations (test_menu_keys
keeps the A/B mapping, the keyboard and Esc, the options file), the slider drag (stepped sliders),
the mouse's row record (menu_hit), the prompt bar, the tab walks; test_mic_help_meter, which drew the
help box's live meter, goes. test_settings_decls no longer copies the Debug tools' and their pages'
rules (the cheats mod's rows). scripts/tours/route.py zipped the teleport names with the
destinations' texts instead of their maps' ages.

Not run here (no tests on this PC): their source parts were checked against the tree and their
fixtures compiled syntax-only; game/mods/menu/test/menu_rows.json wants test_settings_decls.py --write
once to be sure it is the menu as built.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
No system mod named one since LONGSHOT_SET (any mod's setting for a run) and HOS_SYSTEM_MODS_OFF (a
system mod left out) took the switches' places. The manifest's "system" is "enabled", "required"
and "legacySwitch" again: the schema crate no longer reads the two nor emits SYSTEM_SWITCHES and
system_switch_of, api's SystemEntry and SystemTable::setting_switch lose them, switched_off is
HOS_SYSTEM_MODS_OFF's alone, and the run's settings are a mod test's and LONGSHOT_SET's. The mod
schema (website/public/schemas/mod.schema.json), docs/modding/system-mods.md and
tests/test_switch_table.py follow.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
scripts/screenshots/menu.cpp, capture_menu.py and check_menu_capture.py compiled gpu/vk/vk_menu.cpp's
drawing to render the settings without a game; that drawing is gone (the menu system mod's rows,
drawn by the mods' UI, need the game). The guide's README says a settings screenshot comes from a
game run with the menu open until a TS capture path exists; the manifest's menu-fixture entries keep
their fingerprints for the next review.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The first step of the runtime/game-module split (#2434 runtime design): what lifted code touches on its hot paths moves
into the lift runtime, which becomes part of the game module, and the choices the IR is written with stop being a
lift's own.

- builder/rt/a64_config.h is committed and fixed (the window's base, the marks' table, the GPU page bitmap, polls).
  llvm's `abi` repeats the values (a test checks them against the header); the whole lift refuses options that
  differ, and writes the header as builder/rt holds it. The dev lift's --no-polls and --no-mark-bitmap go.
- a64_gpu_pages, read by every marked store, is defined in a64_rt.c beside a64_dirty; host/mark_bitmap.c only sets it.
- hos_site_callee, the replace sites' thread-local, is defined in a64_rt.c with its get and set (Windows cannot import
  thread-local data); host/game_call.c no longer defines it.
- A host function more than 2 GB from a64_lookup (a host call, seen from a module apart from the runtime) gets one of
  512 module-local thunks, so the call caches' 32-bit offsets stay inside the module. In one image none is used.

Tests: llvm's ABI-against-header test; the lift refusing a non-ABI lift and writing the fixed header; a64_rt.c's far
thunk and callee get/set compiled and run (A64_TEST_ALL_FAR); test_game_boundary checks the module's data is defined
by the lift runtime alone, with two crossings planted. The IR is unchanged (the llvm writer is untouched and the
defaults are the frozen values).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
A new crate, game/crates/ui: the next channel's ops checked whole on the main
thread (ops, shadow), the UI thread's trees (doc), styles resolved into taffy's
Style, parley's text properties and a small visual, cached by (style ids, state
bits) (style), taffy 0.16 layout kept per root and given only what changed
(layout), parley 0.13 text with its editor and a swash glyph atlas of pages with
sub-pixel bins and LRU eviction (text, atlas), Canvas paths through lyon with AA
fringes and the built-in icons (canvas, icons), the draw list, the renderer's
contract (draw), the behaviour widgets and the old UI's controller navigation
ported (widgets, nav, paint), the synchronous Core and the UI thread ticked per
present (core, thread), and the reference CPU renderer (reference). Metrics and
size probes as examples. taffy, parley, swash and lyon_tessellation pinned.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
api::services::ui2: each mod's batches checked whole by its game_ui Shadow and
sent to the UI thread through a new host part, Ui2Sink (Hosts.ui2), its images
decoded by the old channel's ImageSet and handed over once ready, its events
from the UI thread to its onEvents at the next frame, its requestFlush once a
frame, and measure() by the real text layout. With no sink (LONGSHOT_UI2 off)
every call is NotAvailableError.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
runtime.js evaluated a second time for the next channel (group ui-next,
native.next): the primitives as host elements, styles() interning definitions
whose keys are taffy's, parley's and the visual's fields, state blocks, theme
tokens passed through, a virtualised List over the host's range events, and
measure(). The element marker is Symbol.for so TSX (always compiled to
longshot/ui/jsx-runtime) makes elements both instances take. The kit is
TypeScript (game/modapi/ui/kit.tsx) the game compiles at its first import. The
old channel's path is unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
longshot-game::ui2: the UI thread made at the first use while LONGSHOT_UI2=1,
the main thread's sink over it, and game.h's game_ui2_present (the input handed
over, the newest frame's C view given back), game_ui2_theme and game_ui2_font.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The fake game runs UI2's Core at each frame: real taffy layout and parley text
with the bundled fonts, the player's presses, navigation and typing, and a
picture from the reference renderer (snapshot()).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
gpu/vk/vk_ui2.cpp gathers each present's input for the UI thread
(game_ui2_present, host version 63), takes the frame's changed atlas pages and
fresh images as kept ImGui textures (vk_imgui's user_texture_kept and
user_texture_update: only a page's dirty rect uploads), and draws the list in
the overlays' ImGui frame under the old mods' UI: rounded rects and borders,
shadows as fading rects, glyph quads, images, meshes, scissors. No pipeline of
its own: the SDF drawer of the contract comes at the renderer's swap. The C
twins of the contract are gpu/vk/ui2_draw.h. Off by default (an attempt).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
docs/dev/reference/ui2-draw-list.md (the renderer contract, the reference
renderer its executable spec), docs/modding/ui-next.md and the example mod,
game/DESIGN.md's UI2 sections (styles as taffy, parley and the visual; the
threads and caching; the metrics; the Later plan to port the menu mods and
delete the old path; open questions) and the architecture page's paragraph.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
fix(vk): UI2's headers include no imgui.h, so vk_menu.cpp keeps ImGui's vector operators
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 9s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 20s
CI / Workflow lint (actionlint) (pull_request) Successful in 23s
Third-party parts / As their notes say (pull_request) Failing after 25s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 30s
PR description / Title and description (pull_request_target) Successful in 40s
CI / Website build and checks (pull_request) Failing after 40s
CI / What the change needs (pull_request) Successful in 47s
CI / longshot-builder end to end (synthetic game) (pull_request) Successful in 3m26s
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Failing after 5m18s
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Failing after 5m47s
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Successful in 58s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Has been cancelled
b9ac716574
vk_ui2.h included imgui.h ahead of vk_ui.h's IMGUI_DEFINE_MATH_OPERATORS, and
vk_imgui.h named ImTextureFormat without imgui.h: vk_menu.cpp and every other
includer failed to compile. vk_ui2.h now forward-declares ImDrawList,
user_texture_kept takes its format as an int, and vk_ui2.cpp includes imgui.h
itself.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The second step of the runtime/game-module split (#2434 runtime design; the design's commit 3, done before the link so
the link has something to load): nothing of the runtime names a symbol of the lifted game, so the game can be a module
of its own.

- builder/rt/a64_module.c: the module's one export, ls_game_module(A64_MODULE_ABI), a table (rt/a64.h A64Module) of
  the lookup, an indirect call, the page marks and the GPU page bitmap, the replace sites' callee, the image's boot
  constants and the named locations, with a64_config.h's base and page count. gen/image.c is now one A64Image
  (a64_image) and gen/locations.c's function a64_locations_resolved.
- host/game_module.c reads the table first thing in main: linked in, ls_game_module is called directly (a weak
  reference); with LONGSHOT_GAME_MODULE=<path> the module is loaded from that path (UTF-8, widened on Windows). A
  missing file, no ls_game_module, another table ABI, another lift ABI or an incomplete table ends the start with a
  sentence; --prepare-shaders needs no module. hos_image_base, hos_main_build_id, hos_main_base ... are the host's
  copies, hos_site_callee_get/_set and hos_locations_resolved forward to the table, hos_game_lookup and
  hos_game_icall replace the host's (and game-sites' vslot) a64_lookup and a64_icall.
- The host's C is compiled with -DA64_RUNTIME: rt/a64.h's A64_DIRTY and A64_GPU_PAGES are then the table's pointers
  (rx_backend.c, hos_mem.c, mark_bitmap.c, every A64_MARK); HOS_MARK_BITMAP_ALL is applied at the load.
- a64_rt.c's weak defaults are left out of a game module (A64_GAME_MODULE): there they would bind inside it.
- The preparation driver's stand-ins are 256 bytes, as big as an A64Image.

Tests: tests/test_game_module.py loads fake modules through host/game_module.c (a fitting one, and each refusal); the
lift's tests and synthetic-game's host read the new image.c; the harnesses of test_game_call, test_libc_hooks and
test_collect_wide follow the new names.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
test(boundary): plant game headers that exist
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 9s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 19s
CI / Workflow lint (actionlint) (pull_request) Successful in 20s
Third-party parts / As their notes say (pull_request) Failing after 21s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 23s
PR description / Title and description (pull_request_target) Successful in 28s
CI / What the change needs (pull_request) Successful in 39s
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Failing after 2m31s
CI / Website build and checks (pull_request) Failing after 36s
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Failing after 1m59s
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Failing after 4m52s
CI / longshot-builder end to end (synthetic game) (pull_request) Successful in 3m28s
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Failing after 6m38s
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Successful in 56s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
529d1f32d1
The boundary check's planted crossings named game/oot_sprint.h, which is gone: an include of a file that is not there
resolves to nothing, so the renderer's plant (through -I gpu/vk) was not seen and the check failed on its own. The
plants name game/phases.h, a game header the host may not include.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
fix(third-party): QuickJS's note names longshot_qjs_poll_every, our own second function, and its tree hash
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 9s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 19s
CI / Workflow lint (actionlint) (pull_request) Successful in 20s
Third-party parts / As their notes say (pull_request) Successful in 23s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 25s
PR description / Title and description (pull_request_target) Successful in 30s
CI / What the change needs (pull_request) Successful in 42s
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Failing after 1m12s
CI / Website build and checks (pull_request) Failing after 18s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Failing after 2m49s
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Failing after 5m38s
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Successful in 41s
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Failing after 7m28s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Successful in 2m47s
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Failing after 8m28s
CI / longshot-builder end to end (synthetic game) (pull_request) Has been cancelled
65d5181ac7
The site runtime added longshot_qjs_poll_every to longshot_quickjs.c, Longshot's
own file beside upstream's, without updating the part's note, so
check_third_party refused the tree. Upstream's files are unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
fix(builder): vk_ui2.cpp compiled with ImGui's include dir, as the renderer's other ImGui files
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 9s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 22s
CI / Workflow lint (actionlint) (pull_request) Successful in 25s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 30s
Third-party parts / As their notes say (pull_request) Successful in 30s
PR description / Title and description (pull_request_target) Successful in 36s
CI / Website build and checks (pull_request) Failing after 41s
CI / What the change needs (pull_request) Successful in 53s
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Failing after 2m55s
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Failing after 5m37s
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Failing after 5m41s
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Successful in 57s
CI / longshot-builder end to end (synthetic game) (pull_request) Successful in 4m5s
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Failing after 7m29s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Failing after 12m9s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Successful in 9m39s
827bd8b0f8
UI2's drawer (gpu/vk/vk_ui2.cpp) includes imgui.h and imgui's draw list, but the builder's renderer plan gave ImGui's
include dir and defines only to vk_imgui.cpp, vk_menu.cpp, reshade.cpp and vk_modui.cpp: the game build stopped at
'imgui.h' file not found. The list is now a const, IMGUI_USERS, with vk_ui2.cpp in it, and a test reads gpu/vk and
gpu/vk/menu so that every file including ImGui's headers, or a header of gpu/vk that does (vk_ui.h), is in it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
host/game_module.c reads LONGSHOT_GAME_MODULE (the game module's path, which the builder's play will set), and
test_switch_table wants a row in gpu/vk/switches.def for every name the source reads: a player switch, environment
only, sorted after LONGSHOT_DRIVER_ENV_SET; and its line in docs/dev/reference/switches.md.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
fix(host): hos.h names the game module's types only beside the a64.h that has them
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 9s
CI / Workflow lint (actionlint) (pull_request) Successful in 22s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 26s
Third-party parts / As their notes say (pull_request) Successful in 29s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 34s
PR description / Title and description (pull_request_target) Successful in 36s
CI / What the change needs (pull_request) Successful in 52s
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Failing after 2m45s
CI / Website build and checks (pull_request) Failing after 35s
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Failing after 5m44s
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Failing after 5m45s
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Successful in 40s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Failing after 3m5s
CI / longshot-builder end to end (synthetic game) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Has been cancelled
f069170ec0
hos.h declared hos_game_module_check, hos_game_image and hos_game_lookup with rt/a64.h's A64Module, A64Image and A64Fn,
so a harness that gives hos.h a stand-in a64.h (Ctx and A64_PTR alone: test_fs_save_commit's) no longer compiled:
"unknown type name 'A64Module'". The three are declared under A64_MODULE_ABI, which the lift runtime's a64.h defines
with those types; every host file that calls them includes it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The TS menu reads every row's state at the start (renderer_setting_state, menu_decl_state). Its hint line is
made as std::string(hint(v, -1)), and most hints give nullptr for a value with no line: libstdc++ throws
std::logic_error ("basic_string: construction from null is not valid") and the renderer stops the game at
start. The check cuts those lines out of menu_decl_state and runs them with the real modules and model over
each row's every value, the restart tag on and off. Fails here: the fix follows.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
fix(menu): renderer_setting_state no longer throws for a row whose hint has no line, so the game starts
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 8s
CI / Workflow lint (actionlint) (pull_request) Successful in 19s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 20s
Third-party parts / As their notes say (pull_request) Successful in 25s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 25s
PR description / Title and description (pull_request_target) Successful in 30s
CI / What the change needs (pull_request) Has been cancelled
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Has been cancelled
CI / longshot-builder end to end (synthetic game) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
b50bc86b04
menu_decl_state made a row's hint line as std::string(hint(v, -1)); most hints give nullptr for a value with
no line, so libstdc++ threw std::logic_error ("basic_string: construction from null is not valid") when the TS
menu read every row's state at the start, and the renderer stopped the game ("vk: FATAL: std::logic_error came
out of renderer_setting_state"). Came with mwurlplr (the restart tag in the declarations). The hint is now taken
only when there is one; DeclList::keep takes a nullptr text as "" too, for the declarations' other texts.
tests/test_menu_decl_state_hint.py passes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
api::manifest::normal is the one JSON shape of a checked manifest (format 1, every default filled in) and of a
setting in the one-setting format, so a tool shows what the game's reader made of mod.json and a launcher never
parses it itself. The loader gains Loader::offline (the start's scan alone, the API features not checked: a tool has
no game), copies() (every copy found, with the reader's ManifestError for one refused) and resolved() (what the start's
resolver was given and decided). resolve::needs says where each of a mod's dependencies stands after a resolve
(loads, wrong-version, missing, off, wont-load), with its test.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The control bridge listed the renderer's rows alone, and the menu takes the game side's rows once, at its first use:
a script system mod's settings (crt_filter, colour_vision, area_name_banner), declared when the mod starts, were
"not_found". The bridge now falls back to the game side's settings, every mod's as its settings service lists them
(game.h's game_setting_*): listed once after the menu's rows, and set as the player sets them. control_test covers a
setting only the game side has, and one both have.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
For the launcher (#268), so it drops its copies of the game's rules. Each runs the game's own loader scan offline over
a read-only disk (the mod store laid over the files, the game folder builds/<stamp> of the profile's code mods, the
built-in Rust mods from game/mods and the build's table of script ones) and answers a versioned document (format 1):

- installed: every mod the next start sees, with its normalized manifest or manifest_problem {field, text}, state,
  load order, code hash, trust (accepted, asks, unsafe grants), the Mods tab's warning and its build state, merged with
  the profile entry's source, pin and update;
- resolve: {order, off: [{id, reason, other, text}], needs: {id: [{dep, state, have}]}} from the game's resolver;
- build-state: the code and ExeFS patches the last build put in against what waits for one;
- settings <id>: its declared settings in the one-setting format with their values; --set and --reset write as the Mods
  tab does (the profile's settings.ini line for store options, else the mod's settings store), refused while the game
  plays the profile.

Documented in docs/modding/tools.md (What the game will do), with CLI tests over a fixture profile.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The code mods' stamp and the game folder it names (build_driver::play::mods_stamp, game_folder, BUILDS,
DEFAULT_BUILD) move into game_files::code_mods, which play re-exports: the builder's play and modtool's reading of
what the game will do take one rule. api gains system::table() (the build's table of script system mods, the
game's runtime::system_table gone), loader::ArchivePackages (longshot-game's packages.rs gone) and the built-in Rust
mods' mod.json list (system::native_ok, emitted with the table from schema::system_mods::native_folders, the one walk
of game/mods/<name>/ with a Cargo.toml, which longshot-game's registry build takes too). modtool's own build.rs and
native list go.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The installed operation (the game's channel, mod serve) answers the same {format: 1, game, mods} document as the
command line, so the game's Mods tab and the launcher read one thing; its service tests read it by id. mod resolve
--on ID --off ID gives the resolution as if those mods were switched so (the profile's list read through an overlay
with those switches, an entry added for a mod it does not name; nothing written), for the launcher's "switch on what
it needs", with its tests. modtool reads the stamp rule, the system table and the packages from their one place.
tools.md says why settings --set refuses while the game runs: the game's own Mods tab edits them live.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
A folder or package of mods/ whose name starts with - or _ is off by the player's choice: Loader::skipped lists each
one (its path under the folder, and why) beside the log's line, for the tools' installed. settings::value_text is
exported for them too (a setting's value as the menu shows it). With its loader test.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
installed gains list {state: profile | none | not-a-list, path, old_lists (the game folder's mods.json or
longshot_mods.txt, read by nobody)}, skipped [{path, why}], and per mod in_profile and content {romfs_files,
romfs_more, cheats, exefs_patches, modules} for the launcher's kind chips. mod settings gives every setting its text,
read-only: a choice's value is its option's index, and --set takes the index, never the label. tools.md says so.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
fix(modtool): mod settings writes a mod's settings store on the disk, and the installed test reads builds/default as built
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 9s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 24s
CI / Workflow lint (actionlint) (pull_request) Successful in 25s
PR description / Title and description (pull_request_target) Successful in 30s
Third-party parts / As their notes say (pull_request) Successful in 29s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 30s
CI / Website build and checks (pull_request) Failing after 35s
CI / What the change needs (pull_request) Successful in 55s
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Failing after 2m3s
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Failing after 4m58s
CI / longshot-builder end to end (synthetic game) (pull_request) Successful in 3m1s
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Successful in 57s
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Failing after 7m17s
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Failing after 7m56s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Failing after 13m6s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Successful in 9m9s
e40a12fe35
l4mt-1 found both. The tools run on the stand-in host (host-sys's fake), whose whole-file write keeps the bytes in
memory: a settings store written through the game's Storage over OsDisk never reached the disk. FileDisk makes that
write with build_core::fsx::write_atomic. The fixture has builds/default, so with no code mod taken the game folder is
there and built.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The checks of where a version's members are (test_broker_frame, test_gfx_world, test_texture_pack,
test_ui2_renderer) asked that they be the last in MkwVkHost and in host/rx_backend.c's vk_host, so every new
version broke them (64's UI2 needed an exception in each; 65's engine_text broke them again). The rule they
follow now, from vk_api.h's MKWVK_API_VERSION note: vk_host fills MkwVkHost by position, a version's members
go in together after the versions before them (appended last since 54), and the renderer reads one only with
host->version at least its version. So each check names a version's members with the version's before or
after it and asks they be there together in that order (tests/vk_host_members.py in_order), in both lists;
later versions' members may follow.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
host/hos_main.c calls the game's _init_libc0 through the game module's table since qnvwqxko (im->entry_init_libc0,
not hos_entry_init_libc0), so test_hos_ab's start-order check no longer found its marker (ValueError). It
looks for the call as it is now; the order it checks is unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
test(settings): Damage taken is the damage system mod's setting, placed on the Debug tab by its declaration
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 8s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 21s
CI / Workflow lint (actionlint) (pull_request) Successful in 22s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 25s
Third-party parts / As their notes say (pull_request) Successful in 26s
PR description / Title and description (pull_request_target) Successful in 32s
CI / Website build and checks (pull_request) Failing after 36s
CI / What the change needs (pull_request) Successful in 45s
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Failing after 2m3s
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Failing after 4m24s
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Successful in 39s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Successful in 3m4s
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Failing after 5m54s
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Failing after 6m55s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Failing after 12m32s
CI / longshot-builder end to end (synthetic game) (pull_request) Successful in 13m46s
1d87ae0130
The Damage taken row moved from the renderer's Debug tab into system/damage (TS-format mod.json, place debug
after heart_protection), so the menu built from the renderer's modules no longer has it and
test_damage_taken_is_listed_in_debug_player failed. The check now reads where the row is: the page's Debug line,
the mod's declaration (its tab, after Heart protection, Normal its default), and no renderer row of it on the
Debug or Gameplay tab.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
fix(build): the shader preparation's driver links no game module table
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 10s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 23s
CI / Workflow lint (actionlint) (pull_request) Successful in 24s
Third-party parts / As their notes say (pull_request) Successful in 28s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 29s
PR description / Title and description (pull_request_target) Successful in 34s
CI / What the change needs (pull_request) Has been cancelled
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Has been cancelled
CI / longshot-builder end to end (synthetic game) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
33d469623e
The preparation's driver is the game's executable without the lifted game, its names stand-ins of 256 zero bytes. Since
the module's table moved into the lift runtime (rt/a64_module.c), the driver linked it too: ls_game_module was then
defined, its image a stand-in, and the runtime took that table for a game. in_prepare leaves a64_module.c out, so the
driver is a runtime with no game in it, which --prepare-shaders allows (host/game_module.c). A static build's
preparation was seen to end by signal 11 within a second (l4rb2-1); this is the likely cause, to be confirmed in game.

Tests: the preparation's unit test leaves a64_module.c out.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
fix(scripts): release_bench starts each game folder as it is, without packs.runtime_romfs
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 10s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 24s
CI / Workflow lint (actionlint) (pull_request) Successful in 25s
Third-party parts / As their notes say (pull_request) Successful in 28s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 30s
PR description / Title and description (pull_request_target) Successful in 35s
CI / Website build and checks (pull_request) Failing after 42s
CI / What the change needs (pull_request) Successful in 51s
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Failing after 2m59s
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Failing after 5m4s
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Successful in 53s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Successful in 3m15s
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Failing after 7m20s
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Failing after 7m26s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Failing after 12m29s
CI / longshot-builder end to end (synthetic game) (pull_request) Successful in 13m52s
11abc744c6
release_bench.py asked scripts/devtools/packs.py for runtime_romfs(), which packs no longer has: every run stopped with
an AttributeError before the game started. A builder's game folder knows its own romfs (its index), as dev.py ab's
runtimes do, so the session is started with no --romfs, the way ab.py starts its runs; packs is no longer imported.

Checked by importing release_bench and its run's modules (longshot_bridge, tours); the runs themselves in l4rb2-2.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
What the engine draws itself was English since the menu's tables moved to the menu mod. It has one
strings set of its own now, game/strings/<lang>.json, in the mods' format (keyed by the English, the
same 13 languages and English), built into longshot-game (engine_text.rs, include_str!). The renderer
asks through a new MkwVkHost member, engine_text(lang, english) (MKWVK_API_VERSION 65,
host/rx_backend.c game_engine_text), as i18n::engine: the start-up screen's texts (its counts and
time left through their formats), the FPS counter's labels, the menu frame's prompts and its
"starting" line. The fallback menu reads the same set in Rust (build_in).

The frame's prompts while a text field has the keyboard are the text field's again (Caret,
Character, Add, Remove, Paste, Done, Cancel; the controller's only with a controller), as the C++
menu showed them: a player on a controller sees how to type.

Tests: every language has every text with its conversions, the lookup's fallback (region, English,
the English itself, the C entry point), the fallback menu in French.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The C++ menu drew the microphone test's levels in its help box; that drawing went. The Audio tab has
a Microphone level line after Test microphone, shown while the test runs: a line declaration with a
range (0 to 1000) whose state is its level (after the gain) and the meter's text ("Testing: 12% ->
24%", then what the test hears). The menu system mod draws any line with a range as a meter, its
text and a Progress bar: a generic piece, read through settings-host like every row.

The test stopped at once with the TS menu: it ran only while the C++ menu's tab was Audio, and that
tab no longer moved. menu_on_tab is now the page whose rows the menu mod read in the last half
second (menu_decl_state notes it; the mod reads only the page it shows).

Tests: a mod test of the meter line; test_microphone_test_gain checks the line and the page-read
rule (stale, another page).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
t(key, { name }) left every {name} as it was from a script: a variadic value reaches the service as
the object's JSON text, which vars_of did not read. And a mod keyed by its English words (no en.json)
got its key back unfilled. Both are filled now; a test covers the text form.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The tab's own words (the list's lines, a mod's page, Permissions, Keybinds, Commands, HUD layout, the
permission prompt, Safe start, About, the switch's states and the help) go through longshot/i18n,
keyed by their English, their parts as {name}s; game/mods/mods-tab/strings/<lang>.json has the 13
languages of the menu. What the loader says (a mod's detail, note, state, warning) stays its own. A
mod test checks the tab in French, a filled-in part included.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
msyuxrny dropped Row's cheat field (the Debug tools' index, -1 for every other row). The checks that
read vk_menu.cpp's rows table still looked for it: tests/menu_model_fixture.py's core headings (their
", -1, true}") found none, so the menu as built had no Resolution and upscaling, Screen or Developer
section, and every row anchored there was a diagnostic (test_settings_decls, test_settings_table,
test_menu_sections, test_menu_modules, test_upscaler_rows). Ported, none deleted:
- menu_model_fixture.py: the core headings without the field;
- test_menu_rows_model: its table without it, and a module's page row checked by its setting's
  opens (row_opens, the C++ drawing's, went);
- test_menu_env_overrides: its FSR 4 model row without it;
- test_menu_keys and test_menu_text_field: the stubs the trimmed fixtures no longer use are
  [[maybe_unused]] (clang's -Wunused).

Their fixtures were compiled syntax-only with clang here; the checks were not run on this PC.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The live microphone meter came back as a row of its own (Microphone level, a line the menu mod draws as a bar
while Test microphone runs), so test_settings_table found a menu row with no line in the settings page's table.
The page lists it after Test microphone, which no longer says the levels are in the help box; the meter has no
default, as the actions have none.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The Mods tab now says its texts through t() (its strings/ in 13 languages), so test_gfx_effects no longer
found <Section title="Screen effects"> or the GPU time's English line. It looks for the section and the line
as they are written now, t("Screen effects") and t("{ms} ms of the GPU a frame.", ...).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
i18n::engine read MkwVkHost.engine_text whenever the pointer was there; a host older than version 65 has no such
member, and the renderer reads a member only with host->version at least its version, as every other one is
read. Older hosts get the English.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The user's decision on observe-only mods. A mod is observe-only when its code is its sites.toml alone and
it asks for hooks.observe and neither hooks.change nor hooks.unsafe (nor exefs). Its sites can then only
name the game's own (the build leaves out a site of its own without hooks.unsafe), and the game lets it
hear only events and their arguments (a filter needs hooks.change; a field or string capture stays
hooks.unsafe). Such a mod is taken with no acceptance by code hash: no warning, nothing written to the
trust file, and no new question when it is updated. Its low-risk permission is shown at install as any
mod's. The warning ("its own code changes the game's code") is left for hooks.change, hooks.unsafe and
ExeFS code.

One rule, mods_stamp::observe_only, asked by both sides: the stamp takes such a mod's sites without an
acceptance and leaves it out of the trust set; game_files::code_mods and build-driver's modsites::collect
take its sites; api::loader's code_status neither asks nor warns (Row::observe_only), and so neither does
the Mods tab; mod installed's trust says observe_only. Docs: unsafe.md, hooks.md, tools.md. Tests in
mods-stamp, build-driver, api's loader and modtool's installed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
test: the version folder's builds/ and builds/default are read where they are now, game_files::code_mods
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 8s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 16s
CI / Workflow lint (actionlint) (pull_request) Successful in 18s
Third-party parts / As their notes say (pull_request) Successful in 20s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 26s
CI / Website build and checks (pull_request) Failing after 29s
PR description / Title and description (pull_request_target) Successful in 35s
CI / What the change needs (pull_request) Successful in 45s
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Failing after 5m16s
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Failing after 6m11s
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Failing after 7m12s
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Failing after 8m9s
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Successful in 45s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Successful in 16m11s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Failing after 18m7s
CI / longshot-builder end to end (synthetic game) (pull_request) Failing after 20m7s
f1646dd6a3
The stamp rule moved into game_files::code_mods (vzkzlltv): BUILDS and DEFAULT_BUILD are defined there and
build_driver::play re-exports them, so test_longshot_exit and test_recomplauncher_json, which read the
constants from play.rs, failed. Both read them from code_mods.rs now, and check that play.rs takes them from
there.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
A mod can now widen or narrow the gameplay view without overriding the camera: camera.setFovScale(scale),
0.1 to 10, under camera.write. It takes no claim. Every mod's factor multiplies, and the angle drawn is
held to 5 to 140 degrees. Each factor is a live effect in the journal, so a stopped mod's goes. The API
composes the factors on the main thread into one f32 (oot:📷:lens::compose), and the core's engine
callback on camera.lens applies it with one relaxed load. No mod code runs on the game's threads for it.

- oot:📷:lens: the lens logic that was oot::sysmods::fov's (camera zero's gameplay view, events
  through state::event, broken links, s0 written only when it changes), taking a factor instead of a
  percentage. Its layout moves to layout:📷:lens.
- The core's camera.lens callback scales by the API's factor, composed with the Field of view mod's row
  while that native mod still hands it down the chain.
- A parity test runs the new lens at the factor the TypeScript port will give (the row over 100, composed)
  against sysmods::fov::lens on the same written hits: every slider value, 12 angles, with and without an
  event and a broken link (1008 hits). The 21 factors are bit for bit the f32s the native mod computed.
- The fake game's camera draws the scaled angle as the lens does. The feature camera.setFovScale is
  there when camera.lens is placed.
- Schema (camera.toml) and the generated reference, permissions and scripting pages; docs/modding/camera.md
  and docs/dev/reference/camera.md say how it works.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The Field of view system mod was a native crate. Its handler on camera.lens handed its row down the chain
to the core's callback. It is now TypeScript: src/main.ts sets longshot/camera's setFovScale to the
setting's value over 100 whenever the setting changes, and the core's lens (oot:📷:lens) applies the
factor at camera.lens, as the parity test in the commit before showed on written hits. The setting keeps
its key, row, range, place and default text (field_of_view, store options, legacyId 51). The mod has no
site of its own and needs only camera.write. Turning it off takes its factor away, and the next camera
update has the game's angle.

- game/mods/fov: mod.json (runtime js, camera.write; 2.0.0), src/main.ts, src/fov.ts (each value's
  factor, 1 outside the slider as the native mod had it), test/fov.test.ts (its row and options line, its
  factors, and the fake game's lens drawing the game's angle times the setting, held to 140 degrees).
- The crate sysmod-fov goes, and so does its place in the workspace and longshot-game. oot::sysmods::fov
  goes too (with_row, row_now, its layout); the core's camera.lens callback is oot:📷:lens::lens.
  The parity test goes with the native lens it compared against.
- tests/test_oot_fov.py checks the new wiring. DESIGN.md, system-mods.md, game/README.md, the camera
  reference and sites.toml's comment say so.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Damage taken's port needs two things the API lacked. A scale that comes after the other mods' damage rules,
as the native mod's did. And a way for a script to see the Cheats mod's Debug tools, which gate it.

- DamageRule's last (rules.damageTaken / damageDealt add({ ..., last: true })). A last rule takes the hit the
  other rules made (the game's when none matched), and the last rules combine among themselves as the
  others do: scales multiplied and rounded to a quarter heart (halves up), then adds, then min and max.
  oot::rules::apply_hit runs the two passes; LifeRule gains last in its padding (size 80 kept).
- player.lifeWrite, the game's other compare-and-swap of a life (add w12, w11, w10), never saw the mods'
  rules; only the native Damage taken scaled it. The core's engine callback there now applies Link's last
  rules over the hit that write takes off (oot::rules::life_last). It reads the published rules.life table
  with its reader count (game_sites::rules::with_live, the C's enter and leave), then heart protection as
  before. Both sites log the first 32 writes that lower Link's life, so a game run shows which write a hit
  goes through.
- A parity test runs a last rule at each Damage taken scale (0.5, 2, 4) against the native scaled_life on
  the same written hits at both writes: lives to 20 hearts, hits to 25 hearts, alone and after other mods'
  rules (147,258 hits).
- mod.json's reads ("<mod>:<id>", at most 32, only with a runtime) under the new permission settings.read
  (low risk, read only; each needs the other). settings.get("<mod>:<id>") gives the value of a setting reads
  lists, or null while that mod does not run; any other is UnknownNameError. settings.changed tells its
  changes with that id. The prompt's and the Mods page's permission rows carry the names
  (Asked/PermissionRow names, modsHost's names), and mod check prints them. Drawing them in the TS Mods tab is
  the UI2 helper's. The fake game puts the system mods a mod reads in its game, as it does its dependencies:
  systemMod(name).setSetting is what the mod reads.
- The schema (types.toml, api.toml, settings.toml, modsHost.toml), the generated reference, permissions and
  scripting pages, the website's mod.schema.json, and 4 new cases in tests/mod_vectors/manifest.json (the
  Launcher's reader needs reads to pass them). Docs: rules.md, settings.md, manifest.md, actors.md.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The Damage taken system mod was a native crate. Its handlers scaled Link's life at player.lifeHit and
player.lifeWrite. It is now TypeScript: src/main.ts keeps one last rule of rules.damageTaken with the
choice's scale (Half 0.5, rounding up; Double 2; Quadruple 4; none for Normal). The game applies it after
the other mods' rules at both of Link's life writes, then heart protection, as the parity test in the
commit before showed on written hits. It works while the Cheats mod's Debug tools are on, read through
mod.json's reads (system/cheats:debug_tools, settings.read), as the native mod was gated on
oot::debug::tools_on. Normal otherwise, or while Cheats does not run. The setting keeps its key, row and
place (damage_taken, store options, legacyId 55, shownIf system/cheats:debug_tools). Turning the mod off
takes its rule away.

Clean break: an input movie's Damage knob (the old option 55, oot::debug::movie's Knob::Damage) is
dropped. A movie naming 55 is told no such setting, and the clean-break item (movies set settings by key)
covers it: damage_taken by key.

- game/mods/damage: mod.json (runtime js, state.write + settings.read, reads; 2.0.0), src/main.ts,
  src/damage.ts (each choice's scale, Normal with the tools off), test/damage.test.ts (its row and options
  line, its scales, and Link's hits through its rule in the fake game with the Cheats mod's Debug tools
  off and on).
- The crate sysmod-damage goes, with its place in the workspace and longshot-game. The input movie's
  Damage knob goes from longshot-game's input.rs and oot::debug; its test says 55 is refused now.
- DESIGN.md, system-mods.md and sites.toml's comment say so. oot::sysmods::damage stays for heart
  protection and the parity test until the core's leftovers move out of oot::sysmods.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
A launcher asks the builder for a profile's mods and sources before the
player has set up the game. With the builder's flags before `mod`, as
docs/modding/tools.md writes the line, `--profile` first was taken for a
play, which stopped with exit 120 ("Longshot isn't set up yet") for
installed, resolve, source list, emulators and tags.

- main.rs: --profile/--output/--cache before `mod` run the mod tools
  (mod_line), never a play.
- installed/resolve/build-state: `game` is null while the profile's
  profile.json names no game files.
- installed: while no game folder is built, every built-in mod is listed
  from the build's own table (api::system::table, the native registry)
  with the new state `not-built` ("not built yet"), no load order.
- build-state, the one answer that needs a build, fails with `no_game`.
- Tests: modtool's state tests on a profile not set up, and CLI tests
  (tests/mod_no_game.rs) of each command, flags before and after `mod`.
- docs/modding/tools.md: the null `game`, `not-built`, `no_game`.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The launcher kept its own copy of the permissions (names, risk, prompt
words), already behind the schema. `mod permissions` lists them from
the API crate's bindings, made from the schema's [[permission]]s at its
build (not api.toml read again): each row's name, risk, the words the
player is told, system-only, off-PC, pattern and the grants that hold
it, in a versioned document (format 1). It is the stable interface, so
tools never chase the schema's folder. Documented in tools.md, tested.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
feat(api): the normalized manifest has reads, the other mods' settings a mod reads
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 16s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 30s
CI / Workflow lint (actionlint) (pull_request) Successful in 32s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 42s
Third-party parts / As their notes say (pull_request) Successful in 35s
PR description / Title and description (pull_request_target) Successful in 53s
CI / What the change needs (pull_request) Successful in 1m15s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Has been cancelled
CI / longshot-builder end to end (synthetic game) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
5f739998e7
mod installed's manifest is the game's reading of mod.json, so a launcher never parses it itself. It lacked
"reads", which the prompt and the Mods tab name beside settings.read: a launcher could not show which settings a
mod reads. It now sits next to requires and claims; tools.md says so.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
- check-json leaves tsconfig.json alone: TypeScript's JSON with comments, which tsgo reads (every TS mod and example has one).
- trailing-whitespace leaves a .tsv's trailing tab (an empty last column: menu_places.tsv's "before") and the CRT
  shaders as their authors wrote them.
- end-of-file: prelude.js, longshot-together.d.ts and save-tally's test end in one newline.
- ruff: unused imports gone (shaders.py, test_game_boundary, test_menu_hit, test_settings_decls, test_switch_table),
  test_menu_ini_keys' repeated grass_distance key, test_native_zstd's unused local, pipeline_tour's loop variable
  that shadowed an import, and the one-line compound statements of test_bug_report_defaults and test_crash_record
  split.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
fix(website): the settings page reads the game's rows from the system mods' mod.json, and the menu as it is now
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 21s
CI / Workflow lint (actionlint) (pull_request) Successful in 29s
PR description / Title and description (pull_request_target) Successful in 55s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 24s
CI / What the change needs (pull_request) Successful in 59s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 42s
Third-party parts / As their notes say (pull_request) Successful in 31s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Has been cancelled
CI / longshot-builder end to end (synthetic game) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
57db2f5428
game/menu/rows.c went (the renderer's table hands the menu the game's settings), and the build failed reading it. The
game's rows are now the settings with a place of the system mods' manifests (game/mods/*/mod.json: toggles, sliders,
choices and buttons, their section and after/before anchor). vk_menu.cpp's Row lost its cheat field, so heading is
the 12th field; a module row built at run time (game_rows.cpp's .row(s)) is not read as a designated row. A
coverage mismatch on a tab now names the rows on each side.

The guide's table follows the menu: Area name banner (the Area names mod's row), and the conditions of the rows the
menu shows only sometimes: Microphone level while Test microphone runs, and Compact menu key and Command palette key
not shown for now (their lines kept).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
fix(build): the shader preparation's early driver links the game's Rust
Some checks failed
Website / Website preview, upload (pull_request_target) Has been skipped
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 17s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 30s
CI / Workflow lint (actionlint) (pull_request) Successful in 31s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 53s
PR description / Title and description (pull_request_target) Successful in 1m3s
CI / What the change needs (pull_request) Successful in 1m1s
Third-party parts / As their notes say (pull_request) Successful in 54s
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Failing after 1m50s
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Failing after 2m42s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Has been cancelled
CI / longshot-builder end to end (synthetic game) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
e6d788f6dd
A build whose game folder's caches start from nothing (a first build on Linux: build-driver shaders::Early) links
the shader preparation's driver early, beside the compile (build-compile link_prepare). That link left out the game's
Rust (liblongshot_rs.a, linked into the game since #2411), so every Rust function the host calls was one of the
lifted game's stand-ins, 256 zero bytes of data: the driver's first call into it, before its first line of log,
stopped it with SIGSEGV twice, and the build said "The shaders were not prepared now (the game was stopped by signal
11)". The game then prepared them at its first start.

The driver now links the Rust as the game's link has it (rust_link, one function for both links: the carried library
or cargo's build). The stand-ins' log line names the first of them, so a stand-in that is called can be told apart.

Test: build-compile's the_preparation_s_driver_links_the_game_s_rust (the driver's link command carries the library
after the objects and before the system libraries).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The design's commit 2 (#2434 runtime design): a development switch that links the lifted game apart, as game.so
beside the runtime's executable, the build the boundary measurement runs on.

- RX_GAME_MODULE=1 (build-compile's GameLink): the lifted units and the lift's C but a64_fp.c (the game's Rust's exact
  float, which stays in the runtime) go into the module, compiled -fPIC, the C also -fvisibility=hidden
  -DA64_GAME_MODULE; host/nn_libc.c's guest libc hooks go in with them, built against the module's own tables
  (HOS_WRITTEN under A64_GAME_MODULE is an inline mark, not an import of hos_mem.c's). RX_GAME_MODULE=runtime-libc
  leaves the hooks in the runtime: the measurement's control. Windows is refused for now (the exe's import library
  comes later).
- The module is linked -shared with a version script (ls_game_module its one export, local: *), so lld binds the lifted
  code's calls and loads of its own symbols inside it; --gc-sections and hfsort as the one executable. The replace
  sites' thread-local stays general-dynamic there.
- The export list: link.rs reads the module's undefined dynamic symbols that name no version (a small ELF reader:
  .dynsym, its strings, .gnu.version), and the executable is linked with an EXTERN for each and
  --export-dynamic-symbol-list. Then every strong import must be among the executable's exports, or the link fails
  naming the missing ones.
- a64_unimplemented, an import stub's hook, is the runtime's own (host/hos_hostcall.c), as the OS layer's other
  hooks are: a64_rt.c's weak default is left out of a module, which imports it.
- host/game_module.c: with no game linked in and no LONGSHOT_GAME_MODULE, game.so (game.dll) beside the executable,
  so a development game folder (finished_files copies game.so there) and a future export start as they are. The start's
  log names the module loaded.

Tests: build-compile's plan of the three links (which unit goes where, with which flags; Windows refused), the switch's
parse, link_guards' export-list check with the PC's clang and lld (a module's strong, weak and libc imports; an
executable with and without the lists); test_game_module's runtime loads game.so beside it; test_game_module_imports links the module's own C (the lift's
runtime, nn_libc.c, stand-ins of gen/) as game.so is linked and finds each of its imports defined by the runtime's
sources, without a game.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The runtime design's decision Q5 (2026-11-25): Longshot's runtime is built at x86-64-v3 alone, so a CPU without v3's
features (AVX2, FMA, BMI2, MOVBE ...) is told "this CPU is older than Longshot needs: x86-64-v3, about 2013 or newer"
when a build starts, before the lift. It was built at x86-64-v2 or x86-64 before. The game module stays -march=native.

- build-compile's toolchain: CPU_TOO_OLD, cpu_has_v3 (the processor's own answer, std's feature detection) and
  check_cpu, which RX_MARCH passes (a developer's build for another PC). cpu_flags refuses the same way, and the
  /proc/cpuinfo fallback that picked v2 or x86-64 is gone.
- build-driver's build checks it first.
- Docs: the requirements (AVX2 required), common issues, the RX_MARCH row.

Tests: check_cpu with and without v3 and with RX_MARCH.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The runtime design's decision Q4 (2026-11-25), in game/DESIGN.md's Deferred: no Authenticode signing yet; SHA256SUMS
stays the one signature and the builder checks the runtime against it at unpack; the certificate is chosen when signing
is built, its key a sealed release secret; the game module and the DLSS plugin, linked locally, stay unsigned.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
What a script needs to skip the title screen as the native Skip title mod did:
- storage.saves.start() (state.read): the most recent progress.sav the file list opens on, and HOS_START_SLOT
  resolved against the saved slots (newest, a slot with its moves from the newest, or a choice left to the list).
  The native mod's slot.rs and its newest-save search, moved into api::save_start with their tests.
- GameState.loading: the game's own load flag, at the title too, where a save's load from the file list begins
  while mode still says title.
The fake game's setState takes loading (the flag alone, as at the title).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The skip's machine is machine.rs ported line for line to src/machine.ts, and its tests are the native ones one for one
(test/machine.test.ts: its parity). The game reaches it through the public API only:
- the game's button waits: a capture rule at its own sites menu.buttonWait and menu.buttonWaitNoDecideAnim, the
  screen's name at [wait+0xe8]&~3:ptr (47 bytes, ring), read with captures() at the next frame (told.rs);
- input.press for A held 200 ms and the file list's moves; gfx.renderer().menuOpen holds the skip;
- game.state(): mode play or movie is the player running, loading the load after the check's A;
- storage.saves.start(): the newest save and HOS_START_SLOT (slot.rs, now api::save_start).
The rules are set only while the skip watches (the row on at the start, or a slot chosen) and cleared once it ends.

Skip opening is rules.skips of the opening's two events, Opening_Introduction and Opening_LoadingKokiriForest, the
same arm, timeline hold and skip answer the core's opening skip gave at the same three sites (each event starts only
its one timeline, Dm_Kokiri_0030 and Dm_Kokiri_0000). That skip, oot::session's set_skip_opening and its layout go:
the sites answer the mods' skips alone. The mod now asks state.write, so its multiplayer is "all".

Breaking: system/skip-title is a script mod (2.0.0); its settings keep their keys and places.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
With Damage taken and Skip title screen TypeScript, what was left in oot::sysmods was shared core code under a mod's
name. Heart protection, the core's engine callbacks at player.lifeHit and player.lifeWrite, is oot::heart_protection
(its layout layout::heart_protection; Link told by oot::session::is_player, the same fields); with no scale left it
keeps the life through a hit and leaves healing as the game had it. event_running, Sprint and walk's, is
oot::state::event_running over state's own event manager read (its named location, the same field). The unused switch
helpers go; the damage rules' parity test keeps the native scale it is measured against.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
- romfs.load(path, { zstd?, dictionary? }): a file whole on a reader thread of Longshot's (lsmod-romfs), its Promise
  settled at a later frame; with zstd, decoded with the game's dictionaries, a frame that names none with the
  dictionary named (bcett.byml.zsdic for a map file). At most 64 MiB, 8 loads of a mod waiting. A mod's layer is read
  and decoded there too (host_sys::romfs::zs_decode_named over host/zs.c's hos_zs_decode_named); the host's index
  through host_sys::romfs::Later, which the stand-in host serves from the bytes it had at the call (its RomFS is the
  test thread's).
- game.flags.placement(id): a placement's Bool64bitKey flag by its 64-bit id, null when the game data has none; where
  each was found kept (64 ids), so a read after the first is one entry.
- player.provideStat("heartContainers", n | null): a mod gives the core a count it cannot read alone. The last given
  wins, the one before comes back when that mod stops; oot::travel's map refresh makes the pieces of heart from it
  (set_heart_containers_taken). The native mod's fn source stays beside it until that mod is ported.
- The fake game: romfs.add and romfs.remove (typed already, never there), game.stats (what the mods gave).
- The reference, the permission table and the guide regenerated; unsafe.md tells load.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The eight dungeons' map files are read once, the first time Link is in play, with romfs.load (zstd, bcett.byml.zsdic
for a frame that names no dictionary) on Longshot's reader thread; src/byml.ts, the native BYML reader line for line,
finds each Obj_Heart_Container's placement id; their flags are read with game.flags.placement every 2 s and the count
given with player.provideStat("heartContainers"), which oot::travel's map refresh makes the pieces of heart from (its
native fn source goes). The log line is the native one's. Its parity: test/parity.test.ts, the native tests' cases
and fixture (test/map-file.ts is its map_file), answered as the native code answered them; test/heart-containers.test.ts
runs it on the fake game. The crate sysmod-heart-containers goes from the workspace and longshot-game; DESIGN.md and
system-mods.md say so.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
fix(skip-title): a capture name for each of its two sites, so setRules takes its rules
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 13s
CI / Workflow lint (actionlint) (pull_request) Successful in 33s
PR description / Title and description (pull_request_target) Successful in 49s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 21s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 40s
Third-party parts / As their notes say (pull_request) Successful in 31s
CI / What the change needs (pull_request) Successful in 1m40s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Has been cancelled
CI / longshot-builder end to end (synthetic game) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
038beefa3c
Its rules named one capture "screen" at both menu.buttonWait and menu.buttonWaitNoDecideAnim, and longshot/hooks
refuses a capture name used twice: in the game the mod did not start ("setRules(): rule 2: the capture screen is
named twice"). Each site has its own now (CAPTURES: screen_a, screen_b), read the first site's then the second's
each frame. Tests: each rule's capture name is its own, and with the row on at the start the mod takes its rules and
runs with no fault.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
fix(crt): lottes.glsl is as its author wrote it again, so its .spv matches its source
Some checks failed
Website / Website preview, upload (pull_request_target) Has been skipped
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 21s
CI / Workflow lint (actionlint) (pull_request) Successful in 39s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 41s
Third-party parts / As their notes say (pull_request) Successful in 49s
PR description / Title and description (pull_request_target) Successful in 58s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 54s
CI / What the change needs (pull_request) Successful in 1m43s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Has been cancelled
CI / longshot-builder end to end (synthetic game) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
2265afc32e
The website fix's whitespace pass stripped the shader's trailing spaces, and the
check that each .spv was compiled from its source refused it. pre-commit already
leaves game/mods/crt/effects/ alone.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
mod check read every folder as a player's mod, so each built-in mod was refused for its system/ id. A
folder of a checkout's game/mods/ (beside game/crates/api/) is now checked as the game takes its own,
by check_built_in; a player's folder claiming a system/ id anywhere else is still refused.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
fix(skip-title): its capture names are screenA and screenB, names longshot/hooks takes
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 24s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 47s
CI / Workflow lint (actionlint) (pull_request) Successful in 53s
Third-party parts / As their notes say (pull_request) Successful in 1m6s
PR description / Title and description (pull_request_target) Successful in 1m14s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 1m25s
CI / What the change needs (pull_request) Successful in 1m46s
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Failing after 4m23s
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Failing after 5m58s
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Failing after 2m10s
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Failing after 7m6s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Successful in 2m53s
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Successful in 1m38s
CI / Website build and checks (pull_request) Failing after 5m1s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Failing after 16m32s
CI / longshot-builder end to end (synthetic game) (pull_request) Successful in 17m51s
93c7a8e8ae
The names of the commit before, screen_a and screen_b, are no capture names (a lower-case letter then letters and
digits): setRules refused them, as mod test's new test of the row on at the start showed. The test of the names
checks that form too.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
## Summary

Restore Windows controller input when the Rust game runs inside the AppContainer. The broker opens the SDL devices and gives the game a dedicated controller connection. The Switch 2 Pro USB driver and its NFC reader are unavailable in the Windows sandbox.

Rebased on Rust Mod API #2434 at `b9ac71657`. This supersedes #2016. The controller connection is restricted to the game process or its same-image relaunch, and the broker carries the virtual-controller flag. The forge target is `mod-api`. [Controller-only diff](b9ac716574...f8b0c6c68c)

## Testing

**Previous hand test at `7448586ca`.** Windows 11, one 8BitDo Ultimate 2 over Bluetooth, AppContainer enabled. On the Rust API baseline there was no gameplay input. With this change, movement and L-menu input worked in Adult Kakariko.

Before the latest changes, both C fixtures compiled and passed on Windows with llvm-mingw Clang via `tests/test_pad_broker_route.py` and `tests/test_pad_broker_state.py`. They cover input routing, session ownership, snapshot bounds, disconnect and reconnect handling, and sensor recovery.

**Still to test:** Windows gameplay on the rebased head, the full project suite and Linux build. Physical reconnect, gyro and rumble remain to be exercised by hand.

The standard Windows builder at this #2434 revision misses the ImGui include flags for `vk_ui2.cpp`. The local play builds use the renderer's existing ImGui flags for that file.

## Measurements

**Verdict:** The same controller regained gameplay input with the sandbox enabled.

| Observation | Before, Rust API at `563ca4e55` | After, earlier hand test at `7448586ca` |
|---|---|---|
| Gameplay input over Bluetooth | No response | Movement and L-menu input worked |

Input latency and frame time have not been measured.

## Risks

This changes the controller broker handshake and snapshot format. Use a broker and game from the same build. Hardware coverage currently includes the reported Bluetooth controller on the previously tested revision.

## Checklist

### Ready for review

- [x] Focused change based on the Rust API revision targeted by this PR.
- [ ] Repeat the Windows in-game test on the rebased head.
- [ ] Full suite passes or baseline failures are documented.
- [ ] Performance measurements recorded.
- [x] Only source, tests and project documentation are included.

### When it applies

- [ ] Game-free controller routing and state checks pass on this head.
- [x] Controller broker documentation updated.
- [x] AI assistance recorded in commit trailers.
- [ ] Linux build confirmed.

### Ready to merge

- [ ] Review and CI complete.

Co-authored-by: snaildev99 <[email protected]>
Co-authored-by: BeanBot <[email protected]>
Reviewed-on: #2516
fix(menu): a tab or page switched to is drawn whole from its first frame
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 13s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 30s
CI / Workflow lint (actionlint) (pull_request) Successful in 31s
Third-party parts / As their notes say (pull_request) Successful in 34s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 40s
PR description / Title and description (pull_request_target) Successful in 44s
CI / What the change needs (pull_request) Successful in 53s
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Failing after 2m17s
CI / Website build and checks (pull_request) Failing after 2m22s
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Failing after 4m46s
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Failing after 8m3s
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Failing after 6m34s
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Successful in 42s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Failing after 7m17s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Successful in 14m26s
CI / longshot-builder end to end (synthetic game) (pull_request) Successful in 17m38s
7ad733f754
Switching tabs (or opening a page, or Back) drew the new page once with
the rows read for the page before: its toggles, choices and sliders had no
state yet and were left out, so for a frame the page showed only its
buttons and lines, a flash on every switch. The rows are read for the
page shown when it is not the one they were read for, before it is drawn.
The rows' change check holds the page too, so another page's rows in the
same states are never taken for these.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Eight 60,000-actor fixtures: read in one Promise continuation each, the BYML scan ran past the callback's 5 ms and faulted (the full check: 5.1 ms, no count on three slots).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The BYML scan compared each dictionary key and each actor's Gyaml as strings; it now looks the keys and the kind up once and compares their table numbers, and scans 512 actors a step, a frame between steps (scanActorIds, after(0)). The files are read one after another, not all at once.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
f_838cffb0, the whole step physics.stepped was after, is never run in play: an observe-only listener heard nothing in 60 s, and its unit (with f_838d0080's, physics.steppedOther) is cold in the shipped profile. f_838cf8e0, the manager's end of a step, is hot and releases the same world's lock ([x19 + 0xc8 + 8 * w20] + 0x88): the site is now its lock's add, before the release.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
test: the Skip title and Area name banner rows are their TypeScript system mods'
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 10s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 30s
CI / Workflow lint (actionlint) (pull_request) Successful in 30s
Third-party parts / As their notes say (pull_request) Successful in 33s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 34s
PR description / Title and description (pull_request_target) Successful in 39s
CI / What the change needs (pull_request) Successful in 1m13s
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Failing after 3m42s
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Failing after 1m57s
CI / Website build and checks (pull_request) Failing after 1m13s
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Failing after 7m12s
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Failing after 6m30s
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Successful in 37s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Failing after 3m56s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Successful in 15m40s
CI / longshot-builder end to end (synthetic game) (pull_request) Successful in 19m58s
20085f36b0
test_dev_ab read the menu's rows from Rust built-in mods' mod.json only and the skip-title mod's lib.rs/hooks.rs, both gone since it became TypeScript: it reads every built-in mod's settings and its skip.ts and machine.ts. test_settings_table: Area name banner is the area-names system mod's setting now, one of GAME_ROWS.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The game compiles a mod's screen effects from its .glsl, so the sepia-photo and scanlines examples carry the GLSL
alone; their READMEs say so.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
scripts/shaders.py all compiles every shader of ours with the pinned glslang 16.6.0: the renderer's SPIR-V headers
(fsr3, host, and a new BUILTIN table of the other 40, whose outputs are word-identical to the old checked-in headers)
in place under gpu/vk, gitignored, and the built-in mods' effects into gen/shaders/mods. gen/shaders/STAMP names each
input's SHA-256 and each output. dev.py's builder, run_all, mise run shaders/test/ci/rust, CI (scripts/ci_shaders.sh)
and the release run it; the builder's compile refuses a tree with a missing or stale STAMP, and the pack carries the
outputs, so a player's PC compiles none. The shader tests check that each compiles (twice to the same bytes) instead of
matching a checked-in file; the host headers' notices move to <name>.notice. from-source runs shaders.py for a commit's
archive.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Their .glsl.spv are no longer checked in: scripts/shaders.py mods compiles them into gen/shaders/mods, and
schema::system_mods::shipped lays them over each folder, so the table's hash (shipped_hash) covers exactly the
.spv the builder installs (build-driver's system_mod_files). A .glsl with no compiled effect is refused with the
command that makes it. The crt, colour-vision and output-fx parity checks read the compiled effects; the "compiled from
another version" check is now the build's.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
build(api): a plain cargo build compiles Longshot's shaders itself, or leaves the uncompiled mods untrusted
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 23s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 52s
CI / Workflow lint (actionlint) (pull_request) Successful in 54s
Third-party parts / As their notes say (pull_request) Successful in 1m0s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 1m6s
PR description / Title and description (pull_request_target) Successful in 1m21s
CI / What the change needs (pull_request) Successful in 2m21s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Has been cancelled
CI / longshot-builder end to end (synthetic game) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
81202e2417
api's build script runs scripts/shaders.py all --pinned (glslang 16.6.0: LONGSHOT_GLSLANG, the development folder's
or the PATH's; nothing written when the STAMP is current), so cargo build and cargo test just work after mise install.
With no pinned glslang, a tools or tests build leaves the system mods whose effects are not compiled out of the table
(schema::system_mods::read_leaving: the game trusts none of that name) and says so in one cargo warning; a game build
(the game profile, or LONGSHOT_REQUIRE_SHADERS=1) still stops. It runs again only when shaders.py, the shaders, the
mods or the STAMP change.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
feat(gfx): the game compiles a mod's screen effects at its start, cached
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 20s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 47s
CI / Workflow lint (actionlint) (pull_request) Successful in 48s
Third-party parts / As their notes say (pull_request) Successful in 57s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 1m2s
PR description / Title and description (pull_request_target) Successful in 1m13s
CI / What the change needs (pull_request) Successful in 1m53s
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Failing after 2m35s
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Failing after 3m4s
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Failing after 1m37s
CI / Website build and checks (pull_request) Failing after 1m38s
CI / longshot-builder end to end (synthetic game) (pull_request) Successful in 3m15s
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Failing after 8m0s
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Successful in 44s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Failing after 2m26s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Failing after 18m11s
5cb4fa399a
A new crate, effect-compiler (shaderc, glslang inside, linked into the game's Rust), compiles a mod's .glsl when the
mod makes the effect: the host's ShaderCompiler (api), cached by source and compiler in the shader cache folder's
mod-effects/ (longshot-game). The template check runs on the result; a compile error is the mod's ArgumentError with
its file and line, the effect off. A system mod's prebuilt .glsl.spv is used as before. Packages carry no .glsl.spv
(mod pack leaves them out); mod shaders and the fake game use the same compiler. shaderc's, glslang's, SPIRV-Tools'
and SPIRV-Headers' notices go in third_party/shaderc, the About page's credits, the README and the game folder's
licenses/. examples/compile_time times a cold compile.

shaderc is C++, so the builder's Linux game link (build-compile) now links libstdc++ statically
(-Wl,--push-state,-Bstatic -lstdc++ -Wl,--pop-state; a Tracy link already does); llvm-mingw's Windows link already
has -lc++ -lunwind. Linked cost on Linux: +7.8 MB stripped, +9.2 MB as shipped; longshot_vk.so unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
swash 0.2.10 read fonts with skrifa 0.44 while parley 0.13 shapes with skrifa 0.49: two font readers in the game. The
atlas now draws each glyph's outline with skrifa 0.49 (unhinted, at the layout's size and variation coordinates) and
rasterises it with zeno 0.3.3, the rasteriser swash itself used, in the same placement and sub-pixel buckets; faux bold
moves each contour's points out along their corners' bisectors (FreeType's FT_Outline_EmboldenXY, swash's port of it).
skrifa 0.44 stays in the lock only for Slint's crates (the builder's and launcher's UI), not the game.

A colour glyph (COLR layers, a bitmap strike) is drawn as its outline glyph, a coverage mask in the text's colour: no
font the game reads has colour glyphs (Libertinus, the game's menu fonts, the system's CJK, Arabic and Hebrew fonts),
and the RGBA8 pages and the contract's IMAGE glyph path stay for a font that has them.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
taffy lays a border out a width a side, but the draw list's quad carried one (the widest) and today's drawer drew one
ImGui radius (the largest corner's) and cut to scissors only. The contract's version 2 (MKW_UI2_VERSION 2, the quad 112
bytes) carries the four widths (left, top, right, bottom): a shape's fill is the rounded rect inset by them, each inner
corner's radius its outer one less the wider of its two sides (draw::inner_radii), as the reference renderer and the
contract's GLSL now say.

vk_ui2.cpp draws the frame as convex polygons with ImGui's anti-aliased fringe: a rounded rect with its own radius at
each corner, a border as the band between its outer and inner edges (a strip with a fringe each side), images as
rounded textured polygons (AddImageRounded's way). A clip's rounded rect cuts what reaches one of its corners by
tessellation: the polygon is cut by Sutherland-Hodgman with its texture coordinates and colours carried along (a
border's band piece by piece, unfringed), so a glyph, an image, a shape or a Canvas's triangles in a rounded window's
corner are rounded too. Shadows stay a few fading rounded rects. The SDF maths stay in reference.rs for the renderer's
own drawer.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The full check on b9ac7165 failed in UI2's code:
- clippy (Rust 1.99): chunks_exact with a constant size is as_chunks; the complex types are aliases (canvas::ImageOf,
  style's Blocks, text's Cut); the nested ifs collapse into let chains and a match guard; the resolver's cache holds
  Rc<Computed> (taffy's Style is neither Send nor Sync, and the resolver lives on the UI thread alone); a label's
  arguments are allowed; ui2_metrics' loop counter is a zip.
- core's tests: a Window's (and a Scroll's) children ran across, taffy's default row, so two Pressables in a window
  were 0 px wide side by side: the D-pad found nothing below and a click hit nothing. A Window's and a Scroll's
  flexDirection is column unless their style gives one (Computed::flex_direction_set); a Box keeps taffy's row.
  Hiding the game's HUD took a HUD root out of the roots shown but, nothing being dirty, made no new frame: a root
  shown no more now makes one.
- mod test's game.ui2.snapshot() gave the PNG as base64 where the guide and the tests read bytes: it is a Uint8Array.

The tests could not be run here (tests run only in the queue): the batch job runs game-ui's tests and the
ui-next-demo example's.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
l4u2-1's run left two failures. A window whose first control is a List never gave it the focus as it opened: the
want-focus pick took focusable kinds alone while the D-pad's walk counts a List, so the first Down only reached the
list. It is picked as the walk picks it. The test's walk also stopped before the rows asked for could leave 0 (four
to spare each side): it walks 20 rows now.

The UI2 demo's tests walked game.ui2.tree() as nodes, but it is the roots ({ mod, root, surface, closed, node }), so
they found no rows: they walk each root's node. ui-next.md's line for tree() says that shape.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
A style a mod gives as a plain object was interned for the run, so one made anew for each value of a number filled
the 4,096 a mod may hold. The reconciler now counts the host nodes that name each such style and, at the end of a
flush, sends ["unstyle", sid] for those none names (styles()'s are kept). The main thread's Shadow refuses an unstyle
while a node names it and frees its place in the cap; the main thread's resolver and the UI thread's drop the style and
the resolutions that named it. measure() measures with a style no batch has sent yet (its definition was passed and
ignored).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
UI2 gets what the old mods' UI has and it lacked (game/DESIGN.md, "Later" steps 1 and 2; contract version 3).

- Text: the input method's composition comes from the host (MkwVkHost.text_compose: SDL's text editing events,
  Windows' WM_IME_COMPOSITION through imm32, loaded when first needed, whose result is typed as code points), its
  windows are placed by the field's caret (text_area), and Ctrl+C and Ctrl+X put a field's selection on the system's
  clipboard (MKW_UI2_OUT_COPY, clipboard_put; the window's thread writes it). Ctrl+A, C and X reach a field.
- The output says the focused control's label (a new input prop) and help: the Insert menu's help box.
- World roots: a World kind mounted on "world" (gfx.world): the main thread places each a frame (its point or its
  actor, actors.read), the UI thread paints it above its point, and the frame's root groups (MkwUi2Root) let the
  renderer put it on its own picture, scale it for metres, fade it, test it against the scene's depth, or draw it in
  the scene into the world layer's atlas (occlude "depth").
- Slots: a Slot kind other mods fill by name (mount { surface: "slot", mod, name }, made a hash by the main thread),
  and ModPage (a Slot with of: that mod's settings page); a filler is laid out in its slot's width, drawn where its
  owner painted the slot, and its controls join the owner's focus.
- The hosted page: the renderer asks for a mod's settings (or debug) root laid into a rect (MkwUi2Input.host_*); the
  Insert menu hosts system/menu's this way once it shows, gives it its input (MKW_UI2_IN_HOSTED), draws its help box
  from the output and its prompt bar, typing prompts while a field is typed into; Back the page does not take and its
  @close controls come back as MKW_UI2_OUT_BACK and CLOSE.
- HUD roots take id, title, anchor and margin; the Mods tab's HUD layout lists UI2's and its places (another region,
  hidden) reach the UI thread.
- Image and Icon take tint; Icon takes item (the game's picture of an item, through the item icons' reader);
  thumbnails (capture:) are UI2 images too.
- Headless, the UI is ticked at the shots' size and drawn into each (menu_record_image).

MkwVkHost version 66 (after 65's engine_text): text_compose, text_area, clipboard_put.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
What the old mods use that UI2 lacked (plan step 4): a Compare kind (two children over each other, each on its side
of a divider the player drags or moves with Left and Right), a Slider's value shown at its end (its options' text of
the step, or the number and its unit), a fullscreen Window (the whole screen, never dragged), a Scroll's selected
child kept in view, a Scroll's or a List's follow "end" (it was parsed and never acted on: kept at its end until the
player scrolls back from it), and a hosted debug page's open and close events. The runtime and the types have them.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
One longshot/ui, the new one (the mod API has not shipped: no alias, no shims). The UI group of game/modapi/ui/runtime.js
is evaluated with UI2's natives alone, so longshot/ui and longshot/ui/jsx-runtime are what longshot/ui/next was, and
longshot/ui/next/kit is longshot/ui/kit; the old group's members (the old channel's commit, onEvents, requestFlush) are
gone. longshot-ui.d.ts is UI2's types (with the Canvas's, the icons' and the world's that it took from the old file).
The switch LONGSHOT_UI2 goes: the UI thread is always made and the renderer always draws UI2. docs/modding/ui.md is the
guide of the new API (the old ui.md and ui-channel.md go; links follow), and the UI2 demo is the UI demo
(docs/modding/examples/ui-demo). The generated docs are regenerated.

Not yet: the mods written for the old API (the menu, the Mods tab, the inspector, area-names, discord and the examples)
are ported in the next commits; until then they do not load. The old channel's code (api::services::ui, vk_modui.cpp,
the runtime's NEXT-false branches) goes after them.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
A Box lays its children in a row, so the filler's Pressable, with no children and no width, was 0 wide: a hit
with no area is not shown, and the focus skipped it. The filler's root now runs down as a page does (as the
kit's pages do); the slot's measuring was right.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The old channel's game.ui goes with the old path, so a mod's tests need the same reach over UI2:
- game.ui2's tree gives each node what a test finds a control by and reads (focusKey, label, help, title,
  options, selected, disabled, autoFocus, name, of, unit, dock, passInput) and a Slider's or a Choice's number.
- game.ui2 finds nodes (nodes, find, findAll, query, text: a Text's text, a RegExp or a kind and props), hosts a
  mod's settings or debug page as the Insert menu hosts one (host), and acts at once as the player would
  (change: a Slider's, a Choice's, a Tabs', a List's, a TextInput's or a Keybind's value; activate, submit,
  reset), through Core::change and Core::act.
- game.ui2.look says how a node is drawn (its colours, text size and weight, opacity) and color() a colour as the
  theme draws it, so a test checks a look without reading styles.
- The fake Mods tab takes a mod's permissions with their names; perms::risk_name is public for it.
- The kit's Button takes label (its name for the help box) and onReset, its Toggle onReset and gives its label as
  the Pressable's: the menu's rows keep their names and Delete.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The menu mod mounts one Box on "settings" (vk_menu hosts system/menu's as its body): a Tabs of the
renderer's tabs (only the shown panel drawn; the Mods tab's a Slot system/mods-tab fills), each page a Scroll
of the kit's Sections and rows. A toggle is the kit's Toggle, a choice, slider and text a Field around its
input (its label the input's name for the help box), a binding a Row of its inputs, a ranged line (the
Microphone level) its text over the kit's Progress, About and the questions Sections of the page. The focus
keys are as before ("@back", "@no", "@yes", "@close:" and each row's key), so Back presses the page's own
control and Tune closes the menu. The tests host the page (game.ui2.host) and read UI2's tree.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The tab fills system/menu's slot "mods" with the kit's Rows, Sections, Buttons and Toggles; a mod's own page
is a ModPage on its page. The list's first drawing is spread over frames, a part a frame (the lines above,
each 12 mods, the loose cheats, the lines across mods, the safe start's), so no frame's script runs long. A
mod's name is drawn once on its line (its switch draws none), and each permission's names (settings.read's
other mods' settings) are drawn under it on the permissions page and in the prompt. The tests read UI2's tree.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The Canvas goes: the banner is a styled Box (a dark rounded box as wide as the name, 320 to 1200 virtual px)
holding the name in UI2's own text, mounted as the HUD root "banner" at the top centre. Its fade is the
box's opacity in 32 steps, so it interns at most 33 styles. The tests read UI2's tree and layout.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Their HUD and window are UI2's: named styles for the looks (a colour token, the bold of a low count), the
kit's Row, Column and Badge, a List with its row size, mount()'s surface and HUD place. Their tests read
UI2's trees (game.ui2: text, find, look, activate, submit).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Three of l4u3-1's checks failed for the UI2 port itself: test_ui2_renderer still read draw.rs's VERSION as 2
(contract v3 made it 3); test_menu_text_field's cut of rx_backend.c holds the input method's composition buffer
but not hos_text_compose, which fills it, so -Werror called it unused (named once after the cut now); and
vk_modui.cpp's Canvas comment anchored the deleted ui-channel.md (ui.md's Free drawing now).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The Insert menu now gives UI2 its banner with the hosted page (MkwUi2Input.bar_rect, MKW_UI2_VERSION 4): the page's
top Tabs (the first Tabs down its Boxes from its root) is laid out with no strip of its own, and its titles, with the
tab keys' caps either side, are painted into a root group of their own (MKW_UI2_ROOT_HOSTED_BAR) that vk_menu draws
in the banner after the page, outside its clip, where the menu's own tabs are; the titles are clicked there.

A mod's UI2 debug page opens in play, the menu closed: its key (mods_debug_keys, for every mod with a page and a key,
the old UI's pages still theirs) toggles it, and the Mods tab's new Open debug page line (modsHost edit "debug",
refused unless the mod mounted one) closes the menu and opens it (renderer setting "@debug:<mod id>"). vk_ui2 hosts
it in the middle of the picture with the input and draws it itself; Back, its "@close" control or its close box
closes it (a hosted page's close box now asks its host to close it).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
What the examples' and the inspector's tests read of the old game.ui, on UI2: windows() and window(title) (Core::windows:
open, focused, the frame), close, move and resize as the player's presses on the close box, the title bar and the
grip, clickOutside at a point no window covers; canvas() (Core::canvas_of: the draw list as the game keeps it, its
colours as color() gives them); image() (the main thread's state of an image: ready with its size and bytes, failed
with the host's why, loading); debugPage(), openDebug() and closeDebug() (the page hosted as the menu hosts it); and
commits and lastBatch, each mod's batches as the UI thread got them (Change::summary).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Its tests read game.ui2: the HUD's and the window's text, the badges' looks, the batches, the window list, its focus,
a click outside and the player's close.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Its tests read game.ui2.worlds() (each World root and where the host placed it, which the fake game now keeps from
the main thread's places) and open and close the debug page as the player. longshot/ui's Window types onOpen (a debug
page's), which the runtime already heard. ui.md's debug page: the Mods tab's Open debug page line, in play.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The reconciler's own tests move to game.ui2: the batches' changes, windows by their titles, the kit's Toggle by its
label and selection, a Slot filled by a mount on it, a List's row pressed, a style out of its range refused by the
host, the Canvas's draw list as the game keeps it, an image that fails, and HUD roots mounted from an effect. The
hiding of a HUD root with the game's HUD is the host's, checked by game-ui's core tests.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The line shows for a live mod granted ui.settings and for no other. Pressed, it asks modsHost's edit "debug", which
the game's host refuses unless UI2 holds a debug page of that mod (Services::ui2_has_debug): the tab logs the refusal
once and the loader gets no edit. The page opened in play is the renderer's, checked in the game.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Each frame after a tab switch, a page opened or Back must show either the
page before (the menu not drawn again yet) or the new page with every
row. It fails while the new page's first drawing uses the old page's rows
(only its buttons and lines shown, the flash on a tab switch).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
system/mod-inspector 0.6.0 is TSX on longshot/ui (src/main.tsx): a fullscreen Window mounted open with the focus,
unmounted when the player closes it (Esc, B, its close box: onClose hears it), the corner line a HUD root. The layout
is UI2's flex layout over styles() (the panes fill the screen, the table half of it), so the old body metrics and
onLayout of the Window are gone; each graph's Canvas draws at the size it was laid out at (onLayout). The bars are
its own track and fill, in the inspector's tones.

The test moves to game.ui2: windows(), window(), focused(), close, nav back, clickOutside on a fullscreen window,
canvas(), layout(), look() and color(), activate() and change(). The key closing the open window, the body sizes
and the mouse's hover readout are no longer tested: a focused UI2 window takes the mod's action, the fake screen is
1920x1080, and the game sends a Canvas only its presses.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The pointer reached no row: a List is not a focusable kind, so its press found no hit and its onPress never heard a
click (link-hud's and ui-cases' tests). The row under the pointer is selected on the press (a change) and pressed on
the release over the list, as Enter presses the selected row. A core test clicks row 1.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The lint counted every Window as ui.window, so Enemy Names (its debug page a Window on "debug", with ui.settings)
failed every_example_passes_but_the_one_that_breaks_every_rule.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Minimap's styles named width and height at the top, which UI2 refuses (size: { width, height }); Link HUD's List had
no height, so one row showed and the rest were cut.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The permission's words on its page are the loader's (the schema's), not what the fake tab was given.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
A window is as wide as what it holds and a Slot as wide as its parent; the test's Pressables had no width, so the
filler was laid out 0 wide, its control never shown to the focus, and Down stayed on the owner's control.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The fake game has no Link until a map is entered; with none, the mod mounts no label (as "no Link, no labels"
says), so the test read 0 World roots.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
In the game the tab's stateChanged listener ran past its 5 ms of CPU (modsHost.tab 22 ms on the wall clock) and the
tab was stopped: while the menu is open the loader publishes a new snapshot every frame, and the tab read and
converted the whole list on every change. modsHost.tab now keeps its answer and what it was made from (the
snapshot's contents, the builder, safe start, the cheats and the pages' screen effects) and gives it again when they
are the same; the tab reads the list in its frame callback, once for every change heard since.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
In the game system/menu's frame listener ran past its 5 ms of CPU (settingsHost.rows 12.8 ms on the wall clock in one
call for a whole page; 923 API calls in the frame) and the menu was stopped before it showed. read() now reads the
shown page's rows in passes of 16-row calls, about 1 ms of the wall clock a frame, and changes the data once a pass
is done; a tab or page switched to is drawn once its rows are all read (the page before till then), so it is still
never drawn with rows missing. The questions are read every frame. host.texts answers are kept until the
declarations' generation moves on, instead of asked again at every drawing.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The rows-in-passes change drew nothing (Loading) until a pass over the first page ended, and a tab switched to only after its pass, frames later: the menu's tests found no Tabs after two frames. Now only the re-reads of the page shown go in passes; the first page and each switch read their rows whole that frame, so each is drawn whole from its first frame. Between passes the drawn view follows the current one.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
list_range clamped the last row to count - 1, so a List that grew (link-hud's rupee log: 0, then 1, then 2 changes) kept the range of its old count and rendered only its first rows until a range event came back a frame or more later. The runtime already clamps by its count.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
cheats, shadows, sprint-walk, voice-language, widescreen and the site-rules example failed mod test with no tests: each now starts with no fault and reads its settings back as set. Discord's test read golden.json through node:fs, which a mod's import refuses; it imports it as a JSON module.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The fake game runs other mods beside the tested one, as the loader does:
game.addMod runs a mod from its folder (its grants, off, load order by
dependency; a required mod switched off keeps its dependent off), and
game.fakeMod a stand-in with no files that the services know as a running
mod (manifest, grants, claims) whose exports and events are the test's
functions, handed to the test runtime by a ScriptHost wrapper during the
together step. game.modStats gives inspect()'s numbers (the fake times
nothing; api's InspectRow gains given numbers over the worked-out ones,
counted in the totals, nativeMs included), the stand-ins' log lines go to
the rings at their frames (LogRings::push_at), game.controls lists what
mods.control asked, and a system/... mod under test runs as a system mod
(game.system). Tests of the fake itself; mod-inspector joins the system
mods' test list; lib-and-dependent's tests run, its stopped-library line
matching the engine's real message.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The Mods tab's list (a settings page the Insert menu hosts) stopped Down for good on its "Mods tab" row (lead4-win,
the windowed batch: shots of RX_VK_MENU_SCRIPT's Downs). vk_modui.cpp's draw_node drew, and so recorded for the
input, only the nodes some of which was inside their clip, so a row wholly below the page's view was no control
nav_focus could move to; and the page scrolls only to keep the focused control in view, so it never came into it.

The rule is modui::drawn now (modui_layout.h), as it was. tests/test_modui_scroll.cpp lays out a page of 20 rows on a
view 300 high and asks that Down from the last row that shows reach the row after it, past the view, and that the page
then scroll it into view. It fails here: that row is not drawn, so Down has nowhere to go.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
modui::drawn draws a focused settings page's nodes wholly past its view too (reach: d.page && d.collect), clipped out
of the picture and found by no click, so they are controls nav_focus can move to; the page then scrolls the one
reached into view, as it already did for the focused control. A window's nodes past their clip stay undrawn, and a
List's rows are its own (it walks them past its view itself). The Mods tab's list, which stopped Down on its "Mods tab"
row, is walked to its last mod.

Test: tests/test_modui_scroll.py passes (Down from the last row that shows reaches the row past the view).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The renderer takes single key presses from the host's queue (MkwVkHost.take_key_press,
host/rx_backend.c). Only Windows' window procedure notes presses into it, and on Linux the
queue is compiled out and take_key_press is NULL. The check cuts the queue out of
rx_backend.c, the keys' part and the key-down case out of host/posix/display_sdl.c, and feeds
the case SDL key events: each press is taken once, SDL's repeats are no new press, Shift is
VK_SHIFT and Alt+Enter is no Enter, as on Windows. It fails on main: take_key_press is NULL.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The renderer takes single key presses from the host (MkwVkHost.take_key_press,
host/rx_backend.c). Only Windows' window procedure noted presses (host/display.c WM_KEYDOWN),
and on Linux the queue was compiled out (#ifdef _WIN32), so take_key_press was NULL: the menu
fell back to polling the keyboard's state each frame, and a key tapped between two of its
frames was lost; anything that asks the host for one press of a key got none on Linux.

The queue is now built on every platform. host/posix/display_sdl.c notes each SDL key-down
that is not a repeat, by the same scancode to virtual-key mapping the keyboard's state uses
(now one function, scancode_vk, for both): Shift and Ctrl as VK_SHIFT and VK_CONTROL, and
nothing pressed with Alt, as Windows sends those as WM_SYSKEYDOWN (Alt+Enter is fullscreen,
not Enter). The menu reads its keys from the queue alone once the host has one (its
polling is the fallback for a host without), so a press is never counted twice.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
A test could press the controller's buttons over the control bridge but had no keyboard,
so nothing in a run could check what only keys reach: the Insert menu's key presses
(MkwVkHost.take_key_press), a binding's capture. The key command (scancode, or scancodes,
a list of up to 16 in order) puts each key's down and up on SDL's event queue
(hos_sdl_push_key, SDL_PushEvent from the bridge's thread), so it goes through the window's
own loop as a real key would. Linux only, with a window: Windows and headless runs answer
unavailable. tests/control_test.c checks the command with a fake window; the reference page
says how a test uses it (a display of its own, never the desktop).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
dev.py packs keeps the shader caches a base prepared or warmed in the development folder's stores/shaders/<translator
stamp>/<driver and GPU key>/, outside every game folder. A base built without --seed, and a runtime that lacks a cache
file, start from copy-on-write clones of it, so a new base of the same translator prepares only what changed. The store
is written only through a temporary file made read-only and moved into place; no run writes into it. A wrong cache costs
time only: the game checks every file's stamp and prepares again. LONGSHOT_SHADER_STORE_DEV=0 turns it off.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
dev.py's compile of longshot-builder shared one cargo target folder across every checkout. Cargo keys a path crate by
its place in its workspace, so two checkouts mapped onto the same units, and one checkout's build could be called fresh
while the other's edits went unseen. Each checkout now has its own folder under the development folder's cargo/. What
checkouts share is the compiler cache: when sccache is installed, that compile and the game's Rust in a build's work
folder run with it (RUSTC_WRAPPER, SCCACHE_DIR in the development folder, CARGO_INCREMENTAL=0).
LONGSHOT_SCCACHE=0 turns it off.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
`dev.py packs head --game G [--tree T] [--into DIR]` builds a checkout's clean commit once into the development folder's
heads/<commit>-<os>/, under that folder's lock. A second job for the same commit waits and then takes that build. head.json
is written only once the build is whole. --into gives one run copy-on-write clones of the build's game/ and work/, leaving
out work/rust-target, where cargo would judge the game's Rust fresh against another tree's files. Every game-run job of a
pushed head then starts from one build instead of building its own.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
dev.py game-tests waited for the game to quit or for its timeout, half an hour. It now reads the run's log as it grows.
A mod under test that did not start, a FATAL line or an unhandled exception stops the run at once, which then fails with
exit 2 since its reports are not whole. Once the test mode's last line has come, the game has 20 s to quit by itself
before it is stopped.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The bridge's supervisor now starts a windowed game inside a shared job of the PC's queue under `gamescope --backend
headless`. That run shows on no desktop and takes no focus, so 2 or 3 non-timing runs go side by side in the queue's
shared slots. It is decided inside the job, from LONGSHOT_JOB_MODE. Timing, timing-cpu and profile runs never get it,
even when asked. LONGSHOT_GAMESCOPE=0 turns it off and =1 asks for it outside a shared job; LONGSHOT_GAMESCOPE_SIZE sets the
size. The run's manifest says display=gamescope-headless.

Fail fast: the wait for readiness now reads the run's log, and a FATAL line or an unhandled exception ends it at once with
the line, instead of after its timeout.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Each scenario was its own game start. A scenario is now a JSON file: its repository save, an optional teleport and age,
bridge requests as steps, log expects and a screenshot. scripts/scenarios.py runs them in order, one game session per
save. A teleport does not play what a walk would, so a check that reads scene state starts from a save at that spot. Fail
fast: a scenario ends at its first failed step or expect. A fault in the log, a mod that did not start or the game's end
stops the session, and the scenarios left are reported as not run. Results go in results.json.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
gamescope_plan replaces gamescope_prefix and decides by what is launched: a native
executable named longshot (a built game folder's), never a fake game or a test
harness's process, whatever its environment. Without gamescope the run plays windowed
with one log line saying so; when gamescope exits or shows no present within
LONGSHOT_GAMESCOPE_TIMEOUT (60 s) the supervisor stops it and starts the game again
windowed, with one line. LONGSHOT_GAMESCOPE=0 stays the off switch; developing.md says
the rule. test_longshot_ctl no longer needs LONGSHOT_GAMESCOPE=0, and tests that a fake
game is never wrapped, a real one is in a shared job, and both fallbacks.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
On a window whose Scroll holds more rows than it shows, Down from the last row shown must reach the next and scroll it
in. It fails now: the walk skips every control scrolled wholly out of its view (nav_focus's shown), so Down stops at the
view's end and a long page is never walked to its end.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The walk took only the controls that show, as the old renderer's did, so a control scrolled out of its Scroll's view
was never reached by the keys or the D-pad. A control in a Scroll counts as reachable now: the focus moving to it
scrolls it into view (reveal). A List's rows stay the List's own walk.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
game-ui posted only "down" to a Canvas with onPointer; the docs and types promise "move", "up" and "leave" too.
The inspector's hover readout over a graph needs them. Each input step now tells the Canvas under the pointer its move
(when the pointer moved or came onto it), "up" when the left button is let go over it, and "leave" when the pointer
goes off it (onto another control or window, or out of the picture).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
A focused window takes the player's input, so a mod's action key (the inspector's F8) could open its window but not
close it. A Window now takes closeOn, one of its mod's keybind settings (the host refuses any other). While the input
is taken, a press of that action's key or chord goes to the UI thread as Msg::CloseOn, which closes the mod's focused
Window whose closeOn names it; the action itself does not fire. Esc, B and the close box still close it. The mod
inspector closes on its own "open" action.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The fake took the input only by game.uiCaptures, so a mod test saw its actions fire through a focused UI2 window that
the game would have kept them from. The fake's UI2 now says its focus to the fake host after each tick (passInput
leaves the input to the game, as in the game).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
test-deps fetches the pinned Vulkan and SPIR-V headers into the checkout's _deps/, but run_all looked for them
only through LONGSHOT_*_HEADERS or a CPM cache (RX_CPM, tools/cpm), so in a checkout without mise run tools
every check that needs them failed at once with "not found: vulkan_headers (--strict)".

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
settingsHost.rows called the renderer once a row, each taking menu_mu; renderer_setting_states reads them all at once.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The new test is link-hud's rupee log in core: a row, a new one before it, then none. It panics in taffy ("invalid SlotMap key used") until the List's taffy node is replaced when it loses a row. The scrolling page's rows were inserted before node i (the Window for i = 1), which the shadow refuses: each is appended now, so the test reaches Down.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
taffy keeps the out-of-flow boxes a node lays out (a List's rows are absolute) in a hoisted list of the node's own, which only that node's layout pass rewrites. A List left with no rows is laid out as a leaf, which skips that pass, so the list kept the removed rows and round_layout read them: "invalid SlotMap key used" (taffy_tree.rs:566), as link-hud's log grew and changed. A node that loses a child now gets a fresh taffy node with its style and measure; its parent loses the old one in turn, so the path to the root is fresh, the subtrees below keep their caches, and the old nodes are removed once the tree is built.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
A filler is laid out in its slot's width, but taffy sizes a flex root with no width of its own to its content (only a block root stretches). A Pressable with no content of its own came out 0 wide, so its hit showed nothing and nav_focus skipped it: Down stayed on the window's control. A root laid out in a definite width now fills it when its style gives it no width (a filler, the hosted page).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Only the run under gamescope gets SDL on X11 and no desktop Wayland socket (gamescope_env); the bridge sets them, so a caller sets neither, and the restart windowed no longer keeps them (SDL_Init: x11 not available). developing.md says gamescope headless does not present with NVIDIA's Linux driver, so runs there fall back.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The system-mods test stopped at the first failing mod (menu), hiding the rest. The test realm is QuickJS-ng's in both games, which has no structuredClone: a JSON copy.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
listening programs, unset variables and the platform ("unavailable"), nobody listening ("failed"), attempts and connections, as docs/modding/ipc.md and longshot-testing.d.ts say; net.rs hands each IPC open no game.discord() took to fake.js. A test of the fake covers both ways, the close and each refusal.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
tests/vk_host_members.py reads MkwVkRenderer's members (renderer_members) and the names vk_replay.cpp's mkwvk_init sets
(renderer_table), for checks that pin a version's renderer members as they pin MkwVkHost's.
tests/test_renderer_setting_states.py checks version 67's member right after version 57's eight, set and guarded,
menu_decl_states under one hold of menu_mu through decl_state_locked, rx_setting_states and its declarations.
test_menu_decl_state_hint.py cuts the hint from decl_state_locked, where the row read now is.
settings-declarations.md lists the ninth member.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The menu read the shown page's rows pass after pass at every frame, and drew the page again whenever a pass's
JSON.stringify of all its rows differed. Its translations cost most: tr() asked longshot/i18n for the menu's language and
the text at every call, a call each to the game (which asks the renderer the language), several a row: the ~970 API
calls of the frame that read decls in l4cp's run. decls itself is read once a generation (the generation moves only when
the declarations are built or the language changes); its 2.2-2.6 ms is the one JSON text's parse at the menu's start,
which the faults then repeated (each restart reads it anew).

Now the declarations are read once a generation in a frame of their own, and the page's rows and the questions in one
rows call, only when due: a change the menu made settled, the menu opened or the generation moved on (settingsHost.changed),
or REREAD_S (0.25 s of game time) passed. A read that finds a row as it was keeps its object, so the data, the render and
the UI ops stay as they were; a changed row is a new object alone and only its memo'd line is drawn again. tr.ts reads the
language once a read (trRefresh) and keeps each text translated. A tab or page switched to keeps the page before whole for
a frame, then is drawn whole, its rows read in one call.

Tests (game-free, the fake game): an idle open menu makes no read and no UI batch, a re-read finding the rows as they
were draws nothing; a value the renderer changed is one batch on its row alone; a tab switched to shows one page whole
each frame, the new one by the second. The tests that change a row on the renderer's side wait a re-read (reread).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The tab set the snapshot host.tab() gave at every change heard, a new object each time, and every line took the whole
tab as cx: each read drew every line again (5.6-5.8 ms in longshot/ui flush in l4cp's run, 1.1 ms of it 25 i18n.t calls,
each asking the renderer the menu's language).

Now the read is shared with the tab before (view.ts share: what did not change keeps its objects), so a read that changed
nothing sets no state; ModLine is memo'd on its own props (its row, help, grab, focus, writable, language), its handlers
reading the tab's state as last drawn (cur), so a mod's change draws its line alone. tr.ts keeps each word looked up,
the language read once a drawing (langNow).

Test (the fake game): an idle tab makes no UI batch, the same tab read again none, a mod's row changed one batch on its
line alone.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The idle menu re-reads its rows every REREAD_S (0.25 s), which made the microphone's meter step four times a second.
A declaration now says a row is live: MKWVK_SETTING_LIVE (256; menu::Setting::live, set on audio.cpp's
microphone_level), host-sys flag::LIVE, settings-host's flags.live (schema; generated docs' hashes). Between the reads
of them all, the menu reads the shown page's live rows alone every frame, in that frame's one rows call (pageRead keeps
the page's keys and its live ones per declarations and page), and only their lines are drawn again.

Test (the fake game): the meter's row changing on three frames running is read alone each frame (one row read), drawn
each frame in one UI batch on its line alone, while the page's other row is not read.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
What Discord's test asks of the fake game, as longshot-testing.d.ts declares it:
- game.switches (mods.json's entries) and game.optionsFile (longshot_options.ini's lines) taken at the start, a
  system mod's legacySwitch line carried once as its entry when it is not its default, as the loader's put_systems;
- a mod switched off is not started; the mods that need it are not loaded (notLoaded "dependency-disabled: <id>"),
  one that names it optional loads; turnOn() starts it afresh, turnOff() stops it, each writing its entry;
- game.ipc.pid, what longshot/ipc's pid gives: 4242 in the fake game, settable (Services::set_fake_ipc_pid).
A game-free test of each.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
vk_ui2.cpp no longer includes vk_modui.h: the pointer read once a present for both UIs, and whether an old-UI window
has the focus (MKW_UI2_IN_OLD_FOCUS), live in gpu/vk/ui_input.{h,cpp}. vk_modui.cpp's modui_tick notes its read there
and hands its focus check (now static) to ui_input_begin, so the old UI can be deleted without touching UI2. Same
behaviour; gpu/vk/*.cpp is globbed by the builder, so no list changes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
menu_fallback.rs builds its page as UI2 ops (the kit's Section, Button and Field looks) and commits it through
Services::engine_ui2_commit, an engine tree's batch with the settings grant alone; its events come back through
engine_ui2_take_events (kept at UI2's frame start: an engine tree has no onEvents). game_ui::core::Host gains a
fallback, a tree hosted first while it has a root of the surface: longshot-game's ui2 sets engine:menu-fallback
for the menu's body, so the renderer hosts it on the new path as it hosts system/menu. Tests: the core hosts the
fallback first and the mod's again once it is taken down; the page's batches are ones the Shadow keeps; the real
services send it to the UI thread and hear its Quit press.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
vk_menu.cpp no longer calls the old modui settings page or debug pages: the menu's body is UI2's hosted page (the
fallback included, hosted by the game side), and a mod's debug key toggles UI2's debug page. Gone: hosted_mod,
menu_host_tick, the menu's TextInput and Keybind glue for the old page (mods_settings_*, host_listening).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
vk_modui.cpp/.h, modui_layout.cpp/.h and modui_icons.cpp/.h go: their last callers (vk_menu.cpp's tick, text
ownership, mouse release and drawing, vk_replay.cpp's held-back game input) now ask UI2 alone (ui2_tick, ui2_shown,
ui2_owns_text, ui2_window_focused, ui2_captures_input). The Keybind names a mod's keys use (the old key_name) move
into vk_menu.cpp as keybind_name; menu_mod_keys and menu_mods_debug_closed, called only by the old UI, go.

The old-focus path goes too: ui_input.cpp/.h (the shared pointer read and the old window's focus), the
MKW_UI2_IN_OLD_FOCUS bit and game-ui's flag::OLD_FOCUS; ui2_tick reads the pointer itself. Only vk_ui2.cpp
publishes the World roots' occlusion and scene labels now. vk_ui.h loses flourish and button, drawn only by the old UI.

thumb_ask (vk_replay.cpp) stays, uncalled: longshot/capture's thumbnails were asked for through the old UI's
snapshot, and UI2 has no capture path yet.

Tests: test_modui_scroll and test_modui_row go (their rules live in game-ui's tests); test_fps_overlay_order,
test_ui2_renderer, test_world_depth and test_gfx_world no longer check the old UI.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The renderer no longer reads the old snapshot, so its members go: MkwVkHost's ui_snapshot and ui_post (removed,
nothing reordered; MKWVK_API_VERSION 68), game.h's game_ui_snapshot and game_ui_post, rx_backend.c's entries and the
block's static_asserts, and gpu/vk/modui_snapshot.h. MkwVkUiImage, which the world layer's billboards still use, moves
into mod_world.h. The window's MKWVK_UI_RECT_MSG (WM_APP + 13) had no sender left: host/display.c and display_sdl.c
no longer take it, and display_pointer_test drops its cases. The renderer's thumbnail read-back for longshot/capture
(vk_replay.cpp thumb_ask) goes with that module.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
api::services::ui goes: UI2 (api::services::ui2) is the only UI. Its image decoding moves to
api::services::images (with Image and image_state, which UI2 uses), and ENGINE_PREFIX, is_engine and FIRST_FLUSH_NS
to ui2.rs. inspect()'s ui numbers are UI2's (its live nodes and the ops it kept); the HUD page lists UI2's roots
alone. Hosts loses UiSink and CapturedPixels, longshot-game its block writer (ui.rs), and the fake game its
FakeRenderer, its batch mirror and fake.js's old Ui (game.ui and its uiPlaced, uiImages, uiPost and uiCaptures ops;
setDebugKey has no UI2 equivalent and goes). gameReads takes the input as UI2's focus leaves it.

longshot/capture is dropped whole (it can come back as a feature of its own): its module, schema and types, the
capture service and its tests, the capture: image source, has() of it, and its docs. runtime.js loses the old
channel's branches (native.next is gone with them), its old ButtonPrompt, SettingRow, List and Slot, and the slot
op; longshot-testing.d.ts its FakeUi and old node types. Schema outputs regenerated.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
architecture.md's "Mod UI in the renderer" rules are rewritten for UI2 (the frame from ui2_present, the focus and
the input, the World roots' depth test through vk_ui2.cpp's occlusion_tick, the images decoded by
api::services::images); game/DESIGN.md says the old channel, its ABI and longshot/capture are gone. test_world_depth
checks vk_ui2.cpp's publishing in place of the old stand-in's absence.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Six empty Pressables in a 130 px Scroll were flex-shrunk to fit it (an empty control has no
min-content height), so the fourth row was in view and the test failed at its first
assert. The rows now say flexShrink 0, as a real row's text does, so Down has to scroll.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Since the declarations are read in a frame of their own and the rows the frame after, the
first page is drawn on the third frame after the menu opens; started() waited two, so every
test that looked at once saw Loading (no Tabs, no @adv, vsync, quit or @close:sharpness, no
Quitter). It now waits up to two frames more while the page says Loading.

The row-only and meter tests took a ["style", id, ...] op's id for a node's: the kit's
Progress defines its fill's width as a new style each level, which is not an op on any node.
Style ops are left out of the check.

The two-rows test set Sharpness to 2, its hi, whose text a slider asks on its first draw and
the menu keeps: the second change asked one value, not two. The sliders now run 0 to 4 and
the values set are ones not drawn before.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
runtime.js's Canvas measure() (modapi/ui/runtime.js:2134) turned a regular weight into
fontWeight "regular", which longshot/ui's measure() refuses (100 to 900, normal or bold),
so the mod inspector's FrameGraph threw in its flush on the next channel. It is "normal".
The mod inspector's mod test (its frame graph) covers it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
read() asked longshot/i18n's lang() on every due read (main.tsx's trRefresh before the
declarations' check), a call into the renderer's menu each 0.25 s while the menu is open,
and in the fake game a text read that the two-rows test counted as a row drawn again. The
renderer moves the declarations' generation on when the menu's language changes, so the
language is read with the declarations, once a generation.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
longshot/i18n's lang() and every t() asked the renderer the menu's language (menu_lang:
renderer_settings::text under the menu's lock); the Mods tab's drawing makes many lookups,
and i18n.lang took 4.4 ms in one of its frames. Services keeps the language read with the
frame's number (I18n::lang, Services::lang_now) and reads it again the next frame. Tested:
the_menus_language_is_asked_of_the_renderer_once_a_frame.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
modsHost.tab read each mod page's @fx row with its own renderer_settings::state, one hold
of the renderer's menu lock a mod, on every call (the memo's check included): the first
build at boot took 13.4 ms in one call and faulted system/mods-tab. effects_all reads them
all with renderer_settings::states, one call. Tested:
every_pages_effects_are_read_together_each_by_its_mod.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
row_table (gpu/vk/vk_menu.cpp:509) left out every module row of kind Line ("a line or
custom row, which the Insert menu doesn't draw yet"), so the microphone_level meter never
reached the declarations, and the menu mod's LINE (its text over a Progress, read every
frame with flags.live) had nothing to draw. A line is now kept (no value, no slot in the
ini); only a custom row is left out. tests/test_menu_rows_model.py checks a module's line
is kept and not logged; menu_rows.json gains the line, as test_settings_decls.py --write
makes it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The stand-in, inspector and fake-IPC tests' mods listened to update without
the permission game.toml gives it, so their starts threw PermissionError.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
game.time was the runner's wall clock in the fake game, so a test's frames(n, { dt })
moved it by milliseconds: Discord's rate and keep-alive were measured in them.
It is now the world's seconds, each frame's dt added (world.rs, hooks.rs "time").
read.mapName looked up the map's whole name (SunkenPeak_Adult) in Location.msbt;
the game takes its tails off first (longshot-game::reader::place_stem), so the
fake reader does too.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The handshake goes at the first frame and Ready arrives at the second, so after
one frame nothing was connected yet and every later timing was a frame late.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The menu took a queued press only while its window had the desktop's focus
(vk_menu.cpp: mine && queued), and a windowed test run (gamescope's fallback)
is seldom focused, so every key the bridge pushed was dropped. hos_sdl_push_key
now marks its events (SDL3's keyboard id, SDL2's padding byte), read_event reads
the mark back as HosSdlEvent.bridge, display_sdl notes such a key as the
bridge's (hos_vk_note_bridge_key_press), take_key_press gives
MKW_VK_KEY_PRESS_BRIDGE for it, and the menu counts that one whatever has the
focus (mkw_vk_key_press_counts). A real press while unfocused is still dropped.

Tests: test_key_press_queue (the mark through hos_sdl.c's push and poll on SDL3
and SDL2; a bridge press unfocused taken and counted, a real one not) and
test_menu_keys (the menu's key poll toggles on a bridge press unfocused).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
UI2 drew boxes but no text and no images in the game. The UI thread told a frame's texture changes once: the next
present marked the held frame `same` and cleared its fresh pages, dirty rects, fresh images and drops. ui2_tick
(gpu/vk/vk_ui2.cpp) presents every frame but ui2_draw takes the textures only when the menu records (headless: only in
the shots), so a glyph page or image made in a frame no draw took was never created.

Now the renderer says which frame it took: MkwUi2Input.taken with MKW_UI2_IN_TAKEN (MKW_UI2_VERSION 5, the input 144
bytes). UiThread::present (game/crates/ui/src/thread.rs, hand_over) keeps a held frame's changes until `taken` names
it, and a newer frame that replaces an untaken one carries them forward (merge; a page dirtied in both is sent whole
from the newer frame's copy, PageInfo.whole). A new frame's serial is always above the last one's, so `taken` names one
frame. Any order of presents and draws now loses nothing and hands nothing over twice. The renderer still takes the
textures only in ui2_draw, inside the ImGui frame (after ui::begin), so the earlier ui2_tick change (qssuyvno, taking
them outside the frame) is not needed and was abandoned.

Threads, read from the code: menu_tick (ui2_tick, game_ui2_present) and menu_record / menu_record_image (ui2_draw,
take_textures, user_texture_kept, RegisterUserTexture) run on the presenting thread: headless both in do_present
(gpu/vk/vk_replay.cpp:5644 and 5674), windowed both in present_image_with_trial (vk_replay.cpp:6484 and 6716).

Test: thread.rs texture_changes_are_kept_until_taken (several presents with no take, then a take: every page and
image made since handed over, none lost, none twice) and two_untaken_dirty_rects_send_the_page_whole.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
With HOS_START_SLOT set and moves to make, the machine gave up whenever the file list opened within TAKEN_MS of a press: but the title's own A is what opens the list, a few hundred ms later, so every such run stopped on the list (the full check's startslot and startslot_up). These tests open the list 200 ms after the title's A, as the game does, and a check that opens before the moves.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The list opening just after the title's A is the title's press, not one the list took: the cursor is moved and the slot's A pressed. A list that did take an A shows as its check opening before the moves are made: then the presses end there, the check left for the player.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The full check's startslot runs showed the held A (200 ms) leaking into the file list it opened: the list took it on the newest save and its check opened before any move. With HOS_START_SLOT set, the title's A (repeated while the title waits, as before) is now pressed for exactly one game frame (TAP_FRAMES) through an input.pad.intercept filter that sets A in one frame and lets go at the next, so the game samples it once at any frame rate and it is released before the list's first frame. The list's moves and A are as they were.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The Mods tab's Open debug page row ($debugKey) is a key the player binds; vk_menu's mods_debug_keys presses it into
ui2_debug_toggle. The old fake had setDebugKey on the old UI; this is its equivalent on UI2's hosted debug page.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Grants are kept by name (profile.json, trust.json), so a permission's bit is only in-process: the others' numbers
move up, and nothing stored changes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
import { stopping } from "longshot"; stopping.on(fn), with the same Stopping payload. The schema allows an event in
the module longshot (named alone, as its functions are: feature "stopping"); lifecycle.toml, its module and
lifecycle.md go, its text now scripting.md's "When the player turns your mod off". No mod imported the old module.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The fake game's ContentPatch flags type gets its saved field. gfx.textures and exefs get no script example: a texture
pack holds no script, and the fake game has neither textures nor exefs.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The types had them and the fake did not: sound-cues' new test failed in l4trim-1.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
A pack's textures/ (PNG, KTX2) decoded as the game decodes them, an exefs/ .ips or .pchtxt parsed as the build parses
it (a pchtxt with no @nsobid, or writing nothing, refused). A texture's name being the game's, and a patch's build id
and the hook sites it must leave alone, need the game's files: a game run or a build checks those.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
A relative import ending in .ts or .tsx names that source file: import { x }
from "./util.ts". The game's loader, mod check's link and the declarations
reader share one resolver (script::modules::find_module). The older forms
still load: ./x.js is x.js, else x.ts, else x.tsx (.mjs: .mts), and an
extensionless ./x is the first of x.ts, .tsx, .js, .mjs the mod has; mod check
warns (import.extension) about an older form that loads a TypeScript file,
naming its .ts form.

The template's tsconfig and every built-in mod's and example's get
allowImportingTsExtensions (with noEmit), and their imports use the .ts form.
The guide (getting-started, scripting, testing, workers) says so.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
turnOff() stopped the mod with no stopping, so a mod's goodbye went untested. As the loader does, the fake now
fires longshot's stopping first: { reason: "dependency", mod } to each running mod beside it that needs it (which
then stops too), and { reason: "disabled", mod } to the mod itself. stop() still fires none.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
settings.changed told a mod of its own settings and, as "<mod>:<id>", of the
other mods' settings its mod.json's reads lists, so a listener had to tell
them apart. Now changed is the mod's own settings alone, and a read setting
has an event of its own, settings.readChanged { mod, id, value } (order 13,
with settings.read; the later acquire events move up one). Damage taken
listens to the Cheats mod's Debug tools with it.

changed.on() takes, first, the ids it is told of: changed.on("text_speed", fn)
or changed.on(["text_speed", "text_size"], fn); changed.on(fn) stays. An id
the mod does not declare is UnknownNameError when it subscribes (said at once,
in the game and mod test alike, where a lint would miss computed ids). The
schema marks such an event filter_ids (its ids' TypeScript type, SettingId),
which the d.ts types as IdFilteredEvent; a record field may now be a value.
The built-in mods and the settings guide use the filter.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The old mods' UI is gone, so its names are free: every UI2 file, symbol, C macro, type, member, test, doc and TS
name drops the 2 (vk_ui2.cpp/.h to vk_ui.cpp/.h, ui2_draw.h to ui_draw.h, MKW_UI2_* to MKW_UI_*, MkwUi2* to
MkwUi*, game_ui2_* to game_ui_*, services::ui2 to services::ui, game.ui2 to game.ui, ui2-draw-list.md to
ui-draw-list.md, the thread lsmod-ui). Two names clashed and are renamed: the old theme header vk_ui.h is now
vk_ui_theme.h (what it is), freeing vk_ui.h; the fake game's tree node Ui2Node is UiTreeNode, beside
longshot/ui's UiNode. No member moves and no version changes. NVN's *_UI2F formats are NVN's names, kept.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The rename from ui2 left the offset at 4, so game.ui.tick reached the fake as "ick".

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
A script mod needs an "api" field now; the test's two manifests had none, so
parsing failed before the test began. They name 0.3, as the sibling tests do.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The schema the api crate builds changed on this line; the website's copy had
not followed (the_website_serves_this_schema).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
menu_decl_state now takes the lock and hands a row to decl_state_locked (which
menu_decl_states shares), so its own body no longer holds the row's lines.
Five checks looked for them there and failed: they read decl_state_locked.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
host/display.c's wndproc lost the script mods' window clicks and gained UI's
input method and copy; the screensaver fixture stubs the new calls and drops
the old ones (unused stubs failed -Werror). vk_menu.cpp's host_listening went
with the hosted page, so the menu-keys fixture no longer declares it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
ui_draw.h and draw.rs moved MKW_UI_VERSION to 5; the check still named 4.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Headless (RX_VK_SHOT_MENU) the menu is drawn only into a shot, and the hosted page was asked for by that draw
alone (ui_host in draw_options): its first shots after Insert said "The menu is starting." however long after
the key they were taken (2.5 s and 8.5 s in the l4fj batch). The check wants ui_tick to ask for system/menu's
page itself, at the rects the draw lays it in. It fails here: ui_tick has no menu_host_ask.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The page (system/menu's) was asked of UI by draw_options and menu_host_draw alone, and the ask is dropped
each time the menu closes. Headless (RX_VK_SHOT_MENU) the menu is ticked every present but drawn only into a
shot, so after Insert nothing asked for the page until the first shot's draw, and that shot (and the next,
one present later, before the UI thread's hosted frame came back) said "The menu is starting." however long
after the key it was taken: 2.5 s and 8.5 s in the l4fj batch. Not the UI rename, nor the declarations read in
a frame of their own: the menu mod's Loading page was mounted all along, just never asked for.

ui_tick now asks for it itself while the menu is open and nothing asked yet (menu_host_ask), at the rects the
draw lays it in (host_rects, worked out from the target's size, unit and margin, no draw list): the page is
laid out from the menu's first tick, and the draw's own ask (draw_options', which asked a taller body
than menu_host_draw before) is the same rects, so it is not laid out again. In a window the menu is drawn
every present, so there this changes at most a frame.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
the_real_services_show_it_on_ui_while_the_menu_mod_does_not_run_and_hear_its_presses failed with "Quit asks
first": the press did reach the fallback (frame took the event and set asking), but the test ran with the
menu closed (the fake host's renderer option 1 unset, so 0), and frame builds no page again while the menu
is closed once one was shown, as its doc says. A player can only press while the menu is open, so the code is
right and the test was not: it now sets the option (MENU_OPEN, 1) on its thread's fake host first.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
A shot from a game in a window is the game's own picture, without the Insert menu, a debug page or a mod's
window, so a driver that sends keys (keys2's Insert, E/Q, K, F8) could not tell from its shots what they did.
status now has "overlays", read from what the renderer already knows at its last present: menu_open, hosted
(the mod whose page UI hosts and shows: system/menu in the menu, a mod's debug page in play), focus (the
focused control's label, which moves as a tab or page is switched to; the tab itself is the menu mod's
own and the renderer does not hold it) and ui_focus (a UI window such as the inspector, or the hosted page, has
the focus).

MkwVkRenderer.control_state (version 69, guarded like the rest): vk_menu.cpp writes the JSON object from
open_now and a snapshot ui_tick keeps under its own lock (ui_control_state); rx_backend.c's
rx_control_state hands it to host/control.c's new HosControlGame.overlays; without one (the fake game of
tests/control_test.c) it is null. Documented in control-bridge.md.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
taffy's min-content measure broke a Text at width 0, and with overflow-wrap: break-word that gave one glyph: a flex
item's automatic minimum was a glyph wide, so a button's label shrank to "Tu…". The min-content width is now parley's
own (the widest piece between soft wrap opportunities; a nowrap text's whole line), as CSS's is. A width taffy got
from the text's own size could also come back a rounding short and push its last glyph or word onto a line of its
own ("Restar/t", "Colour vision/>"): lines now break with the half pixel of slack the ellipsis check already had.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The slider rows' Field took the page's fill style, a column, so its label went above its control and the Tune button
was squeezed. Beside a button a Field now grows into the room left (st.beside) and the kit's field control, 540 wide
when there is room, narrows with its control across it when its Field is given less.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The menu gave UI the whole banner for the hosted page's tab titles, so the first and last titles and their key caps
ran under the Longshot logo and the version and build name. It now gives the middle, between the room_each each side
keeps. The column under the page was 91 % opaque, so the game's own prompts (Move, Change View) showed through its
lower part: it is opaque now.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Until the menu first drew into a shot, UI was laid out at a 1920 x 1080 guess and drawn into 1280 x 720 shots, half as
large again: a HUD shot taken before the menu showed link-hud's text over the game's hearts. The replay tells UI the
shot size once it reads RX_VK_SHOT_W/H.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The Mods tab's script asks modsHost.tab() as it draws. Its first answer (every
mod's rows, settings and pages, built into fresh memory) cost the script 5.6 ms
at boot, past the 5 ms of CPU a frame may, and system/mods-tab faulted.
mods_host_step now makes the answer (memoised as before) while the tab is shown,
or once before its first read, so the script's call finds it made.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
shot_dimensions_ready() now tells the UI the shots' size (ui_shot_size, vk_ui.cpp),
and the capture dimension and resource fixtures, which compile that function
alone, did not declare it. Each gives it an empty stub.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Since a Text's min-content is its widest word (991291bf), a label beside fixed
540-wide inputs shrank to it: the Keybinds page's rows, beside two key boxes,
read one word a line ("Menu: / Open / debug / page"). The label now goes first:
it does not shrink, its width at most half the row, and the inputs give way to
the room left. So in the Mods tab's keybind rows (the Keybinds page and a mod's
keybind setting), the menu's binding rows (pad Choices and Keybinds), and the
kit's Field (and the fallback menu's copy of its style). A Toggle's label keeps
the old style: its switch is small.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The fake game has given game.hostLogs and read damage()'s source and owner for a while, but
longshot-testing.d.ts did not declare them, so tsgo refused the misbehaving and rock-guard
examples' tests (mod check --types).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
- lib-and-dependent/dependent: game.addMod gives an AddedFakeMod, not a FakeGame.
- ui-demo: its own Node type takes the readonly children game.ui.tree() gives.
- colour-vision and crt: OutputEffectOptions is longshot/gfx's, not longshot's.
- menu: host.binding passes on settings-host's null (a key that is no binding), which its
  one caller already checks.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The forward declaration put 'int decl_state_locked(' in vk_menu.cpp twice, so the source checks
that cut its body (menu_stepped_sliders, microphone_test_gain, intel_quick_compute, menu_restart,
upscaler_rows) found the declaration or refused the marker. The code is unchanged, only moved.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
A slider's value texts are asked once a generation, all its values together, so a changed value
asks none again: the texts count was no measure of a row drawn again. The test now checks both
rows show their new values. And ["unstyle", sid] names a style, like "style", not a node: the
batches' ops on the changed row (and on the meter's line) let it through.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
game.time added each frame's seconds as a float, so it drifted from the host clock the
timers run on (30.033333333999998 for 30.033333334): it now keeps the nanoseconds the clock
moved and gives them as seconds. setPlayer took skulltulas and heartPieces in its type but
dropped them, so player.state() never had them; it now gives them to oot::player::progress, as
the game's 2 s count does, and a new world starts with none counted.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
A window opening with the focus gave it to the first control with autoFocus, but only to kinds
that are focusable(), which a List is not (its rows are its own): the mod inspector's table
asked for the focus and the header's first button got it, so Down never moved the table.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Two game times 15 s apart can differ by a hair under 15 as floats. Discord started while a
sweep is under way is found at the next sweep: one endpoint a frame, then RETRY_S, so the test
waits until it shows (60 s at most) instead of 17 s. The quiet-spell send says the sends when
it fails.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
game.ui.look(text) looks at the control the text is in, here the log's List, which has the
theme's ink: the test now looks at the Text node (game.ui.find).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The status's focus came from the output's label, the help box's title. The menu's first focus is its top Tabs and
many of its buttons have no label, so the status said null with the menu open and the tab keys could not be told
apart. The output gets a focus name of its own (MKW_UI_VERSION 6, MkwUiOutput 72 bytes); the help box keeps the label.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The bridge's key went on SDL's queue down and up at once, so SDL's state never showed it: a mod's action key, which
polls held keys (longshot/input, the mod inspector's F8), never fired in a test. display_sdl.c holds each pushed key
for 150 ms in hos_posix_keys, focused or not, as the bridge's presses already count unfocused.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The hosted page's keys become nav bits, which keep no order: E and Q in one frame (the control bridge's one request)
went to the previous tab, as the core reads TAB_PREV first. Pressed one after the other they come back, so a pair of
opposite moves (tabs, up and down, left and right) in one present now cancels.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
With HOS_START_SLOT the title's A opened the file list and the list took an A as well: its check opened on the newest
save before the cursor moved, and the skip stopped there, so the run sat in the menu (next.sh's startslot and
startslot_up). B on that check once goes back to the list, whose cursor is still on the newest save; the moves and
the list's A are made there. A second early check still leaves it to the player.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The bindings gave an event its namespace from its path's dot, and `stopping`, longshot's own, has none: its
namespace was None, the script runtime took it for a handle's event, and `import { stopping } from "longshot"`
failed ("Could not find export 'stopping'"), in the game and the fake game. The namespace is now the one that
declares it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
A log line is cut at 239 bytes, so inspect()'s whole snapshot in one line was cut and would not parse. A Window
needs ui.settings: the debug page's made-up mod asks for it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The builder says these three codes since the v3 refusal and the generated shaders, but build-events.md's table
never named them, so build-driver's tests/codes.rs failed. Each is now there with when the builder says it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The coordinator ruled the workaround of uwpwymqk out: the title's A should never reach the file list (the one-frame
tap). This takes its machine.ts, main.ts and machine.test.ts changes back out; the leak is fixed at its cause next.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
feat(skip-title): each repeat of the title's tap logged, with a slot chosen
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 20s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 54s
CI / Workflow lint (actionlint) (pull_request) Successful in 1m0s
Third-party parts / As their notes say (pull_request) Successful in 1m6s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 1m11s
CI / What the change needs (pull_request) Successful in 2m21s
PR description / Title and description (pull_request_target) Successful in 58s
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Failing after 6m20s
CI / Website build and checks (pull_request) Failing after 3m34s
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Failing after 6m48s
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Failing after 7m52s
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Failing after 8m41s
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Successful in 52s
CI / longshot-builder end to end (synthetic game) (pull_request) Successful in 5m15s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Failing after 8m44s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Failing after 14m56s
22210ae9b9
The 3-slot runs showed the list taking a repeat of the title's A, but only the first tap is logged, so which tap
the title took and which one landed on the list was read from draw counts. Each repeat now logs its frame and its
number, for the diagnostic run that settles where the file list's open wait is.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
game.ui.pressDebugKey() looked for the mod's debug page by comparing ui.tree()'s mod (the mod's serial) with the
mod's id, so it never found it and every press opened the page again. ui.tree()'s roots now carry modId, the mod's
id, and the fake matches on that.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The 70 s of changes can end with a send held back up to 15 s past their end (the hearts repeat every 8 s, so a look
every 2 s can find the sent status again when a hold ends: the 15 s and 17 s gaps). Twenty quiet seconds then left
the next change inside the hold. The mod is right; the test now waits 35 s and checks that 15 s passed since the
last send.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
fix(ui): a window painted before its controls takes the focus when the first one shows
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 11s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 23s
CI / Workflow lint (actionlint) (pull_request) Successful in 23s
Third-party parts / As their notes say (pull_request) Successful in 24s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 29s
CI / What the change needs (pull_request) Successful in 54s
PR description / Title and description (pull_request_target) Successful in 1m10s
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Failing after 4m34s
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Failing after 5m49s
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Failing after 6m38s
CI / Website build and checks (pull_request) Failing after 1m16s
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Failing after 7m32s
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Successful in 33s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Failing after 2m20s
CI / longshot-builder end to end (synthetic game) (pull_request) Successful in 12m28s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Successful in 16m16s
8efb4b3eb4
The Insert menu's page is "Loading…" for its first frame or two. Its window ask was spent on that paint, which had
nothing to focus, so the Tabs that came next never got the focus: the bridge's overlays.focus said null on the first
tab, and the tab keys and the D-pad walk started from nothing. The ask now takes the window's focus and stays until a
control shows, unless the focus went elsewhere meanwhile.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The microphone test stops on every menu tick without the window's focus
(mic_test_tick). RX_VK_MENU_SCRIPT's runs never have the focus (headless,
or an unfocused window), so the scripted Enter toggled the test on and the
same tick's end turned it off: the row kept saying "Start test". Such a
run now counts as focused for the test; a player's focus rule is
unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
HOS_START_SLOT (the launcher's slot) is not reliable yet: the file list's
open is not heard before it takes a button. Shipping without it; the
README says so.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The mic fix made a scripted run (RX_VK_MENU_SCRIPT) count as focused, so
the check's old text mic_tick{mine} no longer matched. It now checks the
rule as it stands: the test runs only with the focus, and a scripted run
counts as focused.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The mod inspector's F8 from keys3 never opened it: the action service reads
keys through hos_key_down, which reads nothing while hos_input_taken, and a
scripted run's window has no focus, so GetForegroundWindow is null on Linux
and the input counted as taken. The bridge's 150 ms hold put F8 in
hos_posix_keys, but no one read it. display_sdl.c now says while a bridge
key is held (hos_posix_bridge_held), and hos_input_taken counts the game's
window as in front then, as a player's focused window is. Windows has no
bridge key, so nothing changes there.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
A paging PC faulted built-in mods: a callback of 4.2 ms of CPU ran 111 ms on the
wall clock (20 major page faults) and crossed the wall clock's 50 ms hard cap,
and heart-containers went over its 5 ms with romfs.load's own CPU in it.

- The wall clock's cap is now a hang guard of seconds: 10 times the budget, at
  least 5 s (was 50 ms). Every budget stays on the thread's CPU clock.
- The CPU a service spends in an API call (run_thunk) is no budget's: counted
  apart (ModState::api_cpu_ns), the running call's CPU deadline moved on by it,
  and left out of the callback's, the frame's, the entry's and an export call's
  time. Script callbacks the service runs at once stay the script's, and so does
  the making of the result as script objects.
- Major page faults in a call are logged as information (at most every 10 s a
  mod), never a fault.
- Tests: a CPU-bound callback is interrupted; a 150 ms stall off the CPU never
  faults; the hang guard interrupts; the API's own CPU is no budget's while the
  same CPU in the script's own native code is.
- Docs: scripting.md's and api-guide.md's limits, the cost line's wording.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The tab recognised the row whose note already says the list is bad by
matching "mods.json" in the loader's text, which now says profile.json:
every row's help said it twice. The loader's TabRow now carries
list_noted (its note begins with the list's own) and folder (its folder
under the mods folder); the tab reads the flag, and names a mod without
a page by its folder instead of cutting "local/" off its id. The tab's
own line names profile.json.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Edit::Command carried its args as JSON text, which the loader parsed
with unwrap_or(Null): an edit whose args were not an object ran the
command with every argument its default. The edit now carries a
serde_json::Value; mods.host's edit takes an object or null as it is,
reads an object's JSON text, and refuses anything else (bad_edit) instead
of running the command as if no argument were given. modtool's fake menu
prints the value.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
switch_on tried local/{name} and then the bare id, and the ExeFS and code
module lists were matched with local/ cut off a row's id: a folder's
name could be taken for a manifest mod's id, or the other way round. The
builder takes ExeFS patches of manifest mods alone and names them by id,
so the loader now looks a switch and a list's line up by the row's id:
only a manifest mod is a switch, and nothing is stripped or guessed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The system mods carried a player's settings and switches from before they
were mods: a setting's legacyOption (Discord's texts), a system mod's
legacySwitch (discord_status=), and an older list's "cheats" taken into
the cheats mod's storage. None is read now: the code, the manifest fields
(legacyOption, system.legacySwitch), their schema, the build's table
column, the fake game's carry-over, the docs and their tests are gone.
LoaderConfig loses its options file; profile.json's "cheats" is a key
kept as it is. discord_status stays a retired key in
test_menu_ini_keys.py so no row takes it again. The website's
mod.schema.json is made again.

legacyId (input movies' old option numbers) stays: host/input_movie.c
still records settings by those numbers.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The About page found the upscaler's vendor by reading the Upscaler row's
English text (credits.ts vendorOf: "dlss", "fsr", "xess" in it), which
breaks with any rewording or translation. The renderer now answers it as
a number: rx_option(HOS_OPT_UPSCALER) is upscaler_rows.h's family() of
the upscaler that runs (HOS_UPSCALER_NONE, DLSS with DLAA, FSR 3.1 and
4, XeSS), through the existing option callback (no new member, an older
renderer answers 0, none). host_sys::renderer_settings::upscaler() reads
it as an enum, settingsHost.state() gives it as upscaler: "dlss" | "fsr"
| "xess" | null, and the menu mod's MARKS are keyed by it. vendorOf is
gone. The fake game's menu.upscaler(id) sets it for tests.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
t(key, vars) takes an object for a text's {name}s or a list for its printf
conversions in order (%d, %u, %s, %c, %x, %.1f, widths and flags, %2$s
positions), and a value may be a text of its own ({ key, vars }), looked up
in turn. Each lookup is kept by its key and values until the menu's language
changes (8192 at most), so a mod calls t as often as it draws and needs no
cache of its own. Unit tests: the printf filling, nested texts, the cache.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
longshot/i18n keeps each lookup until the language changes now, so the tab's
tr.ts (a cache by key and values, cleared on a new language) is gone: view.ts
and main.tsx call t and lang themselves.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
A declaration's, a row state's and renderer_setting_text's texts are never
finished English now: a literal is its own key, and a text made from a format
is its English, MKWVK_TEXT_SEP and {"key": "%d of %d", "vars": [3, 9]}
(gpu/vk/menu_text.h: mtext::make, put, Key and Of for a text of its own).
Every site that formatted a row text (labels, values, hints, confirms, the
binding question, the restart question, the mic meter, the modules' value
texts) passes its key and values; the control bridge and the bug report read
the English (mtext::plain).

A slider declares its unit (MkwVkSettingDecl.unit, GameSettingRow.unit from a
system mod's format) instead of the menu working it out from the texts.

settings-host gives each text as SettingsHostText { key, vars } and a
slider's unit; the fake game takes a test's texts either way. The checks that
compile a row's code read its English (MKWVK_MTEXT_ENGLISH).

The menu calls longshot/i18n's t(text.key, text.vars) like any other mod:
src/tr.ts and src/formats.ts are gone (no format matching, no cache of its
own; the Mods tab's went in the commit before). A slider's unit is its declaration's
(unitOf gone). strings/<lang>.json stay keyed by the English: the formats
made from pieces before (Restart to apply %s?, %s and %s, the pipeline list's
and the bug report's lines, %ux%u (native)) take their pieces' translations;
five formats nothing makes now are dropped. tests/test_menu_text_keys.py:
the texts are keys, and every key has a translation or is listed with why.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
vk_progress.h gives the count and the time left as a ProgressText (a format
key and its values: "%s / %s pipelines" with the counts, "about %d s left"
with the seconds), and the start-up screen formats its translation once
(fill_format) instead of parsing the English back.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The coordinator's ruling on the last commit's open question. A service's work
on the mod's thread runs in the frame, so a costly call must not be a way
round the budget: every budget is again the thread's whole CPU, the API's
synchronous calls in it. What a service does off that thread (romfs.load's
read, a worker) is on no budget, as the thread CPU clock never sees it.

- run_thunk still counts the service's own CPU on the thread apart (its script
  callbacks left out), now only for the stats: the cost line says the API's
  calls' CPU and the costliest call's, and inspect()'s lastSlow gains apiCpuMs
  and each call's cpuMs (longshot-together.d.ts, longshot-testing.d.ts, the
  testing game's lastSlow).
- The 5 s / 10 s wall-clock hang guard and the page-fault info lines stay.
- Tests: the_apis_own_cpu_is_no_budgets becomes
  the_apis_synchronous_cpu_is_the_budgets; work_off_the_mods_thread_is_no_budgets
  spends 20 ms of CPU on another thread inside a 5 ms callback and passes.
- Docs: limits.rs, scripting.md, api-guide.md, system-mods.md.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The Insert menu's column (and the hosted page laid out in it by the mods' UI) is as wide as a 16:9 screen
of the window's height and drawn moved over to the middle. For 16:9, 21:9, 32:9, 16:10, 4:3, desktop
scales of 125 % and 150 % and an odd 1366 x 767 window, a cursor at each control's drawn centre (made
pixels as display_sdl.c does) must hit that control through the menu's one transform (column_of,
to_column). Fails on main: there is no shared transform, and the hosted page's pointer went through
to_image alone, ox pixels right of the cursor on a window wider than 16:9.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
draw_menu lays the menu's pages out in a column as wide as a 16:9 screen of the window's height and moves
what it drew to the middle by menu_ox, the mods' UI hosted page with it. ui_tick handed UI the pointer in
the window's pixels, without that offset, so on a 21:9 or 32:9 window a click landed menu_ox pixels
(320 at 2560 x 1080) right of the cursor. menu_host_ask also asked for the page at the whole window's
width, not the column's, so the first tick laid it out at other rects than the draw.

One transform now, vk_menu_hit.h column_of and to_column: draw_menu takes its column from it,
menu_host_ask lays the page out in it, and ui_tick maps the pointer through to_column while the menu
hosts the page (the rest of UI is drawn where it is laid out and keeps to_image).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
For windowed checks of the Insert menu and the mods' UI with the mouse: {"cmd":"pointer","action":
"move"|"down"|"up"|"leave","x","y","button"}, in the window's pixels. host/posix/display_sdl.c
publishes it as the window's own sample, and while the bridge has the pointer the real mouse's point and
buttons are ignored (its window size still counts) until leave. Linux only, as key. The fake game's test
covers the command's arguments and refusals; the docs say how to click (down, wait a frame or two, up).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
A style object made anew each render (a kit Row's flex(), an inline style) was checked key by key against the
property lists before its interned text was looked up; a hit is now returned first, and the checks run only for a
new definition. place() walked every host child (nodes.get, hostParent, a Set) on every update; when the children
are the host's, in its order, it returns at once. Both run for every node of every render, so a page drawn again
(system/menu's rows read again, a page switched to) costs less script CPU.


Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
host.rows made every row of the page anew at each read (a spread copy, and say() for its text, hint and lock), every
0.25 s while the menu is open. It now keeps each key's last raw row and the row as shown, and gives the same object
back when the renderer's fields and texts (keys and values) are the same, so sameRow is one compare. Made again when
longshot/i18n's language moves on.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The fake game records the tested mod's script CPU each frame, as its runtime counts it for the budgets (callbacks,
UI flush, collector): game.scriptTime. The menu's new test draws the Graphics tab with every row of menu_rows.json,
reads it again 20 times with a row changed, then switches to each tab and to each page a link opens. It logs the
numbers ("menu cost: ...") and holds a steady frame under 1 ms and a switch under 3 ms.


Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The fallback said "could not start ... did not start" even when system/menu had run and then been stopped after its
faults. It now reads the loader's row: stopped after N faults, the last one's reason on one line (cut at 240 chars),
and a Restart the menu button (Edit::Restart) beside Resume and Quit. The did-not-start wording stays for a menu that
never started. Its three new texts are in every language of game/strings.


Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
A system mod the runtime stopped after 3 faults in a minute (system/menu, on a paging PC) was gone for the session.
The loader now starts it again once, after SYSTEM_RESTART_NS (5 s), and logs both steps; stopped by its faults again,
it stays stopped and the menu's fallback shows. A player's mod keeps the old rule. The stop is recognised by the
runtime's "stopped after N faults" reason; the runtime's budgets are untouched.


Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
A stop after the faults in a minute was told only as words ("stopped after 3 faults in a minute; the last, in ..."),
which the loader's restart of a built-in mod and the menu's fallback matched as text. The reap now gives a Stop:
its reason in words, and FaultStop { count, at, what } when its faults stopped it (ModState::stop_faults, set by
fault()). The loader keeps it on the row (Row::fault_stop) and restarts a built-in mod by it; no text is matched.

The fallback names the menu's system mod that is down, system/menu or system/mods-tab, with its real reason: the
faults that stopped it, or its row's why on a line of its own when it did not start; Restart the menu starts that
mod again. Its two texts take the mod's id ("(%s)") in every language. Tests: the mods-tab-only case, a plain stop,
the runtime's FaultStop. Also drops legacy_switch from the loader test's SystemEntry (gone with l5w2).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The menu keys its texts by their English, and its help texts run past 1000
bytes: longshot/i18n refused every key over 256 bytes with a LimitError,
which threw out of the menu's useFrame and stopped it (the fallback page
then showed). A key is up to 4096 bytes now, and the menu's say() shows a
text's key when a lookup throws, so one bad text never stops the menu.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
- test_hdr_encode, test_menu_modules, test_framegen_dlss_cap and
  test_nfc_scan_hint read the rows' English (the unit after the text, and
  MKWVK_MTEXT_ENGLISH and menu_text.h for the code they compile);
- test_menu_text_keys lets the renderer's own drawing (the mic help box, the
  FPS counter's footer) format with snprintf;
- strings: ' (native)', ' (reduced)' and '%d of %d', which no source makes
  now, go (their translations live on in '%ux%u (native)' and the like);
- the menu's About test asks FSR's trademark line away, not the FidelityFX
  SDK's credit, which /^AMD FidelityFX/ matched too.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
"Base %.0f" and "Base %.0f, %s" (the game's own rate, and who makes the frames)
are the engine's strings now (game/strings/<lang>.json, their translations
moved from the menu mod's files), formatted once from the key's translation
with fill_format, as the start-up screen's texts are. fill_format takes a
conversion's flags, width and precision. test_menu_text_keys no longer lets
them through as the renderer's own drawing.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The exact-id lookups (no local/ guessed) left three tests naming a mod of
the emulators' layout by its bare folder in exefs_patches.txt, and the
switch test's manifest mod was off (a player's mod with no entry is off).
The lists now name local/<folder>, and the switch test's profile turns
its mods on.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
display_sdl.c gained the control bridge's pointer (bridge_ptr_on, _x, _y,
_held) and hos_posix_bridge_held; the two fixtures that compile its parts did
not declare them. Both declared, at rest (no bridge).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The kernel's time for a mod's thread is not the mod's: system/mods-tab faulted
at boot on 7.6 ms of thread CPU with 41 major page faults, the page faults and
zram's decompression counted as its time.

- host: hos_thread_user_ns (Linux RUSAGE_THREAD ru_utime, Windows
  GetThreadTimes' user time, the thread's CPU elsewhere); host_sys::time::
  thread_user_ns, with the fake clock's own (spend_user, spend_sys, wait).
- Every budget (callback, frame, entry, export, a together call, the TS
  compile's push, the API's per-call CPU) reads the user time. The kernel's
  time is kept in Cost.sys_ns and shown: the cost line's "ms in the kernel
  (not counted)", the page-fault info line, lastSlow's kernelMs.
- The new runtime tests hung (rc 124): host-sys's fake clock, which the script
  crate's tests use, never moves unless a test moves it, so a busy loop never
  passed its CPU deadline and the hang test's deadline never tripped. They now
  move the fake clock themselves and finish at once; new tests for the user-time
  rule (kernel time no budget's; user time in a native still faults).
- Docs: limits.rs, scripting.md, api-guide.md, system-mods.md.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Every fact sites.def held is now in the site tables, read by site-table alone:

- each row that is not a data rule is a site with a flag and a slot (the core's,
  then each built-in mod's, in the rows' order);
- an engine feature's row names its callback (engine = "hos_site_...");
- an outcome site is read from its row's keys (row_decides_on_worker), so the
  HOS_SITE_OUTCOME lines and the check that they match the table are gone;
- the values and tables the data rules read are the core's [[value]] and
  [[table]] (name, type, symbol), refused in a built-in or a player mod's file;
  a player mod's row may not name an engine callback either.

game-sites' build.rs and builder/crates/sites build everything from the tables
(Tables::host, host_sites, values); the lift no longer keys on sites.def. The
tests' readers (tests/sitecheck.py) read the rows too. The lifted output is
meant to be the same byte for byte: only the source of the facts changes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
host/mouse_native.c's hos_mouse_camera, the body of the camera.update
site's handler, is now Rust: oot:📷:mouse reads the player camera's
state (+0x204) and limits (+0x178), and writes its yaw (+0x1a4) and pitch
(+0x18c) each frame, with the C's exact maths (an f64 scale rounded once
to f32, the IEEE remainder for the yaw's wrap, the pitch's clamp by two
comparisons). The input recording's camera lines go through
host-sys::movie::cam_begin and cam_end as before.

The host keeps what it must own, behind host-sys:🐭📷 the
switches and the menu's rows, the mouse's motion with a test script's,
and the handshake with the controller's reads (hos_mouse_native,
hos_mouse_native_free and _stick, and the clock the camera last ran by,
hos_mouse_cam_*). The fixed address of the camera's inputs
(MOVIE_VIEW_INPUTS, 0x84c9ede0) is the named location camera.viewInputs,
data per build in sites.toml.

Tests: oot's camera::mouse tests carry the cases test_mouse_native.py
checked of the C, with the same numbers, plus the maths against the C's
casts and remainderf, and a recording and a replay. test_mouse_native.py
now checks the host half; test_input_movie.py's wiring checks read the
Rust.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Each of the workspace's 23 crates that had none gets a README.md: what it is and owns, its main types or entry points,
who uses it and what it uses, and how to test it, in the form the builder crates' READMEs already have.
tests/test_crate_readmes.py fails when a workspace member lacks one, as mod check does for a built-in mod.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
#2434 (l6s, step a): the game owns every setting, the renderer's and the host's too. A system mod's setting may now say
who reads it natively (abi: renderer, host), what it needs of the PC (needs, choiceNeeds), the list its choices go on
with (choicesFrom), how its options line is written (codec, first), when its row shows (shownIn), and its button's
verb and confirm, its arrows' and slider's moves (stopsAtEnds, wraps, commitOnRelease): NativeUse on SettingSpec and
SettingDecl, read by native_of, refused for a player's mod, in the mod.json schema and docs/modding/settings.md. An
options key may hold a ':' as players' files do (autosave:).

api::settings::AREA_MODS names the area mods; AREA_SETTINGS_LIVE (off) keeps the loader from declaring their settings
until the renderer's own rows go (step f), so no row shows twice and no line is written twice.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
#2434 (l6s, step a): system/graphics, audio, controls, interface, gameplay and developer (game/mods/<area>), Rust system
mods with no code, declare the renderer's and the host's settings: 137 of them, every renderer key of
tests/test_menu_ini_keys.py's FROZEN (121) among them, with its type, default, range or choices, label, help, restart,
preset exemption and place, and the area fields (abi, codec, needs...). Made once from the C++ rows; edited by hand from
now on. The label-built keys get keys of their own: @Controls is controls_page, @Custom output size custom_output_size.
tests/test_settings_area_keys.py holds them to FROZEN. Their settings wait behind AREA_SETTINGS_LIVE.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
#2434 (l6s, step c): LsSettings (game/settings_abi.h, its Rust mirror host-sys settings_abi.rs) is generated by
schema-gen from the area mods' mod.json, one field a natively read setting, with its layout's hash and X lists by
codec; schema-gen --check finds it stale. game/settings_caps.h (LsCapabilities, LsRendererStatus, LS_CAP_* in
CAPABILITIES' order) is hand-written, mirrored by host-sys settings_link.rs with tests that hold the two together.

MkwVkRenderer version 71 adds settings_apply (each row set as the snapshot says, a restart's from at_start, with no save,
no preset made Custom, no restart note), capabilities (upscalers, frame generation, HDR, Reflex, Anti-Lag 2, Intel, the
output sizes, monitors, GPUs, the Auto tier) and renderer_status (the upscaler running, the memory tier, the threads, the
microphone test's levels); the host wraps them (rx_settings_apply, rx_capabilities, rx_renderer_status, from version 71)
and host_sys::settings_link reads them. Nothing calls settings_apply yet: step d does. tests/test_settings_link.py checks
the wiring.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
#2434 (l6s, step b): longshot-game's options_store keeps the file as its lines in place (a file read and written back
unchanged is the same bytes; a line the game does not know stays as it is), reads and writes the area mods' values by
their codecs (WxH sizes, devices by their id lines, a choice's first) as C's atoi read them and held to their ranges,
moves an older file's values as the renderer's options_version 2 to 7 did, and makes the LsSettings snapshot of them.
The renderer still owns the file until step d cuts over: nothing writes it from here yet.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
engine_text's check took the FPS footer's "Base %.0f, %s" for untranslated
in es, es-419, fr, it and pt-BR, where Base is the word: a list of texts the
same in some languages, SAME_IN, says so. test_host_guest_writes' ALLOWED
entry for host/mouse_native.c's camera float goes: the camera writes are in
Rust now.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
settings_now.rs: DocOptions, the settings service's options lines on one OptionsDoc, read and migrated at game_init and
written by the game 500 ms after a change. Each change rebuilds the LsSettings snapshot from the area mods' values, hands
it to the renderer (settings_apply, with the start's) and to the host (game_settings(), an atomic pointer with the two
before it kept alive).

The host's settings readers (47 sites) go through host/game_settings.h HOS_SETTING: the snapshot's field, the renderer's
row while game_settings() is NULL. All of it is behind AREA_SETTINGS_LIVE, still off: nothing changes until the cutover.
The renderer's status reads (menu open, dynamic resolution, native HDR, render thread, zstd, jitter) and the binding
toggles stay rx_option until they move to LsRendererStatus and the binding type.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
A button needing the laptop capability, which the renderer now sets for an integrated GPU (menu_capabilities), as
menu/laptop.cpp's laptop_row showed the row.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
- gpu/vk/menu/intel.cpp: intel_compiler_row() was defined inside the anonymous namespace, so vk_menu.cpp's
  mkwvk::intel_compiler_row() (menu_capabilities, LS_CAP_INTEL) did not link. It moves out, into mkwvk.
- gpu/vk/vk_api.h reached game/settings_abi.h and settings_caps.h directly, which test_game_boundary.py forbids: the
  renderer and the host reach the game through game/game.h, which now includes both.
- tests/test_settings_link.py checks the headers through game.h; tests/test_dev_ab.py keeps a key's renderer row first,
  as the area mods declare the same keys until step f.
- website/public/schemas/mod.schema.json regenerated (the_website_serves_this_schema).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
api::settings::AREA_SETTINGS_LIVE is on. The game reads, migrates (options_version 8) and writes the options file;
the renderer never opens it. Its rows still draw the menu until step f: menu_init reads its lines from the game's
document and the start's snapshot (game_settings_at_start, handed over by host/rx_backend.c after mkwvk_init), and its
save() hands each line back to the game (DocOptions::from_renderer). Game-side changes run the engine rules
(longshot-game engine_rules.rs: Quality preset tables, render-size snap, Auto from the renderer's new caps
auto_upscaler/auto_resolution, LS_CAPS_LAYOUT 2) before the renderer and the host see them. Environment overrides
(HOS_REALTIME_STEP, RX_VK_PACE, HOS_OUTPUT_RES...) are a layer that is applied and never written. The service's codecs
read output_res as WxH and the devices by name or index. The file is written whole, through links, keeping its
permissions, by a .part and a rename.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The six engine callbacks on the rendering sites (render.sceneFormat for Native HDR, dynres.fixedPath, dynamicFrame
and fixedScale, render.fixedScaleApply and fixedScaleFlags) were the host's C, installed through host_sys::sites. They
are oot::render's now, listed by oot::engine, and read and write the renderer's state host/nn_vi.c keeps through a new
host_sys::render (hos_scene_rgba16f, hos_fixed_resolution, hos_fixed_scale_bits, the hos_dynres_runs counter and
hos_res_module; a stand-in for each in the fake host). Each does what the C did, in the same f32 order; a resolution
object whose fields cannot be read asks for no recompute.

The rows, their forms and their engine labels are unchanged, so the lifted code is the same. The three Python fixtures
that cut the C callbacks (test_scene_format, test_dynres_sites, test_fixed_scale_sites) are Rust tests against the
C's bodies over the same settings (oot/src/render/tests.rs) plus tests/test_render_sites.py for the places, the
wiring and the host's switches; sitecheck's helpers that cut host C callbacks went with the file.

Rows 1, 2 and 4 of the audit asked for value rules (a replace by a select, a branch on a value, a replace by a value);
edits::rules has no such form, so they are Rust callbacks like the other three.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
OoT's present poll (nvnEventGetValue), its sleeps (SleepThread), the presentation
thread's idle wait (ReceiveLightMessageQueue), the wait before the window's
acquisition (WaitEvent) and the window's making (nvnWindowInitialize) were HLE
code that compared the guest's return address (x30) with addresses of build
e0f3ccfa. Each call point is now a core site in game/sites/sites.toml with a C
callback of the host's, installed by oot::engine through host_sys::sites:

- present.eventPoll, present.eventPollLoop: replace of the two blr x8 to
  nvnEventGetValue; answered 1 at once with the render thread, else the call;
- present.pollSleep: before the poll's bl SleepThread; marks the thread's next
  sleep as the poll's (the FPS Breakdown), and keeps the HOS_SLEEP_LOG log;
- present.queueWait: before f_834a3060's bl ReceiveLightMessageQueue; marks the
  presentation thread's next receive as the preview's watched idle wait;
- present.preAcquire: before the instruction after f_81207a50's bl WaitEvent;
  the preview's publication and rollback, whose guest writes stay in
  nvn_native.c, the framework's slot now the named location present.framework;
- present.windowMade: replace of f_8114e4f0's blr x8 to nvnWindowInitialize;
  makes the call, then records the window's owner.

The state stays in host/nvn_native.c. The HOS_PRESENT_POLL experiment (no fps
change measured) and its switch go, with hos_nvn_event_value, which only it used.
tests/test_present_sites.py checks the rows, installs and the callbacks' logic,
and that no host C names those addresses; hooks.md and developing.md say so.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The game fits each sun cascade around its slice of the view, and its view is wider at
the sides on a picture wider than 16:9: the nearest cascade covers more ground with the
same texels, and the shadows came out coarse and flickering, worst at 32:9 (#2274).

- Highest (and Auto on 12 GB or more) is 4096 at 16:9 and narrower, and grows with a
  wider picture: 4096 x (shape / 16:9)^0.3219, at most 5120 (4512 at 21:9, 5120 at
  32:9). The render target pool gets room for it at boot while it stays within 900 MB.
  Game's and High are unchanged. HOS_SHADOW_RES=0 keeps 3072; =<texels> forces.
- The sun's cascade splits: cascade 1 ends at 45 m, cascade 0 at 15 m at 16:9 and
  12 m at 32:9, linear in the shape between (the game's 10.8 m and 33.3 m in Hyrule
  Field). HOS_SHADOW_SPLITS=0 keeps the game's; =<c0>,<c1> moves them.
- Once a sun map past 4096 is drawn (a wider picture), the cascade depth bias defaults
  to 3,4; 16:9 keeps none. RX_VK_CASCADE_BIAS, 0,0 included, still replaces it.

Fixes #2274

Assisted-by: Grok Bot
As the review on #2431 asked.
Wrath's two commits below keep their host and renderer parts as they were (host/shadow_res.h,
the pool's room in host/nn_applet.c, the cascade bias in gpu/vk/vk_draw.cpp, the switches and the
C tests of the pool). Their game C (game/oot_shadow.c, game/oot_shadow_fit.c, game/oot_sites.c, the
build's locations.toml) and the C tests over it (tests/test_oot_shadow*.py) are gone on mod-api, so
they were dropped there; this commit moves what they did to game/mods/shadows:

- Highest takes the size the render targets' pool has room for (hos_shadow_res_granted, now read
  through host-sys's info::shadow_res_granted): 4096 at 16:9, 5120 at 32:9; HOS_SHADOW_RES=0 keeps
  3072 and =<texels> forces a size (hooks::CascadeSize, src/wide.rs, a copy of host/shadow_res.h's
  math that the pool keeps in C).
- The sun's cascade splits move at a new site, shadow.fitSplits (the mod's sites.toml, format 1,
  and its sites.def line): cascade 0 ends at 15 m at 16:9 and 12 m at 32:9, cascade 1 at 45 m;
  HOS_SHADOW_SPLITS keeps the game's or moves them (src/splits.rs, the picture's shape from
  host-sys's info::wide_out).
- The tests of the C hooks are Rust tests now (wide.rs, splits.rs, hooks.rs, lib.rs), and the
  source checks of the bias and the pool's room are tests/test_wide_cascade_bias.py.
- Docs: the mod's README and Highest's hint, game/DESIGN.md, docs/dev/reference/switches.md.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The port kept host/shadow_res.h's size math and its Rust copy in wide.rs side by side. Now
wide.rs alone decides: longshot-game exports game_shadow_res_wide and game_shadow_res_switch, and
host/nn_applet.c's pool asks them for the room it gives. shadow_res.h keeps only what is the
pool's own: the declarations, the 3072 it counts past, and how much memory a map takes over it.
hos_rt_pool_size runs from the lifted game code, after hos_main.c's boot has called the game side
(game_wide_picture) and set hos_wide_out, and the two functions are pure, so they can be called then.

A Rust test checks the exported table (16:9 4096, 21:9 4512, 32:9 5120, the cap, the switch's
off and forced codes). The C fixtures of the pool (test_rt_pool_minimum, test_output_resolution)
stub the two functions with those answers, and still check the fallback to no room past 900 MB.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The fourth commit's exports game_shadow_res_switch and game_shadow_res_wide in sysmods.rs name
sysmod_shadows, which tests/registry.rs refuses unless the file lists the mod as a bridge to
the host. They are such a bridge, as the widescreen picture beside them is: the host's pool asks
the mod's one size table and creates no mod, so sysmods.rs's list gains shadows (the test's rule
for a new bridge) and the exports stay where the host's other game_* exports are.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
builder/crates/edits/src/patches.rs held the output size's patches and the gameplay HUD's wrapper as Rust data, outside
the site tables. They are now rows of game/sites/sites.toml:

- output.* (10 sites, the output size, the 3D's largest size, the render targets' pool and the Graphics heap): engine
  sites with Rust callbacks in oot::output over the host's hos_output_size and hos_rt_pool_size (the pool's size stays
  the host's policy, with the sun shadows' grant); output.nativeRebuild (entry, can_return) keeps the host's C,
  hos_defer_native_output_rebuild, whose state is nvn_native.c's. No inline rule form writes these, so none is a rule.
- hud.screenUpdate: a new form, at = "wrap", whose row names its host function (wrapper =
  "hos_gameplay_hud_screen"); no flag or slot, core only, one wrapper a function (a return site or a second wrap
  stops the lift), mods' return sites kept off wrapped functions as before.

Each site sits at the instruction its patch named, its signature found once in the build. patches.rs and
EditError::Patch are gone; hooks.md documents the wrap form.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
host/hos_thread.c matched the game's thread-wrapper entry (0x834a2e50, its
argument's +0xb0 mask and +0xb8 thread) and read its core cache's TLS key
(0x84e9f7ac) and that key's owner (0x84e9f668) at addresses of build e0f3ccfa
written in the C. They are the named locations thread.wrapperEntry,
thread.coreTlsKey and thread.coreTlsOwner in game/sites/sites.toml now, read once
through hos_locations_resolved. e0f3ccfa resolves them to the same addresses, so
nothing changes there; a build that names none leaves them 0, and the wrapper's
mask and the core-cache alias then match nothing (inert) instead of reading a
wrong address. Only gen/locations.c gains the three entries.

tests/test_thread_locations.py checks the rows against the old addresses, that no
host or renderer C names them, and runs the lookup cut from the source: e0f3ccfa's
table, and a table without thread.*. hooks.md says the host's C reads these.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The three sites called host/prompts.c's hos_prompts_text_draw, _text_layout and _glyph through host-sys. Their code
(the codes each face and the controls show, the text rewrite, the font's format 4 cmap bound and pointed) is now
oot::prompts, read on the same hits; host-sys's wrappers are gone. tests/oracles/prompts_texts.c keeps the C as it was,
and oot's tests check the Rust gives its codes, rewritten texts and bound fonts byte for byte.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The prompts' textures are GPU data in a pool the game makes over Common.bntx, with no guest code a site could sit on.
nvn_native.c's nvnMemoryPoolInitialize and nvnMemoryPoolFinalize now raise game.h's game_prompts_pool and
game_prompts_pool_gone, and system/prompts (game/mods/prompts) knows the textures' pool by bytes no run writes and
writes a change's runs there and over the layouts. The prompts' base parse and the patch of the files served
(prompts_base.c) moved to the mod's base.rs. host/prompts.c keeps choosing the runs and the files served, through
game.h's game_prompts_* entries (longshot-game prompts.rs). The C base reader stays as a frozen oracle under
tests/oracles; tests/test_prompts_live.py's checks are the mod's live tests now (the put-back, the order, the guard,
the marks, the pool's finalize), with the HLE's two events checked in nvn_native.c.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The wrap form (h3) came after site-hooks was written, so its shape match did not cover it and the builder did not
compile. A wrap site calls the host's wrapper rather than a callback, so site-hooks has nothing to build for it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The settings cutover brought game.h into host/mouse_native.c (through game_settings.h), whose game_free function
clashed with the file's static game_free flag, so the game did not build. The flag is camera_left_free.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
preset_lines called itself with &has, a new closure type at each level, and the tests' build overflowed (E0275).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
- site_owners.txt has #2431's shadow.fitSplits.
- present.queueWait's signature is 8 words, the repository's limit (its trailing ldr dropped).
- site-table's wrap test replaces a key it is given again instead of keeping both.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
- test_present_sites: a before site on its call (pollSleep, queueWait) is at its return address - 4; each row says
  whether it is on the call.
- test_settings_link: save() as a word, so sync_transition_autosave() is not a save.
- test_host_guest_writes: host/prompts.c's font memcpy is gone with the button prompts in Rust.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
- test_preview_save: the cut-out of vk_menu.cpp now needs game_owns_options and host (#2434 d); the fixture declares
  them, the renderer still owning its file.
- test_prompt_font_bind: the font patch and the texts' codes are the core's Rust now (oot::prompts, whose tests check
  them against the C they replaced), so its C harness is gone; it checks prompts.rs's constants against build-assets'
  and the host's faces and defaults.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The rewrite of test_prompt_font_bind dropped its C harness, whose binds mode was the only check of current_binds,
still the host's: a cut-out of it on a stand-in hos_binding, each button's pad input, its first key (the second
slot's when the first is clear or not a key) and the movement keys' first keys, each set of them told apart.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY

Its trailing bics dropped; the site (0x1c, the ldrb) stays inside it.
- registry: host/prompts' bridge (src/prompts.rs, h4) is a listed bridge to sysmod_prompts.
- settings_now: the environment test's file is a current one (options_version), so no migration writes to it; the
  frozen-keys test skips the view and language lines read_values does not keep.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The Insert menu (system/menu) and its Mods tab (system/mods-tab) are now required, with
the six settings-area mods and prompts: without them there is no in-game way back to switch
a mod on. Every other built-in mod is optional. A native built-in mod switched off (in
profile.json or the Mods tab) keeps its settings declared, so their values stay and other
mods' shownIf still reads them, but its rows leave the menu until it starts again
(Settings::set_shown). Script built-in mods already left the menu when stopped.

Game-free tests: an off optional native mod does not start and has no menu rows, and gets
them back when switched on; a required one ignores profile.json's off and the tab's switch.
Docs: system-mods.md lists the required set with what breaks without each; tools.md says
how a launcher reads system/required/on from installed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Step 0 of moving game features out of the renderer (#2434): a small generic API, each kind its own permission, the
renderer knowing a program by its key alone.

- watch/seen (gfx.seen): the renderer marks watched programs' draws and dispatches, reports presents-ago once a present
  (game_programs_seen).
- afterDraw (gfx.afterdraw + gfx.shader): a screen effect at GAME_PASS_AFTER_DRAW with GamePass.program, run by
  vk_effects' fx_run_after on the draw's first colour target at the draw's end.
- overridePipeline (gfx.pipeline): a depth bias by program or by target shape, added or in place.
- scaleConstant (gfx.constants): one float word of c3..c18 scaled where positive in the uploaded copy, power -1 for
  reciprocals; ProgramHook.setFactor.
- replaceFragment (gfx.replace): taken and checked, not applied yet (the program caches would need keying), so the
  feature is absent until it is.

game.h's GameProgramHookList, MkwVkHost's game_program_hooks/game_programs_seen last; gpu/vk/program_hooks.h is the
game-free matcher (tests/program_hooks_test.cpp via tests/test_program_hooks.py); api::services::gfx_programs and
longshot-game::programs the game side; schema, d.ts, permissions and docs regenerated.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The renderer kept a game-specific pass: it recognised the scene mapping
programs by ACES's Narkowicz constants and rewrote their colour with
PsychoV35, behind its own Tone mapper row and RX_VK_PSYCHOV35_DLSS.
That logic moves to a new system mod, game/mods/hdr. The renderer keeps
only what is generic.

- gfx.programs.patchCurve (permission gfx.curve) replaces the unshipped
  replaceFragment. A mod brings a fit's constants, the luminance weights
  that tell its channels apart, and a curve as a list of float operations
  (GAME_CURVE_*, api::services::curve, CurveBuilder). gpu/vk/
  program_hooks.h checks the hook (GAME_HOOK_CURVE). Fragment programs
  whose code holds every constant take the curve, with its hash in their
  key, so only those programs translate again. ir_opt/curve_pass.h (it
  was scene_tonemap_pass.h) emits the curve in place of the fit.
- The hdr mod declares the five HDR settings, with the same keys. Its
  PsychoV35 (psychov35.rs) is built as a curve and checked against
  RenoDX's path ported in f64. With Native HDR, an HDR display and
  PsychoV35 selected, it patches the curve and asks for the RGBA16F scene
  (oot::render::want_scene_rgba16f). The host takes that scene with
  Native HDR alone (hos_scene_rgba16f), and the renderer asks the host
  for it through MkwVkHost.scene_rgba16f (version 73).
- The upscalers, frame generation and the TAAU and Off paths now check
  whether the scene buffer is RGBA16F (scene_rgba16f,
  takes_rgba16f_scene), not the tone mapper.
- Removed from the renderer: psychov35.h, the HOS_OPT_HDR_TONEMAP option,
  opts.hdr_tonemap, the HDR rows of menu/hdr.cpp (only the section
  heading stays) and RX_VK_PSYCHOV35_DLSS (now GONE). The renderer takes
  hdr, paper white, peak and contrast from the settings snapshot.
- Tests: curve hooks in program_hooks_test.cpp, the curve pass on
  synthetic IR (curve_pass_ir.cpp), a check that gpu/vk names no fit
  constants and no PsychoV35, the hdr mod's own tests, and the RGBA16F
  scene tests (renamed from test_psychov35_*).

Shader caches: vk_shader.cpp and eden/ are sources of the translator
stamp, so this change invalidates every program cache once.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
A test reads each scaleConstant hook as published ({ owner, program, buffer,
word, factor, reciprocal }), so a mod's test can check a factor follows its
setting. FakePrograms is kept by the session for it; gfx.md and the testing
types say so.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
publish_menu showed a native mod's row while its shownIf setting was on; with
shownIn it is shown while that setting's value is one of the list (a row shown
while a toggle is off: [0]), as the area mods' declarations already say.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
New Rust system mod system/grass (game/mods/grass). Grass distance holds five
gfx.programs.scaleConstant hooks (c3 word 75 of 383a566958350efe; words 46 and
47, reciprocal, of 43ec86f35fd937b9 and 8a8304edb7bdf4bf), none at Game's so the
renderer copies nothing, and sets their factor on a change. The Simulated turf
page's rows (global multipliers, the four multipliers, the area's four values,
Reset current area) are its settings too: the turf resource's words are edited
from Rust (src/turf.rs, ported from sim_turf_settings.h), each area's preset
kept in sim_turf_settings.ini in the same format. The game addresses are the
named locations turf.sceneManager and turf.resourceVtable (sites.toml); no new
MkwVkHost member, no API bump.

Deleted from the renderer: gpu/vk/grass_distance.h, grass_reach and its patch,
RX_VK_GRASS_DISTANCE (now LONGSHOT_SET=system/grass:grass_distance=N),
opts.grass_distance, the Detail row, sim_turf_settings.h and the page's rows.
The renderer keeps the page's link row and the turf's private lists. The keys
moved from system/graphics (no abi field now; settings_abi regenerated) and stay
FROZEN (MOVED to game:GRASS; menu_places.tsv). The C++ and Python checks of the
old code go; the mod has cargo tests and a mod test.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The renderer kept three of OoT's shadow tweaks: a depth bias on the characters' shadow maps (RX_VK_SHADOW_BIAS), one on
the sun's cascades (RX_VK_CASCADE_BIAS, 3,4 past 4096 by default, #2431's), and the tree-shadow mask (program
3427a1dbefd5e02c) blended with its history (RX_VK_MASK_BLEND, RX_VK_MASK_RADIUS). They move into game/mods/shadows
(src/draw.rs), as settings for the run (LONGSHOT_SET=system/shadows:<key>=<value>), and the switches go.

- The biases are overridePipeline hooks by target shape (square, depth only: up to 768, and past 4096 or past 768 when
  set), one owner each: the renderer adds none of its own. A shape hook no longer skips the dynamic state's fast path
  (the shape is in the packed state; the fast state carries the hooks' generation).
- The mask needs its own last frame, which an afterDraw effect cannot see (the effects' template has no history and
  writes B10G11R11/RGBA16F only), so the compute path stays, made generic: gfx.programs.blendHistory(program, { weight,
  radius?, channels? }) (gfx.afterdraw), a HISTORY program hook (game.h, MkwVkHost 73), history_blend with
  shaders/history_blend.comp (was shadow_stab.comp), its images kept per program while the hook is.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The renderer named two of the game's programs (the world's lighting composite and the item wheel's
background), kept the Ultrawide menus row's screen mask and decided when the middle 16:9's sides show.
The widescreen system mod now watches those programs (gfx.programs.watch/seen, permission gfx.seen),
decides the sides and the keep mask, and gives the renderer the result each present through
MkwVkHost.wide_sides (version 73, in wide_menus' place; game.h GameWideSides). The world flag the
output effects' worldDrawn reads comes from the same watch. hos_wide_keep_mask is gone: the mod keeps
its own mask and reads HOS_WIDE_KEEP itself.

Game-free tests: the mod's decision for each seen state, and a source check that gpu/vk names none
of those programs or the menu list.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Whether the frame drew the game's 3D world was the widescreen mod's, so an output effect's
when: world/noWorld only worked while widescreen ran. A tiny always-on Rust system mod,
system/scene (permission gfx.seen), now watches the world's lighting composite and keeps the
result; the present (hos_wide_ui_tick) gives it to the renderer as GameWideSides.world whether
or not widescreen runs. Widescreen keeps only the item wheel's watch and reads the world from
the scene mod for its menu sides.

Tests: the scene mod's state (unwatched counts as drawn), and the world reaching the renderer
with the widescreen mod off.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The Controls row Disable camera centering was oot::engine's callback over the
host's option 45 (host/mouse_native.c hos_disable_camera_centering, the
renderer's opts row). It is now system/camera-centering: the site
camera.followYaw moves to the mod's sites.toml, its engine callback is the
mod's (an outcome site, installed at start by longshot-game's NATIVE_ENGINE,
reading the mod's switch), and the setting is the mod's, with its key
disable_camera_centering (FROZEN, MOVED to game:CAMERA_CENTERING), its place
on the Controls tab and its legacy id 45 (now in game/options.h). The host's
function, the renderer's row and option answer, and the settings snapshot's
field are gone; the mouse camera's input stays the host's.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The table that decided which of the game's sounds are Navi's, the ocarina's
and so on (host/audio_source.h's classes) and their twelve rows move into a
TypeScript system mod, system/controller-speaker, over a new generic API:
audio.routeToPad(archive, asset, { mode, rumble }) under its own permission
audio.pad (schema, generated d.ts and docs), a PadRoute handle with setMode.
Patterns are globs with '|' alternatives; the first route made has a sound.
api::services::pad_routes holds the routes, longshot-game::pad_routes answers
the host (game.h game_pad_route_*), and the host reads the player's archives
again when the patterns change. The host keeps the archives' reading and the
speaker, and no sound name: HOS_PAD_SPEAKER_<CLASS> and _OCARINA_RUMBLE are
gone (the ocarina's half rumble is its route's rumble 50), as are the
renderer's class rows, opts.pad_speaker and HOS_OPT_PAD_SPEAKER_CLASS*. The
rows keep their keys (MOVED to game:CONTROLLER_SPEAKER) and places. The C
tests use made-up names; the fake game's game.audio.padRouteOf checks the
mod's table against the old classes' cases.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The Controls page's link had a key made from its label, "@Controls", in the renderer's rows. The menu mod lays the
menu out now (#2434 step e) and names that link controls_page, as the area mods' rows already do.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The binding type (#2434 step e): a "binding" setting, Longshot's own system mods only, is a control of the Controls
page. Its value is its Toggle column, kept as toggle_<name> as the renderer wrote it; its inputs stay the host's
pad_/key_ lines. system/controls declares the 32 controls (bind_*); the 15 with a Toggle column are read by the host
from the snapshot (LsSettings bind_*, LS_SETTINGS_BINDINGS), so the hold toggles and Sprint's toggle no longer go
through the renderer's HOS_OPT_HOLD_TOGGLE and HOS_OPT_SPRINT_TOGGLE. The settings service's menu rows carry each
setting's NativeUse for the menu.

The renderer's status (design.md 3c): LsRendererStatus (LS_CAPS_LAYOUT 3) gains what the host still asked of
rx_option by number: whether the menu or the mods' UI holds the input, native HDR and the scene's tone map, dynamic
resolution and its scale, the zstd answer, the render state, the upscaler's jitter, and the menu's question and the
Output resolution preview's seconds. The host reads it through rx_status() (once a millisecond at most per thread),
falling back to rx_option while a renderer gives none; the game's Rust reads it through settings_link.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The menu mod's tabs, pages, headings, links and row order are its own now (game/mods/menu/src/layout.ts), each row by
its setting's .ini key; a setting the layout does not name goes where its declaration's place says (view.ts laidOut).
longshot/settings-host declares the settings service's rows (the area mods' and any mod's, with their place), taking
from the renderer's row of the same key only what it alone knows until step f (a slider's unit, a list's end, the old
dialogs' words); a row's state and changes still go to the renderer's row while it has one. The renderer's tabs,
pages, headings, links and question are no declarations any more. The label-made keys are custom_output_size,
sim_turf_reset_area and bindings_reset (the Controls link is controls_page).

The menu mod owns the restart question, the Output resolution preview's keep-changes countdown (from the new
settingsHost.status: the question the renderer waits on and its seconds left), the Microphone level line (its English
out of the renderer: mic_meter_text deleted) and the empty Play recording line. Tests: each tab's and page's layout
against the renderer's rows, a placed row, the countdown, the restart question, the meter, the recordings page.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The UI core animates styles with no script a frame: transition (opacity, colours, translate,
scale, size) eases a style change, enter plays as a node first shows, exit as a HUD root or a
window goes (from its last draw list), and mount(..., { for }) unmounts a root after seconds
(the lifetime op, the expire event). translate and scale are new painted properties. The fake
game's UI clock is its frames' dt; game.ui.look gives the animated look. Area names is ported
onto it (banner.ts gone). Docs, d.ts and core tests.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
tsgo: assert.throws takes the message third. The banner's fade is now its style's exit (a load
screen or the setting off fades it too), so the mod's version moves to 1.3.0.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
At the start, with the area mods' settings in, system/menu faulted three times in its frame listener (5.7 to 6.5 ms
of CPU): the frame that reads a generation's declarations turned every one of their texts into the menu's language at
once, about 700 to 900 calls to i18n.t (label, help, each choice, verb and the three of a question, for every row
of every page), and the generation moves on several times while the mods start.

Each declaration's texts are now looked up when first read (getters on a shared prototype, kept on the object), so a
generation's read translates nothing and a page switched to translates its own rows only. A text with no values
(most of them: labels, helps, Off and On) is looked up once a language and kept in the menu, so the same literal
across rows is one call. The language is read once a read of the renderer's (decls, rows), not once a text.

The cost test reads 200 more declarations, as the area mods add, and holds the start (the declarations' frame and
the first page) under 3 ms too; its log line says "start X ms".

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The game's reader of longshot_options.ini (options_store.rs) had two faults the ported checks found:
- migrate read rumble_strength=0 (Off, before the Vibration row) after the value was held to the row's 25%, so it
  never became Vibration Off; it reads the file's own number now.
- OptionsDoc::set changed a key's first line while the reader takes its last: a key with two lines (memory_budget's
  old bug, test_options_budget_once) lost the change at the next start. It sets the last line now.
Tests: both, the 16:9 move of version 6 case by case, and the rumble steps and ends.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The checks of the renderer's save (test_menu_save_atomic) moved with the file to the game: settings_now.rs write_whole
keeps a link a link, the file's mode, a read-only file, writes in place in a folder that takes no new file and leaves
nothing beside it. engine_rules.rs: Auto's Upscaler comes first and no preset sets the Output resolution
(test_auto_settings). the_environments_values_reach_the_snapshot_and_are_never_saved reads a file of this version
(one without options_version is moved, and its moves owe a write).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The host reads its settings from the game's snapshot (host/game_settings.h HOS_SETTING) and the area mods declare them.
tests/area_settings.py gives the checks both: an area mod's declaration by key, and HOS_SETTING for a cut of host code
(the field must be LsSettings's; the value the check's stand-in for the row's number). Ported: the dead zone, the
camera and mouse inversions, the triggers' cut, Controller in background, the mouse's rows, Native mouse's host half,
an input movie's Game speed, the pointer, Vibration strength (its range and the old file's Off, now the game's), Sprint's
Toggle line and the version 7 move.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Volume and Mute in background, Mono's Speaker layout, the Output device (system/audio's declaration, its id and name
lines, the renderer applying a change the game makes once) and the controller speaker's page (system/audio's rows in the
classes' order with the host's defaults; pad_speaker_test.c stands in for the game's snapshot).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
save() makes its lines into a string (appendf) and, the game owning the file, hands each to it; menu_init reads the
game's lines. The fixtures that cut them (menu keys, environment overrides, the atomic save, the upscaler round trip)
get the new pieces and cut the renderer's own file path; test_menu_save_atomic gains an owned case: no file written,
each line handed to the game. The moves of an old file (Esc, the 16:9, Sprint's Toggle) and Auto's rules are checked
in the game's copy too (options_store.rs, engine_rules.rs).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The frame rate cap and the pacing read the game's snapshot (system/graphics' frame_rate_cap: 30 first, 60 the
default); the GPU device and Fullscreen monitor rows are system/graphics' with their id lines; no area mod has a Mesh
shaders row; host-sys's fake host's LONGSHOT_FAKE_ASPECT is the tests', no switch of a run; and the NFC Scan row's live
status covers the Windows sandbox's state 7 (#2516).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The Shadow resolution Highest hint #2431's port wrote is translated in every menu strings file, in place of the
3072-pixel one it replaced. test_walk_key and test_xinput_thread cut host code that reads HOS_SETTING now, so their
fixtures take area_settings' HOS_SETTING_C as the other ported checks do; test_vibration_menu looks for the
HOS_SETTING reads of Vibration and DualSense HD Haptics in host/pad_sdl.c.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Per docs/modding/system-mods.md's rule (required only for what the game needs to be set up and played): Grass,
Camera centering, Controller speaker, Scene and HDR are optional. HDR drops its "required": true. Scene stays
optional: Widescreen UI reads its world flag, but without it the world counts as drawn (sysmod_scene::world_or_drawn)
and widescreen's decide returns no sides, so only the Ultrawide menus row's sides stop showing; nothing breaks. The
optional list and the Rust mods' list name them.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The settings ABI was the six area mods' alone, so the hdr system mod's HDR values (abi renderer) had no LsSettings
field and vk_menu.cpp's now->hdr* did not compile. schema-gen's fields are now every built-in native mod's settings
with an "abi": the area mods' first, in their order, then the others' by folder name. The game's options file owns
the same set (options_store::area_decls), and an optional mod's (optional_owners) read their declared defaults in
the snapshot while it is switched off: the loader's set_shown marks it in api::settings (native_off), and the game
hands the renderer and the host a new snapshot then, nothing written. HDR off is HDR off.

Game-free test: system/hdr's values reach the snapshot from the file while it is on, its defaults while it is off,
the file's line kept. Docs: DESIGN.md and system-mods.md.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
style(content): #2620's plan tests rustfmt'd and clippy clean
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 20s
PR description / Title and description (pull_request_target) Successful in 41s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 40s
CI / Workflow lint (actionlint) (pull_request) Successful in 41s
Third-party parts / As their notes say (pull_request) Successful in 47s
CI / Website build and checks (pull_request) Failing after 19s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 59s
CI / What the change needs (pull_request) Successful in 1m53s
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Failing after 5m19s
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Failing after 5m41s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Failing after 4m27s
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Failing after 7m22s
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Successful in 1m13s
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Failing after 7m59s
CI / longshot-builder end to end (synthetic game) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
199a223ed9
The merged content.path/patrol/schedule work (#2620) left outputs.rs unformatted and three test orders as vec! where
an array does (clippy::useless_vec, -D warnings). No behaviour change.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
A slider's or a number's declaration may give "displayScale" (any mod's): its row
shows the value times it, with as many decimals as the scale has (at most 4),
while the value kept, read and set stays unscaled. The settings service writes
its rows' texts with it, settingsHost.decls hands it to the menu mod as
displayScale, and UI's Slider takes a displayScale prop of the same meaning.

settings.setLocked(id, why) (and a native mod's cx.settings().set_locked) locks
a row: the Insert menu shows it greyed with why after its help, the player's
changes to it come to nothing (settingsHost set/press reject with "locked"),
the mod still sets it. A stop unlocks it; nothing is kept.

The grass mod uses both: the multipliers read 1.0x, Fade start in metres, Far
power as its exponent; the area's value rows and Reset current area are locked
while no area's turf is ready, Reset too while the area has no edits. Docs
(modding/settings.md, settings-declarations.md, the user guide, the grass
README), the generated API docs and mod.schema.json (also catching up with the
permissions added since it was last written) follow.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
getting-started.md gives the launcher's version folders on Windows and Linux (and a portable launcher's), which
version to pick, that profiles don't change the path, and the Versions tab's Open folder.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Checked each README's Used by / uses against cargo metadata and filled the gaps (build-core's, build-driver's,
modtool's and others' were short), and gave system/prompts its Testing section.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Docs, READMEs, comments, identifiers, log lines, tests and strings say "the game" or name the game's things
neutrally, and no path carries the title:

- the crate oot is game-core (lib game_core; game/crates/game-core, longshot-rs re-exports it as game_core);
- the oot_/hos_oot_/OOT_/Oot identifiers are game_/hos_game_/GAME_/Game: the HOS_OOT_* switches are HOS_GAME_*
  (HOS_GAME_BARRIER_WAIT, HOS_GAME_FIRST_NIGHT_FIX, HOS_GAME_TRACE_SAVES), and the stale names some comments still
  gave (oot_state, HOS_CONTROL_OOT_*) are the real game_* ones now;
- the control bridge's "oot" subscription is "game" (host/control.c, longshot_ctl.py, parity_gates.py), its scan
  log line "control: game changes scan", and the core's log lines start with "game:";
- the builder's .nup picker and recomplauncher.json ask for "your copy of the game";
- tests/test_oot_fov.py is tests/test_game_fov.py.

Left as they are, for a reason: the trademark notice, the website's scrubber and its tests, the game's own name by
title id (game-files' title.rs), the game's item, song and voice-file names (cheats' mod.json and debug.json,
Item_*, NV_USen_Custom_*), the switches gone (GONE lines, so a player still setting one is told), the old save
script's backup folder on players' disks, and other projects' and people's names.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
tests/test_no_game_title.py reads every file of the tree (jj's or git's list) and its path for the title, the
series' name and the title's initials as a word or an identifier's part, with the exceptions named beside their
reasons (ALLOWED_FILES, ALLOWED_SPANS). tests/test_game_boundary.py's check of title-named symbols in host/ and gpu/
spells the initials in pieces, so it names none itself.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
refactor: no comment names a C file that never was, and the .nup picker asks for a game dump
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 9s
CI / Workflow lint (actionlint) (pull_request) Successful in 21s
Third-party parts / As their notes say (pull_request) Successful in 21s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 21s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 27s
CI / What the change needs (pull_request) Successful in 1m1s
PR description / Title and description (pull_request_target) Successful in 1m5s
CI / Website build and checks (pull_request) Failing after 34s
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Failing after 4m54s
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Failing after 5m43s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Failing after 4m27s
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Failing after 6m22s
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Successful in 31s
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Failing after 9m19s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Failing after 9m15s
CI / longshot-builder end to end (synthetic game) (pull_request) Successful in 12m0s
9f00a6cbe8
The title's removal had turned the comments about C files gone before it (once host/ or game/'s files named for the
title) into names of game_*.c files that never existed. Each is gone or points at the code's home now: the history
notes in the Rust and the mods that replaced that C are dropped ("This was ...", "ported from ..."), the host's and
the renderer's references point at the Rust that holds the code (game-core's menus.rs, fixes/*.rs, longshot-game's
layout.rs, game/mods/sprint-walk ...), and game/DESIGN.md's port table names the C it ported in words.
docs/user/images/guide/manifest.json keeps a past revision's file path as it was (an exception of
tests/test_no_game_title.py), and the discord golden's harness saves the area names' C under a name of its own.

The builder's .nup picker asks for "your game dump (.nup)" and says what it takes: one .nup file, version 131072
(build e0f3ccfa); recomplauncher.json's game input says the same.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
menu/settings_apply.h: a module registers an applier, MENU_SETTINGS(name, keys...), that reads its fields from the
LsSettings snapshot and runs its own effects when a field is not what the renderer holds (take_setting: clamped, and
left while the renderer holds the value, so the next snapshot tries again, as the row loop did). menu_settings_apply
runs the appliers and leaves their keys alone, so these fields no longer go through apply_from_game and the rows'
on_change.

Moved: replay_cache (descriptor_reuse, sampler_cache), upscaler (fsr4_model, resolution, with the samplers and the
temporal failure reset apply_from_game made), framegen (frame_generation), reshade (reshade_preset, reshade_user_pick)
and bindings (layout_preset). The rows' on_change stays for the menu's own path until the rows go.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
display and audio take their devices from the snapshot by id in their own appliers: the by-id block moves out of
menu_settings_apply, and the index rows (fullscreen_monitor, output_device, microphone) no longer also run their
on_change from it, so the id alone decides and the row's place follows it. The display's Fullscreen, V-Sync and
window filter, the Speaker layout (the start's value) and the Microphone gain come with them.

A core applier in vk_menu.cpp takes the HDR values, and the rows whose effects are the core's: Anisotropic filtering and
the Quality preset (the samplers made again), the transition autosave (told to the host) and Button prompts (its restart
value when the host takes them live), as apply_from_game made them.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Each module with saved rows of the snapshot gets an applier (MENU_SETTINGS <module>_rows) that takes their values,
clamped to the rows' ends and left while the renderer holds them, a restart row's from the start's snapshot: camera,
controller, controller_speaker, fps_counter, framegen, gameplay, gpu, input_recording, intel, language,
menu_settings, motion, output (ultrawide, handheld_profile), threads, upscaler and volume. These rows have no effect
of their own; the renderer reads them where it uses them. The Upscaler and the DLSS model join the upscaler's applier
with the samplers and the temporal failure reset apply_from_game made for them.

What still goes through the row loop: output_res and nfc_tag, whose ends are lists the renderer fills.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Two MkwVkRenderer members after renderer_status: renderer_action takes an LsRendererAction (game/settings_caps.h): a
button pressed by its key, the menu's question answered, a mod's screen effect's player switch, a mod's debug page
opened in play; renderer_effects lists a mod's screen effects as LsEffectStatus (point, the two switches, state, GPU
microseconds, why). They replace the "@fx:<id>" and "@debug:<id>" keys with their tab-separated text. LS_CAPS_LAYOUT
moves to 4 with the new structs.

The host wraps them (rx_renderer_action, rx_renderer_effects, version 74); host-sys's settings_link mirrors the structs
(their fields checked against the header) and gives action() and effects(), with a stand-in for the fake game.
longshot/mods-host's effects and its edit's "effect" and "debug" go through them. The renderer still answers the old
keys until its rows go (step 4).

test_settings_link.py checks the new members are set, guarded and wrapped; settings-declarations.md says version 74.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
- longshot/i18n's menu language: LsRendererStatus.menu_lang (the Menu language, Auto worked out), not the
  menu_language row's LANG_CODE text. LS_CAPS_LAYOUT moves to 5; the mirror's fields are checked against the header.
- The cheats' Debug tools turn the developer area's Autosave off through the settings service (ModSettings::set_of,
  a system mod's change to another system mod's setting, as get_of reads one), not the renderer's row.
- The Mods tab's Restart presses the renderer's button through settings_link::action.
- SettingsService::refused keeps a mod's setting off the options file's own lines (OWN_LINES: the devices' ids, Auto
  (this PC)'s, memory_budget, options_version...) instead of asking the renderer for its rows: every other key of
  Longshot's is a built-in mod's declaration, which the native check already covers.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
SettingsService::refused's OWN_LINES (the devices' ids, Auto (this PC)'s, memory_budget, options_version...): each
refused for a mod's setting kept in the options file, never for a system mod's, nor for a setting kept elsewhere or
under another key.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
sprint-walk's sprint setting is in the snapshot ("abi": ["renderer"], game/settings_abi.h and host-sys's mirror
regenerated by schema-gen), and gpu/vk/menu/sprint.cpp's applier lays Sprint's controls out when it moves. Before,
only a change in the Insert menu did (game_rows.cpp's renderer_follows, gone): LONGSHOT_SET and the control bridge
changed the setting and left the controls as they were. The value the run started from (menu::first_snapshot) moves
nothing.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
nfc.cpp's applier takes nfc_tag, held to the tags the host lists now (nfc_listed), as the row loop held it to the row's
end. Output resolution needs none: it is a size, not one of the snapshot's ints, so the row loop never took it; the
run's size is the start's (apply_first_snapshot), and a change waits for the next start.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
MkwVkRenderer.option is gone (version 75); option_set stays (the ReShade split, the Debug tab's inventory counts).
Every reader already took the game's snapshot (HOS_SETTING) or the renderer's status (rx_status) first; the renderer's
answer by number was the fallback for a host with neither, and is now the setting's default:
- host/game_settings.h: HOS_SETTING's otherwise, hos_input_held not held, hos_hold_toggles none;
- nn_vi.c: native HDR and dynamic resolution from the status alone; HDR's peak and paper white are the hdr mod's
  settings from the snapshot (held to 400-4000 and 80-400, the ends the renderer held them to);
- hos_zstd.c, nvn_native.c: the status's native_zstd and render_thread, or not known;
- the stray rx_option declarations in display, pad_sdl, mouse_native, nn_audio, input_movie, prompts and nn_hid.
On the Rust side host_sys::options::renderer goes: game-core's Game speed and Camera speed read the snapshot through
a new settings_link::now() (game_settings()); post.rs and the shadows mod's memory tier, the cheats' and settings_link's
menu open, and renderer_settings::upscaler read the status. The fake game keeps its renderer options for its tests.

The game-free checks that read the old callback or its fallbacks follow: test_audio_volume, test_rumble_menu,
test_input_background, test_stick_dead_zone and test_vibration_menu check no t.option is left (vibration's status now
from menu_renderer_status); test_threaded_rendering, test_render_sites, test_input_movie, test_menu_text_field,
test_walk_key and test_parity_gates read the new lines; the native zstd, present sites and pacing fixtures stand in
rx_status for the renderer. The docs (architecture.md, input.md, game/README.md) say the snapshot and the status.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The lines no setting declares (microphone_device, audio_output_device_id/_name, fullscreen_monitor_id/_name,
memory_budget, gpu_device_id, auto_for, auto_tuned, auto_steps) cross typed in LsRendererStatus (LS_CAPS_LAYOUT 6:
lines_known and their fields, LS_STATUS_TEXT_BYTES texts). save() makes them under their own lock before it hands the
rows' lines over, and no longer hands them as text once the game owns the file; the game, at the hand-over's
options_version, puts settings_now::renderer_lines(status) into its document: the same lines, order and format save()
wrote (auto_for and auto_tuned as 16 hex digits, auto_steps as steps,went_down), a none left unwritten as before.

A game-free test: the lines are save()'s byte for byte, and a file saved before comes back unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
a_file_of_every_frozen_key_is_read_and_written_back_byte_identical asked for over 100 of FROZEN's keys among the area
mods' settings; 92 are, since the optional system mods (shadows, grass, widescreen, text, the controller speaker...)
declare their own. The test was wrong, not the code: it now asks for over 80, and that every FROZEN key is still some
built-in mod's declaration (discord_status, RETIRED, aside).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The Controls page's anchor was renamed from the renderer's "@Controls" to controls_page in sprint-walk and the
controls area mod, but camera-centering's mod.json kept the old name, and menu_places.tsv, the places the rows keep,
still named it for the sprint-walk rows too. The code was wrong for camera-centering (its row lost its anchor), and the
test's table for the others: both say controls_page now.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
the_mirrors_are_the_headers_structs failed on rtqvqoxk: it asked for 60 bytes, and the struct is 56 (two u32s, eleven
u8s padded to 20, then seven i32s); the test was wrong, from before this work. At the tip the status is 1648 bytes, as
the test says, but auto_for sat after four bytes of padding (reserved3 ended at 92): reserved3 is 14 bytes now in both
the header and the mirror, so no padding is left for either side to guess.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
its_rows_keys_and_sites asked every setting to be kept in the options file; 5a7eacb2 added the shadow maps' bias and the
tree-shadow smoothing as the run's settings (store run), on purpose. The test was wrong: the two player rows are options
lines, the four knobs the run's.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
the_manifest_names_every_site_and_row asked for hooks.unsafe alone; d462f194 gave the mod gfx.seen for the ring
wheel's drawing, which the ultrawide menu sides follow (system_mod.rs). The test was wrong.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
an_enter_plays_as_a_root_first_shows_and_an_exit_as_it_goes found two exit groups for one root: leave() runs for the
unmount and again for the remove, and the root, still painted until the next tick, made a second ghost. The code was
wrong: ghost() makes none for a root whose exit plays already.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
system/menu faulted in ChoiceRow ("cannot read property '0' of undefined"), and with it every keys3 check that opens
the menu and the menu mod's own tests: view.ts placed each declaration on its page with a spread, { ...d, page,
section }, but host.ts's declarations look their texts (label, help, choices, verb, confirm) up through getters on
their prototype (00fda763), which a spread drops; the copy's choices were undefined. The code was wrong: placed()
copies the declaration with its prototype.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The confirm dialog's title and yes (Reset bindings? / Reset, for the Controls grid's Reset to defaults and each
binding's Reset) and a binding's question's (Binding already in use / Rebind) are the menu mod's own words now
(view.ts DIALOG_WORDS, SWAP_WORDS), translated by its strings: settings-host gives no confirmTitle, confirmYes,
swapTitle or swapYes, and host-sys renderer_settings loses its dialog values. Any other row's dialog is its label and
its verb, as the renderer's empty words made it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Quit and Restart now press through settings_link::action(Press). Before, they went through renderer_settings::press.
The fallback's Output resolution row still reads the renderer's row: its choicesFrom texts are not the game's yet.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The menu mod answers Restart Needed and Keep changes? with settingsHost.answer(yes), which is
settings_link::action(Answer). Before, it went through set("@ask", 0|1) on the renderer's question row. The fake game's
menu.asked lists the answers as "answer 0|1". @ask's state text still gives the restart's list of settings.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
settings-host's binding and bindQuestion now read the controls' inputs from the host through a new host-sys module,
bindings: hos_binding, hos_rebind_control's probe, hos_binding_is_default and hos_prompts_face, declared there with a
fake for the stand-in host. The input names are the old Controls page's, ported from vk_menu.cpp (pad_name by the
Button prompts' controller, key_name, "Key %d" otherwise). The "%s is used by %s." question is a typed text of the
controls' names. A control's Toggle comes from its bind_* setting.

A bind still goes through the renderer's row: it writes the pad_/key_ lines and the layout preset until the game's
options file does. The fake game's menu.setBinding gives a test the host's inputs.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The renderer's label keys for the five links (@Controls, @Motion, @Simulated turf, @Controller speaker, @FPS counter
details) become the menu layout's link keys. The three rows settings_host still maps by RENDERER_KEYS keep theirs.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
A path from Rust to host/nvn_native.c nvn_output_preview_request, with a fake that records the requests. Nothing calls
it yet: the renderer's menu still asks for the preview and counts down. The game drives it once that flow leaves
gpu/vk/vk_menu.cpp.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Services gets a new host, SettingsAtStart (longshot-game's settings_now::AtStart). It gives a native setting's value at
the start, which keys changed since the start (an output size by its width and height), and whether the mods changed.

- settingsHost.status() gains restart: while the question is Restart Needed, the keys of the placed native settings that
  take a restart and changed, in the menu's order, then "mods".
- The menu mod names them from its declarations' labels ("the mods" for theirs) and joins them the old way (listOf:
  "%s, %s" then "%s and %s"). It no longer reads the renderer's @ask row.
- The Controls grid's gamepad names use Button prompts' value at the start, as the renderer did. The setting applies at
  the next start.
- The fake game's menu.status({ restart }) gives the list.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Changing the Frame rate cap (Uncapped is -1) faulted system/menu: settings-host's set() refused any value with the
binding slot's bits (ASK, SWAP), and -1 has every bit. Only a binding's set is bind()'s: set_takes() asks for the slot
bits on a binding row alone (the settings service's row, else the renderer's), so another row's negative value is
set. A game-free test: -1 is a choice's value, a binding's slot bits are refused.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The fallback page listed the renderer's text of each size as it is, "5120x1440" then the 0x1F separator and the
key's JSON. shown() keeps the English before it. A game-free test with the renderer's made text.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
perf(menu): each page's declarations gathered once when the menu is laid out (#2434 f)
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 20s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 34s
CI / Workflow lint (actionlint) (pull_request) Successful in 36s
Third-party parts / As their notes say (pull_request) Successful in 36s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 41s
PR description / Title and description (pull_request_target) Successful in 45s
CI / What the change needs (pull_request) Successful in 1m38s
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Failing after 3m11s
CI / Website build and checks (pull_request) Failing after 1m48s
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Failing after 6m6s
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Failing after 7m17s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Failing after 3m59s
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Successful in 3m55s
CI / longshot-builder end to end (synthetic game) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Has been cancelled
833dde537c
The first open's flush ran 5.3 ms of CPU, over the 5 ms a callback may; the API's calls were 0.1 ms of it (i18n.t 155
times, already kept per text), the menu's own JavaScript the rest. laidOut scanned every declaration for every tab and
page (each panel filtered the whole list for its strays); the declarations are now grouped by page once and each panel
reads its own.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
fix(settings): the game's restart question names the settings the renderer's did (#2434 f)
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 22s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 45s
CI / Workflow lint (actionlint) (pull_request) Successful in 45s
Third-party parts / As their notes say (pull_request) Successful in 54s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 1m1s
PR description / Title and description (pull_request_target) Successful in 1m22s
CI / What the change needs (pull_request) Successful in 1m38s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Has been cancelled
CI / longshot-builder end to end (synthetic game) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
a735963ee8
Checked against the renderer's restart list (vk_menu.cpp restart_init: every row that takes a restart, the module's own
restart_value compares, the Game language from language.txt, the mods). Two differed:
- Speaker layout: the renderer's speaker_restart_value counts Mono (3) as Stereo (1), which change live; the game's
  compared the raw values and asked for a restart between them. restart_value() keeps that rule.
- Skip title screen, a mod's setting with no field in the snapshot: the renderer's question asked for it, the game's
  left out every setting with no abi. Every placed setting that takes a restart is listed now; one without a field is
  compared by its options-file line against the run's start (LINES_AT_START).
The rest are the same: the renderer's rows that take a restart are the area mods' restart settings, Output resolution
compares its size (Custom output size within it), Game language is in the snapshot, the mods are "mods".
A game-free test of both rules.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
A development switch: with HOS_SYSTEM_MODS_DIR=<dir> (a checkout's game/mods) the script system mods are read from
<dir>/<name>/ instead of the installed system_mods/ copies, unhashed (the build's table still names them), and their
folders are registered with the existing hot-reload watch (Watch::script), so they reload as a profile's folder mods
do: Shift+F8, the inspector's Reload, mod_reload and file changes. Native mods are unaffected. Environment only: the
_DIR suffix keeps longshot_env.txt from setting it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The switch's row in gpu/vk/switches.def, a section on working on a system mod with it in docs/modding/system-mods.md,
and a row in docs/dev/developing.md's Debug table.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
A reload now compiles each TypeScript module of the mod's folder first (ScriptHost::check, the game's own compiler
through script::ts::check_folder; not test/, node_modules or dot names). One that does not compile stops the reload
before dev.reloading: the old instance keeps running, the error is logged and put on the row, where the Mods tab's
status ("Running. Its new code does not compile, ...") and the inspector's show it. The next reload that compiles
replaces the instance as before and clears it. For every folder mod, and the system mods of HOS_SYSTEM_MODS_DIR.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
feat(api): HOS_SYSTEM_MODS_DIR's sources are watched in a game with no profile too (#2434)
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 10s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 20s
CI / Workflow lint (actionlint) (pull_request) Successful in 27s
Third-party parts / As their notes say (pull_request) Successful in 30s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 35s
PR description / Title and description (pull_request_target) Successful in 39s
CI / What the change needs (pull_request) Successful in 1m16s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Has been cancelled
CI / longshot-builder end to end (synthetic game) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
dc5cd23e71
The watch's notices covered the profile's mods/ alone, so a game started without a profile (a developer's game
folder) never started the watch thread and a system mod's saved edit waited for Shift+F8. With no profile, the watch's
root is now HOS_SYSTEM_MODS_DIR's folder when the script system mods are read from it (Loader::watch_root).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The fallback's Output resolution choices come from the output_res setting: its own choice (the game's size), then this
PC's output sizes from the renderer's capabilities, as WxH, or WxH (native) for the monitor's own. A change sets the
setting through the settings service. No renderer text, so no made-text separator, can reach the page. The fallback no
longer reads host_sys::renderer_settings.

The monitor's own size shows as %ux%u (native) in the menu's language: the engine strings (game/strings) take the key,
with the menu mod's translations. The sizes are not widened for the Aspect ratio, as the renderer's picture_for widened
them, because the capabilities do not carry that.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
feat(menu): the Play recording page and Record input are the host's recordings, not the renderer's rows (#2434 f)
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 11s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 26s
CI / Workflow lint (actionlint) (pull_request) Successful in 28s
Third-party parts / As their notes say (pull_request) Successful in 30s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 34s
PR description / Title and description (pull_request_target) Successful in 39s
CI / What the change needs (pull_request) Successful in 1m17s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Has been cancelled
CI / longshot-builder end to end (synthetic game) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
73bc233ed1
host-sys gets a new module, movies, which reaches host/input_movie.c (hos_input_movie_status, hos_input_recording_at,
hos_input_record_start/stop, hos_input_play_start/stop), with a fake. The new api services/recordings.rs gives
settings-host the page's rows:
- Stop playback, the last recording and recording_1 to recording_16: their declarations, states and presses.
- Record input's value and line.
- The texts the old page used (Recording %s, %s / %s, Diverged..., the files by date and map), as keys and values.
- Why a playback was refused, on the row pressed.
- Drift correction's choice as the playback's sync.

The renderer's rows of those keys are no longer read. The fake game's menu.setRecordings gives a test the host's
recordings, and menu.asked lists what was asked of them.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
- MkwVkRenderer.output_preview(op, w, h), last (version 76): LS_PREVIEW_REQUEST, _SECONDS, _KEEP and _REVERT, the
  renderer's own output_preview_request/seconds/answer (its checks, the trial and its clock stay its own). The host
  wraps it as rx_output_preview; host-sys gives settings_link::preview(Preview::...), with a stand-in for the fake game.
- LS_ACTION_HOLD_CLOSE: while the game holds the menu's close, the player's close leaves it open and sets the status's
  close_asked (LS_CAPS_LAYOUT 7) for the game's question. LS_ACTION_CLOSE closes the menu as the player would (the
  question answered, or a recording's playback started: l6e2's Recordings::press). settings_link::Action::HoldClose
  and ::Close.
Nothing drives them yet: the renderer's own preview and restart question still run until the next commits.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
api::services::menu_flow keeps the menu's two questions as plain data (each branch a game-free test):
- The preview: an Output resolution change (its row, or the Custom output size field) to 1024x576 from the 1280x720
  the game runs at, handheld off at the start and the size not the environment's, is asked of the renderer
  (settings_link::preview Request) instead of set. Each frame settings-host polls its seconds: shown, status()'s
  question is "keep" and previewSeconds its countdown; Keep asks the renderer to keep it and then sets the row or
  the field, the size running from then on (no restart asked for it); No, its time running out, or the menu closing
  while it waits put it back; refused before it showed, the change is set as any other, waiting for a restart (from
  the field, the player's own size: the Custom output size fallback).
- The restart question: while closing the menu would ask (restart_pending, not what the player said Later to), the
  renderer holds the close (Action::HoldClose); the player's close then sets close_asked, and status()'s question is
  "restart" with its list. Restart now presses the renderer's Restart; Later keeps the list as declined (asked again
  once it changes), lets the close go and closes the menu.
SettingsAtStart gives the output's sizes at the start and now, and whether the preview is held this run
(longshot-game's settings_now: handheld at the start, HOS_OUTPUT_RES).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The renderer's own flow goes: request_native_preview, save_preview_size, answer_native_preview,
unavailable_native_preview, the countdown and its page 5, restart_ask, the Later lambda, the restart question's @ask
declaration and its answer (LS_ACTION_ANSWER now answers that none waits), and the status's question and
preview_seconds (settings-host's status gives the game's). A change of the Output resolution, or Enter on Custom output
size, just sets it: settings-host asked the preview first when it takes one.
- The rows that change the output's shape or the preview's path wait while a preview is under way as before, now by
  the renderer's own trial (preview_busy: output_preview_seconds is not 0), which the game's request started.
- Closing the menu while the game holds its close sets close_asked and leaves it open (Insert, F1, or Back on the
  hosted page); the game's Later closes it (LS_ACTION_CLOSE), Restart now presses Restart (menu_restart_game).
- The checks follow: test_menu_text_field's preview cases are menu_flow's tests now (its lock case reads
  preview_busy), test_menu_restart checks the held close, test_menu_keys stubs it, and test_preview_save.py goes
  with the code it read (save_preview_size): the game keeps the size through its settings.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Recordings::press, on a play the host took (1): settings_link::Action::Close (LS_ACTION_CLOSE), so the game is in view
while it plays. Fills l6e2's TODO(l6f2-close).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
feat(settings): an output size's picture and its (native) and (reduced) in the capabilities (#2434 f)
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 14s
CI / Workflow lint (actionlint) (pull_request) Successful in 36s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 35s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 44s
Third-party parts / As their notes say (pull_request) Successful in 43s
PR description / Title and description (pull_request_target) Successful in 53s
CI / What the change needs (pull_request) Successful in 1m37s
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Failing after 6m38s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Has been cancelled
CI / longshot-builder end to end (synthetic game) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
cd925ff8dd
LsSize (LS_CAPS_LAYOUT 8, 12 bytes) gains picture_w and picture_h, the picture the size makes once the Aspect ratio
widens it to the monitor's shape, and native and reduced, as the renderer's Output resolution texts said them
(tx_output_res: picture_for); monitors, never filled, is native now. menu_fallback's size_text shows the picture's size
and "(reduced)", "(native)" as before. A game-free test of each.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
fix(menu): Restart now saves the options and the pipeline cache before it restarts (#2434 f)
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 24s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 49s
CI / Workflow lint (actionlint) (pull_request) Successful in 51s
Third-party parts / As their notes say (pull_request) Successful in 1m1s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 1m7s
PR description / Title and description (pull_request_target) Successful in 1m19s
CI / What the change needs (pull_request) Successful in 1m43s
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Failing after 6m23s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Has been cancelled
CI / longshot-builder end to end (synthetic game) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
563ae6bfc7
The renderer's old Restart now saved its options and the whole pipeline cache, then closed the window; the game's
pressed the Restart row alone. restart_now keeps the old order: the game's options file written now
(SettingsAtStart::save_now, settings_now::flush), the pipeline cache saved whole (LS_ACTION_SAVE_CACHE,
Action::SaveCache: pipeline_cache_save(true)), then Restart pressed. A game-free test that the saves come first.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Checked against the decision that every disabled mod's rows hide: a native built-in mod
(Settings::set_shown), a script built-in mod and a player's mod (their settings attach only
at a start and detach at a stop or a failed start) already held. These tests pin it: each
of a native built-in mod, a script built-in mod, a player's mod switched off in profile.json
and a player's mod whose start fails shows no row from the first frame, gets its row on its
start, and keeps the value the player set while it is off; a reload whose new code does
not compile keeps the running instance's rows.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
docs(modding): the powers only system mods have for now, listed and marked
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 22s
CI / Workflow lint (actionlint) (pull_request) Successful in 45s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 47s
Third-party parts / As their notes say (pull_request) Successful in 58s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 1m8s
PR description / Title and description (pull_request_target) Successful in 1m21s
CI / Website build and checks (pull_request) Failing after 40s
CI / What the change needs (pull_request) Successful in 2m43s
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Failing after 2m51s
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Failing after 5m13s
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Failing after 6m43s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Failing after 4m21s
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Failing after 8m14s
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Successful in 2m1s
CI / longshot-builder end to end (synthetic game) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
d8ab6ee1cd
#2434 keeps them system-only: opening each to a player's mod needs a permission and a trust-prompt
design. system-mods.md lists each with where the code gates it; the input filter and worker-site
pages point at it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
menu/settings_apply.h's MENU_PRESS(name, "key", confirm) registers a module's button: test_microphone, bug_report,
test_vibration, record_input, stop_playback, last_recording, no_recordings, weak_laptop, tap_tag, remove_tag,
scan_tag, save_pipeline_list, reshade_compare, reshade_rescan, restart and quit (these two save the options and the
pipeline cache first, as the second press did), and the core's bindings_reset. LS_ACTION_PRESS (menu_decl_press) runs
the table's before any row's, so the buttons outlive the row table (4b-4).
The presses' results the menu shows: Save my pipeline list's in the status, pipeline_list (0 none, 1 saving, 2 saved,
3 not saved; LS_CAPS_LAYOUT 9); the vibration status and the microphone test's state and levels were already its.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
feat(settings): the renderer's lists, reasons and limits in its capabilities, for the game to format (#2434 f, 4b-2)
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 22s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 37s
CI / Workflow lint (actionlint) (pull_request) Successful in 38s
Third-party parts / As their notes say (pull_request) Successful in 41s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 49s
PR description / Title and description (pull_request_target) Successful in 53s
CI / What the change needs (pull_request) Successful in 1m38s
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Failing after 1m16s
CI / Website build and checks (pull_request) Failing after 22s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Has been cancelled
CI / longshot-builder end to end (synthetic game) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
ebe8e9ed05
LsCapabilities (LS_CAPS_LAYOUT 10) gains what only the renderer's rows knew:
- reshade_files (LS_CAPS_LIST, the User preset file's files), outputs and mics (the Output device's and the
  Microphone's names in their rows' orders); monitors, gpus and the sizes were there;
- upscaler_why[3]: why DLSS, FSR and XeSS are not offered, each a text key ("" offered), as the Upscaler's line said;
- dlss_fg_most and framegen_by_fixed: Frame generation's multiplier end and Frame generation by with nothing to choose;
- locked (LsLocked: key, why): the settings locked now and why, for the DLSS, upscaler, Render resolution, frame
  generation, Intel, present queue and ASTC rows. They read the rows' own locked() for now; 4b-4 moves each into a
  module function.
generation moves on when any of them changes. host-sys mirrors them with readers (reshade_files(), outputs(), mics(),
upscaler_why(), locked()), the field list and the size checked against the header.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The rows' locked() lambdas move into named module functions (lock_dlss, lock_dlss_model, lock_fsr4_model,
lock_dlss_pre_bloom, lock_resolution, lock_frame_generation_multiplier, lock_intel_shader_compiles,
lock_present_queue, lock_astc_as_rgba8), which the rows still point at. MENU_LOCK registers each by its key
(menu/settings_apply.h, menu::locks()), and menu_capabilities' locked list reads the registry instead of the rows.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
feat(settings): Dynamic resolution's mirror of the Render resolution is the game's (#2434 f)
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 12s
CI / Workflow lint (actionlint) (pull_request) Successful in 26s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 27s
Third-party parts / As their notes say (pull_request) Successful in 28s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 34s
PR description / Title and description (pull_request_target) Successful in 36s
CI / What the change needs (pull_request) Successful in 1m5s
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Failing after 2m31s
CI / Website build and checks (pull_request) Failing after 1m37s
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Failing after 3m2s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Has been cancelled
CI / longshot-builder end to end (synthetic game) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
f11f0f9c71
engine_rules gains the renderer's toggle_dynamic_resolution and dynamic_resolution_on (upscaler_rows.h), with Native
and Quality as it had them, and DocOptions gains dynamic_resolution() (the row's value: Auto below full scale) and
set_dynamic_resolution(on): the Render resolution's and the Upscaler's lines set, the last fixed stop kept across the
toggles, and kept from each Render resolution change, as the row's on_change and the resolution row's did. The rows
still run theirs until 4b-4; settings-host's view of dynamic_resolution (a run setting with no line) calls these once
it stops reaching the renderer's row (4b-3). Game-free tests of both.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
take_setting takes the module's MENU_LOCK function; menu_value_held asks
held_now, which no longer goes through row_fixed or module_locked.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
refactor(control): the bridge sets the game's settings through the settings service (#2434 f)
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 8s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 20s
CI / Workflow lint (actionlint) (pull_request) Successful in 21s
Third-party parts / As their notes say (pull_request) Successful in 21s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 26s
PR description / Title and description (pull_request_target) Successful in 29s
CI / What the change needs (pull_request) Successful in 59s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Has been cancelled
CI / longshot-builder end to end (synthetic game) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
0e4842fd20
option_get/option_set look a name up in the game side's settings first (every
mod's, the area mods' too: game_control_setting_count/_row), and use the
renderer's menu_setting_set only for a row the game has none of.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The game always owns the snapshot and the options file, so the renderer's
!owned path goes: its own file read and write in menu_init and save(), the
env_override layer (env_holds, env_release, saved_value), player_custom_output
and menu_game_options_*. The game's layer (engine_rules) already covers each
key the renderer read, HOS_OUTPUT_RES's player size included: its values are
never a line.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
refactor(vk): the first snapshot is a start pass over the appliers (#2434 f)
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 10s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 21s
CI / Workflow lint (actionlint) (pull_request) Successful in 22s
Third-party parts / As their notes say (pull_request) Successful in 24s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 28s
PR description / Title and description (pull_request_target) Successful in 33s
CI / What the change needs (pull_request) Successful in 1m3s
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Failing after 5m0s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Has been cancelled
CI / longshot-builder end to end (synthetic game) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
005cab8d73
apply_first_snapshot runs every MENU_SETTINGS applier with menu::starting()
set: take_setting takes the value and runs no effect, and the device appliers
leave the devices to menu_init. Only the keys no applier takes are set on
their rows.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
A pack built in the base's shared pack-work takes over another checkout's lift and cargo target: a checker
that packs again and again rebuilds after every other checkout's pack, and cargo can take another tree's
game Rust for fresh. --own-work builds in <base>/pack-work.d/<name>/, seeded once from pack-work without
its rust-target/ (copy-on-write clones), so its next pack lifts and compiles only what changed. The base
never moves; dev.py pack now says when the checkout is far past its base.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
dev.py check --checks DIR runs check groups kept outside the repository (a checks.json naming each group's
bridge steps, its launch and its judge) on this checkout's newest build. What changed since the last good
build (jj diff, state in the development folder's checks/) decides the build: nothing; TypeScript system mods
only (no build, the groups run with HOS_SYSTEM_MODS_DIR on a copy of game/mods; a mod.json whose abi, api,
hooks, sites, permissions, id, runtime or system changed, compared parsed, still builds); a pack on the shared
base (dev.py pack --own-work, dev.py rt; the base never moves); or a whole build when the lift, the hook
sites or the builder changed. Groups that name one launch share one game launch and one shared-mode queue job,
the launches side by side as the queue's slots allow; a crash is recorded as that group's failure and the
launch starts again with the groups after it. --only-failed runs what did not pass last time; the caches a
launch grew go back into the check's own build.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
What a change since the last build asks for (nothing, TypeScript only, a pack, a whole build), mod.json judged
by its parsed keys (abi, api, hooks, sites, permissions build; a label does not), --only-failed's groups, the
groups merged into launches, the checks file's refusals, and what a driver's progress lines make of each group
(done, crashed, left for the launch's next start).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
docs(dev): Run your own in-game checks, dev.py check
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 8s
CI / Workflow lint (actionlint) (pull_request) Successful in 18s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 20s
Third-party parts / As their notes say (pull_request) Successful in 24s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 26s
PR description / Title and description (pull_request_target) Successful in 32s
CI / What the change needs (pull_request) Successful in 1m3s
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Failing after 1m58s
CI / Website build and checks (pull_request) Failing after 25s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Has been cancelled
CI / longshot-builder end to end (synthetic game) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
814bb0e81d
How dev.py check picks the build from what changed, how groups share launches and the queue, where its state
lives, and the checks file's format: steps or run, judge, driver progress lines, setup and teardown, gate.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
At the renderer's save (its options_version line) the game writes pad_, key_
and sprint_auto_bind from the host's bindings (host-sys bindings::control_lines)
and reads the Layout preset back from the face buttons
(bindings::detect_pad_layout, Custom when no preset is whole). The renderer's
save() no longer writes them, nor the Layout preset; toggle_ is each binding
setting's own line.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
refactor(settings): the renderer's shown() conditions are the declarations' needs and shownIf (#2434 f)
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 8s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 22s
CI / Workflow lint (actionlint) (pull_request) Successful in 23s
Third-party parts / As their notes say (pull_request) Successful in 25s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 27s
PR description / Title and description (pull_request_target) Successful in 32s
CI / Website build and checks (pull_request) Failing after 40s
CI / What the change needs (pull_request) Successful in 1m2s
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Failing after 2m4s
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Failing after 4m32s
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Failing after 5m42s
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Successful in 1m6s
CI / longshot-builder end to end (synthetic game) (pull_request) Successful in 4m48s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Has been cancelled
25eb069b32
DLSS model and DLAA before the bloom show with DLSS or DLAA chosen (shownIf
dlss, shownIn 1 and 2); Render resolution while Dynamic resolution is off;
FSR 4 model needs the new fsr4Lite capability (LS_CAP_FSR4_LITE: FSR 4 runs
and its Lite network is there). Frame generation multiplier, ReShade's user
rows, Reflex, Anti-Lag, Intel and the laptop row had theirs already.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Two declaration fields for Longshot's own mods. notPickable: values the
arrows pass and a set refuses (Layout preset's Custom, shown while the inputs
make it). choiceTop: a capability whose number the values stop at
(dlssFgMost: DLSS Frame Generation's top here). The settings host serves the
top as hi and the list as notPickable; the menu mod's valuesOf (view.ts, and
ChoiceRow in main.tsx) leaves a not-pickable value out unless it is the value.
mod.schema.json made again.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
frame_generation is a three-mode choice and frame_generation_multiplier a
setting of its own (2x to 8x, its top DLSS Frame Generation's here:
choiceTop dlssFgMost, shown while Fixed), each its own line and snapshot
field. options_version 9: an older file's 2x to 8x moves to Fixed at that
multiplier (options_store migrate, with a test). RX_VK_FRAMEGEN_MULT sets
both. The renderer's applier makes opts.framegen from the two, and save()
writes them so. Layout preset's Custom is notPickable. framegen_step,
framegen_mult_step and pad_layout_step are deleted.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
refactor(vk): save() hands the game only what the renderer changed itself (#2434 f)
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 8s
CI / Workflow lint (actionlint) (pull_request) Successful in 20s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 21s
Third-party parts / As their notes say (pull_request) Successful in 22s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 28s
CI / What the change needs (pull_request) Successful in 1m6s
PR description / Title and description (pull_request_target) Successful in 1m27s
CI / Website build and checks (pull_request) Failing after 28s
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Failing after 5m56s
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Failing after 6m49s
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Failing after 7m6s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Failing after 5m31s
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Successful in 1m6s
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Failing after 9m3s
CI / longshot-builder end to end (synthetic game) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
856325d513
Each line the game's file has as it is (game_options_value) is left out: what
goes is set through the game, the renderer's own changes (Auto (this PC)'s
steps, the first start's card preset, Set up for a weak laptop, a preset's
rows) and a value it holds. options_version still goes last, the game's cue
to take the renderer's own lines from the status and the controls' from the
host.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
fix(build): the game's Rust's C on Linux is compiled against the pinned sysroot
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 9s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 22s
CI / Workflow lint (actionlint) (pull_request) Successful in 23s
Third-party parts / As their notes say (pull_request) Successful in 25s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 28s
PR description / Title and description (pull_request_target) Successful in 34s
CI / Website build and checks (pull_request) Failing after 53s
CI / What the change needs (pull_request) Successful in 1m2s
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Failing after 5m52s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Has been cancelled
CI / longshot-builder end to end (synthetic game) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
e544bc2e9f
On Linux the cc crate in the game's Rust (QuickJS) took the PATH's cc and the PC's glibc headers, while the
game links against the pinned sysroot: a PC with a newer glibc made __isoc23_strtol references the sysroot's
glibc lacks, and the link failed (dev.py check's whole build on this PC). cc_env now gives cargo the
toolchain's clang with its target flags, --sysroot among them, for the Linux target when a sysroot is used,
as it already did for llvm-mingw; without a sysroot nothing changes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
fix(build): a change of the C compilers rebuilds the game's Rust's -sys crates
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 8s
CI / Workflow lint (actionlint) (pull_request) Successful in 18s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 20s
Third-party parts / As their notes say (pull_request) Successful in 24s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 28s
PR description / Title and description (pull_request_target) Successful in 32s
CI / Website build and checks (pull_request) Failing after 44s
CI / What the change needs (pull_request) Successful in 1m2s
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Failing after 6m9s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Failing after 6m6s
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Failing after 7m27s
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Failing after 7m38s
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Successful in 1m25s
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Failing after 10m7s
CI / longshot-builder end to end (synthetic game) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
397156552a
shaderc-sys is configured by CMake, which keeps its compiler in the build-script output's CMakeCache.txt
and refuses another ("You have changed variables that require your cache to be deleted"): a work folder
warm from before the pinned clang for Linux's cc (the last commit) failed in cargo build -p longshot-rs.
The builder now records the C compilers it gives cargo in rust-target/cc-env.txt; when they differ (or the
record is missing), every -sys crate's build output and fingerprint go, once, with a line in the log.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
gfx.programs' ts_types (HistoryBlend, PipelineOverride, CurvePatch, ConstantScale, TargetShape) were never written:
the d.ts writer emitted only the module's own namespace's ts_types, not its children's, so longshot/gfx's
programs member named types nothing declared and mod check --types failed for every TypeScript mod (TS2304).
The module now declares the ts_types of its namespace and of every one nested in it, and imports the root
types they name.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
mod check --types refused src/main.ts: Route.setting was a plain string, which settings.get and changed.on
(keyof ModSettings) do not take.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
the_mirrors_are_the_headers_structs cut each line at /* only, so a comment's second line in LsRendererStatus
(the options file's lines note) was read as fields ("/", "open"). The struct's body is read with every
comment taken out first.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
i18n reads the menu's language from the renderer's status (menu_lang) since the small readers left
renderer_settings, but the testing game's setLang still set the old renderer text (menu_language,
LANG_CODE), so every test in another language saw English (menu's French texts and mic line, mods-tab's
words). setLang now puts the code in the stand-in status, kept through game.menu.status() and cleared
with a new game.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The rename's replace made `game-core = read(...)`, a syntax error: the file did not run, and
byte_compile_tracked and test_run_all_declarations failed on it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
test_no_game_title: the example path named the game.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
It was placed after grass_distance, which is the grass mod's row and not in the renderer's own list, so the
built menu had a diagnostic (test_menu_sections, test_settings_decls). The menu mod's layout still puts
it after Grass distance.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
test_program_hooks: the renderer names no 16-hex-digit program key, and the basis looked like one.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The table is searched in order (switches.h find); HOS_GAME_BARRIER_WAIT sat after HOS_OCB_NORMAL
(test_switch_table).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
LsCapabilities (layout 11) gains n_aspects, aspect_monitors, aspects[16];
n_menu_langs, menu_langs[32]; n_game_langs, game_langs[32]; n_nfc_tags,
nfc_tags[16] (LS_CAPS_LANGS 32), filled by menu_caps_output, menu_caps_nfc
and menu_capabilities. host-sys reads them: aspects() as (shape, the
monitor's), menu_langs(), game_langs(), nfc_tags().

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Their fake:: module exists only under feature fake, so clippy --all-targets without it failed (E0433).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The fixture cut struct CrtState and init_crt from vk_framegen.cpp, which no longer has them (the CRT filter is
game/mods/crt's screen effect). The framegen and scale rollback checks stay.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
framegen_hdr now asks the mods' output effects (fx_output_any, fx_frame) and has passes in nits: the fixture stands them in with none running, so the crop and the one HDR pass are what it checks, as before.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
vk_fsr3_inputs.cpp keys its history on whether the scene is RGBA16F (last_rgba, rgba_scene), no longer on Psycho: the fixture's state and its three checks say the same of it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
record_to now draws the offscreen list (Offscreen, offscreen_next) before the window's pass: the fixture takes its state from vk_imgui.cpp and stands draw_offscreen in; none is asked for, so the calls checked are as before.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
main now loads the game module first and claims the builder's channel (game_module_first, bc_claim: stood in), and with no window waits for the game's thread in display_sdl.c hos_display_wait_windowless, 50 ms at a time: the fixture cuts that function too, its wait counted as before.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Program now holds a mod's curve hook (std::shared_ptr<const program_hooks::Curve>), so the struct cut from vk_shader.h named a type the fixtures did not have: test_program_cache_cleanup, test_linux_pressure, test_loaded_modules_drop and test_program_cache_one_variant declare it first.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
vk_shader.cpp's Code keeps the program's code words (program_hooks::Words) for the mods' hooks: the fixture includes the game-free header.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The draw with no table at all ran after check()'s events were left from the case before, so the fixture's own events.empty() aborted it. It clears them first, and checks the draw alone was seen.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
nn_hid.c reads the menu's hold (hos_input_held), the game's snapshot (game_settings) and the Toggle column (hos_hold_toggles) from host/game_settings.h now: area_settings.HOS_SETTING_C gives them as each fixture's rx_option answers (1 the menu, 54 the Toggle column, no snapshot), so test_input_background, test_pads_after_menu and test_walk_key compile the input code again.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
hos_sdl.c's pad close and the headphones reader now go through PAD_REMOTE and PAD_REMOTE_VOID (host/pad_broker.h): the fixture defines them as a build without the pad broker does, so the reader checked is the process's own.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The controller speaker's kinds of sound are the controller-speaker mod's routes now (1 to AUDIO_SOURCE_ROUTES), not the host's classes: the voice the checks route is route 1.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Drawn has a programs field now (the program hooks): test_gfx_effects and test_gfx_world matched the struct's whole literal and failed on it. Each looks for its own field (effects, world) set true.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The Windows Vulkan back end's build check is a step of the package job now, after its upload, not a vulkan job: the checks read the package job to its end, and find that step the only one a released commit skips.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
build-linux.yml names upload-artifact in a comment before its tools check, and its cache paths start with ${{ runner.temp }}: the check finds the upload step's uses: line, and reads each path whole rather than split at spaces.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
packs.builder makes the tree's generated shaders first now (scripts/shaders.py all), and the case's made-up tree has no scripts/: it exited there. The lock checks stand gen_shaders in with nothing to do.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
A checkout with the windows-x64 bundle installed has llvm-mingw's libdav1d.a in tools/cpm, and test_dav1d_av1 linked those COFF objects natively on Linux (undefined __imp__aligned_malloc). dav1d_prefix passes over a static library that is not this OS's (ELF on Linux, Mach-O on macOS) and takes the next: the system's here.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The Rust launcher keeps a fresh install's versions in its data folder, apart
from its own folder: %LOCALAPPDATA%\Longshot\data\versions on Windows,
~/.local/share/longshot/versions on Linux. An upgraded launcher keeps its old
folder, a chosen data folder moves them, and a portable copy uses Longshot/data
beside itself. The old table named the C# launcher's single folder. The game a
version builds sits at the top of builds/default, no longer in bin/.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The game exe's old `longshot mod` is gone: `mod run`, `mod dev` and `mod pack`
are the builder's, `Longshot.exe mod` in a version folder (`longshot-builder mod`
in a checkout). Today's builder puts the game at the top of its game folder
(`longshot`, `longshot.exe`), not in `bin/`, so the test mode's and AppArmor's
examples and the bridge's launch note say so. packages.md's first folder-mod
row said `mod dev` copies into the game folder's `mods/`, which nothing reads
(`dev` is `run`, which links the folder in): the row is gone, its twin stays.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
test_doc_commands.py reads every code span and fenced line of the docs and the
READMEs that starts with longshot-builder, Longshot.exe or Longshot.x86_64, and
fails on a command, a `mod` command or a `dev` command the code does not
dispatch, and on the game exe's old `longshot mod <command>`. Its lists come from
main.rs, play.rs, dev/mod.rs, modtool's lib.rs and live.rs, and it checks each
name is still a string those dispatchers match.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The player's guides named the C# launcher's single folder: %LOCALAPPDATA%\LongshotLauncher
for everything, LongshotLauncher-data for a portable copy. The Rust launcher keeps its
settings there, its data (versions, profiles, save backups) in %LOCALAPPDATA%\Longshot\data,
its cache in %LOCALAPPDATA%\Longshot\cache, and a portable copy's in a Longshot folder
beside it; the older portable folder is named as such.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Settings, Game, Files and folders, Longshot data: the launcher UI's own words
(ui/settings.slint), in place of "its folder settings".

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
fix(bridge): the game folder's own longshot first, bin/ only for an older builder's folder
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 28s
CI / Workflow lint (actionlint) (pull_request) Successful in 53s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 54s
Third-party parts / As their notes say (pull_request) Successful in 1m3s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 1m14s
PR description / Title and description (pull_request_target) Successful in 1m29s
CI / What the change needs (pull_request) Successful in 1m43s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Has been cancelled
CI / longshot-builder end to end (synthetic game) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
68af15cba8
game_exe preferred bin/longshot whenever bin/ existed, from when a builder folder's
top-level program was the launcher. Today's builder puts the game at the top of its
folder (build-driver's build.rs) and sweeps an old bin/ after a new build, so the
top-level game wins, and bin/ is the fallback for a folder not rebuilt yet, as
build-driver's game_program does. The two tests and control-bridge.md follow.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
feat(dev): dev.py check runs at most --jobs launches (2), each once its memory is free
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 25s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 44s
CI / Workflow lint (actionlint) (pull_request) Successful in 45s
Third-party parts / As their notes say (pull_request) Successful in 53s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 1m3s
PR description / Title and description (pull_request_target) Successful in 1m20s
CI / What the change needs (pull_request) Successful in 1m56s
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Failing after 1m58s
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Failing after 5m3s
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Failing after 3m13s
CI / Website build and checks (pull_request) Failing after 50s
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Failing after 6m57s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Has been cancelled
CI / longshot-builder end to end (synthetic game) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
8247b25a8a
Three check games beside the PC's builds left 4.7 GB free. dev.py check now starts at most --jobs (2) launches
at once, and queues each only once the gate passes and MemAvailable holds its expected size (the launch's
mem_gb in checks.json, 2 GB by default) and 2 GB more, saying so while it waits.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Declarations, row states, value texts, sets and text puts now come from the settings service's placed rows only (and
the Play recording page's, the host's recordings). What only this PC knows comes from the renderer's capabilities:
- a choicesFrom list's choices: output sizes as the picture they make, "(native)" and "(reduced)"; monitors, GPUs,
  audio outputs, microphones and ReShade presets by name;
- a row its capability hides (needs);
- the settings locked here and why;
- an upscaler choice's reason.
"Takes effect after a restart" joins a row's hint while its key is in the restart list. The renderer's buttons are
pressed through its typed action (MENU_PRESS), then a service button. A binding's Toggle is set through its bind_*
setting.

RENDERER_KEYS, the theirs merge, decl_json/state_json, the 0x1F text parsing and the off-thread read are deleted. The
generation is the service rows' hash mixed with the capabilities' generation. The upscaler comes from the renderer's
status.

Left: a binding's pad and key inputs still go to the renderer's grid (TODO(4b-3, item 1)), which writes the pad_/key_
lines and the layout preset until the game's options file does. The aspects, menuLanguages, gameLanguages and nfcTags
lists are not in the capabilities yet.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
decls() answers { generation, decls } at once, read from the settings service each call: nothing waits on the
renderer any more. The off-thread read, its kept answer and 'ready' are gone, from the schema too, and changed no longer
fires for a read becoming ready. The menu mod drops its not-ready path. The page still says Loading for its first
frame, until its rows are read.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
- Custom output size is now an options row with a new codec, outputText. Its value is output_res's line as the size
  typed ("" for the game's own). A size is checked as the field's apply checked it (the width, an x, then the height;
  each rounded down to a multiple of 8; at least 640x360, at most 5120x2880's pixels, 5:4 to 48:9) and written as
  output_res=WxH, through the options document, which keeps the environment's hold. settingsHost.putText rejects a bad
  size with the field's own words.
- Dynamic resolution's value and set go through the game's options document. A new SettingsAtStart host has
  dynamic_resolution and set_dynamic_resolution (longshot-game: DocOptions). A change also makes the Quality preset
  Custom. Its run value follows the document each step, so the Render resolution's shownIf stays right.
- Test vibration's cell and line come from the renderer's vibration status. Save my pipeline list's cell
  (Save / Saved / Not saved) comes from its pipeline_list status.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
- game.menu.declare(decls) now makes each test declaration a setting of a native mod's own (system/menu-test) in the
  settings service: a toggle, a choice (its choices, or a value from 0 to hi), a slider, a button, a text or a binding,
  each placed on its page. The menu's own kinds (tab, page, heading, link, line, question) are its layout's and are
  skipped.
- setRow(key, { value, locked }) sets the setting and its mod's lock.
- asked lists the mod's changes of them (set k v), the renderer's buttons pressed (press k), the answers and the
  recordings.
- setLang and upscaler set the renderer's status (menu_lang, upscaler), and status() keeps them.
- setText and hold are gone. reads counts settings-host's reads, kept per thread.
- menu.test.ts follows: the texts come from declarations, the renderer-made texts' and Loading-while-held tests are
  gone, and menu_rows.json's rows go by the menu's keys.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
refactor(settings): the Controls grid binds through the host, the caps' last lists are choices, and host-sys's renderer_settings is gone (#2434 f, 4b-3)
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 26s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 1m2s
CI / Workflow lint (actionlint) (pull_request) Successful in 1m9s
Third-party parts / As their notes say (pull_request) Successful in 1m18s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 1m22s
PR description / Title and description (pull_request_target) Successful in 1m35s
CI / What the change needs (pull_request) Successful in 2m5s
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Failing after 2m11s
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Failing after 5m1s
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Failing after 3m17s
CI / Website build and checks (pull_request) Failing after 39s
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Failing after 6m35s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Failing after 4m10s
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Successful in 37s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Failing after 9m7s
CI / longshot-builder end to end (synthetic game) (pull_request) Successful in 12m57s
7c7a752ce3
- settingsHost.bind's pad and key slots now go through host_sys::bindings::bind: hos_rebind_control with ONE_KEY and
  Rebind's SWAP as the Controls page's binding_take used them, and hos_bind to clear a slot. The game's options document
  then writes the controls' pad_/key_ lines and the Layout preset (SettingsAtStart::controls_changed,
  DocOptions::put_controls, which the renderer's save path shares). A binding's slot values move to
  host_sys::bindings::slot.
- The caps' new lists are choicesFrom choices: aspects ("21:9", "%s (monitor's)", "Monitor's shape" when the shape
  is not known), menuLanguages, gameLanguages and nfcTags, each name shown as it is.
- Nothing in api, modtool or longshot-game reads the renderer's rows any more. host-sys's renderer_settings module, its
  fake (fake::settings) and the rx_setting_* externs with MkwVkSettingDecl/State are deleted.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
A new crate, mod-manifest: a folder's manifest is mod.toml (preferred) or
mod.json (still taken), exactly one; both is an error naming both paths. A
mod.toml reads into the same JSON value as its mod.json twin, so the game's
reader, its limits and the JSON Schema stay one. A TOML syntax error names
mod.toml and its line. The readers move onto it in the next commits.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The loader finds a folder's, a package's and a system mod's manifest with
mod-manifest and reads it with manifest::parse_as: a mod.toml is judged as
the JSON of the same value, both files is the row's error naming both. The
native mods' embedded text may be either (native::parse tells them apart by
the first character; declares() reads TOML's id = ".."); native_mod! takes
manifest: "mod.toml". schema-gen and longshot-game's registry embed
whichever file a folder has.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
code_mods and mod_layout find a manifest mod by either file, read through
mod-manifest; a folder with both is left out, as the game refuses it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
ModDir, profiles, sources and repo bundles (mod publish), import, vendor,
game-test, the service and the testing game read the folder's one manifest.
mod init writes docs/modding/template/mod.toml with its #:schema line; mod
types adds that line to a mod.toml that names no schema.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
devtools/mod_manifest.py is the Python reader (tomllib); dev.py check
compares a manifest across formats, so a mod.json made a mod.toml with
the same build keys stays TypeScript-only.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The B1 batch's findings: rustfmt of the new reader's call sites; the import
tests parse the mod.toml mod import now writes (a zip of a mod.json mod keeps
its mod.json); moddir::manifest_name is the tests' alone.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
after_driver left such a group for a new start of the launch when another group had crashed, but the driver
went on past the crash and ended on its own: a new start would play nothing for it. It is failed as
"the driver ended before it" either way; the test says so for the crash case too.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
chore(website): mod.schema.json regenerated from the game's reader (#2434)
Some checks failed
Website / Website preview, upload (pull_request_target) Has been skipped
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 9s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 21s
CI / Workflow lint (actionlint) (pull_request) Successful in 22s
Third-party parts / As their notes say (pull_request) Successful in 22s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 28s
PR description / Title and description (pull_request_target) Successful in 32s
CI / What the change needs (pull_request) Successful in 1m5s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Has been cancelled
CI / longshot-builder end to end (synthetic game) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
91aa0965e5
The website's copy had fallen behind the reader on the line
(api's the_website_serves_this_schema): made again with
cargo run -q -p api --example mod_schema.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
test(api): the failed-reload test switches its mod on before it reads its rows (#2434)
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 9s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 20s
CI / Workflow lint (actionlint) (pull_request) Successful in 21s
Third-party parts / As their notes say (pull_request) Successful in 22s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 27s
PR description / Title and description (pull_request_target) Successful in 31s
CI / What the change needs (pull_request) Successful in 1m2s
CI / Website build and checks (pull_request) Failing after 39s
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Failing after 2m25s
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Failing after 5m37s
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Failing after 7m21s
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Successful in 1m19s
CI / longshot-builder end to end (synthetic game) (pull_request) Successful in 3m23s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Has been cancelled
b0a7cfee7e
a_reload_that_does_not_compile_keeps_the_old_instances_rows put the mod on
the disk with no profile.json, so the mod never ran and its row never showed:
the test failed at its first assert, before the reload it is about, on the
line before this change too. It now lists the mod switched on, as the other
running-mod tests do, and says the mod runs before it checks the row.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The renderer's MkwVkSetting, MkwVkSettingDecl and MkwVkSettingState go, with
setting, setting_set and renderer_setting_* (vk_api.h, renderer_guard.h,
vk_replay.cpp), the host's rx_setting_* and rx_control_setting(_set), and the
renderer's menu_setting(_set), walk_to, the declarations' list and their
presses and texts. The control bridge lists and sets the game's settings
alone. A press by key (LS_ACTION_PRESS) is queued for the next menu_tick and
pressed through the MENU_PRESS registry.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
MENU_SETTINGS(toggles) sets the Toggle column (opts.hold_toggle, Sprint's
through toggle_set) from the bind_* settings; MENU_SETTINGS(output_size) takes
the start's Output resolution in the start pass, as apply_first_snapshot did.
No snapshot field is left to the rows.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
save() no longer makes the rows' lines: it fills own_lines and gives the
options_version cue. What the renderer changes itself goes through hand_line
(game_options_load): Auto (this PC)'s Render resolution steps, Set up for a
weak laptop, a first start's Output resolution. A Quality preset's rows are
the game's (engine_rules preset_lines): the renderer asks for Auto (this PC)
by LsRendererStatus.auto_asked (layout 12), which the game takes at the cue;
RX_VK_LOW_SPEC's first start sets the preset Minimum through the game. The
core applier keeps the preset's renderer part (mip trimming, Auto's tuning:
auto_chosen). menu_init reads only the renderer's own lines: the settings are
the start pass's, their old versions moved by options_store.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
refactor(vk): the renderer keeps no rows: the modules are appliers, presses and locks (#2434 f, 4b-4)
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 10s
CI / Workflow lint (actionlint) (pull_request) Successful in 20s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 20s
Third-party parts / As their notes say (pull_request) Successful in 21s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 27s
PR description / Title and description (pull_request_target) Successful in 29s
CI / What the change needs (pull_request) Successful in 1m0s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Has been cancelled
CI / longshot-builder end to end (synthetic game) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
3e61aa3bcf
The menu's row model goes: menu_model.h/.cpp, the Row table and the core's
rows, every MENU_MODULE block and its tx_/hn_ texts and MODULE_HINTS,
menu_text.h (mtext, TEXT_SEP), game_rows.cpp, menu_restart.h and the restart
state, ini_key, set_row, row_fixed and module_locked, the text fields (Custom
output size is the game's), the Game language's language.txt writer (the
game's), the Controls page's tables, and the rows' wrappers in menu_module.h.
Each module keeps its applier, its MENU_PRESS and MENU_LOCK, and what it
reports in the capabilities. The few lines the renderer still says itself
(a lock's reason, a status) are fmt_text/fmt_into (menu/fmt_text.h), in
English; the pipeline share's template words are its own (share_upscaler...).
The bug report's changed settings are the game's (game_settings_changed,
MkwVkHost version 77). The game's settings reach the renderer through the
appliers alone.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
dev.py queue run --mode build now gives cargo, unless the job sets them, CARGO_TARGET_DIR in the development
folder's target-shared/<checkout>-<hash>/ (LONGSHOT_CARGO_TARGET_ROOT moves it) and the PC's sccache: every
job of a checkout starts from its last build, and every checkout takes crates.io's crates from the cache.
One folder per checkout, never one for all: cargo keys the workspace's crates by their place in it and judges
them by file times, so two checkouts in one folder pass with each other's builds; cargo's own lock only makes
two cargos at once safe. cargoenv.py says so.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
One build job of the queue: cargo test -p of every crate a file changed since the base (default: where the
checkout left main, the working copy included) lies in and of the workspace crates that depend on them (cargo
metadata's path dependencies; the workspace's Cargo.toml or Cargo.lock tests all), modtool in a cargo of its
own as mise run rust does, and the Python checks run_all.py --changed picks for those files. The job's cargo
has the checkout's warm target folder and sccache. With game-free tests of the choice.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
feat(dev): dev.py check runs the changed groups, --milestone all; known noise is KNOWN, not FAIL
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 26s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 45s
CI / Workflow lint (actionlint) (pull_request) Successful in 51s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 1m12s
Third-party parts / As their notes say (pull_request) Successful in 57s
PR description / Title and description (pull_request_target) Successful in 1m32s
CI / What the change needs (pull_request) Successful in 1m44s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Has been cancelled
CI / longshot-builder end to end (synthetic game) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
d25cc8a5a2
A normal dev.py check now runs only the groups that failed, never ran, or whose inputs changed since the
revision they passed at: a group's "paths" regexes, else any file a build reads. --milestone runs every
group, the run before a push. A group's, its launch's or the checks file's "known_noise" regexes turn a
judge's FAIL line (a crash line too: a gamescope fallback) into KNOWN, which fails nothing and is counted in
the summary. No group to run builds nothing. Docs say how launches stay cheap.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
feat(dev): dev.py check warms the other launches from the first one's caches; --jobs 3 by default
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 23s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 41s
CI / Workflow lint (actionlint) (pull_request) Successful in 43s
Third-party parts / As their notes say (pull_request) Successful in 55s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 1m0s
PR description / Title and description (pull_request_target) Successful in 1m14s
CI / What the change needs (pull_request) Successful in 1m47s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Has been cancelled
CI / longshot-builder end to end (synthetic game) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
b3342785de
In l8-3 every launch's first boot made the driver's pipelines again (180 to 430 s, "made for another driver
or other settings"), all four at once. The first launch now starts alone until its game has written its
caches; they go into the build (a cache newer than the build's is taken, not only a bigger one) and the other
launches start from them. --jobs defaults to 3: each launch still waits for its memory.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The bridge's key command needs a window, so headless test runs could drive the Insert menu only with
RX_VK_MENU_SCRIPT's keys at fixed times from the first present, one boot per script. menu_key
({"cmd":"menu_key","key":"down"}) hands one press straight to the renderer's key presses as the
bridge's (hos_vk_note_bridge_key_press, which the menu already counts without a window or the focus), when
the test asks: one running game can be driven through many menu walks, each waiting on the game's state.
No renderer change. The names (host/control_menu_key.h) are checked by a game-free test.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
docs(dev): dev.py check's --jobs 4 is fine when the PC has the memory
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 10s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 25s
CI / Workflow lint (actionlint) (pull_request) Successful in 27s
Third-party parts / As their notes say (pull_request) Successful in 32s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 33s
PR description / Title and description (pull_request_target) Successful in 40s
CI / What the change needs (pull_request) Successful in 1m22s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Has been cancelled
CI / longshot-builder end to end (synthetic game) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
3fbeeac3a7
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
game_language is a value of the snapshot (options_store reads its line) and the
renderer's applier (menu/language.cpp) writes a change to language.txt
(i18n::set_game_language, the game's language k at index k - 1; 0 Auto leaves
the file alone). The start pass takes language.txt's as the setting's when they
differ; a write that fails goes back to it. hand_line is in menu_module.h for
the modules.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
from_renderer set the Quality preset Auto and its rows but sent the renderer
no snapshot, so a first start ran on the defaults. It now owes one
(DocOptions.owed), sent by settings_now::frame at the game's next acquire
phase, never from inside the renderer's save. Test:
auto_asked_by_the_renderer_sets_its_rows_and_owes_the_renderer_a_snapshot.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
menu_game_set("quality_preset", 1) is made at the game's next frame, after
the plain scale's lines, whose rows the preset's rules then set back. The
renderer now sets Minimum's rows and the plain scale itself and hands each to
the game as its line, the preset left as it is, as apply_preset(1) did.
hand_line's comment says what the game does with a line: keeps it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The Toggle column is the game's bind_* settings now: the renderer's
opts.hold_toggle alone went back, and the next snapshot set the old toggles
again. bindings_reset_all sets each bind_* to its default through the game
(Sprint's on, the buttons' off).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
menu_auto_for_gpu moves it on the card's thread while menu_renderer_status
reads it on the game's: a data race. std::atomic now.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The core applier set opts.hdr past the preview's hold (held_now lists it);
take_setting now, as every other held value.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The start pass runs no effect: Sprint's Toggle was bound in the host from
inside it (toggle_set). Its value alone is taken there; menu_init tells the
host after the pass, as before.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The renderer's rows filled it; the game's changed settings list is the one
list now (game_settings_changed). Inputs.pc_options and its heading, its count
and its link variants go.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The settings are the game's: no setting yet means its settings service has not
started, not the renderer. game_setting_set answers 1 or 0 only, so the
renderer row's -1 and -2 errors go.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
menu_save_options and menu::settings_applier_owns had no caller; comments that
named the deleted rows, menu_setting(_set), game_rows.cpp and MKWVK_BIND now say
what is there (bridge_probe_first is probe_upscalers_first). A note that each
snapshot taken is a save too.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Six u16 counts before the lists made 12 bytes, padded to 16 at the struct's end
(the mirror test's "a multiple of 8"): reserved5 is three now (layout 13), and
the size test counts the lists. LS_CAP_FSR4_LITE's comment sits above it, as the
bit test reads each LS_CAP_ line to its comma.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
style(coverage): one statement a line in cover.py's start_game (ruff E702)
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 12s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 38s
CI / Workflow lint (actionlint) (pull_request) Successful in 39s
Third-party parts / As their notes say (pull_request) Successful in 45s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 46s
PR description / Title and description (pull_request_target) Successful in 1m0s
CI / What the change needs (pull_request) Successful in 2m43s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Has been cancelled
CI / longshot-builder end to end (synthetic game) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
2490fc4bfe
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
auto_asked_by_the_renderer_sets_its_rows_and_owes_the_renderer_a_snapshot failed at its fake_applied() assert
(settings_now.rs:741): the fake's APPLIED is one global for the whole test binary, and other tests running in
parallel (any set_line or republish) call settings_link::apply between this test's changed() and its read. The
code is right; the test raced. It now checks the snapshot changed() hands over from the document itself.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
docs(modding): schema-gen's stamps brought to the schema's sha256 (9378bcff)
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 17s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 35s
CI / Workflow lint (actionlint) (pull_request) Successful in 36s
Third-party parts / As their notes say (pull_request) Successful in 44s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 46s
PR description / Title and description (pull_request_target) Successful in 55s
CI / What the change needs (pull_request) Successful in 1m33s
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Failing after 2m36s
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Failing after 6m6s
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Failing after 5m10s
CI / Website build and checks (pull_request) Failing after 1m8s
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Failing after 4m8s
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Successful in 1m6s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Failing after 2m20s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Has been cancelled
CI / longshot-builder end to end (synthetic game) (pull_request) Has been cancelled
8d6586b429
schema-gen --check called reference.md, permissions.md and scripting.md stale on this stack: only their schema
sha256 stamps differed. Regenerated with cargo run -p schema-gen.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The broker held each network grant to the mod's own manifest, but read only mod.json from a folder (host/broker_grants.c)
and only mod.json from a package (game_package_manifest). With the system mods' manifests now mod.toml, system/discord's
ipc grant would be refused in a confined game, and a player's mod.toml mod granted nothing. The folder walk and the
system mod's lookup now ask the game side's reader, game_folder_manifest (mod-manifest: mod.toml or mod.json, as JSON
text), and a package's manifest is either file.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Every example under docs/modding/examples is converted from mod.json to mod.toml (l7m's convert.py: the same value,
the #:schema line in place of "$schema"), and the guides' manifest snippets are TOML, their prose naming mod.toml.
manifest.md keeps the mod.json form beside it: the loader still reads either.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
refactor(mods): the system mods' manifests are mod.toml (#2434)
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 25s
PR description / Title and description (pull_request_target) Successful in 33s
CI / Workflow lint (actionlint) (pull_request) Successful in 40s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 41s
Third-party parts / As their notes say (pull_request) Successful in 42s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 53s
CI / What the change needs (pull_request) Successful in 2m33s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Has been cancelled
CI / longshot-builder end to end (synthetic game) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
06ebe2ce8b
Every built-in system mod's mod.json (and system/discord's test callers) is converted to mod.toml with l7m's
convert.py: the same value, the #:schema line in place of "$schema". What read a system mod's mod.json by name now
reads its mod.toml: native_mod!'s default manifest, shadows' and the menu's tests, the schema test over the built-in and
example manifests (either file), the website's settings page and its tests (smol-toml, already in the lockfile through
Astro), and the tests' paths. The schema emitters' and the dev docs' texts name mod.toml; the outputs regenerated.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The guides, the example READMEs, the dev docs and the API schema's texts named manifest fields JSON-style
(`"entry": "src/main.ts"`) beside mod.toml; they are TOML now (`entry = "src/main.ts"`). tsconfig keys,
profile.json's and the tools' JSON output stay JSON. The schema's outputs are regenerated.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
A mod's manifest is mod.toml (or mod.json): the errors a mod sees (an undeclared setting, a missing permission, no
snapshot, a library's exports) and the headers mod types writes said mod.json whichever it had. They say "its
manifest" now, naming mod.toml as the usual file; the committed mod.d.ts headers match.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
docs(mod-manifest): the crate's README (#2434)
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 11s
CI / Workflow lint (actionlint) (pull_request) Successful in 19s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 20s
Third-party parts / As their notes say (pull_request) Successful in 23s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 27s
PR description / Title and description (pull_request_target) Successful in 33s
CI / What the change needs (pull_request) Successful in 1m6s
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Failing after 6m24s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Has been cancelled
CI / longshot-builder end to end (synthetic game) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
b73ec98553
Every workspace crate has a README (tests/test_crate_readmes.py); mod-manifest, new in B1, had none: what it owns,
its main parts, who uses it and its tests.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The renderer has no rows since 4b-4: menu_model.h/.cpp, game_rows.cpp, the core table, ini_key and menu_text.h are
gone, so the fixture's module_rows, game_rows, core_module, built_menu and compile_menu read nothing there. What is
left is menu_sources (vk_menu.cpp, menu_module.h and the modules, for a check that reads an applier, a lock or a press
by its text), output_engine (output.cpp's engine, now up to game_size) and unbroken. A setting's row is its area mod's
declaration, which tests/area_settings.py reads. The checks that called menu_text call menu_sources.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The Microphone, Output device, Speaker layout, Volume, Mute in background, Microphone gain and Test microphone rows are
system/audio's declarations now; the renderer's audio and volume modules take them from the game's snapshot. The checks
keep their intent where it lives: the declarations (choices, ranges, restart, presetExempt, tab), the appliers'
MENU_SETTINGS (the microphone and the output device kept by name or id, run from the snapshot as the player's choice
reaches them), the renderer's status for the microphone meter, and the game's Mono-as-Stereo restart rule
(settings_now.rs a_restart_is_asked_for_what_the_renderer_asked_it_for). The renderer's tx_/hn_ texts, set_row and
ini_key these compiled are gone with the rows.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Controller in background, Stick dead zone, the mouse rows, Vibration, Vibration strength and Test vibration are
system/controls' declarations; the host reads them from the game's snapshot. The checks drop the renderer's row
regexes, set_row and ini_key fixtures and check the declarations instead. A choice's line held to its range is
options_store.rs values_are_read_by_their_codecs_and_held_to_their_ranges; Vibration strength's old Off and its steps
are rumble_strengths_off_from_before_the_vibration_row_is_vibration_off; a step stopping at the ends is the menu's
stopsAtEnds rule (test_menu_slider_ends.py). Test vibration's cell and line are the game's (settings_host.rs
VIBRATION_CELLS/WHY, checked one a VIB_SAY_*) and its press is controller.cpp's MENU_PRESS. The - and = keys still hand
the renderer option 7, checked there.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
test_menu_slider_ends reads every mod's declarations (sliders and stopsAtEnds stop, Sharpness wraps; Render resolution
is a choice now, so it leaves the list) and that settings-host hands both flags to the menu. test_preset_exempt checks
presetExempt against engine_rules.rs PRESET_KEYS (and the Shadow resolution and memory budget a preset sets) and
settings_now.rs's turn to Custom. Menu size, V-Sync and the FPS counter rows are checked as their declarations, the
renderer's appliers (take_setting ranges) and, for Menu size's old 0, options_store.rs.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
menu_restart.h and its slots are gone with the rows: what is pending and when closing asks are the game's
(api settings_host.rs restart_pending, menu_flow.rs), covered by menu_flow::tests::the_restart_is_asked_at_the_close_and_later_until_it_changes
and settings_now::tests::a_restart_is_asked_for_what_the_renderer_asked_it_for. So test_menu_restart.cpp and
test_menu_restart_slots.py (kMax slots) are deleted; test_menu_restart.py checks the restart rows' declarations, the
help's tag, and keeps the renderer's close hold and the host's relaunch.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
- test_menu_env_overrides.py: the switches' layer is the game's: engine_rules::tests::the_environment_switches_are_read_as_the_renderer_read_them
  and settings_now::tests::the_environments_values_reach_the_snapshot_and_are_never_saved.
- test_menu_save_atomic.py: the game writes the file: settings_now::tests::the_file_is_replaced_whole_and_nothing_is_left_beside_it
  (link, permissions, read-only, nothing beside) and a_folder_that_takes_no_new_file_is_saved_in_place; the output
  device's id and name lines are options_store's Codec::Device (test_audio_output_devices.py reads it).
- test_menu_model.py/.cpp, test_menu_rows_model.py: menu_model.h and the row table are gone; the order and pages are the
  menu mod's (game/mods/menu/test/menu.test.ts, mod test game/mods/menu).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
fix(vk): switches.def in name order again (HOS_GAME_FIRST_NIGHT_FIX, HOS_GAME_TRACE_SAVES)
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 8s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 20s
CI / Workflow lint (actionlint) (pull_request) Successful in 21s
Third-party parts / As their notes say (pull_request) Successful in 22s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 25s
PR description / Title and description (pull_request_target) Successful in 28s
CI / What the change needs (pull_request) Successful in 1m1s
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Failing after 5m33s
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Failing after 8m3s
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Failing after 3m27s
CI / Website build and checks (pull_request) Failing after 31s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Has been cancelled
CI / longshot-builder end to end (synthetic game) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
216640a75d
Two HOS_GAME_ switches sat after HOS_OCB_NORMAL; switches.h's find() searches the table by name, and
test_switch_table.py fails on the order.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
- settings_host: 7680x1080 is 64:9; the field's rule is 48:9 at most (5760x1080 taken, 5768x1080 not). The test was
  wrong, the code right.
- The fake menu's declare: a slider with no default takes its lowest value (its default is one of its values), and a
  declaration with a codec is kept in the options file, as the manifest's reader requires.
- menu.test.ts: a toggle takes no confirm in a manifest, so the question is checked on a second button; a text set and
  a press in one frame are checked each in order, not against each other; a button's text is its label then the
  value the game gives it (Test vibration's "No controller"). The checks still failing say what they saw.
- broker: a mod.json's text is handed as it is; the manifest's reader refuses one that is not JSON.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
write_whole wrote the file in place when its .part could not be written or moved over it (a full disk, a folder
that takes no new file), so a write cut short left the options file cut short. Now the old file is kept whole and
the error returned; the game says so in the log once (until a write succeeds again) and tries again at the next
change. Tests: a folder that takes no new file keeps the file as it was, and with no place for the file nothing is
written and the log is told once.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
fix(menu): Auto (this PC)'s restart rows on a first start count as Later (#2434)
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 8s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 20s
CI / Workflow lint (actionlint) (pull_request) Successful in 20s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 23s
Third-party parts / As their notes say (pull_request) Successful in 23s
PR description / Title and description (pull_request_target) Successful in 32s
CI / What the change needs (pull_request) Has been cancelled
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Has been cancelled
CI / longshot-builder end to end (synthetic game) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
231caa682e
Auto (this PC) sets its rows before the player sees them (a first start, or the hardware changed), and the first
close of the menu asked to restart for them. The game counts Auto's sets (SettingsAtStart::auto_count), and the menu's
flow takes what a restart applies then as the player's Later until the menu opens (MenuFlow::auto_set): the first close
asks nothing, and a change the player makes after is asked for as any. Game-free tests in menu_flow and settings_now.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
With the headers in, a marker a check cuts by (mic_key, can_monitors, mic_test_tick) was found twice: its declaration
and its definition.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The changed list is longshot-game menu.rs changed_text now (every mod's settings), and the "depends on this PC" list
is gone (in.pc_options, the lead's decision in the 4b-4 review). test_bug_report_defaults.py compiled the renderer's
changed_rows_text over its rows: deleted, covered by the new menu::tests::the_bug_report_lists_the_changed_settings_and_no_device_names
(a changed setting listed with its default, one at its default not, a device said as one, never by its name).
test_bug_report.py reads the Bug report button's declaration (system/gameplay, before Restart and Quit), its
MENU_PRESS and the game's list in bug_report_save, and its many-changes case keeps the link within its length.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
test_aspect_default, test_auto_settings, test_dlss_pre_bloom, test_framegen_by_row, test_framegen_dlss_cap,
test_framegen_preset, test_fullscreen_monitor_menu, test_gpu_choice and the three Intel checks: the rows' table lines,
tx_/hn_ texts, set_row, ini_key, save() and menu_init's env layer are gone, so each checks the declaration (choices,
needs, choiceNeeds, choiceTop, presetExempt, restart, place), the renderer's MENU_SETTINGS/MENU_PRESS/lock, its own lines
handed to the game (auto_for, gpu_device_id, the monitor's id), the capabilities' bits and the game's switch layer
(engine_rules.rs env_overrides). The moves of an older file are options_store.rs's (an_older_files_16_9_moves_on_a_screen_narrower_than_16_9_alone).
test_env_on lists RX_VK_NO_INTEL_SERIAL as read set-at-all on purpose (intel.cpp: the row held while it is set).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
- test_hdr_encode, test_hdr_sdr_why: HDR contrast is the hdr system mod's declaration (mod.toml), the renderer's core
  applier clamps it; the swapchain's why-SDR log is checked as before and the capabilities' LS_CAP_HDR, the row's
  hn_hdr line being gone with the rows.
- test_menu_stepped_sliders: the rows' kinds and commitOnRelease are their declarations; row_sync is gone.
- test_menu_utf8: utf8_whole is gone; char_starts and mic_key are checked as before.
- test_menu_setting_walk.py deleted: the control bridge sets the game's setting itself (game_setting_set, no walk of
  the arrows' steps); option_set by key and name is tests/control_test.c's (test_control.py).
- test_nfc_scan_hint.py deleted: nfc_scan_says and measure_help, the loop that could spin, are gone with the rows; the
  Scan row's help is its declaration's.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
test(control): the bridge's option checks list and set the game's settings alone (#2434 f, step 5)
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 9s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 26s
CI / Workflow lint (actionlint) (pull_request) Successful in 27s
Third-party parts / As their notes say (pull_request) Successful in 31s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 32s
PR description / Title and description (pull_request_target) Successful in 40s
CI / What the change needs (pull_request) Successful in 1m16s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Has been cancelled
CI / longshot-builder end to end (synthetic game) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
341a819078
HosControlGame has no renderer setting callbacks since 4b-4: the bridge reads and sets every setting through the
game's settings service (game_setting, game_setting_set). control_test.c's fake game has one list, the old renderer
rows' and a script mod's together, and checks option_get and option_set by key and name, a setting listed once, a
restart row's fields and a value out of range. The renderer's "nothing to choose" refusal is gone with its rows.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
test(menu): saved keys, area keys and option ids read the declarations, not the renderer's rows (#2434 f, step 5)
Some checks failed
Website / Website preview, upload (pull_request_target) Has been skipped
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 7s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 18s
CI / Workflow lint (actionlint) (pull_request) Successful in 19s
Third-party parts / As their notes say (pull_request) Successful in 20s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 23s
PR description / Title and description (pull_request_target) Successful in 27s
CI / What the change needs (pull_request) Successful in 1m0s
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Failing after 5m22s
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Failing after 5m39s
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Failing after 4m26s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Has been cancelled
CI / longshot-builder end to end (synthetic game) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
006f4e194f
- test_menu_ini_keys: FROZEN is checked against every mod's saved declarations (their ids the keys): none gone, none
  new without FROZEN, none declared twice, each with its owner (a renderer row's an area mod's, a moved row's the
  system mod MOVED names) and menu_places.tsv agreeing. FROZEN and MOVED are unchanged.
- test_settings_area_keys: Frame generation multiplier is a line of its own since OPTIONS_VERSION 9, not a view.
- test_option_ids: the legacy numbers are the host's HOS_SETTING(field, number, ...) now, the renderer answering none.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
test: the upscale label, XeSS, texture budget, mesh shaders, settings link, pad layout, Walk and Sprint checks without the renderer's rows (#2434 f, step 5)
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 8s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 18s
CI / Workflow lint (actionlint) (pull_request) Successful in 18s
Third-party parts / As their notes say (pull_request) Successful in 21s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 22s
PR description / Title and description (pull_request_target) Successful in 28s
CI / What the change needs (pull_request) Successful in 1m0s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Has been cancelled
CI / longshot-builder end to end (synthetic game) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
6e84ceb274
- test_upscale_label: the row's three names are its declaration's, the renderer holds it to 0..2, RX_VK_UPSCALE is
  the game's switch held to the range (settings_now::tests::the_environments_values_reach_the_snapshot_and_are_never_saved).
- test_xess_rules: the menu's xess_no lines went with the rows; each reason is still vk_xess.cpp's.
- test_texture_budget, test_mesh_mode_switch: an old vram_budget= or mesh_shaders= line is one of Longshot's own lines
  (api settings/service.rs OWN_LINES) that nothing reads, kept as the game keeps lines, not dropped by the renderer's save.
- test_settings_link: menu_settings_apply refuses a snapshot of another layout before the modules' appliers, gives
  them both snapshots and hands its own lines back instead of saving.
- test_pad_layout: the Layout preset is the bindings module's applier's.
- test_walk_key, test_sprint: the Controls page's bindings are system/controls' bind_<name>, the same names as
  host/nn_hid.c's; Sprint's Toggle is host-sys bindings.rs has_toggle.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The menu's last failing checks in the fake game had two causes, neither other mods' rows:
- The settings' read counts are per thread and the fake game runs a mod's tests on one: a test saw the reads of the
  tests before it (17 declarations read while closed). The fake game's reset now sets them back for each game
  (settings_host::reset_reads).
- The menu opens on its layout's first tab, Graphics (its Detail heading and Simulated turf link always there), so a
  check of a row on Gameplay or Controls switches to that tab first (showTabOf).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
They need grass's own Rust code running (its hooks' constants, its rows locked by the turf's state), which the fake
game of mod test has not: it holds the built-in Rust mods' manifests, not their code. Marked game: true, so dev.py
game-tests runs them and mod test reports them skipped; the header says so. The logic they cover without the game is
the crate's own tests already (src/tests.rs: the reach, the hooks, the rows, locks(); src/turf/tests.rs).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The microphones', the output devices', the NFC tags', the ReShade files' and the languages' names went into the
capabilities' fixed fields (LS_CAPS_NAME_BYTES) through snprintf, which cuts a long name mid-character: the game then
got a broken last character. One copy for all of them, caps_name (gpu/vk/menu/caps_name.h, the monitors' and GPUs'
put_name's rule), with a game-free check (gpu/vk/tests/caps_name_test.cpp, in run_all's C++ checks).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
fix(menu): the menu's language moves the declarations' generation on, so its texts are made again (#2434)
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 8s
CI / Workflow lint (actionlint) (pull_request) Successful in 22s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 21s
Third-party parts / As their notes say (pull_request) Successful in 26s
PR description / Title and description (pull_request_target) Has been cancelled
CI / What the change needs (pull_request) Has been cancelled
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Has been cancelled
CI / longshot-builder end to end (synthetic game) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Lint (pre-commit, ShellCheck) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
0703793c9d
The menu makes its texts again when the declarations' generation moves on; the renderer used to move it when the
menu's language changed, and the game's generation (settings_host::generation_of) did not follow the language, so a
question shown (Keep changes?'s countdown) stayed in the old language. The language is part of the generation now, with
a game-free test. menu.test.ts: the binding check opens the Controls page, where the bindings are.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
test(menu): the menu model's checks go or read the menu mod's layout and the declarations (#2434 f, step 5)
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 9s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 23s
CI / Workflow lint (actionlint) (pull_request) Successful in 24s
Third-party parts / As their notes say (pull_request) Successful in 25s
PR description / Title and description (pull_request_target) Successful in 32s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 28s
CI / What the change needs (pull_request) Successful in 1m4s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Has been cancelled
CI / longshot-builder end to end (synthetic game) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
c4b4210855
The renderer's model, row table and slots are gone (4b-4); the menu's layout is the menu system mod's
(game/mods/menu/src/layout.ts) over the mods' declarations.
- Deleted, with their cover:
  - test_menu_modules.py (every module's place resolves, its rows in order): menu.test.ts "layout: every tab draws its
    rows, headings and links in the menu's own order, each with its label" and "a row the layout does not name goes
    where its place says", and longshot-game menu::tests::every_system_mods_row_keeps_its_place.
  - test_menu_module_slots.py (kModuleRowsMax, rows left out): menu.test.ts "layout: the menu names every row the
    renderer has once, and no key the settings do not hold"; no slots are left to run out.
  - test_menu_decl_state_hint.py (decl_state_locked's hint): the hints are the declarations' and the game's
    (api settings_host::tests::a_game_rows_scale_and_lock_reach_the_menu, menu.test.ts "a row's texts are its
    declaration's").
  - test_renderer_setting_states.py (MKWVK 67's member, gone at 77): the members now wired are test_settings_link.py's.
  - test_settings_decls.py (the golden from the renderer's decl_build): FROZEN's renderer keys declared is
    test_settings_area_keys.py's; the rows the mod draws are menu.test.ts's.
- test_menu_sections, test_settings_table: read layout.ts's tabs, headings and links with the declarations' labels and
  conditions.
- test_menu_locked_button: a locked row's press is refused by settings-host's press before any press runs.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
fix(menu): Sprint's Toggle cell has its help again, its English the source (#2434)
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 10s
CI / Workflow lint (actionlint) (pull_request) Successful in 23s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 23s
Third-party parts / As their notes say (pull_request) Successful in 28s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 31s
PR description / Title and description (pull_request_target) Has been cancelled
CI / What the change needs (pull_request) Has been cancelled
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Has been cancelled
CI / longshot-builder end to end (synthetic game) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
fc9afa721b
The renderer's Controls page gave Sprint's Toggle cell its help ("Toggle for Sprint: On, a press of its key or button
starts Sprint ..."); with the page the menu's, the text was left only as a key of the translation tables. The menu's
binding row gives it again (TOGGLE_HELP, by the binding's key), its English the strings' key, with a check in the fake
game. menu.test.ts: the countdown check lets the language's change redraw before it answers; the binding check says
which pad values it saw.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
test: the A/B bench's and RecompLauncher's settings keys are the mods' declarations (#2434 f, step 5)
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 8s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 20s
CI / Workflow lint (actionlint) (pull_request) Successful in 20s
Third-party parts / As their notes say (pull_request) Successful in 23s
PR description / Title and description (pull_request_target) Successful in 28s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 24s
CI / What the change needs (pull_request) Successful in 1m2s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Has been cancelled
CI / longshot-builder end to end (synthetic game) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
3a01540ca5
test_dev_ab's pinned options (Skip title screen, Frame generation Off, V-Sync Off, Render resolution 67%) and
test_recomplauncher_json's settings keys are checked against the mods' declarations (their ids, choices and store),
the renderer's module rows being gone.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
test: the ocarina notes, program hooks, render sites, controller speaker and C++ escape checks follow the renderer's ABI as it is (#2434 f, step 5)
Some checks failed
Website / Website preview, upload (pull_request_target) Has been skipped
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 8s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 19s
CI / Workflow lint (actionlint) (pull_request) Successful in 19s
Third-party parts / As their notes say (pull_request) Successful in 24s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 25s
PR description / Title and description (pull_request_target) Successful in 29s
CI / What the change needs (pull_request) Successful in 1m1s
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Failing after 4m21s
CI / Website build and checks (pull_request) Failing after 40s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Has been cancelled
CI / longshot-builder end to end (synthetic game) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
bc771acbb7
- test_ocarina_notes: the note rows are system/controls' bindings, each with a gamepad column (host-sys has_pad); the
  fixture has host/game_settings.h's hos_input_held.
- test_program_hooks: the host members end with game_settings_changed after scene_rgba16f (a later version's).
- test_render_sites: HOS_OPT_HDR_TONEMAP is looked for in code, not in vk_api.h's note of what 47 was.
- pad_speaker_test.c: the game's snapshot has no route classes (the routes are game_pad_route_mode's).
- cxx_escape_test.cpp: MkwVkRenderer has no option member (MKWVK 75): the guard is checked on guest_imported.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
test: the pipeline share and tour, threaded rendering, dev packs and run_all's own checks without the renderer's rows (#2434 f, step 5)
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 8s
CI / Workflow lint (actionlint) (pull_request) Successful in 23s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 23s
Third-party parts / As their notes say (pull_request) Successful in 26s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 27s
PR description / Title and description (pull_request_target) Successful in 34s
CI / What the change needs (pull_request) Successful in 1m8s
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Failing after 4m3s
CI / Website build and checks (pull_request) Failing after 48s
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Failing after 6m6s
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Failing after 6m7s
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Successful in 1m0s
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Failing after 7m14s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Has been cancelled
CI / longshot-builder end to end (synthetic game) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
05cdfc32ed
- test_pipeline_share: the builder's names for the Upscaler, Frame generation and HDR are the declarations' (graphics,
  hdr); Save my pipeline list is system/developer's button under the layout's Developer heading, its press the
  module's MENU_PRESS, its value settings-host's from the renderer's status.
- test_pipeline_tour: frame_rate_cap=6 is Uncapped by the declaration's choices and first.
- test_threaded_rendering: the row is its declaration (Auto, On, Off, a restart's) and the threads module's start
  value; hn_threaded's lines went with the rows.
- test_dev_packs (not the deletions): the run-env case's made-up tree gets a shaders.py with nothing to make, as
  packs now makes a tree's shaders first.
- run_all.py (test_run_all_declarations, not the deletions): main() hands scripts/shaders.py its stderr only when it is
  a file, so a test that runs main() with a string buffer for stderr runs.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
feat(menu): the renderer's lost row texts worded by the game, and a binding's row moves on with its inputs (#2434)
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 8s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 17s
CI / Workflow lint (actionlint) (pull_request) Successful in 21s
Third-party parts / As their notes say (pull_request) Successful in 26s
PR description / Title and description (pull_request_target) Has been cancelled
CI / What the change needs (pull_request) Has been cancelled
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Has been cancelled
CI / longshot-builder end to end (synthetic game) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Lint (pre-commit, ShellCheck) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
1a5fc621b1
The renderer gives its state as numbers in LsRendererStatus (LS_CAPS_LAYOUT 14: fg_maker, fg_unavailable,
fg_skip, fg_most, dlss_why, hdr_sdr_why, nfc_scan, laptop_applied in reserved3's bytes, nfc_scan_name at the
end) and settings_host's game_state words them by row key in the old English (renderer_lines.rs): HDR's why
SDR, Frame generation's Auto (FSR 3.1 FG / Built-in FG), Frame generation by's DLSS FG cannot run / not now /
paused / RX_VK_DLSS_FG=1 lines, the NFC Scan row's, the weak laptop's Applied, and the game's own upscaler's
line with why DLSS, FSR 4 and XeSS are not offered. Threaded rendering's per-choice help goes back into its
declaration's hints, its RX_VK_ASYNC / RX_VK_RECORDER line the game's. A binding row's text is its inputs,
tab-separated, so the memoised line is drawn again when the host's inputs change (the menu test's pad cells).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
gpu/vk/menu_text.h and the renderer's declarations went with its rows: the renderer makes no menu text. The keys are
now the area mods' setting labels (the renderer's rows' until the cutover), the menu mod's layout labels and the keys
and literal texts settings-host and the other api services hand the menu ({"key": ...}, text_json). UNTRANSLATED
and SAME_IN_SOME lose the renderer's formats that nothing gives now and take the game's texts with no translation yet.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
test(menu): the text field check keeps the host's take_text and the window's keys; the renderer's field went with its rows (#2434 f, step 5)
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 7s
CI / Workflow lint (actionlint) (pull_request) Successful in 15s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 15s
Third-party parts / As their notes say (pull_request) Successful in 19s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 20s
PR description / Title and description (pull_request_target) Successful in 26s
CI / What the change needs (pull_request) Successful in 59s
CI / Website build and checks (pull_request) Failing after 46s
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Failing after 4m32s
CI / longshot-builder end to end (synthetic game) (pull_request) Successful in 3m3s
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Failing after 6m43s
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Failing after 7m1s
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Failing after 7m54s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
3391f978eb
The renderer's TextField, its editing and Custom output size's own row are gone: a field is the menu system mod's
through the mods' UI (vk_ui.cpp), and Custom output size's rules are settings-host's
(settings_host::tests::a_custom_output_size_is_checked_as_its_field_did). test_menu_text_field keeps the host's
side (the queue, focus, UTF-8, first-line paste), the Windows key branch and the wiring, and checks vk_ui.cpp takes and
gives back the keyboard.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
test_upscaler_rows: the rows' order from layout.ts, their keys and needs from system/graphics and hdr, the locks as MENU_LOCK. test_upscaler_round_trip: the saved Render resolution is kept and snapped at use (resolution_scale; engine_rules::tests::a_preset_snaps_its_resolution_to_the_upscaler). test_output_resolution: the output engine run as before; its texts are settings_host::tests::a_choices_list_and_its_texts_are_this_pcs'.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
test(controls): the Menu shortcut's checks read its declaration and options_store's move (#2434 f)
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 9s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 20s
CI / Workflow lint (actionlint) (pull_request) Successful in 22s
Third-party parts / As their notes say (pull_request) Successful in 25s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 33s
PR description / Title and description (pull_request_target) Successful in 35s
CI / What the change needs (pull_request) Successful in 1m9s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Has been cancelled
CI / longshot-builder end to end (synthetic game) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
cfaf7d810d
The keyboard fixture built on the deleted row table goes; the shortcut's choices and default are system/interface's declaration, the old-file move options_store's (an_older_files_values_move_as_the_renderer_moved_them), Esc's block still read from menu_tick.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
feat(menu): the rows' per-choice help and small texts back, in the old renderer's English (#2434)
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 9s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 19s
CI / Workflow lint (actionlint) (pull_request) Successful in 21s
Third-party parts / As their notes say (pull_request) Successful in 23s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 29s
PR description / Title and description (pull_request_target) Successful in 32s
CI / What the change needs (pull_request) Successful in 1m7s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Has been cancelled
CI / longshot-builder end to end (synthetic game) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
7b8148de97
The old renderer rows' lines, keyed as the strings files translate them:
- choices' hints in their declarations: Quality preset, GPU, Robust buffers, V-Sync, Window scaling filter,
  Handheld profile, Upscaler, DLSS model, FSR 4 model, Speaker layout, Microphone, Aspect ratio, Output
  resolution, Frame generation (and by), NVIDIA Reflex, AMD Anti-Lag 2, Button prompts, Layout preset, Mouse
  camera, Motion controls, Game speed, Menu size and theme, FPS counter, Drift correction; Menu language's Auto
  named as it was, with its line.
- the game's by value (renderer_lines.rs): the toggles' (Dynamic resolution, Frame pacing, Controller in
  background, Invert mouse vertical, DLAA before bloom), Sharpness's, Render resolution's for the Upscaler,
  Frame generation multiplier's, Output device's, a listed microphone's, a listed aspect's and output size's,
  Test microphone's Start/Stop test, Motion controls' gyro texts (hos_sdl_gyro_status, now in game_host.h).
- the FPS counter's line rows' help, the four links' help (Controller speaker, FPS counter details, Motion,
  Controls), the Microphone level line's help, and the Window scaling filter's lock while nothing is scaled.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
feat(menu): the rows' texts that need the renderer's state, from the state it now gives (#2434)
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 9s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 19s
CI / Workflow lint (actionlint) (pull_request) Successful in 21s
Third-party parts / As their notes say (pull_request) Successful in 26s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 28s
PR description / Title and description (pull_request_target) Successful in 35s
CI / What the change needs (pull_request) Successful in 1m9s
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Failing after 1m19s
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Failing after 1m47s
CI / Website build and checks (pull_request) Failing after 20s
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Failing after 5m34s
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Failing after 6m49s
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Successful in 40s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Has been cancelled
CI / longshot-builder end to end (synthetic game) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
c64c5cdb0c
LsRendererStatus (LS_CAPS_LAYOUT 15) gives row_bits (LS_ROW_*: the chosen output, monitor or microphone not
connected, HOS_AUDIO_DEVICE choosing, the Window scaling filter not needed, under 7 GB for DLSS) and
dlss_env_preset; LsSize.custom marks Custom output size's own size, now listed after the offered ones.
The game words them as the old rows did: a device row's last entry "<name> (not connected)" (Selected
output / Selected monitor without a name) and the Microphone's "Not plugged in" line, "Overridden by
HOS_AUDIO_DEVICE", "Not needed (window = output)", the DLSS model's CNN (E) and its line, "NVIDIA default /
Preset %c (RX_VK_DLSS_PRESET)", "Your own size, from Custom output size below.", Test microphone's
"Unavailable", the GPU list's "%d: %s" / "%d: Device %d", and Controller sync's "TV waits / Controller
waits %d ms" (its values' texts the game's, so its row has no unit). ReShade's User preset file's first
choice is "Choose a preset" again.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
test(menu): the translations' check reads the game side's texts; the 21 texts nothing says any more go from the strings files (#2434 f)
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 6s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 16s
CI / Workflow lint (actionlint) (pull_request) Successful in 18s
Third-party parts / As their notes say (pull_request) Successful in 21s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 22s
CI / Website build and checks (pull_request) Failing after 16s
PR description / Title and description (pull_request_target) Successful in 29s
CI / What the change needs (pull_request) Successful in 1m1s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Failing after 3m7s
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Failing after 4m53s
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Failing after 7m17s
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Failing after 7m37s
CI / longshot-builder end to end (synthetic game) (pull_request) Successful in 3m51s
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Successful in 55s
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Failing after 8m55s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Failing after 9m21s
0cdc036b99
Gone, as l10t listed them: the Output device's and Fullscreen monitor's fixed-line hints, the bug report's and Reset to defaults' renderer wording (the menu mod's own replaces it), the Accessibility heading, the old Sprint help and the pipelines sample text; and %d nits, Auto (current monitor), Reset to defaults and Swap (the menu mod's binding question says Rebind). The check now also reads game/crates/api (services, settings), host-sys and ui's texts, and every text of a declaration, as the tables' keys write them; test_texts_are_the_menus lists every stale text at once.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
feat(ui): the start-up screen and the Insert menu's frame are the game side's, drawn on UI in the menu's theme (#2434)
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 9s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 24s
CI / Workflow lint (actionlint) (pull_request) Successful in 25s
Third-party parts / As their notes say (pull_request) Successful in 27s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 30s
PR description / Title and description (pull_request_target) Successful in 35s
CI / What the change needs (pull_request) Successful in 1m12s
CI / Website build and checks (pull_request) Failing after 3m15s
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Failing after 4m13s
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Failing after 5m35s
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Failing after 6m26s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Failing after 2m53s
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Successful in 1m45s
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Failing after 8m0s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Has been cancelled
CI / longshot-builder end to end (synthetic game) (pull_request) Has been cancelled
240964758a
The renderer hands the start-up screen's view over (MkwVkRenderer.startup_view, version 78, LsStartupView) and the
menu's unit and margin (MkwUiInput.menu_unit, menu_safe, MKW_UI_VERSION 7), and no longer draws either: longshot-game
screens/startup.rs and screens/menu_frame.rs build them as engine trees on UI's new Screen surface, which no mod can
name. The menu's frame (the dim, the column, the banner with the logo and the build's name, the help box, the prompts)
shows the same whether the script runtime runs or not, around system/menu's page or the engine's fallback page.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
fix(ui): the engine screens' logo shows, and a ButtonPrompt's cap is as wide as its text (#2434)
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 10s
CI / Workflow lint (actionlint) (pull_request) Successful in 24s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 24s
Third-party parts / As their notes say (pull_request) Successful in 27s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 30s
PR description / Title and description (pull_request_target) Successful in 56s
CI / Website build and checks (pull_request) Failing after 57s
CI / What the change needs (pull_request) Successful in 1m13s
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Failing after 4m47s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Failing after 4m55s
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Failing after 6m15s
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Failing after 6m21s
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Successful in 25s
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Failing after 6m57s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Failing after 11m43s
CI / longshot-builder end to end (synthetic game) (pull_request) Successful in 16m43s
2de7c9521d
The logo's image ids had MKW_UI_PAGE_BIT set, so they named a glyph page and the logo drew white. A cap was 1.6 em
whatever its text: Enter and PgUp PgDn ran out of it. The screens' PNGs take every frame's texture changes, as a
renderer does. test_menu_size reads the banner where it is now, the game side's menu frame.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
settingsHost.decls (2-5 ms of CPU) and laidOut in one frame listener call ran past the
callback's 5 ms: system/menu faulted in 10 of l8 run 5's launches, and bt/h1/h4 crashed
right after. The layout now runs at the next frame; read_decls hands its capabilities to
top_of's rows instead of each reading them again.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Fails here: host/sandbox_linux.c grants no rule for it, so a run with the built-in script mods
from their sources loads none of them (mod.toml: Permission denied).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
fix(sandbox): the confined game reads HOS_SYSTEM_MODS_DIR's folder (#2434)
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 9s
CI / Workflow lint (actionlint) (pull_request) Successful in 21s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 22s
Third-party parts / As their notes say (pull_request) Successful in 24s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 25s
PR description / Title and description (pull_request_target) Successful in 33s
CI / Website build and checks (pull_request) Failing after 34s
CI / What the change needs (pull_request) Successful in 1m10s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Has been cancelled
CI / longshot-builder end to end (synthetic game) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
e5eb28ce37
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
feat(vk): the renderer's own painter draws the overlays; Dear ImGui removed (#2434)
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 6s
CI / Workflow lint (actionlint) (pull_request) Successful in 17s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 18s
Third-party parts / As their notes say (pull_request) Successful in 22s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 22s
PR description / Title and description (pull_request_target) Successful in 31s
CI / Website build and checks (pull_request) Failing after 33s
CI / What the change needs (pull_request) Successful in 1m5s
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Failing after 2m53s
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Failing after 3m45s
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Successful in 51s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Has been cancelled
CI / longshot-builder end to end (synthetic game) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Has been cancelled
c45c881800
vk_paint.cpp/.h: one pipeline of the renderer's own (shaders/paint.vert, paint.frag) for game-ui's paint list
(vk_ui.cpp), the world layer's offscreen labels, the ReShade comparison bar and the FPS counter: anti-aliased convex
shapes and polylines, stb_truetype glyphs in an atlas, textures copied in as only their changed rects, the same
straight-alpha blending, sRGB, HDR10 and Colour vision handling. vk_imgui.cpp/.h, the font prebake, the dead menu
helpers, the builder's logo header and third_party/imgui are gone; its stb headers move to third_party/stb.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
feat(fps): the FPS counter is the optional system mod fps-counter, on a new read-only longshot/stats (stats.read) (#2434)
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 7s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 19s
CI / Workflow lint (actionlint) (pull_request) Successful in 21s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 22s
Third-party parts / As their notes say (pull_request) Successful in 23s
PR description / Title and description (pull_request_target) Successful in 32s
CI / Website build and checks (pull_request) Failing after 33s
CI / What the change needs (pull_request) Successful in 1m10s
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Failing after 1m38s
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Failing after 3m46s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Failing after 2m39s
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Successful in 49s
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Failing after 5m35s
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Failing after 6m10s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Has been cancelled
CI / longshot-builder end to end (synthetic game) (pull_request) Has been cancelled
68a08ded3c
The renderer measures only while a mod reads its statistics (MkwVkRenderer.frame_stats, version 79, LsFrameStats); the
mod draws every level, the graph and the footer on one Canvas, reading four times a second (ten from the graph on). Its
17 settings move from system/interface with their keys; draw_fps, fps_texts' text and gpu/vk/menu/fps_counter.cpp go.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
fix(ui, menu): an id is free again after a reset in the same batch, and the menu's tests wait for the declarations' frame of their own (#2434)
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 6s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 16s
CI / Workflow lint (actionlint) (pull_request) Successful in 18s
Third-party parts / As their notes say (pull_request) Successful in 21s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 23s
PR description / Title and description (pull_request_target) Successful in 32s
CI / Website build and checks (pull_request) Failing after 36s
CI / What the change needs (pull_request) Successful in 1m6s
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Failing after 4m0s
CI / longshot-builder end to end (synthetic game) (pull_request) Successful in 4m3s
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Successful in 40s
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Failing after 6m38s
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Failing after 6m45s
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Failing after 7m46s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Failing after 9m59s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Failing after 14m35s
5349e95d6c
The start-up screen builds itself anew after a ["reset"] with the same ids, which the shadow refused (screens::startup's
test). Since a5e009c8 the declarations are read and laid out in a frame each, so a re-read takes three frames.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The game writes its settings file whole (beside itself, then moved over), which a rename needs
the folder for; the profile's top also holds trust.json and profile.json, which the confined
game must not replace. So the settings move to <profile>/settings/settings.ini and the sandbox
grants that folder alone (Linux and Windows); trust.json and profile.json keep their grants.
A settings.ini at the profile's top, from before, is moved in once at the start. The builder
makes the folder with the profile's others; the bridge's run profiles write into it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
A decls read that ran past the callback's budget faulted, nothing was kept, and the menu asked
again the next frame: three faults in a second stopped system/menu (l8 runs 5 and 6: rec2, rq,
fr). The menu now waits 25 s of game time after such a read, and settingsHost keeps its last
answer by what it was made from (the rows, their generation, the status's row bits, the Play
recording page's), so a read again of the same declarations is a compare.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Fails here: the bridge's row has the mod.toml's own choice alone, 0 to 0, so a driver cannot
set a size by its text (l8 runs 5 and 6: settings-d, preview-restart, hooks-h).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
fix(menu): the declarations made the menu's in a frame of their own, after the read's (#2434)
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 10s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 23s
CI / Workflow lint (actionlint) (pull_request) Successful in 23s
Third-party parts / As their notes say (pull_request) Successful in 27s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 28s
CI / Website build and checks (pull_request) Failing after 33s
PR description / Title and description (pull_request_target) Successful in 36s
CI / What the change needs (pull_request) Successful in 1m22s
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Failing after 4m21s
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Failing after 7m5s
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Failing after 7m24s
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Successful in 54s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Failing after 7m28s
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Failing after 8m58s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Failing after 9m36s
CI / longshot-builder end to end (synthetic game) (pull_request) Successful in 14m28s
e819b126eb
The read alone is 2.8-4.2 ms of CPU (l8 run 6); with the 250 declarations' wrapping in the same
call it still ran past 5 ms. Read, made, laid out: a frame each.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
settingsHost.decls() wrote every declaration (about 250) as JSON text that the menu's thread
parsed again: 3-6 ms of CPU in one call, past the callback's 5 ms on a loaded PC (l8 runs 5-8).
Now decls(keys, pages, since) gives the declarations of the keys and of the rows placed on the
pages, each field at its default left out, as a tree the engine builds as it is (api::value::Json
keeps a tree: Json::tree; its text is written only when asked). With since the generation still
the one, nothing is read and decls is null. The menu reads the page it shows (view.ts panelKeys),
fills the defaults (host.ts filled) and reads a few labels for the restart question.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The renderer's present replaced an input the UI's thread had not taken yet, so a one-present
nav (a headless run's scripted Tab or Down, ui_host_nav), a click or a key was lost whenever the
thread was behind: l8's headless menu walks never left the Graphics tab. The earlier input's
presses, nav, keys, text, wheel and time are now kept in the newer (Input::absorb).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
RX_VK_MENU_SCRIPT (test runs) logs each key as it is pressed, whether the hosted page took it,
and the keys a headless present could not hand over: l8's headless walks stay on their first
tab, and their logs said nothing of why.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
fix(vk): a headless run's hosted page takes the control bridge's menu keys (#2434)
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 6s
CI / Workflow lint (actionlint) (pull_request) Successful in 16s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 16s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 20s
Third-party parts / As their notes say (pull_request) Successful in 22s
PR description / Title and description (pull_request_target) Successful in 31s
CI / What the change needs (pull_request) Successful in 1m12s
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Failing after 2m0s
CI / Website build and checks (pull_request) Failing after 15s
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Failing after 4m40s
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Failing after 7m42s
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Failing after 9m16s
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Successful in 59s
CI / longshot-builder end to end (synthetic game) (pull_request) Successful in 15m1s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Failing after 14m18s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Failing after 25m8s
efdf83510d
The window's keys reach the hosted page by ui_tick taking them from the key queue and making
them its moves; a headless present skipped that, so a test's menu_key presses (all but Insert,
the menu's own) went to the renderer's menu, which hands a hosted page's keys over only from
that path: l8's headless walks (boot's mic test, the buttons, recordings, preview) never left
their first tab. The headless present now takes them the same way (take_keys).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The profile's settings/settings.toml replaces settings.ini (longshot_options.ini's lines): one table per mod id,
choices by name, toggles true/false, only what differs from the defaults and the Quality preset's rows; a value none of
its setting's is its default and said in the log, an unknown mod's or key's kept. An older settings.ini (or a game
folder's longshot_options.ini) is read once into it, its old versions moved as before, and left as it is. The file is
written beside itself and moved over; a file that is not TOML is kept as settings.toml.unreadable.

The host's C and the renderer read the settings from the game (game_options_value), never the file. The run's layers
over the file: the game's --set <mod id>:<key>=<value> and --settings <file.toml>, then LONGSHOT_SET; their rows are
locked, never saved. longshot --list-settings lists every setting.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
HOS_OUTPUT_RES, HOS_DYNRES, HOS_REALTIME_STEP, RX_VK_PACE, RX_VK_UPSCALE, RX_VK_FRAMEGEN_MULT and
RX_VK_COMPUTE_QUICK_FIRST: their reads deleted, each a GONE row naming its LONGSHOT_SET
(system/graphics:output_res, :resolution, system/gameplay:game_speed, system/developer:frame_pacing,
system/graphics:upscaling, :frame_generation and :frame_generation_multiplier,
system/developer:intel_quick_compute_builds). The host's C reads the run's value from the game (game_setting_line,
game_setting_by_run); the scripts' runs set LONGSHOT_SET. The switches the renderer still reads itself before its row
(RX_VK_DLSS_PRE_BLOOM, RX_VK_ASTC_RGBA8, RX_VK_PRESENT_QUEUE, RX_VK_NO_INTEL_SERIAL, RX_VK_FSR4_MODEL) stay, under
the run's settings.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The Quality preset's memory_budget, a line no mod declares, is no longer written at the preset's value. A declaration's
renamedFrom (one old id or a list) reads a value kept under an old id, and none under its id, as its own, and the file
writes it under its id. The host checks read the game's lines through a stub of game_options_* (tests/fixtures), the
profile's file is settings/settings.toml (an older file carried to settings/settings.ini), and the renderer's checks
read through options_line.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
RX_VK_DLSS_PRE_BLOOM, RX_VK_ASTC_RGBA8, RX_VK_PRESENT_QUEUE, RX_VK_NO_INTEL_SERIAL and RX_VK_FSR4_MODEL: the renderer's
reads, their own locks and texts deleted, engine_rules::env_overrides with them; each a GONE row naming its LONGSHOT_SET
(RX_VK_NO_INTEL_SERIAL=1 and =0: system/developer:intel_shader_compiles=side-by-side and =one-at-a-time). The rows the
run sets are locked by the game (SET_BY_RUN). The Present queue's choice at the device's creation reads the run's value
(game_setting_get; the start's rows from the game's early settings).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
dev.py queue run --set <mod id>:<key>=<value> and --settings <file.toml>; dev.py check --set, and a "settings" file in
the checks file, a launch or a group: each joins LONGSHOT_SET after the environment's entries (scripts/devtools/runset.py).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The mod tool's settings command wrote key=text lines to the profile's settings.toml at its top; it now reads and
writes settings/settings.toml as the game does (each line under its mod's table, the older settings.ini read when
there is none yet, a file that is not TOML never written over). The host fixtures take hos_settings_arg and the
game's lines (tests/fixtures/game_options_stub.h); the checks follow the new paths. The prompts oracle builds in a
folder of each test's own (two parallel builds into one file ran it while written: Text file busy).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The FPS counter's statistics in stats_tick, the slider cell and the hosted page's draw gone from vk_menu.cpp, save()
writing no line itself, the layout's links with help, the FPS details texts gone from the menu's strings (and five
new texts listed untranslated); startup_view and frame_stats guarded as every other entry.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
test: the checks follow mod-api's UI version 7 and the menu keys' tests, fmt (#2434)
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 12s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 22s
CI / Workflow lint (actionlint) (pull_request) Successful in 23s
Third-party parts / As their notes say (pull_request) Successful in 26s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 29s
PR description / Title and description (pull_request_target) Successful in 37s
CI / What the change needs (pull_request) Successful in 1m16s
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Failing after 2m24s
CI / Website build and checks (pull_request) Failing after 1m2s
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Failing after 3m8s
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Failing after 7m4s
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Failing after 8m17s
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Successful in 2m16s
CI / longshot-builder end to end (synthetic game) (pull_request) Successful in 5m41s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Failing after 8m55s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Has been cancelled
d20d48a94f
test_ui_renderer takes MKW_UI_VERSION 7; test_fps_rate cuts fps_take's definition, not its declaration; the text
keys check reads settings-host's rows outside its tests (a test's made-up rows are no menu's), its list without the
keys only those tests gave; the mod tool's settings file code formatted.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The driver bound and reached h/run/keep.sock by its whole path: under a long TMPDIR (a queue job's folder with a long
job name: 110 bytes for l17-test-changed) sun_path's 108 bytes cut it, the listener went to another file or none, and
"keep" read 0. Each socket's address is now /proc/self/fd/<its folder>/<name>, the folder opened in the view the call
is made in. Failed before and passes now under a 160-byte TMPDIR.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
fix(modtool): mod settings writes a built-in setting's choice by its name and a toggle as true or false, as the game does (#2434)
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 5s
CI / Workflow lint (actionlint) (pull_request) Successful in 21s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 21s
Third-party parts / As their notes say (pull_request) Successful in 24s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 25s
PR description / Title and description (pull_request_target) Successful in 34s
CI / Website build and checks (pull_request) Failing after 1m8s
CI / What the change needs (pull_request) Successful in 1m16s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Has been cancelled
CI / longshot-builder end to end (synthetic game) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
a549dcbac9
The game's settings.toml takes a built-in choice by its name only (a number for it is dropped at the next start, the
setting back at its default). The mod tool now knows the built-in mods' settings kept in the file and writes each in
the game's form, under its mod's table, reading a name back as its index for the settings service. choice_name and
SettingDecl::choice_names move to api::settings, the game's settings_file and the mod tool sharing them.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
PageRows is memo'd on the page's declarations, its rows' states and the microphone meter's
status: a view's or a status's change that moves nothing on the page no longer rebuilds and
diffs every line of it (l8 run 11: system/menu's ui flush past 5 ms of CPU in the walks).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
chore(fps-counter): its types made again from the schema (settingsHost.decls a page at a time) (#2434)
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 14s
CI / Workflow lint (actionlint) (pull_request) Successful in 33s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 31s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 42s
Third-party parts / As their notes say (pull_request) Successful in 42s
PR description / Title and description (pull_request_target) Successful in 51s
CI / Website build and checks (pull_request) Failing after 56s
CI / What the change needs (pull_request) Successful in 1m38s
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Failing after 3m6s
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Failing after 4m9s
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Successful in 51s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Failing after 2m9s
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Failing after 5m32s
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Failing after 5m50s
CI / longshot-builder end to end (synthetic game) (pull_request) Successful in 13m32s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Successful in 17m12s
1d112880b0
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
fix(menu): the microphone test runs again: the game tells the renderer the menu's page (LS_ACTION_PAGE) (#2434)
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 11s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 24s
CI / Workflow lint (actionlint) (pull_request) Successful in 25s
Third-party parts / As their notes say (pull_request) Successful in 27s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 29s
PR description / Title and description (pull_request_target) Successful in 32s
CI / Website build and checks (pull_request) Failing after 41s
CI / What the change needs (pull_request) Successful in 1m15s
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Failing after 4m31s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Successful in 5m5s
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Failing after 6m46s
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Successful in 45s
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Failing after 7m33s
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Failing after 8m29s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Failing after 9m17s
CI / longshot-builder end to end (synthetic game) (pull_request) Successful in 14m10s
ef230424cb
MKWVK 77 took the rows' reads off the API, and with them the only thing that set the
renderer's page_read: menu_on_tab("audio") was false from then on, so mic_test_tick
stopped the test the frame it started (Test microphone did nothing; boot's mic check).
settingsHost.rows now tells the renderer the page of the rows it reads, when it moves.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The fake host's CPU clocks are the test's own, so scriptTime counted ticks: system/menu's cost test passed at 0.02 ms
while the game spent 4 to 8 ms in the same flush. The runtime now also counts each call's time on the real clock
(ModStats::frame_real_ns), which mod test's scriptTime reads; the game's budgets are unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
json::check read the batch as parse does, every string, array and object made and dropped, before serde read it
again: on a page's first flush that was the larger half of the commit's time (0.9 ms of a 50 KB batch). It now
judges the text alike, by the same rules and at the same places, keeping only an object's keys where a key twice is
refused.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Measured in mod test (the inspector's open page: hostProps about 6 us a node, flatten and place about 2 us a parent):
- styleRef takes one id with no array or closure made; holdStyles stops at once when a node names the styles it did;
- a frozen style definition's canonical text is kept by the object (the kit's Row, Column, Grid, Progress and Spacer
  styles are made once by their values and frozen), so it is not written again each render;
- reconcile keeps the children in place with no map when their keys and types are as before, and flatten's set of
  keys is one set, cleared;
- a Text's text is checked by one regular expression, the character walk only for text with a NUL or a surrogate;
- props loops by index, not by iterator.
Behaviour is unchanged: the same ops, in the same order.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
mergeLogs made a row for every line of every mod and sorted them all, four times a second (5 ms with 36 mods of 50
lines): it now takes the newest LOG_LINES from the ends of the mods' lists, the same lines in the same order (a log
out of frame order is still sorted). A bar's fill width is one of 101 frozen styles, not an object written anew.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
A page built whole (the menu's tab, the inspector opening: 300 to 500 nodes) took 5 to 16 ms of one UI flush, past
the 5 ms a callback may. The reconciler now stops rendering once a flush has rendered for SLICE_MS (2, the clock's
whole ms): a component still to render (made, or given new props) renders at the next flush, its nodes as they were
till then, what was left rendered first and in its order (a page's top first). Each flush renders at least one fiber;
the commit follows the render as before. docs/modding/ui.md says so.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
inspect() and each mod's logs() (about 1.2 ms and 1.4 ms with 36 mods) ran inside the render, so in the flush's
budget. They are read every 0.25 s in the timer's own callback now, the logs only of the mods the page shown needs; a
mod chosen since is read when it is drawn.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
test(mods): the cost tests' ceilings on the real clock, and the menu's tests wait for a page drawn over a few frames (#2434)
Some checks failed
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Website / Website on Cloudflare (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 9s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 21s
CI / Workflow lint (actionlint) (pull_request) Successful in 22s
Third-party parts / As their notes say (pull_request) Successful in 25s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 28s
PR description / Title and description (pull_request_target) Successful in 40s
CI / Website build and checks (pull_request) Failing after 40s
CI / What the change needs (pull_request) Successful in 1m15s
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Failing after 4m24s
CI / longshot-builder end to end (synthetic game) (pull_request) Successful in 3m42s
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Successful in 36s
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Failing after 6m48s
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Failing after 7m17s
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Failing after 8m26s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
49d1ff4ba1
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
chore(menu): log each renderer button press ("menu: the button <key> pressed") so tests can prove a press acted (#2434)
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 11s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 26s
CI / Workflow lint (actionlint) (pull_request) Successful in 26s
Third-party parts / As their notes say (pull_request) Successful in 26s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 30s
PR description / Title and description (pull_request_target) Successful in 1m6s
CI / What the change needs (pull_request) Successful in 1m15s
CI / Website build and checks (pull_request) Failing after 1m12s
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Failing after 5m37s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Failing after 5m23s
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Failing after 7m16s
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Successful in 57s
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Failing after 7m57s
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Failing after 8m33s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Failing after 10m16s
CI / longshot-builder end to end (synthetic game) (pull_request) Successful in 15m30s
59020a945a
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The menu's first open read the declarations, laid them out and read and drew the page's rows in one frame: 3.8 to
5.7 ms of CPU, past the 2 ms frame warning, 200 and more of them longshot/i18n lookups. The rows are now read and
drawn at the frame after the declarations' read, and every text (with its values) is looked up once until the
language changes (host.tr, which main.tsx draws with), the language read once a frame of the open menu.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Switching to the Log tab read every mod's logs and merged them in the UI flush (7 to 10 ms with 36 mods); read in one
callback, they would be as much there. The timer's read (four a second) now reads six mods' logs at most, those not
read yet first, then in turn, keeps the rest from the reads before, and merges them for the tab's mod and level; a
tab, mod or level switched to shows its lines at the next read (paused, they are still read and merged as it draws).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The tab's draw looked up fifty texts or more through longshot/i18n each time, and a read of the list was drawn in its
own frame: 2.2 to 2.9 ms frames on the menu's first open, past the 2 ms frame warning. view.ts's t keeps each text
(with its values) until the language the tab draws in changes, and a read's answers are drawn at the next frame.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
perf(menu): a page switched to is drawn at the frame after its rows' read (#2434)
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 11s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 22s
CI / Workflow lint (actionlint) (pull_request) Successful in 24s
Third-party parts / As their notes say (pull_request) Successful in 25s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 30s
PR description / Title and description (pull_request_target) Successful in 37s
CI / What the change needs (pull_request) Successful in 1m12s
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Failing after 1m1s
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Failing after 1m35s
CI / Website build and checks (pull_request) Failing after 21s
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Failing after 5m8s
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Failing after 6m8s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Failing after 7m3s
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Successful in 35s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Failing after 10m44s
CI / longshot-builder end to end (synthetic game) (pull_request) Successful in 16m31s
43db281097
The menu's first open still ran 2.7 ms in the frame that read the page's rows and drew them. The rows of a page
switched to (or of the first) are now read in one frame and drawn at the next; a row that changes on the page shown is
drawn in the frame it is read, as before.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
fix(menu): take the Output resolution of the start when the game's first snapshot comes after menu_init (#2434)
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 17s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 36s
CI / Workflow lint (actionlint) (pull_request) Successful in 38s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 50s
Third-party parts / As their notes say (pull_request) Successful in 49s
PR description / Title and description (pull_request_target) Successful in 1m7s
CI / What the change needs (pull_request) Successful in 2m30s
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Failing after 7m2s
CI / Website build and checks (pull_request) Failing after 40s
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Failing after 5m44s
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Failing after 4m8s
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Failing after 4m13s
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Successful in 1m5s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Failing after 15m18s
CI / longshot-builder end to end (synthetic game) (pull_request) Successful in 18m41s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Failing after 25m40s
9528a50d9d
The output_size applier took the start's size only in menu_init's start pass. When the game's first snapshot reaches
the renderer after menu_init there is none, so a size of the player's own (output_res=1024x576) never became
custom_output: the capabilities listed no such size and the game read the Output resolution as the game's own while it
ran at 1024x576. Take it once, at the first snapshot, and sync the started size and shape as menu_init does.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
fix(settings): a new install's Output resolution is the start's, so closing the menu asks no restart for it (#2434)
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 24s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 45s
CI / Workflow lint (actionlint) (pull_request) Successful in 37s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 39s
Third-party parts / As their notes say (pull_request) Successful in 51s
PR description / Title and description (pull_request_target) Successful in 1m42s
CI / What the change needs (pull_request) Successful in 3m35s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Has been cancelled
CI / longshot-builder end to end (synthetic game) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
d9a9cfa675
With no output_res line the start snapshot holds 0x0, and the renderer's menu_init hands back the size the host
started at (2560x1440): the restart question then saw the Output resolution changed since the start, held every close
of the menu for its question (Insert only asked it: keys debug-key) and asked it after any change (rq). The first size
the renderer hands back when the file chose none is now the start's, for the question and the preview.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
<!-- Suggested PR title:
perf(vk): cut AMD FSR 4 INT8 Lite dispatch time 27-33% (+5-11% FPS, +32% 1% low at 33% scale) on AMD LLPC GPUs via direct unroll and selective Wave64
-->

## Summary

On AMD Windows LLPC GPUs (RDNA 3 / 3.5 / 4) running AMD FSR 4.1.2's **INT8 Lite** model — including integrated GPUs like the Radeon 860M where INT8 Lite stands in (`g_standin`), Strix Point APUs where INT8 Lite is native, and AMD GPUs where the player forces Lite via the menu or `RX_VK_FSR4_MODEL=lite` — FSR 4 shader tuning did not accelerate INT8 Lite on `main` or on open PR #1999 alone:

1. `make_context()` suppressed tuning (`suppress = true`) whenever INT8 Lite stood in or was forced (`lite && native_model() != MODEL_LITE`), leaving all passes on stock `AMD's shaders`.
2. Even when tuning was enabled, copying Function-scope constant weight arrays into a writable storage-buffer tail (`arrays_to_buffer`) regressed by `+1.4–2.4 ms` on AMD's Windows LLPC compiler, and INT8 Lite's smaller scratch buffer (`<= 64 MiB`) skipped `Big` buffer creation anyway so `kind & 2` was never set to feed the unroller.
3. On AMD LLPC, forcing INT8 Lite's rolled `pass2` to Wave64 regressed (`+335 us`), whereas running `postpass` at Wave64 (`fsr4_postpass_wave64`) helped and unrolling `pass2` at Wave32 + `postpass` at Wave64 delivered the fastest schedule.
4. `fsr4_compact_builds` was limited to AMD's older RDNA 1/2 proprietary compiler (at `1 GiB` headroom), leaving LLPC systems at an `8 GiB` commit-headroom requirement even though compact folded passes (`<= 60k` words) peak under `60 MB` of compile RAM.

**Stack / Dependency Note:** This branch builds on open PR #1999 by `@madebyjordan` (cherry-picking `09345da7` and `64318392` with original authorship preserved as `e3a1aa49` and `e0aa6e05`), which introduces the expanded constant-folding SPIR-V unroller (`spirv_unroll.h`) and postpass unrolling. On top of #1999, this PR:

- **Splits compiler-specific FSR 4 tuning policy in `gpu/vk/device_policy.h`:**
  - `fsr4_arrays_to_buffer`: on for AMD's older Windows proprietary shader compiler (RDNA 1/2, preserving #1999's RX 6700 XT behavior verbatim), off on AMD Windows LLPC (RDNA 3/3.5/4) and Linux RADV.
  - `fsr4_postpass_wave64`: on for AMD Windows LLPC, off on RDNA 1/2 proprietary and Linux RADV.
  - `fsr4_compact_builds`: on for both AMD Windows compilers (RDNA 1/2 proprietary and RDNA 3/3.5/4 LLPC), lowering `kCompactHeadroom` for compact folded passes (`<= 60k` words) to `256 MiB` while keeping `8 GiB` everywhere else.
  - Non-AMD GPUs (`NVIDIA`, `Intel`) keep `fsr4_tune = false` and remain completely untouched.
- **Adds direct unrolling without a storage-buffer tail (`gpu/vk/fsr4_tune.h`, `gpu/vk/vk_fsr4.cpp`):**
  - `fsr4_tune::has_const_arrays()` detects eligible Function-scope constant `uint` weight arrays without requiring a writable storage-buffer tail (`kind & 4`), allowing `spirv_unroll.h` to fold constant tables directly into immediates from AMD's original SPIR-V.
  - `fsr4_tune::wants_wave64(entry, postpass_wave64, lite)` runs `postpass` at 64 lanes on LLPC and keeps INT8 Lite's `pass2` at 32 lanes.
  - `make_context()` lifts tuning suppression for AMD INT8 Lite (stand-in, forced, and native) while still honoring `RX_VK_FSR4_TUNE=0` and non-AMD `fsr4_tune=false`.
  - `tune::begin_context()` clears stale `cur` before context creation (and on Lite-refused fallback retry) so an `Auto -> Lite` model switch on RDNA 1/2 (`fsr4_arrays_to_buffer=1`) never rewrites Lite's shaders against an older live Auto context's `> 64 MiB` `Big` buffer while `temporal_later` drains.
  - `create_compute_pipelines()` keeps the non-4.1.2 legacy unroller (`expanded_unroll == false`) strictly layer-only (`is_layer_pass(entry)`) even when `postpass_wave64` sets `kind & 1` on `postpass`.

**What a player notices:**
- On AMD RDNA 3 / 3.5 integrated GPUs using FSR 4 INT8 Lite (such as Radeon 860M), FSR 4 upscaling runs **27–33% faster** (`-1.06` to `-2.25 ms` per frame), lifting gameplay frame rates by **+5.0% to +11.3%** (and **+32.4% 1% lows** at `33% render scale`) with visually indistinguishable output and zero extra VRAM usage.
- On systems with tight free commit memory, compact folded FSR 4 passes (`<= 60k` words, `< 60 MB` compile RAM) now unroll with `256 MiB` spare commit headroom instead of staying rolled below `8 GiB`, and save into `cache/longshot_fsr4_pipelines.bin` (`~231 KiB`) across game updates.

**Helps:**
- Players on AMD RDNA 3 / 3.5 / 4 Windows LLPC GPUs running AMD FSR 4.1.2 INT8 Lite (stand-in, native, or forced) or other FSR 4 models benefiting from tail-free direct unrolling, Wave64 postpass, and `256 MiB` compact headroom.
- Players on AMD RDNA 1/2 Windows GPUs using forced INT8 Lite or running with `< 1 GiB` free commit memory.

**No measurable impact:**
- NVIDIA and Intel GPUs (`fsr4_tune = false`, hooks never installed).
- Players not using AMD FSR 4, or running with `RX_VK_FSR4_TUNE=0` (clean fallback to stock `AMD's shaders`).
- RDNA 1/2 proprietary Windows `Auto` (Navi 2 INT8) keeps identical `fsr4_arrays_to_buffer=1`, `fsr4_postpass_wave64=0`, and expanded-unroller behavior vs #1999.

Builds on #1999 (credit: `@madebyjordan`).

Files to read first:
- `gpu/vk/device_policy.h`: `fsr4_arrays_to_buffer`, `fsr4_postpass_wave64`, and `fsr4_compact_builds` policy rules and `vk: policy:` logging.
- `gpu/vk/fsr4_tune.h`: `wants_wave64(entry, postpass_wave64, lite)` and `has_const_arrays()`.
- `gpu/vk/vk_fsr4.cpp`: direct-unroll candidate marking (`kind & 4`), `tune::begin_context()`, per-pipeline `orig_lanes[i]`, legacy layer-only guard, `kCompactHeadroom = 256 MiB`, and `make_context()` suppression lift.
- `docs/dev/reference/upscalers.md`: updated compiler policy and INT8 Lite stand-in tuning documentation.
- `tests/test_device_policy.py`, `tests/test_fsr4_bind_dispatch.py`, `tests/test_fsr4_tune.py`: game-free coverage for all policy matrices, direct unroll, selective Wave64, `256 MiB` headroom boundary, `Auto -> Lite` `begin_context()` isolation, and `!expanded_unroll` postpass guard.

## Testing

**Tested:**
- **Hardware & environment:** Windows 11 (build 26200), AMD Ryzen AI 7 350 (`znver5`, 8C/16T), AMD Radeon(TM) 860M Graphics (8 CUs, RDNA 3.5 iGPU, `1002:1114`, 6 GB VGM / 12,212 MB allowed VRAM), Adrenalin 26.10.1 (`LLPC`), FSR SDK 2.4 (`amd_fidelityfx_upscaler_vk.dll` 4.1.2.4555, SHA-256 verified), INT8 Lite stand-in (`RX_VK_FSR4=1`), FG Off, Uncapped, VSync Off, `RX_VK_PRECOMPILE=1`, `RX_VK_PASS_TIMING=1`.
- **In-game interleaved release-speed A/B (`29` total runs, `0` `VK_ERROR_DEVICE_LOST`, `0` crashes, `0` dispatch failures):**
  - Market (`market-entrance`, `1680x1048`, `67% render scale`, 3 interleaved rounds): `fsr4 ffxDispatch` `6.743 -> 4.492 ms` (`-2.251 ms` / `-33.4%`), GPU `in all` `23.93 -> 20.14 ms` (`-15.8%`), Mean FPS `32.54 -> 36.21` (`+11.3%`).
  - Market (`market-entrance`, `1680x1048`, `33% render scale`, 2 interleaved rounds): `fsr4 ffxDispatch` `6.523 -> 4.737 ms` (`-1.786 ms` / `-27.4%`), GPU `in all` `19.55 -> 17.71 ms` (`-9.4%`), Mean FPS `37.31 -> 41.48` (`+11.1%`), 1% low `19.00 -> 25.17` (`+32.4%`).
  - Hyrule Field (`castle-gate`, `1680x1048`, `67% render scale`, 2 interleaved rounds): `fsr4 ffxDispatch` `6.397 -> 4.399 ms` (`-1.998 ms` / `-31.2%`), GPU `in all` `23.77 -> 22.35 ms` (`-6.0%`), Mean FPS `33.52 -> 35.81` (`+6.8%`).
  - Market (`market-entrance`, `1280x720`, `67% render scale`, 2 interleaved rounds): `fsr4 ffxDispatch` `3.609 -> 2.545 ms` (`-1.064 ms` / `-29.5%`), GPU `in all` `18.81 -> 16.96 ms` (`-9.8%`), Mean FPS `41.30 -> 43.38` (`+5.0%`).
  - Every tuned run logged `passes unrolled by the expanded unroller (direct, no buffer tail); a compact build wants 256 MiB of memory to spare`, `model: Lite (...), tuned`, `64 lanes wide (1 so far)`, and `unrolled=2` (`postpass` `17799 -> 42598 words`, `pass2` `21112 -> 44759 words`; `pass1` cleanly `left rolled`).
- **Control & safety probes:**
  - `#1999`-only (`e0aa6e05`, Market `1680x1048`, `67% render scale`): stayed on `AMD's shaders` (`0` unrolled, `6.613 ms` vs stock `6.695 ms`).
  - Kill-switch (`RX_VK_FSR4_TUNE=0`): clean fallback to `AMD's shaders` (`0` unrolled, `6.862 ms`, `32.70 FPS` — stock parity).
  - Cold compile & RAM: `0.49–0.92 s` rebuilding `cache/longshot_fsr4_pipelines.bin` (`236,868 B` / `231.3 KiB`, `RX_VK_PCACHE_LOAD=0` skips read/save cleanly), `1.78 s` on empty `AMD\VkCache`, `+57.8 MiB` Private RAM / `+85.2 MiB` WS during `build_unrolled` (overall peak `14,828 MiB` < stock `15,489 MiB`).
  - Lossless visual diff (`1680x1048`, `67% render scale`, Market static spawn, `RX_VK_SHOT_MENU=0`, direct PNG inspection): `0` artifacts, NaNs, or color shift; median abs RGB delta `0.00 / 255` (`42.26%` exact `0`, `84.61%` `<= 1` LSB, `89.73%` `<= 2` LSB), MAE `1.37 / 255` (`0.54%`), PSNR `32.79 dB`, per-channel mean drift `<= 0.05 / 255`.
- **Game-free checks:**
  - New/updated tests failed before the implementation on #1999 (`e0aa6e05`) and pass at `f8253663` under both `clang++` and `g++`: `tests/test_device_policy.py` (25 PCs / 77 fields), `tests/test_fsr4_bind_dispatch.py` (including direct unroll, `256 MiB` boundary, `Auto -> Lite` `begin_context()`, and `!expanded_unroll` + `postpass_wave64` guard), `tests/test_fsr4_own_cache.py`, `tests/test_fsr4_prepare_model.py`, `tests/test_fsr4_models.py`, `tests/test_doc_anchors.py`, `tests/test_switch_table.py`, and `tests/test_fsr4_tune.py` (run with both `clang++` and `g++` for C++ compile, `has_const_arrays`, selective `wants_wave64`, SPIR-V VM parity, and `source_problems()`).
  - `scripts/check_third_party.py`: `17 parts as their notes say`.
  - Full `python -I -B tests/run_all.py --strict --jobs 12` (canonical path, Windows): **901 passed, 28 failed, 50 skipped** (`340 s`), with `0` regressions introduced by this PR: 27/28 failures reproduce identically on clean `forge/main` (`test_amd_subgroup_profiles`, `test_auto_handheld`, `test_crash_dialog`, `test_crt_options`, `test_dev_ab`, `test_dev_build`, `test_dev_migrate`, `test_dev_packs`, `test_flat_map`, `test_game_menu_mouse_buttons`, `test_input_movie`, `test_linux_preflight`, `test_menu_text_field`, `test_pads_after_menu`, `test_perf_report`, `test_pipeline_share`, `test_portable_builder_home`, `test_portable_builder_startup`, `test_rdna2_mesh_only`, `test_readback_timeout_source`, `test_rumble_menu`, `test_sampler_admission`, `test_sdiv_overflow`, `test_shader_profile_caps`, `test_target_image_reuse`, `test_vibration_menu`, `test_vram_compact`), and the 28th (`test_fsr4_tune.py`) fails Windows `--strict` only for `not found: spirv_val` (upstream #1999 commit `e3a1aa49` removed the Windows `RUN_ALL_SKIP`; Linux CI runs `test_fsr4_tune.py` with `spirv-val`).

**How to test:**
1. On an AMD Windows LLPC GPU (e.g. Radeon 860M / 880M / 890M, RX 7000, or RX 9000) with FSR SDK 2.4 (`amd_fidelityfx_loader_vk.dll` + `amd_fidelityfx_upscaler_vk.dll` 4.1.2) beside the binary, set `RX_VK_FSR4=1` and `RX_VK_PASS_TIMING=1` (and `RX_VK_FSR4_MODEL=lite` if the GPU defaults to Auto FP8/INT8 Full).
2. Load `market-entrance` at `1680x1048`, `67% render scale`, walk straight forward ~5 s (`0:LUP/5000`) to the central fountain before panning, and confirm `longshot_log.txt` logs `passes unrolled by the expanded unroller (direct, no buffer tail); a compact build wants 256 MiB of memory to spare`, `model: Lite (...), tuned`, `tuned fsr4_model_v07_fp8_no_scale_postpass: its loops unrolled`, and `tuned fsr4_model_v07_fp8_no_scale_pass2: its loops unrolled`.
3. Compare `fsr4 ffxDispatch (AMD's passes)` and Mean FPS against `RX_VK_FSR4_TUNE=0` (or `main`), verifying ~27–33% lower FSR 4 dispatch time and clean fallback to `AMD's shaders` when `RX_VK_FSR4_TUNE=0`.

**Still to test:**
- Tier 1 AMD RDNA 1/2 Windows proprietary compiler (e.g. RX 6700 XT / RX 6600): verify `fsr4_arrays_to_buffer=1`, `fsr4_postpass_wave64=0`, `fsr4_compact_builds=1` preserve #1999 Auto performance and cleanly survive live Insert menu `Auto -> Lite` switching without artifacts or device loss (@Beanstalk test, or by hand)
- Tier 1 AMD RDNA 3/4 Windows LLPC discrete GPUs (RX 7900 XTX INT8 Full, RX 9070 XT FP8 & forced INT8 Lite): verify `fsr4_arrays_to_buffer=0`, `fsr4_postpass_wave64=1`, `fsr4_compact_builds=1` speed, cold compile time, and visual parity (@Beanstalk test)
- Tier 2 AMD Strix Point / Strix Halo Windows LLPC APUs (Radeon 880M/890M native INT8 Lite, Radeon 8060S INT8 Full): verify `fsr4 ffxDispatch` speedup and visual parity (@Beanstalk test)
- Tier 1 Linux AMD RADV (RX 6700 XT / RX 7900 XTX / RX 9070 XT / Steam Deck with `amd_fidelityfx_upscaler_vk.so`): verify `fsr4_arrays_to_buffer=0`, `fsr4_postpass_wave64=0`, `fsr4_compact_builds=0` (`8 GiB`) and Linux CI `tests/test_fsr4_tune.py` with `spirv-val` (@Beanstalk test)
- Tier 1 Non-AMD GPUs (NVIDIA RTX / Intel Arc with FSR 4 stand-in): verify `fsr4_tune=0` remains untouched (`AMD's shaders`) (@Beanstalk test)

## Measurements

**Verdict:** Cuts AMD FSR 4.1.2 INT8 Lite `fsr4 ffxDispatch` GPU time by **-27.4% to -33.4%** (`-1.064` to `-2.251 ms`), cuts total GPU frame time `in all` by **-6.0% to -15.8%**, lifts Mean FPS by **+5.0% to +11.3%** across all 4 tested scenes/resolutions with zero round overlap, and lifts 1% low FPS by **+32.4%** at `33% render scale` (`1680x1048`) on AMD Radeon 860M (Adrenalin 26.10.1 LLPC). Cold unroll build stays well below limits (`0.49–0.92 s` with warm driver cache / `1.78 s` empty `AMD\VkCache`, `+57.8 MiB` Private RAM during `build_unrolled`, `231.3 KiB` cache file), visual output is lossless-parity (`84.61%` of pixels `<= 1` LSB, `0` artifacts), and `RX_VK_FSR4_TUNE=0` cleanly restores stock parity.

Setup: Windows 11 (build 26200), AMD Ryzen AI 7 350, AMD Radeon(TM) 860M Graphics (8 CUs, RDNA 3.5 iGPU, 6 GB VGM), Adrenalin 26.10.1 (`LLPC`), FSR SDK 2.4 (FSR 4.1.2 INT8 Lite via `RX_VK_FSR4=1`), FG Off, Uncapped, VSync Off, `RX_VK_PRECOMPILE=1`, `RX_VK_PASS_TIMING=1`, `>= 12.5 s` post-load settle, scripted 15 s drive (`0:LUP/5000`, `0:RRIGHT/5000`, `0:RLEFT/5000`), strictly interleaved rounds (`Before -> After`), medians reported. *(The stock `main` binary was built at `8aa5ab87`; the sole intervening commit to current merge-base `ef280956` is #2429, which edits only `.forgejo/` CI workflows, CI docs, and `scripts/ci_secret.sh` with zero `gpu/`/`host/`/`nx2/` changes. The PR binary was built at `bd27181b`; follow-up commit `f8253663` only adds `tune::begin_context()` for RDNA 1/2 `Auto -> Lite` switches, the non-4.1.2 legacy unroller postpass guard, and `has_const_arrays()` malformed-SPIR-V bounds checks, leaving the measured AMD LLPC FSR 4.1.2 path behaviorally identical.)*

**Where it makes a difference (interleaved medians on AMD Radeon 860M LLPC, FSR 4.1.2 INT8 Lite):**

| Metric | Before: main @ 8aa5ab87 | After: this PR @ f8253663 | Delta |
|---|---:|---:|---:|
| **Market (`market-entrance`), `1680x1048`, `67% render scale` (`1120x699 -> 1680x1048`, 3 rounds):** | | | |
| `fsr4 ffxDispatch` GPU time | 6.743 ms | 4.492 ms | -2.251 ms (-33.4%) |
| GPU `in all` frame time | 23.93 ms | 20.14 ms | -3.79 ms (-15.8%) |
| Mean FPS | 32.54 | 36.21 | +3.67 (+11.3%) |
| **Market (`market-entrance`), `1680x1048`, `33% render scale` (`560x350 -> 1680x1048`, 2 rounds):** | | | |
| `fsr4 ffxDispatch` GPU time | 6.523 ms | 4.737 ms | -1.786 ms (-27.4%) |
| GPU `in all` frame time | 19.55 ms | 17.71 ms | -1.84 ms (-9.4%) |
| Mean FPS | 37.31 | 41.48 | +4.16 (+11.1%) |
| 1% low FPS | 19.00 | 25.17 | +6.17 (+32.4%) |
| **Hyrule Field (`castle-gate`), `1680x1048`, `67% render scale` (`1120x699 -> 1680x1048`, 2 rounds):** | | | |
| `fsr4 ffxDispatch` GPU time | 6.397 ms | 4.399 ms | -1.998 ms (-31.2%) |
| GPU `in all` frame time | 23.77 ms | 22.35 ms | -1.42 ms (-6.0%) |
| Mean FPS | 33.52 | 35.81 | +2.30 (+6.8%) |
| **Market (`market-entrance`), `1280x720`, `67% render scale` (`854x480 -> 1280x720`, 2 rounds):** | | | |
| `fsr4 ffxDispatch` GPU time | 3.609 ms | 2.545 ms | -1.064 ms (-29.5%) |
| GPU `in all` frame time | 18.81 ms | 16.96 ms | -1.84 ms (-9.8%) |
| Mean FPS | 41.30 | 43.38 | +2.08 (+5.0%) |

*(Per-round `fsr4 ffxDispatch` ms — zero overlap in any condition: Market `1680x1048` 67% Stock `6.792, 6.671, 6.743` vs PR `4.546, 4.492, 4.457`; Market `1680x1048` 33% Stock `6.454, 6.592` vs PR `4.738, 4.736`; Hyrule `1680x1048` 67% Stock `6.392, 6.402` vs PR `4.336, 4.462`; Market `1280x720` 67% Stock `3.596, 3.622` vs PR `2.514, 2.577`.)*

**Where it does NOT make a difference (within run-to-run variance) & control checks:**

| Metric | Before: main @ 8aa5ab87 | After: this PR @ f8253663 | Delta |
|---|---:|---:|---:|
| Market `1680x1048`, `67% render scale` — 1% low FPS | 18.54 | 19.05 | +0.51 (+2.8%) |
| Market `1680x1048`, `67% render scale` — VRAM usage | 3,578 MB | 3,546 MB | -32 MB |
| Market `1280x720`, `67% render scale` — 1% low FPS | 22.41 | 22.60 | +0.20 (+0.9%) |
| Market `1280x720`, `67% render scale` — VRAM usage | 3,311 MB | 3,263 MB | -48 MB |
| Market `1680x1048`, `33% render scale` — VRAM usage | 3,498 MB | 3,386 MB | -112 MB |
| Hyrule Field `1680x1048`, `67% render scale` — VRAM usage | 2,998 MB | 3,062 MB | +64 MB |
| Hyrule Field `1680x1048`, `67% render scale` — 1% low FPS* | 22.66 | 18.12 | -4.54 (-20.0%)* |
| `#1999`-only (`e0aa6e05`, `0` unrolled, Market `1680x1048`, `67% render scale`) — `fsr4 ffxDispatch` | 6.695 ms | 6.613 ms (`#1999`-only) | -0.082 ms (-1.2%) |
| Kill-switch (`RX_VK_FSR4_TUNE=0`, Market `1680x1048`, `67% render scale`) — `fsr4 ffxDispatch` | 6.743 ms | 6.862 ms (`TUNE=0`) | +0.119 ms (+1.8%) |

*\*Hyrule Field R1 1% low was at parity (`22.81` vs `22.33`); R2 `13.43` was caused by an unrelated ASTC streaming burst (`astc_flush_ms=31.8 ms`, `uploads=28`, `pipe_waits=0`) from walking slightly farther during `0:LUP/5000` at higher FPS.*

**Secondary costs (cold compile, cache size, RAM, visual parity):**
- **Cold unroll build (`pass2` `21112 -> 44759` words + `postpass` `17799 -> 42598` words):** `0.49–0.92 s` rebuilding `cache/longshot_fsr4_pipelines.bin` with a warm AMD driver cache (`0.92 s` under `RX_VK_PCACHE_LOAD=0` which skips read/save cleanly); `1.78 s` on an empty `AMD\VkCache` on the same Radeon 860M (`0.97 s pass2 + 0.81 s postpass`).
- **Cache size & compile RAM:** `cache/longshot_fsr4_pipelines.bin` = `236,868 B` (`231.3 KiB`). Process memory delta across `build_unrolled` = `+57.8 MiB` Private / `+85.2 MiB` WS; overall peak Private `14,828 MiB` stayed below stock `15,489 MiB`.
- **Visual diff (lossless PNG, Market static spawn `1680x1048` `67% render scale`, `RX_VK_SHOT_MENU=0`):** `0` artifacts/NaNs/color shift; median abs RGB delta `0.00 / 255` (`42.26%` bit-exact `0`, `84.61%` `<= 1` LSB, `89.73%` `<= 2` LSB), MAE `1.37 / 255` (`0.54%`), PSNR `32.79 dB`, channel means `[67.39, 51.75, 55.78]` vs `[67.43, 51.80, 55.79]` (`<= 0.05` drift; max `176` on wind-animated bunting/Navi across the frame-timestamp offset).

**Verbatim `longshot_log.txt` excerpt (Market `1680x1048`, `67% render scale`, this PR):**
```text
[hos host] vk: policy: can and measured: mirrors=0 import_chunk=16 MB ub_snapshot=0 split_ub_flush=1 native_float_add=1(seen on AMD 0x8001a0) warp64=1 batch_submits=0 mma_unroll_try=0 global_table_loop=0 occ_copy=0 intel_side_by_side_auto=0 fsr4_tune=1 fsr4_arrays_to_buffer=0 fsr4_postpass_wave64=1 fsr4_compact_builds=1 gpu_clock_peak=0 readback_late_newest=0 acquire_ahead=1 pcache_small_pc=0 bc_small_runs=1
[hos host] vk: AMD FSR 4: passes unrolled by the expanded unroller (direct, no buffer tail); a compact build wants 256 MiB of memory to spare
[hos host] vk: AMD FSR 4: model: Lite (INT8, standing in: AMD lists no FSR 4 model for this GPU), tuned
[hos host] vk: AMD FSR 4: the unrolled layers' pipeline cache: read
[hos host] vk: AMD FSR 4: tuned: its network's layers run 64 lanes wide (1 so far)
[hos host] vk: AMD FSR 4: fsr4_model_v07_fp8_no_scale_pass1 left rolled (2 loops kept: unrolled whole it would pass 120000 words, or they cannot be)
[hos host] vk: AMD FSR 4: tuned fsr4_model_v07_fp8_no_scale_postpass: its loops unrolled (17799 -> 42598 words), bound in its place from now (0.24 s from the caches)
[hos host] vk: AMD FSR 4: tuned fsr4_model_v07_fp8_no_scale_pass2: its loops unrolled (21112 -> 44759 words), bound in its place from now (0.40 s from the caches)
[hos Presentation Thread] vk:   20.14 ms a frame in all (recordings' command buffers + upload command buffers; the present's blit to the window is not timed; the 'GPU time' line of an unprofiled run counts the first kind only)
[hos Presentation Thread] vk:   m   4.538 ms     1.0 x   4545.8 us       1.0 items    0.00 MB  fsr4 ffxDispatch (AMD's passes)
```

## Risks

- **Escape hatch:** Setting `RX_VK_FSR4_TUNE=0` in `longshot_env.txt` disables all FSR 4 tuning hooks completely (`AMD's shaders`), verified to restore stock parity. Reverting the commit cleanly restores #1999 behavior.
- **Untested Tier 1 AMD models & drivers (pre-merge gate):** `fsr4_arrays_to_buffer=0`, `fsr4_postpass_wave64=1`, and `fsr4_compact_builds=1` apply to all AMD Windows LLPC GPUs (RDNA 3/3.5/4), including discrete RX 7000 (`INT8 Full`) and RX 9000 (`FP8` / forced `INT8 Lite`), and Linux RADV now skips `arrays_to_buffer` (`fsr4_arrays_to_buffer=0`, keeping `8 GiB` headroom). Cooperative-matrix/subgroup shaders remain protected by `!lane_dep` on both Wave64 and direct unroll, and `Still to test` lists Test Farm runs on RX 6700 XT, RX 7000/9000 LLPC, Strix Point/Halo, Linux RADV, and non-AMD GPUs before merge.
- **RDNA 1/2 `Auto -> Lite` switching:** `tune::begin_context()` clears `cur = 0` before each context creation (leaving existing `bigs` intact for in-flight dispatches) so forced Lite's `<= 64 MiB` scratch buffer never attaches to an older live Auto context's `Big` tail.
- **Pipeline cache & cold compile:** Unrolled pipelines are stored in `cache/longshot_fsr4_pipelines.bin` (`~231 KiB`, independent of the translator's cache, validated by GPU/driver UUID and keyed by Vulkan driver state including SPIR-V bytecode and `requiredSubgroupSize`). First-time cold unroll on empty driver cache takes `~1.8 s` on Radeon 860M and peaks at `+57.8 MiB` Private RAM (`256 MiB` commit headroom gate); `RX_VK_PCACHE_LOAD=0` skips reading and saving the file. No saves, `longshot_options.ini`, or renderer ABI (`MKWVK_API_VERSION`) are changed.
- **Merge order:** Stacked on open PR #1999 (`@madebyjordan`); merge after #1999 (or rebase once #1999 lands).

## Checklist

### Ready for review

- [x] One topic, on current `main`; the title is a Conventional Commit.
- [x] Tested on my own PC, in the game for a change the game runs, as Testing says.
- [x] `mise run test` passes (any failure that also fails on `main` is named).
- [x] Measured against `main`, or Measurements says why there is nothing to measure.
- [x] No game files, build output or hand-edited generated files; `third_party/` untouched; nothing GPL-incompatible.

### When it applies

- [x] A fix: a game-free test that fails on `main` and passes here.
- [x] A check under `tests/` that reads changed source is updated, not weakened.
- [x] Host code builds on Windows (llvm-mingw) and Linux, with UTF-8 paths.
- [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.

Co-authored-by: Jordan <[email protected]>
Reviewed-on: #2495
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The question's buttons replaced the page in the hosted menu, which stays open: autoFocus is taken only as a window
opens, so the focus stayed on the row that was gone and Enter answered nothing (rq: Restart now never ran). A root
whose focused control is gone now gives the focus to its autoFocus control, and the restart's is Restart Now (the
preview's stays No).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The Insert menu's rows are Fields: a click on a row's name landed on its label, no control, and left the focus where
it was (pointer at 21:9 and 16:10: six clicks at x 517, the focus still on the Graphics tab). A click that hits no
control focuses the nearest enabled one to its right on the same line, within half the window's width; it is not
pressed or changed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
With the menu closed the hosted debug page has the input, and the UI took every key pressed from the window's queue for
it: mods_debug_keys never saw the page's key again, so K opened Enemy Names' page and K did not close it (keys
debug-toggle). The mods' debug keys stay in the queue while the menu is closed; with it open the menu's page takes
them (a Keybind listening).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
chore(mods): log an action pressed while the input is taken, its window's closeOn asked (#2434)
Some checks failed
PR description / Title and description (pull_request_target) Has started running
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 10m5s
CI / Workflow lint (actionlint) (pull_request) Failing after 10m11s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 14m56s
CI / Conventional Commit title (pull_request) Failing after 11m51s
CI / What the change needs (pull_request) Failing after 11m41s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Has been cancelled
CI / longshot-builder end to end (synthetic game) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
0ec8437b49
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The page's @back went with the page and the tab's rows had no control asking for the focus: it was lost (status focus
None), so a key walk stopped dead (recordings: Stop playback never reached). The link Back came from now asks for it
(autoFocus; About's too), and the UI gives the focus to an autoFocus control new in a root that has it, as it does when
a window opens.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
fix(mods): an action's key closes its window while it has the input, and a tap shorter than a frame presses it (#2434)
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 17s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 29s
CI / Workflow lint (actionlint) (pull_request) Successful in 35s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 40s
PR description / Title and description (pull_request_target) Successful in 1m5s
Third-party parts / As their notes say (pull_request) Successful in 41s
CI / What the change needs (pull_request) Successful in 2m34s
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Failing after 6m2s
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Failing after 4m29s
CI / Website build and checks (pull_request) Failing after 40s
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Failing after 5m15s
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Failing after 6m44s
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Successful in 59s
CI / longshot-builder end to end (synthetic game) (pull_request) Failing after 20m4s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Failing after 20m3s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Failing after 28m15s
d342b879e9
hos_key_down reads every key up while the player's input is taken, so the closeOn edge an action's key was to give a
mod's focused window never came: F8 opened the mod inspector and did not close it (keys inspector-f8, run 23). And an
action was its key held at a game frame: a press let go before the next frame read it (the control bridge's presses,
in one go; a quick tap) was lost, so F8 at times opened nothing (run 24). The host's key state is read as it is for
the close (hos_key_held), and a press latched by the host's window (hos_key_take_press, beside the menu's) counts as
one: pressed and released in that frame.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
E on a row switched the tab and the row went with its page: the focus was lost (status focus None), and the walk's
next key did nothing (recordings: Stop playback's walk). A root's focused control gone, and no autoFocus control in
it, gives the focus to its first control past a tab strip; the strip itself keeps it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The menu's start, the mod inspector's read again and the FPS counter's first frames failed on 43db2810 too, on a PC
paging (15.0, 9.7 and 5.7 ms against 8, 8 and 5): each was one frame's most, once. A switch, a start and a first
frame are now measured SAMPLES times after a warm-up and the least kept, a steady state by its median: a slow frame of
the PC's is left out, a real 2x slowdown is in every sample and still fails.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
fix(queue): two jobs of one name in one process get systemd scopes of their own (#2434)
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 16s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 32s
Third-party parts / As their notes say (pull_request) Successful in 33s
CI / Workflow lint (actionlint) (pull_request) Successful in 33s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 35s
PR description / Title and description (pull_request_target) Successful in 44s
CI / What the change needs (pull_request) Successful in 1m41s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Has been cancelled
CI / longshot-builder end to end (synthetic game) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
3924fb742a
A job's scope was named by its name and process alone. dev.py packs builder runs longshot-builder's compile as two jobs
in one process, and the first's scope lives on while an sccache server it started is in it: the second's systemd-run
failed ("Unit longshot-job-longshot-builder-<pid>.scope was already loaded"), and the build with it (three builds of
five here). The scope is named by when the job was queued too.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The sandbox granted the game folder's settings.toml alone, in place, while the game writes the file beside itself
(settings.toml.part) and moves it over: under the sandbox (on by default) nothing was ever saved without a launcher
profile. The file now lives in <game folder>/settings/ as it does in a profile's, the sandbox grants that folder on
Linux and Windows (never the file alone), a settings.toml or settings.ini beside the game is moved in once and the
game folder's longshot_options.ini copied in once.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
DocOptions::open took any read error for no file, then wrote converted old settings or the defaults over it. A file
that is not UTF-8 is now kept beside itself as settings.toml.unreadable (as one that is not TOML), and one that cannot
be read at all starts every setting at its default and is never written this run (said in the log).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
publish_host kept the two snapshots before the latest and freed older ones, while the host's C readers (HOS_SETTING,
nn_hid.c, rx_backend.c, settings_link::now) may still hold a pointer they read: a use after free. Every published
snapshot is now held for the run; one with the same values as a held one (but for its generation) is published again
rather than held twice, so the run holds one per distinct set of values (a few hundred bytes each).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
write_whole moved settings.toml.part over the file unflushed, so a power cut could leave an empty or old file; and the
ls-options writer thread and game_shutdown's flush (or the menu's save now) could write at once, sharing the .part
and moving an older text over a newer. The .part is now synced before the move and the move made durable (the folder
synced on Unix, MoveFileExW with MOVEFILE_WRITE_THROUGH on Windows), and a flush holds a lock from taking the text to
the move.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
docs(profiles): without a profile the settings are in the game folder's settings/ (#2434)
Some checks failed
Website / Website preview, upload (pull_request_target) Has been skipped
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 8s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 20s
CI / Workflow lint (actionlint) (pull_request) Successful in 20s
Third-party parts / As their notes say (pull_request) Successful in 25s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 30s
PR description / Title and description (pull_request_target) Successful in 39s
CI / What the change needs (pull_request) Successful in 1m22s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Has been cancelled
CI / longshot-builder end to end (synthetic game) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
72ec53c44e
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
A scripted run's unfocused window reads the input taken at every frame the control bridge holds no key, so every
action was marked waiting for a let-go and F8's inspector never opened.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
fix(mods): the key-press latch is taken whole once a frame, so a press is never kept and every action on a key sees it (#2434)
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 10s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 21s
CI / Workflow lint (actionlint) (pull_request) Successful in 21s
Third-party parts / As their notes say (pull_request) Successful in 25s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 28s
PR description / Title and description (pull_request_target) Successful in 33s
CI / What the change needs (pull_request) Successful in 1m20s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Has been cancelled
CI / longshot-builder end to end (synthetic game) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
c3790d8639
hos_key_take_press kept a press until its key was taken, and input_step returned before any take while no mod had
an action: an action made later fired at once for a key typed minutes before (into a text field, even). Its take was
an exchange too, so two actions on one key shared one press. hos_key_take_presses takes every key's presses at once,
and input_step takes them every frame, actions or none, and hands the frame's presses to every action.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
LsFrameStats' version, CPU, GPU and driver are a fingerprint of the PC that a mod with net:<origin> could send.
They move to stats.system(), under a permission of their own (medium, raw = true): the schema's new raw flag
replaces the hard-coded romfs.read/memory.read lists of the manifest check, its JSON Schema and together's raw_data,
so a mod holding it holds no way off the PC. The FPS counter asks for both.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
fix(ui): only the first presenting thread gets UI frames, so a second can never free the frame the first reads (#2434)
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 9s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 20s
CI / Workflow lint (actionlint) (pull_request) Successful in 21s
Third-party parts / As their notes say (pull_request) Successful in 23s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 27s
PR description / Title and description (pull_request_target) Successful in 33s
CI / What the change needs (pull_request) Successful in 1m23s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Has been cancelled
CI / longshot-builder end to end (synthetic game) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
bafcacecab
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
test(mods): the inspector's selection test waits for the window drawn whole after Down, not two frames (#2434)
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 9s
CI / Workflow lint (actionlint) (pull_request) Successful in 20s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 21s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 30s
Third-party parts / As their notes say (pull_request) Successful in 27s
PR description / Title and description (pull_request_target) Successful in 41s
CI / What the change needs (pull_request) Successful in 1m35s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Has been cancelled
CI / longshot-builder end to end (synthetic game) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
525992a238
The reconciler renders 2 ms a frame, so on a busy PC the next row was not drawn yet after two frames.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
style(menu): aligned rows, clearer headings, faint focus fill, bigger arrows, a full-width prompt bar (#2434)
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 12s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 20s
CI / Workflow lint (actionlint) (pull_request) Successful in 23s
Third-party parts / As their notes say (pull_request) Successful in 24s
PR description / Title and description (pull_request_target) Successful in 33s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 45s
CI / What the change needs (pull_request) Successful in 1m19s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Has been cancelled
CI / longshot-builder end to end (synthetic game) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
f9a1dc51fa
Kit: a Field has a Toggle's border and padding, so labels, switches and controls line up; its control sits at the row's end; a Section has room before its heading and little after, its title where the labels start. New theme token $hover (the accent, faint) for hover and focus on buttons and toggles; a focused Slider, Choice, Keybind or TextInput gets it as a fill under its ring. Choice arrows are larger; a slider's track shows on the surface and its value ends at the track's end; a TextInput has a well and its value is centred at rest. The menu's Tune and verb buttons sit inside the row's control, so the pair spans the same width as the other rows' controls. The frame's column has a soft right edge and the prompt bar spans the page's width.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Fails now: GetThreadTimes reads a 0.2 ms callback across a tick as 15.6 ms.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
fix(mods): Windows' budgets count the thread's cycles, not GetThreadTimes' 15.6 ms ticks (#2434)
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 13s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 28s
CI / Workflow lint (actionlint) (pull_request) Successful in 28s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 31s
Third-party parts / As their notes say (pull_request) Successful in 32s
PR description / Title and description (pull_request_target) Successful in 41s
CI / What the change needs (pull_request) Successful in 1m25s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Has been cancelled
CI / longshot-builder end to end (synthetic game) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
50d9169871
A 0.2 ms callback that ran across a scheduler tick read as 15.6 ms of CPU, and three such faults stopped
system/menu and mod-inspector. hos_thread_user_ns and hos_thread_cpu_ns now convert QueryThreadCycleTime with a rate
measured once (1 ms) against the monotonic clock. Time off the core is still not counted; the kernel's work on the
thread now is on Windows. Where no usable cycle count exists (Wine), the monotonic clock. Linux and the other
systems are unchanged.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The renderer presents the start-up screen from a paint thread of its own and the
game's frames from others, one present at a time. game_ui_present refuses every
thread but the first, so after a start-up screen no frame reaches the renderer:
no Insert menu page and no mod UI for the rest of the run.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The start-up screen's tree and the menu's frame end with Msg::Gone. With
nothing else changing, the UI thread makes no frame for it, so the renderer is
handed the last one, the gone tree still in it.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Msg::Gone took the roots out before the tick compared what is shown, so a tick
with nothing else changed made no frame.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
fix(ui): the presents may move between threads; the screens' state is no thread's own (#2434)
Some checks failed
Website / Website preview, upload (pull_request_target) Has been skipped
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 10s
CI / Workflow lint (actionlint) (pull_request) Successful in 18s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 18s
Third-party parts / As their notes say (pull_request) Successful in 21s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 26s
PR description / Title and description (pull_request_target) Successful in 31s
CI / What the change needs (pull_request) Successful in 1m18s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Has been cancelled
CI / longshot-builder end to end (synthetic game) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
79cfe10754
The renderer presents the start-up screen from its paint thread, then the game's
frames from others, one at a time under present_image's lock. The first-thread
gate left every later present without a frame (no Insert menu page, no mod UI),
and the screens' thread-local state would have left the start-up screen's tree
mounted. The view, the asks and both screens' state are now one value behind a
lock; the contract is one call at a time, from any thread.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
ModStats::frame_real_ns (std::time::Instant) is now frame_os_cpu_ns, from host_sys::time::os_thread_cpu_ns:
CLOCK_THREAD_CPUTIME_ID on Linux and macOS, GetThreadTimes on Windows. game.scriptTime and the cost tests read it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
The mod inspector's table, a List with autoFocus, drawn a flush after the window's first controls (a render slice
cut short, on a busy PC) never took the focus: the check for a new autoFocus control counted only focusable kinds.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
- game.cpuScale: a fixed 32 MB walk's least thread CPU time now against the dev PC's quiet, at least 1, measured at
  each read; the menu's, the inspector's and the FPS counter's ceilings are multiplied by it, so a busy PC moves the
  ceiling with the mod's time and a real 2x slowdown still fails.
- Under the fake host a UI flush renders 24 components at most (native sliceFibers), not 2 ms of the wall clock, so
  a page takes the same frames on every PC; game.ui.pending says a flush is still asked, and the tests' drawn() waits
  until it is false and a frame commits nothing.
- os_thread_cpu_ns on Windows is the wall's: GetThreadTimes ticks at 15.6 ms.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
test(mods): the menu's switch test watches until nothing is left to render, and the inspector's switch ceiling is the fixed slice's (#2434)
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 11s
CI / Workflow lint (actionlint) (pull_request) Successful in 24s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 23s
Third-party parts / As their notes say (pull_request) Successful in 25s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 28s
PR description / Title and description (pull_request_target) Successful in 34s
CI / What the change needs (pull_request) Successful in 1m21s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Has been cancelled
CI / longshot-builder end to end (synthetic game) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
f3a4c65281
Under the fake game a flush renders 24 components: the menu's restyled tabs take more than 8 frames, and the
inspector's opening and Frame tab cost about 8.5 ms a frame quiet; its ceiling is 12, still under a 2x slowdown.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
fix(sandbox): a game Windows cannot load in the AppContainer is diagnosed and tried again confined, never unconfined (#2434)
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 9s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 25s
CI / Workflow lint (actionlint) (pull_request) Successful in 25s
Third-party parts / As their notes say (pull_request) Successful in 28s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 32s
PR description / Title and description (pull_request_target) Successful in 40s
CI / What the change needs (pull_request) Successful in 1m28s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Has been cancelled
CI / longshot-builder end to end (synthetic game) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
9aa4163649
A player's confined game ended with 0xc0000142 and the only way in was
HOS_SANDBOX=0. The status names no DLL and the first process said nothing.

It now probes the confined start as its debugger: each DLL's initialisation
and what it returned, the exceptions and the loader's snaps, written to
logs\longshot_sandbox.txt. A probe that loads, as it was or with the legacy
extension points off, is then started for real, still confined. Otherwise the
start ends with the loader's status and a message box names the report.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
fix(startup): the start-up screen is drawn while the renderer starts (#2434)
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 13s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 28s
CI / Workflow lint (actionlint) (pull_request) Successful in 28s
Third-party parts / As their notes say (pull_request) Successful in 30s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 32s
PR description / Title and description (pull_request_target) Successful in 41s
CI / What the change needs (pull_request) Successful in 1m25s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Has been cancelled
CI / longshot-builder end to end (synthetic game) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
91c0e276e5
The renderer prepares its shaders inside its start and presents the start-up screen from there. The game side draws that
screen and asks the host what it shows (rx_startup_view), which knew the renderer only once the start had returned: every
ask got none, and the window stayed black for the whole preparation.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
## Summary

The port of #2655 to `mod-api`. Adult Link's clock can stay at 20:00 for good in Hyrule Field: the Sun's Song and Debug tools > Set time change it for a moment, then it snaps back (#1064, #2636). `mod-api`'s repair, `first_night_fix` in `game/crates/game-core/src/travel.rs`, is a straight port of main's #2298 version and has its three faults: it skips Hyrule Field, where players are stuck; it writes the flag's live byte only, so the save keeps the lock and every load needs the repair again; and it calls the flag by another flag's name.

The game holds the clock while quest `Meet_DekuTree` is not `Ready` and the saved Bool `HrlField_HasEnteredFirstTime_Adult` (0x8592aa82) is 1. The Temple of Time's event (`Dm_TimeTemple_0055`) sets it when Link becomes adult; the only thing that clears it is the arrival event `Dm_SY_BancChangeArrive_HyruleField_02`, when adult Link walks out of the Market's main gate onto the field. Every other way into the field (a warp song, Farore's Wind, the Debug tab's teleport, a save made in the field with the Bool set) keeps the lock. The findings are in #2655's description.

This does what #2655 does on main, in Rust:
- the rule is a pure function, `first_night_rule`: clear the Bool anywhere but where the game keeps the lock itself (the Market's maps, which hold the Temple of Time, and the Chamber of Sages `SageRoom`, with Link adult or his age not read), never while an event plays (the field's arrival event clears it itself);
- `first_night_fix` clears it through the game's own Bool setter, `GameData::set_bool_queued`, as the teleport's minimap repair in the same file does, so the save's copy is cleared too. A game build without the setter is said once in the log and the Bool is left;
- the constant's comment, the log line and `HOS_GAME_FIRST_NIGHT_FIX`'s row in `gpu/vk/switches.def` give the Bool's real name: #2298 called 0x8592aa82 `HrlField_isFirstNightTime_Adult`, which is another Bool (0xf1024b60) that the clock never reads.

Why it stays a flag clear and not a hook on the lock's check: blocking the Temple's set would take away the game's own first night, and a check that ignores the Bool outside the Market would leave it in the save, so the clock would hold again whenever adult Link is in the Market's maps later (Prelude of Light lands in the Temple).

How to see it on `mod-api`: load an adult save in Hyrule Field with 0x8592aa82 set to 1 (the repository's `castle-gate` save with it and `HyruleField_ArriveEntrance` 0x804aec99 set to 1 in `progress.sav`); the clock stays at 20:00 and the log has no `cleared` line.

Files to read first: `game/crates/game-core/src/travel.rs` (`first_night_rule`, `first_night_fix`, and the test `the_first_nights_lock_is_cleared_away_from_the_temple_and_the_ruined_market`), `gpu/vk/switches.def`.

See #1064, #2636, #2655 (the same fix on main).

## Testing

**Tested:** not in the game on this branch: opened without a run, at the request of the person I work for. The same rule and the same setter call ran in the game on main in #2655 (Windows 11, Ryzen 9 3900X, RTX 3080, driver 621.14, castle-gate with the Bool set): the repair off held the clock at 72000 (20:00), on cleared the Bool and the clock ran (72259 → 74700 in 20 s).
- `cargo test -p game-core --lib travel::` on Windows (Rust 1.99.1 gnullvm, llvm-mingw): 15 passed, the new one among them. It covers each case of main's `tests/test_oot_first_night.py`: Hyrule Field (both map names) and another map cleared; the Market's maps and SageRoom as adult left; the Market with the age not read left, the field with it not read cleared; the Market as a child cleared; the Bool already clear or not read, an empty map, an event playing: left; no setter: nothing written. And the Bool's name: `flags::hash("HrlField_HasEnteredFirstTime_Adult")` is 0x8592aa82, `HrlField_isFirstNightTime_Adult`'s is not.
- Nine mutations of the rule, each failing that test: the Hyrule Field skip put back (`mod-api`'s rule before this), the Market or SageRoom exemption taken out, the age test inverted, an unread age clearing in the Market, the event check dropped, the Bool not read first, a missing setter ignored, an empty map cleared.
- `cargo fmt -p game-core --check` and `cargo clippy -p game-core --all-targets -- -D warnings`: clean.
- Not run here: the full suite (`mise run test`), and the game built from this branch.

**Still to test:**
- Windows or Linux, this branch's build, `castle-gate` with 0x8592aa82 and 0x804aec99 set to 1 in `progress.sav`: the clock runs in Hyrule Field and the log has `game: cleared the first adult night's time lock` once; with `HOS_GAME_FIRST_NIGHT_FIX=0` it stays at 20:00 (by hand, or `@Beanstalk`).
- Windows or Linux, the same save after the repair: a save the game writes (an autosave at a map change) holds the Bool 0, and a later load of it stays clear with `HOS_GAME_FIRST_NIGHT_FIX=0` (by hand).
- Windows or Linux, an adult save walking out of the Temple of Time through the ruined Market for the first time: the night holds in the Market and ends after the gate's arrival, with no `cleared` line in the Market (by hand).

## Measurements

Nothing to measure: a correctness fix; the repair reads one flag twice a second from the refresh that already ran it.

## Risks

The repair now calls the game's own Bool setter from the inventory refresh, as the teleport's minimap repair and the Inventory editor's songs do from the game's thread; `refresh_inventory` already had the `GuestCtx` it needs. In the Market's maps and the Chamber of Sages it leaves the Bool alone with Link adult, where `mod-api`'s repair cleared it, so the game's own first night in the ruined Market holds again until the gate. `HOS_GAME_FIRST_NIGHT_FIX=0` turns the repair off; a revert is enough. No save format, options or cache changes.

## Checklist

### Ready for review

- [x] One topic, on current `mod-api` (`d342b879e`); the title is a Conventional Commit.
- [ ] Tested on my own PC, in the game for a change the game runs, as Testing says. (Not on this branch: opened without a run at the request of the person I work for; the same rule ran in the game on main in #2655.)
- [ ] `mise run test` passes (any failure that also fails on `main` is named). (game-core's tests, rustfmt and clippy here; the full suite not run.)
- [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. (On `mod-api`'s rule: its Hyrule Field skip, put back as a mutation, fails the test.)
- [x] A switch added or changed: it ships at the default the measurements chose, with its row in `gpu/vk/switches.def`. (The row's text: what the repair covers and the Bool's name; it stays `kill`, on by default.)
- [x] Docs updated. (The functions' comments and the switch's row.)
- [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)

Reviewed-on: #2678
fix(sandbox): Windows: the .nup read through a handle the broker opens, the game's own relayed std handles, FAT/exFAT drives skipped (#2434)
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 12s
PR description / Title and description (pull_request_target) Has been cancelled
CI / What the change needs (pull_request) Has been cancelled
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Has been cancelled
CI / longshot-builder end to end (synthetic game) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Lint (pre-commit, ShellCheck) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Workflow lint (actionlint) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 27s
Third-party parts / As their notes say (pull_request) Has been cancelled
a551e8240f
A player's Windows 11 run reached the AppContainer and its broker, then stopped with
nup_moved because the .nup's read grant failed with error 5; started from a subshell
with redirected output it ended with 0xc0000142 before main.

- The outer process opens the .nup read-only and the confined game inherits that
  handle (LONGSHOT_NUP_HANDLE); host/romfs_index.c reads through it (its size and
  TOC still checked; a stale value falls back to the path) and a restart of the
  confined game passes it on. A file's failed grant is only a log line.
- nup_denied (there, not readable) is told apart from nup_moved (not there).
- The confined game's stdin is NUL and its stdout/stderr pipes of the outer
  process's own, relayed to its stdout/stderr; the caller's handles are never
  inherited, and a caller with no console gives the game none (DETACHED_PROCESS).
- A drive with no ACLs (FAT32/exFAT) is skipped with a plain warning that its files
  are not protected from mods; the confined game first checks it can read what it
  needs (LONGSHOT_SANDBOX_NEEDS) and else ends with exit 72, and the game runs
  unconfined with a player's script mods held.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Lays the screen out with and without the bar and each of its lines, with long
texts and at its end's fade: every part that shows must be where it was. It
fails: the column is centred on what it holds, so the logo moves by 13 to 26 px.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
A large box shadow, the one soft shape a style had, bands: the painter draws it
as four rounded rects of a quarter its alpha each. The draw list gains a
GRADIENT quad (version 8; the style's radialGradient), which the painter draws
with a pipeline of its own: the two colours mixed sRGB-encoded in full
precision, made the target's (an sRGB view, HDR10) and dithered by half of the
target's step either way. The CPU reference renderer does the same on 8 bits.
Theme tokens backdrop, backdropGlow, wordmark and radius.pill for the start-up
screen.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
Every part has a place of a fixed size, there whether it shows anything or not.
The glow is a dithered radial gradient in the Menu theme's colours again. The
bar has round ends in Modern dark, a fill moved by fractions of a pixel that
eases between the renderer's updates, and its percentage over both parts; a line
alone under no bar stands in the middle; the screen fades in over 0.35 s.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyKi9X9AgqbaPS28uY
test(ui): a wide, faint gradient is dithered, so it shows no bands (#2434)
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 11s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 24s
CI / Workflow lint (actionlint) (pull_request) Successful in 25s
Third-party parts / As their notes say (pull_request) Successful in 29s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 32s
PR description / Title and description (pull_request_target) Successful in 40s
CI / What the change needs (pull_request) Successful in 1m35s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Has been cancelled
CI / longshot-builder end to end (synthetic game) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
0c803d490c
Co-Authored-By: Claude Opus 5.5 <[email protected]>
style(startup): a darker glow behind the start-up screen (#2434)
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 9s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 19s
CI / Workflow lint (actionlint) (pull_request) Successful in 20s
Third-party parts / As their notes say (pull_request) Successful in 26s
CI / Lint (pre-commit, ShellCheck) (pull_request) Failing after 27s
PR description / Title and description (pull_request_target) Successful in 34s
CI / What the change needs (pull_request) Successful in 1m18s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Has been cancelled
CI / longshot-builder end to end (synthetic game) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 3/4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 4/4) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
aa7fb898db
Co-Authored-By: Claude Opus 5.5 <[email protected]>
## Summary

Mods can register usable items in **Quick Select Items**, which opens with **L** or **R** by default. Confirming an item equips it. A script can read the selection and set the count shown on the tile and HUD.

An item can reserve a + menu slot with `slot: { id }`. Until the layout supplies its button, the item remains available in Quick Select Items. The Hookshot retains its icon and the previous native item loses its highlight when a custom item is equipped. Creating layout buttons is future work.

The branch is now based directly on `mod-api` at `e544bc2e9`. Controller PR #2516 has merged, so its commits (and the compiler-selection fix to `tests/test_pad_motion_policy.py`, which landed with it) are no longer carried here: this PR is the 11 item commits only. In the port, the removed `sites.def` lines became `engine =` keys on their `sites.toml` rows, and the fake game's RomFS uses upstream's `game.romfs`. This supersedes #2340. See `game/crates/game-core/src/equipment.rs` for menu behavior and `docs/modding/api-guide.md` for the mod-author example. [Diff against the base](e544bc2e9...e0202d7c3)

## Testing

**Tested:** Windows, GeForce RTX 3090, on `e0202d7c3` (packed over a `mod-api` base), Adult Kakariko with a test mod adding three custom items. The custom items appeared in Quick Select Items with icons and shadows. Equipping them and using them changed their HUD counts. With a custom item equipped, the + Items page opened, closed and reopened with no stale native highlight. Switching back to the Hookshot, it showed and worked normally. The test mod passes `longshot-builder mod check` on this head.

On the ported head, the unit tests pass apart from failures that also fail on plain `mod-api` at `e544bc2e9`. Before the port, all 236 content, 312 OOT and 30 game-site tests passed with the game-site suite run serially, the Rust mod tool regression passed for selection, trigger release and independent equipment slots, and all 27 ported hook contracts and placements matched the prior implementation.

**Still to test:**

- Linux, by hand. Equip a custom item, switch back to the Hookshot and reopen the + Items page. Check selection, HUD count, native highlight and menu transitions.

## Measurements

The earlier Windows play log recorded 60.0 fps in its final two reporting intervals. A matched, interleaved performance comparison against the base is pending.

## Risks

Both menus use the same pouch row IDs. The changes reorder display entries and skip missing buttons while retaining those IDs. Incorrect mapping could affect a native upgrade, cursor movement or an icon. Custom selection lasts for the session.

## Checklist

The integration target is `mod-api`. The change is complete and hand-tested on Windows on `e544bc2e9`. `mod-api` has moved on since; against its current head this branch conflicts only in three docs lists (`docs/modding/permissions.md`, `reference.md`, `scripting.md`), and the code merges cleanly. I will rebase on request when it is picked up for merge. The strict suite, matched timings, paired screenshots and Linux verification remain open.

### Ready for review

- [ ] One topic, on current `main`; the title is a Conventional Commit.
- [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).
- [ ] 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.
- [ ] Host code builds on Windows (llvm-mingw) and Linux, with UTF-8 paths.
- [ ] Screenshots of the same spot on `main` and here, for a change that shows on screen.
- [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)

Co-authored-by: snaildev99 <[email protected]>
Reviewed-on: #2528
## Summary

There was no way to play in a VR headset, and with the sandbox on a headset's runtime could not be reached at all. This adds
a **Headset** row (Graphics, Off by default, after a restart) and, for it, one narrow sandbox rule. With the row On, the
game's picture is shown on a flat screen set in the room in an OpenXR headset, at the headset's own refresh rate, whatever
the game's frame rate, with the sandbox on. The window is unchanged. This is the first of three PRs for OpenXR in the
engine, as agreed with HumanBean; it targets `mod-api`, on b73ec9855 (20 commits: 9 for the headset, 1 for the sandbox
rule, then 10 from the review: L1 and L2 each as a failing test and its fix, a follow-up pair for the thread object, the
player's docs (L3), the row's declaration and snapshot field for mod-api's settings, and an unused import).

**The headset** (9 commits). What it does:
- Opens the OpenXR loader by name at run time (no link), then the active runtime and its headset, before the Vulkan instance.
- Runs the session on the game's own device and queue, on a thread of its own, with one quad layer: 70 degrees wide at
  3.5 m, placed in front of the head at the start and after a recenter.
- Copies the picture the game presents into one of six images in the frame's own recording; the headset's thread takes the
  newest finished one. Neither side waits for the other.
- Any failed step turns the headset off for that run with one warn line (`vk: headset: ...: off this run`); the game goes on
  in its window.
- With the headset on: no HDR surface, no frame generation, and V-Sync Auto means Off.

**Its start and close** (from the review, L1 and L2):
- The renderer's start and the game's close share one lock. Close always records that it was asked, and takes the thread
  out under the lock. Start refuses once a close was asked, before it makes the session and after (a session made
  meanwhile is let go), so no thread starts after a close. The thread is joined outside the lock, 2 s at most.
- The thread object, like the headset's State, is made once and never destroyed: an end of the process that skips the
  close runs the renderer's static destructors on Windows, and a joinable `std::thread` would call `std::terminate` there.
- A copy into the screen's swapchain is marked in flight from its submit until its fence is seen to finish. At the
  thread's end, a copy still in flight (the close's time-out, or a lost device) leaves the session, the instance, and the
  copy's pool and fence for the process's exit, which follows the close; they are never destroyed under the GPU.
- With the row off, close is one lock and one test, and nothing is allocated.

**The row and mod-api's settings.** The menu is served from the settings service alone, so the row is its declaration in
the graphics area mod (`game/mods/graphics/mod.toml`: a toggle after GPU device, applied after a restart, kept out of the
presets), with its field in the game's settings snapshot (`game/settings_abi.h` and host-sys's `settings_abi.rs`, made
again with schema-gen). The renderer keeps no rows: `gpu/vk/menu/headset.cpp` is the row's applier (`MENU_SETTINGS`, as
`gpu.cpp`'s), which takes the start's value into `Options::headset`, a restart row's.
`vk_headset.cpp` reads the settings file's `headset=` line before the Vulkan instance is made.

**The sandbox rule** (1 commit, written as HumanBean asked, since there is no headset on his dev machine). Before it, with
the sandbox on, the OpenXR loader was refused the active runtime's manifest when it is in the home folder (a per-user
`active_runtime.json`, `XR_RUNTIME_JSON`), then the runtime's library when that is in the home folder, and Monado's and
WiVRn's clients would then be refused their service's socket in `$XDG_RUNTIME_DIR`: the player saw one warn line ("no OpenXR
runtime is active, or the sandbox keeps it out") and only the window. The rule applies **only when the Headset row is on**
(`headset=1` in the settings file, read before the lockdown as `vk_headset.cpp`'s `asked()` reads it, and never for the
Builder's shader preparation). With the row off not a rule changes. With it on, `host/sandbox_linux.c` `openxr_runtime` finds
the active runtime as the OpenXR loader's `manifest_file.cpp` does on Linux and gives:

| Given | Rights | Why |
|---|---|---|
| the manifest (`XR_RUNTIME_JSON` alone when set; else the first `openxr/1` of `$XDG_CONFIG_HOME`, each `$XDG_CONFIG_DIRS` folder and `/etc` with `active_runtime.<arch>.json` or `active_runtime.json`, both when both are there; a link followed to its target, as the loader does), only a file with a `library_path` (a folder named there is never given) | read, the file alone | the loader reads it |
| the folder of its `library_path` (relative: against the manifest's real folder, as the loader does) | read and run | the loader loads the library; never the home, the root or a system folder itself (`sbx_folder_narrow`); a bare name is the system's search, read already |
| the runtime's one socket, by its library's file name (`sbx_openxr_socket`), when it is there | reach (Landlock ABI 9; below it, bound back into the private folders) | the client talks to its service through it |

| Runtime (library) | Socket | Read in |
|---|---|---|
| Monado (`libopenxr_monado.so`) | `$XDG_RUNTIME_DIR/monado_comp_ipc` | Monado's `src/xrt/ipc/client/ipc_client_connection.c` (a pathname socket at `u_file_get_path_in_runtime_dir(XRT_IPC_MSG_SOCK_FILENAME)`; the name's default in its `CMakeLists.txt`) |
| WiVRn (`libopenxr_wivrn.so`) | `$XDG_RUNTIME_DIR/wivrn/comp_ipc` | WiVRn's `server/CMakeLists.txt` (`set(XRT_IPC_MSG_SOCK_FILENAME "wivrn/comp_ipc" ...)` before Monado is added); the same string is in the shipped client library |
| any other | none | |

Each grant writes its `sandbox: allowed ...` line ending `(Headset)`; below ABI 9 (every kernel before 7.1) the socket shows
as its `sandbox: bound back` line instead. What is not given writes one `sandbox: Headset: ...` line saying why. With the
sandbox on, the row takes a quit and a new start, not a restart from the Insert menu: a restart keeps the rules of the run
before.

What it does not do:
- No head tracking: the view does not follow the head. That is the next PR.
- No controllers, no hands, no Stereo: one picture, the same for both eyes.
- **The mods' output effects are not in the headset's picture**: Colour vision correction and the CRT filter run in the
  window's scaling pass, at the window's size, after the picture is copied for the headset. With one on, the window is
  corrected and the headset is not, and one warn line says so. Two ways to close it, neither written: run the output effects
  again at the headset image's size (an image set per caller in `vk_effects.cpp`, and twice their GPU time), or copy the
  window's finished picture (the window's size and aspect, and a second seam in the presenter's recording). Which one is
  the maintainers' call.
- The sandbox gives nothing else of `$XDG_RUNTIME_DIR` (the socket file alone, not `wivrn/`); no `/dev/shm` (Monado's service
  makes its shared memory with `shm_open` and unlinks it at once; the client gets the fd over the socket and only maps it);
  not the OpenXR API layers' folders (a layer in the home is not seen); nothing more for SteamVR (its client is closed source:
  its manifest and library's folder alone); no socket made after the start (start the runtime's service before the game).
- **Windows' sandbox gives a headset nothing yet.** The loader beside the game and a runtime in Program Files are readable,
  and the active runtime is named under HKLM; but a runtime in a Steam library is not granted, and the runtimes' services are
  reached through their own named objects, which an AppContainer with no capability cannot open unless the runtime lets ALL
  APPLICATION PACKAGES in. Not written, not run: a later change, when someone can run it. Until then `HOS_SANDBOX=0` there.

Read first: `gpu/vk/vk_headset.h`, `gpu/vk/vk_headset.cpp`, `gpu/vk/vk_headset_picture.cpp`, `gpu/vk/headset_rules.h`,
`docs/dev/reference/headset.md`, `tests/test_headset_lifetime.py`; for the rule, `host/sandbox_linux.c` (`headset_on`, `openxr_runtime`, the call beside
`vulkan_libs`), `host/sandbox_plan.h` (`sbx_openxr_socket`, the three `SbxInput` fields, their rules at the end of
`sbx_rules_build`) and `docs/dev/reference/sandbox.md` ("A headset", and the Windows paragraph). The renderer's own files
change by 26 lines in and 10 out, the seams (`vk_main.cpp`, `vk_replay.cpp`, `vk_menu.cpp`, `vk_menu.h`, `vk_internal.h`,
`vk_framegen.cpp`, `vk_fsr3fi.cpp`). The row is declared in `game/mods/graphics/mod.toml`, with its applier in
`gpu/vk/menu/headset.cpp` (`game/mods/menu/test/menu_rows.json` has it); with the headset on, the log says the picture
stays SDR (`hdr_sdr_headset`), and the HDR row says nothing of it (mod-api's menu has no renderer hint for it); the About page credits the headers
(`game/mods/menu/src/credits.ts`). `game/settings_abi.h` is schema-gen's output but for its last newline, which the
end-of-file hook cuts from two to one, so `schema-gen --check` calls it stale for that alone. `json_lib_dir`'s parsing of `library_path` moved into `json_library` for both, unchanged
for the Vulkan files.

The OpenXR headers in `third_party/openxr` are byte for byte those of Khronos' OpenXR-SDK tag `release-1.1.65` (compared by
git blob id; `PROVENANCE.md` names the commit). Nothing else of the SDK is included. Players supply the loader: on Windows
`openxr_loader.dll` in the game folder, on Linux their distribution's package (`docs/user/advanced.md`, "Headset").

Next, each its own PR: head tracking (a camera mod on existing sites and the eyes' projection layer), then an Output
resolution shaped like the headset's eye.

The code was written with Claude (Anthropic's model) and reviewed with it in a separate pass before the runs; I read it and
tested it. Every commit carries a `Co-Authored-By` trailer.

## Testing

**Tested:** Linux Mint (Cinnamon, X11), kernel 7.0 (Landlock ABI 8, the private folders on), RTX 4070, NVIDIA 595.99.02.
Each line names the build it ran on: the head cda01e6e1 on mod-api b73ec9855; bc68f89a on mod-api b0a7cfee7; bccc4c9f
(before the thread-object fix and the snapshot field) on mod-api cd925ff8d; f971453d (the 9 headset commits) on 038beefa; 3b5ef5be, the first base.

On the head (cda01e6e1), a stand-in OpenXR runtime in the home folder, loaded by the system's loader from its manifest,
90 Hz, headless:
- Sandbox on: the headset started from a settings file with `headset=1`; the game quit with status 0 in 0.46 s.
- The row, through the menu's own setter (the bridge's `option_set`): Headset found on the graphics tab, a restart row;
  0 -> 1 saved `headset=1` (and `present_queue` 0 -> 1 in the same run saved `present_queue=1`); the next start, from that
  file, had the headset on; 1 -> 0 saved `headset=0`.
- On bc68f89a (on b0a7cfee7) the same sets did not reach the file (Headset and `present_queue` kept 0, and the Insert
  menu's restart rows could not be changed), while plain b0a7cfee7 saved `present_queue` 0 -> 1: the bug came with this
  branch on that base, and is gone on this one, where the renderer keeps no rows.
- On bc68f89a: the stand-in with the sandbox on (the rule's two `(Headset)` grants, session states 1-5, 900-902 frames
  ended per 10 s, each with its layer, at the quit 4 3 6 1 8, exit 0 in 0.46 s) and off (the same).
- `tests/run_all.py --changed origin/mod-api`: 228 pass, 83 fail, 1 skipped (present_aspect_vulkan, which needs a device).
  The 83 fail the same on plain b73ec9855. `tests/test_headset_lifetime.py` and `tests/test_headset_rules.py` pass with g++
  and clang++.

The start and close (`tests/test_headset_lifetime.py`, committed before each fix and failing on the code before it; it cuts
`let_go`, `submit_and_wait`, `run`, `start`, `close` and the file's lock, flag and thread out of `vk_headset.cpp`):
- closed during the copy with the GPU still at it: before, the session was destroyed under the GPU; now nothing is;
- closed while the start makes the session: before, the thread started after the close; now it does not;
- closed before the start: no session is made;
- an exit that skips the close, the thread running: before the thread-object fix, `std::terminate` (status 134); now the
  process ends with its own code.
Each fix's key line undone, the test fails again. The start and close part runs clean under ThreadSanitizer (g++, clang++).
- A quit forced during the copy (bccc4c9f, with a test-only patch built for the run and not in the branch: a copy held on
  the GPU behind a timeline semaphore the host signals 8 s later, the quit 1 s after it was held), twice: the thread's end
  found the copy still on the GPU and left the session, its swapchain and the pool for the exit; exit 0 in 0.76 s and 0.81 s.
  With the semaphore signalled before the quit, the thread let the session go as before.

The headset:
- In the headset (Meta Quest 3 on WiVRn 26.9, sandbox on, bccc4c9f, with the test-only X11 shim below): WiVRn reached,
  2064x2162 an eye, session states 1-5, the game shown in the headset; a quit with the window's X: states 4 3, then 6 1 8,
  the swapchain let go, the close work done, no error and no crash record.
- In the headset (Meta Quest 3 on WiVRn 26.9, sandbox off, f971453d, 26 Nov): the title screen and the game on the screen in the room,
  fixed in place; recenter works. The thin line along the screen's edge seen on 3b5ef5be (it moved with the head) is not
  seen on this build. On 3b5ef5be also: sharp, right colours, steady; headset off and back on, and quit.
- Row Off: the start log has the same lines as plain 038beefa (but thread order, timings and the shader cache's own lines)
  and no headset or OpenXR line, in all three pairs below.
- Row On with no loader, and with no active runtime, sandbox on and off: one warn line each ("the OpenXR loader
  (libopenxr_loader.so.1) is not installed, or cannot be opened"; "no OpenXR runtime is active, or the sandbox keeps it
  out"), the game runs and quits with status 0.
- A stand-in OpenXR runtime (loaded by the system's loader from its manifest, 90 Hz): every runtime frame ended with a layer
  (869-901 per 10 s) while the game ran at about 122 fps; the screen held the game's picture (2.4-3.9 of 255 from the
  window's shot, mean absolute difference at 192x108); session states 1-5 at the start, 4 3 6 1 8 at the quit, quit in 0.46 s.
  On 3b5ef5be also: 120 Hz (1,200 of 1,200), STOPPING then READY, and a lost session, each with the game running on.
- On f971453d, `tests/run_all.py --changed` (270 checks that read the changed files): 262 pass, 7 fail, 1 skipped. The 7 fail
  the same on plain 038beefa (crt_shaders, gfx_world, gfx_effects, scene_format, settings_table, framegen_resources,
  present_source_crop). The skipped one needs a Vulkan device (present_aspect_vulkan). New: `tests/test_headset_rules.py`
  (each rule broken on purpose; the off path; the locks).

The sandbox rule (first run on 038beefa with the 10th commit; the sandbox on; a stand-in runtime in the home folder, loaded by the system's OpenXR loader 1.0.20, 90 Hz;
it runs in the game's process, so it has no socket):
- In the headset (Meta Quest 3 on WiVRn 26.9, the Flatpak, 26 Nov): `sandbox: allowed r .../openxr_wivrn.json (the active
  OpenXR runtime's manifest (Headset))`, `allowed rx .../lib/wivrn (the OpenXR runtime's library (Headset))` and
  `sandbox: bound back /run/user/<uid>/wivrn/comp_ipc` (ABI 8: the socket through the private folders); WiVRn reached,
  2064x2162 an eye, session states 1-5 and at the quit 4 3 6 1 8; the game shown on the screen in the room. On this setup the
  manifest and library are under `/var/lib/flatpak`, which the system rules read already, so **the headset run proves the
  socket alone**; a manifest and library in the home folder are proven by the stand-in runs. The window opened only through a
  test-only `LD_PRELOAD` shim (Risks): the sandbox cannot open an X11 window on this PC.
- Before the rule, `XR_RUNTIME_JSON` naming the stand-in's manifest in the home folder: refused at the manifest (the loader's
  "failed to open .../standin.json. Does it exist?", then "no OpenXR runtime is active, or the sandbox keeps it out (-51):
  off this run"). On 3b5ef5be also refused as `active_runtime.json`, and at a library in the home folder.
- With the rule, the same: `sandbox: allowed r .../standin.json (the active OpenXR runtime's manifest (Headset))` and
  `allowed rx` of its library's folder; the runtime loaded, session states 1-5, 900-901 frames ended per 10 s with a layer each,
  quit in 0.26 s, exit 0. With no `XR_RUNTIME_JSON`, the manifest as `$XDG_CONFIG_HOME/openxr/1/active_runtime.json`, a file
  and then a link to the manifest elsewhere: the file, then the link's target granted; 900-901 frames per 10 s each, exit 0.
- Row off (`headset=0`), the stand-in still named: the same 109 `sandbox:` lines as without the rule (the run folders aside),
  no `Headset` line, no headset started, exit 0.
- `tests/test_sandbox_linux.py`: new rows for the rules (the manifest read alone, the library's folder read and run, the socket
  reach alone, nothing else of the runtime folder or the home, three rules more and the rest the same, no socket right before
  ABI 9, the socket table) and for `sandbox_linux.c` over made-up folders (an absolute and a relative `library_path`, a
  linked `active_runtime.json`, `XR_RUNTIME_JSON` alone, a manifest not there, a folder as the manifest, a manifest with no
  `library_path`, a bare library name, a runtime found in `$XDG_CONFIG_DIRS`, a library in the home itself, a socket not
  there, both names in one folder, the socket bound back below ABI 9, `headset=0`, the shader preparation, and the row off
  byte for byte against no runtime at all), and a source check that the rule is called only behind `headset_on`. Each part was
  broken on purpose once: every one fails a row. `tests/run_all.py --changed` for this commit: 40 pass, 5 fail, the same 5
  without it (dev_ab, release_workflow, windows_on_linux, job_queue, settings_table).
- The commit that adds the manifest's file check (a folder or a file with no `library_path` is not given) is checked by test
  rows; the headset and stand-in runs above ran the rule before that check, which gives their manifests the same.

Lint: every pre-commit hook passes on the whole range, 038beefa's F401 in `tests/test_recorder_sync.py` removed (end-of-file,
whitespace, JSON, gitleaks, ruff; each commit's message through the Conventional Commit hook).

**Still to test:**
- The Insert menu's Headset row: turned On, then a quit and a new start (with the sandbox on, a quit, not a restart): the headset starts and the settings file has `headset=1`; turned Off the same way: `headset=0` and no headset, expecting what the menu's setter did in the runs above (by hand)
- Windowed close with a copy left on the GPU: the close later reaches vkDeviceWaitIdle (vk_main.cpp's close), which waits for it with no time limit, as before this PR; the forced-quit runs were headless (by hand)
- Windows runtimes (SteamVR, Meta's): whether leaving the session and the instance for the process's exit at such a close is safe there (by hand)
- Linux, V-Sync On, with the window covered: the headset keeps its own rate, expecting no frames held at the window's rate (by hand)
- Windows 11, any Tier 1 GPU, `openxr_loader.dll` in the game folder: it compiles with llvm-mingw, and the row starts the headset with `HOS_SANDBOX=0`, expecting the same start lines (by hand)
- AMD RX 6000-9000 on Mesa RADV, and Intel Arc: the screen in the headset, expecting the same as on NVIDIA (by hand)
- Monado (monado-service), sandbox on: the session starts through `monado_comp_ipc`, expecting the same as on WiVRn (by hand)
- SteamVR and Meta Quest Link: the screen in the headset with the sandbox off, expecting the same as on WiVRn; with it on, SteamVR is expected to be refused with the one warn line, and whatever it needs shows in the log (by hand)
- Linux, Landlock ABI 9 (kernel 7.1+): the socket by `RESOLVE_UNIX` instead of the bind (by hand)
- Linux, a real runtime whose manifest and library are in the home folder (a self-built WiVRn or Monado): the sandbox on, expecting the same as the stand-in (by hand)

## Measurements

**Verdict:** no cost with the row Off: median frame time 7.94 ms against 7.93 ms on plain 038beefa, within the spread of the
pairs (on the older base: the review's changes touch only the headset's start and close and its row's settings, nothing a
frame runs; not measured again on b73ec9855). With the row On and a stand-in runtime, one run: 8.00 ms median. The sandbox rule changes what the sandbox lets
through at the start, never a frame; with the row off its rules and log lines are the same as without it (Testing).

Baseline: 038beefa, the merge base with `mod-api` when these were measured, which has none of what this changes.
Setup: Linux Mint, kernel 7.0, RTX 4070, NVIDIA 595.99.02; Kokiri start save (assets/saves), 1920x1080 output, Render
resolution 67%, V-Sync Off, uncapped, no window (headless); median and p99 frame time from the frame trace, 40 s warm-up then
60 s, three interleaved pairs after a warm-up run of each. Skip title screen does nothing on 038beefa (its system mod does not
start), so each run pressed A on the title, the file list and its Yes until play, the same for both builds.

| | Before: mod-api @ 038beefa (the merge base then) | After: this PR @ f971453d (Headset Off) |
|---|---|---|
| pair 1, median / p99 | 7.93 / 10.46 ms | 7.97 / 10.79 ms (its shader cache prepared again at the start: none in the measured minute) |
| pair 2, median / p99 | 7.89 / 10.51 ms | 7.93 / 10.75 ms |
| pair 3, median / p99 | 7.95 / 10.79 ms | 7.94 / 10.57 ms |
| median of the three | 7.93 / 10.51 ms | 7.94 / 10.75 ms |

Headset On, with the stand-in runtime at 90 Hz, one run on f971453d (not interleaved): 8.00 / 10.92 ms.

On 3b5ef5be, Headset On, with the stand-in runtime and a timing patch (built for that run, then removed), per 10 s:

| | 90 Hz | 120 Hz |
|---|---|---|
| game median frame, Off then On | 7.72 / 7.76 ms | 7.72 / 7.74 ms |
| the queue's lock held in xrAcquireSwapchainImage, mean / max | 0.52 / 2.59 ms | 0.51 / 1.89 ms |
| held in xrReleaseSwapchainImage, mean / max | 0.16 / 1.94 ms | 0.16 / 1.97 ms |
| held in vkQueueSubmit2, mean / max | 0.004 / 0.02 ms | 0.004 / 0.02 ms |
| fence wait (no lock), mean / max | 0.28 / 1.6 ms | 0.29 / 2.0 ms |

These are the stand-in's own calls; a real runtime's times were not measured. The log and frame-trace lines are in the
comments.

No switch is added. `vk_headset.cpp` and the sandbox read the existing `LONGSHOT_PREPARE_ONLY` (default off) so that a
shader-preparation run starts no headset and gets no rule.

## Risks

- **The shared queue.** The headset's runtime calls that may use the queue are made under the same lock as the game's own
  submits (`dev.present_mu`). A runtime that blocks inside one of those calls blocks the game's submits for as long: a
  stand-in that held its acquire call for 1.5 s every 10 s gave the game frames of about 1.0 s (on 3b5ef5be). Real runtimes
  were not measured. A second queue is not added: the device makes one queue of the graphics family, and the existing
  comment in `vk_main.cpp` records that a second graphics queue made presents slower.
- **V-Sync On** was not run with the headset. A present that waits under the same lock (FIFO, a covered window) could hold
  headset frames to the window's pace. If it does, V-Sync On also becomes Off with the headset on (one token, one test row).
- **The row is in the settings file, which the confined game writes**: a run taken over can turn it on for the next run (the
  bar the sandbox keeps for `HOS_SANDBOX` itself). What that run gets is still bounded: only the active runtime the player
  installed (the manifest is chosen by the real environment and the user's config, which the game cannot write), and its
  socket only while its service runs. If you want it tighter, the alternative is a switch from the real environment or the
  launcher (as `HOS_SANDBOX` is) for the sandbox's part instead of the menu row: your call, and a small change either way.
- **With the row on**, the confined game can reach the runtime's service and ask it whatever any client of that socket may
  (the OpenXR calls, and the service's own control messages, such as Monado's client list and focus), and the service is not
  confined; the sandbox docs' "What stays open" says so. The library's folder is read and run, never written: a game taken
  over can read what else is in it, as with the Vulkan layers' folders today.
- **A runtime the rule does not know** gets its manifest and library alone and may fail at its IPC: the same warn line as
  without the rule.
- **The sandboxed headset test needed a shim**: the sandbox cannot open an X11 window on this PC (Landlock's abstract-socket
  scope makes libxcb's connect fail with EPERM, and libxcb falls back to the path socket only on ENOENT/ECONNREFUSED:
  reported separately). That test ran with a test-only `LD_PRELOAD` shim that maps that EPERM to ECONNREFUSED; it is not part
  of this PR and not in the tree.
- **A close with a copy left on the GPU** leaves the session and the instance for the process's exit. Whether every runtime
  takes that well is not known beyond the stand-in; in a window, the close's later vkDeviceWaitIdle waits for the copy with
  no time limit (as it does without this PR). The test does not model a lost device, a failed submit, or the close's 2 s
  detach.
- **Not run:** Windows (not compiled), AMD, Intel, SteamVR, Meta's runtime, Monado, two GPUs, a runtime that refuses a 16:9
  swapchain or lists UNORM formats alone; a close during the headset's start is tested game-free only.
- **Turn it off:** the row, Off by default. With it Off the options file's `headset=` line is read once and nothing else is
  done: no library opened, no extension asked for, no thread, no sandbox rule (read in the code, and the start logs measured
  above). A revert is enough.
- **After updating:** nothing for a player who leaves the row Off. The row uses one of the menu's restart slots.

## Checklist

### Ready for review

- [x] One topic, on current `main`; the title is a Conventional Commit. (One topic: the headset, with its sandbox rule. On `mod-api`, as asked, not main)
- [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). (`tests/run_all.py --changed origin/mod-api` on the head, the 83 failures named against plain b73ec9855; the whole suite not run)
- [x] Measured against `main`, or Measurements says why there is nothing to measure. (against 038beefa, the merge base with `mod-api` then; its Verdict says why the numbers hold on b73ec9855)
- [x] No game files, build output or hand-edited generated files; `third_party/` untouched; nothing GPL-incompatible. (`third_party/openxr` is a new part, upstream headers with its PROVENANCE, `check_third_party.py` and `test_menu_credits.py` pass; no existing part changed. The settings ABI files are schema-gen's, `settings_abi.h`'s last newline as the end-of-file hook leaves it)

### When it applies

- [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. (Linux only; Windows not compiled; the sandbox rule is Linux-only code)
- [ ] Screenshots of the same spot on `main` and here, for a change that shows on screen. (The window is unchanged; a picture from the headset to add)
- [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.

Co-authored-by: SqueezyLemonade <[email protected]>
Co-authored-by: BeanBot <[email protected]>
Reviewed-on: #2595
Reviewed-by: HumanBean <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
## Summary

The runtime takes a mod's content by its id (`items.grant(":Rupee7")`), but its flags only by their game names. A mod
that declares a flag with `content.flag({ id: "Seen" })` has to write `"M1a2b3c4d.Seen"` everywhere it uses it: the
FNV-1a hash of its own id, worked out by hand. `content.md` lists `:id` for flags as not yet.

Now `game.flags.get`, `has` and `set`, and `flagChanged`'s filter, take a mod's content flags by their ids, as the rest
of the runtime takes its content:

```ts
flagChanged.on((e) => log.info(`${e.flag}: ${e.value}`), { flag: ":ChestOpened" });   // e.flag: "M37444242.ChestOpened"
flags.set(":ChestOpened", 1);
flags.get("other/mod:Seen");                                                           // another mod's
```

- `":id"` is the calling mod's own flag, `"owner/name:id"` another mod's; each is read as the game name `content.flag`
  makes (`content::plan::word` and the id). A game name is taken as it is. A mod's tests, which the game runs as
  `tests:<id>`, name its flags as the mod does.
- `flagChanged` tells the flag's game name in `e.flag`, whichever way the listener named it: the filter is kept as the
  game name when the listener subscribes, so it matches the event.
- In `game.flags` and the `flagChanged` filter, a name with a `:` that names no flag (no id after it, an id that is not a declaration's) is `UnknownNameError`; `has()` is false. The test game's `flag()` returns `undefined` for such a name.
- The test game's `flag()` and `setFlag()` take the same names (it runs the same services).

Read first: `flag_name` and `flag_watch_refused` in `game/crates/api/src/services/game.rs`, then `watch_refused` in
`game/crates/script/src/runtime.rs` and its caller in `script/src/bind/mod.rs` (`api_on`: the filter the hook hands
back is the one kept). The test game: `flag_name` in `game/crates/modtool/src/testing_game/hooks.rs`.

This is #2572 moved onto the current `mod-api` (rewritten since), on a new branch so the pull request is only this
change; #2572 can close. It was #2287's change to the C mod API first. Part of #1958's Modding API; targets `mod-api`.

## Testing

**Tested:** Windows 11, NVIDIA GeForce RTX 4060 Laptop GPU, driver 621.24. In the game: a quick build of current
`mod-api` with this change and the flow patches' (#2656), `dev.py game-tests`, the repository's `kokiri-start`. A
mod's own test passes: the mod reads its content flag as `":Seen"` (0, `has` true, `":9Seen"` refused with
`UnknownNameError`), sets it (`game.flags.set Mf7b05380.Seen 0 -> 1` in the log), `flagChanged` tells
`Mf7b05380.Seen 0 -> 1`, and the test's `game.flag(":Seen")` reads 1 (a mod's tests, run as `tests:<id>`, name its
flags as the mod does). Checks: `cargo test -p api -p script -p modtool` (api's `flag_name` against an FNV-1a written
out in the test: a game name, the mod's own, another's, six names refused; script's service hooks keeping a `:id`
filter as its game name; modtool's testing_game: a mod that reads, writes and watches its flag as `":Seen"`, `e.flag`
its game name, a bad name returning `undefined` from the test's `flag()`, the test's `flag(":Seen")`); `cargo check --workspace --all-targets`; `cargo run
-p schema-gen -- --check`; rustfmt. Two tests fail on `mod-api` itself and here, on Windows:
`api`'s `a_content_mods_changed_module_runs_again_and_its_outputs_are_served` and `modtool`'s
`eden_and_ryujinx_mods_are_found_with_their_switches`.

**Still to test:**
- Linux, and clippy with warnings as errors: `mise run rust` and `mise run test` (by hand, or CI)

## Measurements

Nothing to measure: a name without a `:` costs one search for it; a `:id` name is one FNV-1a over the mod's id per call, and `flagChanged` names it once, at `on()`.

## Risks

A game flag's name never holds a `:`, so no name that worked before reads anything else now. The generated docs'
schema hash (`docs/modding/*.md`) conflicts with any other schema change: whichever of this and #2656 merges second
needs `cargo run -p schema-gen` again. A filter given as `:id`
tells `e.flag` as the game name, which a listener comparing `e.flag` to the text it gave would not expect: the docs and
the record's doc say so.

## Checklist

### Ready for review

- [x] One topic, on current `mod-api`; the title is a Conventional Commit.
- [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). <!-- Windows run as Testing says; clippy and Linux: CI -->
- [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 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 built and played; Linux: CI -->
- [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)

Co-authored-by: BeanBot <[email protected]>
Reviewed-on: #2657
Co-Authored-By: Claude Opus 5.5 <[email protected]>
## Summary

Mods can't tell when the ocarina plays a song, or how it was played. A mod that wants to react to songs (a tracker, a
randomizer, a mod that changes what a song does) has nothing to listen to, and an event flow can't branch on whether a
song was sung or pressed on the buttons.

This adds two things to the Modding API:

- **`songPlayed`** in `longshot/game`: `{ frame, song, source }` for the first song the ocarina recognises in each try, keeping at most 16 songs between frames. `song` is one of
  the game's thirteen (`sunsSong`, `preludeOfLight`, `scarecrowsSong`...), `source` is `"microphone"` (sung or played on
  an instrument through the game's Ocarina Mic Input option) or `"buttons"`. It arrives at the acquire phase like the
  other game events (order 28). A filter keeps a listener to the songs it wants, as `flagChanged` does:
  `songPlayed.on(fn, { song: "sunsSong", source: "microphone" })`.
- **`bind: "ocarina.sung"`** on a `content.flag` bool: the game side sets the flag on the game's own thread the moment
  the song is recognised, before the event flow goes on, so a flow (with a flow patch, #2656) can branch on it with no
  script in the way. It comes from the same site as `songPlayed`, so `has("game.songPlayed")` says whether a build sets
  it.

How it's found: the event flows ask the query node `QueryMelodyTypeForNormal` (`f_82a7c980`) which song was recognised;
a new core site `ocarina.melody` sits just after its answer (`w1`), with an engine callback. A try is one run of the
note-wait action (the existing `ocarina.waitStart`), told once. It's the buttons' when a note button went down in the
word the game reads during the wait, including before the first controller read of the try; a button already held is
not a note until released and pressed again. It's the microphone's when no note button went down and the game listened
on the microphone at some point in the wait (the game stops its streams just before it recognises the song, so this is
kept for the whole try). If neither happened, it's the buttons'.

Read first: `game/crates/game-core/src/ocarina.rs` (the try, the site's callback, the bound flags, what the API takes),
the site's row in `game/sites/sites.toml`, then `game_events_step` in `game/crates/api/src/services/game.rs` and
`content_binds` in `services/content.rs`; the schema's `songPlayed` (`game.toml`) and `Song`, `SongSource`,
`SongPlayed`, `SongFilter` (`types.toml`). The host's part is small: `host/nn_hid.c` `oc_track` hands each read's five
note buttons and `host/nn_audio_in.c`'s new `hos_mic_listening` to `game_ocarina_notes` (`game/game.h`). The test game
plays a song with `game.playSong(song, { source })`, through the same `game_core::ocarina::tell` the site uses.

This is #2267's change, made again on the Rust mod API and the new hook sites; #2267 (the C mod API) can close. Part of
#1958's Modding API; targets `mod-api`. Magic Singing (a mod that skips the song cutscene when you sing) uses it with the
flow patches (#2656) and flags by id (#2657).

## Testing

**Tested:** Windows 11, NVIDIA GeForce RTX 4060 Laptop GPU, driver 621.24. In the game (a quick build of current
`mod-api` with this, #2656 and #2657; `dev.py game-tests`, the repository's `kokiri-start`): the lift places
`ocarina.melody` in `f_82a7c980` (`gen/edits.txt`); a mod that `requires` `game.songPlayed`, declares a flag with
`bind: "ocarina.sung"` and listens to `songPlayed` (once with a filter) starts, `has("game.songPlayed")` is true, its
bound flag is in the game, and its test passes. Checks: `cargo test -p game-core` (`ocarina`: a try told once, on the
buttons or heard, a held button that is no note, none recognised, nothing kept while not watched), `-p content` (the
content vectors: a bound bool flag, `bind` refused on an int and for an unknown target), `-p modtool` (the test game:
`songPlayed` and a filtered listener, the bound flag set at once each way, an unknown song refused), `-p api`,
`-p game-sites`, `-p sites --test repository`; `cargo check --workspace --all-targets`; `cargo run -p schema-gen --
--check`; rustfmt. Tests that fail on `mod-api` itself and here, on Windows: `api`'s
`a_content_mods_changed_module_runs_again_and_its_outputs_are_served`, `modtool`'s
`eden_and_ryujinx_mods_are_found_with_their_switches`, and `longshot-game`'s three path tests
(`a_folder_of_mods_tests_each_of_its_folders`, `a_mods_profile_sits_inside_the_launchers_save_folder`,
`a_separate_mod_moves_the_saves_into_its_profile_and_records_it`).

The C version (#2267) was played: songs on the buttons told once as `"buttons"` with the bound flag 0, songs sung told
as `"microphone"` with the flag 1 and the flow taking the bound branch. The site and the offset are the same here.

**Still to test:**
- Songs played in this build: one on the buttons and one sung, `songPlayed` and the bound flag each way (a playtest:
  the ocarina in hand)
- Linux, and clippy with warnings as errors: `mise run rust` and `mise run test` (by hand, or CI)

## Measurements

Nothing to measure: the site runs once per recognised song and sets nothing while no mod listens or binds a flag; the
note tracking is a few loads and compares per controller read.

## Risks

A new engine site in the melody query: if its signature stops matching on another build, `songPlayed` is absent there
(`has()` false), a bound flag stays false, and nothing else changes. With no mod using it, nothing a player notices. The
generated docs' schema hash (`docs/modding/*.md`), and `testing_game/tests.rs` beside #2657's new test, conflict with
#2656 and #2657: whichever merges later needs `cargo run -p schema-gen` again and both tests kept.

## Checklist

### Ready for review

- [x] One topic, on current `mod-api`; the title is a Conventional Commit.
- [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). <!-- Windows run as Testing says; clippy and Linux: CI -->
- [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 check under `tests/` that reads changed source is updated, not weakened. (`builder/crates/sites/tests/site_owners.txt` names the new site)
- [ ] Host code builds on Windows (llvm-mingw) and Linux, with UTF-8 paths. <!-- Windows built and played; Linux: CI -->
- [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)

Co-authored-by: BeanBot <[email protected]>
Reviewed-on: #2658
Co-Authored-By: Claude Opus 5.5 <[email protected]>
## Summary

On desktop and laptop GPUs without native ASTC hardware (AMD, NVIDIA, Intel), Longshot decodes large ASTC texture bursts on the GPU in `16M`-texel chunks (`RX_VK_ASTC_CHUNK_MPX`) to avoid Windows WDDM TDR timeouts. Previously, each chunk boundary blocked `Presentation_Thread` on `vkWaitForFences` just so it could reset and reuse a single upload command buffer. During zone transitions (such as entering Hyrule Field or Kokiri Forest, where `1365x1365x90` terrain arrays split into ~14 chunks), that synchronous wait stalled the presentation thread behind in-flight GPU work for **`172–332 ms` per zone entry**, causing large loading hitches and `295 ms` `vk: slow upload` spikes.

This PR gives each frame recording a small reusable pool of upload command buffers (up to 64) so `replay_flush_upload()` submits each `16M`-texel chunk asynchronously and moves immediately to the next command buffer without waiting on the GPU mid-frame. Separate submissions still protect against Windows TDR, and all chunks retire together when the frame slot is reused.

**Where this helps vs. where it doesn't:**
- **What a player notices:** Noticeably shorter area-entry freezes when walking through gates, entering new zones, or warping into large outdoor areas (Hyrule Field, Kokiri Forest, etc.) on any non-ASTC desktop/laptop GPU — replacing jarring `~0.7–0.8 s` entry hitches with `~0.34–0.46 s` transitions (`-25%` to `-53%` shorter spikes). Once already exploring a loaded area, gameplay feels unchanged.
- **Helps:** **Non-ASTC GPUs** (AMD, NVIDIA, Intel — AMD RDNA 3.5 tested; NVIDIA/Intel/RADV pending) **during zone transitions, teleports, and large ASTC texture streaming bursts**. Slashes 3-zone tour worst `astc_flush_ms` **`-99.5%`** (`332.07 -> 1.64 ms`), total `astc_flush_ms` **`-99.2%`** (`1580.42 -> 12.43 ms`), `vk: slow upload` count **`-88.0%`** (`25 -> 3`), `1365x1365x90` CPU `upload()` wall time **`-90.1%`** (`295.1 -> 29.2 ms`), and zone-entry peak frame spikes by **`-25%` to `-53%`** (Hyrule teleport `-44.5%`, Kokiri teleport `-25.4%`, Market->Kokiri transition `-53.1%`).
- **No measurable impact:** **Warm steady-state gameplay** with no large ASTC bursts (e.g., walking around already-loaded Market at `67% render scale` (`1024x576`) or `100% render scale` (`1536x864`), where `0` warm chunk flushes happen, so steady-state FPS / 1% low are within run-to-run variance), **non-ASTC uploads** (like `#490 12288x12288 NVN 0x32`), and **native-ASTC GPUs / `RX_VK_ASTC_CPU=1` / `RX_VK_ASTC_CHUNK_MPX=0`**. On initial Market save-load, non-ASTC load work still dominates the peak frame (`791.8 -> 809.7 ms`, within single-run variance, even though its `astc_flush_ms` dropped `201.37 -> 1.64 ms`).

**Technical details:**
- Store a reusable vector of primary command buffers (`Recording::upload_bufs`, capped at `kMaxAsyncUploadChunks = 64` with a bounded-sync fallback) in `r->upload_pool` (`gpu/vk/vk_replay.cpp`).
- Update `replay_flush_upload(VkCommandBuffer& cur)` (`gpu/vk/vk_internal.h`, `vk_replay.cpp`, `vk_texture.cpp`) to submit each finished `16M`-texel chunk asynchronously (`VK_NULL_HANDLE` fence on FIFO `dev.queue`), advance `r->upload`, `cur`, and `vk_texture`'s `up_cmd` to the next command buffer, and return immediately without mid-frame `vkWaitForFences`.
- Rebind `RX_VK_PASS_TIMING` (`gprof_rebind_upload()` in `gpu/vk/vk_gprof.h` / `vk_gprof.cpp`, plus `gprof_submitted(r.slot, uploads || r.upload_idx > 0)`) whenever `replay_flush_upload()` switches command buffers so GPU pass timing captures all ASTC upload chunks `0..N`.
- `full_barrier()` serializes GPU access to `bc_scratch`/`bc_out` across chunks, staging remains alive until slot reuse, and `recording_wait(r)` + `vkResetCommandPool(r.upload_pool)` retire all chunks in O(1).

Read first: `replay_flush_upload()` in `gpu/vk/vk_replay.cpp` and `upload_astc_gpu()` in `gpu/vk/vk_texture.cpp`.

## Testing

**How to test:**
1. **Hardware / config requirement:** Needs a **non-ASTC GPU** (AMD/NVIDIA/Intel) with GPU ASTC decode enabled (`RX_VK_ASTC_CPU=0`, default `RX_VK_ASTC_CHUNK_MPX=16`).
2. **Game-free tests:** Run `python -I -B tests/test_async_astc_upload_chunks.py` (fails on `main`, passes here) plus `tests/test_astc_upload_chunking.py`, `tests/test_astc_pass_timing.py`, `tests/test_draw_stream_visibility.py`, `tests/test_fsr_image_retirement.py`, and `tests/test_fsr_uniform_ownership.py`.
3. **Trigger real ASTC bursts (zone transitions):** Do **not** test only a warm Market loop (which triggers `0` chunk flushes). Instead, load Market and transition/teleport into **Hyrule Field** and **Kokiri Forest** (streaming `1365x1365x90` 11-mip ASTC terrain arrays).
4. **Verify the drop in logs and frame times:**
   - In `longshot_log.txt`: count `vk: slow upload` lines and check `1365x1365x1 x90` upload durations (should drop from `~158–295 ms` to `~18–29 ms`, with `slow upload` count dropping sharply).
   - In `frames.csv`: compare `astc_flush_ms` (should drop from `~170–330 ms` spikes to `< 2 ms`) and zone-entry peak frame times.
5. **Stability & pass-timing check:** Confirm `0` `VK_ERROR_DEVICE_LOST` and clean terrain/prop textures across all zones; optionally run with `RX_VK_PASS_TIMING=2` to verify `u astc` spans still report cleanly across multi-chunk uploads.

**Tested:** Windows 11 (build 26200), AMD Ryzen AI 7 350 + AMD Radeon 860M (8 CUs, RDNA 3.5 iGPU, Adrenalin 26.10.1), `1600x1000`, `handheld_profile=1`, `sharpness=80`, `vsync=0`, `amd_anti-lag_2=1`, `RX_VK_PRECOMPILE=1`, `>= 12.5 s` post-load settle:
- 3-zone tour (`Market -> Hyrule Field -> Kokiri Forest`, `67% render scale`, `1024x576`): `0` `VK_ERROR_DEVICE_LOST`, `vk: slow upload` count dropped `25 -> 3`, worst `astc_flush_ms` dropped `332.07 -> 1.64 ms`, total `astc_flush_ms` dropped `1580.42 -> 12.43 ms`.
- `Market_Child` fountain-first route (`67% render scale` `1024x576` 3 interleaved rounds, `100% render scale` `1536x864` 3 interleaved rounds) + `RX_VK_PASS_TIMING=2` (`67% render scale`, `1024x576`): `astc_flush_ms = 0.000 [0.000, 0.000]` at both `67% render scale` (`1024x576`) and `100% render scale` (`1536x864`), `0` `>= 50 ms` frames, `gprof_rebind_upload` logged `u astc` cleanly with `0` `VK_ERROR_DEVICE_LOST`.
- Stationary `RX_VK_SHOT_FX=1` (`sharpness=80`) visual inspection: scene textures and ASTC terrain/props match `main` cleanly with zero corruption.
- Game-free tests (on current `main @ 0e32bc10` with `dev.py env` `llvm-mingw` + `RX_CPM`):
  - `tests/test_async_astc_upload_chunks.py` (new; exercises async chunk submits, slot reuse, `kMaxAsyncUploadChunks` fallback, error-path `vkQueueWaitIdle` ordering, and `gprof_rebind_upload`): **FAIL** on `main` (`753fb5af`), **PASS** on this branch (`37687772`).
  - Targeted `--strict` suite (`test_async_astc_upload_chunks`, `test_astc_upload_chunking`, `test_astc_pass_timing`, `test_draw_stream_visibility`, `test_fsr_image_retirement`, `test_fsr_uniform_ownership`, `test_vk_braces`, `test_utf8_paths`, `test_doc_anchors`): **9 passed, 0 failed, 0 skipped**.
  - `python -I -B tests/run_all.py --changed forge/main`: **211 passed, 2 failed, 5 skipped** — both failures are pre-existing Windows-only `main` failures documented in `#2304` (`test_perf_report`, `test_dev_packs`).

**Still to test:**
- NVIDIA and Intel GPUs: 3-zone tour (`Market -> Hyrule Field -> Kokiri Forest`), expecting reduced zone-entry hitching and `0` `VK_ERROR_DEVICE_LOST` (@Beanstalk Windows NVIDIA, Linux RADV).

## Measurements

> **Rebase note:** Rebased onto `forge/mod-api @ cc65101d` (head `e16752fd`). Measurements below were captured on `main` prior to the `mod-api` rebase.

**Verdict:** Large, unmistakable win during zone transitions and ASTC texture bursts: slashes worst `astc_flush_ms` **`-99.5%`** (`332.07 -> 1.64 ms`), total `astc_flush_ms` **`-99.2%`** (`1580.42 -> 12.43 ms`), `vk: slow upload` count **`-88.0%`** (`25 -> 3`), `1365x1365x90` CPU `upload()` wall time **`-90.1%`** (`295.1 -> 29.2 ms`), and zone-entry peak frame spikes **`-25.4%` to `-53.1%`**. Warm steady-state Market (`67% render scale` `1024x576` and `100% render scale` `1536x864`) has `0` chunk flushes and shows **no measurable difference (within run-to-run variance)**, as expected.

Setup: Windows 11, AMD Ryzen AI 7 350 + Radeon 860M (Adrenalin 26.10.1), `1600x1000`, `handheld_profile=1`, `sharpness=80`, `vsync=0`, `amd_anti-lag_2=1`, `RX_VK_PRECOMPILE=1`, symmetric pre-warmed shader/pipeline caches. Measured standalone directly against `main @ 753fb5af`; rebased cleanly onto `main @ 0e32bc10` (`37687772` — none of the 8 intervening commits touch ASTC upload chunking, `replay_flush_upload`, or `vk_texture.cpp`, so the numbers hold unchanged). 3-zone tour and Market->Kokiri transition run are single runs; steady-state Market values are `median [min, max]` across 3 interleaved rounds.

**Where it makes a difference (zone transitions & ASTC upload bursts):**

| Metric | Before: `main @ 753fb5af` | After: this PR @ `37687772` | Change |
|---|---|---|---|
| **3-Zone Tour worst `astc_flush_ms` (`67% render scale`, `1024x576`)** | `332.07 ms` | **`1.64 ms`** | **`-330.43 ms` (`-99.5%`)** |
| **3-Zone Tour total `astc_flush_ms` (`67% render scale`, `1024x576`)** | `1580.42 ms` (`41` frames) | **`12.43 ms` (`22` frames)** | **`-1567.99 ms` (`-99.2%`)** |
| **3-Zone Tour `vk: slow upload` count (`67% render scale`, `1024x576`)** | `25` | **`3`** | **`-22` (`-88.0%`)** |
| **3-Zone Tour `vk: slow upload` overall max (`67% render scale`, `1024x576`)** | `295.1 ms` (ASTC `1365x1365x90`) | **`65.4 ms`** (non-ASTC `#490 NVN 0x32`) | **`-229.7 ms` (`-77.8%`)** |
| **3-Zone Tour `1365x1365x90` CPU `upload()` wall time (`67% render scale`, `1024x576`)** | `295.1 ms` | **`29.2 ms` (GPU decode async on `dev.queue`)** | **`-265.9 ms` (`-90.1%`)** |
| **3-Zone Tour Hyrule teleport peak frame (`67% render scale`, `1024x576`)** | `831.3 ms` | **`461.4 ms`** | **`-369.9 ms` (`-44.5%`)** |
| **3-Zone Tour Kokiri teleport peak frame (`67% render scale`, `1024x576`)** | `540.2 ms` | **`402.8 ms`** | **`-137.4 ms` (`-25.4%`)** |
| **Market->Kokiri transition run peak frame (`67% render scale`, `1024x576`)** | `717.3 ms` | **`336.2 ms`** | **`-381.1 ms` (`-53.1%`)** |

**Where it does NOT make a difference (within run-to-run variance):**

| Metric | Before: `main @ 753fb5af` | After: this PR @ `37687772` | Change |
|---|---|---|---|
| 3-Zone Tour initial Market save-load frame (`67% render scale`, `1024x576`) | `791.8 ms` (`astc_flush_ms 201.37 ms`) | `809.7 ms` (`astc_flush_ms 1.64 ms`) | No measurable difference (within run-to-run variance; non-ASTC load dominates, `astc_flush_ms` `-99.2%`) |
| Market `67% render scale` (`1024x576`) Median FPS (3 rounds, `0` warm flushes) | `54.38 [53.59, 54.50]` | `53.63 [53.36, 54.56]` | No measurable difference (within run-to-run variance; path inactive) |
| Market `67% render scale` (`1024x576`) Mean FPS (3 rounds, `0` warm flushes) | `53.68 [52.66, 54.00]` | `53.04 [52.56, 53.98]` | No measurable difference (within run-to-run variance; path inactive) |
| Market `67% render scale` (`1024x576`) 1% Low FPS (3 rounds, `0` warm flushes) | `38.95 [36.86, 39.10]` | `38.42 [36.52, 39.16]` | No measurable difference (within run-to-run variance; path inactive) |
| Market `67% render scale` (`1024x576`) `astc_flush_ms` (3 rounds) | `0.005 [0.005, 0.013] ms` | `0.000 [0.000, 0.000] ms` | `~0 ms` flush on both (path inactive in warm Market) |
| Market `100% render scale` (`1536x864`) Median FPS (3 rounds, `0` warm flushes) | `45.11 [44.92, 45.29]` | `45.21 [45.21, 45.21]` | No measurable difference (within run-to-run variance; path inactive) |
| Market `100% render scale` (`1536x864`) Mean FPS (3 rounds, `0` warm flushes) | `44.79 [44.25, 44.98]` | `44.56 [44.38, 44.71]` | No measurable difference (within run-to-run variance; path inactive) |
| Market `100% render scale` (`1536x864`) 1% Low FPS (3 rounds, `0` warm flushes) | `32.89 [31.36, 33.52]` | `30.95 [30.89, 32.26]` | No measurable difference (within run-to-run variance; path inactive) |
| Market `100% render scale` (`1536x864`) `astc_flush_ms` (3 rounds) | `0.011 [0.004, 0.014] ms` | `0.000 [0.000, 0.000] ms` | `~0 ms` flush on both (path inactive in warm Market) |
| Market `100% render scale` (`1536x864`) `>= 50 ms` frames (3 rounds) | `0 [0, 0]` | `0 [0, 0]` | `0` frames on both (path inactive in warm Market) |

```text
# Before (3-zone tour, main @ 753fb5af):
[hos Presentation Thread] vk: slow upload 158.5 ms: #130 0x10a22aa600 1365x1365x1 x90 levels 11 NVN 0x8e ASTC (BC3), 57825 of 57825 KB
[hos Presentation Thread] vk: slow upload 41.2 ms: #490 0x1147c16000 12288x12288x1 x1 levels 1 NVN 0x32, 294912 of 294912 KB
[hos Presentation Thread] vk: slow upload 295.1 ms: #4178 0x10a5b22c00 1365x1365x1 x90 levels 11 NVN 0x80 ASTC (BC3), 57825 of 57825 KB
[hos host] vk: slow submit: 32.5 ms: draw 31.2 descriptors 29.9 texture lookups 29.3 uploads 20.3

# After (3-zone tour, this PR @ 37687772):
[hos Presentation Thread] vk: slow upload 18.1 ms: #130 0x10a22aa600 1365x1365x1 x90 levels 11 NVN 0x8e ASTC (BC3), 57825 of 57825 KB
[hos Presentation Thread] vk: slow upload 65.4 ms: #490 0x1147c16000 12288x12288x1 x1 levels 1 NVN 0x32, 294912 of 294912 KB
[hos Presentation Thread] vk: slow upload 29.2 ms: #4110 0x10a5b22c00 1365x1365x1 x90 levels 11 NVN 0x80 ASTC (BC3), 57825 of 57825 KB
[hos Presentation Thread] vi: present intervals: <15.5 ms 71, 15.5-17.8 77, 17.8-22 88, 22-30 25, 30-40 7, over 40 2
```

## Risks

- **Command-buffer count bound:** Each `Recording` slot caches at most `kMaxAsyncUploadChunks = 64` primary command buffers (`> 1,024M` texels in one recording) before falling back to the bounded-sync `r->fence` + `vkResetCommandPool` path, preventing unbounded pool growth.
- **GPU ordering & WDDM TDR:** All chunks submit to the same FIFO `dev.queue` with `full_barrier()` at chunk boundaries (protecting `bc_scratch`/`bc_out`) and separate `vkQueueSubmit2` packets (preserving Windows WDDM TDR protection). Staging buffers remain live until `recording_wait(r)` on slot reuse.
- **Turn off / rollback:** `RX_VK_ASTC_CHUNK_MPX=0` disables chunk splitting entirely (leaving a single upload submission); reverting the commit restores synchronous per-chunk fence waits while keeping WDDM TDR chunk splitting. No save, options, or cache changes.

## Checklist

### Ready for review

- [x] One topic, on current `mod-api` (`cc65101d`); the title is a Conventional Commit.
- [x] Tested on my own PC, in the game for a change the game runs, as Testing says.
- [x] `mise run test` passes (`tests/run_all.py --changed forge/main` on Windows: 211 passed, 2 pre-existing Windows-only `main` failures named in `#2304`: `test_perf_report`, `test_dev_packs`; targeted `--strict` suite 9/9 passed).
- [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 check under `tests/` that reads changed source is updated, not weakened (`tests/test_astc_upload_chunking.py`, `tests/draw_stream_visibility_test.cpp`, `tests/fsr_image_retirement_test.cpp`, and `tests/fsr_uniform_ownership_test.cpp` updated; all pass).
- [x] Host code builds on Windows (llvm-mingw) and Linux, with UTF-8 paths.
- [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.

Reviewed-on: #2330
merge: #2658 into mod-api over main's merge (#2434)
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
CI / Third-party parts and guide screenshots (pull_request) Failing after 35s
PR description / Title and description (pull_request_target) Successful in 51s
CI / What the change needs (pull_request) Successful in 4m8s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Has been cancelled
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
acf53c1a0a
Co-Authored-By: Claude Opus 5.5 <[email protected]>
## Summary

Longshot's simulated-turf system keeps a private GPU copy of the game's grass buffers so it can grow them when dense grass overflows the Switch 2's stock buffer size (`#2174`). Previously, it allocated those private buffers (~28 MB) immediately at stock size and copied **`~14.4 MB` of grass data back into the game's buffers every single frame** with a full-GPU barrier — even in areas with almost no grass (like cobblestone Market, `0–197` blades) or normal Hyrule Field (`~17,000` blades, well under the `143,360`-blade stock limit).

This PR lets simulated turf write directly into the game's own buffers whenever demand fits within stock capacity, eliminating the per-frame `~14.4 MB` mirror copy, the full-GPU barrier, and the duplicate VRAM allocation **game-wide** (Hyrule Field, Market, Kokiri Forest, dungeons — every scene that uses simulated turf within stock capacity). If dense grass ever approaches the stock limit (`>= 7/8 * stock`), it seamlessly promotes to a larger private buffer just as before and retires it back to the game's buffer after 600 quiet frames.

**Where this helps vs. where it doesn't:**
- **What a player notices:** Not directly visible by eye (`+0.3%` to `+1.0%` FPS is too small to feel without an FPS counter). Its real value is quiet, zero-downside efficiency — stopping `~14.4 MB/frame` of wasted GPU memory bandwidth and freeing **`48–80 MB` of VRAM** everywhere in the game, which gives extra headroom on tight 6–8 GB GPUs and iGPU laptops/handhelds (Steam Deck, 780M/860M/890M) sitting near a frame-rate or VRAM edge.
- **Helps:** **All GPUs** (AMD RDNA 3.5 tested; NVIDIA/Intel/RADV pending) in **GPU-bound scenes game-wide** at normal/stock turf density (including normal Hyrule Field with `~54,000` blades and Market at `100% render scale`). Eliminates the `0.422 ms` turf mirror-copy span (`< 0.093 ms`, total `m dispatch` `-10.1%`), cuts GPU frame time **`-0.47 ms` (`-2.9%`)** at Market `100% render scale` (`1536x864`) and **`-0.50 ms` (`-2.5%`)** at Hyrule Field `100% render scale` (`1382x864`), saves **`-80 MB` steady VRAM** in Market `100% render scale` (from avoiding the `~28 MB` private buffers plus VMA `64/32 MB` block granularity), and lifts Median FPS **`+1.0%`** in Market `100% render scale` and **`+0.3%`** in Hyrule Field `100% render scale` (all 3 rounds non-overlapping in both zones).
- **No measurable impact:** **CPU-bound scenes** (such as Market `67% render scale`, `1024x576`, on this 8-CU iGPU, where GPU time sits around `12.4–12.8 ms` inside an `~18.4 ms` frame, so FPS/VRAM deltas fall within run-to-run variance) and **extreme dense-turf settings** that exceed `7/8 * stock` (which intentionally promote to a private buffer like `main`).

**Technical details:**
- Keep simulated-turf lists on the game's own buffer while `policy.target() <= stock` in adaptive mode (`gpu/vk/vk_draw.cpp`: `sim_turf_private_binding()` and `sim_turf_bound_result()`), leaving `sim_turf_bound()` empty so `mirrors` is empty (`0 MB/frame` copied).
- Narrow `sim_turf_sample_demand()`'s post-copy barrier from `ALL_COMMANDS_BIT | MEMORY_READ_BIT` to `HOST_BIT | COMPUTE_SHADER_BIT` with `HOST_READ_BIT` access when `mirrors.empty()` (only the 4-byte demand readback copies ran), preserving the copy-to-compute execution dependency.
- Keep `RX_VK_SIM_TURF_ADAPTIVE=0` as a runtime A/B and kill switch (`want_private = !sim_turf_adaptive() || g.policy.target() > stock`; `gpu/vk/switches.def` updated) and guard the stock-passthrough descriptor fallback against `RX_VK_SSBO_STRETCH=1` and `RX_VK_SSBO_WIDE` (`&& !Shader::IsSimTurfStorage(d)`).

Read first: `sim_turf_private_binding()` and `sim_turf_sample_demand()` in `gpu/vk/vk_draw.cpp`.

See #2174, #2093.

## Testing

**How to test:**
1. **Game-free tests:** Run `python -I -B tests/test_sim_turf_stock_passthrough.py` (fails on `main`, passes here) plus `tests/test_sim_turf_floor.py`, `tests/test_sim_turf_capacity_policy.py`, `tests/test_sim_turf_pools.py`, and `tests/test_switch_table.py`.
2. **Confirm passthrough is active:** Run the game into Market or Hyrule Field and check `longshot_log.txt` for `vk: simulated turf: prog 3de6d86ec7e6720e` — it should log `: the game's own` instead of `: the private one`.
3. **Verify the GPU span drop:** Run with `RX_VK_PASS_TIMING=2` in Market; `dispatch indirect prog 3de6d86ec7e6720e` should drop from `~0.42 ms` out of the top-25 spans (`< 0.093 ms`) and `m dispatch` should drop by `~0.45 ms`.
4. **Measure FPS / GPU time / VRAM:** Use a **GPU-bound** scene (e.g., Market or Hyrule Field at `100% render scale` — avoid CPU-bound `67% render scale` (`1024x576`) where GPU savings are hidden by CPU frame time). Compare `main` vs. this PR (or toggle `RX_VK_SIM_TURF_ADAPTIVE=0` vs. `=1` on this build) across `>= 3` interleaved rounds with `>= 12.5 s` post-load settle.
5. **Visual & promotion check:** Walk `Market -> Hyrule Field -> Kokiri Forest` and confirm grass renders cleanly with `0` `VK_ERROR_DEVICE_LOST`. Optionally raise turf density past `7/8 * stock` in Hyrule Field to verify promotion to a private buffer and clean retirement after 600 quiet frames back in Market.

**Tested:** Windows 11 (build 26200), AMD Ryzen AI 7 350 + AMD Radeon 860M (8 CUs, RDNA 3.5 iGPU, Adrenalin 26.10.1), `1600x1000`, `handheld_profile=1`, `sharpness=80`, `vsync=0`, `amd_anti-lag_2=1`, `RX_VK_PRECOMPILE=1`, `>= 12.5 s` post-load settle:
- `Market_Child` fountain-first route (`67% render scale` `1024x576` 3 interleaved rounds, `100% render scale` `1536x864` 3 interleaved rounds) + `RX_VK_PASS_TIMING=2` (`67% render scale`, `1024x576`): `vk: simulated turf: prog 3de6d86ec7e6720e` logged `: the game's own`; span dropped from `0.422 ms` to `< 0.093 ms` (absent from top 25 spans; total `m dispatch` `4.515 -> 4.060 ms`, `-10.1%`).
- `HyruleField_Child` in-bounds grassy-field orbit (`castle-gate`, `100% render scale`, `1382x864` at `16:10`, 3 interleaved rounds): all simulated turf bindings logged `: the game's own` (peak `~54,000 / 143,360` blades), `0` `VK_ERROR_DEVICE_LOST`, `0` exit/transition frames (`min >= 17.67 ms`), and GPU time + Median FPS beat `main` across all 3 rounds.
- 3-zone tour (`Market -> Hyrule Field -> Kokiri Forest`, `67% render scale`, `1024x576`): `0` `VK_ERROR_DEVICE_LOST`, `0` write-back timeouts, turf rendered cleanly in Hyrule Field.
- Stationary `RX_VK_SHOT_FX=1` (`sharpness=80`) visual inspection: scene lighting, geometry, and textures match `main` cleanly with zero artifacts.
- Game-free tests (on current `main @ 0e32bc10` with `dev.py env` `llvm-mingw` + `RX_CPM`):
  - `tests/test_sim_turf_stock_passthrough.py` (new; tests `RX_VK_SIM_TURF_ADAPTIVE=1` and `=0`, promotion/retirement, and `RX_VK_SSBO_STRETCH`/`RX_VK_SSBO_WIDE` guards): **FAIL** on `main` (`753fb5af`), **PASS** on this branch (`3641cc34`).
  - Targeted `--strict` suite (`test_sim_turf*`, `test_switch_table`, `test_vk_braces`, `test_utf8_paths`, `test_doc_anchors`): **9 passed, 0 failed, 0 skipped**.
  - `python -I -B tests/run_all.py --changed forge/main`: **181 passed, 7 failed, 6 skipped** — all 7 failures are pre-existing Windows-only `main` failures documented in `#2304` (`test_sampler_admission`, `test_pipeline_state_computes`, `test_crash_dialog`, `test_dev_packs`, `test_saveload_warm_cache`, `test_dev_ab`, `test_input_movie`).

**Still to test:**
- Dense simulated-turf settings in Hyrule Field (`Turf density` high enough to exceed `7/8 * stock`): confirm seamless promotion to private buffer, zero flicker, and retirement back to game buffer after 600 quiet frames in Market (by hand).
- NVIDIA and Intel GPUs: Market -> Hyrule Field -> Market walk, expecting no regressions and identical GPU bandwidth savings (@Beanstalk Windows NVIDIA, Linux RADV).

## Measurements

> **Rebase note:** Rebased onto `forge/mod-api @ cc65101d` (head `ff44be69`). Measurements below were captured on `main` prior to the `mod-api` rebase.

**Verdict:** Clear, repeatable win across GPU-bound zones and pass timing: eliminates the `0.422 ms` turf mirror-copy span (`m dispatch` **`-10.1%`**); at GPU-bound Market `100% render scale` (`1536x864`) cuts GPU time **`-0.47 ms` (`-2.9%`)**, steady VRAM **`-80 MB`**, and lifts Median/Mean FPS **`+1.0%`**; and at GPU-bound Hyrule Field `100% render scale` (`1382x864` at `16:10`) cuts GPU time **`-0.50 ms` (`-2.5%`)** and lifts Median FPS **`+0.3%`** (`+0.13 FPS`) with non-overlapping 3-round ranges in both zones. Near-CPU-bound Market `67% render scale` (`1024x576`) and overlapping secondary metrics show **no measurable difference (within run-to-run variance)**.

Setup: Windows 11, AMD Ryzen AI 7 350 + Radeon 860M (Adrenalin 26.10.1), `1600x1000`, `handheld_profile=1`, `sharpness=80`, `vsync=0`, `amd_anti-lag_2=1`, `RX_VK_PRECOMPILE=1`, symmetric pre-warmed shader/pipeline caches (`>= 12.5 s` settle): fountain-first `Market_Child` route (`1536x864` at `100% render scale`, `1024x576` at `67% render scale`) and in-bounds `HyruleField_Child` grassy-field orbit (`1382x864` at `100% render scale` `16:10`). Measured standalone directly against `main @ 753fb5af`; rebased cleanly onto `main @ 0e32bc10` (`3641cc34` — none of the 8 intervening commits touch `vk_draw.cpp` or simulated turf, and `#2232`'s 4-core Auto threshold does not change behavior on this 8-core CPU, so the numbers hold unchanged). Multi-round values are `median [min, max]` across 3 interleaved rounds.

**Where it makes a difference (GPU-bound Market & Hyrule Field at `100% render scale`, and pass timing):**

| Metric | Before: `main @ 753fb5af` | After: this PR @ `3641cc34` | Change |
|---|---|---|---|
| **`3de6d86ec7e6720e` span (Market `67% render scale`, `1024x576`, `PASS_TIMING=2`)** | `0.422 ms` | **`< 0.093 ms` (out of top 25)** | **`>= -0.329 ms` (`>= -78%`)** |
| **Total `m dispatch` (Market `67% render scale`, `1024x576`, `PASS_TIMING=2`)** | `4.515 ms` | **`4.060 ms`** | **`-0.455 ms` (`-10.1%`)** |
| **Market `100% render scale` (`1536x864`) GPU time (3 rounds)** | `16.49 [16.48, 16.67] ms` | **`16.02 [15.95, 16.35] ms`** | **`-0.47 ms` (`-2.9%`) — all 3 rounds faster** |
| **Market `100% render scale` (`1536x864`) steady VRAM (3 rounds)** | `3245 [3213, 3277] MB` | **`3165 [3133, 3197] MB`** | **`-80 MB` (~28 MB buffers + VMA block rounding) — all 3 rounds lower** |
| **Market `100% render scale` (`1536x864`) Median FPS (3 rounds)** | `45.11 [44.92, 45.29]` | **`45.56 [45.55, 46.02]`** | **`+0.45 FPS` (`+1.0%`) — all 3 rounds faster** |
| **Market `100% render scale` (`1536x864`) Mean FPS (3 rounds)** | `44.79 [44.25, 44.98]` | **`45.25 [45.13, 45.61]`** | **`+0.46 FPS` (`+1.0%`) — all 3 rounds faster** |
| **Hyrule Field `100% render scale` (`1382x864`) GPU time (3 rounds)** | `19.88 [19.59, 21.24] ms` | **`19.38 [19.31, 19.56] ms`** | **`-0.50 ms` (`-2.5%`) — all 3 rounds faster** |
| **Hyrule Field `100% render scale` (`1382x864`) Median FPS (3 rounds)** | `38.70 [37.59, 38.70]` | **`38.83 [38.73, 38.93]`** | **`+0.13 FPS` (`+0.3%`) — all 3 rounds faster** |
| **Hyrule Field `100% render scale` (`1382x864`) Median frame ms (3 rounds)** | `25.84 [25.84, 26.61] ms` | **`25.75 [25.69, 25.82] ms`** | **`-0.09 ms` (`-0.3%`) — all 3 rounds faster** |

**Where it does NOT make a difference (within run-to-run variance):**

| Metric | Before: `main @ 753fb5af` | After: this PR @ `3641cc34` | Change |
|---|---|---|---|
| Market `100% render scale` (`1536x864`) 1% Low FPS (3 rounds) | `32.89 [31.36, 33.52]` | `33.36 [33.22, 34.04]` | No measurable difference (within run-to-run variance) |
| Market `100% render scale` (`1536x864`) `>= 33.3 ms` frames (3 rounds) | `7 [3, 10]` | `4 [4, 6]` | No measurable difference (within run-to-run variance) |
| Market `67% render scale` (`1024x576`) Median FPS (3 rounds, CPU-bound) | `54.38 [53.59, 54.50]` | `54.87 [53.11, 55.01]` | No measurable difference (within run-to-run variance) |
| Market `67% render scale` (`1024x576`) Mean FPS (3 rounds, CPU-bound) | `53.68 [52.66, 54.00]` | `54.21 [52.06, 54.28]` | No measurable difference (within run-to-run variance) |
| Market `67% render scale` (`1024x576`) 1% Low FPS (3 rounds, CPU-bound) | `38.95 [36.86, 39.10]` | `38.55 [34.00, 39.41]` | No measurable difference (within run-to-run variance) |
| Market `67% render scale` (`1024x576`) GPU time (3 rounds, CPU-bound) | `12.82 [12.73, 12.99] ms` | `12.41 [12.39, 13.02] ms` | No measurable difference (within run-to-run variance) |
| Market `67% render scale` (`1024x576`) steady VRAM (3 rounds) | `3085 [3053, 3149] MB` | `3037 [2973, 3133] MB` | No measurable difference (within run-to-run variance) |
| Hyrule Field `100% render scale` (`1382x864`) Mean FPS (3 rounds) | `38.56 [37.02, 38.66]` | `38.64 [38.58, 38.80]` | No measurable difference (within run-to-run variance) |
| Hyrule Field `100% render scale` (`1382x864`) 1% Low FPS (3 rounds) | `29.03 [23.29, 29.37]` | `29.56 [28.11, 30.01]` | No measurable difference (within run-to-run variance) |
| Hyrule Field `100% render scale` (`1382x864`) `>= 33.3 ms` frames (3 rounds) | `16 [16, 45]` | `15 [12, 30]` | No measurable difference (within run-to-run variance) |
| Hyrule Field `100% render scale` (`1382x864`) `gpu_wait_ms` (3 rounds) | `4.04 [3.66, 5.71] ms` | `4.64 [3.91, 4.64] ms` | No measurable difference (within run-to-run variance) |
| Hyrule Field `100% render scale` (`1382x864`) steady VRAM (3 rounds) | `2858 [2858, 2986] MB` | `2810 [2810, 3098] MB` | No measurable difference (within run-to-run variance) |

```text
# Before (PASS_TIMING=2, Market 67% render scale, 1024x576):
[hos Presentation Thread] vk: simulated turf: prog 3de6d86ec7e6720e stage 5 c0+0x50 (blade list) at 0x117e4f0000: the private one
[hos Presentation Thread] vk:     m dispatch    4.515 ms  35.1%    120.7 spans     120.7 items     0.00 MB     37.4 us a span
[hos Presentation Thread] vk:   m   0.422 ms     1.0 x    421.7 us       1.0 items    0.00 MB  dispatch indirect prog 3de6d86ec7e6720e

# After (PASS_TIMING=2, Market 67% render scale, 1024x576 — 3de6d86ec7e6720e absent from top 25, lowest logged span is 0.093 ms):
[hos Presentation Thread] vk: simulated turf: prog 3de6d86ec7e6720e stage 5 c0+0x50 (blade list) at 0x117e4f0000: the game's own
[hos Presentation Thread] vk:     m dispatch    4.060 ms  32.6%    119.2 spans     119.2 items     0.00 MB     34.1 us a span

# Before (Market 100% render scale, 1536x864, round 2):
[hos Presentation Thread] vk: GPU time 16.5 ms a frame (the longest submission 6.3 ms); 3.6 textures made a frame: colour targets 1.9 (4.3 MB), depth 1.6 (3.5 MB), ASTC or BC 0.0 (0.0 MB), other 0.0 (0.0 MB)
[hos Presentation Thread] vk: VRAM: 3277 MB used of 12212 MB allowed (259 MB of it free in the blocks); textures 2584 MB (budget 4096 MB), 2297 textures

# After (Market 100% render scale, 1536x864, round 2):
[hos Presentation Thread] vk: GPU time 16.3 ms a frame (the longest submission 7.4 ms); 3.8 textures made a frame: colour targets 2.1 (3.8 MB), depth 1.4 (3.2 MB), ASTC or BC 0.4 (0.2 MB), other 0.0 (0.0 MB)
[hos Presentation Thread] vk: VRAM: 3133 MB used of 12212 MB allowed (235 MB of it free in the blocks); textures 2632 MB (budget 4096 MB), 2256 textures

# Before (Hyrule Field 100% render scale, 1382x864, round 1):
[hos Presentation Thread] vk: simulated turf: prog 3de6d86ec7e6720e stage 5 c0+0x50 (blade list) at 0x117e070000: the private one
[hos host] vk: simulated turf: frame 3611: blade lists 3598 found, 2 made, 0 retaken, 0 absent, 0 lost; pools 14382 found, 4 made, 0 retaken, 0 absent, 0 lost; peak demand blade 54018/143360, pool 42519/138240 records
[hos Presentation Thread] vk: GPU time 20.0 ms a frame (the longest submission 9.7 ms); 1.1 textures made a frame: colour targets 0.8 (1.3 MB), depth 0.3 (0.7 MB), ASTC or BC 0.0 (0.0 MB), other 0.0 (0.0 MB)

# After (Hyrule Field 100% render scale, 1382x864, round 1):
[hos Presentation Thread] vk: simulated turf: prog 3de6d86ec7e6720e stage 5 c0+0x50 (blade list) at 0x117e070000: the game's own
[hos host] vk: simulated turf: frame 3523: blade lists 3598 found, 2 made, 0 retaken, 0 absent, 0 lost; pools 14380 found, 4 made, 0 retaken, 0 absent, 0 lost; peak demand blade 53988/143360, pool 42402/138240 records
[hos Presentation Thread] vk: GPU time 18.0 ms a frame (the longest submission 8.8 ms); 0.7 textures made a frame: colour targets 0.5 (0.6 MB), depth 0.2 (0.4 MB), ASTC or BC 0.0 (0.0 MB), other 0.0 (0.0 MB)
```

## Risks

- **Promotion/demotion transitions:** Under dense turf settings where demand crosses `7/8 * stock`, the list promotes from the game's buffer to a newly allocated private buffer on the next creator dispatch; after 600 quiet frames, it retires the private buffer (reaped after the GPU timeline passes it) and returns to the game's buffer. `tests/test_sim_turf_stock_passthrough.py` verifies the full lifecycle including retirement and destruction.
- **No `#2174` regression:** Because the producer writes directly into the game's own buffer on every frame at stock capacity, the game's buffer remains continuously marked written (never introducing a sudden first write-back when entering Hyrule Field).
- **Turn off / rollback:** `RX_VK_SIM_TURF_ADAPTIVE=0` immediately restores stock-sized private buffers for A/B comparison; a revert is also clean. No save/options/cache format changes. Players notice nothing in their files.

## Checklist

### Ready for review

- [x] One topic, on current `mod-api` (`cc65101d`); the title is a Conventional Commit.
- [x] Tested on my own PC, in the game for a change the game runs, as Testing says.
- [x] `mise run test` passes (`tests/run_all.py --changed forge/main` on Windows: 181 passed, 7 pre-existing Windows-only `main` failures named in `#2304`: `test_sampler_admission`, `test_pipeline_state_computes`, `test_crash_dialog`, `test_dev_packs`, `test_saveload_warm_cache`, `test_dev_ab`, `test_input_movie`; targeted `--strict` suite 9/9 passed).
- [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 switch added or changed: it ships at the default the measurements chose, with its row in `gpu/vk/switches.def`.
- [x] A check under `tests/` that reads changed source is updated, not weakened (`test_sim_turf_floor.py`, `test_sim_turf_capacity_policy.py`, `test_sim_turf_pools.py`, and `test_switch_table.py` all pass).
- [x] Host code builds on Windows (llvm-mingw) and Linux, with UTF-8 paths.
- [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.

Co-authored-by: BeanBot <[email protected]>
Reviewed-on: #2328
## Summary

When `Render resolution` was set to `Auto` (`opts.resolution = 0`), `menu_auto_tune()` exited early and the renderer relied solely on the game's own internal dynamic resolution (tuned for Switch 2 hardware, not PC upscaler or frame-generation budgets). In GPU-heavy scenes like Market and Hyrule Field on an integrated GPU, the game remained at 75% (`1200x750`) even when AMD FSR 3.1 + 2x Frame Generation drove GPU time to 29-30 ms per frame (~30 FPS native, 1% lows below 26 FPS). Furthermore, when render resolution changed mid-play while AMD FSR 3.1 Frame Generation was active, `gpu/vk/vk_fsr3fi.cpp` tore down and reallocated all ~30+ internal resources, including ~25 display-sized optical-flow, luminance, and `made[]` images that depend solely on display dimensions, triggering frame spikes of +83.5 ms (126.3 ms peak).

This pull request introduces continuous, framegen-aware host Dynamic Resolution Scaling (DRS) and decouples render-sized scratch images from display-sized resources in `vk_fsr3fi.cpp`:
1. **Continuous Framegen-Aware DRS Controller (`gpu/vk/drs.h`, `gpu/vk/switches.def: RX_VK_DRS`)**: Evaluates native frame time, total GPU time (including upscaler and FG passes), and scene draw counts over rolling ~1-second presentation windows. When GPU utilization is heavy (GPU time > 92% of budget and native FPS < 90% of target for 3 consecutive windows), the controller smoothly steps down 1 quality stop across the active upscaler's defined scale stops (clamped to a 50% floor). A CPU-bound guard prevents downscaling when GPU utilization is low (< 75%), preserving sharpness in draw-call-heavy scenes. Recovery back up requires 10 windows of post-step-down cooldown and 10 windows of clear GPU headroom (< 68% budget and projected headroom at the next stop, allowing CPU-bound iGPUs starting at 67% to recover upward), with exponential cooldown backoff (10 -> 20 -> 40 windows) preventing seesawing.
2. **Decoupled FSR 3.1 Frame Generation Resources (`gpu/vk/vk_fsr3fi.cpp`)**: Separates internal resources into 25 display-sized images (`of_luma`, `of_flow`, `of_vector`, `of_confidence`, `of_scd_*`, `fi_inpainting_pyramid`, `fi_previous_source`, `fi_distortion_field`, and `made[]`) and 9 render-sized per-frame scratch images (`fi_dilated_depth`, `fi_dilated_motion_vectors`, `fi_reconstructed_depth_*`, `fi_game_mv_*`, `fi_of_mv_*`, `fi_disocclusion_mask`). When render resolution changes mid-play, only the 9 render-sized scratch images are reallocated; all 25 display-sized images and optical-flow allocations are preserved (while `vk_fsr3_inputs.cpp` still cleanly signals a 1-frame reset).
3. **Compatibility & Non-Destructive Storage**: Active only when `RX_VK_DRS=1` and `opts.resolution == 0`. Operates across all upscalers (FSR 3.1, DLSS, FSR 4, XeSS, Game's own) and presets without mutating saved `opts.resolution` (0) in `longshot_options.ini`. Wired into `mod-api`'s `MENU_SETTINGS(upscaler)` / `MENU_SETTINGS(core)` appliers, `drs::effective_resolution()` via `drs_publish_snapshot()`, and `t.renderer_status` (`out->dynres`, `out->dynres_scale`). Setting `RX_VK_DRS=0` (or `HOS_RES_SCALE`) completely disables the controller and restores exact previous behavior.

**What a player notices:**
- With `Render resolution` set to `Auto`, gameplay in demanding scenes stays smoother and more responsive: native frame rates increase by +13% to +23% (+10% to +19% 1% lows) and GPU frame times drop by 4.7-5.8 ms (-16% to -20%), trading visible 3D sharpness (stepping down from 67% to 58% and down to a 50% floor under sustained GPU saturation) for smoother frame pacing.
- Alongside FSR 3.1 Frame Generation 2x, display latency drops by ~17% to ~21% (from 37 ms down to 29-31 ms) with a +18% to +21% increase in on-time presentations and zero resolution oscillation.
- Dynamic resolution transitions during active Frame Generation feel significantly smoother, cutting mid-play resize spikes by 28.6% (-25.1 ms peak).

**Helps:**
- Players on integrated GPUs (AMD Radeon 780M/860M/880M/890M, Intel Arc Xe/Xe2) or power-constrained laptops running with `Render resolution = Auto`.
- Players using Frame Generation alongside dynamic resolution.

**No measurable impact:**
- Players using fixed render resolutions (`opts.resolution != 0`, e.g. Quality 67% or Native 100%).
- High-headroom discrete GPUs (where GPU time stays below the 92% budget threshold).
- When disabled via `RX_VK_DRS=0` or `HOS_RES_SCALE`.

Files to read first:
- `gpu/vk/drs.h`: the `mkwvk::drs::State` / `drs::effective_resolution()` / `drs::update()` state machine, budget calculation, and hysteresis logic.
- `gpu/vk/vk_fsr3fi.cpp`: split allocation of `display_images()` vs `render_images()`.
- `gpu/vk/vk_replay.cpp`: integration with `log_frame_stats()` and `t.renderer_status` (`out->dynres` / `out->dynres_scale`).
- `gpu/vk/vk_menu.cpp` and `gpu/vk/menu/upscaler.cpp`: `menu_drs_tick()`, `menu_drs_enabled()`, `MENU_SETTINGS` DRS resets, and atomic snapshot propagation via `drs::effective_resolution()`.
- `game/mods/graphics/mod.json` and `game/mods/menu/strings/*.json`: synced `Dynamic resolution` help text and translations.
- `tests/test_drs.py`: deterministic unit tests covering step-down, hysteresis, FIFO+FG budgets, `drs::effective_resolution()` publish wiring, and FSR3 FI resource decoupling.

## Testing

**Tested:**
- Windows 11 (build 26200), AMD Ryzen AI 7 350, AMD Radeon 860M Graphics (8 CUs, RDNA 3.5 integrated GPU, 6 GB allocated VRAM), Adrenalin 26.10.1 (LLPC).
- **Market (save `market-entrance`, pre-rebase `main` @ `958b71f9` vs `1b6e234c`)**: walked straight forward ~5 s (`0:LUP/5000`) to the central fountain before panning, 1600x1000 windowed @ 120 Hz, FSR 3.1 (`dlss=3`), `resolution=0` (Auto), `preset=0` (Custom), `RX_VK_PRECOMPILE=1`:
  - 2x FSR 3.1 FG Uncapped (`frame_rate_cap=6`, `frame_generation=2`): 3 interleaved rounds. DRS stepped 67% -> 58% -> 50% smoothly; native FPS lifted from 30.79 to 37.83 (+22.9%), 1% low lifted from 26.58 to 31.54 (+18.7%), GPU time dropped from 29.1 ms to 23.3 ms (-19.9%), and display latency dropped from 37.1 ms to 29.5 ms (-20.5%).
  - FG Off 60 FPS Cap (`frame_rate_cap=0`, `frame_generation=0`): 3 interleaved rounds. DRS stepped 67% -> 58% -> 50%; native FPS lifted from 38.66 to 44.15 (+14.2%), 1% low lifted from 33.66 to 37.11 (+10.2%), and GPU time dropped from 20.0 ms to 16.8 ms (-16.0%).
- **Hyrule Field (save `castle-gate`, pre-rebase `main` @ `958b71f9` vs `1b6e234c`)**: 1600x1000 windowed @ 120 Hz, FSR 3.1, `resolution=0` (Auto), 2x FSR 3.1 FG Uncapped:
  - 3 interleaved rounds. DRS stepped 67% -> 58% -> 50%; native FPS lifted from 30.66 to 34.74 (+13.3%), 1% low lifted from 25.39 to 28.51 (+12.3%), and GPU time dropped from 29.7 ms to 25.0 ms (-15.8%).
- **FSR 3.1 FG 2x Mid-Play Resize Spike (pre-rebase `main`)**: stepped `50% -> 67% -> 100% -> 67% -> 50%` via `longshot_ctl.py`. On the largest step (`67% -> 100%`), spike dropped from +83.5 ms down to +59.7 ms (-28.6% spike, -25.1 ms peak frame time), confirming decoupled display and optical-flow resources.
- **Bypass & Fixed Functional Checks (pre-rebase `main`)**: verified `RX_VK_DRS=0` and fixed `67% render scale` (`resolution=3`) both trigger `0` `vk: drs:` transitions (performance parity is currently single-run only and marked Unproven below pending >=3 interleaved rounds).
- **Targeted `--strict` Checks on `forge/mod-api @ 8247b25a` (head `b7960f06`)**: verified `10/10` targeted `--strict` DRS, menu, and settings-link checks pass (`test_drs`, `test_menu_{ini_keys,model,rows_model,setting_walk,stepped_sliders,help_paragraphs}`, `test_rumble_menu`, `test_vibration_menu`, `test_settings_link`). Known pre-existing failures on clean `forge/mod-api @ 8247b25a`: `test_auto_settings` (`auto_for=%016llx` moved to `own_lines`) and `test_switch_table` (`HOS_GAME_FIRST_NIGHT_FIX` sort order). Full `tests/run_all.py --strict` on `mod-api` has not yet been re-run (checklist item unticked below).
- **`mod-api`-head build & Radeon 860M DRS smoke (`forge/mod-api @ 8247b25a`, head `b7960f06`)**: Compiled `longshot_vk.dll` on Windows (0 errors) and ran Market (`market-entrance`, `1920x1080`, `resolution=0` Auto, `dlss=0`, `RX_VK_AUTO_PRESET=0`). Confirmed log line `[hos Presentation Thread] vk: drs: 67% -> 50% (gpu 47.2 ms / budget 16.7 ms, native 14.6 fps)` showing iGPU starts at `67%` (not `100%`) after pre-`pick_device()` init, with `0` `VK_ERROR_DEVICE_LOST`.

**How to test:**
1. On a GPU-limited system, set `Upscaler = AMD FSR 3.1`, `Dynamic resolution = On` (`resolution=0`), `Quality preset = Custom`, and `Frame generation = Fixed (2x)` (`FSR 3.1 FG`) or `Off` (`60 FPS` cap).
2. Load `market-entrance`, walk straight forward ~5 s (`0:LUP/5000`) to the central fountain before panning (and test `castle-gate` in Hyrule Field). Watch `longshot_log.txt` for smooth `vk: drs: 67% -> 58% -> 50%` transitions with zero seesaw, and confirm `vk: fsr3fi: render inputs ... (keeping ... display & optical-flow images)` on mid-play resolution steps.
3. Toggle `Dynamic resolution` Off and back On in the `mod-api` game menu and confirm `vk: drs:` resets cleanly and GPU frame time drops after stepping down.
4. Repeat with `RX_VK_DRS=0` to confirm `0` `vk: drs:` transitions.

**Still to test:**
- Windows Radeon 860M `mod-api`-head follow-up checks (`b7960f06`): toggle `Dynamic resolution` from the `mod-api` game menu, run one light-scene (Kokiri/title) step-up recovery check back toward 100%/92% on iGPU, and run >=3 interleaved rounds for `(E)` `RX_VK_DRS=0` and `(F)` fixed `67% render scale` parity (Windows build + Market `67% -> 50%` DRS smoke already verified above; by hand).
- Full `tests/run_all.py --strict` diff against clean `forge/mod-api @ 8247b25a` (by hand).
- Linux AMD RADV / Steam Deck: verify DRS step-down and FSR 3.1 FG 2x pacing in an active game session (@Beanstalk Please test DRS and FSR3 FI on Linux AMD RADV and Steam Deck)
- Windows NVIDIA RTX 40/50: verify DLSS / DLSS-G headroom target, spike reaction vs the game's per-frame controller, and zero throttling on high-headroom hardware (@Beanstalk Please test DRS with DLSS on RTX 40/50)
- Windows unlocked desktop: interactive live menu resolution switching alongside DRS by hand

## Measurements

**Baseline:** Pre-rebase `forge/main` (`958b71f9` vs `1b6e234c`), prior to rebasing onto `forge/mod-api @ 8247b25a` (head `b7960f06`). `mod-api`-head smoke verification (including toggling `Dynamic resolution` from the `mod-api` menu) is queued under **Still to test**.

**Verdict:** Cuts GPU time by 15.8-19.9% (-4.7 to 5.8 ms), lifts native FPS by +13.3% to +22.9% (+10.2% to +18.7% 1% low), and cuts FSR 3.1 FI resize spikes by -28.6% (-25.1 ms) on GPU-limited iGPU scenes (3 interleaved rounds on pre-rebase `main`). Bypass/fixed parity rows (E)/(F) are single-run only and currently Unproven pending >=3 interleaved rounds.

Setup: Windows 11 (build 26200), AMD Ryzen AI 7 350, AMD Radeon 860M (6 GB VRAM), Adrenalin 26.10.1 (LLPC); 1600x1000 windowed @ 120 Hz, AMD FSR 3.1 (`dlss=3`), `RX_VK_PRECOMPILE=1`, clean warm cache reset per trial, 3 interleaved rounds per scenario (`>= 12.5 s` post-load settle) on pre-rebase `forge/main @ 958b71f9` vs `1b6e234c`.

#### Where it makes a difference (pre-rebase `main` @ `958b71f9` vs pre-rebase PR @ `1b6e234c`)

| Metric | Before: pre-rebase main @ 958b71f9 | After: pre-rebase PR @ 1b6e234c | Delta |
|---|---:|---:|---:|
| **(A) Market, 2x FSR 3.1 FG, Uncapped (`cap=6`, `1600x1000 @ 120 Hz`, Auto resolution):** | | | |
| Native FPS | 30.79 | 37.83 | +22.9% |
| Native 1% low FPS | 26.58 | 31.54 | +18.7% |
| GPU time per frame | 29.1 ms | 23.3 ms | -19.9% (-5.8 ms) |
| Display latency | 37.1 ms | 29.5 ms | -20.5% (-7.6 ms) |
| Presentations on time (per 5 s) | 287 | 348 | +21.3% |
| **(B) Hyrule Field, 2x FSR 3.1 FG, Uncapped (`cap=6`, `1600x1000 @ 120 Hz`, Auto resolution):** | | | |
| Native FPS | 30.66 | 34.74 | +13.3% |
| Native 1% low FPS | 25.39 | 28.51 | +12.3% |
| GPU time per frame | 29.7 ms | 25.0 ms | -15.8% (-4.7 ms) |
| Display latency | 37.4 ms | 31.1 ms | -16.8% (-6.3 ms) |
| Presentations on time (per 5 s) | 278 | 327 | +17.6% |
| **(C) Market, FG Off, 60 FPS Cap (`cap=0`, `1600x1000 @ 120 Hz`, Auto resolution):** | | | |
| Native FPS | 38.66 | 44.15 | +14.2% |
| Native 1% low FPS | 33.66 | 37.11 | +10.2% |
| GPU time per frame | 20.0 ms | 16.8 ms | -16.0% (-3.2 ms) |
| **(D) FSR 3.1 FG 2x Mid-Play Resize (`67% render scale -> 100% render scale`, Market):** | | | |
| Peak frame time | 126.27 ms | 101.13 ms | -19.9% (-25.1 ms) |
| Frame spike delta above median | +83.53 ms | +59.68 ms | -28.6% (-23.9 ms) |

#### Where it does NOT make a difference (inactive-path checks: 0 DRS transitions; performance parity Unproven until >=3 interleaved rounds)

| Metric | Before: pre-rebase main @ 958b71f9 | After: pre-rebase PR @ 1b6e234c | Delta |
|---|---:|---:|---:|
| **(E) Switch Bypass (`RX_VK_DRS=0`, 2x FG, Auto resolution, 1 run only, Unproven):** | | | |
| Native FPS | 30.79 | 28.50 | -7.4% (single-run, Unproven; 0 DRS transitions) |
| GPU time per frame | 29.1 ms | 30.7 ms | +5.5% (single-run, Unproven; 0 DRS transitions) |
| **(F) Fixed 67% render scale (`resolution=3`, FG Off, 1 run only, Unproven):** | | | |
| Native FPS | 40.85 | 38.38 | -6.0% (single-run, Unproven; 0 DRS transitions) |
| Native 1% low FPS | 32.94 | 32.63 | -0.9% (single-run, Unproven; 0 DRS transitions) |
| GPU time per frame | 18.8 ms | 20.2 ms | +7.4% (single-run, Unproven; 0 DRS transitions) |

Raw log excerpts:

`main` (`958b71f9`) Market 2x FSR 3.1 FG Uncapped:
```
[hos host] vk: GPU time 29.1 ms a frame (the longest submission 7.6 ms); 0.0 textures made a frame
[hos host] vk: fsr3fi: of the last 600 presents 600 made by FSR 3.1, 0 without its inputs; 600 frames with the chain's motion; inputs this frame's 0, the frame before's 600; 600 with the HUD marked, 600 with its HUD layer
[hos host] vk: frame interpolation: 287 frames shown on time, 22 late (over 2 ms); the game's frames presented 37.1 ms after the game handed them over
```

`this PR` (`1b6e234c`) Market 2x FSR 3.1 FG Uncapped:
```
[hos host] vk: drs: 67% -> 58% (gpu 28.8 ms / budget 16.7 ms, native 26.2 fps)
[hos host] vk: drs: 58% -> 50% (gpu 27.0 ms / budget 16.7 ms, native 29.8 fps)
[hos host] vk: GPU time 23.3 ms a frame (the longest submission 6.8 ms); 0.0 textures made a frame
[hos host] vk: fsr3fi: of the last 600 presents 600 made by FSR 3.1, 0 without its inputs; 600 frames with the chain's motion; inputs this frame's 0, the frame before's 600; 600 with the HUD marked, 600 with its HUD layer
[hos host] vk: frame interpolation: 348 frames shown on time, 20 late (over 2 ms); the game's frames presented 29.5 ms after the game handed them over
```

`this PR` (`1b6e234c`) Mid-Play FSR 3.1 FG 2x Resize:
```
[hos host] vk: fsr3fi: render inputs 800x500 (keeping 1600x1000 display & optical-flow images)
```

## Risks

- **Reaction time and sharpness tradeoff:** Under default `Dynamic resolution = On` (`opts.resolution == 0`, `RX_VK_DRS=1`), host DRS replaces the game's per-frame internal dynamic resolution (`out->dynres = false`, driven via `out->dynres_scale`). Integrated GPUs start at 67% render scale and discrete GPUs at their top stop, requiring 3 consecutive ~1 s overloaded windows (~3 s) to step down (and 10-window cooldown + 10 headroom windows to step back up). Under sustained GPU saturation this lowers render scale to a 50% floor (visibly softer 3D in exchange for higher FPS and lower latency); short spikes react slower than the game's per-frame controller, and light-scene step-up timing on iGPU plus dGPU/RTX behavior remain in **Still to test**.
- **Settings and compatibility:** Zero `longshot_options.ini` or `LsSettings` schema churn: `opts.resolution == 0` (Auto) is preserved and the active `(upscaler, effective_resolution_id)` pair is published in a synchronized runtime atomic (`drs_snapshot`) via `drs::effective_resolution()`, ensuring existing player configuration files remain 100% compatible.
- **Fallbacks and switches:** Setting `RX_VK_DRS=0` (or `HOS_RES_SCALE`) completely disables the dynamic resolution controller, bypassing the tick loop and restoring exact `main` behavior.
- **Caches and ABI:** Zero SPIR-V or shader translation changes (the shader stamp is untouched). `MKWVK_API_VERSION` and `LS_SETTINGS_LAYOUT` are unchanged.
- **Sibling branches:** Disjoint from `vk_framegen.cpp`; `git merge-tree --write-tree` is clean with PR #2369 (`42aaf817`), with non-overlapping edits across shared files (`vk_menu.cpp/.h`, `game/mods/graphics/mod.json`, `switches.def`, `docs/user/graphics-and-controls.md`, `game/mods/menu/strings/*.json`).

## Checklist

### Ready for review

- [x] One topic, on current `mod-api` (`8247b25a`); the title is a Conventional Commit.
- [x] Tested on my own PC, in the game for a change the game runs, as Testing says.
- [ ] `mise run test` passes (10/10 targeted `--strict` pass; full `tests/run_all.py --strict` on `mod-api` pending).
- [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 switch added or changed: it ships at the default the measurements chose, with its row in `gpu/vk/switches.def`.
- [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 llvm-mingw `longshot_vk.dll` build verified; Linux build pending CI).
- [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.

Reviewed-on: #2400
Co-Authored-By: Claude Opus 5.5 <[email protected]>
merge: mod-api's newest merged PRs (#2434)
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
CI / Third-party parts and guide screenshots (pull_request) Failing after 37s
PR description / Title and description (pull_request_target) Successful in 51s
CI / What the change needs (pull_request) Successful in 3m17s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Failing after 1m51s
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
aa34eaa1f4
Co-Authored-By: Claude Opus 5.5 <[email protected]>
test_key_press_queue: display_sdl.c's keys log the control bridge's presses (ade74c77): the fixture stands in hos_log.
test_audio_output_preferences: without a profile the settings are the game folder's settings/settings.toml, and one
beside the game is moved in (options_path.c game_settings): the fixture puts it there, and checks the move.
test_ui_texture_upload: the painter gives a texture its descriptor set in give_set, and a texture without one is still
uploaded, its draws waiting (09648acd): the fixture cuts give_set too, stands in logf, and checks that case; upload's
comment back on upload.
test_microphone_test_gain: the menu's page is the game's LS_ACTION_PAGE, told when it moves (ef230424), so no page read
goes stale by time: that case is gone.
test_no_game_title: the run times of tests renamed since, a review's line naming a header's old path, and switches.md's
list of the gone switches named the title: the times and the line go, the gone switches' names are allowed there.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The rest of main's DLSS 5 (#2503, #2513, #2582) the merge left out:

- the DLSS 5 settings page: the menu's layout.ts links it from the Graphics tab after DLSS 5, shown while DLSS 5 is
  shown and On (a link's new shownWith), with the preset at the top, the tuning rows, the DLSS 5 model last; the rows'
  labels, help and slider releases main's;
- the DLSS 5 preset (Default, Custom) and the player's Custom set (dlss5_custom), the game's rules now
  (api::settings::dlss5, settings_now rules_after); settings_host shows the preset from the rows, locks it with no
  Custom set and the four strengths away from Applied, and hides the rows behind an Upscaler DLSS 5 does not run behind;
- Skin structure's Follows local structure: its lowest step, -2 (the renderer reads below 0 so), its values in words;
- the FPS counter's NR time and NR VRAM at Dev while DLSS 5 runs: LsFrameStats.nr (LS_CAPS_LAYOUT 17), DevStats nrTime
  and nrVram, the fps-counter mod's lines;
- DLSS 5 turned On asks NGX again (dlss_nr_retry), as main's row did;
- RX_VK_DLSS_NR and RX_VK_DLSS_NR_MODEL are gone switches: LONGSHOT_SET sets dlss5 and dlss5_model for a run;
- the texts translated in the menu's and the fps-counter's strings (main had none for them); docs.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
host/broker_files.h: the BROKER_FILE request's framing, the roots the confined game reaches through the broker
and what each op may do there, the lexical checks (no .., no alternate stream, no DOS device, a share's form) and
the check after an open (the final path under the root's real one), a token bucket per channel.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
host/broker_files_windows.c serves BROKER_FILE: open, stat, list, mkdir, delete, rmdir and rename under the
sandbox's roots, as the player, reaching each path from its root one folder at a time with
FILE_OPEN_REPARSE_POINT (a link on the way refused), the final path checked again, the handle duplicated into
the game with no more access than asked and allowed. host/hos_file_windows.c is the confined game's one file
layer: Windows' file functions in its modules' import tables (the exe, the renderer, ucrtbase, and what loads
later), a native open the container is refused asked of the broker. tests/test_broker_files_wine.py runs both
under Wine.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The plan marks the game folder, the user folder and the profile's as the broker's roots; only the program folder
(bin\, which Windows' loader maps as the container), the drivers' caches, the shader store, the NFC tags and DLSS
keep an ACL. An older start's grants on the player's folders are taken back and dropped from the record. Inside
the container the file layer is installed once the broker is reached, before the needs probe. hos_sandbox_note
says when the sandbox is off or partial (HOS_SANDBOX=0, not confined and why, files on a drive with no permissions).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
game_set_sandbox_note hands the host's words to the game side; ModsTabHost::sandbox, the tab's `sandbox`.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
docs(sandbox): Windows: files through the broker, what keeps an ACL, what to check (#2434)
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
CI / Third-party parts and guide screenshots (pull_request) Failing after 20s
PR description / Title and description (pull_request_target) Successful in 31s
CI / What the change needs (pull_request) Successful in 1m23s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Failing after 1m24s
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
f8193c1ed1
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A child another test spawns between the lease's drop and the remove holds
the lock's open file until its exec, so remove kept the folder and the test
failed under load.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The game's code page is UTF-8 (its manifest); tests/test_utf8_paths.py
refuses CP_ACP in host/.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
test: the songs' Mod API name passes the title check; the broker test's folders are neutral (#2434)
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
CI / Third-party parts and guide screenshots (pull_request) Failing after 15s
PR description / Title and description (pull_request_target) Successful in 27s
CI / What the change needs (pull_request) Successful in 1m13s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Failing after 1m23s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Successful in 16m32s
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Successful in 20m23s
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Failing after 28m32s
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Successful in 16m22s
CI / Website build and checks (pull_request) Failing after 1m17s
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Successful in 22m35s
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Failing after 1h0m5s
689d400f5a
Co-Authored-By: Claude Opus 5.5 <[email protected]>
longshot/settings-host gives every text in the calling mod's language (its
strings, as t would), declarations with every field, and compares in Rust
what each mod read with the game each frame: changed fires on a new
generation, the menu opening or closing or the status moving on, and
rowsChanged for the rows a mod read (at once after a change it made, else
every quarter second of game time). decls loses since; texts and
bindQuestion give strings; status().restart the labels.

longshot/ui's useHost(read, events, deps) reads again when an event fires
and keeps the objects of what did not change, so a mod never polls.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
## Summary

`world.ray` is in the Rust mod API, cast on the physics step's own thread, but Preview: no run had shown it, and
`has("world.ray")` had no answer at all (the feature table had no line for it, so it was false even with the Preview
list lifted). A first run shows the cast works, and shows its one guess was wrong: the "scenery" preset (48) is every
layer, Link included, so a ray down through him stopped on the top of his head, 1.17 m above his feet. A colliding
camera rig casts the same ray, so its eye would stop on Link too.

This makes rays a feature, with what other engines' raycasts offer (Unity's `Raycast`/`RaycastAll`, Unreal's line
traces, Godot's `intersect_ray`), on the same step-thread design:

- **`ray(from, to, options?)`** and **`rayAll(from, to, options?)`** (new): the nearest hit, or every hit along the
  ray, nearest first, each body once and an actor's several bodies one hit (at most 16). `rayAll` is the game's own
  every-hit ray query (Havok's all-hits collector), built as the game builds it.
- **What it hits, by kind** (`RayOptions`): `ground`, `objects`, `characters`, `water` on by default; `player` (Link)
  off, so a ray cast from Link doesn't stop on him at once. Each kind is the game's own entity layers, named in the
  binary and checked a bit at a time in a run of the C mod API's rays (#2422).
- **`ignore`**: an actor's key; the ray passes through its bodies (their collision group, as the game's own helpers
  put it in a ray's filter).
- **What it hit** (`RayHit`): position, normal, distance as before, plus `kind`, `actorKey` (the actor whose body it is,
  for a mod with `actors.read`) and `inside` (the ray started in it).
- The camera's `collide` asks for the ground alone (`Ask::scenery`).
- `has("world.ray")` is true where the build has the query and both step sites; `has("world.rayAll")` where it also
  has the every-hit query (`rays.allInit`, `rays.hitsVtable`, `rays.hitsClear`).

How, in short: the query is built as before, its filter set from preset 48 and then given the asked kinds' layers, and
an `ignore` group. `ray`'s hit kind is the ray cast again with one kind's layers at a time until the same body (by its
handle) is hit; a ray of one kind costs one cast. `rayAll` is the game's own every-hit ray query: the ray query's cast
method reads a mode at `+0x8c` (0 Havok's closest-hit collector, the ground check's and `ray`'s; 1 its all-hits
collector, each hit made a record in the query's hit list at `+0x68`). The game's f_83010540 (the water's surface and
the ground under it) builds one with f_83010ac0, which makes the list in the query's own buffer and sets the mode,
casts it with the same executor, walks the list and clears it; `raw_all` does the same. One cast, whatever the ray
passes through; each hit's kind is its body's own layer; each body's nearest record kept and an actor's bodies one hit
(their collision group: Link's two). Which actor a hit is: the listed actor one of whose bodies has the hit's handle, on
the main thread as the answer settles. A slot's ask and answer move behind a lock each that only the state's owner
takes, so they can carry the hits.

Read first: `game/crates/game-core/src/rays.rs` (`Kind`, `Ask`, `Answer`, `raw`, `aim`, `classify`, `raw_all`,
`contacts_of`, `cast`, the actors' bodies), its layout in `layout/rays.rs` (the every-hit query's at the end), the
`rays.*` named locations in `game/sites/sites.toml`, then `ray_ask` and the answers' JSON in
`game/crates/api/src/services/world.rs`; the schema's `ray`, `rayAll` (`world.toml`) and `RayHit`, `RayKind`,
`RayOptions` (`types.toml`). `docs/dev/reference/world.md`'s Rays has what was read and run.

This is #2422's change, made again on the Rust mod API's own rays; #2422 (the C mod API) can close. Part of #1958's
Modding API; targets `mod-api`.

## Testing

**Tested:** Windows 11, NVIDIA GeForce RTX 4060 Laptop GPU, driver 621.24. In the game, quick builds of this head,
through `dev.py game-tests`:

- **Link's house** (`kokiri-start`), rays from 2 m above Link to 3 m below him, all answered a frame after they were
  asked: the default kinds meet the ground at his feet (y 118.44), no actor; `player: true` the top of his head with
  `kind` `player` and his key; with `ignore` his key, the ground; from his chest, him at once with `inside`;
  `ground: false`, a miss. `rayAll` with `player: true`: him once (two bodies) with his key, then the ground at his
  feet; with `ignore` his key, the ground alone.
- **Kinds, in Kokiri Forest** (a second probe takes Link there with `world.travel` and casts straight down through
  every listed actor): the withered Deku Babas met as `character` with their own `actorKey`, by `ray` and `rayAll`;
  grass as `object` with its own key; the treasure chests and trees as `object` (no key: hit on a body their actor's
  list does not name, as documented). Water-only rays over a grid met the stream; at open water the default kinds met
  its surface as `water`, `water: false` the bed 0.20 m below, `rayAll` the surface then the bed. Under a ledge,
  `rayAll` gave the ledge's two ground bodies, then the water.
- **A colliding camera rig** (on a local build with `camera.override.collide`'s Preview lifted, not in this branch): the
  eye 6 m behind Link in his house, `collide` on, stopped 1.44 m from its pivot, short of the wall; off, 6.00 m; on
  again, 1.44 m.

Checks: `cargo test -p game-core` (`rays`: the query as the ground check builds it; `ray`'s nearest by kind in a
made-up world answered as the executor does: the default kinds, the characters off, Link asked for and told from the
ground, from inside him, his group passed through, a hit past the end, nothing asked; every hit through the game's
every-hit query faked as the build has it: its constructor's list and mode, an executor filling the list in no order
with Link's two bodies and a floor's two triangles, each thing once and nearest first, kinds from the bodies' layers,
the group passed through, from inside Link, a miss, nothing asked making no query, every list cleared, a list not the
build's refused; without the sort it fails; the slots), `-p api` (the answers as RayHits, a key only with
`actors.read`, `rayAll`'s list; the features), `-p modtool`, `-p game-sites`, `-p sites`; `cargo check --workspace
--all-targets`; `cargo run -p schema-gen -- --check`; rustfmt. Tests that fail on `mod-api` itself and here, on
Windows: `api`'s `a_content_mods_changed_module_runs_again_and_its_outputs_are_served` and `modtool`'s
`eden_and_ryujinx_mods_are_found_with_their_switches`.

**Still to test:**
- A colliding camera rig played by hand (`camera.override.collide` stays Preview here until its own change lifts it)
- Linux, and clippy with warnings as errors: `mise run rust` and `mise run test` (by hand, or CI)

## Measurements

Nothing measured: with no ray asked the step sites stay off, as before. A ray is the game's own query: `ray` one cast
plus one per kind tried to tell its kind (none when one kind is asked), `rayAll` one cast of the game's every-hit
query, whatever it passes through. They run on the physics step's thread, after its step.

## Risks

Only mods that cast rays, and a colliding camera rig (still Preview), reach this code. The camera rig's ray now asks
for the ground alone (preset 48 hit Link before, the rig's own pivot). A build whose every-hit query differs (its hit
list's vtable not the build's) gets no `rayAll`: `has()` false, nothing read or cleared. The test game still has no world to cast against: `has("world.ray")` is false there, as
before (a fake caster for tests is a follow-up). The generated docs' schema hash conflicts with any other schema
change: whichever merges later needs `cargo run -p schema-gen` again.

## Checklist

### Ready for review

- [x] One topic, on current `mod-api`; the title is a Conventional Commit.
- [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). <!-- Windows run as Testing says; clippy and Linux: CI -->
- [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 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 built and played; Linux: CI -->
- [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)

Reviewed-on: #2662
The settings host now caches, compares and translates: gone are the
read-ahead, the stale flags and generations, the useFrame polling, the
fault retry, host.ts's text caches and lazy declarations, the restart
labels' extra read and the custom memo. View changes are one reducer.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
## Summary

A mod can't change one of the game's event flows (the cutscenes and scripted moments: a song played, a door's question,
a chest) without shipping a whole replaced copy of the game's file. That copy is game data, so it can't be shared, and
two mods changing one flow overwrite each other.

This adds a new kind of typed patch, `"flow"`, next to `ops`, `rows`, `placements`, `texts`, `flags` and `rails`, in a mod's
`patches/` folder or through `content.patch`. It names the flow's own events, so the mod ships none of the game's file:

```json
{ "target": "Event/EventFlow/Dm_SY_Ocarina.bfevfl.zs",
  "flow": [
    { "op": "action", "id": "Tune", "actor": "GameSystemActor", "action": "EventTriggerPlayAutoFixedTune",
      "params": { "IsLearningWarpMelodyDemo": false }, "next": "Event137" },
    { "op": "branch", "id": "TuneIfSung", "before": "Event171", "flag": ":Sung", "then": "Tune" } ] }
```

- **`action`**: a new action event, an actor and action the flow already has, with params, then its next event.
- **`branch`**: a check of a bool flag before an event. Whatever went to that event (events before it, a switch's
  cases, a fork's branches, an entry point) goes to the check; clear goes on as before, set goes to `then`. Two checks
  before one event chain. A fork's join is never moved. The flag is the game's by its name, or a content flag by its id
  (`":Sung"` the mod's own, `"owner/name:Sung"` another's), as the runtime takes content.

Each mod's new events are named after it (`local/my-mod.Tune`: its id, a `.` and the op's), so mods never collide, and their patches
apply in the Mods list's order, each on the one before's output. An op naming something the flow doesn't have is left
out with its reason in the log; the rest apply, as with the other typed patches. Flow patches never conflict. The
target's own header (`BFEVFL`) picks the applier: a flow patch aimed at another file fails by itself, and that file's
other patches still apply. A patched flow's cached file is named by each flow patch's mod id as well as its text, since
its events and flags are named after the mod.

Longshot writes the patched flow with its own writer: every byte of the game's file before its relocation table is
kept (a flow is taken only when its flowchart, events and the pointers its table names are all before that table), the
events move to a longer array after it, the new events' params (with a DIC built as Nintendo's tree, so the
game finds each param by name), cases and texts follow, then a new relocation table. The game's
`EventQueryIsGameDataBool` answers **0 for a set flag and 1 for a clear one**, so a check's case 0 is "then". A text
param is at most 65535 bytes, the longest the format's u16 length holds.

Read first: `game/crates/content/src/evfl.rs` (the reader, the ops and the writer), then `read_flow_op` in
`content/src/patch/parse.rs` and the flow branch of `apply` in `content/src/merge.rs`; the schema's
`ContentPatchFlowOp` types it for `content.patch` (the test game reads patches with the same reader). Docs:
`docs/modding/files.md`, "Event flows".

This is #2578 moved onto the current `mod-api` (rewritten since), on a new branch so the pull request is only this
change; #2578 can close. It was #2268's change to the C mod API first. Part of #1958's Modding API; targets `mod-api`.
Magic Singing uses it with `songPlayed` (#2658).

## Testing

**Tested:** Windows 11, NVIDIA GeForce RTX 4060 Laptop GPU, driver 621.24. In the game (a quick build of this head on
current `mod-api`, which has the flags by id, #2657, and `songPlayed`, #2658; `dev.py game-tests`, the repository's
`kokiri-start`): a
test mod with Magic Singing's 96-op patch on the ocarina's flow (`Dm_SY_Ocarina`) and its two content flags. The patch
applies at the start with no op refused, the game loads the patched flow (`Dm_SY_Ocarina.bfevfl.zs <- modcache\files\...
(made of the mods' copies)`), and the mod's test passes in play. This build made the patched flow
fresh, and it is byte for byte the file served on the previous `mod-api`, which was read back with the evfl library: all 96 ops as written (the actions' actors, actions, params and next; each
check `EventQueryIsGameDataBool` on the mod's flag, case 0 to `then`), the 330 original events unchanged but their
links, the 102 links into the 46 checked events moved to each chain's first check, no fork's join moved, the 20 entry
points as they were.

Checks: `cargo test -p content` (`evfl`'s own tests on a made-up flow, read back by a reader of the test's own: two
mods' actions and checks in order, their params found by name through the DIC as the game looks them up, the bytes
kept, every pointer in the relocation table; a flag by a mod's id, the patching mod's own and another's; bad patch
files and a file that is not an event flow refused; the output past the largest flow refused; the DIC finding every
name of many; a flow whose flowchart is after its relocation table, or whose table names a pointer past the data,
refused; a text param of 65535 bytes applied whole and one of 65536 left out. `merge`'s tests: two mods' flow patches
served in order; the same patch text under another mod's id made again for it; a flow patch aimed at a parameter file
failing alone, the file's other patch applied. Each of the review's four tests failed on the commit before the fix. The content vectors, which hold the reader to
the flow rules); `cargo check --workspace --all-targets`; `cargo run -p schema-gen -- --check`; rustfmt.

**Still to test:**
- Linux, and clippy with warnings as errors: `mise run rust` and `mise run test` (by hand, or CI)
- The patched flow played with a check's flag set (`songPlayed` is in `mod-api` now): a by-hand playtest, as a headless
  run cannot play the ocarina

## Measurements

Nothing to measure in play: the patch is applied once at the start, with the merged files; a patched flow is a few
kilobytes larger than the game's.

## Risks

Only mods that ship a `"flow"` patch reach the new code; with none, nothing changes. A flow patch that routes the game
somewhere wrong is the mod's to fix (turning the mod off restores the game's flow). The generated docs' schema hash
(`docs/modding/*.md`) conflicts with any other schema change: whichever of this and #2657 merges second needs
`cargo run -p schema-gen` again.

## Checklist

### Ready for review

- [x] One topic, on current `mod-api`; the title is a Conventional Commit.
- [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). <!-- Windows run as Testing says; clippy and Linux: CI -->
- [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 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 built and played; Linux: CI -->
- [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)

Reviewed-on: #2656
> **Depends on #2662** (`world.ray` and `rayAll` by kind). This branch is stacked on it: review only the commit after
> `494e1325`. Once #2662 merges, this rebases onto `mod-api` with `git rebase --onto origin/mod-api 494e1325` and the
> base stays `mod-api`.

## Summary

#2662 gives mods rays by kind. This adds what other engines offer next to them: shapes swept through the world and
shapes placed in it, against the game's own collision (Unity's `SphereCast`/`CapsuleCast`/`BoxCast`, their `All`s and
`OverlapSphere`/`Capsule`/`Box`; Unreal's sweeps and overlaps; Godot's `cast_motion` and `intersect_shape`).

- **Casts:** `sphereCast(from, to, radius, options?)`, `capsuleCast(from, to, radius, height, options?)` and
  `boxCast(from, to, halfExtents, options?)`: the nearest thing the shape touches as its centre goes from `from` to
  `to`. Each has an **`All`**: everything it touches on the way, nearest first, each thing once, at most 16.
- **Overlaps:** `overlapSphere(center, radius, options?)`, `overlapCapsule(center, radius, height, options?)`,
  `overlapBox(center, halfExtents, options?)`: what the shape touches where it is now. Empty means the place is clear.
- **The rays' options** (`RayOptions`): the same kinds (ground, objects, characters, water on; Link off) and `ignore`.
- **What it touched** (`ShapeHit`, new): the point on the surface, its normal, the shape's centre at that moment (where
  it can go and no further), the distance its centre went, the `kind`, the actor's key, and `inside` (touching at the
  start; every hit of an overlap).
- Capsules stand upright (along the world's up, as Link's body does); boxes lie along the world's axes.

Each is asked and cast as a ray is: in the same slots, by the physics step on its own thread, settling a Promise a frame
later. The step builds the game's own shape query as its AI builds one on its stack (`QueryPhysicsCastShapeEntitySphere`,
`f_82ac68d0`): the game's constructor, the game's class for each shape (its destructor checked against the build's),
and the game's own builder for the shape (sphere `f_803bd550`, capsule `f_80d1eba0`, box `f_8047e6f0`; the radius in
`s0`, the stepping thread's own put back after), which makes a Havok convex shape in the query's own arena, so nothing
goes on the heap. It runs with `f_805efbc0` (Havok's `castShape`, or its closest points for an overlap). Every hit comes
from the one query's collector, its kind from the hit body's own layer: no second query. The collector is the same hit
list, of the same records, as #2662's every-hit ray query's, so both are read by one reader (`contacts_of`).

Read first: `shape_query` and `shape_cast` in `game/crates/game-core/src/rays.rs` and the `SQ_`/`CT_`
offsets in `layout/rays.rs`; the `shapes.*` named locations in `game/sites/sites.toml`; then the shapes' functions and
`cast_ask` in `game/crates/api/src/services/world.rs`, and the schema's functions (`world.toml`) and `ShapeHit`
(`types.toml`). `docs/dev/reference/world.md`'s Shapes has the query's layout and the run.

This is #2438's change, made again on the Rust mod API's rays; #2438 (the C mod API) can close. Part of #1958's Modding
API; targets `mod-api`.

## Testing

**Tested:** Windows 11, NVIDIA GeForce RTX 4060 Laptop GPU, driver 621.24. In the game (a quick build before the shape availability and dimensions fix,
rebased on #2662's every-hit `rayAll` and current `mod-api`, the shapes' hits read by the same reader;
`dev.py game-tests`, the repository's `kokiri-start`, in Link's house), a probe mod's test passes: a sphere of 0.3 m
swept down onto his floor stops with its centre 0.30 m above it, a capsule 1 m tall 0.50 m above it, a box of half
extents 0.2 m 0.20 m above it (each `ground`: the sizes reach the game's builders); with `player: true` a sphere stops
0.30 m above his head with his key; `sphereCastAll` gives him once (his two bodies), then the floor; `overlapSphere` at
his chest gives him, his key and `inside`; a small box overlap above his head, nothing. Checks: `cargo test -p
game-core` (`rays`: #2662's ray tests, and the shape query through the game's functions faked, a collector of Link's two bodies and the floor:
each thing once, the nearer body kept, kinds from the bodies' own layers, the distance and centre along the sweep, the
radius in `s0` and the site's own put back, the overlap's closest-points flag, a class that is not the build's own
refused, and the calls in order with the destructor last), `-p api` (a shape's hit with its centre, a miss's at the
sweep's end; the sizes checked and a capsule of twice its radius or less a sphere), `-p modtool`, `-p game-sites`,
`-p sites`; `cargo check --workspace --all-targets`; `cargo run -p schema-gen -- --check`; rustfmt. Tests that fail on
`mod-api` itself and here, on Windows: `api`'s `a_content_mods_changed_module_runs_again_and_its_outputs_are_served`
and `modtool`'s `eden_and_ryujinx_mods_are_found_with_their_switches`.

**Still to test:**
- Characters, objects and water touched in this port (as for #2662's rays), and a box's sweep along a wall
- Linux, and clippy with warnings as errors: `mise run rust` and `mise run test` (by hand, or CI)

## Measurements

Nothing measured here: a shape costs one query of the game's (its build, its run, its destructor) on the physics
step's thread, after its step, and with none asked nothing runs. The C version measured about 0.15 ms a shape.

## Risks

Only mods that cast shapes reach this code. The shape query is the game's own, built as its AI builds it; a build whose
classes or functions differ (a destructor that is not the build's) gets no shapes: `has()` false, nothing cast. The
test game has no world to cast against (as for the rays). The generated docs' schema hash conflicts with any other
schema change: whichever merges later needs `cargo run -p schema-gen` again.

## Checklist

### Ready for review

- [x] One topic, on current `mod-api`; the title is a Conventional Commit. <!-- stacked on #2662 -->
- [ ] 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). <!-- Windows run as Testing says; clippy and Linux: CI -->
- [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 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 built and played; Linux: CI -->
- [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)

Co-authored-by: BeanBot <[email protected]>
Reviewed-on: #2663
Port of #2464 (and #1577's simpler parts): the engine serves the game's title
graph changed so its save branch goes from the title's setup to the saved-game
load, and picks the save as the file list's card does. storage.saves gains
skipTitle() and titleSkip(); the mod drops its press machine and its sites.
HOS_START_SLOT is followed the same way, so a test names a slot with it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
## Summary

On high-refresh displays (120 Hz, 180 Hz, 240 Hz), setting **Frame generation** to **Auto** (`frame_generation=1`) computes `auto_cap() = clamp((hz + 29) / 30, 2, 4)` and generates up to 3-4 frames per game frame. When the GPU is saturated (such as integrated GPUs or power-constrained laptops running at 22-35 FPS native), generating 3 made frames adds ~11-18 ms of FSR 3.1 optical-flow and interpolation passes per game frame. That triggers a negative feedback loop: GPU frame time climbs, native FPS drops 20-48%, display latency balloons past 120-145 ms, and presentations bunch under 2 ms. In issue #2226, locking the game to 30 FPS with V-Sync (FIFO) on 120-180 Hz displays caused Auto frame generation to collapse native FPS to ~24 FPS with ~147 ms of display lag.

This PR resolves the overload loop with two complementary additions:
1. **Auto Overload Guard (`gpu/vk/framegen_auto.h`):** Tracks smoothed native frame time (`game_ns`), GPU time (`gpu_ns`), and presentation bunching. When GPU load is heavy, native FPS falls under GPU saturation, or pacing bunches, `AutoGuard` steps `auto_most` down conservatively and skips multi-frame interpolation across single-frame hitches (> 50 ms and > 2x smoothed frame time). Thresholds are maker-aware (distinguishing light Built-in FG from heavy FSR 3.1 FI), allow recovery under capped play (such as a 30 FPS cap when spare GPU headroom returns), and reset state cleanly whenever the cap, `Visual FPS target`, or active frame-generation maker changes (including clearing the GPU EMA on maker switches and guarding missing initial GPU timestamp deltas). `RX_VK_FG_AUTO_GUARD=0` disables the guard and hitch suppression completely, restoring prior behavior.
2. **Visual FPS target (`longshot_options.ini: frame_generation_target`):** Adds a row under **Frame generation** (visible while **Frame generation** is **Auto**) offering **Display Hz** (default), **60**, **72**, **90**, or **120** FPS (never above the display's refresh), declared in `game/mods/graphics/mod.json` and `LsSettings`, applied via `MENU_SETTINGS(framegen_rows)`, and published atomically via `menu_framegen_target()` (`std::atomic<int> framegen_target_now`) so `framegen_record` reads it without a cross-thread data race.

**What a player notices:**
- On 120+ Hz displays with GPU-limited hardware (such as Radeon 860M / 880M / 890M iGPUs), **Frame generation: Auto** becomes responsive and smooth: display latency drops by ~70-105 ms (124-147 ms down to 22-34 ms) and native gameplay speeds up by +20-48% (+27-53% 1% low).
- Under a 30 FPS cap with V-Sync On (FIFO) on 120 Hz displays (#2226), native FPS holds steady at ~30 FPS instead of collapsing to 24 FPS, and Auto now recovers back up to the chosen `Visual FPS target` (e.g. `0 -> 1 -> 2 -> 3`, ~119.4 FPS with Built-in FG) once GPU headroom returns instead of staying latched at `1/3`.

**Helps:**
- Players on 120+ Hz displays with integrated GPUs (AMD Radeon 860M/880M/890M, Intel Arc Xe/Xe2) or GPU-limited discrete GPUs using **Frame generation: Auto**.
- Players capping the game at 30 FPS or targeting 60 / 72 / 90 / 120 FPS visual output on high-refresh displays.

**No measurable impact:**
- Players with **Frame generation: Off** (`frame_generation=0`) or **Fixed** multipliers (`frame_generation=2`).
- High-headroom discrete GPUs whose GPU time stays below the overload floor.

Addresses #2226.

Files to read first:
- `gpu/vk/framegen_auto.h`: `AutoGuard` EMA filters, maker-aware overload/recovery thresholds, hitch suppression, and state reset on `(cap, target_choice, heavy_maker)`.
- `gpu/vk/vk_framegen.cpp`: integration with `auto_slots()`, `framegen_record()`, `have_gpu_delta` guard, and `framegen_idle()`.
- `gpu/vk/menu/framegen.cpp`, `game/mods/graphics/mod.json`, `game/settings_abi.h`, `game/mods/menu/src/layout.ts`, and `game/mods/menu/strings/*.json`: the `Visual FPS target` setting declaration, `MENU_SETTINGS` applier with atomic `framegen_target_now`, menu layout, and translations.
- `tests/test_framegen_auto.py`: game-free unit tests covering overload step-down, capped recovery, maker asymmetry, target/maker reset, missing GPU delta, hitch suppression, and target clamping.

## Testing

**Tested:**
- Windows 11 (build 26200), AMD Ryzen AI 7 350, AMD Radeon(TM) 860M Graphics (8 CUs, RDNA 3.5 iGPU, 6 GB VRAM), Adrenalin 26.10.1 (LLPC), 2880x1800 @ 120 Hz display.
- **Standalone A/B on pre-rebase `main` (`8aa5ab87` vs `670c2411`; `gpu/vk/framegen_auto.h` is byte-identical on rebased `42aaf817`):**
  - Market (`market-entrance`, walked straight forward ~5 s `0:LUP/5000` to the central fountain before panning, 1600x1000 windowed @ 120 Hz, FSR 3.1 `67% render scale`, FSR 3.1 FG Auto Uncapped, `RX_VK_PRECOMPILE=1`, 2 interleaved rounds): Immediate native FPS `23.47 -> 33.49 FPS` (+42.7%), 1% low `13.61 -> 17.28 FPS` (+27.0%), `fg_latency.csv` median `127.7 -> 22.0 ms` (-82.8%). FIFO (`vsync=1`) native FPS `22.47 -> 33.29 FPS` (+48.2%), 1% low `13.72 -> 18.09 FPS` (+31.9%), `fg_latency.csv` median `139.5 -> 30.7 ms` (-78.0%).
  - Hyrule Field (`castle-gate`, 2 interleaved rounds, Immediate): native FPS `23.70 -> 31.40 FPS` (+32.5%), 1% low `15.12 -> 19.87 FPS` (+31.4%), `fg_latency.csv` median `132.6 -> 31.7 ms` (-76.1%).
- **Capped 30 FPS recovery (`Visual FPS target = 120`, pre-rebase `main`):**
  - Built-in FG (Market `1680x1048`, `50% render scale`, `21.5-22.3 ms` GPU): recovered `0 -> 1 -> 2 -> 3` (`step-ups=4`), reached `119.4 FPS` (`597` frames/5 s, `cap 3/3`), held steady with `0` seesaw.
  - FSR 3.1 FI (Kokiri `1280x720`, `50% render scale`, `15.3-18.4 ms` GPU): recovered `0 -> 1 -> 2 -> 3` (`step-ups=4`, `112.2 FPS`); under heavier Market load (`24.2-26.2 ms` GPU) held `1/3` (`60 FPS`, `0` `<2 ms` across 6 windows, `0` late).
- **Live target and maker switch resets (with `cap=3` unchanged, pre-rebase `main`):** switching `Display Hz -> 120 FPS` reset `cap 1/3 -> 3/3`; switching `FSR 3.1 FG -> Built-in FG` reset `cap 0/3 -> 3/3`.
- **Inverse & switch-bypass probes (pre-rebase `main`):** `RX_VK_MIRROR=1 RX_VK_ASYNC=1`, `RX_VK_RECORDER=off`, `RX_VK_FG_AUTO_GUARD=0`, and `frame_generation=0` all ran cleanly with `0` device-lost or crashes.
- **Prior 3-round standalone A/B (`0e32bc10` vs `95afa556`):** Market Uncapped `+19.7%` FPS / `+40.5%` 1% low / `-73.5%` latency, Hyrule Uncapped `+25.7%` FPS / `+53.0%` 1% low / `-68.4%` latency, Market 60 cap `+20.3%` FPS / `-73.6%` latency, and #2226 Kokiri 30 cap FIFO `24.01 -> 29.99 FPS` / `-77.4%` latency / `99 -> 0` `<2 ms` bunching.
- **Targeted `--strict` checks on `forge/mod-api @ 8247b25a` (head `42aaf817`):** `tests/test_framegen_auto.py` passes (failed before the fix on `main` and before the recovery fix on `f6860d2f`); 18/20 targeted `--strict` checks pass (`test_framegen_auto`, `test_framegen_{gate,idle,fixed_pace,fifo_cap,resources}`, `test_present_source_crop`, `test_menu_{ini_keys,model,modules,rows_model,setting_walk,stepped_sliders,help_paragraphs}`, `test_rumble_menu`, `test_vibration_menu`, `test_settings_link`, `test_switches_removed`). Known pre-existing failures on clean `forge/mod-api @ 8247b25a` (not caused by this PR): `test_menu_sections` (empty HDR section), `test_settings_decls` (upstream `menu_rows.json` drift), `test_framegen_{by_row,dlss_cap,preset}`, `test_upscaler_round_trip`, `test_menu_i18n` (`Swap`), `test_settings_area_keys` (`frame_generation_multiplier`), and `test_switch_table` (`HOS_GAME_FIRST_NIGHT_FIX` sort order). Full `tests/run_all.py --strict` has not yet been re-run on `mod-api` (checklist item unticked below).
- **`mod-api`-head build & persistence smoke (`forge/mod-api @ 8247b25a`, head `42aaf817`):** Full Windows build (`longshot.exe` + `longshot_vk.dll` + built-in `system/menu`, compiled with 0 errors and `mkwvk_init` exported via stacked `f87b1975`). Set `frame_generation=1` (`Auto`) and `frame_generation_target=4` (`120`) via bridge `option_set`, verified `settings.ini` wrote `frame_generation_target=4`, and reloaded a fresh session confirming `option_get` returned `value: 4, text: '120'` with `acquire ahead: not now, frame generation runs` and `0` `VK_ERROR_DEVICE_LOST`.

**How to test:**
1. On a 120+ Hz display with an integrated or GPU-limited GPU, set `Upscaler = AMD FSR 3.1`, `Render resolution = 67%`, `Frame generation = Auto`, and `Visual FPS target = Display Hz`.
2. Load `market-entrance`, walk straight forward ~5 s (`0:LUP/5000`) to the central fountain before panning, and compare `vk: frame interpolation:` display latency and native FPS against `RX_VK_FG_AUTO_GUARD=0` (or base `mod-api`).
3. Set `Game frame rate cap = 30`, `Frame generation = Auto`, `Visual FPS target = 120`, and `Frame generation by = Built-in FG` at `50% render scale`, verifying `vk: frame interpolation:` logs `Auto target 120 FPS` and `step-ups` > 0 reaching `cap 3/3` (~120 FPS visual), then restart and confirm `frame_generation_target` persists.

**Still to test:**
- Windows Radeon 860M `mod-api`-head in-play smoke (`42aaf817`): verify `Auto target 120 FPS` log line and overload guard step-down in active gameplay on `mod-api` (build and persistence already verified above; by hand).
- Full `tests/run_all.py --strict` diff against clean `forge/mod-api @ 8247b25a` (by hand).
- Linux AMD RDNA 3/3.5/4 (RADV Mesa): verify Auto overload guard steps down under GPU saturation and recovers cleanly (@Beanstalk test)
- Steam Deck LCD/OLED (4c/8t AMD Van Gogh APU, 60 Hz / 90 Hz): verify Auto overload guard and 60 Hz / 90 Hz cadence (@Beanstalk test)
- Windows NVIDIA RTX 40/50 series GPU: verify DLSS Frame Generation and high-headroom Auto are unaffected by the overload guard (@Beanstalk test)

## Measurements

**Baseline:** Pre-rebase `forge/main` (`8aa5ab87` vs `670c2411`, binary `49097aae` with follow-ups `657af9bd`/`670c2411`; plus earlier 3-round A/B `0e32bc10` vs `95afa556`). This branch is rebased onto `forge/mod-api @ 8247b25a` (head `42aaf817`); `gpu/vk/framegen_auto.h` is byte-identical between `670c2411` and `42aaf817`, so these pre-rebase `main` captures serve as secondary measurements until the `mod-api`-head smoke run under **Still to test** completes.

**Verdict:** On pre-rebase `main` (`8aa5ab87`, Radeon 860M @ 120 Hz, `67% render scale`, secondary until `mod-api`-head smoke completes), cuts Auto framegen `fg_latency.csv` median display latency by **76.1%-82.8%** (`127.7-139.5 ms -> 22.0-31.7 ms`), lifts native FPS by **+32.5% to +48.2%**, and lifts 1% low FPS by **+27.0% to +31.9%**; in prior 3-round A/B (`0e32bc10`), also verified **-68.4% to -77.4%** log display latency, **+19.7% to +25.7%** native FPS, **+40.5% to +53.0%** 1% lows, and #2226 30 FPS cap FIFO recovery (`24.01 -> 29.99 FPS`, `99 -> 0` `<2 ms` bunching). Under a 30 FPS cap with `Visual FPS target = 120`, Auto recovered `0 -> 1 -> 2 -> 3` (`step-ups=4`, `119.4 FPS` Built-in FG / `112.2 FPS` FSR 3.1 FI). Zero impact when Frame Generation is Off (< 0.5% variance) or when `RX_VK_FG_AUTO_GUARD=0`.

Setup: Windows 11 (build 26200), AMD Ryzen AI 7 350, AMD Radeon(TM) 860M Graphics (8 CUs, RDNA 3.5 iGPU, 6 GB VRAM), Adrenalin 26.10.1 (LLPC), `1600x1000` windowed at 120 Hz (`screen 2880x1800 at 120 Hz`), AMD FSR 3.1 (`dlss=3`), `67% render scale`, AMD FSR 3.1 Frame Generation (`frame_generation=1`, `frame_generation_by=0`), `RX_VK_PRECOMPILE=1`, `>= 12 s` post-load settle, interleaved runs (2 rounds Immediate in Market & Hyrule Field, 1 interleaved pair FIFO in Market).

**Where it makes a difference (pre-rebase `main` @ `8aa5ab87` vs pre-rebase PR @ `670c2411`, `67% render scale`):**

| Metric | Before: pre-rebase main @ 8aa5ab87 | After: pre-rebase PR @ 670c2411 | Delta |
|---|---:|---:|---:|
| **Market Uncapped, Immediate, Auto (Display Hz), 67% render scale:** | | | |
| Native FPS | 23.47 | 33.49 | +42.7% |
| Native 1% low FPS | 13.61 | 17.28 | +27.0% |
| `fg_latency.csv` median display latency | 127.7 ms | 22.0 ms | -82.8% |
| **Market Uncapped, FIFO V-Sync, Auto (Display Hz), 67% render scale:** | | | |
| Native FPS | 22.47 | 33.29 | +48.2% |
| Native 1% low FPS | 13.72 | 18.09 | +31.9% |
| `fg_latency.csv` median display latency | 139.5 ms | 30.7 ms | -78.0% |
| **Hyrule Field (`castle-gate`) Uncapped, Immediate, Auto (Display Hz), 67% render scale:** | | | |
| Native FPS | 23.70 | 31.40 | +32.5% |
| Native 1% low FPS | 15.12 | 19.87 | +31.4% |
| `fg_latency.csv` median display latency | 132.6 ms | 31.7 ms | -76.1% |

**Prior 3-round standalone A/B (pre-rebase `main` @ `0e32bc10` vs pre-rebase PR @ `95afa556`, `#2226` 30 FPS cap FIFO + 60 FPS cap, `67% render scale`):**

| Metric | Before: pre-rebase main @ 0e32bc10 | After: pre-rebase PR @ 95afa556 | Delta |
|---|---:|---:|---:|
| **Market 60 FPS Cap, Auto (Display Hz), 67% render scale:** | | | |
| Native FPS | 25.47 | 30.65 | +20.3% |
| Native 1% low FPS | 18.53 | 26.26 | +41.7% |
| Display latency (log mean) | 124.0 ms | 32.7 ms | -73.6% |
| **Issue #2226: Kokiri 30 FPS Cap, FIFO V-Sync, 120 Hz, 67% render scale:** | | | |
| Native FPS | 24.01 | 29.99 | +24.9% |
| Native 1% low FPS | 22.16 | 27.09 | +22.2% |
| Display latency (log mean) | 147.1 ms | 33.3 ms | -77.4% |
| Presentations `< 2 ms` apart (per 5 s) | 99 | 0 | -100% |

**Where it does NOT make a difference (within run-to-run variance, pre-rebase `main` @ `0e32bc10` vs `95afa556`):**

| Metric | Before: pre-rebase main @ 0e32bc10 | After: pre-rebase PR @ 95afa556 | Delta |
|---|---:|---:|---:|
| Market Uncapped, Frame Generation Off (`frame_generation=0`), 67% render scale: Native FPS | 47.06 | 46.84 | -0.5% |
| Market Uncapped, `RX_VK_FG_AUTO_GUARD=0`, 67% render scale: Native FPS | 25.52 | 25.70 | +0.7% |
| Market Uncapped, `RX_VK_FG_AUTO_GUARD=0`, 67% render scale: Display latency | 123.7 ms | 124.5 ms | +0.6% |

**Raw log excerpt: capped 30 FPS recovery (`Visual FPS target = 120`, Built-in FG, Market `1680x1048`, `50% render scale`, pre-rebase `main`):**
```text
[hos host] vk: frame interpolation: 597 frames shown on time, 0 late (over 2 ms); shown apart: <2 ms 7, 2-7 95, 7-9 343, 9-12 110, 12-17 38, 17-25 4, over 25 0; the game's frames presented 33.6 ms after the game handed them over
[hos host] vk: frame interpolation: Auto target 120 FPS, cap 3/3 made frames/game frame (step-downs 0, step-ups 0, hitches capped 0; RX_VK_FG_AUTO_GUARD=1)
```

## Risks

- **Escape hatch:** Setting `RX_VK_FG_AUTO_GUARD=0` in `longshot_env.txt` disables the overload guard and hitch suppression completely, restoring prior unguarded Auto behavior.
- **Options compatibility:** `frame_generation_target` defaults to `0` (`Display Hz`) in `longshot_options.ini`; existing configs remain fully backwards-compatible.
- **Caches & ABI:** Zero shader or SPIR-V changes (shader cache untouched). `LsSettings` gains `frame_generation_target` (`LS_SETTINGS_LAYOUT = 0x5c4ee59f60fcf0e4`, regenerated in both `game/settings_abi.h` and `game/crates/host-sys/src/settings_abi.rs`), so game and renderer must be built together; `MKWVK_API_VERSION` is unchanged. No game assets or save files are touched.

## Checklist

### Ready for review

- [x] One topic, on current `mod-api` (`8247b25a`); the title is a Conventional Commit.
- [x] Tested on my own PC, in the game for a change the game runs, as Testing says.
- [ ] `mise run test` passes (18/20 targeted `--strict` pass; full `tests/run_all.py --strict` on `mod-api` pending).
- [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 switch added or changed: it ships at the default the measurements chose, with its row in `gpu/vk/switches.def`.
- [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 llvm-mingw `longshot.exe` + `longshot_vk.dll` build verified; Linux build pending CI).
- [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.

Reviewed-on: #2369
Coalescing a mod's repeated write kept its first 'before' even when another
mod wrote the same flag or bytes in between, so stopping the first mod wiped
the second's live change. It now merges only when no other mod's entry for
that place comes after; otherwise it pushes a new entry.

Also: a memory entry back to its original bytes is dropped (as flags were),
a load keeps only the saved entries of the slot it read, and an entry saved
while its undo was asked no longer counts as undoing.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
[profile.game] inherited release's overflow-checks with panic = abort, so an
unforeseen overflow on a guest value killed the game mid-frame. The builder
keeps its checks; the game turns them off.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
A notice whose name is 2047 bytes of UTF-8 or more failed the conversion and
was dropped silently, so hot reload missed the change. It is now told as
MOD_WATCH_OVERFLOW (the list's folder: MOD_WATCH_LIST), and the caller looks
at everything again.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
open_thing checked a path under logs/ or bug-reports/ (both writable by the
confined game) and later handed the same path to xdg-open, so a symlink
swapped in between was what got opened. The file is now opened with
O_NOFOLLOW, fstat-checked to be the inode realpath/stat saw, and copied into
a 0700 folder of the broker's own, whose copy xdg-open gets. (A
/proc/self/fd path would mean nothing to the viewer xdg-open hands it to.)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
children() made a Vec for each pane visited every frame, the visit's groups
were Vecs, and guest_is allocated and read a name a checked byte at a time
(up to 64 reads). The sibling links are now walked in place, the groups are
fixed arrays, and a name is read with at most two read_bytes (split at a page
end) into a stack buffer.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The cheats' switches in mods.json's "cheats" are no longer read (they start
off once and are switched on again in the Mods tab); discord_status is
retired; a cheat word is exactly eight hex digits, so 0x123456, +1234567 and
-1234567 no longer read as words.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Nothing called it; trust is the mod's flag in Services, never what its id
starts with.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
limits.rs relies on QuickJS-ng 0.18 making InternalError (its out of memory)
uncatchable; a bump of the vendored interpreter that changed that now fails
this test rather than letting a mod catch its own heap limit.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
cc_env joined the toolchain's flags with spaces, and cc splits *FLAGS at each
space, so a sysroot under a folder with a space broke the build. The flags
are now shell-quoted where needed, with CC_SHELL_ESCAPED_FLAGS set so cc (and
the cmake crate through it) reads them as words.

rust_missing now says which of its two causes it is: no cargo in a checkout,
or a player's tree that cargo cannot build, and what this builder carries.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The game reads Sequence/NormalTitle.module.ainb before the mods' first frame, so
a skip asked for by the script came too late (an in-game run: refused). The skip
is now armed at game_init by a system mod's system.titleSkip toggle (Skip title
screen's row) or the launcher's slot; storage.saves.skipTitle is gone, and the
script only reads titleSkip() and turns its row off when there was no save.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
game_core::title::pick against a fake GameDataMgr, caption records and
blackboard. The system mods' committed types/ (fps-counter, menu, mods-tab,
mod-inspector) written again with longshot-builder mod types for the API's
titleSkip and the manifest's system.titleSkip.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The tab is read again when the host says it changed; the runtime keeps
unchanged rows' objects, so the read-ahead, the stale flag and share()
go. The list's first drawing stays a part a frame (12 mods a part, from none at the first open), and
the strings are read at the start: drawn whole at the menu's first open
it ran 2.7 ms of CPU in a frame, past the 2 ms warning.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
A Choice, Slider, Keybind or TextInput with no fill or border of its own
is drawn in a sunken well with a border, the focus colour while focused
(Rust paint: no script cost). The kit's Button gets a border and a
brighter label on focus, the Toggle's switch a border, Sections more room
above. Modern dark's border and sunken tokens and Classic's sunken one
are stronger so the wells read on a TV.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The Mods tab's first open fired stateChanged and profileChanged together, and
each made both of its useHost hooks read and deep-compare the tab at once:
four reads of the tab in one frame. An event or a deps change now only marks
the hook; the flush reads each marked hook once.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
A switch read the page's declarations and rows and drew it in one frame:
6.1 ms of script CPU on the Controls page in the modtool cost test, over the
4.5 ms ceiling. The declarations are read at the next frame, the rows at the
one after, and the menu draws the page those were read for (the old one until
then), as its tests ask. The Mods tab works out a mod's help in its memo'd
line, not every line's on every frame of the list's first drawing.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
merge: mod-api's ray, shape and flow-patch PRs and #2369 (#2434)
Some checks failed
CI / Third-party parts and guide screenshots (pull_request) Failing after 13s
PR description / Title and description (pull_request_target) Successful in 23s
CI / What the change needs (pull_request) Successful in 1m11s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Failing after 1m23s
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
0af856084b
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
merge: main into mod-api (#2434)
Some checks failed
CI / Third-party parts and guide screenshots (pull_request) Failing after 13s
PR description / Title and description (pull_request_target) Successful in 23s
CI / What the change needs (pull_request) Successful in 1m19s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Failing after 1m12s
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
5f47f46bb9
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
fix(ui): useHost is undefined, not the old value, in a render whose deps changed, and reads at the next flush, so a switch's reads stay out of its frame; the menu draws its page before meanwhile (#2434)
Some checks failed
CI / Third-party parts and guide screenshots (pull_request) Failing after 30s
PR description / Title and description (pull_request_target) Successful in 43s
CI / What the change needs (pull_request) Successful in 1m47s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Failing after 1m27s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Successful in 18m6s
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Failing after 20m22s
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Successful in 21m34s
CI / Website build and checks (pull_request) Failing after 1m29s
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Successful in 19m45s
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Failing after 29m3s
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
f4ef44abd0
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Main's native cloth (#2036, by snaildev99) ported to the Rust game side: thirteen pieces of the
Havok cloth's step (the solver's bending, link, bend link, anchor and tether passes, the particle
boxes, the capsule cull, Prepare Matrices, the Verlet step, the capsule and sphere collisions, Object
Space Deform and Mesh Bone Deform) run on host kernels that give the game's bits exactly, the rest
lifted. On by default.

- game/crates/cloth: a new crate. kernels/ holds #2036's thirteen spec-written C++ kernels unchanged,
  compiled by its build.rs with cc (C++17, no exceptions, RTTI or C++ runtime, -ffp-contract=off,
  x86-64-v3) into liblongshot_rs.a, with the compiler the builder hands cargo for the target
  (cc_env). src/ is game/oot_cloth.c's glue in Rust: the switch and the float-mode gate (lib.rs), the
  three whole functions (whole.rs), the link, bend link and tether loops (links.rs), the boxes, cull,
  Verlet and bones loops (loops.rs), the collisions (collide.rs), the skinning (skin.rs), check mode's
  copies and compares (check.rs), the counts and log lines (stats.rs), HOS_CLOTH_DECLINES and
  HOS_CLOTH_CAPTURE (declines.rs). src/ffi.rs mirrors the kernels' structs, checked against the C++
  compiler's layout (kernels/layout.cpp).
- The 25 cloth.* sites back in game/sites/sites.toml with their e0f3ccfa entries; engine callbacks
  through game_core::engine. HOS_NATIVE_CLOTH=0 installs none (main's answered 0 at each call); the
  ways out's compares only with =check. The close's last decline counts from game_shutdown.
- Switches as main had them: HOS_NATIVE_CLOTH (on, 0, check), HOS_CLOTH_DECLINES, HOS_CLOTH_CAPTURE,
  HOS_CLOTH_CAPTURE_N. The decline reasons' value classes (cloth_why.h) are gone: no kernel has a why
  function, so a reason is the call's or the kernel's.
- Tests: cargo test -p cloth (the hooks on the stand-in host against the kernel on the same bytes,
  partial hand-backs, declines, check mode's compare and mismatch, which callbacks the switch
  installs, struct layouts); tests/test_cloth_{kernels,loops,step8,step9,step12,sphere}.py hold the
  kernels to their specs as on main (their C-glue halves are the Rust tests now; tests/cloth_kit.py
  replaces cloth_glue.py). docs/dev/reference/native-cloth restored, pointed at the crate.

Co-Authored-By: snaildev99 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The game writes its logs and traces to diagnostics/logs/ where the game folder is organized (data/image.bin;
gpu/vk/vk_paths.h log_path): dev.py ab looked in logs/ and failed every run with no frame trace. The Lost Woods
(child), where #2036 measured the cloth, is a scene. site_owners.txt names light.boxAcquired and ui.listSetup, so
cargo test -p sites passes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
#2708's organized game folder (its image in data/) keeps the logs, the frame trace, the crash records and the
performance summaries in diagnostics/, and language.txt in config/. The Linux and Windows sandboxes granted only the
flat places, so a confined game could write none of them (dev.py ab found no frame trace) and the Game language row
was not kept. sbx_game_subdir and sbxw_game_subdir map the game folder's folders by layout, language.txt follows it,
and both brokers' open roots are diagnostics/logs and diagnostics/bug-reports there. The flat layout is unchanged.
Tests: the plans and sandbox_linux.c over an organized folder.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The render slice was 2 ms of the wall clock's whole ms, from the flush's start: with the flush's useHost reads before
it, the commit and the collector after it, a frame that built a page (the menu's first open, a tab's rows, the mic
test's redraw, the Mods tab's list) ran 2.1-2.9 ms. The slice now ends by the frame's CPU as the warning counts it
(frameCpuMs, a native of the ui group: every callback of the frame and the running one), looked at every 4 renders.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
merge: native cloth, the organized folder's sandbox grants, and the UI's CPU slice (#2434)
Some checks failed
CI / Third-party parts and guide screenshots (pull_request) Failing after 19s
PR description / Title and description (pull_request_target) Successful in 30s
CI / What the change needs (pull_request) Successful in 1m32s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Failing after 1m43s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Successful in 16m15s
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Successful in 20m48s
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Successful in 21m51s
CI / Website build and checks (pull_request) Failing after 1m25s
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Failing after 29m13s
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Failing after 29m37s
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Failing after 56m32s
5c1cd9f5b1
Co-Authored-By: Claude Opus 5.5 <[email protected]>
main's game reads a profile's settings.ini at its top; this one moves that file into settings/settings.ini once
(host/options_path.c). Written to settings/ alone, main's side of dev.py ab ran without its pinned options: no Skip
title screen, so it never reached play.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
main's game writes longshot_frames.csv to diagnostics/logs/ in an organized game folder but makes only logs/, so
its fopen failed and dev.py ab found no trace for main's runs.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
A cold checkout build ran cargo build -p longshot-rs (69 s cold on mod-api)
at the game's link, after every C unit had compiled: the whole of it added to
the build. It now starts on a thread of its own as the compile starts, worked
out once (RustLink) for the early shader-preparation driver's link and the
game's; each waits for it. A release's carried library is unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
game-core's job barriers wait through host/posix's hos_posix_wait_atomic32 on mod-api, where main's waited through
WaitOnAddress. perf.py's wait list had only the latter, so on mod-api the barrier waits counted as running:
ModuleSystemWorkerN looked +5 points busier (libc 7.8 % self under hos_posix_wait_atomic32). Counted as waiting,
the workers wait in the barriers 5.3 % of their samples against main's 6.4 %.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
At 1080p and 1440p 16:9 Highest (and Auto on 12 GB or more) made the sun's cascades 4096 texels a side where main
draws 3072. Past 16:9 the sizes stay as #2431 made them (4512 at 21:9, 5120 at 32:9), so ultrawide keeps its
sharpness; the pool gives no extra room at 16:9.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
generation_of ran menu_capabilities (an upscaler probe and a hash of every list) at each frame on the main thread:
0.18 % of its samples in Hyrule Field. The generation moves when a card, a monitor or a list changes; a change is now
seen within a quarter of a second.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
glibc carves a thread's static TLS (about 55 KB in mod-api's longshot) out of the stack it is asked for, so the
64 KB A/B thread had a few KB left and crashed (SIGSEGV) at its first log line right after boot:
HOS_AB=HOS_GAME_BARRIER_WAIT=0,3,0 died before the first present in 3 of 3 runs.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
With no room for a larger sun map (16:9 now) the line read "the game's 305 MB0 MB for the sun's 0 shadows".

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Linux: PR_SET_PDEATHSIG between fork and exec; Windows: the game stays in the builder's
kill-on-close job (detached() and the job's breakaway are gone). The builder's channel
closing ends the game too (builder_link.rs).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The game process refuses a start without the builder's channel (a message box on
Windows, SDL's or stderr on Linux) and the hand-over to a version folder's builder
(host/longshot_exit.h) is gone. The shader preparation and the new
`longshot-builder game [--wait-for-debugger] <program> [args]` give it a channel that
answers hello only.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
What main's 7 commits became here:
- #2730 (Maxwell BC4 pass split, gpu/vk/vk_draw.cpp): taken whole, beside mod-api's program_hooks_drawn.
- #2732 (renhdrum.py and longshot_builder.py pass rustc's and cc's flags whole): merged clean; its tests pass.
- #2736 (foliage impostor flags): the C site (game/oot_sites.c, sites.def, locations.toml) is the Rust engine
  callback game-core engine.rs on_foliage_impostor_flags, its site in game/sites/sites.toml with its e0f3ccfa place;
  tests/test_foliage_impostor_flags.py is the Rust test foliage_keeps_the_scenes_fade_choice; site_owners.txt
  names it.
- #2750 (organized folder's diagnostics/): longshot-game's layout.rs already makes diagnostics/logs whole
  (create_dir_all) and the sandbox grants diagnostics/; game/game_layout.c and tests/test_game_layout.py stay deleted;
  run_all's per-OS RUN_ALL_ARGS kept, its runner test reads main's declaration from a fixture; profiles.md names
  layout.rs.
- #2743 (Lens eye pass): clean.
- #2724 (the new logo): clean but docs/user/images/guide/manifest.json, kept as mod-api's (its renames).
- #2728 (a stereo prefetch wave's second channel): host/audio_source clean; the load test's new prefetch sound is
  SE_Fox_Emote01 on the test's own route 2.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
host/broker_net.c's engine as a builder crate, not wired in yet: the same
frames byte for byte (a port of broker_net_frame.h), op names, results and
rules (origins, the address rule with 192.0.0/24, 192.88.99/24 and 6to4
unwrapped, pinning, redirects by hand, headers and methods, per-mod limits and
the engine's 256-grant and 64-connection caps, grants bounded by the manifest,
longshot/ipc's local endpoints). One TLS stack on both systems: rustls (ring)
with the system's certificates, tungstenite's WebSockets over the engine's own
pinned stream. A bare-address host is fetched, not refused as out of memory.

Engine::handle(conn, GameMsg) with a Sink for its answers, and FrameLink over
the raw frames, for the builder's channel to wire. Tests run against servers
on 127.0.0.1 with a test CA and resolver of their own.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The user's names: the game process longshot-game(.exe) (build_core::game_layout::program_name), the builder players
start Longshot on Linux and Longshot.exe on Windows. play::OLD_LINUX_NAME / release::OLD_LINUX_NAME: an install from
before is still played and found by Longshot.x86_64. Windows names match any case, Linux's exactly. game in the
builder's commands. Hand-over text left in the user docs is gone; the crash redaction's length follows the name; the
pipeline tour's test reads the shipped list's data_file path.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
build_compile's build_stamp (the record's stamp.builder) compiles into host/version.c alone as LONGSHOT_BUILD_STAMP;
the C client and builder_link.rs send it in hello; build_driver::channel::stamp_matches refuses a mismatch (a game
with no stamp is taken). hello_only stays lenient for developers' tools.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The game owns longshot_options.ini; the IniOptions fallback and options::preload only ran with the switch off.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
ModCx::services, SiteDef::engine, FnDesc's permission and feature, FiDesc::path.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
build_core::driver_caches: MESA_SHADER_CACHE_DIR and (with NVIDIA's driver) __GL_SHADER_DISK_CACHE_PATH under
$XDG_CACHE_HOME/longshot/, unless the player or Steam named one, set in the game's environment by run_game before it
starts; host/sandbox_linux.c no longer sets them and grants whichever the variables name.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
sha2 is already the workspace's (pinned, the builder's and effect-compiler's).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
LONGSHOT_SANDBOX_BY_BUILDER, checked with the kernel (the root folder refused):
no Landlock or private folders of the game's own, the builder's broker adopted
(LONGSHOT_BROKER_FD), its bus filter in the builder's LONGSHOT_BUS_DIR, then
seccomp. Both variables come from the real environment only.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
build_core::sandbox_linux ports host/sandbox_plan.h's rules (HOS_SANDBOX's
words, the per-ABI masks, the rules) and the folders sandbox_linux.c finds.
From ABI 9 run_game adds every rule to a ruleset before the fork; the child
only sets no_new_privs and restricts itself. The broker is started by the
builder, outside it. Below ABI 9 (the private folders) or on any failure the
game confines itself as before.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The builder<->game channel was two pipes of JSON lines. It is now the one
link that later carries the broker's ops and passed fds:

- Linux: one AF_UNIX SOCK_SEQPACKET socket pair, LONGSHOT_BUILDER_CHANNEL
  "<fd>"; an fd may travel beside a frame (SCM_RIGHTS,
  build_core::channel::send_with_fd / recv_with_fd).
- Windows: still two anonymous pipes, "<read>,<write>", frames read off the
  byte stream as header then payload (a duplex synchronous handle would
  serialise the reader thread's wait with every write; overlapped I/O in all
  three ends buys nothing while handles go by DuplicateHandle).
- Every message is a host/broker_frame.h frame of the new type BUILDER_JSON
  (14, past the broker's types), the builder's with the reply bit, the payload
  today's JSON text. A message over 16 KiB goes as a run of frames, each but
  the last with the flag MORE (0x0001), joined up to 1 MiB.
- build_core::frame ports the parser and encoder to Rust with the C side's
  test vectors; the game's builder_link builds the same file.
- All three ends switched: host/builder_channel.c, builder_link.rs,
  build-driver's serve and build_core::channel::hello_only. The ops and the
  hello stamp check are unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The schema crate's table now carries each script system mod's shipped files
(include_bytes!), and api::system_disk::SystemDisk serves them at
<game>/system_mods, a folder in no disk: nothing in the game folder stands in
for them, and no tree hash runs at a start or before each start. The builder
installs no system_mods/ (an older build's is taken out); the broker reads a
system mod's ipc bound from the embedded manifest (game_system_manifest).
HOS_SYSTEM_MODS_DIR still runs the sources live.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
host/start_timeline.c marks each stage (main, channel, settings, reserve, image,
host, mods_found, game_init, display, renderer, the guest's init calls,
module_init, mods_started, frame, play) and writes
"start: timeline ms: ... rss_mb= shmem_mb=" at the first frame in play.
Documented in profiling.md, The start-up timeline.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
sendfile into the memfd at the image's offset: no page fault per page and no copy
through the process. The file is not mapped over the window instead: the renderer
hands the GPU the memfd's pages as dma-bufs, so the image must be in them. Other
cases (anonymous window, Windows) read as before.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
A checkout's build takes liblongshot_rs.a from the store when its Rust inputs
(the crates longshot-rs needs, Cargo.toml/Cargo.lock, what build scripts and
include_*! read, the toolchain, target, C compilers and flags) match a stored
entry: no cargo runs. A miss copies the changed inputs into one fixed folder per
toolchain and lock and runs cargo there under a lock, so dependencies compile
once per PC and only changed crates rebuild. LRU-kept to 30 GB
(LONGSHOT_RUST_STORE_MB). A release's carried library is unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
A system mod folder with no Cargo.toml and no runtime is native declarations: the registry gives it
api::mods::Declarations, and one registry test holds their settings' stores.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Its provenance stays in golden.json's about.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
game.menu.systemSettings() gives every Insert menu row the system mods' manifests declare, so the menu's tests check the layout against the real declarations instead of menu_rows.json, a snapshot whose generator was gone. The checks of test_menu_sections.py (each section keeps a row on every PC) and test_menu_text_keys.py (every label translated or listed) are TS tests of the menu mod now; both Python files are deleted. The Graphics-tab snapshot of section titles was layout only and is gone too.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
manifest.json and resolve.json move to game/crates/api/vectors, content.json to game/crates/content/vectors. audio-sweep-40s.ogg and native_code_hash.json (the hash of a native/ folder, a scheme code_hash no longer has) were read by nothing.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A manifest's permissions and optionalPermissions are Vec<ManifestPermission>
(Plain(Permission) or Net(origin), the origin normalized), parsed when the
manifest is read. Grants hold the typed set; ModApi::require and
has_permission take the schema's Permission; the literal compares
("exefs", "ipc", "content.add", ...) and ModManifest::lists/asks
are on Permission; HOOK_TIERS/held_by are typed. Name strings stay only
at the boundaries: profile.json/trust.json JSON, script calls by name,
the Mods tab's edits, and modtool's output.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
api's hand-written port of host/mod_json.c moves to game/crates/strict-json with
its rules as parameters (Rules::MANIFEST, CONTENT, LIST, VALUE). content's
serde-based reader goes; content::json keeps its Json tree, built from the
shared reader's nodes, and its writers. api::json keeps only its writers.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
mem::span resolves a guest range as a Span (host pointer and length) whose
ld8/ld16/ld32/ld64/ld128 are safe and #[inline(always)], each checked
against the length; u16_span, top_u16 and Records take a Span and check
the records once, not per load. Every hook that reads guest memory itself
moves onto it; ranges only a kernel touches keep host's raw pointer.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
tests/test_settings_table.py regexed layout.ts; the menu mod's test now reads TABS, PAGES and the system mods'
declarations as they are, and the docs table through the fake game's game.menu.settingsTable().

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The setting reader's dozen get/as_str/match ladders become a Fields helper
(flag, text, short, texts), its type a Ty enum with its names in one table
in place of the string list, and its body three functions (read_fields,
kind_of, native_of) whose errors read_fields prefixes with the id once.
The messages mod authors see are unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
tests/test_menu_hooks.py compiles gpu/vk/menu/upscaler.cpp and preset.cpp without
MENU_LAYOUT_ONLY over stand-ins for the renderer calls (tests/menu_hooks/), with a
minimal windows.h. The hn_*/lock_* and preset-engine checks of test_upscaler_rows.py
and test_auto_settings.py that read those files' text move onto it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The table's header, rows and totals are Grids of one set of tracks; the table pane
takes half the tab by flex and its columns' least width from layout, so TABLE_MIN,
the per-column cell widths and the header's fixed height are gone. The slow frame's
bars are a Grid of the table's Budget and Heap tracks.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
#2704's check looked for the row's on_change hook and for menu_init()/menu_tick() publishing opts.antilag; with the
rows' values taken from the game's snapshot, framegen_rows publishes it right after taking it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The system mods' test ran with echo off, so a cost test's log.info line was
dropped and its numbers showed only in a failure's message. With the switch
on, the test echoes the mods' test-file lines and prints the cost ones to
cargo's output. The FPS counter's cost test now logs its numbers too.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
host.rows(keys), the menu's read of the shown tab's rows each REREAD_S and
after each change, scanned the settings service's whole row list for each
key, several times: rows_raw's find, game_state's is_binding/service_row
(with a clone), the text check in rows(), and restart_pending's filter over
every row. So a steady frame on the Graphics tab paid for every declared row
of every page, the Controls grid's and the area mods' too, and grew with any
row declared anywhere (bindings_reset on the Controls page cost the Graphics
tab's steady frame).

The rows are indexed once per row list (the service swaps the list whole on
a change, so the index is kept by the Arc's identity): each key's first
placed row, the keys of text rows and the placed restart rows in order.
Every lookup gives the row the scans gave.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
prompts_face.c (the faces, Auto's face), prompts_binds.c (the controls followed), prompts_sizes.c (the size tables) and
prompts_cache.c (the patched cache files) split out of prompts.c with their behaviour unchanged; the build compiles every
host/*.c, so nothing else changes in it. test_prompt_auto_face, test_prompt_current_binds, test_mods_size_table and
test_prompt_cache_errors compile those files as they are, with stand-ins for what they call, instead of cutting functions
out of prompts.c as text or matching it with regexes.

The faces' names and the Switch buttons' default pad inputs come from host/prompts_faces.h, generated from build-assets'
faces.rs (c_header; its test keeps the file current), with a _Static_assert for each HOS_PROMPT_*, HOS_PAD_* and HOS_SW_*
the build numbers its files by: vk_api.h drifting from the fonts as built stops the host's compile.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Moved as they are into loader/package.rs, exefs.rs, scan.rs, state.rs and switching.rs; public paths kept by
re-exports from loader. The ExeFS tests move with exefs.rs.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
A setting with no place and no key in layout.ts went to the page "mods", which the menu
never draws as rows: a native system mod's (shadows' tuning rows) was nowhere, a script
system mod's (Discord's, the inspector's Corner line) only on its own Mods tab page. Each now
says its place; tests/test_system_settings_placed.py fails on any system mod's setting the
menu would not show (NOT_ROWS: dlss5_custom, the game's own state; keybinds: the Mods tab's
Keybinds page).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The reconciler's default props test compares arrays item by item and elements by type, key and props, a few levels
down, with nothing allocated: a parent drawn again leaves a <Line style={[a, b]}>{text}</Line> child and its subtree
alone. useHost's shareValue makes nothing while the parts are the same, and is exported as share(before, now) for values
read on a timer. The menu: state and status read again only when changed fires (deps []), not after every render; each
row's line reads its own row on its own event, the page laid out again only when what is shown changed (layoutOf). The
mod inspector shares each read's snapshot and keeps its table's row render, so a read draws only the mods that changed.
The cost tests' steady ceilings tightened (menu 2.5 -> 1 ms, inspector 8 -> 1 ms) and an idle menu frame checked
under 0.1 ms.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The game's TypeScript compile moves into its own crate, ts-transform (script::ts
re-exports it). The api build script compiles each embedded script system mod's
TypeScript with it (the same options and path: the same JavaScript and map) into
$OUT_DIR and embeds it (api::system::precompiled, SYSTEM_JS); a trusted compile
of an embedded source returns it with no transpile and no key hashed. A player's
mod's TypeScript is compiled as it loads, as before; a HOS_SYSTEM_MODS_DIR source
changed since the build too.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
With abstract UNIX sockets scoped (Landlock ABI 9, or the private folders), xcb's
connect to @/tmp/.X11-unix/XN fails with EPERM, and xcb falls back to the path
socket only on ENOENT or ECONNREFUSED: the game had no X server, and NVIDIA's
Vulkan driver ran libnvidia-eglcore, about 1.8x the recording thread's CPU.
The builder's confinement and the game's own give DISPLAY in its path form
(/tmp/.X11-unix/XN), which the rules already reach; abstract sockets stay scoped.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
dev.py rt ran the base's longshot-builder prepare. A base from before the game's
rename starts "longshot", the base's own old game, beside the pack's longshot-game
and renderer: it exited 3 (no usable Vulkan), the runtime got no dev_packs.json,
and dev.py ab then found no builder for it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The game sets longshot_env.txt's (or HOS_ENV_FILE's) switches itself, after the
builder made its rules from the environment alone: RX_VK_DLSS_DIR's folder and
HOS_CONTROL set there were outside the confinement. The builder now takes the same
names from the same file, the environment first; never the sandbox's own.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The builder's rule gives language.txt alone, written in place, and only when it is
there: the builder never made it (the game did, at a start the confinement had no
rule for), so the Game language row could not save. It now writes the game's
template first. The game's own early write named the folder's language.txt even in
an organized build, where the game reads config/language.txt.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Under the builder's Landlock the game writes its settings folder alone, not the
game folder or the profile's top: the one-time move of settings.ini (or
settings.toml) into it failed, and the old settings were never read again.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Below Landlock ABI 9 the builder now makes the private folders (a user and
mount namespace with tmpfs over /run, /tmp and $XDG_RUNTIME_DIR, the rules'
paths bound back) in the game's child before Landlock, after a trial in a
throwaway child (build_core::private_folders). host/sandbox_linux.c keeps
only the kernel check of the builder's word, the broker's adoption, the bus
filter, seccomp and the held reason (LONGSHOT_SANDBOX_PRIVATE);
host/sandbox_private.h is deleted.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
host/sandbox_linux.c's seccomp line names unshare's flags as refused; the check now matches a call (unshare().

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A busy PC once made one of three "open" samples 12.13 ms (limit 12); the code's cost is 8.2-8.8 ms on both sides of
an A/B. The ceilings are unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The lift's image has every switch on, so a patched function hashed differently from the shipped profile (recorded
without mods) and lost its counts, its hot unit and its cold placement; its versions (the switched-off code, what
runs by default) were written with no counts at all. A switched function is now looked up by the game's own code's
hash when its own is not in the profile, and its versions take its counts.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
host_sys::mem::range called hos_guest_bytes for every GuestPtr read and write; the C hooks it replaced used the
inline hos_guest_range. The window's base and end are now asked of the host once and the same test made inline.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Every plain and dispatched hit read hos_site_callee (two calls through the module table) and a chain put it back
before each handler, at every site. Only a replace site's hook stores one; at the others nothing is read and nothing
put back, and SiteCx::callee reads the thread's value when asked.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
- build_core::sandbox_windows (new): the container's profile and SID, the ACL grants the plan keeps, the record
  (sandbox_grants.txt, sbxw_record's rules ported with tests), pruning an older start's grants, the game started with
  STARTUPINFOEX (security capabilities, a handle list, suspended, the builder's job), its stdout and stderr relayed by
  the builder, a loader failure retried once with the extension points off. sys.rs's Windows run_game uses it unless
  HOS_SANDBOX=0 or --prepare-shaders.
- The broker: the game's program with LONGSHOT_BROKER_SERVE, started unconfined by the builder. It runs the game's start
  up to hos_sandbox_start, says its plan as @@plan lines (hos_sandbox_broker_plan), takes the game's id on stdin and
  serves four pre-connected message pipe pairs (main, side, pads, files): no named pipe, no client_is_ours, no listener.
  Files a request names are opened as the game's token.
- host/sandbox_windows.c 1171 -> ~560 lines: no relaunch, start_confined, std relays, probe and recover, grants,
  record or revoke. Outside a container the game refuses to start unless HOS_SANDBOX=0.
- longshot-builder sandbox-revoke replaces longshot-game --sandbox-revoke.
- Windows restarts always go through the builder (rebuild.rs): only it can give a new run its broker.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
profile.game had release's thin local LTO and 16 units, and no target CPU: baseline x86-64 against the C's and the
lifted code's -march. cc_env now puts -Ctarget-cpu=<the C's -march> in the target's RUSTFLAGS (Linux and llvm-mingw's
Windows, merged with its link flag; into RUSTFLAGS when the environment sets that), so it reaches cargo and the Rust
store's key.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
- tests/test_sandbox_windows.py: the start decision (SBXW_REFUSE), the note; test_source reads the builder's start
  (build_core::sandbox_windows) and the broker's served handles, not the relaunch and the named pipe.
- tests/test_broker_files_wine.py: the files pipe made and connected as the builder makes it, its client end passed in
  the child's handle list and LONGSHOT_BROKER_HANDLES.
- tests/test_sandbox_linux.py: LONGSHOT_BROKER_HANDLES and _SERVE where LONGSHOT_BROKER_PIPE was.
- host/sandbox_win_plan.h: the pipe name and SDDL helpers, sbxw_env_build, SBXW_REVOKE and sbxw_failure_goes_on gone.
- host/sandbox_diag_windows.c/.h, host/sandbox_win_diag.h, tests/test_sandbox_diag_wine.py and LONGSHOT_SANDBOX_PROBE
  gone; the builder writes logs\longshot_sandbox.txt after a start Windows could not load.
- host/sandbox_windows.c: the Found struct's head l68 cut, back.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
docs(guide): settings-graphics.png's manifest entry is main's recapture, the image in the tree, with device_policy.h recorded at the merge (#2434)
Some checks failed
CI / Third-party parts and guide screenshots (pull_request) Failing after 17s
PR description / Title and description (pull_request_target) Successful in 28s
CI / What the change needs (pull_request) Successful in 1m18s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Failing after 1m57s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Successful in 16m7s
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Successful in 18m30s
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Failing after 34m37s
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Successful in 17m46s
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Failing after 12m51s
CI / Website build and checks (pull_request) Failing after 14m24s
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Failing after 31m10s
6c87b49758
Co-Authored-By: Claude Opus 5.5 <[email protected]>
- build_driver::broker: the channel's `open` op, the rule host/broker.c and broker_windows.c held: https links under
  Longshot's pages and the stamp's crash_issue= (no dot segment, plain or encoded); a folder or a .txt/.json/.log under
  the game folder's logs/ and bug-reports/, links followed first; a file copied into the builder's own folder first;
  one a second, a refusal not counted. Unit-tested with the C's vectors.
- channel::Config.game (the game folder, from the program's path in play.rs); BUILT_IN names open.
- The game: builder_link's GAME_OPS and check() take open (what alone); game_builder_open (game/game.h) for the host.
- host: hos_broker_open is game_builder_open on both OSes; the brokers answer BROKER_OPEN BROKER_E_NONE; open_thing,
  the copies, dir_still_same, real_path, folder_name_plain, the roots and issue prefix, broker_url_allowed,
  broker_path_allowed and broker_win_path_allowed deleted (their tests with them).
- Docs: sandbox.md's opening, build.md's ops, mod-ops.md.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
- test_sandbox_windows: the broker's own net-channel pipe_pair is checked as
  one instance, local only, connected at once; nothing else makes or names a pipe.
- test_crash_record: hos_main.c's hand-over ExitProcess(0) went with item 4.
- build-core sandbox_windows: Record::keep drops grants at or above a never
  folder (as sbxw_record_keep); the test had a grant below one.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The channel's new `trust` op (build_driver::broker) checks a confined game's
change with api::loader::trust::record (the api crate's list and trust
modules, now built without the runtime too) and writes the profile's
trust.json in place under launcher_profile's EditGuard, 256 a run.
hos_trust_set calls game_builder_trust; both C brokers answer BROKER_TRUST
with BROKER_E_NONE; the trust file is no longer named to the broker, and
game_trust_record and host/broker_trust.h are deleted.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The channel's new `perf_send` op (build_driver::broker) checks the path
itself (a .json directly in the game folder's perf_pending/, read without
following a link, at most 1 MiB), reads the stamp's perf_reports= itself and
posts its own copy with crash::post on a thread of its own, one at a time
and 64 a run. hos_broker_perf_send makes the path whole and calls
game_builder_perf_send (a 45 s wait: Link::call_for). Both C brokers answer
BROKER_PERF_SEND with BROKER_E_NONE; their curl runners, the side channels,
read_policy, broker_perf_allowed, broker_curl_status, broker_stamp_address
and broker_url_clean are deleted.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
- test_sandbox_windows: the summary's send is game_builder_perf_send's, with
  no side channel left.
- test_broker_frame: a game_builder_perf_send stand-in for broker.c.
- build-driver channel test: hello lists open, trust and perf_send.
- api: its_place's profile_mods check only with the runtime feature.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
d40bc96d moved it onto heap.gpuAlloc, a replace site, where set_owner is refused (a worker's replace site changes
the outcome): the chain is now run as the dispatcher runs it, with the callee the site's hit takes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The channel's new `save_download` op (build_driver::broker) takes a file of
the game's, never a path: on Linux a memfd sent beside the request's frame
(build_core::channel::PassReader keeps it in Passed), on Windows a
delete-on-close temporary file whose handle the builder duplicates out of the
game's process (Passed.pid, set at the start). A name of Longshot's only, at
most 64 MiB, <name>.new made fresh then renamed, one every 2 s and 16 a run,
in build_assets::share::downloads_dir. hos_broker_save_download calls
game_builder_save_download. Both C brokers answer BROKER_SAVE_DOWNLOAD with
BROKER_E_NONE; their download code, the Windows broker's impersonation
(open_as_client, client_file, temp_copy) and broker_frame.h's download
helpers are deleted.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
New build_driver::mods_watch: the channel's `mods_watch` op starts a thread
that walks the profile's mods/ (depth 8, 20000 entries, dot names and
node_modules not walked into) and profile.json every second and says what
changed as {"event":"mods_changed","paths","list","overflow"}. The
game's api::watch takes its notices from a Fed queue (api:⌚:FED, set
by builder_link when the builder serves mods_watch; paths checked plain)
instead of the system's when HOS_MODS_WATCH is the default; poll and 0
are as before. No C changed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
New build_core::session_bus (Linux): a small D-Bus client (address, EXTERNAL
sign-in, Hello, method calls of s and i) that longshot-builder's play opens
once the game runs: ScreenSaver.Inhibit held for the connection's life and
GameMode RegisterGameByPID/UnregisterGameByPID for the game's pid. The game
has no session bus: host/broker_dbus.c, broker_dbus.h, dbus_proxy.h and
tests/test_dbus_proxy.py are deleted, BROKER_DBUS_PROXY is answered
BROKER_E_NONE, hos_broker_dbus_proxy and LONGSHOT_BUS_DIR are gone, the
plan has no filter socket rule (sandbox_plan.h and build-core's port), and
the broker is no longer given the trust file's path.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
- longshot-builder play.rs COMMANDS names sandbox-revoke (l68's command),
  so every_command_it_takes_is_one_play_leaves_alone holds.
- build_core::session_bus asks org.freedesktop.portal.Inhibit (idle) when
  the builder runs in a Flatpak (/.flatpak-info) or a Snap ($SNAP); the
  wire format takes u and an empty a{sv}.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
First of the files the builder hands the game at its start. New
build_core::game_log: when the game would have nowhere to log to (no stderr,
/dev/null, Steam's pipe: host/hos_main.c's rule), longshot-builder's play
turns the runs before over (.1 to .4, the last redacted with crash::redact),
makes longshot_log.txt and points its own stderr at it for the run
(StderrTo: the Linux game inherits it, the Windows relay writes to it). The
game is told LONGSHOT_LOG_PATH for its crash record; without a builder it
still opens its own log. C: host/hos_main.c.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
build_driver::channel::stamp_matches takes one stamp, never empty: a game
with no stamp, or a builder with none, is refused like another builder's.
The channel tests' hellos carry the test builder's stamp, and one checks the
empty refusal. docs/dev/reference/build.md says so. No C.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
- host/hos_main.c: prepare_only only on Linux (its one reader is the Steam
  pipe arm); Windows set it and read nothing (-Wunused-but-set-variable).
- {sizeof x} initialisers made designated ({.dwLength = sizeof m},
  {.dwSize = sizeof te}) in host/hos_main.c, host/mkw_glue.c and
  host/profiling.c (-Wmissing-field-initializers).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
C: host/mkw_glue.c.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
- test_sandbox_linux: LONGSHOT_LOG_PATH, not the gone LONGSHOT_BUS_DIR, is
  one of the sandbox's own names.
- test_crash_record: the record is prepared on every start: the game's own
  log, else LONGSHOT_LOG_PATH's (the builder's), else none.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
New build_driver::control: with HOS_CONTROL set (the game's environment or
the builder's), the builder listens once the game said hello: Linux a 0600
Unix socket in a private folder, never over a file or a live socket,
SO_PEERCRED this user; Windows the named pipe, DACL its owner's (and a
checked HOS_CONTROL_PEER_SID's), remote clients refused, instances
overlapped. Each client goes to the game as a control_client event: Linux
its socket beside the frame (Shared::send_passing, Passed.out_fd), Windows
its handle duplicated into the game. The game reads its channel with
recvmsg (builder_link PassReader) and gives the client to the bridge
(host_sys::builder::control_adopt -> hos_control_adopt), which with
LONGSHOT_CONTROL_BY_BUILDER=1 listens nowhere itself. The protocol is
host/control.c's as before. C: host/control.c, control.h, game_host.h.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
host/broker_net.c's engine as a builder crate, not wired in yet: the same
frames byte for byte (a port of broker_net_frame.h), op names, results and
rules (origins, the address rule with 192.0.0/24, 192.88.99/24 and 6to4
unwrapped, pinning, redirects by hand, headers and methods, per-mod limits and
the engine's 256-grant and 64-connection caps, grants bounded by the manifest,
longshot/ipc's local endpoints). One TLS stack on both systems: rustls (ring)
with the system's certificates, tungstenite's WebSockets over the engine's own
pinned stream. A bare-address host is fetched, not refused as out of memory.

Engine::handle(conn, GameMsg) with a Sink for its answers, and FrameLink over
the raw frames, for the builder's channel to wire. Tests run against servers
on 127.0.0.1 with a test CA and resolver of their own.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
build_driver::control moves to build_core::control, so hello_only's starts
(longshot-builder game, the shader preparation) serve the endpoint as well
(give_control_client; Passed.pid set once started). path_for takes
HOS_CONTROL as the game would: its environment, else HOS_ENV_FILE's file or
longshot_env.txt (a player's: a name with no separator), relative to the
game's working folder. Every start through the builder sets
LONGSHOT_CONTROL_BY_BUILDER=1. No C.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The game channel's new net_channel op (build_driver::net) makes a channel
(Linux a SOCK_SEQPACKET pair, its end beside the reply; Windows
build_core::sandbox_windows::pipe_pair, its end duplicated into the game) and
serves net_broker::FrameLink on it, one at a time, each grant held to its
mod's own manifest (net::Bounds: the profile's mods/, the game folder's
system_mods/ with their ipc patterns, LONGSHOT_DEV_MODS; packages not read).
The game's link (builder_link) keeps a reply's fd by its request's id;
game_builder_net_channel and game_builder_net_running back
hos_broker_net_channel and bnet_use_broker. Both C brokers answer
BROKER_NET_CHANNEL with BROKER_E_NONE; their net threads, pipe_pair, side
requests and handle replies are deleted. C: host/broker.c, broker_windows.c,
sandbox_windows.c; game/game.h.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Everything the Linux broker served is the builder's now, so the builder no
longer starts `<game> --broker` (build_core::sandbox_linux: start_broker,
LONGSHOT_BROKER_FD and the Confinement's broker gone) and the game's main()
has no broker's entry. host/broker.c keeps only hos_broker_launch (mods'
network routed to the builder), hos_broker_exec_env (nothing to hand down)
and the open/perf_send/save_download/net_channel shims over game_builder_*.
host/broker.h says so; hos_broker_running/adopted are Windows' alone.
Tests: test_broker_frame builds no broker.c (its address-rule checks stay,
with host/broker_net.c); test_sandbox_linux checks main() has no broker.
C: host/broker.c, broker.h, broker_windows.c, hos_main.c, sandbox_linux.c.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
content's archive module (the package reader with every check of the spec's
5.5) is a crate of its own, game/crates/mod-archive, with no host-sys:
content re-exports it as content::archive, and the builder reads with it.
build_driver::net::Bounds now reads a .lsmod's or a .zip's mod.json or
mod.toml out of the package (as the loader does) when it walks the profile's
mods/. mod-archive's testkit feature makes a stored zip; net.rs's test
bounds a packaged mod and skips a broken package. No C.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
A port of host/broker_files.h, plain and tested on every system: a
BROKER_FILE request put and parsed, the service's path form (drives, shares,
no device name, no \\.\ path), the roots and the longest that holds a path,
the access map and what each root allows (decide), the check after an open
(final_ok) and the rate. Not wired yet: the builder's own file service on
the files slot comes next. No C.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
scripts/profiling/folder.py's default_maps looked two levels above the profile for the binaries,
but the game writes profiles to <game>/diagnostics/logs/profile-<time>. So every report.md showed
bare longshot+<offset> frames unless --maps was given. tests/test_perf_maps.py covers it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The builder's start of a confined game on Windows is now a short plan-only
run of the game's exe (LONGSHOT_SANDBOX_PLAN=1: hos_main.c's start up to
hos_sandbox_start, before SDL, Vulkan or the image; @@plan lines, among them
the new `root` lines of the folders served; its time in the log), then the
game in its AppContainer. The builder opens the roots and serves the game's
three pipes itself:

- files: build_core::files_windows, a port of host/broker_files_windows.c over
  build_core::files_rules (the root a folder at a time with NtCreateFile
  RootDirectory and FILE_OPEN_REPARSE_POINT, links refused, final paths checked
  before and after, the decided access alone duplicated into the game);
- pads: build_core::pads, SDL3 loaded at run time (SDL3.dll beside the builder,
  else beside the game's program; gamepads, joysticks and their events only),
  host/pad_broker_windows.c's session, bounds and wire structures;
- main: the greeting alone.

A pads or files connection that dropped is made again by the new channel op
`reconnect` (game_builder_reconnect), at most 64 times a slot a run.

Deleted: the Windows broker's server half, hos_broker_win_main,
LONGSHOT_BROKER_SERVE, BROKER_WIN_SIDE, host/broker_files_windows.c/.h,
host/pad_broker_windows.c (its client moved to broker_windows.c),
host/broker_grants.c/.h with broker_net.c's broker_net_serve* and the
game side's readers for them (longshot-game broker.rs), and
tests/test_broker_files_wine.py (its checks of the server are files_windows'
Windows tests). C's tests ported to Rust: files_windows, pads, the greeting.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
- tests/test_pad_broker_state.py: its C compiles under -Werror again (a
  counter set and never read).
- build-core pads test: a pad's virtual flag is at offset 68.
- tests/test_broker_files_wine.py back: the builder's file service
  (build_core::files_windows, through the new build-core example
  files_serve_wine, built for x86_64-pc-windows-gnullvm) serving the real
  host/hos_file_windows.c layer under Wine, the old checks kept.
- build_core::control::env_file_lines (the game's file of switches, as
  path_for read it) and sdl_switches: the SDL_* ones (never SDL_DYNAMIC_API, no
  path from a player's file), then the command's environment's, set as hints
  on the builder's SDL3 when it starts.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
- build_core::pads: SDL3 loaded the same way on Linux (libSDL3.so.0 beside the
  builder, beside the game's program, else the system's), shared() once a
  builder's life, serve_connection() for a SOCK_SEQPACKET connection (the
  pads' greeting, then pads requests alone; tested with a fake).
- build_core::sandbox_linux: a confined game gets its end of a pads pair in
  LONGSHOT_PADS_FD (kept across the exec in pre_exec, the builder's copy
  closed once started); pads_reconnect() for the channel's `reconnect` (the
  fd beside the reply), 64 a run. DEV_DIRS without /dev/input; hidraw nodes
  only Valve's (the Steam Deck's motion, host/deck_imu.c, which reads hidraw
  itself), by their uevent HID_ID.
- Game: host/pad_remote.c, the pads' client on both systems (moved from
  broker_windows.c); host/broker.c's hos_broker_has_pads and
  hos_broker_pad_exchange over the socket; pad_broker.h and pad_sdl.c's
  PAD_REMOTE paths no longer Windows-only (Linux's poller a thread of its own
  when remote); game_builder_reconnect takes the fd on Linux.
- LONGSHOT_PADS_FD refused from env files, its switches.def row.
- tests/test_broker_files_wine.py: a SKIP reason or a FAIL on stdout,
  never a silent end (no wine, no cargo, no gnullvm target, a build that
  failed).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
- Crash record: the builder runs the game with LONGSHOT_CRASH_BY_BUILDER=1.
  host/hos_crash_record.c then writes the record and marks it complete but
  publishes nothing (and recovers no older run's): crash::store::recover
  publishes it once the run has ended, as it already did for a marker left.
- Minidump (Windows, HOS_CRASH_MINIDUMP, from the command, the builder or the
  game's file of switches): for a confined game the builder passes a mapping
  and two events (LONGSHOT_CRASH_DUMP). The crashing game writes its thread id
  and EXCEPTION_POINTERS address and signals; the builder writes
  bug-reports/local-only/<pid>.dmp with the game's filter and its outcome
  (build_core::sandbox_windows dump). An unconfined run takes its own, named by
  pid. crash::store::name_dump names both after the record once published.
- settings_write: the channel op writes the profile's settings/settings.toml
  whole and durably (the builder's path, never the game's; text alone, UTF-8,
  no NUL, 512 KiB at most). The game's flush uses it when its file is the
  profile's and the builder serves it, else writes as before.
- Linux Landlock: no /dev/bus/usb either (no USB driver in the game on Linux).
- pad_sdl.c: the motion source's serial is a uint32_t (-Wsign-compare).
- test_broker_files_wine.py: no display for Wine, wineserver killed and
  waited with its output dropped, the verdict last on stdout.
- New env names refused from env files, with switches.def rows.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
files_serve_wine.exe (x86_64-pc-windows-gnullvm) imports libunwind.dll, which
Wine could not find: it ended with 53 before main. The server is copied into
the test's folder beside llvm-mingw's runtime DLLs. Wine's error output goes to
target/test_broker_files_wine.log; a failure prints the server's lines, then
its FAIL line last.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
docs/dev/reference/sandbox.md rewritten to the code: the builder confines the
game on both systems (Linux from Landlock ABI 1; Windows the plan-only run,
then the AppContainer); a new section, What the builder does for the game
(links, mods' network, summaries, downloads, the trust file, settings_write,
the crash record and minidump, the controllers through SDL3 in the builder);
devices without /dev/input, /dev/bus/usb or any hidraw but Valve's; Windows'
start, file service, the builder's three pipes and reconnect, what keeps an
ACL, the checks still to run; the contributors' map of the new files.
broker-net.md (grants held by the builder), build.md (the channel's new ops),
mod-ops.md, input.md, parity-gates.md, profiles.md, the modding guides
(net, ipc, unsafe, scripting, reference, api-schema and its schema) and the
players' advanced.md (a new section, The sandbox) follow. Anchors to
sandbox.md#the-broker now point to #what-the-builder-does-for-the-game.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Each GetSystemTick called Rust's game_clock_read, which looks for one return
address. The host now reads that address once (game_clock_read_lr) and makes the
call only on a match: the other reads make no call into the game side, as main.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The acquire phase's per-frame Rust work, cut to what changed this frame:
- grants keep their schema permissions as bits (made at each change), and the
  running mods' union: the steps ask with a bit test, not a name parse; a
  step whose permission no running mod holds returns at one test (items,
  actors, input, inspect, mods.host, settings.host);
- a copy of a mod's grants (each native mod's frame) shares the set;
- settings.fire makes the running mods' list only when there is something to
  tell; take_native_changes looks nothing up when none waits;
- the resolved manifests are compared in place, the list made only on change;
- a native mod's id is made once; HDR reads its two settings at start and on
  change, not each frame; widescreen's and sprint-walk's log take no lock and
  make nothing with no line waiting;
- a phase's run reuses its list while nothing is added or removed, and takes
  the lock once a callback; the mod tests' switch is read once.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Its call count's initializer names its field, and the body's context parameter
is marked possibly unused (many HLE functions take no argument).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Three lines: the merged stack with main (6c87b497), l66's perf commits with l73's perf.py fix (a9a91825), and the
builder-is-the-game stack (93a57842). Resolved:
- The steam crate, steam_cmd.rs, broker_grants.c/.h and longshot-game's broker.rs stay deleted; the broker readers
  in game.h, broker.c, broker_windows.c, broker_net.c/.h and test_broker_frame.py are the builder stack's.
- content's archive is the mod-archive crate: the stack's mod.toml-only reader, sha2's SHA-256 and the one CRC-32
  ported into it (content::crc is now mod_archive::crc).
- build_driver::net reads mod.toml only, and a system mod's manifest from the build (api::system_manifests, made by
  api's build.rs with or without the runtime), never the game folder's system_mods/; the docs say so.
- host-sys: build_stamp and control_adopt go in info.rs and builder.rs.
- hos_main.c: the start-up timeline's marks after the channel's check; the game opens no log of its own when the
  builder gave it one (LONGSHOT_LOG_PATH), else the game always writes its own (log_gate.h).
- longshot-builder: the dev commands and the builder's game and sandbox-revoke commands; Longshot is the Linux name
  in its usage, docs and tests.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
l75's perf (415562ae: the inline clock check, the per-frame Rust cuts, the HLE macro under -Werror) and main up to
01d6878b, on the builder-as-broker merge. Main's changes ported into the code this PR rewrote:
- The Debug tab's ammunition and bottles (#2779, #2785): game_core::travel gives ammunition its smallest bag first and
  cuts a removal to what is held (AMMO_BAGS, pouch_add), counts the empty bottles from their five slots and takes them
  away with the game's Bool and Enum setters and Int adder (Bottles, bottles_remove; GameData::set_enum_queued,
  add_int_queued; the locations flags.setEnum and flags.addInt). The stick and nut bags are a new section at the end,
  More Upgrades (debug.json, INVENTORY_ITEMS, system/cheats' inventory_more_upgrades). game/oot_tools.c and its tests
  stay deleted; the rules are Rust unit tests.
- Pause in background (#2786): system/gameplay's pause_in_background setting, which the host reads from the game's
  settings (background_pause.c, nn_audio.c, nn_hid.c: the sound off and Controller in background read off while it is
  on), and the renderer takes into opts.pause_background; the menu's locks become the two rows' help.
  tests/test_pause_background.py checks that shape.
- The builder's version upscalers (#2791) and the cache-lock test, as in the merge before.
The game's log is the builder's: at every start but --prepare-shaders it turns the runs before over, makes
longshot_log.txt and copies the game's stderr into it and to its own (build_core::game_log::StderrTee). The game opens
no log of its own (host/log_gate.h, the log tee, startup_stderr and tests/test_log_open_failure.py and
test_restart_log.py gone).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
build_core::sandbox_windows::plan is host/sandbox_win_plan.h's sbxw_plan ported one for one (the grants,
the builder's roots, the never list and the record's folder, the dedup of grants under others), with
the C driver's plan, record and failed-grant checks as unit tests. sandbox_windows/gather.rs finds its
input as the game did before its plan (the game folder, user_dir_early's user folder, the env file's
overlay, the settings file's choice and one-time moves, the profile's saves, the .nup) and makes the
files the game writes at the top of folders first. The plan-only run of the game's exe
(LONGSHOT_SANDBOX_PLAN) and its C are deleted; sandbox_win_plan.h keeps the start decision, the path
form, the note, the handles and the needs list the game reads. The needs list the builder extends with
a .nup it cannot open is now joined with '|', as the game reads it (it was '\n').

Co-Authored-By: Claude Opus 5.5 <[email protected]>
A setting's "lockedBy" = { setting, why, value? }: while that setting (the mod's own, or another mod's as
owner/name:id) is on, the Insert menu shows the row greyed out with why under its help and with value, and refuses
the player's change; the kept value is left alone. Read and checked in api::manifest::setting (LockedBy), carried by
SettingDecl, applied when the rows are published (Settings::declared_lock), in mod.toml's JSON Schema (and the
website's copy) and the settings JSON. system/audio's mute_in_background (value on) and system/controls'
controller_in_background (value off) use it with main's reasons; Pause in background's help is main's again.
docs/modding/settings.md "Locked by another setting"; tests/test_pause_background.py checks the two rows.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
host/hos_file_windows.c asks game_builder_file (builder_link/files.rs) over the
builder's files pipe (builder_link/slots.rs: the slots, their greeting and
framing, no allocation per request). broker_files.h and its C test go: the
remaining rule vectors join build_core::files_rules' tests. The Wine test is
test_builder_files_wine.py, the C layer linked with the client built alone
(build-core example files_client_wine). LONGSHOT_BROKER_HANDLES is
LONGSHOT_BUILDER_PIPES.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
builder_link/pads.rs is pad_remote.c's client and the pads connection
(snapshot validation, commands consumed once, neutral input and a reconnect
at most once a second; no allocation per poll, one uncontended lock).
hos_sdl.c and pad_sdl.c call game_builder_pad* (game.h); game_builder_connect
greets the builder's main pipe on Windows. pad_remote.c, pad_broker.h and the
C pads code of broker.c/broker_windows.c go; test_pad_broker_state is Rust
tests, test_pad_broker_route is test_builder_pads_route.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
broker_net.c/.h and broker_net_frame.h are net_engine.c/.h and net_frame.h;
bnet_use_builder takes game_builder_net_running and game_builder_net_channel
directly (no hos_broker_net_channel). broker-net.md is net-channel.md. The
framing is unchanged (net_broker::FrameLink's).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The check split the unit at the version's definition and looked for the count's text before it; the module writes
its metadata nodes at its end, so the text was never before it and the check passed or failed with how the unit was
laid out. Each definition's !prof node is now looked up, for the function and its switched-off version.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
rx_backend.c's MkwVkHost table holds game_builder_perf_send, _save_download and
_open; perf_send makes its path whole itself. sandbox_windows.c calls
game_builder_connect, sandbox_linux.c bnet_use_builder; hos_relaunch.c hands
its environment on as it is. Tests follow (test_sandbox_windows reads the Rust
client; test_sandbox_linux, test_restart_log, test_texture_pack,
test_game_boundary, test_broker_frame).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The builder writes settings/settings.toml (settings_write, since 131ae019), so Landlock
(build_core::sandbox_linux) and the Windows plan give the profile's settings folder read access only.
The game's other writers there are now the builder's: an unreadable settings.toml is kept beside
itself by settings_write's new {keep: unreadable} (longshot-game keep_unreadable), and options_path.c's
one-time moves and hos_options_carry's copy of a game folder's old settings are done before the start
by build_core::settings_folder, on both systems. Without a profile the game writes the game folder's
settings file itself, so that folder keeps its write grant. profile.json, the items journal and
language.txt keep their single-file, write-in-place grants (no delete, nothing made beside them): the
mods loader, the items service and the language row write them while the game runs.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
sandbox.md: the Windows start's plan is the builder's (plan.rs, gather.rs), no plan-only run; the
settings folder's grants on both systems (a profile's read alone, its writes the builder's:
settings_write's text and keep, settings_folder's moves and carry; the single files that keep a
write-in-place grant, and why). build.md, profiles.md: the same.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
broker_frame.h goes: builder_channel.h has its own frames (BC_HEADER, BcFrame,
bc_frame_put). test_broker_frame is test_net_engine (the in-process engine's
address rule and MkwVkHost's table); the frames' checks are build_core::frame's
and slots.rs' tests. LONGSHOT_BROKER_FD goes (nothing sets it), build_driver::
broker is build_driver::game_ops, the Windows plan's brokered roots are served
ones, and the comments name the builder.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
sandbox.md, build.md, mod-ops.md and the network engine's page name
builder_link (slots.rs, pads.rs, files.rs) and the game_builder_* calls in
place of the C broker files, and the renamed tests. The engine's page is
net-engine.md (it was broker-net.md).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
l78's 6d95179f (the Windows plan worked out by the builder, build_core::sandbox_windows::plan; the settings folder read
alone; docs) and l79's 9c7fdb89 (the game's one client of the builder in Rust: the C broker client gone, net_engine,
builder_link's slots, files and pads, game_ops, LONGSHOT_BUILDER_PIPES; docs) on the lint fixes. Where both changed
host/sandbox_windows.c, sandbox_win_plan.h, sandbox.h and tests/test_sandbox_windows.py, l78's deletions of the plan's C
are kept with l79's names in what stays (builder, served, LONGSHOT_BUILDER_PIPES, builder_link, files_rules);
LONGSHOT_SANDBOX_PLAN goes from hos_main.c's own variables and the tests. host/broker_files.h and
tests/test_restart_log.py stay deleted; build.md's net_channel line links net-engine.md.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
colour_vision is named under the Accessibility heading (its mod places it there), so the section keeps a row on every
PC. Stick range, translated now, leaves UNTRANSLATED. The translations follow each file's names for the Gameplay tab and
the two rows; speakers to review.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
builder_perf_send, builder_save_download and builder_open (were broker_*), their users and tests; the plan's served and
serving, game_ops::GameOps, frame.rs TYPE_LAST; gather.rs's own variables are LONGSHOT_BUILDER_PIPES (l79's name, which
l78's list predated); switches.def's HOS_SANDBOX and comments say the builder. History wording stays.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A player's longshot_env.txt HOS_CONTROL=<name> made the game folder RW (SOCKDIR on the socket's parent), and a path
under $XDG_RUNTIME_DIR opened the session bus. The builder listens on the control bridge now, so the game's rules
drop the control folder entirely (Rust and host/sandbox_plan.h). The builder still reads HOS_CONTROL for its own
listener (control::take_over) and sets it in the game's real environment; the game's C no longer takes it from
longshot_env.txt.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
LONGSHOT_NFC_DIR, the Mesa and NVIDIA shader caches, HOS_ENV_FILE, SDL_GAMECONTROLLERCONFIG_FILE, Steam's root,
XR_RUNTIME_JSON, the Vulkan driver and layer paths, LD_LIBRARY_PATH and LD_PRELOAD's folders gave a rule without it:
LONGSHOT_NFC_DIR=$HOME made the home writable.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Two halves of 8 MiB (longshot_log.tail.txt, which when full replaces
longshot_log.tail.old.txt) are joined onto the log when the game ends, or at
the next start after a run that did not end cleanly.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A granted server streaming 1xx responses grew the builder's memory at line
rate until the fetch's timeout: the buffer kept every byte and the head
wasn't counted in the mod's rate.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
As browsers do: the credentials go only to the fetch's first origin.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
'chunked, gzip' was read until close and the mod got the raw chunk framing.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The builder makes the Landlock rules and the private folders' binds (build_core::sandbox_linux, private_folders) and
the game makes none, so sbx_rules_build, SbxInput, the private binds, sbx_bus_reach, sbx_x11_path_display,
sbx_openxr_socket and sbx_folder_narrow were a copy that only tests read. Kept: the mode, the ABI plan, the gate and
the held reason, mountinfo, seccomp. tests/test_sandbox_profile.py and test_sandbox_save_folders.py read the Rust
rules instead of compiling the C ones.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A player's file set LONGSHOT_SHADER_STORE=... (or . with a trailing space, or x.): Windows' GetFullPathNameW drops
trailing dots and spaces, so the store came out as the cwd, the game folder, and the plan gave the container an ACL
Write on it. Now every path-valued switch (*_FILE, *_DIR, *_DIRS, *_PATH, *_STORE, *_ROOT, *_HOME and the named ones,
LONGSHOT_SHADER_STORE and LONGSHOT_MOD_STORE among them) and any value ending in a dot or a space are refused from the
file, in the game (host/hos_main.c env_line_allowed) and in the builder (sandbox_windows/env_line.rs, moved out of the
Windows-only gather.rs so it is tested everywhere). And the plan drops any ACL grant at, above or under the game
folder or the program folder except the program's own read.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
A shared file's RX_VK_DLSS_DIR=C:\Users\p\Documents had the container given read on the player's Documents, and the
game load DLLs from there. It is now refused from the file like every other _DIR, in the game and the builder; the
builder's own %LOCALAPPDATA%\Longshot\ngx and the game folder's ngx need no switch.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The count is now a guard the job carries: dropped when the read is done, or
when the reader can't be made or take the job, so a mod's later reads no
longer hit "reads waiting" for good.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
They were read unpaced and uncounted: a ping flood got past the rate, and the
read loop kept the game's messages and close waiting for as long as it lasted.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Since the game's rules give nothing at HOS_CONTROL's folder, the confined game could not write shots there. A client
now sends stage=shot-<32 hex>.png; the game writes it in its user folder's temp/ and answers with the whole path; the
client (longshot_bridge.py) refuses any answer that is not that name in a temp/ folder, then moves it (no link
followed) to the path asked or shots/ beside the socket.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A short name (C:\Users\PLAYER~1) or a junction (a development mod folder pointing at the home folder) got past the
textual checks, and SetNamedSecurityInfoW wrote the ACE on the link's target. Now a part that looks like a short name
is refused; after the plan, Grants::recheck resolves each grant (os::real_path: each part opened in turn,
FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OPEN_REPARSE_POINT, GetFinalPathNameByHandleW): an ACL with a reparse point in
its path or a real path not its own is dropped, a builder's root may be a link (a game folder moved) but not one whose
real path is at or above a never folder's real one or the record's. grant() checks the real path again just before
the ACE. A never list longer than NEVER_MAX refuses the plan instead of being cut to 8. (`..` parts were already
refused by path_norm.)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The engine answered every HELLO as available whatever the game's version.
Now a mismatch gets HELLO_R with nothing available, and the link ends.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The builder wrote <pid>.dmp and its outcome with File::create in bug-reports\local-only, which the game can write
(a link or a hard link there was followed and truncated), whenever the game set the request, with ClientPointers=1
(dbghelp in the unconfined builder walked a pointer the game chose) and no size cap. Now: one request a run; the
exception read out of the game with ReadProcessMemory into the builder's own copies (ClientPointers=0), refused unless
its code is a crash's (0xC...); the dump written with CREATE_NEW and FILE_FLAG_OPEN_REPARSE_POINT into
%LOCALAPPDATA%\Longshot\sandbox\dumps, which the plan never grants (no grant at, above or under the record's folder
now); only the crashing thread's stack (IncludeThreadCallback); past DUMP_MAX (64 MiB) deleted. After the run, when the
game's exit code is not 0, it is copied into bug-reports\local-only with its outcome, each file made new and the folder
checked to be no link; the builder's copy is deleted.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A grant taken back and given again, or a new mod number for the same id, reset
them. Now they are a meter per id (at most GRANTS_MAX, then one shared),
shared by every grant of that id.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The handles passed to the confined game (its standard handles, the builder's pipes, the .nup, the dump's mapping and
events, the channel's ends) were left inheritable, so a process the builder started meanwhile with
bInheritHandles=TRUE and no handle list took them. start() now makes every listed handle inheritable just before
CreateProcessW (the channel's again on a second start) and not inheritable right after.

PROCESS_CREATION_CHILD_PROCESS_RESTRICTED is not set: the confined game starts processes itself (host/hos_relaunch.c's
Restart now starts the game again in its container; gpu/vk/perf_curl.cpp runs curl).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The folder is opened from the root with O_PATH|O_DIRECTORY|O_NOFOLLOW at each part, checked against what was
validated, held, and xdg-open is given /proc/<builder pid>/fd/<n>: always that folder. Windows keeps its no-'.' rule.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Nothing checked who owned the socket a mod connected to, so a socket another
local user put under $TMPDIR or /tmp was talked to. The peer's uid
(SO_PEERCRED, getpeereid elsewhere) is now checked after the connect, and
anyone else's is refused with why. Documented in docs/modding/ipc.md and the
net engine's reference.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Between the plan's real-path check and SetNamedSecurityInfoW the path could become a link, which that call follows.
Now grant() and revoke() open the path once (READ_CONTROL | WRITE_DAC, FILE_FLAG_BACKUP_SEMANTICS |
FILE_FLAG_OPEN_REPARSE_POINT), refuse it when it is a reparse point or its GetFinalPathNameByHandleW path is not its
own, and read and set the DACL with GetSecurityInfo/SetSecurityInfo on that handle. A recorded grant that has become
a link is left alone and said not taken back.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
write_all on a synchronous pipe blocked for good when the other end stopped
reading: a close, a revoke or the engine's stop never ended the connection.
Now each I/O is overlapped and cancelled when the connection is closing.
Tested under wine (x86_64-pc-windows-gnullvm).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
- The confined game is started with PROC_THREAD_ATTRIBUTE_CHILD_PROCESS_POLICY = PROCESS_CREATION_CHILD_PROCESS_RESTRICTED
  (child_policy), so Windows refuses it any process.
- Restart now: the game asks the builder (restart_to_apply, always on Windows) and exits; host/hos_relaunch.c no longer
  starts a confined game again itself (hos_sandbox_in_container), it only exits when the builder does not take it.
- The renderer's own curl is gone (perf_curl.cpp/h, perf_os.h and its two platform files, RX_VK_PERF_TEST_CURL): every
  summary goes through builder_perf_send, and a game no builder serves leaves it in perf_pending. tests/test_perf_send.py
  stands the builder in for curl (and gains organized_game, which it lacked).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
build_driver::net walked every manifest in mods/ at each grant and added the permissions of every copy together, so a
disabled or held mod, or a second folder claiming an installed mod's id, widened a grant. The bounds now come from
modtool::loading_mods, the game loader's offline scan (installed, switched on, not held; the development mods too),
by the one copy it chose; an id two copies claim is refused. Read at the first net channel and again after each
mods_changed event (Bounds::stale), never per grant.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
sys.rs retried a failed confined start unconfined in every mode, and a confinement that could not be made gave an
unconfined game: under strict the builder now refuses both (sandbox_linux::may_start_unconfined). The game already
refuses an unconfined start under strict (host/sandbox_linux.c). --prepare-shaders, the one unconfined start, is
recognised only as the first argument, as build_driver::shaders passes it, in the builder (Linux and Windows) and in
host/hos_main.c and host/sandbox_windows.c.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
- host/sandbox_plan.h sbx_arch_calls: execve and execveat EPERM in the game's seccomp filter (x86-64 59/322, aarch64
  221/281), applied after its start; tests/test_sandbox_linux.py runs the filter on both.
- Restart now in a sandboxed run (host_sys::builder::sandboxed: files confined, or the filter on) is always the
  builder's (restart_to_apply), as on Windows; a builder that does not take it leaves the game only exiting (the
  execve is refused).
- The Linux clipboard of Save my pipeline list goes through the host's clipboard_put (SDL, the game's own window)
  instead of wl-copy/xclip/xsel; xdg-open stays only for a run no builder serves (a served one's opens are builder_open).

Checked first: nothing the game loads after its start is an execve (drivers are dlopen).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Each write waits out the rest of the interval rather than being refused: the game writes the whole file, so none is
lost.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
cae159c5 set the DACL with SetSecurityInfo on a handle, which does not push inheritable ACEs down to existing children
as SetNamedSecurityInfoW does, so a grant on a folder with content (saves, the mod store, the caches) left that content
out. Now open_acl holds the folder (no FILE_SHARE_DELETE: not renamed, deleted or replaced while held), its real path
checked; set_ace calls SetNamedSecurityInfoW on that path while it is held and checks the real path again after; revoke
the same. Windows-only test: a_grant_reaches_what_its_folder_holds_already.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The op returns at once; the builder keeps only the newest text waiting and writes it at most once every 200 ms, and at
the channel's end (and before a keep), so no setting is lost and a flush on the game's thread never waits.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
SDL's message box runs zenity or kdialog on Wayland, which the game's seccomp filter now refuses, so a sandboxed game's
warning (out of memory, the graphics card, the movies' codec, a start that fails) would not show. host/posix's
MessageBoxA, which every one of them goes through on Linux, asks the builder first (game_builder_message_box, the new
channel op message_box); with no builder it shows it itself as before. The builder shows it with its own SDL3
(build_core::pads::message_box), its title always the game's (Longshot: ...), its text at most 4 KiB with no control
character but a line's end, three a run, answered once it is closed on a thread of its own. Windows' MessageBoxW is
in-process and stays the game's.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A confined game could write profile.json and switch a net:* mod on behind the player. Now:
- the net bounds read which mods are on from the builder's own copy of profile.json, taken when the game started and
  changed only by its set_mods, and hold a player's mod to the network permissions confirmed in trust.json's new
  "net" (api::loader::trust::net_confirmed), which the game cannot write and may only narrow;
- the game switching on a mod that requires net:*, net.lan or an origin is asked about in the builder's own
  confirmation window (Config::confirm, never drawn by the game); a yes is kept in trust.json, and until then the
  mod gets no network, this start or the next;
- profile.json is read alone by the confined game on Linux (Windows plan.rs to follow); set_mods carries each entry's
  "granted" (never the unsafe tier), and the loader's sink sends them.
Docs: docs/modding/net.md, docs/user/using-mods.md, docs/dev/reference/sandbox.md.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The builder writes its switches, order and grants (set_mods); the game reads the file.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
build_core::env_own::OWN (and the LONGSHOT_SANDBOX_ prefix) replaces the Linux overlay's 3-name list, the Windows
gather's 12 and host/hos_main.c's env_sandbox_own copy; LONGSHOT_CONTROL_BY_BUILDER joins it. The C reads
host/env_own.h, written from c_header(); a Rust test fails while the two differ.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
c1eef67a embedded the script system mods and the build stopped installing
system_mods/, but the runtime's files.rs still read a mod's modules from the OS
folder: every script system mod failed with 'src/main.ts: not found inside the
mod's folder'. A root <game>/system_mods/<name> now reads the embedded files.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The host's C opens the game's settings before game_init (options.rs early_doc),
and a settings.ini read once is written at once. builder_link::settings_write
looked only at link(), which game_init's start() had not opened yet, so the
game wrote the read-only profile settings folder itself: Permission denied,
and never tried again. It now opens the channel when it is not yet.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
/run/user/1000 here holds about 5,500 entries; the builder's plan looked only at
the first 63 read_dir gave, so pulse/ and pipewire-0 were never granted nor
bound back over the private tmpfs: SDL fell back to ALSA (waveOutOpen failed)
and libpulse tried to mkdir its missing folder (Failed to create secure
directory). Also said in sandbox.md.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
main's runtimes still call the game longshot, so this tree's ab and rt said
'no game at .../rt-Longshot-lmain/longshot-game'. longshot_bridge.program_name
reads the runtime's records, else what is there; game_command and real_game take
either name.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
longshot_bridge made a hctl-* folder in the runtime folder for each session and
never took it away: about 5,200 were left here, enough that the game's sandbox,
which looked at the first 63 entries, missed the sound sockets. The supervisor's
end, a failed start and finish() of a dead run remove the socket and its folder;
a start sweeps hctl-* folders over a day old that are empty or hold only a dead
socket.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
- builder_channel, builtin_spv, slow_frames: env_line_allowed's path names
  are host/env_own.h's lists now (written from build_core::env_own).
- recomplauncher_json: OLD_LINUX_NAME comes from the release crate.
- sandbox_save_folders: the Windows grant rustfmt wraps over lines counts.
- display_startup_failure: --prepare-shaders is argv[1] alone, as the
  builder passes it.
- longshot_ctl: the control-folder test uses a short runtime folder when the
  run's temporary folder is too long for a socket path (start_session then
  falls back to /tmp, so a queued run failed it).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The builder listens at HOS_CONTROL from the game's hello and hands each
client over the game's channel at once, but the game starts its bridge
(hos_control_serve) much later. hos_control_adopt refused a client while
the bridge had no game, and builder_link closed it: dev.py ab's wait for
ready=present connected in that gap and saw "the game closed the
connection". A started-by-builder game now keeps such clients for the
bridge's thread (closed if the bridge then fails to start).

tests/control_test.c's handed case hands a client before the bridge
starts and one after, and asks each for status.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
dev.py's runs (the A/B among them) start the game through
`longshot-builder game`, whose channel (build_core::channel::hello_only)
answered hello and nothing else: the game's log said "the builder's
channel is open (1 ops)". builder_link::settings_write then found no
settings_write, the game wrote settings.toml itself, and the sandbox, which
lets it read its settings folder only, refused it (os error 13), even
after 28a5fc73 routed the play's writes. hello_only now serves
settings_write for the profile the game is given (LONGSHOT_PROFILE), as
build_driver::channel does: text alone or keep: unreadable.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
main's runtime has no longshot-builder (its game starts itself), so every
start of it said "no longshot-builder to start the game ... set
LONGSHOT_BUILD", and LONGSHOT_BUILD would have started it with this tree's
builder. An older build's program (OLD_GAME_EXE) now starts through the
builder its own folder carries (dev_packs.json's, or one beside it), else
directly; never through LONGSHOT_BUILD's.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
`game` (every dev.py run, A/B and check) served hello alone
(build_core::channel::hello_only), while a play serves every op: open,
trust, perf_send, save_download, settings_write, mods_watch, net_channel,
set_mods, message_box, reconnect and the mod hook's. A developer's run was
not the game players get, and the builder's ops were never asked there.

play.rs's channel is now one free open_channel, the play's and game's
both: game serves the profile LONGSHOT_PROFILE names (it needs one; every
dev.py start makes one) and takes any builder's stamp (Config::any_stamp,
as hello_only did). hello_only stays for the build's shader preparation
alone. This supersedes 781f19d3's settings_write in hello_only, taken out
here.

Test: longshot-builder game_serves_every_op_a_play_does.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
builder_link's take() kept a reply's fd with
`if let (None, Some(id), Some(fd)) = (event, id, fds.pop())`: the tuple
pops the fd before the pattern looks at the event, so every event's fd was
taken and dropped (closed) there. The control_client event then found no
fd and returned silently: the builder accepted dev.py's client and handed
it over, the game closed it, and ready=present said "the game closed the
connection", with no line about it anywhere.

The fd is now popped only for a reply. Each step says one line per client:
the builder's "handed to the game", the game's "given to the bridge",
refused or with no socket, and host/control.c's adopted or refused.

Test: builder_link a_control_client_reaches_the_bridge_through_the_real_
builder_channel: build_driver::channel::serve listening at HOS_CONTROL over
build_core's channel, a real Unix client, the game's real PassReader and
reader thread; the client's request reaches the bridge (the fake host keeps
what it adopts) and its answer comes back. It failed before the fix.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
earlier_saves looks in <version>/Longshot/user, an older layout's folder,
but on Linux the version folder's Longshot is now the program itself. Reading
a folder under it gives ENOTDIR, which nonempty_dir passed on, and
carry_saves said "Could not import earlier saves ... Not a directory":
profile_unwritable, no game. A path under a file now has no saves, as a
missing one has. This fixes one_copy.rs's
installed_versions_reuse_their_own_builds_with_one_profile.

Test: play an_earlier_place_under_a_file_has_no_saves.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
env_line moves out of sandbox_windows; both OSes' overlays share
env_line::taken_from_file (line_allowed and env_own).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A mod's outermost call read user time, CPU time and page faults with a
system call each, eight a call on Linux (getrusage x6, clock_gettime x2);
hos_thread_usage reads the three with one getrusage, so a call takes two.
The script watchdog woke every 2 ms (500 a second) whatever ran; it now
sleeps until the earliest running call's deadline, a callback's budget when
none runs, and until a call starts after a second without one.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
- ScriptHost::listened: an event no running mod listens to builds no payload
  and lends nothing (QuickJsHost::fire_one, Services::fire_all).
- to_js defines a record's fields by kept atoms (BindState::field_atoms), not
  by a C string and an atom lookup for each field of each payload.
- restart_pending compares the options file's lines only when the settings'
  revision (SettingsAtStart::revision, the snapshot's generation) or the rows
  moved on, not twice each frame.
- crt reads gfx.renderer() each frame only while it holds an effect;
  area-names reads the game's state each frame only while its banner is on.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
- Settings host: the step is skipped when nothing it reads moved (StepInputs:
  the settings' revision, the rows' list, the menu's state, the renderer's
  status, the menu's questions, Auto's sets, the mods' change, the output
  sizes, the holders) and no rows' compare is due; the holders found by
  holds_p, not a permission parsed for each mod. The fake game's settings
  have a revision too, moved on by each change a test makes, so the TS
  tests run with the skip.
- control_mods: the mods' list is made again only when what it is made of
  moved on (list_key: the rows, the faults, the log lines' count, the
  prompt, dev mode), still looked at every 15 frames.
- ui_frame_end: a mod whose images are all decoded and sent is passed by.
- fire_one: each event's listener name made once.
- HOS_EVENT_STATS=1: the events that reached a listener in a run's first
  3600 frames, logged once.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The Mods tab's list held a useFrame for its life, so the game fired its
frame event to a listener every frame in steady play (HOS_EVENT_STATS:
3576 of 3600 frames). The step now lives in a Grow component mounted only
while the list is not drawn whole: drawn, the tab costs nothing a frame.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
- settings_link::status: made by the renderer once a present on each thread
  and shared by the frame's readers (the settings host's step, gfx.renderer(),
  the HDR mod); what it says moves on at a present, so no HDR change waits.
- runtime::resolved: each row's manifest and load state from the row in hand
  (Loader::row_manifest, row_loads), not a look-up by id: a scan of scans
  each frame before.
- ui_world_and_places: a mod with no HUD or world root is passed by.
- HOS_EVENT_STATS names the mods that listened to each event.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
retire::reclaim flips a site's reader epoch at most once a pass. A second
retirement waiting on the same site in that pass was given the old epoch
to wait for but never checked, so it was freed only at the next reclaim,
even with no reader in. Every retirement of a pass was made before the
flip, so its readers are the old epoch's, as the first one's are: it is
now freed as soon as that count is idle. A removed hook handler (its
table and its grace marker, two retirements on one site) is now let go
after one reclaim, as hooks' test an_engine_row_is_hooked_by_its_first_
listener_and_let_go_after_the_grace expects.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
docs(net): a development mod's network is confirmed by the builder, and still granted in the game (#2434)
Some checks failed
CI / Third-party parts and guide screenshots (pull_request) Failing after 33s
PR description / Title and description (pull_request_target) Successful in 52s
CI / What the change needs (pull_request) Has been cancelled
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Has been cancelled
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
5aa7843cdc
Co-Authored-By: Claude Opus 5.5 <[email protected]>
merge: main's newest into #2434
Some checks failed
CI / Third-party parts and guide screenshots (pull_request) Failing after 37s
CI / What the change needs (pull_request) Successful in 2m29s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Failing after 1m58s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Successful in 17m35s
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Successful in 22m33s
CI / Website build and checks (pull_request) Failing after 1m26s
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Successful in 19m17s
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Failing after 37m12s
PR description / Title and description (pull_request_target) Successful in 26s
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
4c498c8aa9
Co-Authored-By: Claude Opus 5.5 <[email protected]>
feat(saves): save slots as a system mod: Save as New, a save list, 50 slots a quest, a set number of autosaves (#2643)
All checks were successful
PR description / Title and description (pull_request_target) Successful in 27s
1647b90d92
A built-in mod, system/save-slots: X Save as New on the pause menu's System tab, the manual saves' list on Pause >
Save, 50 slots a quest, and how many autosaves are kept. The core gives it: a part pane copied into a layout as the
game builds it (game_core::layouts, site layout.build), the buttons the game was given (host_sys::input::buttons_given,
a core site, as two mods use it.

Assisted-by: Claude Code
Co-Authored-By: Claude Opus 5.5 <[email protected]>
All checks were successful
PR description / Title and description (pull_request_target) Successful in 27s
This pull request has changes conflicting with the target branch.
  • .pre-commit-config.yaml
  • Cargo.lock
  • Cargo.toml
  • builder/crates/build-compile/src/packages.rs
  • builder/crates/build-compile/src/toolchain.rs
  • builder/crates/build-core/src/game_layout.rs
  • builder/crates/build-core/src/sandbox_linux.rs
  • builder/crates/build-core/src/sandbox_windows/gather.rs
  • builder/crates/build-core/src/settings_folder.rs
  • builder/crates/build-driver/src/build.rs
  • builder/crates/build-driver/src/folder.rs
  • builder/crates/build-driver/src/shaders.rs
  • builder/crates/build-driver/src/sources.rs
  • builder/crates/build-driver/src/verify.rs
  • builder/crates/sites/tests/site_owners.txt
  • builder/crates/synthetic-game/game/host/synthetic_host.c
  • builder/crates/synthetic-game/tests/end_to_end.rs
  • docs/dev/developing.md
  • docs/dev/reference/architecture.md
  • docs/dev/reference/build-events.md
  • docs/dev/reference/build.md
  • docs/dev/reference/control-bridge.md
  • docs/dev/reference/profiles.md
  • docs/dev/reference/switches.md
  • docs/dev/reference/upscalers.md
  • docs/dev/setup.md
  • docs/modding/content.md
  • docs/modding/permissions.md
  • docs/modding/reference.md
  • docs/modding/scripting.md
  • docs/modding/settings.md
  • docs/modding/system-mods.md
  • docs/modding/ui.md
  • docs/user/advanced.md
  • docs/user/common-issues.md
  • docs/user/graphics-and-controls.md
  • docs/user/images/guide/README.md
  • docs/user/images/guide/manifest.json
  • docs/user/images/guide/source-review-2503-fb724339.md
  • docs/user/images/guide/source-review-35be7b3d.md
  • docs/user/images/guide/source-review-telemetry.md
  • docs/user/requirements.md
  • docs/user/updates-and-saves.md
  • game/DESIGN.md
  • game/crates/api/src/services/renderer_lines.rs
  • game/crates/api/src/services/settings_host.rs
  • game/crates/api/src/services/ui.rs
  • game/crates/api/src/settings/decl.rs
  • game/crates/api/src/settings/mod.rs
  • game/crates/api/src/settings/options.rs
  • game/crates/api/src/system.rs
  • game/crates/cloth/build.rs
  • game/crates/game-core/src/debug.rs
  • game/crates/game-core/src/engine.rs
  • game/crates/game-core/src/lib.rs
  • game/crates/game-core/src/locations.rs
  • game/crates/game-core/src/travel.rs
  • game/crates/game-core/src/video.rs
  • game/crates/host-sys/src/fake.rs
  • game/crates/host-sys/src/ffi.rs
  • game/crates/host-sys/src/input.rs
  • game/crates/host-sys/src/lib.rs
  • game/crates/host-sys/src/settings_abi.rs
  • game/crates/host-sys/src/settings_link.rs
  • game/crates/longshot-game/Cargo.toml
  • game/crates/longshot-game/src/builder_link/tests.rs
  • game/crates/longshot-game/src/control_mods.rs
  • game/crates/longshot-game/src/lib.rs
  • game/crates/longshot-game/src/options_store.rs
  • game/crates/longshot-game/src/perf.rs
  • game/crates/longshot-game/src/settings_file.rs
  • game/crates/longshot-game/src/settings_file/tests.rs
  • game/crates/longshot-game/src/settings_now.rs
  • game/crates/longshot-game/tests/menu_places.tsv
  • game/crates/schema/src/emit/settings_abi.rs
  • game/crates/script/src/files.rs
  • game/crates/script/src/runtime.rs
  • game/crates/script/src/watchdog.rs
  • game/game.h
  • game/modapi/schema/types.toml
  • game/mods/controls/mod.toml
  • game/mods/developer/mod.toml
  • game/mods/gameplay/mod.toml
  • game/mods/graphics/mod.toml
  • game/mods/grass/Cargo.toml
  • game/mods/grass/README.md
  • game/mods/grass/mod.toml
  • game/mods/grass/src/lib.rs
  • game/mods/grass/src/tests.rs
  • game/mods/grass/test/grass.test.ts
  • game/mods/interface/mod.toml
  • game/mods/menu/src/credits.ts
  • game/mods/menu/src/layout.ts
  • game/mods/menu/strings/de.json
  • game/mods/menu/strings/es-419.json
  • game/mods/menu/strings/es.json
  • game/mods/menu/strings/fr.json
  • game/mods/menu/strings/it.json
  • game/mods/menu/strings/ja.json
  • game/mods/menu/strings/ko.json
  • game/mods/menu/strings/nl.json
  • game/mods/menu/strings/pl.json
  • game/mods/menu/strings/pt-BR.json
  • game/mods/menu/strings/ru.json
  • game/mods/menu/strings/zh-Hans.json
  • game/mods/menu/strings/zh-Hant.json
  • game/mods/menu/test/text-keys.test.ts
  • game/mods/mods-tab/src/view.ts
  • game/mods/widescreen/sites.toml
  • game/settings_abi.h
  • game/settings_caps.h
  • game/sites/sites.toml
  • gpu/vk/menu/framegen.cpp
  • gpu/vk/menu/framegen.h
  • gpu/vk/menu/language.cpp
  • gpu/vk/menu/sim_turf.cpp
  • gpu/vk/menu/sim_turf.h
  • gpu/vk/menu/threads.cpp
  • gpu/vk/renderer_guard.h
  • gpu/vk/switches.def
  • gpu/vk/vk_api.h
  • gpu/vk/vk_dlssg.cpp
  • gpu/vk/vk_draw.cpp
  • gpu/vk/vk_framegen.cpp
  • gpu/vk/vk_menu.cpp
  • gpu/vk/vk_menu.h
  • gpu/vk/vk_menu_i18n.cpp
  • gpu/vk/vk_shader.cpp
  • gpu/vk/vk_ui.cpp
  • host/control.c
  • host/control.h
  • host/display.c
  • host/game_host.h
  • host/nn_applet.c
  • host/nn_hid.c
  • host/nn_vi.c
  • host/options_path.c
  • host/posix/display_sdl.c
  • host/rx_backend.c
  • scripts/devtools/ab.py
  • scripts/shaders.py
  • scripts/sl_sdk.py
  • tests/input_background_test.c
  • tests/menu_model_fixture.py
  • tests/test_audio_output_menu.py
  • tests/test_audio_volume.py
  • tests/test_device_policy.py
  • tests/test_fps_overlay_order.py
  • tests/test_frame_rate_cap_30.py
  • tests/test_framegen_by_row.py
  • tests/test_hos_ab.py
  • tests/test_key_press_queue.py
  • tests/test_menu_ini_keys.py
  • tests/test_menu_slider_ends.py
  • tests/test_net_engine.py
  • tests/test_program_hooks.py
  • tests/test_stick_dead_zone.py
  • tests/test_temporal_present_bandwidth.py
  • tests/test_ui_renderer.py
  • tests/upscale_independent_test.cpp
  • website/public/schemas/mod.schema.json
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u 'feat/save-slots-sysmod:dyst-feat/save-slots-sysmod'
git switch 'dyst-feat/save-slots-sysmod'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'mod-api'
git merge --no-ff 'dyst-feat/save-slots-sysmod'
git switch 'dyst-feat/save-slots-sysmod'
git rebase 'mod-api'
git switch 'mod-api'
git merge --ff-only 'dyst-feat/save-slots-sysmod'
git switch 'dyst-feat/save-slots-sysmod'
git rebase 'mod-api'
git switch 'mod-api'
git merge --no-ff 'dyst-feat/save-slots-sysmod'
git switch 'mod-api'
git merge --squash 'dyst-feat/save-slots-sysmod'
git switch 'mod-api'
git merge --ff-only 'dyst-feat/save-slots-sysmod'
git switch 'mod-api'
git merge 'dyst-feat/save-slots-sysmod'
git push origin 'mod-api'
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MagicBeanDev/Longshot!2818
No description provided.