atuinsh/atuin · error

failed to set absolute path override for

Error message

failed to set absolute path override for {key}

What it means

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.

Solutions

  1. Check the key named in the panic message for unusual characters or misplaced dots
  2. Validate your config.toml with `atuin doctor` or by simplifying it to a minimal known-good file
  3. Rename the offending config key to a valid documented key
  4. If caused by an env var override, fix the env var naming

Example fix

// before (config.toml)
daemon..sync_frequency = "10s"
// after
daemon.sync_frequency = "10s"
Defensive patterns

Strategy: validation

Validate before calling

// before loading config, check path keys parse as dotted config keys
fn check_override_key(key: &str) -> Result<(), String> {
    if key.is_empty() || key.split('.').any(|p| p.is_empty()) {
        return Err(format!("invalid override key: {key}"));
    }
    Ok(())
}

Type guard

fn is_valid_override_key(key: &str) -> bool {
    !key.is_empty() && key.split('.').all(|p| !p.is_empty() && p.chars().all(|c| c.is_alphanumeric() || c == '_' || c == '-'))
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Understand the failure class

Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.

Related errors


AI-assisted analysis of atuinsh/atuin@900007c480 (2026-09-19). Data as JSON: /api/errors/572bf656792f0725. Report an issue: GitHub.

Appendix: source

Thrown at crates/atuin-client/src/settings.rs:1716

            "logs.search.file",
            "logs.daemon.file",
        ]
        .iter()
        .map(|key| (key, built.get_string(key).unwrap_or_default()))
        // An unset optional path (`daemon.socket_path`) must stay unset rather
        // than be overridden with an empty one.
        .filter(|(_, value)| !value.is_empty())
        .filter_map(|(key, value)| match Self::expand_path(&value) {
            Ok(expanded) => Some((key, expanded)),
            Err(e) => {
                tracing::warn!("failed to expand path for {key}: {e}");
                None
            }
        })
        .fold(config_builder, |builder, (key, value)| {
            builder
                .set_override(key, value)
                .unwrap_or_else(|_| panic!("failed to set absolute path override for {key}"))
        });

        config_builder.build().map_err(Into::into)
    }

    /// Look up a single config value by dotted key (e.g. `"daemon.sync_frequency"`).
    ///
    /// Returns the effective value after merging defaults, config file, and
    /// environment — without the side-effects of full `Settings` construction
    /// (meta store init, path expansion, etc.).
    pub fn get_config_value(key: &str) -> Result<String> {
        use config::Value;

        #[cfg_attr(not(unix), allow(unused_mut))]
        let mut config = Self::build_config()?;

        // When unset, `daemon.socket_path` is calculated dynamically by [`Daemon::socket_path`] and
        // wouldn't show up in `atuin config get --resolved daemon.socket_path`. However, it may be

View on GitHub (pinned to 900007c480)