fix(builder): the builder's pads and controller lines are in the game's log #3249

Merged
HumanBean merged 5 commits from llun/Longshot:fix/builder-pads-lines-in-game-log into main 2026-12-05 16:58:16 +00:00
Member

Summary

While the game plays, the builder reads the controllers for it (SDL3's pads, the Switch 2 Pro's driver) and says what it
sees in pads: and switch2: lines. None of those lines was ever written anywhere: longshot-builder's log sink
(build_core::report::console::init) let through only its own crate's lines and longshot::console's, so every
tracing line of build_core was dropped. The sandbox page still told testers to read "pads: lines in the builder's
log" and "switch2: lines in the builder's log". A player with a controller problem had nothing from the builder to
send.

On main: start any game run (mise run dev -- smoke, or the Launcher) and search the game's longshot_log.txt for
pads:: nothing, not even on a PC with no SDL3.dll where the builder warns that it serves no pads (the five latest
smoke runs on this PC, other branches on main's builder: 0 pads: lines each).

With this PR, console::init adds a second sink for console::PLAY's targets (build_core::pads,
build_core::switch2, build_core::gamecube). It writes them as longshot: <line> to the builder's standard error,
with --output json too (the Launcher's mode, where the program's other lines are JSON events on stdout). During a play
the builder's standard error is already the relay into longshot_log.txt (build_core::game_log::StderrTee, which
redacts the home folder). So those lines now land in the log a player sends, and in the Launcher's stderr file beside
it. build_core's other lines stay out, so builds and other commands print nothing new. The three pads: lines said
outside pads.rs (the Windows and Linux sandboxes' pads connection, the Steam Deck's sensors) now take
pads::TARGET.

One line is new: pads: SDL3's gamepads started: the builder reads the game's controllers. Before, only a failure said
anything, so a log could not tell "the builder reads the pads" from "this log has none of the builder's lines"; it is
also the line a run with no controller shows. The pads' state is now said in every game run's log, not once a
builder's life (BeanBot's L1: a game the builder starts again gets a new longshot_log.txt, and SDL3 is already up):
the run's pads session says once whether SDL3's gamepads started or could not (pads::Session::serve), and the pads
connection's greeting says when SDL3 is missing (pads::greeted, on the Windows and Linux greetings). A reconnect within
a run says it again.

