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

Open
github-bot wants to merge 2 commits from github-bot/gh-1823 into main AGit
Owner

@⁠Ch1mpleo on GitHub · 2026-11-25 12:35 UTC · original
Ch1mpleo:carry/old-9895 → main · +5 −0 · 1 files · 2 commits · open

Claimed in the coordination issue as: OLD-9895 (#1608)

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)
**@⁠Ch1mpleo** on GitHub · 2026-11-25 12:35 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1823) `Ch1mpleo:carry/old-9895` → `main` · +5 −0 · 1 files · 2 commits · open Claimed in the coordination issue as: OLD-9895 (https://git.gtahub.st/github/ubiquitarianism--leonida/issues/1608) ### 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)
Commit 5d801afc1 added deterministic seeding mode to runtime/shims/bcrypt_rng.cpp
via LEONIDA_RNG_SEED, but the variable was not documented in any .md file.
As a result, tests/test_docs_env_vars.py failed on main:
  AssertionError: Lists differ: [('LEONIDA_RNG_SEED', 'runtime/shims/bcrypt_rng.cpp:80')] != []

Document LEONIDA_RNG_SEED in runtime/README.md under the Shims section for bcrypt.dll.

AI-assisted: yes.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 10:07:12 +00:00
Author
Owner

@⁠MSedgeMC on GitHub · 2026-11-25 19:00 UTC · original · approved these changes

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** on GitHub · 2026-11-25 19:00 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1823#pullrequestreview-6063314815) · **approved these changes** 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.
Author
Owner

@⁠MSedgeMC on GitHub · 2026-11-25 19:00 UTC · original · reviewed

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.

**@⁠MSedgeMC** on GitHub · 2026-11-25 19:00 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1823#pullrequestreview-6063317028) · **reviewed** 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.
Author
Owner

@⁠Ch1mpleo on GitHub · 2026-11-25 19:36 UTC · original

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

**@⁠Ch1mpleo** on GitHub · 2026-11-25 19:36 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1823#issuecomment-7172538123) Thanks @⁠MSedgeMC — dropped \ProcessPrng\ from the \crypt.dll\ note in \ untime/README.md\ so it matches \shims/bcrypt_rng.cpp\ (\BCryptGenRandom\ / \SystemFunction036\).
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/1823/head:github-bot/gh-1823'
git switch 'github-bot/gh-1823'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1823'
git switch 'github-bot/gh-1823'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1823'
git switch 'github-bot/gh-1823'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1823'
git switch 'main'
git merge --squash 'github-bot/gh-1823'
git switch 'main'
git merge --ff-only 'github-bot/gh-1823'
git switch 'main'
git merge 'github-bot/gh-1823'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.