Skip to content

Grow default profile pseudonym pool to 128x128 (16,384 combinations)#765

Merged
erskingardner merged 2 commits into
marmot-protocol:masterfrom
Datawav:chore/grow-pseudonym-pool-to-128
Jul 1, 2026
Merged

Grow default profile pseudonym pool to 128x128 (16,384 combinations)#765
erskingardner merged 2 commits into
marmot-protocol:masterfrom
Datawav:chore/grow-pseudonym-pool-to-128

Conversation

@Datawav

@Datawav Datawav commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Closes marmot-protocol/mdk#401
Coordinates with marmot-protocol/whitenoise-android#883 / marmot-protocol/whitenoise-android#885

Summary

Grow DEFAULT_PROFILE_ADJECTIVES and DEFAULT_PROFILE_NOUNS from 32 entries each to 128. Pool size moves from 1,024 to 16,384.

With only 32 animals the birthday-paradox 50% collision probability hits around 7 random rolls — which is why users see the same animals repeating almost immediately at signup or across small group views. At 128 nouns the same threshold moves to roughly 14.

Changes

  • crates/marmot-app/src/lib.rs: expand the two &[&str] literals. Existing 32 entries preserved. Lists remain alphabetical, no duplicates.

No logic changes. default_profile_pseudonym is untouched and continues to use digest[0..2] and digest[2..4] modulo each list's length.

Word-selection rubric

Approachable, broadly recognized English. No obscure register, no politicized terms, no scientific names, no folkloric beasts.

  • Adjectives: ≤2 syllables preferred; sensory, color, temperament, or quality words; positive or neutral.
  • Nouns: common animals a kid would recognize; mix of mammals, birds, reptiles, sea life, insects; no extinct or mythical.

Coordination

This is the source of truth. Every client that calls into marmot-app::default_profile_pseudonym via the FFI bindings (iOS, desktop, Mac, Linux, web, rs) picks up the new lists automatically. The one exception is whitenoise-android, which re-implements the generator locally for the edit-profile roll action so it doesn't need an engine round-trip; that file is updated in lockstep in marmot-protocol/whitenoise-android#885.

The word lists in this PR are byte-identical to the Kotlin lists in the Android PR.

Verification

  • cargo check -p marmot-app passes cleanly.
  • crates/marmot-app/tests/relay_runtime.rs::assert_two_word_pseudonym is a shape-only check ("two ASCII title-case words separated by a space") and continues to pass without modification.
  • Length / sort / dedup verified locally:
    • DEFAULT_PROFILE_ADJECTIVES.len() == 128
    • DEFAULT_PROFILE_NOUNS.len() == 128
    • both alphabetically sorted, no duplicates
  • Lists byte-identical to whitenoise-android ProfilePseudonymGenerator.kt (verified by parsing both sources and comparing).

Open in Stage

Summary by CodeRabbit

  • New Features
    • Expanded the built-in profile pseudonym word lists, increasing the variety of generated adjective/noun combinations.
    • Updated the selection order, which changes the resulting default pseudonyms produced from the same input.
  • Tests
    • Added coverage to verify the word lists stay the expected size, format, and uniqueness, helping keep generated pseudonyms consistent.

@coderabbitai

coderabbitai Bot commented Jun 30, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 67ebe8e0-f9f5-47ca-84b2-09110d7af07a

📥 Commits

Reviewing files that changed from the base of the PR and between c9d63de and 352c09c.

📒 Files selected for processing (2)
  • crates/marmot-app/src/lib.rs
  • crates/marmot-app/src/tests.rs

Walkthrough

Expands the default profile pseudonym adjective and noun word lists in marmot-app from smaller sets to larger sets, altering the deterministic word selection derived from SHA-256 indices, and adds a unit test validating list sizes, casing, and sort order.

Changes

Pseudonym word list expansion

Layer / File(s) Summary
Expanded adjective and noun word lists
crates/marmot-app/src/lib.rs
DEFAULT_PROFILE_ADJECTIVES and DEFAULT_PROFILE_NOUNS are replaced with larger, reordered word lists, changing which words default_profile_pseudonym() selects from SHA-256 digest indices.
Validation test for word list shape
crates/marmot-app/src/tests.rs
A new test asserts list entry counts and cross-product size of 16,384, and a helper validates non-empty, ASCII title-cased, strictly sorted, unique entries.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related issues

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The lists were expanded, but the summary says their membership and ordering changed, conflicting with the requirement to preserve the existing 32 entries in alphabetical order. Restore the original 32 words, append new words only, and keep both lists alphabetized and byte-identical to the Android mirror.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes expanding the default profile pseudonym pool to 128×128 combinations.
Out of Scope Changes check ✅ Passed The changes stay within the pseudonym list expansion and related tests, with no unrelated features or code paths introduced.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@stage-review

stage-review Bot commented Jun 30, 2026

Copy link
Copy Markdown

Ready to review this PR? Stage has broken it down into 2 individual chapters for you:

Title
1 Expand default profile pseudonym word lists
2 Enforce pseudonym list invariants via tests
Open in Stage

Chapters generated by Stage for commit 352c09c on Jul 1, 2026 9:44pm UTC.

@erskingardner

Copy link
Copy Markdown
Member

@Datawav you have failing CI here.

Datawav and others added 2 commits July 1, 2026 17:40
Expand DEFAULT_PROFILE_ADJECTIVES and DEFAULT_PROFILE_NOUNS from 32 to
128 entries each. Pool grows from 1,024 to 16,384 combinations.

At 32 nouns the birthday-paradox 50% collision threshold sits at ~7
rolls, which is why users see the same animals repeating almost
immediately at signup. At 128 nouns the same threshold moves to ~14.

No logic changes. Existing 32 entries preserved; lists stay
alphabetical. Existing assert_two_word_pseudonym shape test continues
to pass.

Word lists are byte-identical to the client-side mirror in
marmot-protocol/whitenoise-android.

Refs #764
@erskingardner
erskingardner force-pushed the chore/grow-pseudonym-pool-to-128 branch from cbffa47 to 352c09c Compare July 1, 2026 21:44
@erskingardner
erskingardner merged commit 43ad383 into marmot-protocol:master Jul 1, 2026
20 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.

[Feature]: Grow default profile pseudonym pool to 128×128 (16,384 combinations)

2 participants