shader/opt: the visit-budget test uses 5 phi levels, where the budget decides (D3D12-SHADER-BOUNDED-BUDGET-TEST) #2969

Merged
aznohonza merged 1 commit from upstream-pr/2969 into main 2026-12-02 16:09:51 +00:00
aznohonza commented 2026-12-01 21:56:11 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by aznohonza on 2026-12-01T21:56:11Z.


Re-created from the original #2959. aznohonza/mandy-contrib was made private at 21:41 UTC on 2026-12-01, which detached the fork and permanently closed its pull requests; GitHub refuses to reopen them (422 state cannot be changed). Same branch, same head 535c140949179bb31da20d0ecf45375fd3227ea7. The original review thread is at #2959.


bounded_budget_caps_wide_phi_dag is named for the 64-visit budget in Module::bounded(), but it built 10 levels of a 4-way phi DAG. At 10 levels the depth limit answers None after 12 visits, before the budget is reached: taking the budget away (let mut budget = u32::MAX) left the test passing, so it did not test what it says.

Five levels needs 2,729 visits without the budget, so there the budget is what answers None. The test now builds 5 levels, and its comment says why the depth limit no longer decides first.

Verification (Linux, no GPU, no game files):

  • cargo test -p leonida-shader --features host: 250 passed, 2 ignored, 0 failed.
  • Discrimination: with let mut budget = u32::MAX, the 5-level test fails (assertion left == right failed: left: Some(0.0), right: None), while the same test at 10 levels still passes — the gap this closes.
  • The visit figures (64 with the budget, 2,729 without at 5 levels, 12 at 10 levels on the depth limit) come from the finding on the merged #2861, measured the same way.

Test-only: no translator output, no switch, no game data.

