{"record":{"id":"920f2f6ad5650e2f","repo":"BigPizzaV3/CodexPlusPlus","slug":"live","errorCode":null,"errorMessage":"供应商配置总开关已关闭，未同步 live 配置","messagePattern":"供应商配置总开关已关闭，未同步 live 配置","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"apps/codex-plus-manager/src-tauri/src/commands.rs","lineNumber":735,"sourceCode":"\nfn restore_optional_file_bytes(path: &Path, contents: Option<&[u8]>) -> anyhow::Result<()> {\n    match contents {\n        Some(contents) => codex_plus_core::settings::atomic_write(path, contents)?,\n        None => match std::fs::remove_file(path) {\n            Ok(()) => {}\n            Err(error) if error.kind() == std::io::ErrorKind::NotFound => {}\n            Err(error) => return Err(error.into()),\n        },\n    }\n    Ok(())\n}\n\nfn sync_active_relay_to_home(\n    settings: &BackendSettings,\n    home: &Path,\n) -> anyhow::Result<codex_plus_core::relay_config::RelayApplyResult> {\n    if !settings.relay_profiles_enabled {\n        anyhow::bail!(\"供应商配置总开关已关闭，未同步 live 配置\");\n    }\n    let relay = settings.active_relay_profile();\n    if relay.relay_mode == codex_plus_core::settings::RelayMode::Aggregate {\n        if settings.active_aggregate_relay_profile().is_none() {\n            anyhow::bail!(\"当前聚合供应商配置不完整\");\n        }\n        let aggregate = settings\n            .active_aggregate_relay_profile()\n            .ok_or_else(|| anyhow::anyhow!(\"当前聚合供应商配置不完整\"))?;\n        return codex_plus_core::relay_config::apply_relay_config_to_home_with_session_provider(\n            home,\n            &codex_plus_core::protocol_proxy::local_responses_proxy_base_url(\n                codex_plus_core::protocol_proxy::DEFAULT_PROTOCOL_PROXY_PORT,\n            ),\n            \"codex-plus-aggregate\",\n            codex_plus_core::settings::RelayProtocol::Responses,\n            codex_plus_core::protocol_proxy::DEFAULT_PROTOCOL_PROXY_PORT,\n            aggregate.session_provider,","sourceCodeStart":717,"sourceCodeEnd":753,"githubUrl":"https://github.com/BigPizzaV3/CodexPlusPlus/blob/f2074595a281bc057525c748175c8eb9805b0673/apps/codex-plus-manager/src-tauri/src/commands.rs#L717-L753","documentation":"Guard in sync_active_relay_to_home: the relay-profiles master switch (relay_profiles_enabled) is off in BackendSettings, so the live Codex home config is intentionally not touched. A deliberate bail-out — the caller requested a sync while the feature is disabled.","triggerScenarios":"Thrown at apps/codex-plus-manager/src-tauri/src/commands.rs:735 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Enable the relay-profiles master switch if sync is intended","Skip the sync call when the feature is knowingly disabled","No repair needed; live config was left untouched by design"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f2074595a281bc057525c748175c8eb9805b0673","analyzedAt":"2026-08-23T12:52:24.489Z","contentChangedAt":"2026-08-23T12:52:24.489Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}