docs: document LEONIDA_RNG_SEED in runtime/README.md #163

Closed
Andretuta wants to merge 1 commit from upstream-pr/163 into main
Andretuta commented 2026-11-24 02:32:33 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Andretuta on 2026-11-24T02:32:33Z.


Carried over from old PR 9895 by neoisg8 in the original Leonida repository, which went private on 23 Nov 2026. The code is the branch old-pr/9895, exactly that PR's last commit. All carried-over PRs are listed in #17.
Opened as a draft, and the CI runs the opening started were cancelled so 250 PRs don't fill the queue. Re-run CI here when you review it.
neoisg8: this is your work. Feel free to take it over, by pushing to the branch or opening your own PR and closing this one.


Original description (mentions and #N references are disabled; the numbers refer to the old repository):

Claimed in the coordination issue: https://github.com/ProjectLeonida/Leonida/issues/9677

Depends on: none.

What and why

tests/test_docs_env_vars.py was failing on main (e56d97950):

FAIL: test_every_variable_is_named_in_a_document
AssertionError: Lists differ: [('LEONIDA_RNG_SEED', 'runtime/shims/bcrypt_rng.cpp:80')] != [] : read by the code and named in no .md file:
  LEONIDA_RNG_SEED (runtime/shims/bcrypt_rng.cpp:80)

Commit 5d801afc1 (bcrypt_rng: fail closed on missing host CSPRNG and log seeded mode once) added deterministic seeding support in runtime/shims/bcrypt_rng.cpp:80 via LEONIDA_RNG_SEED, but the variable was not documented in any Markdown document.

This documents bcrypt.dll and LEONIDA_RNG_SEED in runtime/README.md under the shims section.

Tested

  • Windows 11 Pro 26100, Python 3.12.10, CPU only, no GPU, no game files.
  • Negative control on main (e56d97950):
    python -I tests/test_docs_env_vars.py -> FAILED (failures=1) reporting LEONIDA_RNG_SEED.
  • Positive control on fix/doc-leonida-rng-seed (164fa370f):
    python -I tests/test_docs_env_vars.py -> Ran 4 tests in 0.882s - OK.
  • Hygiene checks:
    python -I scripts/check_no_game_data.py runtime/README.md: clean.
    git diff --check origin/main: clean.

AI-assisted: yes.

Checklist

  • 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. (Not applicable: docs-only change.)
<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5464984325 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/163). Originally posted by [Andretuta](https://github.com/Andretuta) on 2026-11-24T02:32:33Z. --- > Carried over from **old PR 9895** by `neoisg8` in the original Leonida repository, which went private on 23 Nov 2026. The code is the branch `old-pr/9895`, exactly that PR's last commit. All carried-over PRs are listed in #17. > Opened as a draft, and the CI runs the opening started were cancelled so 250 PRs don't fill the queue. Re-run CI here when you review it. > `neoisg8`: this is your work. Feel free to take it over, by pushing to the branch or opening your own PR and closing this one. --- Original description (mentions and `#N` references are disabled; the numbers refer to the old repository): Claimed in the coordination issue: https://github.com/ProjectLeonida/Leonida/issues/9677 Depends on: none. ### What and why `tests/test_docs_env_vars.py` was failing on `main` (`e56d97950`): ```text FAIL: test_every_variable_is_named_in_a_document AssertionError: Lists differ: [('LEONIDA_RNG_SEED', 'runtime/shims/bcrypt_rng.cpp:80')] != [] : read by the code and named in no .md file: LEONIDA_RNG_SEED (runtime/shims/bcrypt_rng.cpp:80) ``` Commit `5d801afc1` (`bcrypt_rng: fail closed on missing host CSPRNG and log seeded mode once`) added deterministic seeding support in `runtime/shims/bcrypt_rng.cpp:80` via `LEONIDA_RNG_SEED`, but the variable was not documented in any Markdown document. This documents `bcrypt.dll` and `LEONIDA_RNG_SEED` in `runtime/README.md` under the shims section. ### Tested - Windows 11 Pro 26100, Python 3.12.10, CPU only, no GPU, no game files. - Negative control on `main` (`e56d97950`): `python -I tests/test_docs_env_vars.py` -> `FAILED (failures=1)` reporting `LEONIDA_RNG_SEED`. - Positive control on `fix/doc-leonida-rng-seed` (`164fa370f`): `python -I tests/test_docs_env_vars.py` -> `Ran 4 tests in 0.882s - OK`. - Hygiene checks: `python -I scripts/check_no_game_data.py runtime/README.md`: clean. `git diff --check origin/main`: clean. AI-assisted: yes. ### Checklist - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. - [x] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed. (Not applicable: docs-only change.)
MoonEyes commented 2026-11-27 19:43:09 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-27T19:43:09Z.


Thanks a lot for carrying this over, @Andretuta. The same change is open in #1823, rebased on current main with the commit by neoisg8 (old PR 9895) kept: it adds the same LEONIDA_RNG_SEED paragraph to runtime/README.md. Its second commit only drops the mention of ProcessPrng, which the shim in main does not use.

I am closing this draft to keep the queue clear. Please continue the discussion in #1823, or reopen this one if something is missing there.

AI-assisted (Claude Code, Claude Opus 5.5)

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7226803378 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/163#issuecomment-7226803378). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-11-27T19:43:09Z. --- Thanks a lot for carrying this over, @Andretuta. The same change is open in #1823, rebased on current `main` with the commit by `neoisg8` (old PR 9895) kept: it adds the same `LEONIDA_RNG_SEED` paragraph to `runtime/README.md`. Its second commit only drops the mention of `ProcessPrng`, which the shim in `main` does not use. I am closing this draft to keep the queue clear. Please continue the discussion in #1823, or reopen this one if something is missing there. AI-assisted (Claude Code, Claude Opus 5.5)

Pull request closed

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!163
No description provided.