Repository navigation
d3d12: a run logs the LEONIDA_ settings it starts with (D3D12-RUN-SETTINGS-LINE) - #2775
Conversation
…TINGS-LINE) A tester could not show from a run's log that a switch was on. `leonida run` now logs one line, under the `settings` target, with every LEONIDA_ variable present, sorted, as NAME=value. A value with any character other than letters, digits, space and ._,:+=*- (a folder, which names the user, a file, a command line) shows only its length, so posted logs carry no path; one longer than 120 characters is cut. Names that came from an older VICTORY_ name say so. `LEONIDA_LOG=warn,settings=info` keeps the line on its own. It says what a run was started with, not that the code read it.
|
Independent check on Windows (not the author), at
Environment: Ryzen 9 7950X3D, Windows 11 Pro 10.0.26200.9711, NVIDIA RTX 4070 Ti SUPER (driver 621.01), Rust 1.98.1 pinned. AI-assisted: yes (opencode). |
…view) The unit tests of settings_line could only fail on main by not building. This one runs the built binary on a title that does not exist, with two LEONIDA_ settings, one a folder, and reads its log: on main there is no settings line and it fails by assertion; with the change the line names both settings and shows the folder only by its length.
|
Added an integration test that fails on
|
|
RUN (independent run on Windows, #2775 head 58db554, merged locally into main 8f41d7d with Commands, in
In-game check on the RTX 3090 (leonida.exe built from 58db554, No runtime/ C++ or Python in this PR, so no link or import check applies. |
|
RUN - VERIFY-2775-RTX4060 - by MoonEyes (another person than the author) on head
Limits: one card, the character standing still, a session that did not reach the open world. Values only, no game data. AI-assisted (Claude Code). |
|
Merging. Head AI-assisted (Claude Code). |
Claimed in the coordination issue as: D3D12-RUN-SETTINGS-LINE (#2570 (comment))
What and why
Testers asked for this: after an A/B, one of them could not show from the run's log that the switch under test was on. The play script clears and sets
LEONIDA_*variables, the F1 settings file adds more, and oldVICTORY_*names still map toLEONIDA_*. A run's log so far did not say what it ran with.leonida runnow logs one line at start, under its own targetsettings:LEONIDA_*variable present, sorted, asNAME=value.._,:+=*-shows only its length. That covers folders (which name the user), files and command lines, so a log that gets posted carries no path.VICTORY_*name says so (apply_settings_namesnow returns the names it set).LEONIDA_LOG=warn,settings=infokeeps the line on its own.It says what a run was started with, not that the code read each setting. The function is pure (
leonida::settings_line) and is called once in theRunarm. The log call goes throughleonida_hle::runtime::log_settings, because the app crate has notracingdependency, and adding one would changeCargo.lock, which is part of the translator's cache key.Tested
On Windows 11, from
d3d12\:Three new unit tests in
leonida::tests:LEONIDA_*, in order, and reads "no LEONIDA_ settings" when there are none;VICTORY_*origin is named.On
mainthey do not build, becausesettings_linedoes not exist there.cargo test -p leonida --locked --bin leonida leonida::: 6 passed.The real binary:
leonida.exe runon a missing exe, with four settings including a folder and an oldVICTORY_*name, printed the line above before failing to read the exe.cargo clippy -p leonida -p leonida-hle --all-targets --locked: nothing in the changed lines.git diff --checkandcheck_no_game_data.pyare clean.git merge-tree: merges cleanly with d3d12: separate upload VA from BVH arenas so DLSS FG runs with ray tracing (D3D12-RT-FG-ARENA-VA-STORM) #2643 and, onmain.rs, with gpu: 8 GB over-budget guard, profile and page-pool prototype #2658. gpu: 8 GB over-budget guard, profile and page-pool prototype #2658's other conflict,leonida-loader/src/lib.rs, it already has withmain.GPUs tested: n/a (no GPU code; checked on Windows 11 Pro 10.0.26300).
AI-assisted: yes
Checklist
mainand merges cleanly.docs/design.md, with how it was confirmed. (Not applicable: no translator change.)