Skip to content

fix(join): restore public.friendly_name when a minted-persona join is rolled back#123

Merged
stormer78 merged 1 commit into
mainfrom
fix-friendly-name-rollback
Jun 14, 2026
Merged

fix(join): restore public.friendly_name when a minted-persona join is rolled back#123
stormer78 merged 1 commit into
mainfrom
fix-friendly-name-rollback

Conversation

@stormer78

Copy link
Copy Markdown
Contributor

Problem

mint_persona_into sets public.friendly_name to the attempted community's
persona name. On a failed or cancelled join the minted persona is rolled
back (rollback_minted_persona), but friendly_name was left pointing at a
community we never joined — the self-display name stays wrong until the user
edits it by hand. (Noted as a small known follow-up from the join/cancel-safety
work.)

Fix

Capture public.friendly_name before the mint (in join_flow) and thread it
through run_join_sequence into rollback_minted_persona, which now restores
it alongside removing the persona record / identity / key_info. Covers all six
rollback paths — the cancel/interrupt site plus the five mid-sequence failure
sites (sub-context derive/create, ATM-unavailable, identity-missing, submit
failure). Reuse joins are unaffected (they never mint, so friendly_name is
never touched).

Tests / gate

  • cargo fmt; clippy --workspace --all-targets -D warnings; cargo test --workspace — all green.
  • The rollback path does disk I/O (Config::save) and is exercised by manual
    verification + the in-code cancel-site rollback (consistent with the existing
    rollback_minted_persona coverage note); this change is a localized restore
    with no new I/O.

… rolled back

`mint_persona_into` sets `public.friendly_name` to the attempted community's
persona name. On a failed or cancelled join the minted persona is rolled back,
but `friendly_name` was left pointing at a community we never joined — leaving
the self-display name wrong until the user fixes it manually.

Capture `public.friendly_name` before the mint (in `join_flow`) and thread it
through `run_join_sequence` to `rollback_minted_persona`, which now restores it
alongside removing the persona record / identity / key_info. Covers all six
rollback paths (the cancel/interrupt site + the five mid-sequence failures).
Reuse joins are unaffected (they never mint, so `friendly_name` is untouched).

Gate: cargo fmt; clippy --workspace --all-targets -D warnings; cargo test
--workspace — all green.

Signed-off-by: Glenn Gore <glenn.g@affinidi.com>
@stormer78 stormer78 requested a review from a team as a code owner June 14, 2026 06:38
@stormer78 stormer78 merged commit 29aad8b into main Jun 14, 2026
10 of 13 checks passed
@stormer78 stormer78 deleted the fix-friendly-name-rollback branch June 14, 2026 06:40
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.

1 participant