D3D12-GPU-PORT-DESCRIPTORS-BOUNDS-AND-READOPT: bound heap arithmetic and re-adoption #2832

Open
bobcatchris wants to merge 3 commits from upstream-pr/2832 into main
bobcatchris commented 2026-12-01 04:27:32 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by bobcatchris on 2026-12-01T04:27:32Z.


Claim: D3D12-GPU-PORT-DESCRIPTORS-BOUNDS-AND-READOPT (https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7300672712), from zmasi's "open for anyone" finding.

What and why

Three bounds gaps in d3d12/crates/leonida-gpu/src/port_descriptors.rs:

  1. missed() computed ((handle - a.start) >> 16) without a lower or upper check, so a fallback record outside the adopted heap could panic on underflow or index past the writer array. The title-image range check used base + size, which can wrap. Both are now checked against the heap's real slot count and with checked_add.
  2. adopt_now(start, 0) published MARKS.len = 0 and left ADOPTED set, so no later real heap could be adopted. It now rejects an empty heap without publishing anything.
  3. Re-adopting a smaller heap after let_go() could let a store holding an older MARKS.len index past the new, smaller maps. The maps now keep the largest size ever published (MAP_COUNT), while ADOPTED.count remains the actual heap size, so every length a reader could have seen stays in bounds. asked()'s page stepping and copied()'s end and slot arithmetic are checked against wrap as well.

The host-side view/record behaviour is unchanged: this only refuses impossible inputs and keeps allocations at a safe size. No rendering or visual setting changes.

Verification (offline, no game files)

cargo test --locked -p leonida-gpu --lib port_descriptors::tests
  running 9 tests ... test result: ok. 9 passed; 0 failed

cargo clippy --locked -p leonida-gpu --lib   # no new warnings
python -I scripts/check_no_game_data.py d3d12/crates/leonida-gpu/src/port_descriptors.rs
git diff --check                             # clean

Six of the nine tests are new: empty heap is not adopted, maps never shrink below a published length, a writer outside the heap is not indexed, a wrapping copy is not scanned, a slot past the copy or past u64 is not read, and the page step at usize::MAX returns None.

