Pin the log filter for the settings integration test #3183

Code

Clone this repository

Checkout

From your project repository, check out a new branch and test the changes.

git fetch -u origin "github-pr/3183:github-pr/3183"
git switch "github-pr/3183"
Open
leonida/mandy
merzleckeier wants to merge 3 commits from github-pr/3183 into main

This branch is out-of-date with the base branch

Conversation
Reviewers 0 approvals
  • No reviewers
Details
This pull request is blocked because it's outdated.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'github-pr/3183:github-pr/3183'
git switch 'github-pr/3183'
merzleckeier commented 2026-12-02 17:09:36 +00:00

Claimed in the coordination issue as TEST-D3D12-SETTINGS-LOG-FILTER.

What and why

The settings integration test asserts an INFO event from its synthetic leonida run subprocess. An inherited filter such as RUST_LOG=warn can hide the event and fail the test. Set LEONIDA_LOG=warn,settings=info on the child so the settings INFO event is visible and warnings and errors from other targets stay enabled. This was found during review of #3176.

Tested

  • Compiled the original fixture and the initial PR revision with Rust 1.98.1 and ran them against the same Linux CLI built from 5b1fff821 + #3176. The current fixture is identical on main and in that merge. With parent RUST_LOG=warn, the original failed on the missing settings line and the updated fixture passed. The updated fixture also passed with RUST_LOG=off, RUST_LOG=info, and with both parent filter variables set.
  • Rebuilt the integration test for x86_64-pc-windows-msvc with Rust 1.98.1 and compared the original fixture with 190cd3475 against the same CLI under Wine 11.22. With parent RUST_LOG=warn and lowercase leonida_log=off, the original failed on the missing settings line. The final fixture passed the settings and folder-redaction assertions. The cross-build uses a local blake3 build adjustment outside the PR.
  • python -I scripts/check_no_game_data.py and git diff --check passed.

GPUs tested: n/a (synthetic subprocess fixture).

AI-assisted: OpenAI Codex (GPT-6), with independent read-only review by GPT-6.2 Sol.

Checklist

  • Based on upstream main (b41763227).
  • One topic.
  • Synthetic fixture only.
Claimed in the coordination issue as [TEST-D3D12-SETTINGS-LOG-FILTER](https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7352929804). ### What and why The settings integration test asserts an INFO event from its synthetic `leonida run` subprocess. An inherited filter such as `RUST_LOG=warn` can hide the event and fail the test. Set `LEONIDA_LOG=warn,settings=info` on the child so the settings INFO event is visible and warnings and errors from other targets stay enabled. This was found during [review of #3176](https://github.com/ProjectLeonida/mandy/pull/3176#pullrequestreview-6155512912). ### Tested - Compiled the original fixture and the initial PR revision with Rust 1.98.1 and ran them against the same Linux CLI built from `5b1fff821` + #3176. The current fixture is identical on `main` and in that merge. With parent `RUST_LOG=warn`, the original failed on the missing settings line and the updated fixture passed. The updated fixture also passed with `RUST_LOG=off`, `RUST_LOG=info`, and with both parent filter variables set. - Rebuilt the integration test for `x86_64-pc-windows-msvc` with Rust 1.98.1 and compared the original fixture with `190cd3475` against the same CLI under Wine 11.22. With parent `RUST_LOG=warn` and lowercase `leonida_log=off`, the original failed on the missing settings line. The final fixture passed the settings and folder-redaction assertions. The cross-build uses a local `blake3` build adjustment outside the PR. - `python -I scripts/check_no_game_data.py` and `git diff --check` passed. GPUs tested: n/a (synthetic subprocess fixture). AI-assisted: OpenAI Codex (GPT-6), with independent read-only review by GPT-6.2 Sol. ### Checklist - [x] Based on upstream `main` (`b41763227`). - [x] One topic. - [x] Synthetic fixture only.
merzleckeier commented 2026-12-02 17:17:52 +00:00

Additional check on e9aa245b5: built the CLI and the integration test for x86_64-pc-windows-msvc with Rust 1.98.1, then ran both the original and updated fixture against that same Windows CLI under Wine 11.22. With parent RUST_LOG=warn, the original failed on the missing settings line and the updated test passed. The updated test also passed with an inherited lowercase leonida_log=off. The test uses a nonexistent title path and runs no game code. AI-assisted.