The gamecube: lines of #3245 (the GameCube adapter's driver,
build_core::gamecube, not on main yet) reach the same log once it merges: that PR writes them with eprintln! (as
channel.rs's control: lines are), which the relay already copies. PLAY names build_core::gamecube too, so a
tracing line added there later is not lost the same way; this PR does not touch gamecube.rs.

Read first: builder/crates/build-core/src/report/console.rs (PLAY, init, the test), then pads.rs's greeted
and Session::serve.

Testing

Tested: Windows 11 Pro 10.0.26300, RTX 5080. Again on head 48cc9ecf7 (after L1): rt, then smoke: PASS, and the
log has longshot: pads: SDL3's gamepads started: ... (line 401 of 2126), now said by the run's pads session. mise run dev -- rt, then mise run dev -- smoke from this branch (headless, the kokiri-start save, no controller plugged in): PASS, in play,
900 frames, the menu opened. The run's longshot_log.txt has the builder's line among the game's (line 400 of 2131):

longshot: pads: SDL3's gamepads started: the builder reads the game's controllers
  • report::console::tests::the_pads_and_controller_lines_reach_the_games_log (new, game-free, build-core): a child of
    the test program, set up as a builder is while the game plays (its sink, its standard error relayed into a
    longshot_log.txt), says lines with the pads', the Switch 2 driver's and the GameCube driver's targets and one other
    build_core line, in text and with --output json. Fails on main @ 7bc53f841 ("pads: a line of the pads" in the game's log (json false): "longshot: the program's own line\n": the relay works, the pads line is dropped);
    passes here, on Windows (gnullvm) and Linux (WSL Ubuntu 24.04).
  • pads::tests::every_run_s_log_says_whether_the_builder_serves_its_pads (new with L1, game-free): two pads connections
    over the same devices, as two runs of one builder are; each run's lines say SDL3's gamepads started, or SDL3 is
    missing, or once (however often the game asks) that they could not start. Fails on e8eb592c0 (run 1: []),
    passes here on Windows (gnullvm) and Linux (WSL). cargo test -p build-core: 203 passed. The checks that read
    the changed files and run on Windows (test_builder_pads_route, test_deck_imu, test_headset_no_process_note,
    test_sandbox_profile, test_sandbox_save_folders): pass.
  • cargo clippy -p build-core -p longshot-builder --tests: no new warnings (the unused import: note_lines in
    sandbox_windows.rs:384 is on main already). cargo fmt --check: clean. cargo check -p build-core --tests on
    Linux (WSL): clean.
  • mise run test (Windows, 12 at once; the names in chunks of 150, since one command line of every name is cut at
    about 8 KB): 843 passed, 1 failed: test_lifter, only in parts that fail on main 7bc53f841 too (host-sys clippy
    large_const_arrays; api a_walked_reshade_folder_counts_a_change_once_two_walks_agree). Not run, fail on main
    and untouched here: test_present_geometry_trace, test_present_image_free, test_present_held_image,
    test_present_acquire_ahead, test_dlssg, test_no_map_reload, test_sync_watch_event, test_turf_budget,
    test_ui_renderer, test_no_game_title.
  • cargo test --no-fail-fast of build-core and every crate that depends on it (test-changed's list, through the
    queue): all pass but three tests that fail on main 7bc53f841 too: api's
    a_walked_reshade_folder_counts_a_change_once_two_walks_agree, modtool's the_menu_passes_its_tests, build-driver's
    the_repository_s_lock_and_the_table_agree (the compiler stamp after #3120; its fix is in
    #3248).

Still to test:

  • Windows, a game the builder starts again (a mod change that asks for a rebuild, or Restart now): the new
    longshot_log.txt has longshot: pads: SDL3's gamepads started: ... again (by hand).
  • Windows, a pad plugged in, started from the Launcher (--output json): the game's longshot_log.txt has the
    builder's longshot: pads: lines for it (by hand).
  • Windows, a Switch 2 Pro over USB: longshot: switch2: lines in longshot_log.txt (by hand, a tester with the pad).
  • Steam Deck: the IMU line longshot: pads: the Steam Deck's IMU mode ... when its mode can't be read
    (@Beanstalk on a Deck, or by hand).

Measurements

Verdict: the builder's pads: lines are in the game's log; nothing else changes. No speed to measure: a few lines a
run on the builder's standard error, written as the game's own lines already are; no switch.

Setup: Windows 11 Pro 10.0.26300, RTX 5080; mise run dev -- smoke (headless, kokiri-start); build-core's new test.

Before: main @ 7bc53f841 After: this PR @ 48cc9ecf7
the_pads_and_controller_lines_reach_the_games_log fails: the log has the program's own line, no pads: line passes (Windows gnullvm, Linux WSL)
pads: lines in a smoke run's longshot_log.txt 0 (five latest smoke runs on this PC) 1: longshot: pads: SDL3's gamepads started: ...

Risks

A few more lines in longshot_log.txt (and on a terminal that starts the game): one at the pads' start, one per
controller event the drivers already logged. A driver that logged in a loop would now fill the log, capped at 64 MiB as
the game's own lines are; none of the three does today. Revert is enough. Nothing changes for saves, settings or caches.

build_core's sandbox: lines (the plan's time, "the game did not start confined by the builder") are still dropped
by the same filter: left for a follow-up, not part of this fix.

Checklist

Ready for review

  • One topic, on current main; the title is a Conventional Commit.
  • Tested on my own PC, in the game for a change the game runs, as Testing says.
  • mise run test passes (any failure that also fails on main is named).
  • Measured against main, or Measurements says why there is nothing to measure.
  • No game files, build output or hand-edited generated files; third_party/ untouched; nothing GPL-incompatible.

When it applies

  • A fix: a game-free test that fails on main and passes here.
  • A check under tests/ that reads changed source is updated, not weakened.
  • Host code builds on Windows (llvm-mingw) and Linux, with UTF-8 paths.
  • Docs updated.
  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.

Ready to merge

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

🤖 Generated with Claude Code

## Summary While the game plays, the builder reads the controllers for it (SDL3's pads, the Switch 2 Pro's driver) and says what it sees in `pads:` and `switch2:` lines. None of those lines was ever written anywhere: `longshot-builder`'s log sink (`build_core::report::console::init`) let through only its own crate's lines and `longshot::console`'s, so every `tracing` line of `build_core` was dropped. The sandbox page still told testers to read "`pads:` lines in the builder's log" and "`switch2:` lines in the builder's log". A player with a controller problem had nothing from the builder to send. On `main`: start any game run (`mise run dev -- smoke`, or the Launcher) and search the game's `longshot_log.txt` for `pads:`: nothing, not even on a PC with no `SDL3.dll` where the builder warns that it serves no pads (the five latest smoke runs on this PC, other branches on `main`'s builder: 0 `pads:` lines each). With this PR, `console::init` adds a second sink for `console::PLAY`'s targets (`build_core::pads`, `build_core::switch2`, `build_core::gamecube`). It writes them as `longshot: <line>` to the builder's standard error, with `--output json` too (the Launcher's mode, where the program's other lines are JSON events on stdout). During a play the builder's standard error is already the relay into `longshot_log.txt` (`build_core::game_log::StderrTee`, which redacts the home folder). So those lines now land in the log a player sends, and in the Launcher's stderr file beside it. `build_core`'s other lines stay out, so builds and other commands print nothing new. The three `pads:` lines said outside `pads.rs` (the Windows and Linux sandboxes' pads connection, the Steam Deck's sensors) now take `pads::TARGET`. One line is new: `pads: SDL3's gamepads started: the builder reads the game's controllers`. Before, only a failure said anything, so a log could not tell "the builder reads the pads" from "this log has none of the builder's lines"; it is also the line a run with no controller shows. The pads' state is now said in **every game run's** log, not once a builder's life (BeanBot's L1: a game the builder starts again gets a new `longshot_log.txt`, and SDL3 is already up): the run's pads session says once whether SDL3's gamepads started or could not (`pads::Session::serve`), and the pads connection's greeting says when SDL3 is missing (`pads::greeted`, on the Windows and Linux greetings). A reconnect within a run says it again. The `gamecube:` lines of https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/3245 (the GameCube adapter's driver, `build_core::gamecube`, not on `main` yet) reach the same log once it merges: that PR writes them with `eprintln!` (as `channel.rs`'s `control:` lines are), which the relay already copies. `PLAY` names `build_core::gamecube` too, so a `tracing` line added there later is not lost the same way; this PR does not touch `gamecube.rs`. Read first: `builder/crates/build-core/src/report/console.rs` (`PLAY`, `init`, the test), then `pads.rs`'s `greeted` and `Session::serve`. ## Testing **Tested:** Windows 11 Pro 10.0.26300, RTX 5080. Again on head 48cc9ecf7 (after L1): `rt`, then `smoke`: PASS, and the log has `longshot: pads: SDL3's gamepads started: ...` (line 401 of 2126), now said by the run's pads session. `mise run dev -- rt`, then `mise run dev -- smoke` from this branch (headless, the `kokiri-start` save, no controller plugged in): PASS, in play, 900 frames, the menu opened. The run's `longshot_log.txt` has the builder's line among the game's (line 400 of 2131): ``` longshot: pads: SDL3's gamepads started: the builder reads the game's controllers ``` - `report::console::tests::the_pads_and_controller_lines_reach_the_games_log` (new, game-free, `build-core`): a child of the test program, set up as a builder is while the game plays (its sink, its standard error relayed into a `longshot_log.txt`), says lines with the pads', the Switch 2 driver's and the GameCube driver's targets and one other `build_core` line, in text and with `--output json`. **Fails on `main` @ 7bc53f841** (`"pads: a line of the pads" in the game's log (json false): "longshot: the program's own line\n"`: the relay works, the pads line is dropped); **passes here**, on Windows (gnullvm) and Linux (WSL Ubuntu 24.04). - `pads::tests::every_run_s_log_says_whether_the_builder_serves_its_pads` (new with L1, game-free): two pads connections over the same devices, as two runs of one builder are; each run's lines say SDL3's gamepads started, or SDL3 is missing, or once (however often the game asks) that they could not start. **Fails on e8eb592c0** (`run 1: []`), **passes here** on Windows (gnullvm) and Linux (WSL). `cargo test -p build-core`: 203 passed. The checks that read the changed files and run on Windows (`test_builder_pads_route`, `test_deck_imu`, `test_headset_no_process_note`, `test_sandbox_profile`, `test_sandbox_save_folders`): pass. - `cargo clippy -p build-core -p longshot-builder --tests`: no new warnings (the `unused import: note_lines` in `sandbox_windows.rs:384` is on `main` already). `cargo fmt --check`: clean. `cargo check -p build-core --tests` on Linux (WSL): clean. - `mise run test` (Windows, 12 at once; the names in chunks of 150, since one command line of every name is cut at about 8 KB): **843 passed**, 1 failed: `test_lifter`, only in parts that fail on `main` 7bc53f841 too (host-sys clippy `large_const_arrays`; api `a_walked_reshade_folder_counts_a_change_once_two_walks_agree`). Not run, fail on `main` and untouched here: `test_present_geometry_trace`, `test_present_image_free`, `test_present_held_image`, `test_present_acquire_ahead`, `test_dlssg`, `test_no_map_reload`, `test_sync_watch_event`, `test_turf_budget`, `test_ui_renderer`, `test_no_game_title`. - `cargo test --no-fail-fast` of `build-core` and every crate that depends on it (`test-changed`'s list, through the queue): all pass but three tests that fail on `main` 7bc53f841 too: api's `a_walked_reshade_folder_counts_a_change_once_two_walks_agree`, modtool's `the_menu_passes_its_tests`, build-driver's `the_repository_s_lock_and_the_table_agree` (the compiler stamp after https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/3120; its fix is in https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/3248). **Still to test:** - Windows, a game the builder starts again (a mod change that asks for a rebuild, or Restart now): the new `longshot_log.txt` has `longshot: pads: SDL3's gamepads started: ...` again (by hand). - Windows, a pad plugged in, started from the Launcher (`--output json`): the game's `longshot_log.txt` has the builder's `longshot: pads:` lines for it (by hand). - Windows, a Switch 2 Pro over USB: `longshot: switch2:` lines in `longshot_log.txt` (by hand, a tester with the pad). - Steam Deck: the IMU line `longshot: pads: the Steam Deck's IMU mode ...` when its mode can't be read (`@Beanstalk` on a Deck, or by hand). ## Measurements **Verdict:** the builder's `pads:` lines are in the game's log; nothing else changes. No speed to measure: a few lines a run on the builder's standard error, written as the game's own lines already are; no switch. Setup: Windows 11 Pro 10.0.26300, RTX 5080; `mise run dev -- smoke` (headless, `kokiri-start`); `build-core`'s new test. | | Before: main @ 7bc53f841 | After: this PR @ 48cc9ecf7 | |---|---|---| | `the_pads_and_controller_lines_reach_the_games_log` | fails: the log has the program's own line, no `pads:` line | passes (Windows gnullvm, Linux WSL) | | `pads:` lines in a smoke run's `longshot_log.txt` | 0 (five latest smoke runs on this PC) | 1: `longshot: pads: SDL3's gamepads started: ...` | ## Risks A few more lines in `longshot_log.txt` (and on a terminal that starts the game): one at the pads' start, one per controller event the drivers already logged. A driver that logged in a loop would now fill the log, capped at 64 MiB as the game's own lines are; none of the three does today. Revert is enough. Nothing changes for saves, settings or caches. `build_core`'s `sandbox:` lines (the plan's time, "the game did not start confined by the builder") are still dropped by the same filter: left for a follow-up, not part of this fix. ## 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. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
A child of the test program, set up as a builder is while the game plays (its sink, its standard error relayed into
longshot_log.txt), says lines with the targets the pads and the controllers' drivers use (build_core::pads,
build_core::switch2, build_core::gamecube), in text and with --output json. Fails on main: longshot-builder's sink keeps
only its own crate's targets, so none of them reaches the log.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
longshot-builder's sink kept only its own crate's targets, so build_core's `pads:` and `switch2:` lines (SDL3's pads,
the Switch 2 Pro's driver) were never written while the game played, though the sandbox page tells testers to read
them. console::init now writes the targets of console::PLAY (build_core::pads, build_core::switch2,
build_core::gamecube) as `longshot: <line>` on standard error, with --output json too: during a play that is the
builder's relay into longshot_log.txt. build_core's other lines stay out. The `pads:` lines said outside pads.rs (the
sandboxes' pads connections, the Steam Deck's sensors) take pads::TARGET.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
fix(builder): a pads: line when SDL3's gamepads start for the game
Some checks failed
PR description / Title and description (pull_request_target) Has been cancelled
CI / What the change needs (pull_request) Has been cancelled
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Has been cancelled
CI / Third-party parts and guide screenshots (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
e8eb592c01
Once a builder's life, so a player's longshot_log.txt says whether the builder reads the controllers for the game at
all; before, only a failure said anything.

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

Tested in game: Windows 11 Pro 10.0.26300, RTX 5080: mise run dev -- rt, then mise run dev -- smoke (headless, kokiri-start save, no controller plugged in): PASS, in play, 900 frames, the menu opened. The run's longshot_log.txt has the builder's line 'longshot: pads: SDL3's gamepads started: the builder reads the game's controllers' among the game's lines (line 400); the five latest smoke logs from main's builder have no pads: line.

Tested in game: Windows 11 Pro 10.0.26300, RTX 5080: mise run dev -- rt, then mise run dev -- smoke (headless, kokiri-start save, no controller plugged in): PASS, in play, 900 frames, the menu opened. The run's longshot_log.txt has the builder's line 'longshot: pads: SDL3's gamepads started: the builder reads the game's controllers' among the game's lines (line 400); the five latest smoke logs from main's builder have no pads: line.
Author
Member
@review
BeanBot left a comment

Recommendation: Approve. The reported smoke run and game-free test show that pad diagnostics now reach the log, but the controller-specific and Deck cases listed for testing remain untested. A restarted game can also lose the new startup diagnostic from its current log. Nothing blocking is left: what remains is for the author before merging (below). Recommend approval; not approved on the forge.

The builder writes pad and controller diagnostics to stderr in both text and JSON modes, allowing the existing relay to include them in the game log. This improves controller troubleshooting at the cost of additional log output; the once-per-process startup message is missing from subsequent game logs after a restart.

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

  • L1 builder/crates/build-core/src/pads.rs:1359: The startup diagnostic is emitted only once per builder process, but each game restart gets a new log. (more on the line) Do: Report the cached SDL availability and startup result once for each game run, and cover a second run in the test.

Testing before merging (1) (the change behaves the same on every system: one run of the change itself is enough; it doesn't hold the recommendation)

  • L2: The reported run exercises the startup message without a controller, while the actual Switch 2 and Deck diagnostic paths remain untested. When: A connected Switch 2 Pro or a Deck whose IMU mode cannot be read uses different driver and platform paths from the synthetic tracing events and the no-controller smoke run. Do: Complete the listed controller and Deck runs and confirm the corresponding lines reach the current game log.

@fix can do L1.

Checks: Still running: 11 checks.

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

Does it help: Yes. The reported Windows smoke run has one pads startup line where five earlier main-branch smoke logs had none; the new relay test is reported to fail on the base and pass on Windows and Linux. Actual controller-specific paths remain to be checked.

Other systems: The filter also applies to the packager's shared console initializer, but its normal work does not use the controller targets. Windows Switch 2 and Linux Deck diagnostic paths have not been exercised in the reported runs. The change does not alter controller state, rendering, saves, or settings.

Switches: None added, changed, or removed.

Reviewed: e8eb592c01 against 7bc53f8413: Read AGENTS.md, CONTRIBUTING.md, the PR template, standards, the complete diff, commits, console.rs, and the relevant logging, pad initialization, restart, and platform call paths. Skimmed the remaining changed Rust files, sandbox documentation, and source-reading test references; the larger changed Rust files were not read in full. docs/review-checklist.md and the adjacent Tooling checkout were absent.; nothing run (a code review).

Checked and fine:

  • The test checks the relay in text and JSON modes and asserts that unrelated build-core diagnostics stay out.
  • The commits include AI assistance trailers; no generated or game-derived files appear in the diff.
  • The reported game-free test fails on the base for the missing diagnostic and passes on the PR.

Testing: No code or tests were run during review. The author reports a Windows smoke run and Windows and Linux game-free test passes; CI is still running.

Overlaps and merge order: PR #3245 adds GameCube driver diagnostics; its eprintln output uses the existing relay, and this change anticipates its tracing target. No merge order is required for this change.


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

**Recommendation: Approve.** The reported smoke run and game-free test show that pad diagnostics now reach the log, but the controller-specific and Deck cases listed for testing remain untested. A restarted game can also lose the new startup diagnostic from its current log. Nothing blocking is left: what remains is for the author before merging (below). Recommend approval; not approved on the forge. The builder writes pad and controller diagnostics to stderr in both text and JSON modes, allowing the existing relay to include them in the game log. This improves controller troubleshooting at the cost of additional log output; the once-per-process startup message is missing from subsequent game logs after a restart. **Should fix (1)**: not blocking, but worth doing before merging. - **L1** `builder/crates/build-core/src/pads.rs:1359`: The startup diagnostic is emitted only once per builder process, but each game restart gets a new log. (more on the line) **Do:** Report the cached SDL availability and startup result once for each game run, and cover a second run in the test. **Testing before merging (1)** (the change behaves the same on every system: one run of the change itself is enough; it doesn't hold the recommendation) - **L2**: The reported run exercises the startup message without a controller, while the actual Switch 2 and Deck diagnostic paths remain untested. *When:* A connected Switch 2 Pro or a Deck whose IMU mode cannot be read uses different driver and platform paths from the synthetic tracing events and the no-controller smoke run. **Do:** Complete the listed controller and Deck runs and confirm the corresponding lines reach the current game log. `@fix` can do L1. **Checks:** Still running: 11 checks. <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Yes. The reported Windows smoke run has one pads startup line where five earlier main-branch smoke logs had none; the new relay test is reported to fail on the base and pass on Windows and Linux. Actual controller-specific paths remain to be checked. **Other systems:** The filter also applies to the packager's shared console initializer, but its normal work does not use the controller targets. Windows Switch 2 and Linux Deck diagnostic paths have not been exercised in the reported runs. The change does not alter controller state, rendering, saves, or settings. **Switches:** None added, changed, or removed. **Reviewed:** e8eb592c0130 against 7bc53f841323: Read AGENTS.md, CONTRIBUTING.md, the PR template, standards, the complete diff, commits, console.rs, and the relevant logging, pad initialization, restart, and platform call paths. Skimmed the remaining changed Rust files, sandbox documentation, and source-reading test references; the larger changed Rust files were not read in full. docs/review-checklist.md and the adjacent Tooling checkout were absent.; nothing run (a code review). **Checked and fine:** - The test checks the relay in text and JSON modes and asserts that unrelated build-core diagnostics stay out. - The commits include AI assistance trailers; no generated or game-derived files appear in the diff. - The reported game-free test fails on the base for the missing diagnostic and passes on the PR. **Testing:** No code or tests were run during review. The author reports a Windows smoke run and Windows and Linux game-free test passes; CI is still running. **Overlaps and merge order:** PR #3245 adds GameCube driver diagnostics; its eprintln output uses the existing relay, and this change anticipates its tracing target. No merge order is required for this change. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.</sub>
@ -1354,1 +1357,3 @@
if !ok {
if ok {
// (once a builder's life: a player's log says the builder reads the controllers for the game)
tracing::info!("pads: SDL3's gamepads started: the builder reads the game's controllers");
Member

L1 (should fix): The startup diagnostic is emitted only once per builder process, but each game restart gets a new log.

When: When a game requests a restart, the builder rotates the first run's log and starts another game in the same process. The shared SDL instance is already initialized, so this line is not emitted into the new longshot_log.txt; with no controller events, that log again cannot distinguish working pad service from missing diagnostics.

Do: Report the cached SDL availability and startup result once for each game run, and cover a second run in the test.

**L1** (should fix): The startup diagnostic is emitted only once per builder process, but each game restart gets a new log. *When:* When a game requests a restart, the builder rotates the first run's log and starts another game in the same process. The shared SDL instance is already initialized, so this line is not emitted into the new longshot_log.txt; with no controller events, that log again cannot distinguish working pad service from missing diagnostics. **Do:** Report the cached SDL availability and startup result once for each game run, and cover a second run in the test.
Two pads connections over the same devices, as two runs of one builder are (play's restarts give each its own
longshot_log.txt): each must say SDL3's gamepads started, or that SDL3 is missing, or once that they could not be
started. Fails here: the start and the missing SDL3 are said once a builder's life, by Sdl, so a second run's log has
none of it (BeanBot's review of PR 3249, L1).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
fix(builder): every game run's log says whether the builder serves its pads
Some checks failed
CI / What the change needs (pull_request) Successful in 7s
CI / Third-party parts and guide screenshots (pull_request) Successful in 12s
PR description / Title and description (pull_request_target) Successful in 7s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Successful in 15s
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Failing after 13m14s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Failing after 1m19s
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Successful in 10m27s
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Successful in 10m18s
CI / Website build and checks (pull_request) Failing after 38s
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Failing after 48m20s
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Failing after 1h0m6s
48cc9ecf7b
The pads' state was said once a builder's life (SDL3 missing when it loaded, its gamepads' start in Sdl::start), so a
game the builder started again (play's restarts, each with a new longshot_log.txt) had none of it. Now the game's pads
connection says, when it is greeted, that SDL3 is missing (pads::greeted, on Windows' and Linux's greetings), and each
run's pads session says once whether SDL3's gamepads started. A reconnect within a run says it again.

From BeanBot's review of PR 3249 (L1).

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

L1, fixed in fea13443e (test) and 48cc9ecf7 (fix): the pads' state is now said in every game run's log, not once a builder's life. The run's pads session says once whether SDL3's gamepads started or could not (pads::Session::serve), and the pads connection's greeting says when SDL3 is missing (pads::greeted, on both the Windows and Linux greetings). Sdl no longer says either itself. The new test pads::tests::every_run_s_log_says_whether_the_builder_serves_its_pads runs two pads connections over the same devices, as two runs of one builder are, and checks each run's lines for all three states (and that a failed start is said once however often the game asks). It fails on e8eb592c0 (run 1: []) and passes here on Windows and Linux. Smoke again on 48cc9ecf7: PASS, longshot: pads: SDL3's gamepads started: ... at line 401. A real restart's second log is under Still to test (by hand).

L2: the Switch 2 Pro, Deck and Launcher runs stay under Still to test; they need hardware this PC doesn't have.

**L1, fixed** in fea13443e (test) and 48cc9ecf7 (fix): the pads' state is now said in every game run's log, not once a builder's life. The run's pads session says once whether SDL3's gamepads started or could not (`pads::Session::serve`), and the pads connection's greeting says when SDL3 is missing (`pads::greeted`, on both the Windows and Linux greetings). `Sdl` no longer says either itself. The new test `pads::tests::every_run_s_log_says_whether_the_builder_serves_its_pads` runs two pads connections over the same devices, as two runs of one builder are, and checks each run's lines for all three states (and that a failed start is said once however often the game asks). It fails on e8eb592c0 (`run 1: []`) and passes here on Windows and Linux. Smoke again on 48cc9ecf7: PASS, `longshot: pads: SDL3's gamepads started: ...` at line 401. A real restart's second log is under Still to test (by hand). **L2**: the Switch 2 Pro, Deck and Launcher runs stay under Still to test; they need hardware this PC doesn't have.
Author
Member
@review
BeanBot left a comment

Recommendation: Approve. The code is ready: only testing is left. The startup diagnostic now follows each pads session, including after a game restart. The Switch 2 Pro and Steam Deck diagnostic paths still need hardware runs. Recommend approval; not approved on the forge.

Controller diagnostics are routed into the game log, making controller problems easier to investigate. The change adds a few log lines per run and leaves other build-core diagnostics filtered out.

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

  • L2: The reported run exercises the startup message without a controller, while the actual Switch 2 and Deck diagnostic paths remain untested. When: A connected Switch 2 Pro or a Deck whose IMU mode cannot be read uses different driver and platform paths from the synthetic tracing events and the no-controller smoke run. Do: Complete the listed controller and Deck runs and confirm the corresponding lines reach the current game log.

Since the last review (on e8eb592c01)
Resolved: L1 (The startup diagnostic is emitted only once per builder process, but each game restart get…)
Still open: L2 (The reported run exercises the startup message without a controller, while the actual Swit…)

Checks: Still running: 11 checks.

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

Does it help: Yes for the startup path: the reported Windows smoke run contains one pads startup line, versus zero in five main-branch smoke logs. The reported automated relay test also passes on Windows and Linux; the hardware-specific paths remain untested.

Other systems: The sink covers pads, Switch 2 and future GameCube tracing targets in both text and JSON modes. Windows and Linux use separate greeting paths; the reported tests cover the shared connection logic, but Switch 2 Pro and Steam Deck hardware runs remain outstanding.

Switches: None added, changed or removed.

Reviewed: 48cc9ecf7b against 7bc53f8413: Read AGENTS.md, CONTRIBUTING.md, the full pull request diff, the changes since the previous review, and console.rs. Inspected pads.rs and the changed Windows and Linux sandbox paths; the large file outputs were truncated, so not all changed code files were read in full. Reviewed the supplied comments, testing claims and CI status.; nothing run (a code review).

Checked and fine:

  • The new test exercises two connections over the same devices for successful startup, missing SDL3 and failed startup.
  • CI has no reported head-only failures, although checks are still running.

Testing: The author reports Windows smoke and Windows/Linux game-free tests passing. A real restart, Launcher with a controller, Switch 2 Pro and Steam Deck runs remain listed as untested; no tests were run in this review.

Overlaps and merge order: PR #3245 adds GameCube adapter diagnostics; its existing stderr output is already relayed, and this change also allows future tracing output from its target.


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

**Recommendation: Approve.** The code is ready: only testing is left. The startup diagnostic now follows each pads session, including after a game restart. The Switch 2 Pro and Steam Deck diagnostic paths still need hardware runs. Recommend approval; not approved on the forge. Controller diagnostics are routed into the game log, making controller problems easier to investigate. The change adds a few log lines per run and leaves other build-core diagnostics filtered out. **Testing before merging (1)** (runs on the systems it can change; it doesn't hold the recommendation) - **L2**: The reported run exercises the startup message without a controller, while the actual Switch 2 and Deck diagnostic paths remain untested. *When:* A connected Switch 2 Pro or a Deck whose IMU mode cannot be read uses different driver and platform paths from the synthetic tracing events and the no-controller smoke run. **Do:** Complete the listed controller and Deck runs and confirm the corresponding lines reach the current game log. **Since the last review** (on e8eb592c0130) Resolved: L1 (The startup diagnostic is emitted only once per builder process, but each game restart get…) Still open: L2 (The reported run exercises the startup message without a controller, while the actual Swit…) **Checks:** Still running: 11 checks. <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Yes for the startup path: the reported Windows smoke run contains one pads startup line, versus zero in five main-branch smoke logs. The reported automated relay test also passes on Windows and Linux; the hardware-specific paths remain untested. **Other systems:** The sink covers pads, Switch 2 and future GameCube tracing targets in both text and JSON modes. Windows and Linux use separate greeting paths; the reported tests cover the shared connection logic, but Switch 2 Pro and Steam Deck hardware runs remain outstanding. **Switches:** None added, changed or removed. **Reviewed:** 48cc9ecf7ba1 against 7bc53f841323: Read AGENTS.md, CONTRIBUTING.md, the full pull request diff, the changes since the previous review, and console.rs. Inspected pads.rs and the changed Windows and Linux sandbox paths; the large file outputs were truncated, so not all changed code files were read in full. Reviewed the supplied comments, testing claims and CI status.; nothing run (a code review). **Checked and fine:** - The new test exercises two connections over the same devices for successful startup, missing SDL3 and failed startup. - CI has no reported head-only failures, although checks are still running. **Testing:** The author reports Windows smoke and Windows/Linux game-free tests passing. A real restart, Launcher with a controller, Switch 2 Pro and Steam Deck runs remain listed as untested; no tests were run in this review. **Overlaps and merge order:** PR #3245 adds GameCube adapter diagnostics; its existing stderr output is already relayed, and this change also allows future tracing output from its target. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.</sub>
HumanBean deleted branch fix/builder-pads-lines-in-game-log 2026-12-05 16:58:17 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MagicBeanDev/Longshot!3249
No description provided.