Claimed in #2570 (D3D12-SHADER-BOUNDED-BUDGET-TEST). AI-assisted.

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5595285281 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2969). Originally posted by [aznohonza](https://github.com/aznohonza) on 2026-12-01T21:56:11Z. --- Re-created from the original #2959. `aznohonza/mandy-contrib` was made private at 21:41 UTC on 2026-12-01, which detached the fork and permanently closed its pull requests; GitHub refuses to reopen them (`422 state cannot be changed`). Same branch, same head `535c140949179bb31da20d0ecf45375fd3227ea7`. The original review thread is at #2959. --- `bounded_budget_caps_wide_phi_dag` is named for the 64-visit budget in `Module::bounded()`, but it built 10 levels of a 4-way phi DAG. At 10 levels the depth limit answers `None` after 12 visits, before the budget is reached: taking the budget away (`let mut budget = u32::MAX`) left the test passing, so it did not test what it says. Five levels needs 2,729 visits without the budget, so there the budget is what answers `None`. The test now builds 5 levels, and its comment says why the depth limit no longer decides first. **Verification** (Linux, no GPU, no game files): - `cargo test -p leonida-shader --features host`: 250 passed, 2 ignored, 0 failed. - Discrimination: with `let mut budget = u32::MAX`, the 5-level test fails (`assertion left == right failed: left: Some(0.0), right: None`), while the same test at 10 levels still passes — the gap this closes. - The visit figures (64 with the budget, 2,729 without at 5 levels, 12 at 10 levels on the depth limit) come from the finding on the merged #2861, measured the same way. Test-only: no translator output, no switch, no game data. Claimed in #2570 (`D3D12-SHADER-BOUNDED-BUDGET-TEST`). AI-assisted.
KelboLive commented 2026-12-01 22:19:29 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by KelboLive on 2026-12-01T22:19:29Z.

Review: COMMENTED


Identical to #2959 (535c14094), which I reviewed: 5 phi levels cost exactly 2,729 visits, the 64 budget is the limiter at that depth, and the mutations agree (removing the budget or raising it to 2,729 fails). merge-tree is clean. Good to merge; only the optional low-side assertion (budgets 13–2,728 still pass) is open.

<!-- greyfinch-sync:ubiquitarianism/leonida:review:6141173654 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2969#pullrequestreview-6141173654). Originally posted by [KelboLive](https://github.com/KelboLive) on 2026-12-01T22:19:29Z. **Review:** COMMENTED --- Identical to #2959 (`535c14094`), which I reviewed: 5 phi levels cost exactly 2,729 visits, the 64 budget is the limiter at that depth, and the mutations agree (removing the budget or raising it to 2,729 fails). `merge-tree` is clean. Good to merge; only the optional low-side assertion (budgets 13–2,728 still pass) is open.
aznohonza commented 2026-12-01 22:28:23 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by aznohonza on 2026-12-01T22:28:23Z.


Thanks for the mutation check. The optional low-side assertion is real: the test pins the cap, not that a small tree still answers a bound. The 2-level diamond above it does return Some(0.0) at budget 64, so the "budget does not refuse small trees" side is covered there; I will add the 13–2,728 sweep only if it can be done without pinning the implementation's exact capacity.

AI-assisted.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7327904266 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2969#issuecomment-7327904266). Originally posted by [aznohonza](https://github.com/aznohonza) on 2026-12-01T22:28:23Z. --- Thanks for the mutation check. The optional low-side assertion is real: the test pins the cap, not that a small tree still answers a bound. The 2-level diamond above it does return `Some(0.0)` at budget 64, so the "budget does not refuse small trees" side is covered there; I will add the 13–2,728 sweep only if it can be done without pinning the implementation's exact capacity. AI-assisted.
imShangLi commented 2026-12-02 04:51:01 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by imShangLi on 2026-12-02T04:51:01Z.


VERIFY-2969 — Linux, Fedora 45, Rust 1.98.1 (the pinned toolchain), no GPU device, no game files

Verdict: PASS. A test-only change that makes an existing visit-budget test actually discriminate. I confirmed the
mechanism directly: with the visit budget deliberately broken, the new 5-level test fails while the old
10-level test passes — so before this pull request the test was passing for the wrong reason (the depth limit, not
the budget). The whole crate suite is identical on the merge base and on the head.

Head 535c1409, base the current main (8422def7), merge base 1fff6912, 1 file, +4/−3:
d3d12/crates/leonida-shader/src/emit/bitcode/opt.rs.

1. What it changes

The test bounded_budget_caps_wide_phi_dag builds a 4-way diamond DAG of Phis and asserts the final value is capped to
None. It looped 0..10 (10 phi levels); it now loops 0..5 (5 phi levels), with the comment rewritten to say why:

// 5-level 4-way diamond DAG with distinct ops per edge: 2,729 visits
// without the budget, more than the 64 it allows, so the budget (not
// the depth limit, which 10 levels would hit first) caps it to None.
for _ in 0..5 {

The call under test is unchanged: assert_eq!(m.bounded(cur, 12), None); — bounded is entered with a
depth of 12 and an internal visit budget of 64 (opt.rs:463-465, let mut budget = 64;). The change is
test-only: no production code is touched.

2. The new test checks the property that matters

The property is: the wide-DAG value is capped to None by the visit budget, not by the depth limit. bounded
returns None from either of two independent guards — depth.checked_sub(1)? or *budget = budget.checked_sub(1)?
(opt.rs:473-474). At 10 phi levels the recursion is ~20 nested calls deep, which trips the depth limit of 12 first,
so None came back even if the budget were completely broken — the test proved nothing about the budget. At 5 phi
levels the recursion is ~10 deep (under 12, so depth is not the binder) but the DAG still needs far more than 64
visits (my recurrence for the diamond gives ≈1,705 recursive calls; see the note on the comment's number in §4), so
the budget is what returns None.

I verified this empirically rather than by argument. I mutated bounded to disable the budget decrement
(// MUTATION: *budget = budget.checked_sub(1)?; commented out) and ran the test both ways:

Test version Budget broken Result
new (5 levels) budget decrement disabled FAILED — assertion left == right failed: left: Some(0.0), right: None
old (10 levels) budget decrement disabled ok (passes) — the depth limit masks the break

So the pull request's test notices a broken budget and the old one did not. That is exactly what a discriminating test
should do, and it is the whole point of the change. I then restored the source (the mutation lived only in throwaway
debug worktrees, now removed).

3. What the tests do here

python3 -I scripts/red_green.py 2969 --crate leonida-shader (own work-dir and target dir):

Side Result
red (base + only this pull request's test hunk) the test-changed opt.rs hunk applied cleanly
green (base + pull request merged) applied cleanly
outcome 252 tests pass on both sides, none fail on either, verdict no red (exit 1)

no red is the expected verdict for a test-only change with no production fix: the test passes on the base too
(because the base's 10-level version is capped by depth), so nothing goes red→green. That is precisely why the brief's
alternative method — break the tool and check the test notices — is the right one here, and §2 is that check.

I also ran the whole crate suite on the merge base and the head on clean target dirs:

Commit cargo test -p leonida-shader
merge base 1fff6912 250 passed; 0 failed; 2 ignored
head 535c1409 (pr2969) 250 passed; 0 failed; 2 ignored

Identical. (The count differs from red_green's 252 because red_green's target had the two source_hash_tests counted
differently — see §4.)

4. Any failure I saw, and why it is not this pull request

  • source_hash_tests failed spuriously during iteration (the_source_hash_leaves_the_test_modules_out,
    every_test_module_is_built_for_tests_only). Cause: build.rs bakes LEONIDA_SHADER_SOURCE_HASH into the test
    binary at compile time while the test recomputes the hash from src/ at run time; sharing one CARGO_TARGET_DIR
    across worktrees left a stale binary whose baked hash did not match the checked-out tree. It reproduced on plain
    main and on the merge base, which rules out this pull request. With a per-commit clean target dir both the
    base and the head pass 250/250 (§3). Harness artefact, not the code under test.
  • The comment's "2,729 visits" is an approximation, not an exact count. My recurrence for the diamond
    (V(L)=1+4·(1+V(L−1))) gives ≈1,705 recursive calls at 5 levels, not 2,729; the exact figure depends on
    traversal order and the duplicate-incoming skip in the Op::Phi arm (opt.rs:507-515). The number is not asserted
    anywhere and does not affect the test, whose validity rests only on "more than 64 visits, fewer than 12 levels
    deep" — which holds. Worth a one-word fix (~1,700) if the author cares, but it is not a correctness problem and I
    would not block on it.

5. What I did not check

  • No GPU and no running title. This change is entirely inside a Rust unit test; there is no GPU, runtime, or shader
    translation involved, and I did not run any.
  • No Windows build and no cargo clippy/cargo fmt gate; cargo test on Linux only.
  • No corpus run. The test's bounded predicate is exercised only by this unit test; I did not measure how often
    bounded hits the budget versus the depth limit over the real shader corpus, so I cannot say how many real programs
    this test now protects that it did not before.
  • The exact visit count. As in §4, I did not instrument bounded to print the true number of visits for the
    5-level DAG; my ≈1,705 is a calculation from the structure, not a measured value, and the comment's 2,729 I likewise
    did not reproduce.
  • Behavioural risk: none claimed. Because the diff touches only test code and one comment, there is no production
    behaviour to regress; the identical base/head suite (§3) is the whole of the evidence needed and I did not look for
    any beyond it.
<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7335324611 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2969#issuecomment-7335324611). Originally posted by [imShangLi](https://github.com/imShangLi) on 2026-12-02T04:51:01Z. --- ## VERIFY-2969 — Linux, Fedora 45, Rust 1.98.1 (the pinned toolchain), no GPU device, no game files **Verdict: PASS.** A test-only change that makes an existing visit-budget test actually discriminate. I confirmed the mechanism directly: with the visit budget deliberately broken, the **new** 5-level test **fails** while the **old** 10-level test **passes** — so before this pull request the test was passing for the wrong reason (the depth limit, not the budget). The whole crate suite is identical on the merge base and on the head. Head `535c1409`, base the current `main` (`8422def7`), merge base `1fff6912`, **1 file**, +4/−3: `d3d12/crates/leonida-shader/src/emit/bitcode/opt.rs`. ### 1. What it changes The test `bounded_budget_caps_wide_phi_dag` builds a 4-way diamond DAG of Phis and asserts the final value is capped to `None`. It looped `0..10` (10 phi levels); it now loops `0..5` (5 phi levels), with the comment rewritten to say why: ```rust // 5-level 4-way diamond DAG with distinct ops per edge: 2,729 visits // without the budget, more than the 64 it allows, so the budget (not // the depth limit, which 10 levels would hit first) caps it to None. for _ in 0..5 { ``` The call under test is unchanged: `assert_eq!(m.bounded(cur, 12), None);` — `bounded` is entered with a **depth of 12** and an internal **visit budget of 64** (`opt.rs:463-465`, `let mut budget = 64;`). The change is **test-only**: no production code is touched. ### 2. The new test checks the property that matters The property is: *the wide-DAG value is capped to `None` **by the visit budget**, not by the depth limit.* `bounded` returns `None` from either of two independent guards — `depth.checked_sub(1)?` or `*budget = budget.checked_sub(1)?` (`opt.rs:473-474`). At 10 phi levels the recursion is ~20 nested calls deep, which trips the depth limit of 12 first, so `None` came back even if the budget were completely broken — the test proved nothing about the budget. At 5 phi levels the recursion is ~10 deep (under 12, so depth is **not** the binder) but the DAG still needs far more than 64 visits (my recurrence for the diamond gives ≈1,705 recursive calls; see the note on the comment's number in §4), so the **budget** is what returns `None`. I verified this empirically rather than by argument. I mutated `bounded` to disable the budget decrement (`// MUTATION: *budget = budget.checked_sub(1)?;` commented out) and ran the test both ways: | Test version | Budget broken | Result | |---|---|---| | **new** (5 levels) | budget decrement disabled | **FAILED** — `assertion left == right failed: left: Some(0.0), right: None` | | **old** (10 levels) | budget decrement disabled | **ok** (passes) — the depth limit masks the break | So the pull request's test notices a broken budget and the old one did not. That is exactly what a discriminating test should do, and it is the whole point of the change. I then restored the source (the mutation lived only in throwaway debug worktrees, now removed). ### 3. What the tests do here `python3 -I scripts/red_green.py 2969 --crate leonida-shader` (own work-dir and target dir): | Side | Result | |---|---| | red (base + only this pull request's test hunk) | the test-changed `opt.rs` hunk applied cleanly | | green (base + pull request merged) | applied cleanly | | outcome | **252 tests pass on both sides**, none fail on either, verdict **`no red`** (exit 1) | `no red` is the expected verdict for a test-only change with no production fix: the test passes on the base too (because the base's 10-level version is capped by depth), so nothing goes red→green. That is precisely why the brief's alternative method — break the tool and check the test notices — is the right one here, and §2 is that check. I also ran the whole crate suite on the merge base and the head on **clean** target dirs: | Commit | `cargo test -p leonida-shader` | |---|---| | merge base `1fff6912` | `250 passed; 0 failed; 2 ignored` | | head `535c1409` (pr2969) | `250 passed; 0 failed; 2 ignored` | Identical. (The count differs from red_green's 252 because red_green's target had the two `source_hash_tests` counted differently — see §4.) ### 4. Any failure I saw, and why it is not this pull request - **`source_hash_tests` failed spuriously during iteration** (`the_source_hash_leaves_the_test_modules_out`, `every_test_module_is_built_for_tests_only`). Cause: `build.rs` bakes `LEONIDA_SHADER_SOURCE_HASH` into the test binary at compile time while the test recomputes the hash from `src/` at run time; sharing one `CARGO_TARGET_DIR` across worktrees left a stale binary whose baked hash did not match the checked-out tree. It reproduced on plain `main` and on the merge base, which rules out this pull request. With a per-commit **clean** target dir both the base and the head pass 250/250 (§3). Harness artefact, not the code under test. - **The comment's "2,729 visits" is an approximation, not an exact count.** My recurrence for the diamond (`V(L)=1+4·(1+V(L−1))`) gives ≈**1,705** recursive calls at 5 levels, not 2,729; the exact figure depends on traversal order and the duplicate-incoming skip in the `Op::Phi` arm (`opt.rs:507-515`). The number is not asserted anywhere and does not affect the test, whose validity rests only on "more than 64 visits, fewer than 12 levels deep" — which holds. Worth a one-word fix (`~1,700`) if the author cares, but it is not a correctness problem and I would not block on it. ### 5. What I did not check - **No GPU and no running title.** This change is entirely inside a Rust unit test; there is no GPU, runtime, or shader translation involved, and I did not run any. - **No Windows build** and no `cargo clippy`/`cargo fmt` gate; `cargo test` on Linux only. - **No corpus run.** The test's `bounded` predicate is exercised only by this unit test; I did not measure how often `bounded` hits the budget versus the depth limit over the real shader corpus, so I cannot say how many real programs this test now protects that it did not before. - **The exact visit count.** As in §4, I did not instrument `bounded` to print the true number of visits for the 5-level DAG; my ≈1,705 is a calculation from the structure, not a measured value, and the comment's 2,729 I likewise did not reproduce. - **Behavioural risk: none claimed.** Because the diff touches only test code and one comment, there is no production behaviour to regress; the identical base/head suite (§3) is the whole of the evidence needed and I did not look for any beyond it.
MoonEyes commented 2026-12-02 12:33:22 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-02T12:33:22Z.


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).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7345515877 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2969#issuecomment-7345515877). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-12-02T12:33:22Z. --- 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).
MoonEyes commented 2026-12-02 15:09:10 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-02T15:09:10Z.


RUN (in game, batch of six render-path pull requests), each head merged with git merge --no-ff onto main f45165e15, in one build: #2952 4df667e42, #2969 535c14094, #2877 f98e8ccf9, #2965 c62d57344, #2774 0dea1a13f, #2815 5ac7975c6. RTX 4060 8 GB, driver 610.88, Windows 11. Series S, -Resolution 1080, frame generation 2x, the same walking route as the other runs on this machine, 330 s after reaching the world.

What Result
Device lost / device removed 0
Exceptions, panics, hang watchdog, GPU stall, title suspended 0
Process alive at the end yes, stopped by the time limit
Rendered fps, last 240 s (48 samples) median 14.9, mean 14.2
Rendered fps, last 120 s median 14.6

For reference, the same machine and route rendered 13.3 to 15.2 fps today on main with single pull requests. A Rust build ran beside the game for part of the run, so the 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. If one of these pull requests changes its head, this run no longer covers it.

Limits: one run; free system memory was low (median 1.1 GB); arrival in the world was driven by keys and not checked on pictures. An earlier attempt of the same batch stopped at once because the game window lost focus ("title suspended"); it is not counted.

AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7349817865 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2969#issuecomment-7349817865). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-12-02T15:09:10Z. --- RUN (in game, batch of six render-path pull requests), each head merged with `git merge --no-ff` onto main `f45165e15`, in one build: #2952 `4df667e42`, #2969 `535c14094`, #2877 `f98e8ccf9`, #2965 `c62d57344`, #2774 `0dea1a13f`, #2815 `5ac7975c6`. RTX 4060 8 GB, driver 610.88, Windows 11. Series S, `-Resolution 1080`, frame generation 2x, the same walking route as the other runs on this machine, 330 s after reaching the world. | What | Result | |---|---| | Device lost / device removed | 0 | | Exceptions, panics, hang watchdog, GPU stall, title suspended | 0 | | Process alive at the end | yes, stopped by the time limit | | Rendered fps, last 240 s (48 samples) | median 14.9, mean 14.2 | | Rendered fps, last 120 s | median 14.6 | For reference, the same machine and route rendered 13.3 to 15.2 fps today on main with single pull requests. A Rust build ran beside the game for part of the run, so the 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. If one of these pull requests changes its head, this run no longer covers it. Limits: one run; free system memory was low (median 1.1 GB); arrival in the world was driven by keys and not checked on pictures. An earlier attempt of the same batch stopped at once because the game window lost focus ("title suspended"); it is not counted. AI-assisted (Claude Code).
MoonEyes commented 2026-12-02 15:56:47 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-02T15:56:47Z.


RUN (independent run on Windows, #2969 head 535c14094, merged locally into main f45165e15 with git merge --no-ff, as part of a batch of six)

The in-game run of the batch is already posted on this pull request; this comment is the test side only (no game data, no game files).

Red: the claim is that the old test could not fail when the budget is removed.

  • Reverting #2969 (old test, 10 levels) and setting let mut budget = 64; to u32::MAX in Module::bounded (opt.rs:464): bounded_budget_caps_wide_phi_dag still passes (1 passed).
  • With the PR's test (5 levels) and the same mutation it fails (left: Some(0.0), right: None).
    So the test now pins what its name says.

Green (whole batch, one tree, Windows 11, debug profile as d3d12.yml runs it):

  • cargo test --workspace --exclude xtask --locked: 1708 passed, 0 failed, 75 ignored (leonida-gpu lib 691 / 59 ignored, leonida-shader lib 248 / 2 ignored, leonida app 44, leonida-formats 47, leonida-menu 48, leonida-pe 36).
  • cargo test -p leonida-gpu --features diagnostics --test replay --locked: 1 passed.
  • cargo test -p xtask --locked: 7 passed.
  • Caveat, not from this batch: the leonida-gpu lib fails one test intermittently (3 different ones over 3 full runs of this tree: texture::alias_cast_tests::committed_and_placed_r32_uint_textures_cast_to_r9g9b9e5_under_legacy_barriers, watch::tests::a_write_opens_the_view_it_goes_through, pipeline::make::tests::overlapping_waits_cost_the_frame_its_budget_once); each passes alone, a later full run was 691/0, and main f45165e15 alone failed the alias_cast test in 2 of 3 runs.

Mutations (budget in bounded, PR's test): u32::MAX killed; 2800 (above the 2,729 visits the 5-level DAG needs) killed; 70 survives (any budget between the small case and 2,729 passes, which is the intended slack).

Review: test-only change, no translator output touched. The comment states the visit figures (2,729 without the budget, 64 with it) and they match what the budget removal shows above.

Not covered: the depth-limit path (10 levels) is no longer exercised by this test; another test would have to pin it if wanted.

Verdict: PASS.

AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7351191792 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2969#issuecomment-7351191792). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-12-02T15:56:47Z. --- RUN (independent run on Windows, #2969 head 535c14094, merged locally into `main` f45165e15 with `git merge --no-ff`, as part of a batch of six) The in-game run of the batch is already posted on this pull request; this comment is the test side only (no game data, no game files). **Red:** the claim is that the old test could not fail when the budget is removed. - Reverting #2969 (old test, 10 levels) and setting `let mut budget = 64;` to `u32::MAX` in `Module::bounded` (`opt.rs:464`): `bounded_budget_caps_wide_phi_dag` still passes (1 passed). - With the PR's test (5 levels) and the same mutation it fails (`left: Some(0.0)`, `right: None`). So the test now pins what its name says. **Green** (whole batch, one tree, Windows 11, debug profile as `d3d12.yml` runs it): - `cargo test --workspace --exclude xtask --locked`: 1708 passed, 0 failed, 75 ignored (leonida-gpu lib 691 / 59 ignored, leonida-shader lib 248 / 2 ignored, leonida app 44, leonida-formats 47, leonida-menu 48, leonida-pe 36). - `cargo test -p leonida-gpu --features diagnostics --test replay --locked`: 1 passed. - `cargo test -p xtask --locked`: 7 passed. - Caveat, not from this batch: the leonida-gpu lib fails one test intermittently (3 different ones over 3 full runs of this tree: `texture::alias_cast_tests::committed_and_placed_r32_uint_textures_cast_to_r9g9b9e5_under_legacy_barriers`, `watch::tests::a_write_opens_the_view_it_goes_through`, `pipeline::make::tests::overlapping_waits_cost_the_frame_its_budget_once`); each passes alone, a later full run was 691/0, and `main` f45165e15 alone failed the alias_cast test in 2 of 3 runs. **Mutations** (budget in `bounded`, PR's test): `u32::MAX` killed; `2800` (above the 2,729 visits the 5-level DAG needs) killed; `70` survives (any budget between the small case and 2,729 passes, which is the intended slack). **Review:** test-only change, no translator output touched. The comment states the visit figures (2,729 without the budget, 64 with it) and they match what the budget removal shows above. **Not covered:** the depth-limit path (10 levels) is no longer exercised by this test; another test would have to pin it if wanted. **Verdict: PASS.** AI-assisted (Claude Code).
MoonEyes commented 2026-12-02 15:58:07 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-02T15:58:07Z.


Merging. Head 535c14094 merges cleanly with main 3c106eb2f and does not force a rebase of #2566. In-game gate: batch run of 330 s in the world on main f45165e15 + this head, 0 device lost, 0 exceptions (comment 7349817865). Independent red/green by MoonEyes' agent on head 535c14094 (the new 5-level test fails with an unlimited budget where the old 10-level test passed; 2 of 3 mutations killed, the third is the intended slack), comment 7351191792. CI green incl. no-game-data; Moon gave full autonomy on these batches. Merged by MoonEyes.

AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7351229527 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2969#issuecomment-7351229527). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-12-02T15:58:07Z. --- Merging. Head `535c14094` merges cleanly with `main` `3c106eb2f` and does not force a rebase of #2566. In-game gate: batch run of 330 s in the world on main f45165e15 + this head, 0 device lost, 0 exceptions (comment 7349817865). Independent red/green by MoonEyes' agent on head 535c14094 (the new 5-level test fails with an unlimited budget where the old 10-level test passed; 2 of 3 mutations killed, the third is the intended slack), comment 7351191792. CI green incl. no-game-data; Moon gave full autonomy on these batches. Merged by MoonEyes. AI-assisted (Claude Code).
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!2969
No description provided.