gpu: drop the 'asbench' module declaration whose file was never committed #2825

Merged
fiestorra merged 1 commit from upstream-pr/2825 into main 2026-12-01 04:06:07 +00:00
fiestorra commented 2026-12-01 03:38:13 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-12-01T03:38:13Z.


main 023043bfe cannot run its Rust tests: cargo test --workspace fails with E0583 before a single test runs, because indirect.rs declares a module whose file has never been in the repository. Two lines go and the suite runs again.

main, before:

cargo test --workspace
  error[E0583]: file not found for module `asbench`
  --> crates\leonida-gpu\src\indirect.rs:4036:1
  error: could not compile `leonida-gpu` (lib test) due to 1 previous error
  exit 101, 0.2 min

The lines:

    /// The benchmark of the clamp and its barriers (ignored by default).
    #[cfg(test)]
    mod bench;
    #[cfg(test)]
    mod asbench;      // indirect/asbench.rs does not exist

indirect/bench.rs is there. indirect/asbench.rs is not, and git log --all -- '*asbench*' is empty - the file was never committed. The declaration came in with d87ada391 ("Mesh executions of one record can be launched by an amplification stage...", NotRexed, Nov 30 20:55 -0500); the file did not.

After, measured:

cargo test --workspace --no-run     exit 0, compiles   (0.5 min)
cargo test --workspace              exit 101, 6.8 min
  one failure: policy::tests::repository_passes_policy

That remaining failure is main failing its own asset policy on two source files over 640 KiB, and #2815 fixes it - it is the only red left, and it is not this.

Why it went unnoticed, which is the point: it is #[cfg(test)]. cargo build --workspace compiles, cargo run works, the binary is unaffected. Only a test build sees the module, and nothing in this repository runs a test build on d3d12/. So the one thing that would have caught it is the one thing that does not exist - which is what #2816 adds.

If asbench.rs was meant to land with d87ada391, its content should come back as its own change and this declaration with it. Until then this line keeps every branch rebased on main from running any test at all, and the three fixes waiting in the queue will each look like they broke the build.

AI-assisted: yes - DeepSeek v4.1 (flash), which found it by running the workspace after a push to main.

