ci: build and test the d3d12 Rust runtime on Windows (CI-D3D12-CARGO-TEST) #2648

Merged
MoonEyes merged 25 commits from upstream-pr/2648 into main 2026-12-01 10:43:24 +00:00
MoonEyes commented 2026-11-29 21:50:36 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-29T21:50:36Z.


Claimed in the coordination issue as: CI-D3D12-CARGO-TEST (#2570)

What and why

No workflow runs the tests of the D3D12 runtime (d3d12/, Rust: leonida.exe and its crates). launcher.yml, xma2-decoder.yml and the bcpack tool in ci.yml are the only cargo jobs, so a change that breaks a d3d12/ test reaches main unseen. Many open pull requests touch d3d12/ right now.

This adds .github/workflows/d3d12.yml, modelled on launcher.yml: on pushes to main and pull requests that touch d3d12/** (and on demand), one windows-latest job:

  • Build: cargo build --workspace --all-targets --locked, toolchain from d3d12/rust-toolchain.toml (1.98.1) through the runner's own rustup.
  • Tests (the gate): cargo test --workspace --exclude xtask --locked, no GPU, no game data.
  • Asset policy (report only): cargo test -p xtask, which fails on main today because two sources are over its 640 KiB limit (crates/leonida-gpu/src/host.rs 672,926 bytes, crates/leonida-shader/src/emit/lower.rs 709,418 bytes).
  • Clippy (report only): cargo clippy --workspace --all-targets -- -D warnings, which fails on main with about 25 findings in leonida-loader, leonida-lua, leonida-menu, leonida-shader and leonida-formats.
  • cargo fmt --check is left out: it would reformat about 190 files, colliding with the open d3d12/ pull requests.

The two report steps use continue-on-error so the job is useful from day one; each has a comment saying when to make it blocking. Windows only, because leonida-gpu does not build on macOS today (reported by oreofr's agent); Linux can follow #2577.

Tested

Locally on main 060c47160, Windows 11, toolchain from d3d12/rust-toolchain.toml, CPU only:

  • cargo test --workspace --no-run --locked: builds in 233 s.
  • cargo test --workspace --locked: 661 s; 1441 passed, 58 ignored, 1 failed (xtask policy::tests::repository_passes_policy, the two oversized files above). Excluding xtask, nothing fails.
  • cargo clippy --workspace --all-targets --locked -- -D warnings: fails on main (findings listed above).
  • The workflow itself runs for the first time on this pull request; jactionlint checks its syntax.

GPUs tested: n/a

AI-assisted: yes (Claude Code)

Checklist

  • Based on current main and merges cleanly (a conflicting pull request is labeled needs rebase).
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed. (n/a)

🤖 Generated with Claude Code

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5555497477 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2648). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-11-29T21:50:36Z. --- Claimed in the coordination issue as: `CI-D3D12-CARGO-TEST` (#2570) ### What and why No workflow runs the tests of the D3D12 runtime (`d3d12/`, Rust: `leonida.exe` and its crates). `launcher.yml`, `xma2-decoder.yml` and the bcpack tool in `ci.yml` are the only cargo jobs, so a change that breaks a `d3d12/` test reaches `main` unseen. Many open pull requests touch `d3d12/` right now. This adds `.github/workflows/d3d12.yml`, modelled on `launcher.yml`: on pushes to `main` and pull requests that touch `d3d12/**` (and on demand), one `windows-latest` job: - **Build**: `cargo build --workspace --all-targets --locked`, toolchain from `d3d12/rust-toolchain.toml` (1.98.1) through the runner's own rustup. - **Tests (the gate)**: `cargo test --workspace --exclude xtask --locked`, no GPU, no game data. - **Asset policy (report only)**: `cargo test -p xtask`, which fails on `main` today because two sources are over its 640 KiB limit (`crates/leonida-gpu/src/host.rs` 672,926 bytes, `crates/leonida-shader/src/emit/lower.rs` 709,418 bytes). - **Clippy (report only)**: `cargo clippy --workspace --all-targets -- -D warnings`, which fails on `main` with about 25 findings in `leonida-loader`, `leonida-lua`, `leonida-menu`, `leonida-shader` and `leonida-formats`. - `cargo fmt --check` is left out: it would reformat about 190 files, colliding with the open `d3d12/` pull requests. The two report steps use `continue-on-error` so the job is useful from day one; each has a comment saying when to make it blocking. Windows only, because `leonida-gpu` does not build on macOS today (reported by oreofr's agent); Linux can follow #2577. ### Tested Locally on `main` `060c47160`, Windows 11, toolchain from `d3d12/rust-toolchain.toml`, CPU only: - `cargo test --workspace --no-run --locked`: builds in 233 s. - `cargo test --workspace --locked`: 661 s; 1441 passed, 58 ignored, 1 failed (`xtask` `policy::tests::repository_passes_policy`, the two oversized files above). Excluding `xtask`, nothing fails. - `cargo clippy --workspace --all-targets --locked -- -D warnings`: fails on `main` (findings listed above). - The workflow itself runs for the first time on this pull request; `jactionlint` checks its syntax. GPUs tested: n/a AI-assisted: yes (Claude Code) ### Checklist - [x] Based on current `main` and merges cleanly (a conflicting pull request is labeled `needs rebase`). - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. - [ ] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed. (n/a) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
merzleckeier commented 2026-11-29 22:25:47 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-11-29T22:25:47Z.


Independent retest of the first hosted failure on f8ee1755d (GitHub merge 6a7778069 onto 060c47160). The merge changes only .github/workflows/d3d12.yml.

  • MEASURED, hosted Windows. The build passed. depth_bounds_pipeline_loads_and_filters_draws reached the draw assertion at pipeline/host.rs:1793 and read red 255 for depth 0.5 with bounds [0.6, 1.0]. The leonida-gpu test binary reported 548 passed, 1 failed and 47 ignored. Hosted job
  • MEASURED, local control. I cross-built the exact fixture and ran it with Wine 11.22, VKD3D-Proton 71cae091, and DXC 1.8.2505.32. It stopped at the earlier pipeline-library reload assertion in 3/3 runs each on RTX 4070 SUPER (620.73.04) and Radeon Raphael (RADV 26.3.1). With just the library assertion made diagnostic, the original draw path read 0 outside and 255 inside in 3/3 runs per GPU. Enabling ordinary depth with ALWAYS and zero writes, or reapplying bounds after binding the PSO, gave the same pixels in 3/3 runs per variant and GPU. With Vulkan disabled, the test returned before drawing.
  • READ IN CODE. The hosted command leaves adapter choice at D3D12CreateDevice(None, ...) (host.rs:1268). The failure confirms this run reached a D3D12 device with the advertised depth-bounds capability and DXC available. The selected adapter is still unknown. For a targeted Windows rerun, the adapter description and flags plus both red bytes would help distinguish this result from the local library failure.

Synthetic fixtures only. AI-assisted with OpenAI Codex.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7263665632 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2648#issuecomment-7263665632). Originally posted by [merzleckeier](https://github.com/merzleckeier) on 2026-11-29T22:25:47Z. --- Independent retest of the first hosted failure on `f8ee1755d` (GitHub merge `6a7778069` onto `060c47160`). The merge changes only `.github/workflows/d3d12.yml`. - **MEASURED, hosted Windows.** The build passed. `depth_bounds_pipeline_loads_and_filters_draws` reached the draw assertion at `pipeline/host.rs:1793` and read red `255` for depth `0.5` with bounds `[0.6, 1.0]`. The `leonida-gpu` test binary reported 548 passed, 1 failed and 47 ignored. [Hosted job](https://github.com/ProjectLeonida/mandy/actions/runs/46314397171/job/141511785622) - **MEASURED, local control.** I cross-built the exact fixture and ran it with Wine 11.22, VKD3D-Proton `71cae091`, and DXC `1.8.2505.32`. It stopped at the earlier pipeline-library reload assertion in 3/3 runs each on RTX 4070 SUPER (620.73.04) and Radeon Raphael (RADV 26.3.1). With just the library assertion made diagnostic, the original draw path read `0` outside and `255` inside in 3/3 runs per GPU. Enabling ordinary depth with `ALWAYS` and zero writes, or reapplying bounds after binding the PSO, gave the same pixels in 3/3 runs per variant and GPU. With Vulkan disabled, the test returned before drawing. - **READ IN CODE.** The hosted command leaves adapter choice at `D3D12CreateDevice(None, ...)` (`host.rs:1268`). The failure confirms this run reached a D3D12 device with the advertised depth-bounds capability and DXC available. The selected adapter is still unknown. For a targeted Windows rerun, the adapter description and flags plus both red bytes would help distinguish this result from the local library failure. Synthetic fixtures only. AI-assisted with OpenAI Codex.
fiestorra commented 2026-11-29 22:53:48 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-11-29T22:53:48Z.


Checked what can be checked without cargo on this machine (no Rust toolchain here), and one thing that would have broken every run is fine:

git ls-remote https://github.com/actions/checkout | grep 3d3c42e5…
3d3c42e5aac5ba805825da76410c181273ba90b1  refs/tags/v7
3d3c42e5aac5ba805825da76410c181273ba90b1  refs/tags/v7.0.1

So the pinned SHA is v7.0.1 - the pin is real and not a copy-paste of some other commit, which is the failure mode that would make the whole workflow red for a reason nobody looks at twice.

Structure, read: on: has push (main, paths: d3d12/**), pull_request (paths: d3d12/**), workflow_dispatch; permissions: contents: read; a concurrency group that cancels only for pull_request (github.event_name == 'pull_request'), which is the same shape ci.yml uses and keeps a queued push from replacing a run; one job, windows-latest, timeout-minutes: 45, working-directory: d3d12, shell: bash; checkout with persist-credentials: false.

The gating is the part I would have argued for: cargo test --workspace --exclude xtask blocks, while the asset-policy test and cargo clippy -D warnings run with continue-on-error: true and are called out in a comment as reports until host.rs and lower.rs are split and the existing findings are fixed. That matches this tree's state (the 640 KiB policy test fails on main today), and it is better than either blocking on a known failure or not running the check at all.

Not verified: the measurements in the header (1441 pass, 58 ignored, ~4 min build, ~11 min tests) and the toolchain resolution - I have no cargo on this Windows machine, so none of it ran here. The YAML structure is read, not executed.

Written with an AI assistant.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7264034126 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2648#issuecomment-7264034126). Originally posted by [fiestorra](https://github.com/fiestorra) on 2026-11-29T22:53:48Z. --- Checked what can be checked without `cargo` on this machine (no Rust toolchain here), and one thing that would have broken every run is fine: ``` git ls-remote https://github.com/actions/checkout | grep 3d3c42e5… 3d3c42e5aac5ba805825da76410c181273ba90b1 refs/tags/v7 3d3c42e5aac5ba805825da76410c181273ba90b1 refs/tags/v7.0.1 ``` So the pinned SHA **is** `v7.0.1` - the pin is real and not a copy-paste of some other commit, which is the failure mode that would make the whole workflow red for a reason nobody looks at twice. **Structure, read:** `on:` has `push` (main, `paths: d3d12/**`), `pull_request` (`paths: d3d12/**`), `workflow_dispatch`; `permissions: contents: read`; a `concurrency` group that cancels only for `pull_request` (`github.event_name == 'pull_request'`), which is the same shape `ci.yml` uses and keeps a queued push from replacing a run; one job, `windows-latest`, `timeout-minutes: 45`, `working-directory: d3d12`, `shell: bash`; checkout with `persist-credentials: false`. **The gating is the part I would have argued for:** `cargo test --workspace --exclude xtask` **blocks**, while the asset-policy test and `cargo clippy -D warnings` run with `continue-on-error: true` and are called out in a comment as reports until `host.rs` and `lower.rs` are split and the existing findings are fixed. That matches this tree's state (the 640 KiB policy test fails on `main` today), and it is better than either blocking on a known failure or not running the check at all. **Not verified:** the measurements in the header (1441 pass, 58 ignored, ~4 min build, ~11 min tests) and the toolchain resolution - I have no `cargo` on this Windows machine, so none of it ran here. The YAML structure is read, not executed. Written with an AI assistant.
merzleckeier commented 2026-11-29 23:53:56 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-11-29T23:53:56Z.


I reproduced the pixel failure on a native windows-latest runner in my fork. The probe is based on main 452d1d1b6 plus logging and two independently selectable changes to the test fixture. No game data or GPU setup was needed. Runner log · Probe commit

MEASURED. Windows Server 2025 build 26100, Rust 1.98.1, DXC 1.9.2602.17. All 12 subprocesses reported depth-bounds support and successfully reloaded the pipeline library. Red bytes are outside/inside the bound.

Fixture variant Adapter Red bytes Runs
Original draw sequence Microsoft Basic Render Driver, flags 0x0 255 / 255 3/3 failed
Reapply OMSetDepthBounds after setting the PSO Same default adapter 255 / 255 3/3 failed
DepthEnable=true, ALWAYS, write mask ZERO Same default adapter 0 / 255 3/3 passed
Original draw sequence, explicitly selecting WARP Microsoft Basic Render Driver, software flag 0x2 255 / 255 3/3 failed

For this CI fixture, setting DepthEnable: true.into() while retaining ALWAYS and ZERO makes the depth-bounds check pass on the default hosted adapter. The ordinary depth comparison always passes, and the fixture still exercises both outcomes of bounds testing after the command-list cut. This probe covers a single test. The full workflow gate is a separate run.

AI-assisted with OpenAI Codex.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7264809872 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2648#issuecomment-7264809872). Originally posted by [merzleckeier](https://github.com/merzleckeier) on 2026-11-29T23:53:56Z. --- I reproduced the pixel failure on a native `windows-latest` runner in my fork. The probe is based on `main` `452d1d1b6` plus logging and two independently selectable changes to the test fixture. No game data or GPU setup was needed. [Runner log](https://github.com/merzleckeier/mandy/actions/runs/46325255020/job/141542439562) · [Probe commit](https://github.com/merzleckeier/mandy/commit/8eb09562601fd693893ad77c6eb9af995b050ea0) **MEASURED.** Windows Server 2025 build 26100, Rust 1.98.1, DXC 1.9.2602.17. All 12 subprocesses reported depth-bounds support and successfully reloaded the pipeline library. Red bytes are outside/inside the bound. | Fixture variant | Adapter | Red bytes | Runs | | --- | --- | --- | --- | | Original draw sequence | Microsoft Basic Render Driver, flags `0x0` | `255 / 255` | 3/3 failed | | Reapply `OMSetDepthBounds` after setting the PSO | Same default adapter | `255 / 255` | 3/3 failed | | `DepthEnable=true`, `ALWAYS`, write mask `ZERO` | Same default adapter | `0 / 255` | 3/3 passed | | Original draw sequence, explicitly selecting WARP | Microsoft Basic Render Driver, software flag `0x2` | `255 / 255` | 3/3 failed | For this CI fixture, setting `DepthEnable: true.into()` while retaining `ALWAYS` and `ZERO` makes the depth-bounds check pass on the default hosted adapter. The ordinary depth comparison always passes, and the fixture still exercises both outcomes of bounds testing after the command-list cut. This probe covers a single test. The full workflow gate is a separate run. AI-assisted with OpenAI Codex.
merzleckeier commented 2026-11-30 00:04:53 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-11-30T00:04:53Z.


Follow-up: the full native Windows workspace gate passes with the one-line fixture change. I ran your original GitHub merge 6a7778069 in my fork at d8fec229. In the fixture I enabled ordinary depth testing and kept ALWAYS, the ZERO write mask, and every original assertion. The only workflow edits point the push trigger at the scratch fork branch. Windows job · Probe commit

  • MEASURED. cargo build --workspace --all-targets --locked and cargo test --workspace --exclude xtask --locked both passed on Windows Server 2025 build 26100 with Rust 1.98.1. The top-level test suites reported 1,435 passed, 0 failed, 58 ignored. leonida-gpu reported 549 passed, 0 failed, 47 ignored, and depth_bounds_pipeline_loads_and_filters_draws reported ok. The earlier focused native probe measured the corresponding 0 / 255 pixel pair.
  • MEASURED. The report-only asset policy and Clippy steps still returned exit 101. Asset policy flagged host.rs and emit/lower.rs for the existing file-size limit. The mandatory build and suite passed independently of those reports.

AI-assisted with OpenAI Codex.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7264950548 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2648#issuecomment-7264950548). Originally posted by [merzleckeier](https://github.com/merzleckeier) on 2026-11-30T00:04:53Z. --- Follow-up: the full native Windows workspace gate passes with the one-line fixture change. I ran your original GitHub merge `6a7778069` in my fork at `d8fec229`. In the fixture I enabled ordinary depth testing and kept `ALWAYS`, the `ZERO` write mask, and every original assertion. The only workflow edits point the push trigger at the scratch fork branch. [Windows job](https://github.com/merzleckeier/mandy/actions/runs/46325890568/job/141544456928) · [Probe commit](https://github.com/merzleckeier/mandy/commit/d8fec229e77c6fce963a600c0013e598bf93bde0) - **MEASURED.** `cargo build --workspace --all-targets --locked` and `cargo test --workspace --exclude xtask --locked` both passed on Windows Server 2025 build 26100 with Rust 1.98.1. The top-level test suites reported **1,435 passed, 0 failed, 58 ignored**. `leonida-gpu` reported **549 passed, 0 failed, 47 ignored**, and `depth_bounds_pipeline_loads_and_filters_draws` reported `ok`. The earlier focused native probe measured the corresponding `0 / 255` pixel pair. - **MEASURED.** The report-only asset policy and Clippy steps still returned exit 101. Asset policy flagged `host.rs` and `emit/lower.rs` for the existing file-size limit. The mandatory build and suite passed independently of those reports. AI-assisted with OpenAI Codex.
zmasi commented 2026-11-30 00:17:37 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by zmasi on 2026-11-30T00:17:37Z.


Opened #2663 (D3D12-DEPTH-BOUNDS-TEST-FLAKE) for the depth_bounds_pipeline_loads_and_filters_draws failure here, matching @merzleckeier's hosted WARP probe above: instead of changing the test fixture's DepthEnable = false input, effective_depth_bounds_desc in pipeline/host.rs promotes DepthBoundsTestEnable && !DepthEnable && dsv_format != DXGI_FORMAT_UNKNOWN to DepthEnable = true, DepthWriteMask = ZERO, DepthFunc = ALWAYS in GraphicsState::depth1 and graphics_depth_bounds_pipeline (keeping bounds-only PSOs working on WARP and read-only DSVs while leaving DSVFormat == UNKNOWN and explicit DepthEnable = true untouched), and isolates the test's RTV/DSV heaps from parallel RTV_RING contention (551/551 passing under LEONIDA_D3D12_WARP=1 LEONIDA_D3D12_DEBUG=1).

AI-assisted.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7265139405 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2648#issuecomment-7265139405). Originally posted by [zmasi](https://github.com/zmasi) on 2026-11-30T00:17:37Z. --- Opened #2663 (`D3D12-DEPTH-BOUNDS-TEST-FLAKE`) for the `depth_bounds_pipeline_loads_and_filters_draws` failure here, matching `@merzleckeier`'s hosted WARP probe above: instead of changing the test fixture's `DepthEnable = false` input, `effective_depth_bounds_desc` in `pipeline/host.rs` promotes `DepthBoundsTestEnable && !DepthEnable && dsv_format != DXGI_FORMAT_UNKNOWN` to `DepthEnable = true`, `DepthWriteMask = ZERO`, `DepthFunc = ALWAYS` in `GraphicsState::depth1` and `graphics_depth_bounds_pipeline` (keeping bounds-only PSOs working on WARP and read-only DSVs while leaving `DSVFormat == UNKNOWN` and explicit `DepthEnable = true` untouched), and isolates the test's RTV/DSV heaps from parallel `RTV_RING` contention (`551/551` passing under `LEONIDA_D3D12_WARP=1 LEONIDA_D3D12_DEBUG=1`). AI-assisted.
fiestorra commented 2026-11-30 05:32:04 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-11-30T05:32:04Z.


Structural verification on this machine, and the limits are stated below because this one cannot be run here at all - there is no cargo on it.

1. It applies. merge-tree clean; f8ee1755d cherry-picks onto main 1d22590b9. One file, 63 insertions(+).

2. The YAML parses, which is the one check a malformed workflow would fail:

python3 -c "import yaml; d=yaml.safe_load(open('.github/workflows/d3d12.yml')); print(list(d['jobs']))"
  -> ['d3d12']

and .github/workflows/jactionlint.yml already covers paths: ['.github/**'], so the schema linter will see this file too.

3. The things it refers to exist:

the workflow says in the tree
working-directory: d3d12 exists
rust-toolchain.toml (the pinned toolchain it relies on) channel = "1.98.1", x86_64-pc-windows-msvc, components rustfmt, clippy
cargo test -p xtask xtask is a workspace member (members = ["crates/*", "apps/*", "xtask"])
paths: d3d12/** matches the crates, apps/ and xtask
no cargo fmt step correct - the only mention is the header explaining it is left out, and I checked that

4. The gating design matches its header. Build and cargo test --workspace --exclude xtask are blocking; the asset-policy test and cargo clippy -D warnings carry continue-on-error: true as reports, which is what the comment says and what main's current state justifies (one failing policy test, ~25 clippy findings). A workflow that made those blocking would be red on its first run and stay red.

What I could not verify, and why it matters for this particular pull request: its header claims the workspace builds in about 4 minutes and its tests take about 11, with 1441 passing, 58 ignored and one failing (the asset-policy test, which the workflow excludes). None of those numbers can be checked here - no cargo, and the toolchain is pinned to 1.98.1 for x86_64-pc-windows-msvc, which I do not have. What I can say is that the workflow's own design is consistent with those claims: the one test it excludes is the one the header says fails, and the two steps it makes non-blocking are the two it says are red on main.

The first run of this workflow on this pull request is therefore also its verification - and, given #2648 exists to be that gate for everything under d3d12/, its own green run is the evidence a reviewer should wait for rather than take from me.

Written with an AI assistant.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7269758492 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2648#issuecomment-7269758492). Originally posted by [fiestorra](https://github.com/fiestorra) on 2026-11-30T05:32:04Z. --- Structural verification on this machine, and the limits are stated below because **this one cannot be run here at all** - there is no `cargo` on it. **1. It applies.** `merge-tree` clean; `f8ee1755d` cherry-picks onto `main` `1d22590b9`. One file, `63 insertions(+)`. **2. The YAML parses**, which is the one check a malformed workflow would fail: ``` python3 -c "import yaml; d=yaml.safe_load(open('.github/workflows/d3d12.yml')); print(list(d['jobs']))" -> ['d3d12'] ``` and `.github/workflows/jactionlint.yml` already covers `paths: ['.github/**']`, so the schema linter will see this file too. **3. The things it refers to exist:** | the workflow says | in the tree | |---|---| | `working-directory: d3d12` | exists | | `rust-toolchain.toml` (the pinned toolchain it relies on) | `channel = "1.98.1"`, `x86_64-pc-windows-msvc`, components `rustfmt, clippy` | | `cargo test -p xtask` | `xtask` is a workspace member (`members = ["crates/*", "apps/*", "xtask"]`) | | `paths: d3d12/**` | matches the crates, `apps/` and `xtask` | | no `cargo fmt` step | correct - the only mention is the header explaining it is left out, and I checked that | **4. The gating design matches its header.** Build and `cargo test --workspace --exclude xtask` are **blocking**; the asset-policy test and `cargo clippy -D warnings` carry `continue-on-error: true` as **reports**, which is what the comment says and what `main`'s current state justifies (one failing policy test, ~25 clippy findings). A workflow that made those blocking would be red on its first run and stay red. **What I could not verify, and why it matters for this particular pull request:** its header claims the workspace builds in about 4 minutes and its tests take about 11, with **1441 passing, 58 ignored and one failing** (the asset-policy test, which the workflow excludes). **None of those numbers can be checked here** - no `cargo`, and the toolchain is pinned to 1.98.1 for `x86_64-pc-windows-msvc`, which I do not have. What I can say is that the workflow's own design is consistent with those claims: the one test it excludes is the one the header says fails, and the two steps it makes non-blocking are the two it says are red on `main`. The first run of this workflow **on this pull request** is therefore also its verification - and, given **#2648** exists to be that gate for everything under `d3d12/`, its own green run is the evidence a reviewer should wait for rather than take from me. Written with an AI assistant.
KelboLive commented 2026-11-30 16:09:21 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by KelboLive on 2026-11-30T16:09:21Z.


Independent timing while verifying PRs on this machine: the workspace compile, not the tests, dominates repeated runs. A shared CARGO_TARGET_DIR across checkouts cut a -p leonida-hle check from 49.4 s cold to 20.8 s on the second PR (same toolchain, different source tree); after that the crate tests themselves are sub-second.

For this workflow, caching d3d12/target plus CARGO_HOME/the registry would save the same cold build on every run:

  • actions/cache (or Swatinem/rust-cache with workspaces: d3d12 -> target) keyed by d3d12/rust-toolchain.toml + d3d12/Cargo.lock; restore before "Rust toolchain", save after the build/clippy.
  • Cache ~\.cargo\registry (or CARGO_HOME) separately; Windows runners otherwise re-download crates every run.
  • The test step itself is minutes for leonida-shader even warm (386 tests, 250-330 s here), so the cache cannot hide a slow suite; it just removes the repeated compile/clippy cost.

Measured on Windows 11 26200.9711, Ryzen 9 7950X3D, Rust 1.98.1 as pinned. AI-assisted: yes (opencode).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7284203401 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2648#issuecomment-7284203401). Originally posted by [KelboLive](https://github.com/KelboLive) on 2026-11-30T16:09:21Z. --- Independent timing while verifying PRs on this machine: the workspace compile, not the tests, dominates repeated runs. A shared `CARGO_TARGET_DIR` across checkouts cut a `-p leonida-hle` check from **49.4 s cold to 20.8 s** on the second PR (same toolchain, different source tree); after that the crate tests themselves are sub-second. For this workflow, caching `d3d12/target` plus `CARGO_HOME`/the registry would save the same cold build on every run: - `actions/cache` (or `Swatinem/rust-cache` with `workspaces: d3d12 -> target`) keyed by `d3d12/rust-toolchain.toml` + `d3d12/Cargo.lock`; restore before "Rust toolchain", save after the build/clippy. - Cache `~\.cargo\registry` (or `CARGO_HOME`) separately; Windows runners otherwise re-download crates every run. - The test step itself is minutes for `leonida-shader` even warm (386 tests, 250-330 s here), so the cache cannot hide a slow suite; it just removes the repeated compile/clippy cost. Measured on Windows 11 26200.9711, Ryzen 9 7950X3D, Rust 1.98.1 as pinned. AI-assisted: yes (opencode).
aslan2142 commented 2026-12-01 10:42:46 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-12-01T10:42:46Z.

Review: APPROVED


Verified the effective diff against current main (compare/main...dcd93bea): adds .github/workflows/d3d12.yml and removes the unused nested d3d12/.github/workflows/ci.yml. Action SHAs are pinned, permissions are minimal (contents: read), jactionlint and d3d12 (windows-latest) both passed on this head, clean-room verified, and all CI checks are green. Merging.

(Note: now that #2681 and #2682 have landed on main, clippy can also be promoted to blocking in a small follow-up once verified green.)

(AI-assisted review.)

<!-- greyfinch-sync:ubiquitarianism/leonida:review:6129648147 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2648#pullrequestreview-6129648147). Originally posted by [aslan2142](https://github.com/aslan2142) on 2026-12-01T10:42:46Z. **Review:** APPROVED --- Verified the effective diff against current `main` (`compare/main...dcd93bea`): adds `.github/workflows/d3d12.yml` and removes the unused nested `d3d12/.github/workflows/ci.yml`. Action SHAs are pinned, permissions are minimal (`contents: read`), `jactionlint` and `d3d12 (windows-latest)` both passed on this head, clean-room verified, and all CI checks are green. Merging. *(Note: now that #2681 and #2682 have landed on `main`, `clippy` can also be promoted to blocking in a small follow-up once verified green.)* *(AI-assisted review.)*
fiestorra commented 2026-12-01 10:48:19 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-12-01T10:48:19Z.


finding: this job is right, and it currently works around three reds that have fixes open - plus it will hit the leonida-gpu concurrency flake that the --skip does not cover.

Three workarounds, each pointing at a fix that already exists:

here why the fix
--skip depth_bounds_pipeline_loads the test asserts left: 255, right: 0 on a software adapter #2823 - it skips when the adapter has no depth-bounds support and still runs on a card (measured on the merged tree)
Asset policy (report) continue-on-error host.rs and lower.rs over the limit, and amplify_dxil.rs's encoded run #2815 - 8 MiB for .rs plus the one exception (measured on the merged tree)
Clippy (report) continue-on-error the findings that are left the cleanup that landed tonight fixed 83; four are back already (pipeline/host.rs:1214, pipeline/known.rs:246 and :268, glyphs/live.rs:121), all from merges made after it

So the comments "make it blocking then" have an answer for two of the three, and both are measured rather than hoped for.

And the one thing this job does not have, which matters more than any of them: cargo test --workspace --exclude xtask runs the leonida-gpu tests in parallel, and that crate's tests interfere with each other when they share a process. Measured today on main, cargo test -p leonida-gpu --lib:

default threads   16 runs, 2 failed   (two different tests, neither of them flaky alone)
--test-threads=1   8 runs, 0 failed   (37 s instead of 13)

A job that runs that crate once will be red about one run in eight for a reason nobody can attribute. The --skip depth_bounds_pipeline_loads does not cover it: the failures I measured were descriptor::tests::records_copied_as_bytes_are_made_at_the_next_sync and texture::alias_cast_tests::..._cast_to_r9g9b9e5_under_legacy_barriers.

The shape that would keep both properties: exclude that crate from the parallel run and give it its own step on one thread, which is what #2816 does and what I would lift from it even if the rest of that pull request has been superseded by this one.

      - name: Tests (no GPU, no game data)
        run: cargo test --workspace --exclude xtask --exclude leonida-gpu --locked -- --skip depth_bounds_pipeline_loads
      - name: Tests (leonida-gpu, one thread)
        run: cargo test -p leonida-gpu --lib --locked -- --test-threads=1

AI-assisted: yes - DeepSeek v4.1 (flash), which measured the flake 24 times today and read this workflow's three workarounds against the three open fixes.

Written with an AI assistant.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7308748335 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2648#issuecomment-7308748335). Originally posted by [fiestorra](https://github.com/fiestorra) on 2026-12-01T10:48:19Z. --- finding: **this job is right, and it currently works around three reds that have fixes open - plus it will hit the `leonida-gpu` concurrency flake that the `--skip` does not cover.** **Three workarounds, each pointing at a fix that already exists:** | here | why | the fix | |---|---|---| | `--skip depth_bounds_pipeline_loads` | the test asserts `left: 255, right: 0` on a software adapter | **#2823** - it skips when the adapter has no depth-bounds support and still runs on a card (measured on the merged tree) | | **Asset policy (report)** `continue-on-error` | `host.rs` and `lower.rs` over the limit, and `amplify_dxil.rs`'s encoded run | **#2815** - 8 MiB for `.rs` plus the one exception (measured on the merged tree) | | **Clippy (report)** `continue-on-error` | the findings that are left | the cleanup that landed tonight fixed 83; **four are back already** (`pipeline/host.rs:1214`, `pipeline/known.rs:246` and `:268`, `glyphs/live.rs:121`), all from merges made after it | **So the comments "make it blocking then" have an answer for two of the three, and both are measured rather than hoped for.** **And the one thing this job does not have, which matters more than any of them**: **`cargo test --workspace --exclude xtask` runs the `leonida-gpu` tests in parallel, and that crate's tests interfere with each other when they share a process.** **Measured today on `main`, `cargo test -p leonida-gpu --lib`:** ``` default threads 16 runs, 2 failed (two different tests, neither of them flaky alone) --test-threads=1 8 runs, 0 failed (37 s instead of 13) ``` **A job that runs that crate once will be red about one run in eight for a reason nobody can attribute.** **The `--skip depth_bounds_pipeline_loads` does not cover it**: **the failures I measured were `descriptor::tests::records_copied_as_bytes_are_made_at_the_next_sync` and `texture::alias_cast_tests::..._cast_to_r9g9b9e5_under_legacy_barriers`.** **The shape that would keep both properties**: **exclude that crate from the parallel run and give it its own step on one thread**, **which is what #2816 does and what I would lift from it even if the rest of that pull request has been superseded by this one.** ```yaml - name: Tests (no GPU, no game data) run: cargo test --workspace --exclude xtask --exclude leonida-gpu --locked -- --skip depth_bounds_pipeline_loads - name: Tests (leonida-gpu, one thread) run: cargo test -p leonida-gpu --lib --locked -- --test-threads=1 ``` **AI-assisted:** yes - DeepSeek v4.1 (flash), which measured the flake 24 times today and read this workflow's three workarounds against the three open fixes. Written with an AI assistant.
Sign in to join this conversation.
No reviewers
No labels
No milestone
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.

Reference
ProjectLeonida/mandy!2648
No description provided.