AI-assisted: yes

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5579014261 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2832). Originally posted by [bobcatchris](https://github.com/bobcatchris) on 2026-12-01T04:27:32Z. --- Claim: `D3D12-GPU-PORT-DESCRIPTORS-BOUNDS-AND-READOPT` (https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7300672712), from zmasi's "open for anyone" finding. ## What and why Three bounds gaps in `d3d12/crates/leonida-gpu/src/port_descriptors.rs`: 1. `missed()` computed `((handle - a.start) >> 16)` without a lower or upper check, so a fallback record outside the adopted heap could panic on underflow or index past the writer array. The title-image range check used `base + size`, which can wrap. Both are now checked against the heap's real slot count and with `checked_add`. 2. `adopt_now(start, 0)` published `MARKS.len = 0` and left `ADOPTED` set, so no later real heap could be adopted. It now rejects an empty heap without publishing anything. 3. Re-adopting a smaller heap after `let_go()` could let a store holding an older `MARKS.len` index past the new, smaller maps. The maps now keep the largest size ever published (`MAP_COUNT`), while `ADOPTED.count` remains the actual heap size, so every length a reader could have seen stays in bounds. `asked()`'s page stepping and `copied()`'s end and slot arithmetic are checked against wrap as well. The host-side view/record behaviour is unchanged: this only refuses impossible inputs and keeps allocations at a safe size. No rendering or visual setting changes. ## Verification (offline, no game files) ``` cargo test --locked -p leonida-gpu --lib port_descriptors::tests running 9 tests ... test result: ok. 9 passed; 0 failed cargo clippy --locked -p leonida-gpu --lib # no new warnings python -I scripts/check_no_game_data.py d3d12/crates/leonida-gpu/src/port_descriptors.rs git diff --check # clean ``` Six of the nine tests are new: empty heap is not adopted, maps never shrink below a published length, a writer outside the heap is not indexed, a wrapping copy is not scanned, a slot past the copy or past `u64` is not read, and the page step at `usize::MAX` returns `None`. AI-assisted: yes
KelboLive commented 2026-12-01 04:52:08 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by KelboLive on 2026-12-01T04:52:08Z.

Review: COMMENTED


The bounds themselves are right and match #2833's idiom: writer_index's underflow check and upper bound plus .get (port_descriptors.rs:139-147), copy_span's two checked ends (:150-157), slot_word's checked slot start (:159-162), the empty-heap refusal in adopt_now, and maps sized to MAP_COUNT. cargo test --locked -p leonida-gpu --lib port_descriptors::tests is 9/9 here.

But re-adoption now publishes a length larger than the current count, and take slices with the current count (:266-274):

let first = c * CHUNK;
for (i, slot) in a.slots[first..(first + CHUNK).min(a.count)]

After a big heap is let go and a smaller one adopted, a mark in a chunk at or past count gives an inverted range. That is not hypothetical: MARKS.len is now max*32, so mark() / copied() accept a handle in [start + count*32, start + len) — the very case the MAP_COUNT comment is about. Reproduced (temporary test, reverted):

adopt_now(0x3000_0000, 1000); let_go; adopt_now(0x4000_0000, 4); mark(start + 200*32); take(start)
panicked at crates\leonida-gpu\src\port_descriptors.rs:273:33: slice index starts at 128 but ends at 4

The aside thread contains it (descriptor.rs:259) and the round completes, but LEONIDA_HEAP_SYNC_ASIDE=0 calls sync_heaps on the title's thread with no catch_unwind (:213-214, and :265 when the thread fails to start). Because take clears the chunk bit before slicing, the panic also drops the runs already collected and leaves those slots marked-but-never-taken.

Fix: continue when first >= a.count, and bound mark/copied by the current count as well as MARKERS.len.

Two smaller things:

  • The headline fix's use is untested: replacing let maps = map_count(count, MAP_COUNT.load(Relaxed)); with let maps = count; (the old out-of-bounds behaviour) leaves all 9 tests green — the new test only covers the map_count helper. A test that adopts big, let_gos, adopts small and asserts MARKS.len stays the big length would pin it.
  • slot_word's at + 4 <= hi is the one unchecked add left (at.checked_add(4)), the same shape #2833 checks; near u64::MAX it wraps to a wild read in release.
<!-- greyfinch-sync:ubiquitarianism/leonida:review:6125336271 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2832#pullrequestreview-6125336271). Originally posted by [KelboLive](https://github.com/KelboLive) on 2026-12-01T04:52:08Z. **Review:** COMMENTED --- The bounds themselves are right and match #2833's idiom: `writer_index`'s underflow check and upper bound plus `.get` (`port_descriptors.rs:139-147`), `copy_span`'s two checked ends (`:150-157`), `slot_word`'s checked slot start (`:159-162`), the empty-heap refusal in `adopt_now`, and maps sized to `MAP_COUNT`. `cargo test --locked -p leonida-gpu --lib port_descriptors::tests` is 9/9 here. But re-adoption now publishes a length larger than the current `count`, and `take` slices with the **current** count (`:266-274`): ``` let first = c * CHUNK; for (i, slot) in a.slots[first..(first + CHUNK).min(a.count)] ``` After a big heap is let go and a smaller one adopted, a mark in a chunk at or past `count` gives an inverted range. That is not hypothetical: `MARKS.len` is now `max*32`, so `mark()` / `copied()` accept a handle in `[start + count*32, start + len)` — the very case the `MAP_COUNT` comment is about. Reproduced (temporary test, reverted): ``` adopt_now(0x3000_0000, 1000); let_go; adopt_now(0x4000_0000, 4); mark(start + 200*32); take(start) panicked at crates\leonida-gpu\src\port_descriptors.rs:273:33: slice index starts at 128 but ends at 4 ``` The aside thread contains it (`descriptor.rs:259`) and the round completes, but `LEONIDA_HEAP_SYNC_ASIDE=0` calls `sync_heaps` on the title's thread with no `catch_unwind` (`:213-214`, and `:265` when the thread fails to start). Because `take` clears the chunk bit before slicing, the panic also drops the runs already collected and leaves those slots marked-but-never-taken. Fix: `continue` when `first >= a.count`, and bound `mark`/`copied` by the current count as well as `MARKERS.len`. Two smaller things: - The headline fix's *use* is untested: replacing `let maps = map_count(count, MAP_COUNT.load(Relaxed));` with `let maps = count;` (the old out-of-bounds behaviour) leaves all 9 tests green — the new test only covers the `map_count` helper. A test that adopts big, `let_go`s, adopts small and asserts `MARKS.len` stays the big length would pin it. - `slot_word`'s `at + 4 <= hi` is the one unchecked add left (`at.checked_add(4)`), the same shape #2833 checks; near `u64::MAX` it wraps to a wild read in release.
fiestorra commented 2026-12-01 04:52:23 +00:00 (Migrated from github.com)

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


Verified on Windows: the crate is green with it, and it adds 5 tests - measured against main's own file, which is 591.

main 5dd6d444f, cherry-picked (one commit, merge-base 86c30fcea), cargo 1.98.1:

cargo test -p leonida-gpu --lib with this pull request: ok. 596 passed; 0 failed; 53 ignored with port_descriptors.rs from main: ok. 591 passed; 0 failed; 53 ignored

So the change is tied to its tests and nothing else in the crate moved. That is an existence control - I did not break the code to watch a specific test fail, because the tests that come with it are the ones that would. Whoever knows what los bounds y la re-adopcion guards should say whether removing it makes one of them fail; I can say the crate passes and 5 tests arrive.

What I could not test: anything that needs a card doing the thing. These are the descriptor and queue paths, and this machine has a 4090 but not the title that exercises los bounds y la re-adopcion end to end - the unit tests are what I ran, and they are green.

AI-assisted: yes - DeepSeek v4.1 (flash), both arms on the machine above.

Written with an AI assistant.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7301189288 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2832#issuecomment-7301189288). Originally posted by [fiestorra](https://github.com/fiestorra) on 2026-12-01T04:52:23Z. --- **Verified on Windows: the crate is green with it, and it adds 5 tests - measured against `main`'s own file, which is 591.** **`main` `5dd6d444f`, cherry-picked (one commit, merge-base `86c30fcea`), `cargo 1.98.1`:** ` cargo test -p leonida-gpu --lib with this pull request: ok. 596 passed; 0 failed; 53 ignored with port_descriptors.rs from main: ok. 591 passed; 0 failed; 53 ignored ` **So the change is tied to its tests and nothing else in the crate moved.** **That is an existence control** - **I did not break the code to watch a specific test fail, because the tests that come with it are the ones that would.** **Whoever knows what los bounds y la re-adopcion guards should say whether removing it makes one of them fail; I can say the crate passes and 5 tests arrive.** **What I could not test**: **anything that needs a card doing the thing**. **These are the descriptor and queue paths, and this machine has a 4090 but not the title that exercises los bounds y la re-adopcion end to end** - **the unit tests are what I ran, and they are green.** **AI-assisted:** yes - DeepSeek v4.1 (flash), both arms on the machine above. Written with an AI assistant.
MoonEyes commented 2026-12-01 15:20:39 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-01T15:20:39Z.


bacf71fad: take() no longer slices past a heap smaller than the maps (adopt 1000, let go, adopt 4, mark slot 200: "slice index starts at 128 but ends at 4"); slot_word uses a checked add. The existing test covers it and fails without the change. On main cd0c52fcf: 636 passed, 0 failed.

Pushed to your branch by MoonEyes (maintainer, the branch allows it), on top of your head, nothing rewritten. Say so if you would rather have it another way, and I take it out. The earlier verdicts are for the head before this one.

AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7315752368 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2832#issuecomment-7315752368). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-12-01T15:20:39Z. --- `bacf71fad`: `take()` no longer slices past a heap smaller than the maps (adopt 1000, let go, adopt 4, mark slot 200: "slice index starts at 128 but ends at 4"); `slot_word` uses a checked add. The existing test covers it and fails without the change. On `main` `cd0c52fcf`: 636 passed, 0 failed. Pushed to your branch by MoonEyes (maintainer, the branch allows it), on top of your head, nothing rewritten. Say so if you would rather have it another way, and I take it out. The earlier verdicts are for the head before this one. AI-assisted (Claude Code).
bobcatchris commented 2026-12-01 18:25:53 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by bobcatchris on 2026-12-01T18:25:53Z.


@MoonEyes Thanks for bacf71fad — kept it as-is and merged current main (0c861595a, no rebase/force-push) to clear the unrelated Python CI failures from the older base.

  • Verified locally on Windows (Rust 1.98.1): cargo test --locked -p leonida-gpu --lib port_descriptors::tests (9 passed, 0 failed).

AI-assisted: Gemini 4 Neon.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7320933738 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2832#issuecomment-7320933738). Originally posted by [bobcatchris](https://github.com/bobcatchris) on 2026-12-01T18:25:53Z. --- @MoonEyes Thanks for `bacf71fad` — kept it as-is and merged current `main` (`0c861595a`, no rebase/force-push) to clear the unrelated Python CI failures from the older base. - Verified locally on Windows (Rust 1.98.1): `cargo test --locked -p leonida-gpu --lib port_descriptors::tests` (9 passed, 0 failed). AI-assisted: Gemini 4 Neon.
MoonEyes commented 2026-12-02 12:28:03 +00:00 (Migrated from github.com)

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


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:7345382718 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2832#issuecomment-7345382718). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-12-02T12:28:03Z. --- 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 18:21:23 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-02T18:21:23Z.


RUN (in game, batch of seventeen render-path pull requests), each head merged with git merge --no-ff onto main 3c106eb2f, in one build: #3111 15b579756, #2948 5284c6eae, #2698 1f188c4f7, #2946 44bf554fe, #3001 d924cbb65, #2832 0c861595a, #2915 58e8535cf, #2822 d359a2f85, #2896 c9c6b103d, #2983 8278ef1b9, #3115 ba5121192, #2945 d2c08c14f, #2975 74512d658, #2951 26da88e8e, #2800 b6ebcedd4, #2893 7c7e99b48, #3113 fa1460b6b (and #3097 0d7a451ab, merged since). 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 (43 samples) median 14.6, mean 12.7
Rendered fps, last 120 s median 13.7
Time under 5 fps in the world 13 % (short drops, lowest sample 0.3 fps)

The drops under 5 fps line up with shaders being translated while walking (about 500 translations in the last 330 s): this batch changes the shader translation, so the shader cache built by earlier runs did not apply and the pipeline precompile alone took about 45 minutes. The batch-5 run on the same machine and route had no sample under 5 fps (median 16.4). I read this as cold-cache stutter, not as a regression of a single pull request, but this run cannot tell them apart.

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. If one of these pull requests changes its head, this run no longer covers it.

Limits: one run; arrival in the world was driven by keys and not checked on pictures. A first attempt of this batch is not counted: the run script gave up waiting for the game window after 40 minutes of precompile.

AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7354434708 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2832#issuecomment-7354434708). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-12-02T18:21:23Z. --- RUN (in game, batch of seventeen render-path pull requests), each head merged with `git merge --no-ff` onto main `3c106eb2f`, in one build: #3111 `15b579756`, #2948 `5284c6eae`, #2698 `1f188c4f7`, #2946 `44bf554fe`, #3001 `d924cbb65`, #2832 `0c861595a`, #2915 `58e8535cf`, #2822 `d359a2f85`, #2896 `c9c6b103d`, #2983 `8278ef1b9`, #3115 `ba5121192`, #2945 `d2c08c14f`, #2975 `74512d658`, #2951 `26da88e8e`, #2800 `b6ebcedd4`, #2893 `7c7e99b48`, #3113 `fa1460b6b` (and #3097 `0d7a451ab`, merged since). 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 (43 samples) | median 14.6, mean 12.7 | | Rendered fps, last 120 s | median 13.7 | | Time under 5 fps in the world | 13 % (short drops, lowest sample 0.3 fps) | The drops under 5 fps line up with shaders being translated while walking (about 500 translations in the last 330 s): this batch changes the shader translation, so the shader cache built by earlier runs did not apply and the pipeline precompile alone took about 45 minutes. The batch-5 run on the same machine and route had no sample under 5 fps (median 16.4). I read this as cold-cache stutter, not as a regression of a single pull request, but this run cannot tell them apart. 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. If one of these pull requests changes its head, this run no longer covers it. Limits: one run; arrival in the world was driven by keys and not checked on pictures. A first attempt of this batch is not counted: the run script gave up waiting for the game window after 40 minutes of precompile. AI-assisted (Claude Code).
MoonEyes commented 2026-12-02 18:29:41 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-02T18:29:41Z.


Verification of #2832 (D3D12-GPU-PORT-DESCRIPTORS-BOUNDS-AND-READOPT): third-party code review on Linux x86_64. The code was not built: leonida-gpu is Windows-only (cargo test -p leonida-gpu --lib does not compile on Linux).

  • Head: 0c861595a, merge base 27613ab6b. It merges cleanly into main 45dc41f95. Diff: d3d12/crates/leonida-gpu/src/port_descriptors.rs, +108/-13. CI passes on this head (6/6).

Review

  • adopt_now returning early for count == 0 (L176-180) fixes the problem the test describes. On main, an empty heap published MARKS.len = 0 and then blocked every later adoption.
  • MAP_COUNT (L130) keeps the maps from shrinking. A patched store may have loaded an older MARKS.len; with this change it can no longer index past a newer, smaller map. MARKS.len is now published as maps * 32 (L200), and take limits each chunk to a.count (L275). Marks past the real heap are therefore set, but never reported. This is sound.
  • writer_index, copy_span, slot_word and next_page replace arithmetic that could wrap with checked arithmetic. Each one has a unit test.
  • Minor points, not blocking:
    • Slot marks past a.count are never cleared within one adoption. The maps are leaked per adoption, so the cost is memory only.
    • Every adoption now leaks at least the largest map seen so far, so repeated adopt and release cycles leak more than on main. The amount is still bounded at a few MB per adoption.
    • Each take walks maps / CHUNK chunks instead of count / CHUNK.
  • python -I scripts/check_no_game_data.py on the changed file: clean.

Status: the Windows verification above (fiestorra) is on an earlier head. The current head adds MoonEyes' bacf71fad and a merge of main. The in-game run on the current head that the maintainer asked for is not posted yet.

Verdict: ready on code review (not built here: Windows-only). It still needs the in-game run on 0c861595a.

AI-assisted verification: Claude Opus (Claude Code), separate agent per batch.


Generated by Claude Code

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7354680703 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2832#issuecomment-7354680703). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-12-02T18:29:41Z. --- **Verification of #2832 (D3D12-GPU-PORT-DESCRIPTORS-BOUNDS-AND-READOPT)**: third-party code review on Linux x86_64. The code was not built: `leonida-gpu` is Windows-only (`cargo test -p leonida-gpu --lib` does not compile on Linux). - Head: `0c861595a`, merge base `27613ab6b`. It merges cleanly into `main` `45dc41f95`. Diff: `d3d12/crates/leonida-gpu/src/port_descriptors.rs`, +108/-13. CI passes on this head (6/6). **Review** - `adopt_now` returning early for `count == 0` (L176-180) fixes the problem the test describes. On `main`, an empty heap published `MARKS.len = 0` and then blocked every later adoption. - `MAP_COUNT` (L130) keeps the maps from shrinking. A patched store may have loaded an older `MARKS.len`; with this change it can no longer index past a newer, smaller map. `MARKS.len` is now published as `maps * 32` (L200), and `take` limits each chunk to `a.count` (L275). Marks past the real heap are therefore set, but never reported. This is sound. - `writer_index`, `copy_span`, `slot_word` and `next_page` replace arithmetic that could wrap with checked arithmetic. Each one has a unit test. - Minor points, not blocking: - Slot marks past `a.count` are never cleared within one adoption. The maps are leaked per adoption, so the cost is memory only. - Every adoption now leaks at least the largest map seen so far, so repeated adopt and release cycles leak more than on `main`. The amount is still bounded at a few MB per adoption. - Each `take` walks `maps / CHUNK` chunks instead of `count / CHUNK`. - `python -I scripts/check_no_game_data.py` on the changed file: clean. **Status:** the Windows verification above (fiestorra) is on an earlier head. The current head adds MoonEyes' `bacf71fad` and a merge of `main`. The in-game run on the current head that the maintainer asked for is not posted yet. **Verdict:** ready on code review (not built here: Windows-only). It still needs the in-game run on `0c861595a`. AI-assisted verification: Claude Opus (Claude Code), separate agent per batch. --- _Generated by [Claude Code](https://claude.ai/code)_
bobcatchris commented 2026-12-02 21:02:09 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by bobcatchris on 2026-12-02T21:02:09Z.


@MoonEyes @KelboLive Thanks for the reviews!

  • Confirming bacf71fad addressed @KelboLive's take() inverted-range slice panic and checked slot_word arithmetic.
  • Note for @MoonEyes's 18:29:41Z triage note: exact head 0c861595a is already covered by @MoonEyes's 2026-12-02T18:21:23Z in-game batch PASS (330 s, RTX 4060, main 3c106eb2f), so 0c861595a is intentionally left untouched.

AI-assisted: Gemini 4 Neon

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7358694309 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2832#issuecomment-7358694309). Originally posted by [bobcatchris](https://github.com/bobcatchris) on 2026-12-02T21:02:09Z. --- @MoonEyes @KelboLive Thanks for the reviews! - Confirming `bacf71fad` addressed `@KelboLive`'s `take()` inverted-range slice panic and checked `slot_word` arithmetic. - Note for `@MoonEyes`'s `18:29:41Z` triage note: exact head `0c861595a` is already covered by `@MoonEyes`'s `2026-12-02T18:21:23Z` in-game batch PASS (330 s, RTX 4060, main `3c106eb2f`), so `0c861595a` is intentionally left untouched. AI-assisted: Gemini 4 Neon
MoonEyes commented 2026-12-03 17:39:45 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-03T17:39:45Z.


In-game gate run on an RTX 4060 8 GB (driver 610.88, Windows 11), in a batch of #2840, #2833, #2832 and #2831 merged into main 09273248c; this PR tested at its current head 0c861595a. Series S 1080, DLSS FG 2x, play-nvidia.ps1 -SeriesS -Resolution 1080 -FrameGen 2 -PrecompileUsed, scripted walk, 330 s, screen kept on.

  • Result: PASS. No device lost, no crash, no unhandled exception; the run ended on its time limit.
  • Median over the last 240 s: 15.4 fps (main alone today: 15.8-17.5; the batch before this one on the same main gave 15.8); 23.3 frames per 1000 over 100 ms.
  • Covered: a normal launch and walk with this PR's code in the build. It does not isolate this PR's own change from the three others in the batch.

AI-assisted (Claude Opus 5.5), run and read by MoonEyes' agent.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7386865334 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2832#issuecomment-7386865334). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-12-03T17:39:45Z. --- In-game gate run on an RTX 4060 8 GB (driver 610.88, Windows 11), in a batch of #2840, #2833, #2832 and #2831 merged into main `09273248c`; this PR tested at its current head `0c861595a`. Series S 1080, DLSS FG 2x, `play-nvidia.ps1 -SeriesS -Resolution 1080 -FrameGen 2 -PrecompileUsed`, scripted walk, 330 s, screen kept on. - Result: **PASS**. No device lost, no crash, no unhandled exception; the run ended on its time limit. - Median over the last 240 s: 15.4 fps (main alone today: 15.8-17.5; the batch before this one on the same main gave 15.8); 23.3 frames per 1000 over 100 ms. - Covered: a normal launch and walk with this PR's code in the build. It does not isolate this PR's own change from the three others in the batch. AI-assisted (Claude Opus 5.5), run and read by MoonEyes' agent.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/2832:upstream-pr/2832'
git switch 'upstream-pr/2832'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/2832'
git switch 'upstream-pr/2832'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/2832'
git switch 'upstream-pr/2832'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/2832'
git switch 'main'
git merge --squash 'upstream-pr/2832'
git switch 'main'
git merge --ff-only 'upstream-pr/2832'
git switch 'main'
git merge 'upstream-pr/2832'
git push origin 'main'
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!2832
No description provided.