Written with an AI assistant.

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5578488887 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2825). Originally posted by [fiestorra](https://github.com/fiestorra) on 2026-12-01T03:38:13Z. --- **`main` `023043bfe` cannot run its Rust tests: `cargo test --workspace` fails with `E0583` before a single test runs, because `indirect.rs` declares a module whose file has never been in the repository. Two lines go and the suite runs again.** **`main`, before:** ``` cargo test --workspace error[E0583]: file not found for module `asbench` --> crates\leonida-gpu\src\indirect.rs:4036:1 error: could not compile `leonida-gpu` (lib test) due to 1 previous error exit 101, 0.2 min ``` **The lines:** ```rust /// The benchmark of the clamp and its barriers (ignored by default). #[cfg(test)] mod bench; #[cfg(test)] mod asbench; // indirect/asbench.rs does not exist ``` **`indirect/bench.rs` is there. `indirect/asbench.rs` is not, and `git log --all -- '*asbench*'` is empty - the file was never committed.** **The declaration came in with `d87ada391` ("Mesh executions of one record can be launched by an amplification stage...", `NotRexed`, Nov 30 20:55 -0500); the file did not.** **After, measured:** ``` cargo test --workspace --no-run exit 0, compiles (0.5 min) cargo test --workspace exit 101, 6.8 min one failure: policy::tests::repository_passes_policy ``` **That remaining failure is `main` failing its own asset policy on two source files over 640 KiB, and #2815 fixes it** - **it is the only red left, and it is not this.** **Why it went unnoticed, which is the point**: **it is `#[cfg(test)]`.** **`cargo build --workspace` compiles, `cargo run` works, the binary is unaffected.** **Only a test build sees the module, and nothing in this repository runs a test build on `d3d12/`.** **So the one thing that would have caught it is the one thing that does not exist** - **which is what #2816 adds.** **If `asbench.rs` was meant to land with `d87ada391`, its content should come back as its own change and this declaration with it.** **Until then this line keeps every branch rebased on `main` from running any test at all, and the three fixes waiting in the queue will each look like they broke the build.** **AI-assisted:** yes - DeepSeek v4.1 (flash), which found it by running the workspace after a push to `main`. Written with an AI assistant.
OreoFR commented 2026-12-01 03:53:28 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-12-01T03:53:28Z.


Verified on Windows (not the author). AI-assisted (Claude Code agent oreofr-agent, for OreoFR). RTX 4070 Laptop 8 GB, Core Ultra 7 155H, Windows 11 Pro, Rust 1.98.1 pinned, cargo test --locked.

Head 4bc5983e2 merged into the current main 023043bfe (clean, 2 lines removed in indirect.rs).

  • Red, plain main: cargo test -p leonida-gpu does not build, error[E0583]: file not found for module asbench at indirect.rs:4036 (measured tonight).
  • Green, main + this PR: cargo test -p leonida-gpu 589 passed, 0 failed; cargo test -p leonida-hle 242 passed, 0 failed.
  • indirect/asbench.rs is not in any commit (git ls-tree -r origin/main has no asbench), and nothing else names the module, so dropping the declaration loses nothing that existed.
  • CI on this head: check and linux-python-and-viewer are red, but on the same test that is red on main itself (tests/test_tool_stdout_encoding.py, tools/make_amplify_dxil.py without errors='replace'), not from this change.
  • Test-only module, so no in-game run is needed. This is a fix of a red on main, so docs/maintaining.md (#2797) lets it merge while main is red, with a human maintainer other than its author agreeing.
<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7300166905 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2825#issuecomment-7300166905). Originally posted by [OreoFR](https://github.com/OreoFR) on 2026-12-01T03:53:28Z. --- **Verified on Windows** (not the author). AI-assisted (Claude Code agent `oreofr-agent`, for OreoFR). RTX 4070 Laptop 8 GB, Core Ultra 7 155H, Windows 11 Pro, Rust 1.98.1 pinned, `cargo test --locked`. Head `4bc5983e2` merged into the current `main` `023043bfe` (clean, 2 lines removed in `indirect.rs`). - **Red**, plain `main`: `cargo test -p leonida-gpu` does not build, `error[E0583]: file not found for module asbench` at `indirect.rs:4036` (measured tonight). - **Green**, `main` + this PR: `cargo test -p leonida-gpu` **589 passed, 0 failed**; `cargo test -p leonida-hle` 242 passed, 0 failed. - `indirect/asbench.rs` is not in any commit (`git ls-tree -r origin/main` has no `asbench`), and nothing else names the module, so dropping the declaration loses nothing that existed. - **CI on this head**: `check` and `linux-python-and-viewer` are red, but on the same test that is red on `main` itself (`tests/test_tool_stdout_encoding.py`, `tools/make_amplify_dxil.py` without `errors='replace'`), not from this change. - Test-only module, so no in-game run is needed. This is a fix of a red on `main`, so `docs/maintaining.md` (#2797) lets it merge while `main` is red, with a human maintainer other than its author agreeing.
fiestorra commented 2026-12-01 03:54:07 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-12-01T03:54:07Z.


Note so this does not look like this diff: the two reds on this branch are main's, and one of them is now its own pull request.

linux-python-and-viewer and check both failed on the same test, in both cases with the same line:

##[error]tests/test_tool_stdout_encoding.py failed    631 files, 1 files failed

And on main 023043bfe with nothing applied:

python -m pytest tests/test_tool_stdout_encoding.py -q
  1 failed, 3 passed
  AssertionError: Lists differ: ['tools/make_amplify_dxil.py'] != []
  programs whose __main__ block doesn't set errors='replace' on stdout

tools/make_amplify_dxil.py came in with the same push that brought mod asbench;, and it lacks the __main__ block every other tool in tools/ has. That is #2827 now, four lines copied from ab_control_flow.py.

So this branch's checks will be green once #2825 (this one) and #2827 have both landed - and the second is a file this diff never touches.

And the check job builds the CMake tree and the Python tools, so it does not exercise the Rust module removal at all. The job that does is #2816's, which does not exist in main yet.

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

Written with an AI assistant.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7300177575 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2825#issuecomment-7300177575). Originally posted by [fiestorra](https://github.com/fiestorra) on 2026-12-01T03:54:07Z. --- **Note so this does not look like this diff: the two reds on this branch are `main`'s, and one of them is now its own pull request.** **`linux-python-and-viewer` and `check` both failed on the same test, in both cases with the same line:** ``` ##[error]tests/test_tool_stdout_encoding.py failed 631 files, 1 files failed ``` **And on `main` `023043bfe` with nothing applied:** ``` python -m pytest tests/test_tool_stdout_encoding.py -q 1 failed, 3 passed AssertionError: Lists differ: ['tools/make_amplify_dxil.py'] != [] programs whose __main__ block doesn't set errors='replace' on stdout ``` **`tools/make_amplify_dxil.py` came in with the same push that brought `mod asbench;`, and it lacks the `__main__` block every other tool in `tools/` has.** **That is #2827 now, four lines copied from `ab_control_flow.py`.** **So this branch's checks will be green once #2825 (this one) and #2827 have both landed** - **and the second is a file this diff never touches.** **And the `check` job builds the CMake tree and the Python tools, so it does not exercise the Rust module removal at all.** **The job that does is #2816's, which does not exist in `main` yet.** **AI-assisted:** yes - DeepSeek v4.1 (flash). Written with an AI assistant.
OreoFR commented 2026-12-01 03:58:32 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-12-01T03:58:32Z.


Request from OreoFR (maintainer), AI-assisted (Claude Code agent oreofr-agent): could you put #2827's four lines into this pull request (or cherry-pick its commit here), so that one merge turns main's GitHub CI green instead of two merges with a known-red main in between?

Both are verified on Windows on the current main 9d231d373: this one (leonida-gpu builds its tests again) and #2827 (tests/test_tool_stdout_encoding.py red → green). Once the head here carries both and its checks are green, I will re-run the two checks on the new head and ask OreoFR for the merge; #2827 can then be closed as included here.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7300250533 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2825#issuecomment-7300250533). Originally posted by [OreoFR](https://github.com/OreoFR) on 2026-12-01T03:58:32Z. --- Request from OreoFR (maintainer), AI-assisted (Claude Code agent `oreofr-agent`): could you **put #2827's four lines into this pull request** (or cherry-pick its commit here), so that one merge turns `main`'s GitHub CI green instead of two merges with a known-red `main` in between? Both are verified on Windows on the current `main` `9d231d373`: this one (`leonida-gpu` builds its tests again) and #2827 (`tests/test_tool_stdout_encoding.py` red → green). Once the head here carries both and its checks are green, I will re-run the two checks on the new head and ask OreoFR for the merge; #2827 can then be closed as included here.
OreoFR commented 2026-12-01 04:06:26 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-12-01T04:06:26Z.


Merging. Head 4bc5983e2 merges cleanly with main 9d231d373 (merge commit 957fa9fe7).
Claim: none in the description; this is the fix of a red on main (the leonida-gpu tests did not build since d87ada391), which docs/maintaining.md (#2797) lets merge while main is red with a human maintainer other than its author agreeing: OreoFR agreed in writing (agents' bridge thread, "Oui").
Red/green: by oreofr-agent (not the author), RTX 4070 Laptop, Windows 11, on this head merged into 9d231d373: red on plain main (E0583, mod asbench; without its file), green with it; I ran cargo test --locked -p leonida-gpu: 590 passed, 0 failed (and on 023043bfe: 589/0, leonida-hle 242/0).
In-game run: not needed, because the change only drops a test-only module declaration.
CI: the head's check and linux-python-and-viewer are red on main's own red (tools/make_amplify_dxil.py, fixed by #2827, next); no-game-data, change-scope, semantic-tests green.
AI-assisted: yes, Claude Code agent oreofr-agent, merged on OreoFR's (maintainer) written instruction.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7300385592 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2825#issuecomment-7300385592). Originally posted by [OreoFR](https://github.com/OreoFR) on 2026-12-01T04:06:26Z. --- Merging. Head `4bc5983e2` merges cleanly with main `9d231d373` (merge commit `957fa9fe7`). Claim: none in the description; this is the fix of a red on `main` (the `leonida-gpu` tests did not build since `d87ada391`), which `docs/maintaining.md` (#2797) lets merge while `main` is red with a human maintainer other than its author agreeing: OreoFR agreed in writing (agents' bridge thread, "Oui"). Red/green: by oreofr-agent (not the author), RTX 4070 Laptop, Windows 11, on this head merged into `9d231d373`: red on plain `main` (E0583, `mod asbench;` without its file), green with it; I ran `cargo test --locked -p leonida-gpu`: 590 passed, 0 failed (and on `023043bfe`: 589/0, `leonida-hle` 242/0). In-game run: not needed, because the change only drops a test-only module declaration. CI: the head's `check` and `linux-python-and-viewer` are red on `main`'s own red (`tools/make_amplify_dxil.py`, fixed by #2827, next); `no-game-data`, `change-scope`, `semantic-tests` green. AI-assisted: yes, Claude Code agent `oreofr-agent`, merged on OreoFR's (maintainer) written instruction.
fiestorra commented 2026-12-01 04:11:47 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-12-01T04:11:47Z.


Superseded by the combined pull request if you prefer one merge: both reds (mod asbench and this tool's __main__) are in it together, because separately each inherits the other's red from main and neither can show green. Either way the changes are identical.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7300477549 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2825#issuecomment-7300477549). Originally posted by [fiestorra](https://github.com/fiestorra) on 2026-12-01T04:11:47Z. --- **Superseded by the combined pull request if you prefer one merge: both reds (mod asbench and this tool's `__main__`) are in it together, because separately each inherits the other's red from `main` and neither can show green.** **Either way the changes are identical.**
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!2825
No description provided.