docs: document LEONIDA_RNG_SEED in runtime/README.md (OLD-9895) #1823
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1823"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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
GPUs tested: n/a (documentation only)
AI-assisted: yes
Checklist
eeds rebase).
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.
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.
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).
Imported from ubiquitarianism/leonida. Originally posted by zmasi on 2026-11-28T23:01:18Z.
Native Windows 11 Verification (
2f7ec7c58c) — PASSDiff-audited
runtime/README.md(+5/-0) and verified merged ontoorigin/main(adfb3821a2) on Windows 11 (10.0.26200, Python3.12.10with-I).Results
runtime/README.md+runtime/shims/bcrypt_rng.cpp):origin/main,LEONIDA_RNG_SEEDalready has a dedicated subsection (### Repeatable random bytes: LEONIDA_RNG_SEED), butbcrypt.dll(shims/bcrypt_rng.cpp) was missing from the## Shimsinventory list (xmem.dll,kernel32.dll,d3d12_xs.dll,dstorage_xs.dll,gameinput.dll).#1823adds the missing- bcrypt.dllentry to## Shimsaccurately describing hostBCryptGenRandom/SystemFunction036delegation and deterministicsplitmix64seeding viaLEONIDA_RNG_SEED(decimal or0xhex), matchingruntime/shims/bcrypt_rng.cpp:79-98.runtime/shims/bcrypt_rng.cppalso shimsBCryptOpenAlgorithmProviderandBCryptCloseAlgorithmProvider(handle tracking +STATUS_INVALID_HANDLEguard) in addition toBCryptGenRandom, in case you want to name all three exports in the bullet header.PR #1823merged ontoorigin/main):python -I tests/test_docs_env_vars.py:Ran 5 tests in 15.186s — OKpython -I tests/test_docs_links.py:Ran 17 tests in 0.679s — OKpython -I tests/test_docs_repo_paths.py:Ran 5 tests in 0.415s — OKpython -I tests/test_docs_list_items.py:Ran 3 tests in 0.623s — OKpython -I tests/test_docs_encoding.py:Ran 1 test in 0.024s — OKpython -I scripts/check_no_game_data.py&tests/test_text_write_line_endings.py(3/3):OK.AI-assisted.
Imported from ubiquitarianism/leonida. Originally posted by TheGeogeo on 2026-11-29T02:17:06Z.
Tested
2f7ec7c58merged (no commit) withmain53b77df14. 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.pyis clean.main:runtime/README.mdonmainalready 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 enabledline.docs/history/old-pr.tsvrecords it as the old PR 9895 with this same title. Merging this would describe the variable twice.AI-assisted (Claude Code).
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 atcfd12b24f), PR head2f7ec7c58: docs only, doc tests greentests/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.runtime/README.mddocumentsLEONIDA_RNG_SEED(64-bit decimal or0xseed switching the RNG to deterministic splitmix64; default staysBCryptGenRandom/SystemFunction036). No game data.Verdict: READY (docs only)
AI-assisted: Claude Code
Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-29T21:13:02Z.
Merging. Head
2f7ec7c58has red/green verdicts from reviewers other than the author (above), merges cleanly withmain345da0378, does not force a rebase of #2566, and carries a claim ID. Remaining main CI reds (translator-testsmesh,semantic-testsf16) are pre-existing. Merged by MoonEyes.AI-assisted (Claude Code).