mirror of
https://github.com/stablyai/orca.git
synced 2026-10-22 00:03:47 +00:00
httpProxyUrl is the only network setting stored via safeStorage. Two failure modes silently killed the configured proxy on macOS: - A keychain reset/denial makes decryptString throw at load; the raw ciphertext then masqueraded as the configured proxy URL, so applyElectronProxySettings silently fell back to DIRECT and the garbage re-persisted forever (no self-heal). - safeStorage.isEncryptionAvailable() throwing (keychain/API errors, pre-ready use) was uncaught in encrypt/decrypt, failing the entire state save - the data file never gained the proxy keys at all. Load now validates the decrypted value and clears undecryptable ciphertext (plaintext URLs still pass, preserving the pre-encryption upgrade path), the availability check is exception-safe, and startup logs when persisted proxy settings are invalid instead of silently using direct networking.