diff --git a/crates/marmot-app/src/lib.rs b/crates/marmot-app/src/lib.rs index a73cab0c..a0c1ca97 100644 --- a/crates/marmot-app/src/lib.rs +++ b/crates/marmot-app/src/lib.rs @@ -229,16 +229,150 @@ pub(crate) const MAX_SEEN_EVENT_IDS: usize = 16_384; const KIND_NOSTR_METADATA: u64 = 0; const KIND_NOSTR_CONTACT_LIST: u64 = 3; const DEFAULT_PROFILE_ADJECTIVES: &[&str] = &[ - "Agile", "Angry", "Brave", "Bright", "Calm", "Clever", "Cosmic", "Daring", "Electric", - "Gentle", "Golden", "Happy", "Hidden", "Jolly", "Kind", "Lucky", "Majestic", "Mellow", - "Mighty", "Nimble", "Noble", "Quiet", "Rapid", "Sage", "Silver", "Sunny", "Swift", "Vivid", - "Witty", "Wondrous", "Young", "Zesty", + "Agile", "Amber", "Angry", "Balanced", "Bold", "Brave", "Breezy", "Bright", "Brisk", "Bubbly", + "Calm", "Caring", "Cheerful", "Clear", "Clever", "Coral", "Cosmic", "Cozy", "Crimson", "Crisp", + "Curious", "Daring", "Dawn", "Deep", "Diamond", "Dreamy", "Eager", "Earnest", "Easy", + "Electric", "Emerald", "Festive", "Fiery", "Fleet", "Forest", "Fresh", "Frosty", "Gentle", + "Glad", "Golden", "Graceful", "Grand", "Grateful", "Green", "Happy", "Hardy", "Hearty", + "Hidden", "Honest", "Hopeful", "Humble", "Indigo", "Ivory", "Jade", "Jolly", "Kind", "Lively", + "Loyal", "Lucky", "Majestic", "Maple", "Mellow", "Merry", "Mighty", "Mindful", "Misty", + "Modest", "Mossy", "Neat", "Nifty", "Nimble", "Noble", "Olive", "Open", "Patient", "Peaceful", + "Plum", "Polar", "Proud", "Quiet", "Radiant", "Rapid", "Ready", "Restful", "Rosy", "Ruby", + "Rustic", "Sage", "Scarlet", "Serene", "Sharp", "Shiny", "Silver", "Sincere", "Sky", "Smooth", + "Solar", "Solid", "Spirited", "Spry", "Steady", "Stellar", "Stormy", "Sturdy", "Sunlit", + "Sunny", "Swift", "Tame", "Tangy", "Tender", "Tidy", "Topaz", "Tranquil", "Trusty", "Twilight", + "Upbeat", "Valiant", "Verdant", "Vivid", "Warm", "Willing", "Winsome", "Wise", "Witty", + "Wondrous", "Woodland", "Young", "Zesty", ]; const DEFAULT_PROFILE_NOUNS: &[&str] = &[ - "Antelope", "Badger", "Bear", "Beaver", "Bison", "Bobcat", "Cougar", "Dolphin", "Eagle", - "Falcon", "Finch", "Fox", "Gecko", "Heron", "Jaguar", "Koala", "Llama", "Lynx", "Moose", - "Narwhal", "Otter", "Owl", "Panda", "Puffin", "Raven", "Robin", "Seal", "Swan", "Tiger", - "Turtle", "Wolf", "Yak", + "Albatross", + "Alpaca", + "Ant", + "Antelope", + "Armadillo", + "Badger", + "Bat", + "Bear", + "Beaver", + "Bee", + "Bison", + "Bluebird", + "Bobcat", + "Bullfrog", + "Bumblebee", + "Butterfly", + "Camel", + "Caribou", + "Cat", + "Caterpillar", + "Cheetah", + "Chickadee", + "Chinchilla", + "Chipmunk", + "Cobra", + "Condor", + "Cougar", + "Crab", + "Crane", + "Cricket", + "Crow", + "Deer", + "Dingo", + "Dolphin", + "Dove", + "Dragonfly", + "Duck", + "Eagle", + "Egret", + "Elephant", + "Elk", + "Falcon", + "Fawn", + "Ferret", + "Finch", + "Firefly", + "Flamingo", + "Flounder", + "Fox", + "Gazelle", + "Gecko", + "Giraffe", + "Goat", + "Goose", + "Gopher", + "Grouse", + "Hare", + "Hawk", + "Hedgehog", + "Heron", + "Hippo", + "Hornet", + "Horse", + "Hummingbird", + "Ibex", + "Iguana", + "Jackal", + "Jaguar", + "Jay", + "Kestrel", + "Kingfisher", + "Kiwi", + "Koala", + "Ladybug", + "Lark", + "Leopard", + "Lion", + "Llama", + "Lynx", + "Macaw", + "Magpie", + "Mallard", + "Manatee", + "Marmot", + "Meerkat", + "Mink", + "Mole", + "Mongoose", + "Monkey", + "Moose", + "Mouse", + "Narwhal", + "Newt", + "Nightingale", + "Octopus", + "Opossum", + "Orca", + "Oriole", + "Ostrich", + "Otter", + "Owl", + "Panda", + "Parrot", + "Peacock", + "Pelican", + "Penguin", + "Pheasant", + "Pigeon", + "Pony", + "Porcupine", + "Puffin", + "Quail", + "Rabbit", + "Raccoon", + "Ram", + "Raven", + "Reindeer", + "Rhino", + "Roadrunner", + "Robin", + "Salamander", + "Salmon", + "Seal", + "Swan", + "Tiger", + "Turtle", + "Wolf", + "Yak", ]; type AppRuntime = AccountDeviceRuntime< diff --git a/crates/marmot-app/src/tests.rs b/crates/marmot-app/src/tests.rs index 0f0fdd12..64dcd32b 100644 --- a/crates/marmot-app/src/tests.rs +++ b/crates/marmot-app/src/tests.rs @@ -39,6 +39,40 @@ fn legacy_projection_update_json_defaults_new_streaming_fields() { ); } +#[test] +fn default_profile_word_lists_keep_expected_shape() { + assert_profile_word_list("adjectives", DEFAULT_PROFILE_ADJECTIVES); + assert_profile_word_list("nouns", DEFAULT_PROFILE_NOUNS); + assert_eq!( + DEFAULT_PROFILE_ADJECTIVES.len() * DEFAULT_PROFILE_NOUNS.len(), + 16_384 + ); +} + +fn assert_profile_word_list(name: &str, words: &[&str]) { + assert_eq!(words.len(), 128, "{name} should have 128 entries"); + for word in words { + assert!(!word.is_empty(), "{name} should not contain empty words"); + let mut chars = word.chars(); + assert!( + chars.next().is_some_and(|ch| ch.is_ascii_uppercase()), + "{name} word should start uppercase: {word}" + ); + assert!( + chars.all(|ch| ch.is_ascii_lowercase()), + "{name} word should be title-cased ASCII: {word}" + ); + } + for pair in words.windows(2) { + assert!( + pair[0] < pair[1], + "{name} should be sorted and unique: {} before {}", + pair[0], + pair[1] + ); + } +} + fn relay_delivery(event_id: String, pubkey: String) -> cgka_traits::TransportDelivery { let event = NostrTransportEvent { id: event_id,