Commit 30f05d3
committed
feat: add deterministic seeding support
Per-call local engine architecture mirroring entity-generator:
- get_nickname(name, seed) overload for reproducible generation
- seed()/unseed() for deterministic sequences (thread-local)
- nickname::seed() accessor for replay
Changed all 28 transform functions to accept effolkronium::random_local&
instead of using the global random_thread_local. Each get_nickname() call
draws a seed from the thread-local engine, creates a stack-local engine,
and threads it through solver → leetify → format → transforms.
Thread safety preserved: seed drawing uses thread_local storage,
generation uses stack-local engine. Concurrent get_nickname() remains safe.
8 new seeding tests.
Updated example with deterministic generation demo.
Updated copyright to 2020-2026.1 parent 5a68b86 commit 30f05d3
6 files changed
Lines changed: 386 additions & 96 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
Binary file not shown.
0 commit comments