astrid-runtime/astrid · error

this executable is an Astrid provider companion, not an…

Error message

this executable is an Astrid provider companion, not an interactive command

What it means

The astrid-storage-provider-fuse binary is a provider companion driven exclusively by its service subcommands (stdio mode, detached service v1, public service). Any other invocation is rejected with this message and exit code 2, since there is no interactive CLI. The error text is printed to stderr prefixed with the provider name.

Solutions

  1. Invoke the binary only through the Astrid host, which passes the proper service argument.
  2. Check the exact service flag spelling against PUBLIC_SERVICE_ARGUMENT in main.rs.
  3. Do not use this executable interactively; use the parent Astrid CLI for user-facing commands.

Example fix

// before
./astrid-storage-provider-fuse mount /mnt/x
// after (driven by the host)
./astrid-storage-provider-fuse --astrid-provider-fuse-service-v1
Defensive patterns

Strategy: validation

Validate before calling

const KNOWN: &[&str] = &[
    "--stdio-mode-argument",
    "--astrid-provider-fuse-service-v1",
    PUBLIC_SERVICE_ARGUMENT,
];
if !KNOWN.contains(&arg.as_str()) { /* don't invoke the companion directly */ }

Try / catch

match run().await {
    Ok(()) => {},
    Err(e) => { eprintln!("{PROVIDER_NAME}: {e:#}"); std::process::exit(2); }
}

Prevention

When it happens

Trigger: Running the executable with no arguments or with unrecognized arguments, so none of the known argument branches (stdio mode, --astrid-provider-fuse-service-v1, PUBLIC_SERVICE_ARGUMENT) match.

Common situations: Users double-clicking or running the binary directly expecting a CLI; wrapping scripts invoking it with the wrong service argument; typos in the service flag name.

Understand the failure class

Background: "Unknown argument", "Invalid value", and "must be one of": invalid CLI argument errors explained — this error's family across 35 libraries.

Related errors


AI-assisted analysis of astrid-runtime/astrid@affd8760f4 (2026-09-09). Data as JSON: /api/errors/7b00c5649d2cedd5. Report an issue: GitHub.

Appendix: source

Thrown at crates/astrid-storage-provider-fuse/src/main.rs:144

mod rollback;
mod service;

const PROVIDER_NAME: &str = "astrid-storage-provider-fuse";
const MAX_REQUEST_BYTES: u64 = 64 * 1024;
const SERVICE_STARTUP_TIMEOUT: Duration = Duration::from_secs(30);
const PUBLIC_SERVICE_ARGUMENT: &str = "--astrid-provider-fuse-public-service-v1";

#[tokio::main]
async fn main() -> ExitCode {
    let arguments = std::env::args_os().skip(1).collect::<Vec<_>>();
    let result = if arguments.as_slice() == ["--astrid-provider-stdio-v1"] {
        run_stdio().await
    } else if arguments.as_slice() == ["--astrid-provider-fuse-service-v1"] {
        service::run().await
    } else if arguments.as_slice() == [PUBLIC_SERVICE_ARGUMENT] {
        run_public_service().await
    } else {
        Err(anyhow::anyhow!(
            "this executable is an Astrid provider companion, not an interactive command"
        ))
    };
    if let Err(error) = result {
        eprintln!("{PROVIDER_NAME}: {error:#}");
        return ExitCode::from(2);
    }
    ExitCode::SUCCESS
}

async fn run_stdio() -> Result<()> {
    let mut bytes = Vec::new();
    std::io::stdin()
        .lock()
        .take(MAX_REQUEST_BYTES + 1)
        .read_to_end(&mut bytes)?;
    if bytes.len() as u64 > MAX_REQUEST_BYTES {
        bail!("provider request exceeds limit");

View on GitHub (pinned to affd8760f4)