Files

14 lines
3.1 KiB
Markdown

# Explicit realm change through the existing sign-out route
The selected Glue uses SuperDistrict's account-scoped `g_octoLastRealmIdentity` table. The old RealmList CVar implementation named in the brief is not the active preference store: the selected RealmList embeds no preference object. Clearing only `octoLastRealmIdentity` would leave normal auto-selection intact and reproduce the problem.
The selected navigation bar calls `CharacterSelectUtil.ChangeRealm` (FDID 5614220). The pinned transform adds a file-local Source exit helper to that callback, RealmList Back (5613302), and SuperDistrict Back (8199120). It refreshes the existing authenticated Source provider, validates its opaque account key, removes only that account's preference, and clears the legacy CVar if supported. Normal sign-in and other accounts' choices are unchanged. No native API identity is replaced and no new UI controls are added.
Change Realm invokes the selected `CharacterSelect_Exit`, retaining its character-order/search/overlay cleanup, owned `GlueParent_SourceAccountBack` notification and native disconnect. The two Back paths explicitly send the same owned notification before native disconnect, so a stale Source snapshot cannot hold the realm screen open. SuperDistrict also calls its existing Cancel before disconnect, clearing a pending manual choice before an asynchronous character-list event can persist it again.
Three actual selected callback regressions failed before the change because they retained the remembered realm. They pass after the fix: normal saved auto-join, explicit exit, open two-row chooser, selection of a different realm, persistence only after character-list success, and the new realm auto-joining on the next normal login. Additional checks execute the emitted numeric snapshot decoder, preserve another account's preference, reject torn/unverified snapshots and reject changed input hashes or repeated transforms. All three full candidate Lua files compile. Two real-factory lifecycle checks cover pending/connecting Cancel with a delayed character-list event and the Glue generation retirement boundary.
Frozen host/runtime candidate: `/mnt/Games/@project/build/realm105-change-20261128/frozen`. Run `sh gate.sh` there. Three modified native Lua resources are in `candidate`; selected input identities and FDIDs are in `candidate-pins.json`. This is the verified runtime/source candidate, not an installed or signed content step. The content lane must compose it on the current accepted head and perform the separate P2 physical/inverse gate. Claude owns LOCAL testing. The host uses two synthetic realms; actual LOCAL realm count was not queried here. If LOCAL exposes only one realm, choosing a different realm requires the authorized OCTO test.
Fix B remains separate: retaining an authenticated source session while switching realms requires a proved Wire disconnect/reconnect lifecycle, outstanding request retirement and native realm/character-list transition. This candidate deliberately uses the existing clean sign-out and fresh sign-in path requested for Fix A; it does not add an in-session transport reconnect.