zeroclaw-labs/zeroclaw · warning

Uno Q host must contain at most one '@'

Error message

Uno Q host must contain at most one '@'

What it means

validated_ssh_target splits the value on '@' and requires at most one separator, so 'user@host' or bare 'host' (user defaults to 'arduino') are the only accepted shapes. This bail fires on values with two or more '@' characters — 'user@@host', 'a@b@c' — because they are ambiguous between user and host and cannot be safely passed to ssh/scp.

Source

Thrown at crates/zeroclaw-hardware/src/peripherals/uno_q_setup.rs:87

        .status()
        .context("arduino-app-cli start failed")?;
    if !status.success() {
        anyhow::bail!("Failed to start Bridge app. Ensure arduino-app-cli is installed on Uno Q.");
    }

    println!("ZeroClaw Bridge app started. Add to config.toml:");
    println!("  [[peripherals.boards]]");
    println!("  board = \"arduino-uno-q\"");
    println!("  transport = \"bridge\"");
    Ok(())
}

fn validated_ssh_target(value: &str) -> Result<String> {
    let mut parts = value.split('@');
    let first = parts.next().unwrap_or_default();
    let second = parts.next();
    if parts.next().is_some() {
        anyhow::bail!("Uno Q host must contain at most one '@'");
    }

    let (user, host) = match second {
        Some(host) => (first, host),
        None => ("arduino", first),
    };

    if !valid_ssh_user(user) {
        anyhow::bail!(
            "Invalid Uno Q SSH user: use only ASCII letters, digits, '.', '_', or '-' and do not begin with '-'"
        );
    }
    if !valid_ssh_host(host) {
        anyhow::bail!(
            "Invalid Uno Q host: use a DNS hostname or IPv4 address without SSH/SCP syntax characters"
        );
    }

View on GitHub (pinned to 88bb9c8533)

Solutions

  1. Use the single supported shape: 'host' or 'user@host', e.g. 'operator@uno-q.local'
  2. Strip accidental double '@' characters and re-check the value before passing it

Example fix

# before
setup_uno_q_bridge(Some("arduino@@192.168.0.48"))

# after
setup_uno_q_bridge(Some("arduino@192.168.0.48"))
Defensive patterns

Strategy: type-guard

Validate before calling

if !is_valid_ssh_target_shape(host) {
    anyhow::bail!("expected 'host' or 'user@host', got {host:?}");
}
setup_uno_q_bridge(Some(host))?;

Type guard

fn is_valid_ssh_target_shape(value: &str) -> bool {
    !value.is_empty() && value.matches('@').count() <= 1
}

Prevention

When it happens

Trigger: Passing a host string like 'team@deploy@uno-q.local' or a typo'd 'arduino@@192.168.0.48' to setup_uno_q_bridge(Some(host)).

Common situations: Copy-pasted targets that already include a destination or doubled separator; templated config values injecting an extra '@'; attempts to smuggle extra ssh syntax through the host field.

Related errors


AI-assisted analysis of zeroclaw-labs/zeroclaw@88bb9c8533 (2026-08-23). Data as JSON: /api/errors/6999d7555240f3ee. Report an issue: GitHub.