Skip to content

fix(persona): profile/video avatar is gender-coherent — no more female-persona-with-male-face (genesis Gap #1) - #1862

Merged
joelteply merged 1 commit into
canaryfrom
fix/profile-avatar-gender-coherent
Jul 6, 2026
Merged

joelteply merged 1 commit into
canaryfrom
fix/profile-avatar-gender-coherent

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

First concrete slice of PROCEDURAL-PERSONA-GENESIS (#1861). select_avatar_by_identity — the single-persona
projection behind the /avatars/{id}.png snapshot (modules/avatar.rs) AND the live video pump
(live/avatar/video_pump.rs) — hashed the FULL 8-VRM catalog with NO gender filter. So a persona whose gender
salt says Female (→ female name, female voice) could land on vroid-male-base: the exact "gender must match
avatar appearance" incoherence Joel named, live in the code.

Fix: filter the catalog to the persona's gender_from_identity FIRST, then deterministically pick within the
gender-matching subset (same persona → same avatar, stable). A mismatch is now unrepresentable by
construction — coherence, not a post-hoc check. Empty gender pool (a catalog gap, e.g. no VRM of that gender)
fails LOUD naming it but still returns a face — a profile picture must never crash the core. Mirrors the
gender filter the batch allocator (select_avatar_for_agent) already used.

Verified: new profile_avatar_is_gender_coherent test — 500 identities, avatar gender ALWAYS == persona
gender (0 mismatches); 15 selection tests green. Axis-1 coherence-by-construction, live-proven.

Co-Authored-By: Claude Opus 4.8 [email protected]
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

…e-persona-with-male-face (genesis Gap #1)

First concrete slice of PROCEDURAL-PERSONA-GENESIS (#1861). `select_avatar_by_identity` — the single-persona
projection behind the /avatars/{id}.png snapshot (modules/avatar.rs) AND the live video pump
(live/avatar/video_pump.rs) — hashed the FULL 8-VRM catalog with NO gender filter. So a persona whose gender
salt says Female (→ female name, female voice) could land on `vroid-male-base`: the exact "gender must match
avatar appearance" incoherence Joel named, live in the code.

Fix: filter the catalog to the persona's `gender_from_identity` FIRST, then deterministically pick within the
gender-matching subset (same persona → same avatar, stable). A mismatch is now unrepresentable by
construction — coherence, not a post-hoc check. Empty gender pool (a catalog gap, e.g. no VRM of that gender)
fails LOUD naming it but still returns a face — a profile picture must never crash the core. Mirrors the
gender filter the batch allocator (select_avatar_for_agent) already used.

Verified: new `profile_avatar_is_gender_coherent` test — 500 identities, avatar gender ALWAYS == persona
gender (0 mismatches); 15 selection tests green. Axis-1 coherence-by-construction, live-proven.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
@joelteply
joelteply merged commit 7285c5e into canary Jul 6, 2026
@joelteply
joelteply deleted the fix/profile-avatar-gender-coherent branch July 6, 2026 05:39
joelteply added a commit that referenced this pull request Jul 6, 2026
…e — identity-seeded (genesis Gap #2) (#1863)

Second slice of PROCEDURAL-PERSONA-GENESIS (#1861). The persona-speak path passed the literal `"default"` as
the TTS voice for every persona with no explicit voice — and `resolve_voice_gendered` hashes that seed string,
so `deterministic_hash("default")` collapsed EVERY same-gender persona onto ONE shared voice. Personas looked
unique but all sounded identical.

Fix (bridge_client.rs, the speak path that already derives gender from user_id): when a persona has no
explicit voice, seed the voice pick from its IDENTITY (`user_id`) instead of `"default"`. The TTS resolver
already treats an arbitrary string as a gender-filtered per-voice SEED, so the identity is exactly the right
seed — a stable, UNIQUE voice per persona, coherent with the gender + avatar (all drawn from the same id). An
explicit chosen voice is still honored.

Verified: new `resolve_voice_is_identity_seeded_and_unique` test (Kokoro's static gendered voice list) —
same identity → same voice (stable), 50 distinct identities → a spread of ≥2 female voices (unique), every
pick stays female (gender-coherent). Axis-1 coherence: gender ↔ avatar (#1862) ↔ voice (this) now all agree
and are unique per user.


Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

Co-authored-by: Claude Opus 4.8 <[email protected]>
joelteply added a commit that referenced this pull request Jul 6, 2026
…ce made explicit (genesis convergence slice) (#1864)

Third slice of PROCEDURAL-PERSONA-GENESIS (#1861), after the avatar (#1862) + voice (#1863) coherence fixes.
Until now each facet re-derived gender independently at its consumption site — coherence held only because
every call happened to use the same `"gender"` salt. This makes it EXPLICIT + converges it:

- `persona/projection.rs`: `project_persona(persona_id) -> PersonaSpec` draws gender ONCE and threads it as
  the spine, emitting one coherent bundle `{persona_id, agent_name, gender, pronouns, avatar_id, voice_seed}`.
  Pure + deterministic — same id → identical spec forever (the Tamagotchi property: unique per user, stable
  per persona). The single seam the scattered `*_from_identity` calls can migrate onto.
- `live/avatar/gender.rs`: `PronounSet` + `pronouns_for_gender` — the anticipated task #142 facet, derived
  FROM gender so pronouns always agree (she/her, he/him; they/them a universal alias). Binary today (the
  catalog is Male/Female); Neutral is a future slice needing neutral avatars/voices/names.

Verified: `persona_spec_is_coherent_and_deterministic` — 500 personas, avatar gender == spec gender, pronouns
match gender, voice seeded on identity, spec identical across repeated calls. Next slices: migrate consumers
onto PersonaSpec, cache into a PersonaSeedFile::V2 (stability + human override), then the model-provisioning
SSoT + gender-tagged avatar-download catalog.


Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

Co-authored-by: Claude Opus 4.8 <[email protected]>
joelteply added a commit that referenced this pull request Jul 6, 2026
…file-pic + bio → home (#1866)

The design for the visual half of the persona (companion to PROCEDURAL-PERSONA-GENESIS.md, which does the
coherent identity draw). Joel: "they all have to render well. Those will become their profile pic and bio.
Later it might show their sims home." Ties the (already-scaffolded) pieces onto the genesis PersonaSpec spine:

1. Download — lift the VRM URL list + gender tags (incl. neutral) out of download-avatar-models.sh INTO the
   catalog data, so adding an avatar is one entry: it downloads, gets tagged, and the coherent draw picks it
   up with zero code (folds into the model-provisioning SSoT).
2. Render-well — capture_snapshot already renders VRM→PNG (material #110 / coords #111 done); the quality bar
   (portrait framing, lighting, backdrop, crisp AA) is what makes personas IMPRESS. Measured via glass-box
   frame strips, never assumed.
3. Profile pic — the rendered coherent avatar (#1862) served at /avatars/{id}.png; make it a PersonaSpec field.
4. Bio — today role-static (every Helper shares one); make it persona-UNIQUE, composed from PersonaSpec
   (name + pronouns + gender-inflected archetype) so a she/her and a they/them Helper read as distinct beings.
5. (Later) Home — the same avatar rendered in its SceneDescription (the scene birther already picks one per
   identity), editable/persistent toward Second-Life-scale worlds.

Grounded in the real seams (capture_snapshot, AvatarCatalog::discover, download-avatar-models.sh,
role_template bio, bevy_renderer/scene). Slice plan + invariants (coherent+deterministic, additions
first-class, render-quality-measured, never-rasterize-needlessly, fail-loud).


Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

Co-authored-by: Claude Opus 4.8 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant