{"record":{"id":"7b00c5649d2cedd5","repo":"astrid-runtime/astrid","slug":"this-executable-is-an-astrid-provider-companion-n-7b00c5","errorCode":null,"errorMessage":"this executable is an Astrid provider companion, not an interactive command","messagePattern":"this executable is an Astrid provider companion, not an interactive command","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/astrid-storage-provider-fuse/src/main.rs","lineNumber":144,"sourceCode":"mod rollback;\nmod service;\n\nconst PROVIDER_NAME: &str = \"astrid-storage-provider-fuse\";\nconst MAX_REQUEST_BYTES: u64 = 64 * 1024;\nconst SERVICE_STARTUP_TIMEOUT: Duration = Duration::from_secs(30);\nconst PUBLIC_SERVICE_ARGUMENT: &str = \"--astrid-provider-fuse-public-service-v1\";\n\n#[tokio::main]\nasync fn main() -> ExitCode {\n    let arguments = std::env::args_os().skip(1).collect::<Vec<_>>();\n    let result = if arguments.as_slice() == [\"--astrid-provider-stdio-v1\"] {\n        run_stdio().await\n    } else if arguments.as_slice() == [\"--astrid-provider-fuse-service-v1\"] {\n        service::run().await\n    } else if arguments.as_slice() == [PUBLIC_SERVICE_ARGUMENT] {\n        run_public_service().await\n    } else {\n        Err(anyhow::anyhow!(\n            \"this executable is an Astrid provider companion, not an interactive command\"\n        ))\n    };\n    if let Err(error) = result {\n        eprintln!(\"{PROVIDER_NAME}: {error:#}\");\n        return ExitCode::from(2);\n    }\n    ExitCode::SUCCESS\n}\n\nasync fn run_stdio() -> Result<()> {\n    let mut bytes = Vec::new();\n    std::io::stdin()\n        .lock()\n        .take(MAX_REQUEST_BYTES + 1)\n        .read_to_end(&mut bytes)?;\n    if bytes.len() as u64 > MAX_REQUEST_BYTES {\n        bail!(\"provider request exceeds limit\");","sourceCodeStart":126,"sourceCodeEnd":162,"githubUrl":"https://github.com/astrid-runtime/astrid/blob/affd8760f44190dbdfbec23403f4c4b642c33112/crates/astrid-storage-provider-fuse/src/main.rs#L126-L162","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Invoke the binary only through the Astrid host, which passes the proper service argument.","Check the exact service flag spelling against PUBLIC_SERVICE_ARGUMENT in main.rs.","Do not use this executable interactively; use the parent Astrid CLI for user-facing commands."],"exampleFix":"// before\n./astrid-storage-provider-fuse mount /mnt/x\n// after (driven by the host)\n./astrid-storage-provider-fuse --astrid-provider-fuse-service-v1","handlingStrategy":"validation","validationCode":"const KNOWN: &[&str] = &[\n    \"--stdio-mode-argument\",\n    \"--astrid-provider-fuse-service-v1\",\n    PUBLIC_SERVICE_ARGUMENT,\n];\nif !KNOWN.contains(&arg.as_str()) { /* don't invoke the companion directly */ }","typeGuard":null,"tryCatchPattern":"match run().await {\n    Ok(()) => {},\n    Err(e) => { eprintln!(\"{PROVIDER_NAME}: {e:#}\"); std::process::exit(2); }\n}","preventionTips":["Launch this binary only through the Astrid host, which supplies the correct service argument.","Copy the exact service flag string from main.rs rather than retyping it.","Do not expose this companion binary on PATH for interactive users."],"tags":["cli","usage","rust"],"backgroundTag":"invalid-cli-argument","analyzedSha":"affd8760f44190dbdfbec23403f4c4b642c33112","analyzedAt":"2026-09-09T21:28:12.402Z","contentChangedAt":"2026-09-09T21:28:12.402Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}