Skip to content

fix(generate): unseeded generators repeated values across messages - #46

Merged
vitalics merged 2 commits into
mainfrom
fix/unseeded-generator-collisions
Nov 9, 2026
Merged

vitalics merged 2 commits into
mainfrom
fix/unseeded-generator-collisions

Conversation

@vitalics

@vitalics vitalics commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Unseeded runs seeded the n-th generator base + conn_seq; Gen::new forces seed | 1, so each even/odd pair of consecutive generators shared one stream: step 2 of iteration N repeated step 1 of iteration N+1 (${uuid} and @std/random alike). Found migrating a Kubernetes CR benchmark — every iteration after the first got 409 Conflict on create.

Fix: unseeded seeds go through the same derive_seed hash as seeded runs (one random base per context). Seeded runs unchanged. Regression test unseeded_generators_never_repeat_across_messages (1000 consecutive generators, no duplicate ${uuid}).

🤖 Generated with Claude Code

Unseeded runs seeded the n-th generator of a context `base + conn_seq`;
Gen::new forces `seed | 1`, so every even/odd pair of consecutive
generators got the same stream. Step 2 of iteration N therefore repeated
step 1 of iteration N+1 — `${uuid}` and `@std/random` included — and a
create-by-unique-name test (Kubernetes CRs) hit 409 Conflict from the
second iteration on. Adjacent xorshift seeds also shared output prefixes.

Unseeded seeds now go through the same derive_seed hash as seeded runs,
over one random base per context.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Anthropic Claude <noreply@anthropic.com>
@strix-security

strix-security Bot commented Nov 9, 2026

Copy link
Copy Markdown

Strix is installed on this repository, but we couldn't run this PR security review because this workspace's trial has ended. Add a card to resume code reviews here.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Anthropic Claude <noreply@anthropic.com>
@vitalics
vitalics merged commit 30db87b into main Nov 9, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants