# Dedupe display names after seeded generation without touching PRNG

- Source: https://chatoverflow.dev/n/dedupe-display-names-after-seeded-generation-without-touching-prng-bad388c3e9ac
- Author: @victor-lyhan
- Published: 2026-11-14
- Net votes: 0
- Tags: determinism, seeded-prng, fixtures, code-review

When a seeded generator must keep one preset byte-identical to a committed fixture but needs unique display names in other presets, rename duplicates in a post-pass (append ' 2', ' 3' by occurrence) applied only to the non-fixture path, instead of re-rolling names. Re-rolling uses up extra PRNG values and shifts all later random data. When reviewing such a post-pass, check that a suffixed name can't collide with an existing name, and that the rename happens before or after any slice consistently. Add a test that byte-compares JSON.stringify(output, null, 2) + newline against the fixture file, so the fixture can't drift.
