Skip to content

Persona switching verification ​

Scope: persona switching repair, promoted separately from testing to main on 2026-09-27. No production data changes or database migration. Main retains its existing version-picker behavior; both multilingual and same-language variants open the picker before creation.

Behavior ​

  • Unlocked sessions follow the account selection; selecting inside chat locks only that session. Unlocking resumes the account selection. Explicit no-persona uses account identity and clears old public persona fields.
  • Persona PUT responses include normalized identity metadata. The client applies only identity, retaining loaded history, variables, audio and pagination. Successful modern responses require no full-session GET, including the manager's source-change effect.
  • The existing session-persona JSON holds an opaque selection version. Updated clients send the version they saw; an atomic compare-and-swap rejects stale requests with HTTP 409. Conflicts and uncertain timeouts read current identity and retain a retry message. Older clients/servers keep their previous compatible path; timeout ordering protection requires the updated client and server.
  • All session-creation paths block while global selection is pending or failed. Retrying through the persona menu clears the failure after success, including when no saved personas remain.
  • The central persona selection is a native button, separate from edit/delete. Saving and generation show a reason for disabled selection in all five locales.
  • PostHog persona_selection reports the client lifecycle (intent, observed commit, applied, failure/unconfirmed), requested persona ID, session ID, lock state and elapsed time. It does not include names, private notes, descriptions or messages. This is client telemetry, not a server commit audit.

Automated evidence ​

  • Real React/JSDOM interaction tests cover pending/failed creation across all three entry paths, handler guards before rerender, native disabled buttons, navigation versus selection, manager refresh suppression and completion after closing.
  • Controller tests cover immediate receipts, identical names/different IDs, explicit none, unlock, streaming, old refresh cancellation, retries, timeout reconciliation, navigation and preserved gameplay/audio/history.
  • Isolated PGlite tests cover persona resolution, prompt public fields/privacy, session isolation, receipt parity, concurrent writes and stale write rejection.
  • Hono HTTP integration executes session creation, both persona PUT routes, reload, version conflict, invalid version and missing-session handling; only login proof is stubbed. No LLM provider calls are made.

No local browser or physical phone was used; these checks do not establish device rendering or production rollout health.

Testing-branch verification results (2026-09-26) ​

  • pnpm build: PASS, all 5 tasks.
  • pnpm typecheck: PASS, all 8 tasks.
  • Targeted client regressions: 34 tests passed across controller, identity refresh, manager, carousel, global store and session picker; controller's final standalone run passed all 14 tests.
  • Isolated server command: node packages/server/scripts/test-local.mjs src/lib/persona-receipt.integration.test.ts src/lib/persona-follow-profile.test.ts src/lib/persona-images.integration.test.ts src/routes/sessions-branch.test.ts src/routes/sessions-persona.test.ts: PASS, 26 tests.
  • node scripts/check-learning-impact.mjs: PASS.
  • git diff --check: PASS.
  • pnpm --filter @yumina/app check:edition: existing failure, 8 hosted imports in unrelated core files. The same 8 violations were reproduced in an unmodified export of the original testing base.

Initial full-suite attempts encountered a composer image-paste timing failure and, after synchronizing testing, 8 Studio inspector failures. Those files passed isolated reruns in the repair worktree and clean baseline. The final testing-branch full suite passed 2,362/2,363 tests, with one Studio legacy-behavior rendering failure; that complete file passed isolated in both trees. The cause of the full-suite failures is not established, so this is not a clean full-suite result.

Main promotion verification (2026-09-27) ​

The repair was applied to main at 7ca480148, preserving unrelated main changes. Conflicts were resolved by applying only the persona guards, analytics event and six translation keys per locale; no other testing-branch features were promoted.

  • Persona client regressions plus menu and translation contracts: 38/38 passed, including explicit .test.tsx execution.
  • Isolated server regressions using the command above: 26/26 passed.
  • Edition boundary: passed on main.
  • Build, typecheck, full client suite and remote checks are recorded in the promotion PR before merge.