{"record":{"id":"572bf656792f0725","repo":"atuinsh/atuin","slug":"failed-to-set-absolute-path-override-for-key","errorCode":null,"errorMessage":"failed to set absolute path override for {key}","messagePattern":"failed to set absolute path override for (.+?)","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/atuin-client/src/settings.rs","lineNumber":1716,"sourceCode":"            \"logs.search.file\",\n            \"logs.daemon.file\",\n        ]\n        .iter()\n        .map(|key| (key, built.get_string(key).unwrap_or_default()))\n        // An unset optional path (`daemon.socket_path`) must stay unset rather\n        // than be overridden with an empty one.\n        .filter(|(_, value)| !value.is_empty())\n        .filter_map(|(key, value)| match Self::expand_path(&value) {\n            Ok(expanded) => Some((key, expanded)),\n            Err(e) => {\n                tracing::warn!(\"failed to expand path for {key}: {e}\");\n                None\n            }\n        })\n        .fold(config_builder, |builder, (key, value)| {\n            builder\n                .set_override(key, value)\n                .unwrap_or_else(|_| panic!(\"failed to set absolute path override for {key}\"))\n        });\n\n        config_builder.build().map_err(Into::into)\n    }\n\n    /// Look up a single config value by dotted key (e.g. `\"daemon.sync_frequency\"`).\n    ///\n    /// Returns the effective value after merging defaults, config file, and\n    /// environment — without the side-effects of full `Settings` construction\n    /// (meta store init, path expansion, etc.).\n    pub fn get_config_value(key: &str) -> Result<String> {\n        use config::Value;\n\n        #[cfg_attr(not(unix), allow(unused_mut))]\n        let mut config = Self::build_config()?;\n\n        // When unset, `daemon.socket_path` is calculated dynamically by [`Daemon::socket_path`] and\n        // wouldn't show up in `atuin config get --resolved daemon.socket_path`. However, it may be","sourceCodeStart":1698,"sourceCodeEnd":1734,"githubUrl":"https://github.com/atuinsh/atuin/blob/900007c48045867e7f44b0f9bc55ad9dbe99ee0d/crates/atuin-client/src/settings.rs#L1698-L1734","documentation":"This panic comes from Atuin's config loading when it applies 'absolute path' config overrides (keys like `*.*.path` style settings) to a config builder. `config::Builder::set_override` should never fail for these keys, so the code treats a failure as an unrecoverable invariant and panics. It indicates a config key/value pair the config crate itself rejected.","triggerScenarios":"Loading Atuin settings where a path-type config value fails `set_override` — typically a key containing characters the config crate cannot parse as a dotted key path, or a value type it cannot coerce.","commonSituations":"A malformed entry in ~/.config/atuin/config.toml, an environment variable mapping that produces an invalid override key, or a config crate version change with stricter key parsing.","solutions":["Check the key named in the panic message for unusual characters or misplaced dots","Validate your config.toml with `atuin doctor` or by simplifying it to a minimal known-good file","Rename the offending config key to a valid documented key","If caused by an env var override, fix the env var naming"],"exampleFix":"// before (config.toml)\ndaemon..sync_frequency = \"10s\"\n// after\ndaemon.sync_frequency = \"10s\"","handlingStrategy":"validation","validationCode":"// before loading config, check path keys parse as dotted config keys\nfn check_override_key(key: &str) -> Result<(), String> {\n    if key.is_empty() || key.split('.').any(|p| p.is_empty()) {\n        return Err(format!(\"invalid override key: {key}\"));\n    }\n    Ok(())\n}","typeGuard":"fn is_valid_override_key(key: &str) -> bool {\n    !key.is_empty() && key.split('.').all(|p| !p.is_empty() && p.chars().all(|c| c.is_alphanumeric() || c == '_' || c == '-'))\n}","tryCatchPattern":null,"preventionTips":["Keep config.toml to documented keys","Avoid odd characters in key names","Run `atuin doctor` after config edits"],"tags":["config","panic","rust"],"backgroundTag":"invalid-config-value","analyzedSha":"900007c48045867e7f44b0f9bc55ad9dbe99ee0d","analyzedAt":"2026-09-19T12:52:51.491Z","contentChangedAt":"2026-09-19T12:52:51.491Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}