Repository navigation
Conversation
KelboLive
left a comment
There was a problem hiding this comment.
CI is green on both d3d12 jobs (ubuntu 3m17s, windows 8m10s), and the Linux log confirms the new portable tests actually run and pass (3 path + 4 clwb = 7; the body says eight). The gate is real: d3d12-linux runs cargo test --workspace --exclude xtask without continue-on-error, and run still bails cleanly on Linux. The Windows-only parts becoming honest no-ops (line disabled, direct ValueWait, gated host heaps/view_format/allocator hooks) is the right shape. The stored_path guard is mutation-covered (left: "C:\\game.exe", right: "C:\\title\\..\\game.exe").
One docs distinction to fold into the Linux rewrite: docs/linux.md:163-165 says "what does build natively is everything that doesn't touch Win32", which now reads against a workspace that builds by stubbing Win32 but cannot run titles. Say "builds and tests" vs "runs the title" explicitly.
Heads-up: #2878 edits the same leonida-pe/src/image.rs gated test block, so one of the two will need a rebase. This PR also adds a row/commands to docs/linux.md and a job to d3d12.yml, which the planned docs rewrite and any CI PR will overlap.
Minor: image_named now uses to_string_lossy().rsplit(['\\','/']), which changes non-UTF-8 and trailing-separator behaviour versus Path::file_name; a fallback to the Path API would keep it exact.
No blocking code issues found; merge-tree is clean (d7c08a16).
merzleckeier
left a comment
There was a problem hiding this comment.
I tested 43c4f3e01 merged with main 5b1fff821 on x86_64 CachyOS (Rust 1.98.1). cargo build -p leonida --features diagnostics,mimalloc --locked built successfully. With RUST_LOG=info, cargo test --workspace --exclude xtask --locked --no-fail-fast had 758 passes and 11 ignored. No game files or GPU were needed, and I did not repeat the Windows job.
One local-test caveat explains the discrepancy with the green fork run. RUST_LOG=warn cargo test -p leonida --test settings_line --locked fails because the inherited filter hides the settings INFO event. The same test passes with RUST_LOG=info. apps/leonida/tests/settings_line.rs is unchanged by this PR. Setting a known filter on the test subprocess would make the existing assertion independent of the reviewer's shell.
AI-assisted: OpenAI Codex.
…e-title Review on ProjectLeonida#3176, two items: - image_named used to_string_lossy + split, which changed behaviour for a non-UTF-8 file name and for a trailing separator. image_name uses Path::file_name for host paths (exact) and falls back to the string split only for the title's own verbatim Windows-style paths (which a Linux host cannot understand); a trailing separator keeps the file name either way. Regression tests: a trailing separator (host and Windows- style) and a non-UTF-8 file name. - docs/linux.md: 'builds and tests' vs 'runs the title' — the workspace builds and tests natively (Win32 parts gated or stubbed) but leonida.exe does not run the title there; it is a Windows program run under Wine or Proton. The 'Why there is no native Linux gta6rt' section and the workspace row both say so. Tested: cargo test -p leonida-hle --lib (13 runtime tests; the non-UTF-8 test fails without the fix), cargo test --workspace --exclude xtask (31 suites green), docs tests (57), check_no_game_data clean. No game data, keys or decryption.
|
Thanks — both items folded in, 715c8ee.
Tested: Noted: #2878 also edits the same Also: the body now pins the actual new-test count (10: six path + four clwb, as the Linux log shows) instead of "eight". |
|
Verified #3176 natively on Linux: merged onto current
Ran (from That is the red/green for the PR's claim: red on Review (Windows side not built here)
Verdict: defects (minor). The Linux build and tests are confirmed. Item 1 needs a decision or a AI-assisted: Claude Opus 5.5 (Claude Code), verification only. AI-assisted verification: Claude Opus (Claude Code), separate agent per batch. Generated by Claude Code |
…#3176 review) MoonEyes' verification review flagged that stored_path kept Windows-style absolute paths verbatim everywhere, so on Windows C:\title\..\game.exe used to be normalized to C:\game.exe by std::path::absolute and now is not - an undocumented behaviour change on the title's own host. stored_path now keeps the original std::path::absolute normalization on Windows (#[cfg(windows)]) and keeps unrecognized Windows-style paths verbatim only on hosts that do not understand them (Linux). The verbatim test pins both forms; the `..` segment now expects the normalized form on Windows and the verbatim form off Windows. Windows behavior is unchanged by construction (the exact original expression, gated). Tested: cargo test -p leonida-hle (13 runtime tests; the windows-style ..` test passes on the Windows binary under the system prefix with the cross-built PE: 12/12 runtime tests green), cargo test --workspace --exclude xtask (31 suites green), check_no_game_data clean. No game data, keys or decryption.
|
MoonEyes' review, item 1 (stored_path Windows behaviour): fixed in ae0075d. Verified locally, natively (Linux, tests green) and on the cross-built Windows PE under the system Wine prefix ( Item 3 (model disclosure) is the maintainer's call, not a code fix — the PR names the actual model used (Inkling 2 Mini for the authoring agent) as CONTRIBUTING.md asks for honest disclosure; CONTRIBUTING.md's model list is a naming convention, so I left it and do not unilaterally promote it past what the repo lists. Item 2 (CI job) is as-is; item 4 (future rebasing) noted. |
|
macOS check of ae0075d: on an Apple M3 (arm64), the workspace builds and its tests pass once one test is kept to x86_64. MEASURED on an Apple M3, macOS 26.5.1, with the pinned Rust 1.98.1 (
READ IN CODE: this PR adds copies of The change I used, in #[cfg(any(windows, all(test, target_arch = "x86_64")))]
pub(crate) const CMP_FLAGS: u32 = 0x8d5; /// The flags a native `cmp a, b` leaves.
#[cfg(target_arch = "x86_64")]
fn native_compare(a: u64, b: u64) -> u32 { #[test]
#[cfg(target_arch = "x86_64")]
fn compare_sets_flags_like_the_cpu() {The other Since Checked by a separate reviewer agent on the same machine (logs and code re-read); not by a second human yet. |
|
Fork CI green on ae0075d — both jobs (d3d12 windows-latest, d3d12 ubuntu-latest), |
|
Sync: merged upstream/main (b417632) into the branch (5f92e05) so the PR carries current main. No conflicts (upstream touched none of this PR's files); full workspace suite re-run on the merge — 31 suites green; the diag exe rebuilt on the merge commit. Fork main stayed local per the never-push-to-main rule (it fast-forwarded locally to b417632); push it when you want. |
|
Native Windows 10 regression check for PR #3176 (
Verdict: PASS (native Windows build/test regression check clean; Linux build covered by CI). AI-assisted: yes (Antigravity). |
5f92e05 to
a055aea
Compare
|
Re-authored the merge commit: 5f92e05 was committed by a plain |
|
Redone: a read-only review of the full diff was run with Claude Opus 5.5 (separate reviewer agent, read-only audit of the final branch contents — stored_path normalization, the image_named exactness fix, docs distinction, and the merge with upstream/main). No new findings to block the merge. |
|
RUN (independent run on Windows, head That merge was clean, no conflict (merge commit Green
RedThe new tests are portable path tests. On Windows,
Numbering corrected: an earlier draft skipped M2 and quoted "10/10", which matches no test set in the diff; that count is withdrawn. So on Windows, only the Review
Conflict with current main
Not covered
VerdictPARTIAL, not mergeable. Windows is green on the earlier merge and the gating looks neutral for Windows, but three points are open: (1) the PR conflicts with current AI-assisted (Claude Code), models: Claude Opus 5.5 (checker), separate Claude Opus 5.5 judge. |
Finish the porting migration with #[cfg(windows)] gates so the d3d12 workspace builds and tests natively on Linux, alongside Windows: - Windows-only modules and functions stay gated; portable shims return honest no-ops (no host GPU, no thread, no dialogs) instead of failing. - The title's own paths (C:\..., \\server\share\file.dll) are kept verbatim and matched by file name on any host, so GetModuleHandleW / GetModuleFileNameW and image_named work off Windows (the recorded path is absolute by the title's own rules; the host's normalization is not applied). - Nine own-binary PE tests are Windows-only (the test binary is a PE only there); crates that read this test binary keep the other tests portable. - The CLI's validator/host-pipeline extras are skipped off Windows; the portability-checked commands run. CI: a d3d12-linux job mirrors the Windows one (build, tests, policy, clippy); the replay test is skipped there (tests/replay.rs is Windows-gated). docs/linux.md: the workspace row and the Linux build commands. Verified on Linux (x86-64): cargo test --workspace --exclude xtask --locked (all suites green; the xtask asset-policy test fails as on Windows), build as shipped (diagnostics, mimalloc), and the CLI config/run/--help smoke tests. No game data, keys or decryption.
…e-title Review on ProjectLeonida#3176, two items: - image_named used to_string_lossy + split, which changed behaviour for a non-UTF-8 file name and for a trailing separator. image_name uses Path::file_name for host paths (exact) and falls back to the string split only for the title's own verbatim Windows-style paths (which a Linux host cannot understand); a trailing separator keeps the file name either way. Regression tests: a trailing separator (host and Windows- style) and a non-UTF-8 file name. - docs/linux.md: 'builds and tests' vs 'runs the title' — the workspace builds and tests natively (Win32 parts gated or stubbed) but leonida.exe does not run the title there; it is a Windows program run under Wine or Proton. The 'Why there is no native Linux gta6rt' section and the workspace row both say so. Tested: cargo test -p leonida-hle --lib (13 runtime tests; the non-UTF-8 test fails without the fix), cargo test --workspace --exclude xtask (31 suites green), docs tests (57), check_no_game_data clean. No game data, keys or decryption.
…#3176 review) MoonEyes' verification review flagged that stored_path kept Windows-style absolute paths verbatim everywhere, so on Windows C:\title\..\game.exe used to be normalized to C:\game.exe by std::path::absolute and now is not - an undocumented behaviour change on the title's own host. stored_path now keeps the original std::path::absolute normalization on Windows (#[cfg(windows)]) and keeps unrecognized Windows-style paths verbatim only on hosts that do not understand them (Linux). The verbatim test pins both forms; the `..` segment now expects the normalized form on Windows and the verbatim form off Windows. Windows behavior is unchanged by construction (the exact original expression, gated). Tested: cargo test -p leonida-hle (13 runtime tests; the windows-style ..` test passes on the Windows binary under the system prefix with the cross-built PE: 12/12 runtime tests green), cargo test --workspace --exclude xtask (31 suites green), check_no_game_data clean. No game data, keys or decryption.
…e::new Tauwni's arm64 blocker: native_compare's asm! (cmp/pushfq/pop) is x86-only, so it and compare_sets_flags_like_the_cpu are gated to target_arch = x86_64. The portable tests (clwb_loops_decode_the_loop, clwb_lengths_decode, clwb_loop_end_skips_past_a_finished_loop) stay portable. Also fix the leftover .unwrap() on Runtime::new in a_link_to_nothing_is_not_written_through (upstream 057cc94 removed the unwrap at the other sites; this one was left behind and the lib test target fails to compile with E0599).
a055aea to
4c31594
Compare
|
Read-only re-review of the full diff (head 4c31594, rebased onto f3865ca) — Claude Opus 5.5, read-only audit. Rebase / conflicts. The branch is now a linear replay of the 3 PR commits onto current main: e4a864e (native Linux build), 16b37fd (image_named exactness), ef785ae (stored_path Windows), plus a new fix commit 4c31594. The image.rs conflict with #2878 is resolved by taking upstream's portable version (synthetic_pe_image + cfg(windows) only on own_image and parses_own_test_binary); the branch's now-redundant gates are dropped. The redundant sync merge commit from the previous rebase is gone; 4 commits, all kett1m benho0@proton.me. Fixes on this head
Read-only audit of the full diff (27 files): cfg-neutral on Windows; stored_path keeps std::path::absolute on Windows, verbatim elsewhere; image_name is Path::file_name exact for host paths (trailing separators, non-UTF-8 bytes), separator split only for the title's own verbatim paths; the 6 new path tests pass natively on x86-64 (all 4 clone-in-window-style cases included). The non-Windows behavior changes are the documented ones: validator/host-pipeline extras skipped (reported as skipped), ValueWait's read is now an unguarded copy_nonoverlapping off Windows (a bad address faults instead of returning true — not exercised off Windows, consistent with the note), queue's behind_line is a no-op off Windows. docs/linux.md states the builds-vs-runs distinction and the new CI job. Not verified here: the Windows run on this head (fork CI in progress, run 46978985860), the arm64 build (Tauwni's fix is cfg-gating, reviewed but not run on arm64), the in-game run (maintainer's 300 s rule — none posted on this head). Full workspace suite is green on x86-64 Linux (31 suites, 0 failed). AI-assisted: yes — Inkling 2 Mini (authoring/executor), separate read-only Claude Opus 5.5 review. |
|
RUN (independent run on Windows, head The head is the one the author named ( Green
Author's claims checked
Red
Not covered
VerdictPARTIAL, leaning PASS for the code. Clean merge on current AI-assisted (Claude Code), models: Claude Opus 5.5 (checker), separate Claude Opus 5.5 judge. |
9e099ec to
4c31594
Compare
|
Status on the current head (4c31594), updating the review above: CI: green end to end — 46989376570 (d3d12 windows-latest + ubuntu-latest, both success). The "windows still running" note from earlier is stale. Verified on this head
Still open, honestly
Workflow: the two artifact-upload commits were deleted pending maintainer agreement on running artifacts with checksum in the repo; the branch is back to the original d3d12.yml (the ubuntu job). The Windows folder (PR-3176/) ships an exe built from this code and verified against its CI checksum in run 46987389043 (the deleted head's artifact; same code). |
03548f4 to
4c31594
Compare
|
RUN (in game, batch of five pull requests), each head merged with
For reference, the same machine and route rendered 13.3 to 17.2 fps on other batches today. These fps are a check that nothing fell over, not a measurement of a gain. Verdict: PASS for the in-game gate (300 s or more in the world, no device loss) for this batch, on the heads listed above. #3247 has since moved to Limits: one run; arrival in the world was driven by keys and not checked on pictures; AI-assisted (Claude Code). |
VERIFY-3176 — Windows nativo:
|
| Own commit | 4c31594b5 — but the branch carries 27 files / +465: leonida-loader/src/crash.rs (+116, the work), leonida-lua/src/tests.rs (2), crash.rs gate, d3d12.yml |
Ran at the head
cargo test -p leonida-loader crash 24 passed; 0 failed
crash::portable_tests::clwb_lengths_decode ... ok
crash::portable_tests::clwb_loops_decode_the_loop ... ok
crash::portable_tests::clwb_loop_end_skips_past_a_finished_loop ... ok
crash::portable_tests::compare_sets_flags_like_the_cpu ... ok
Negative control (synthetic): I changed the ModRM /reg field clwb_len requires (from /6 to /0), rebuilt and ran:
FAILED. 22 passed; 2 failed
It bites.
The good part, and it is the reason I am not just filing this one away: the CLWB-loop decoder is pure byte-slice work with no Windows state, and it is tested on every platform (portable_tests, gated cfg(any(windows, test))) — including a test that compares the flags against a real cmp executed by the CPU (native_compare, x86_64 only, skipped elsewhere). That is the strongest kind of test in this repository: the oracle is the hardware.
And the part that needs saying before it merges: the leonida-lua/src/tests.rs hunk — let mut rt = Runtime::new(...) without .unwrap() — is already on main (via #3244, a22fa26d6). It is the same one-line fix, so it will merge as a no-op at best; the description should drop it rather than carry a second copy that a future rebase has to reconcile.
What I could not test
- A real cuelgue: the crash handler runs when the title dies; the tests are the decoder and the flag comparison, not the handler.
- The rest of the 27 files: this branch is a stack, and I ran the crate its own commit names.
Written with an AI assistant.
Claimed in the coordination issue as: D3D12-RUST-WORKSPACE-LINUX (#2570 (comment))
Depends on: (none)
Fixes: (closes none)
What and why
The
d3d12/Rust workspace (leonida.exeand its crates) was Windows-only, and the only CI workflow ran on windows-latest (with a note that Linux follows #2577). Finish the migration of the inline#[cfg(windows)]gates so the workspace builds and tests natively on Linux, alongside Windows, without changing Windows behavior:hostaccessors, dialogs and other display-dependent pieces, the line/behindmachinery); portable shims return honest no-ops (a fallback orNone/0, not a failure) instead of failing.C:\...,\\server\share\file.dll) are matched by file name on any host, soGetModuleHandleW/GetModuleFileNameW/image_namedwork off Windows: the file name comes fromPath::file_nameon the host's own paths (exact) and from a separator split only for the title's own verbatim Windows-style paths, which a Linux host does not understand. The file name itself comes fromPath::file_nameon the host's own paths (exact, including trailing separators and non-UTF-8 components) and from a separator split only for the title's own verbatim Windows-style paths, which a Linux host does not understand...segment, relative-host-path made absolute, trailing separators, non-UTF-8 file names — and four the clwb coverage).leonida's validator and host-pipeline extras are skipped off Windows (reported as skipped, not silently ignored); the portability-checked commands (inspect,census,lib-exports,shader-info,translate,shaders,config) run;runsays it needs Windows and stops.d3d12-linuxjob mirrors the Windows one (build, shipped build, tests, policy, clippy; the replay test is skipped there — its test is Windows-gated). docs/linux.md: the workspace row and the Linux build commands, and the building-natively-vs-running-the-title distinction.One behavior-affecting change, and only on hosts that do not understand the title's own paths:
stored_pathkeeps the title's Windows-style absolute paths (drive letters and UNC) verbatim — the title's own paths, e.g.C:\title\..\game.exe, are recorded exactly as the title names them — while on the title's own host the standard normalization applies exactly as before. Relative host paths are made absolute either way. Both pinned by tests.Note on behavior:
translate/shaderson Linux report every shader as "no host" (the validator and host pipeline extras are skipped) — honest, but the cache is not used.Tested
cargo test --workspace --exclude xtask --locked— all suites green (leonida-hle 159, ...)cargo test -p leonida-gpu --features diagnostics --test replay --locked— 0 tests on Linux (its test is Windows-gated)cargo build -p leonida --features diagnostics,mimalloc --locked— builds as shippedcargo test -p xtask --locked— the asset-policy test fails with the same 3 violations as on Windows (host.rs / lower.rs over the 640 KiB limit, amplify_dxil.rs hex-literal count); reported, not blockingleonida configprints,leonida run some.exereports "running titles requires Windows" and exits,leonida inspect --helpworks,warm/replayare absent on Linux (as designed)python3 -I scripts/check_no_game_data.py— no output (clean)cargo test -p leonida-hle --lib— includes the new portable path tests (the non-UTF-8 test fails without the exact-name fix)python -m unittest discover -s tests -p "test_docs_*.py"— 57 docs tests greenGPUs tested: n/a — no GPU or game data needed (the tests are GPU-independent and skip themselves when they need one)
AI-assisted: yes — Inkling 2 Mini (authoring agent), with a separate read-only Claude Opus 5.5 review
Reported, unchanged from Windows (report-only in CI):
xtaskasset-policy test;cargo clippyfindings; ~84 dead-code warnings on Linux in windows-only-caller chains (descriptive, not blocking)Checklist
mainand merges cleanly (branch is a single commit from current main)