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

Merged
leonida/mandy
Ch1mpleo merged 2 commits from carry/old-9895 into main 2026-11-29 21:13:06 +00:00

Pull request successfully merged and closed

Ch1mpleo commented 2026-11-25 12:35:31 +00:00

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)
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 approved these changes 2026-11-25 19:00:02 +00:00
MSedgeMC left a comment

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.

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 reviewed 2026-11-25 19:00:13 +00:00
MSedgeMC left a comment
No description provided.
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

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

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

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.

### 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

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

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

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

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

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

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 description provided.