{"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":1708,"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":1690,"sourceCodeEnd":1726,"githubUrl":"https://github.com/atuinsh/atuin/blob/c0c717ab04c881764bcad4b3d169a507e2432643/crates/atuin-client/src/settings.rs#L1690-L1726","documentation":"During config loading, atuin merges config values that are absolute filesystem paths into the `config` crate builder via `set_override`. If the config crate rejects the override (malformed dotted key, type conflict with the schema, or a value that cannot be coerced), the code panics with this message naming the offending key.","triggerScenarios":"A config.toml entry whose dotted key path collides with a non-map value in the settings schema (e.g. overriding a scalar field as a table), or a key that `config::Builder::set_override` cannot parse/insert during the `absolute path` fold in load","commonSituations":"Hand-edited config.toml with a typo'd or malformed key like `extra_header..foo`, or nesting a table where the schema expects a string, after moving to a config layout not supported by the current atuin version","solutions":["Open config.toml and find the key printed in the panic message; fix or remove it","Ensure the key path matches the settings schema (check crates/atuin-client/src/settings.rs structs)","If the value should be a path, confirm it is a plain string, not a nested table","Bisect by commenting out config sections until the panic disappears"],"exampleFix":"# before (config.toml)\n[sync]\nrecords = true\nsync.records = true\n# after (config.toml)\n[sync]\nrecords = true","handlingStrategy":"validation","validationCode":"// validate config keys against the schema before loading\nlet known: Vec<String> = Settings::structured_config().keys().collect();\nfor key in user_config_keys {\n    assert!(known.contains(&key), \"unknown config key: {key}\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Validate config.toml keys after every upgrade (`atuin doctor` or a dry load)","Keep key paths matching the settings structs exactly","Avoid nesting tables where the schema expects scalars"],"tags":["config","panic","rust"],"backgroundTag":"invalid-config-value","analyzedSha":"c0c717ab04c881764bcad4b3d169a507e2432643","analyzedAt":"2026-09-12T07:40:01.341Z","contentChangedAt":"2026-09-12T07:40:01.341Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}