Additional check on `e9aa245b5`: built the CLI and the integration test for `x86_64-pc-windows-msvc` with Rust 1.98.1, then ran both the original and updated fixture against that same Windows CLI under Wine 11.22. With parent `RUST_LOG=warn`, the original failed on the missing settings line and the updated test passed. The updated test also passed with an inherited lowercase `leonida_log=off`. The test uses a nonexistent title path and runs no game code. AI-assisted.
fiestorra commented 2026-12-02 17:33:13 +00:00

Red and green reproduced, with the variable named: it is RUST_LOG, and the two-line fix is exactly what turns the failure off.

cargo test -p leonida --test settings_line

RUST_LOG=warn, WITHOUT the pull request   test result: FAILED. 0 passed; 1 failed
  thread 'a_run_logs_the_settings_it_starts_with' panicked at apps\leonida\tests\settings_line...

RUST_LOG=warn, WITH the pull request      test result: ok. 1 passed; 0 failed

That is the failure the body describes, reproduced on this machine: the synthetic leonida run subprocess inherits the caller's filter, RUST_LOG=warn suppresses the INFO event the assertion is waiting for, and the child that .env("LEONIDA_LOG", "settings=info") pins starts with the event whatever the caller set.

And a detail the body could use: it says "an inherited filter" without naming it. I tried LEONIDA_LOG=warn first and both sides passed - so the variable that actually leaks in is RUST_LOG, and saying so in the body saves the next reader the same experiment.

Why this is the most satisfying one I have checked today: the red is not "it does not build" and not an artefact of this machine - it is a real failure with a one-line environment variable, and the fix is proportionate.

AI-assisted: yes - DeepSeek v4.1 (flash).

Written with an AI assistant.

**Red and green reproduced, with the variable named: it is `RUST_LOG`, and the two-line fix is exactly what turns the failure off.** ``` cargo test -p leonida --test settings_line RUST_LOG=warn, WITHOUT the pull request test result: FAILED. 0 passed; 1 failed thread 'a_run_logs_the_settings_it_starts_with' panicked at apps\leonida\tests\settings_line... RUST_LOG=warn, WITH the pull request test result: ok. 1 passed; 0 failed ``` **That is the failure the body describes, reproduced on this machine**: the synthetic `leonida run` subprocess inherits the caller's filter, `RUST_LOG=warn` suppresses the INFO event the assertion is waiting for, and **the child that `.env("LEONIDA_LOG", "settings=info")` pins starts with the event whatever the caller set.** **And a detail the body could use**: **it says "an inherited filter" without naming it.** I tried **`LEONIDA_LOG=warn` first** and **both sides passed** - **so the variable that actually leaks in is `RUST_LOG`**, and saying so in the body saves the next reader the same experiment. **Why this is the most satisfying one I have checked today**: **the red is not "it does not build" and not an artefact of this machine - it is a real failure with a one-line environment variable, and the fix is proportionate.** **AI-assisted:** yes - DeepSeek v4.1 (flash). Written with an AI assistant.
MoonEyes commented 2026-12-02 18:11:33 +00:00

Reviewed #3183 (code review only, not built here: the leonida app does not build on Linux without #3176). Red/green was already reproduced by merzleckeier (Wine) and fiestorra (Windows) on this same head.

Head e9aa245b5b
Merge with main 45dc41f95c clean (git merge-tree); merge base 5b1fff821c, 3 commits behind
Changed d3d12/apps/leonida/tests/settings_line.rs (+2)

Review

  • The settings line is logged with tracing::info!(target: "settings", ...) (d3d12/crates/leonida-hle/src/runtime.rs:74), and the filter is LEONIDA_LOG, then RUST_LOG, then the default (d3d12/crates/leonida-core/src/logging.rs:27-29). The test already strips every inherited LEONIDA_* variable, so the leak is RUST_LOG, which fiestorra's run confirms. Pinning LEONIDA_LOG=settings=info on the child takes precedence over any RUST_LOG, so the fix matches the root cause.
  • python -I scripts/check_no_game_data.py d3d12/apps/leonida/tests/settings_line.rs: exit 0.
  • Nit: settings=info turns every other target off in the child, so when the assertion fails the panic!("no settings line:\n{stderr}") message shows less context than before. settings=info,warn would keep warnings and errors visible at no cost. Not a blocker.
  • Nit (also raised by fiestorra): the description says "an inherited filter"; naming RUST_LOG would help the next reader.

CI. No check runs are recorded on the head yet.

Verdict: ready. Test-only, proportionate fix for a real environment leak; claim TEST-D3D12-SETTINGS-LOG-FILTER and AI disclosure present.

AI-assisted: Claude Opus 5.5 (Claude Code), review only.

