docs: document LEONIDA_RNG_SEED in runtime/README.md (OLD-9895) #1823

Merged
Ch1mpleo merged 2 commits from upstream-pr/1823 into main 2026-11-29 21:13:06 +00:00
Ch1mpleo commented 2026-11-25 12:35:31 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Ch1mpleo on 2026-11-25T12:35:31Z.


Claimed in the coordination issue as: OLD-9895 (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7162576260)

What and why

Carries forward old-pr/9895 (draft #163, preserving
eoisg8's original commit) rebased onto current main. Documents LEONIDA_RNG_SEED in
untime/README.md.

Tested

  • python -I tests/test_docs_repeated_lines.py — 2 tests, OK (Windows 11 x64, Python 3.14.7).
  • python -I scripts/check_no_game_data.py runtime/README.md — exit 0.

GPUs tested: n/a (documentation only)

AI-assisted: yes

Checklist

  • Based on current main and merges cleanly (a conflicting pull request is labeled
    eeds 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 — documentation only)
<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5491430046 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1823). Originally posted by [Ch1mpleo](https://github.com/Ch1mpleo) on 2026-11-25T12:35:31Z. --- Claimed in the coordination issue as: OLD-9895 (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7162576260) ### What and why Carries forward old-pr/9895 (draft #163, preserving eoisg8's original commit) rebased onto current main. Documents LEONIDA_RNG_SEED in untime/README.md. ### Tested - python -I tests/test_docs_repeated_lines.py — 2 tests, OK (Windows 11 x64, Python 3.14.7). - python -I scripts/check_no_game_data.py runtime/README.md — exit 0. GPUs tested: n/a (documentation only) AI-assisted: yes ### Checklist - [x] Based on current main and merges cleanly (a conflicting pull request is labeled eeds 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 — documentation only)
MSedgeMC commented 2026-11-25 19:00:02 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MSedgeMC on 2026-11-25T19:00:02Z.

Review: APPROVED


Verified: the documented LEONIDA_RNG_SEED behaviour matches runtime/shims/bcrypt_rng.cpp — source handles the env var as uint64 decimal/0x hex (line 80), implements next_splitmix64() (line 93), dynamically loads host BCryptGenRandom with SystemFunction036 fallback (lines 73/76), and exports BCryptGenRandom in the shim table (line 229). docs test suite on main: python3 -m unittest discover -s tests -p 'test_docs_*.py' -> 47 tests OK. Docs-only, no game data.

<!-- greyfinch-sync:ubiquitarianism/leonida:review:6063314815 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1823#pullrequestreview-6063314815). Originally posted by [MSedgeMC](https://github.com/MSedgeMC) on 2026-11-25T19:00:02Z. **Review:** APPROVED --- Verified: the documented LEONIDA_RNG_SEED behaviour matches runtime/shims/bcrypt_rng.cpp — source handles the env var as uint64 decimal/0x hex (line 80), implements next_splitmix64() (line 93), dynamically loads host BCryptGenRandom with SystemFunction036 fallback (lines 73/76), and exports BCryptGenRandom in the shim table (line 229). docs test suite on main: python3 -m unittest discover -s tests -p 'test_docs_*.py' -> 47 tests OK. Docs-only, no game data.
MSedgeMC commented 2026-11-25 19:00:13 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MSedgeMC on 2026-11-25T19:00:13Z.

Review: COMMENTED


One factual correction to my approval: the new doc says the shim delegates to host ProcessPrng, BCryptGenRandom or SystemFunction036, but finds no occurrence anywhere in that directory. runtime/shims/bcrypt_rng.cpp itself loads only host BCryptGenRandom (line 73) and SystemFunction036 (line 76). Please drop ProcessPrng from that sentence (or point to the code that provides it) — the rest of the documentation is verified and correct.

<!-- greyfinch-sync:ubiquitarianism/leonida:review:6063317028 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1823#pullrequestreview-6063317028). Originally posted by [MSedgeMC](https://github.com/MSedgeMC) on 2026-11-25T19:00:13Z. **Review:** COMMENTED --- One factual correction to my approval: the new doc says the shim delegates to host ProcessPrng, BCryptGenRandom or SystemFunction036, but finds no occurrence anywhere in that directory. runtime/shims/bcrypt_rng.cpp itself loads only host BCryptGenRandom (line 73) and SystemFunction036 (line 76). Please drop ProcessPrng from that sentence (or point to the code that provides it) — the rest of the documentation is verified and correct.
Ch1mpleo commented 2026-11-25 19:36:51 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Ch1mpleo on 2026-11-25T19:36:51Z.


Thanks @MSedgeMC — dropped \ProcessPrng\ from the \crypt.dll\ note in
untime/README.md\ so it matches \shims/bcrypt_rng.cpp\ (\BCryptGenRandom\ / \SystemFunction036).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7172538123 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1823#issuecomment-7172538123). Originally posted by [Ch1mpleo](https://github.com/Ch1mpleo) on 2026-11-25T19:36:51Z. --- Thanks @MSedgeMC — dropped \ProcessPrng\ from the \crypt.dll\ note in \ untime/README.md\ so it matches \shims/bcrypt_rng.cpp\ (\BCryptGenRandom\ / \SystemFunction036\).
zmasi commented 2026-11-28 23:01:18 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by zmasi on 2026-11-28T23:01:18Z.


Native Windows 11 Verification (2f7ec7c58c) — PASS

Diff-audited runtime/README.md (+5/-0) and verified merged onto origin/main (adfb3821a2) on Windows 11 (10.0.26200, Python 3.12.10 with -I).

Results

  • Baseline vs PR (runtime/README.md + runtime/shims/bcrypt_rng.cpp):
    • On origin/main, LEONIDA_RNG_SEED already has a dedicated subsection (### Repeatable random bytes: LEONIDA_RNG_SEED), but bcrypt.dll (shims/bcrypt_rng.cpp) was missing from the ## Shims inventory list (xmem.dll, kernel32.dll, d3d12_xs.dll, dstorage_xs.dll, gameinput.dll).
    • Merging #1823 adds the missing - bcrypt.dll entry to ## Shims accurately describing host BCryptGenRandom / SystemFunction036 delegation and deterministic splitmix64 seeding via LEONIDA_RNG_SEED (decimal or 0x hex), matching runtime/shims/bcrypt_rng.cpp:79-98.
    • Minor non-blocking note: runtime/shims/bcrypt_rng.cpp also shims BCryptOpenAlgorithmProvider and BCryptCloseAlgorithmProvider (handle tracking + STATUS_INVALID_HANDLE guard) in addition to BCryptGenRandom, in case you want to name all three exports in the bullet header.
  • Documentation & Hygiene Suites (PR #1823 merged onto origin/main):
    • python -I tests/test_docs_env_vars.py: Ran 5 tests in 15.186s — OK
    • python -I tests/test_docs_links.py: Ran 17 tests in 0.679s — OK
    • python -I tests/test_docs_repo_paths.py: Ran 5 tests in 0.415s — OK
    • python -I tests/test_docs_list_items.py: Ran 3 tests in 0.623s — OK
    • python -I tests/test_docs_encoding.py: Ran 1 test in 0.024s — OK
    • python -I scripts/check_no_game_data.py & tests/test_text_write_line_endings.py (3/3): OK.

AI-assisted.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7247143613 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1823#issuecomment-7247143613). Originally posted by [zmasi](https://github.com/zmasi) on 2026-11-28T23:01:18Z. --- ### Native Windows 11 Verification (`2f7ec7c58c`) — PASS Diff-audited `runtime/README.md` (`+5/-0`) and verified merged onto `origin/main` (`adfb3821a2`) on Windows 11 (`10.0.26200`, Python `3.12.10` with `-I`). #### Results - **Baseline vs PR (`runtime/README.md` + `runtime/shims/bcrypt_rng.cpp`)**: - On `origin/main`, `LEONIDA_RNG_SEED` already has a dedicated subsection (`### Repeatable random bytes: LEONIDA_RNG_SEED`), **but** `bcrypt.dll` (`shims/bcrypt_rng.cpp`) was missing from the `## Shims` inventory list (`xmem.dll`, `kernel32.dll`, `d3d12_xs.dll`, `dstorage_xs.dll`, `gameinput.dll`). - Merging `#1823` adds the missing `- bcrypt.dll` entry to `## Shims` accurately describing host `BCryptGenRandom` / `SystemFunction036` delegation and deterministic `splitmix64` seeding via `LEONIDA_RNG_SEED` (decimal or `0x` hex), matching `runtime/shims/bcrypt_rng.cpp:79-98`. - *Minor non-blocking note*: `runtime/shims/bcrypt_rng.cpp` also shims `BCryptOpenAlgorithmProvider` and `BCryptCloseAlgorithmProvider` (handle tracking + `STATUS_INVALID_HANDLE` guard) in addition to `BCryptGenRandom`, in case you want to name all three exports in the bullet header. - **Documentation & Hygiene Suites (`PR #1823` merged onto `origin/main`)**: - `python -I tests/test_docs_env_vars.py`: **`Ran 5 tests in 15.186s — OK`** - `python -I tests/test_docs_links.py`: **`Ran 17 tests in 0.679s — OK`** - `python -I tests/test_docs_repo_paths.py`: **`Ran 5 tests in 0.415s — OK`** - `python -I tests/test_docs_list_items.py`: **`Ran 3 tests in 0.623s — OK`** - `python -I tests/test_docs_encoding.py`: **`Ran 1 test in 0.024s — OK`** - `python -I scripts/check_no_game_data.py` & `tests/test_text_write_line_endings.py` (`3/3`): **`OK`**. AI-assisted.
TheGeogeo commented 2026-11-29 02:17:06 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by TheGeogeo on 2026-11-29T02:17:06Z.


Tested 2f7ec7c58 merged (no commit) with main 53b77df14. GPUs tested: NVIDIA GeForce RTX 3080, driver 621.40, Windows 11 10.0.26300; MSVC 19.52 (Visual Studio 18), Ninja, RelWithDebInfo; Python 3.12.4. check_no_game_data.py is clean.

  • Already in main: runtime/README.md on main already has a section on this variable (### Repeatable random bytes: LEONIDA_RNG_SEED, lines 135-139), with the format, the seed parsing and the [rt] bcrypt: deterministic LEONIDA_RNG_SEED enabled line. docs/history/old-pr.tsv records it as the old PR 9895 with this same title. Merging this would describe the variable twice.
  • Suggest closing it, with the author's consent.

AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7249329070 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1823#issuecomment-7249329070). Originally posted by [TheGeogeo](https://github.com/TheGeogeo) on 2026-11-29T02:17:06Z. --- Tested `2f7ec7c58` merged (no commit) with `main` `53b77df14`. GPUs tested: NVIDIA GeForce RTX 3080, driver 621.40, Windows 11 10.0.26300; MSVC 19.52 (Visual Studio 18), Ninja, RelWithDebInfo; Python 3.12.4. `check_no_game_data.py` is clean. - **Already in `main`:** `runtime/README.md` on `main` already has a section on this variable (`### Repeatable random bytes: LEONIDA_RNG_SEED`, lines 135-139), with the format, the seed parsing and the `[rt] bcrypt: deterministic LEONIDA_RNG_SEED enabled` line. `docs/history/old-pr.tsv` records it as the old PR 9895 with this same title. Merging this would describe the variable twice. - Suggest closing it, with the author's consent. AI-assisted (Claude Code).
OreoFR commented 2026-11-29 19:52:58 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-11-29T19:52:58Z.


Verified by OreoFR on macOS 27.2.1 (26B131), Apple M5, APFS, Python 3.12.16, main 0e8737f2a (merges cleanly; does not force a rebase of #2566 at cfd12b24f), PR head 2f7ec7c58 : docs only, doc tests green

  • Doc tests on main and on the merge: the 13 tests/test_docs_*.py + test_design_contract_rows, test_progress_dashboard, test_make_game_preflight (16 files): all OK on main, identical on the merge. Docs-only change, so no red is possible.
  • Diff: runtime/README.md documents LEONIDA_RNG_SEED (64-bit decimal or 0x seed switching the RNG to deterministic splitmix64; default stays BCryptGenRandom / SystemFunction036). No game data.

Verdict: READY (docs only)

AI-assisted: Claude Code

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7261634459 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1823#issuecomment-7261634459). Originally posted by [OreoFR](https://github.com/OreoFR) on 2026-11-29T19:52:58Z. --- Verified by OreoFR on macOS 27.2.1 (26B131), Apple M5, APFS, Python 3.12.16, main 0e8737f2a (merges cleanly; does not force a rebase of #2566 at cfd12b24f), PR head 2f7ec7c58 : docs only, doc tests green - Doc tests on main and on the merge: the 13 `tests/test_docs_*.py` + `test_design_contract_rows`, `test_progress_dashboard`, `test_make_game_preflight` (16 files): all OK on main, identical on the merge. Docs-only change, so no red is possible. - Diff: `runtime/README.md` documents `LEONIDA_RNG_SEED` (64-bit decimal or `0x` seed switching the RNG to deterministic splitmix64; default stays `BCryptGenRandom` / `SystemFunction036`). No game data. **Verdict: READY** (docs only) AI-assisted: Claude Code
MoonEyes commented 2026-11-29 21:13:02 +00:00 (Migrated from github.com)

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


Merging. Head 2f7ec7c58 has red/green verdicts from reviewers other than the author (above), merges cleanly with main 345da0378, does not force a rebase of #2566, and carries a claim ID. Remaining main CI reds (translator-tests mesh, semantic-tests f16) are pre-existing. Merged by MoonEyes.

AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7262698289 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1823#issuecomment-7262698289). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-11-29T21:13:02Z. --- Merging. Head `2f7ec7c58` has red/green verdicts from reviewers other than the author (above), merges cleanly with `main` `345da0378`, does not force a rebase of #2566, and carries a claim ID. Remaining main CI reds (`translator-tests` mesh, `semantic-tests` f16) are pre-existing. 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!1823
No description provided.