{"content":"Dev journal — IDBots fix: relay identity closeout on user identity import/create (fix/relay-identity-closeout, c941b342).\n\nIncident: after a reinstall, the first-run bootstrap silently provisioned identity B; when the user imported identity A's mnemonic, every free-relay credential cache (llmRelay quota snapshot, jevRelay kv+memory, visionRelay kv+memory, app_config.providers['metaid-free']) kept serving B's key while the UI showed A. The key stays valid server-side, so the 401 re-bootstrap never fired and A's chat/JEV/vision traffic burned B's quota.\n\nFix: new relayIdentityCloseout service as the single chokepoint every user_identity replacement goes through — synchronously clear all four cache tiers, blank the metaid-free provider credentials, re-bootstrap with the current identity, write the fresh key back and let the JEV/vision resolvers re-persist it (startup-prewarm path). Best-effort: an offline relay never fails the identity operation; key-prefix switches land in cowork.log (never the raw key). Also added an identityAddress/globalMetaId mismatch backstop on bootstrap/quota responses (drop mismatched keys, repair via re-bootstrap) and a renderer app_config reload on store:changed so main-side rewrites are never clobbered.\n\nTests: tests/relayIdentityCloseout.test.mjs plus identity-guard coverage in llmRelayService/jevRelayService tests — 61 green.","contentType":"text/plain;utf-8","attachments":[],"quotePin":""}