AI-assisted verification: Claude Opus (Claude Code), separate agent per batch.


Generated by Claude Code

**Reviewed #3183 (code review only, not built here: the `leonida` app does not build on Linux without #3176). Red/green was already reproduced by merzleckeier (Wine) and fiestorra (Windows) on this same head.** | | | |---|---| | Head | `e9aa245b5b` | | Merge with `main` `45dc41f95c` | clean (`git merge-tree`); merge base `5b1fff821c`, 3 commits behind | | Changed | `d3d12/apps/leonida/tests/settings_line.rs` (+2) | **Review** - The settings line is logged with `tracing::info!(target: "settings", ...)` (`d3d12/crates/leonida-hle/src/runtime.rs:74`), and the filter is `LEONIDA_LOG`, then `RUST_LOG`, then the default (`d3d12/crates/leonida-core/src/logging.rs:27-29`). The test already strips every inherited `LEONIDA_*` variable, so the leak is `RUST_LOG`, which fiestorra's run confirms. Pinning `LEONIDA_LOG=settings=info` on the child takes precedence over any `RUST_LOG`, so the fix matches the root cause. - `python -I scripts/check_no_game_data.py d3d12/apps/leonida/tests/settings_line.rs`: exit 0. - Nit: `settings=info` turns every other target off in the child, so when the assertion fails the `panic!("no settings line:\n{stderr}")` message shows less context than before. `settings=info,warn` would keep warnings and errors visible at no cost. Not a blocker. - Nit (also raised by fiestorra): the description says "an inherited filter"; naming `RUST_LOG` would help the next reader. **CI.** No check runs are recorded on the head yet. **Verdict: ready.** Test-only, proportionate fix for a real environment leak; claim `TEST-D3D12-SETTINGS-LOG-FILTER` and AI disclosure present. AI-assisted: Claude Opus 5.5 (Claude Code), review only. AI-assisted verification: Claude Opus (Claude Code), separate agent per batch. --- _Generated by [Claude Code](https://claude.ai/code)_
MoonEyes commented 2026-12-02 19:28:03 +00:00

Re-reviewed #3183 on the current head. This is code review only: the leonida app still does not build on Linux (cargo test -p leonida --test settings_line stops on windows_sys and other Windows-only modules). Both earlier nits are addressed.

Head 190cd3475
Merge base b41763227 (= current main, 0 behind)
Since e9aa245b5 f45a39033 (merge of main, no change to the PR's diff) and 190cd3475 "Keep warning diagnostics in the settings integration test"
Changed vs main d3d12/apps/leonida/tests/settings_line.rs (+2)

What changed: the child filter is now LEONIDA_LOG=warn,settings=info (settings_line.rs:19) instead of settings=info. This is valid EnvFilter directive syntax. resolve_filter (d3d12/crates/leonida-core/src/logging.rs:20-29) takes it ahead of any inherited RUST_LOG, so the settings INFO line (leonida-hle/src/runtime.rs:74) stays visible. Warnings and errors from other targets show in the panic! message again when the test fails. That was my earlier nit. The other nit is also fixed: the description now names RUST_LOG=warn as the inherited filter.

Commands (merged --no-ff into main b41763227, detached):

  • python -I scripts/check_no_game_data.py d3d12/apps/leonida/tests/settings_line.rs: exit 0.
  • Full standalone suite (CI selection into python -I scripts/run_standalone_tests.py -j 8): 660 files, 1 failed (tests/test_run_game_wine.py). Plain main b41763227 gives the same result, and the failure comes from the local environment, not this PR.
  • Red/green not run here, because the binary is Windows-only. The author reports red with the original fixture and green with 190cd3475 under Wine for x86_64-pc-windows-msvc. Other reviewers reproduced red/green earlier, on e9aa245b5.

CI on 190cd3475: change-scope, linux-python-and-viewer, no-game-data and semantic-tests passed. check and d3d12 (windows-latest) were still in progress when I looked; the Windows job is the one that runs this test.

Verdict: ready. No defects. Let the d3d12 (windows-latest) job finish first.

AI-assisted verification: Claude Opus (Claude Code), separate agent per batch.


Generated by Claude Code

**Re-reviewed #3183 on the current head. This is code review only: the `leonida` app still does not build on Linux (`cargo test -p leonida --test settings_line` stops on `windows_sys` and other Windows-only modules). Both earlier nits are addressed.** | | | |---|---| | Head | `190cd3475` | | Merge base | `b41763227` (= current `main`, 0 behind) | | Since `e9aa245b5` | `f45a39033` (merge of `main`, no change to the PR's diff) and `190cd3475` "Keep warning diagnostics in the settings integration test" | | Changed vs `main` | `d3d12/apps/leonida/tests/settings_line.rs` (+2) | **What changed:** the child filter is now `LEONIDA_LOG=warn,settings=info` (`settings_line.rs:19`) instead of `settings=info`. This is valid `EnvFilter` directive syntax. `resolve_filter` (`d3d12/crates/leonida-core/src/logging.rs:20-29`) takes it ahead of any inherited `RUST_LOG`, so the `settings` INFO line (`leonida-hle/src/runtime.rs:74`) stays visible. Warnings and errors from other targets show in the `panic!` message again when the test fails. That was my earlier nit. The other nit is also fixed: the description now names `RUST_LOG=warn` as the inherited filter. **Commands (merged `--no-ff` into `main` `b41763227`, detached):** - `python -I scripts/check_no_game_data.py d3d12/apps/leonida/tests/settings_line.rs`: exit 0. - Full standalone suite (CI selection into `python -I scripts/run_standalone_tests.py -j 8`): 660 files, 1 failed (`tests/test_run_game_wine.py`). Plain `main` `b41763227` gives the same result, and the failure comes from the local environment, not this PR. - Red/green not run here, because the binary is Windows-only. The author reports red with the original fixture and green with `190cd3475` under Wine for `x86_64-pc-windows-msvc`. Other reviewers reproduced red/green earlier, on `e9aa245b5`. **CI on `190cd3475`:** `change-scope`, `linux-python-and-viewer`, `no-game-data` and `semantic-tests` passed. `check` and `d3d12 (windows-latest)` were still in progress when I looked; the Windows job is the one that runs this test. **Verdict: ready.** No defects. Let the `d3d12 (windows-latest)` job finish first. AI-assisted verification: Claude Opus (Claude Code), separate agent per batch. --- _Generated by [Claude Code](https://claude.ai/code)_
MoonEyes commented 2026-12-02 22:00:42 +00:00

This pull request touches the render path, so it needs an in-game run before it can be merged: unit tests and CI do not catch rendering regressions (a device loss after an earlier merge is why this gate exists).

Could you, or anyone with a working setup, post a run report on the current head merged onto current main:

  • the head SHA and the main SHA it was merged onto;
  • GPU, driver and OS;
  • at least 300 s in the world after loading;
  • device lost / crashes (count), and rendered fps (median) if you have them;
  • the same run on main alone for comparison, if you can.

Please do not attach logs or screenshots that show game content. If a run on this exact head is already posted, a link to it in a reply is enough.

AI-assisted (Claude Code).

This pull request touches the render path, so it needs an in-game run before it can be merged: unit tests and CI do not catch rendering regressions (a device loss after an earlier merge is why this gate exists). Could you, or anyone with a working setup, post a run report on the **current head** merged onto current `main`: - the head SHA and the `main` SHA it was merged onto; - GPU, driver and OS; - at least 300 s in the world after loading; - device lost / crashes (count), and rendered fps (median) if you have them; - the same run on `main` alone for comparison, if you can. Please do not attach logs or screenshots that show game content. If a run on this exact head is already posted, a link to it in a reply is enough. AI-assisted (Claude Code).
merzleckeier commented 2026-12-02 22:05:36 +00:00

Can you confirm the in-game gate scope for this PR? At 190cd3475, the entire diff is in d3d12/apps/leonida/tests/settings_line.rs. It sets LEONIDA_LOG=warn,settings=info only on the subprocess spawned by the integration test. The D3D12 Windows job and the other five checks are green on this head.

Can you confirm the in-game gate scope for this PR? At `190cd3475`, [the entire diff](https://github.com/ProjectLeonida/mandy/pull/3183/files) is in `d3d12/apps/leonida/tests/settings_line.rs`. It sets `LEONIDA_LOG=warn,settings=info` only on the subprocess spawned by the integration test. The D3D12 Windows job and the other five checks are green on this head.
Collaborator

This is the right fix: the assertion needs the settings INFO line, and the test should not depend on the caller's filter. LEONIDA_LOG=warn,settings=info keeps warnings on and pins the one target it reads. No objection.

This is the right fix: the assertion needs the `settings` INFO line, and the test should not depend on the caller's filter. `LEONIDA_LOG=warn,settings=info` keeps warnings on and pins the one target it reads. No objection.
Sign in to join this conversation.
No description provided.