{"record":{"id":"a7c8511cee147dd5","repo":"astrid-runtime/astrid","slug":"this-executable-is-an-astrid-winfsp-provider-not","errorCode":null,"errorMessage":"this executable is an Astrid WinFsp provider, not an interactive command","messagePattern":"this executable is an Astrid WinFsp provider, not an interactive command","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"crates/astrid-storage-provider-winfsp/src/main.rs","lineNumber":88,"sourceCode":"    let response = run().await;\n    match response {\n        Ok(response) => {\n            if serde_json::to_writer(std::io::stdout().lock(), &response).is_err() {\n                std::process::exit(2);\n            }\n            println!();\n        },\n        Err(error) => {\n            eprintln!(\"{PROVIDER_NAME}: {error:#}\");\n            std::process::exit(2);\n        },\n    }\n}\n\nasync fn run() -> Result<StorageProviderResponseV1> {\n    let arguments = std::env::args_os().skip(1).collect::<Vec<_>>();\n    if arguments.as_slice() != [std::ffi::OsStr::new(\"--astrid-provider-stdio-v1\")] {\n        bail!(\"this executable is an Astrid WinFsp provider, not an interactive command\");\n    }\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        .context(\"read provider request\")?;\n    if bytes.len() as u64 > MAX_REQUEST_BYTES {\n        bail!(\"provider request exceeds limit\");\n    }\n    let request: StorageProviderRequestV1 =\n        serde_json::from_slice(&bytes).context(\"decode provider request\")?;\n    if request.protocol_version != STORAGE_PROVIDER_PROTOCOL_V1 {\n        bail!(\"unsupported provider protocol {}\", request.protocol_version);\n    }\n    let request_id = request.request_id;\n    let outcome = match execute(request).await {\n        Ok(success) => StorageProviderOutcomeV1::Success(success),","sourceCodeStart":70,"sourceCodeEnd":106,"githubUrl":"https://github.com/astrid-runtime/astrid/blob/affd8760f44190dbdfbec23403f4c4b642c33112/crates/astrid-storage-provider-winfsp/src/main.rs#L70-L106","documentation":"The WinFsp provider executable is not a general-purpose CLI: run() requires the sole argument to be exactly --astrid-provider-stdio-v1, through which the host passes a request on stdin. Any other invocation (double-click, bare run, wrong flags) is rejected with this message.","triggerScenarios":"Executing the provider binary with no arguments, with the wrong flag, with extra arguments, or without the exact --astrid-provider-stdio-v1 argument; only the exact single-argument form is accepted.","commonSituations":"A user double-clicks the .exe or runs it in a terminal expecting an interactive tool; a service manifest or script passes a misspelled or extra argument; documentation confuses the provider binary with an admin CLI.","solutions":["Do not run this binary interactively — it is driven by the Astrid host over stdio.","If invoking manually for testing, pass exactly one argument: --astrid-provider-stdio-v1, and pipe a StorageProviderRequestV1 JSON on stdin.","Use the intended Astrid management CLI/service to launch mounts instead of the provider binary directly.","Check any launcher script or service definition for typos or extra arguments in the command line."],"exampleFix":"// before: bare invocation\n$ astrid-storage-provider-winfsp.exe\n// after: exact provider handshake invocation\n$ echo '{\"protocol_version\":1,...}' | astrid-storage-provider-winfsp.exe --astrid-provider-stdio-v1","handlingStrategy":"validation","validationCode":"// Guard any manual invocation:\nconst ARGS: &[&OsStr] = &[OsStr::new(\"--astrid-provider-stdio-v1\")];\nlet ok = std::env::args_os().skip(1).collect::<Vec<_>>() == ARGS;\nif !ok { eprintln!(\"run via the Astrid host, not directly\"); }","typeGuard":null,"tryCatchPattern":"// Only relevant if you shell out to the provider:\nlet status = Command::new(provider_exe)\n    .arg(\"--astrid-provider-stdio-v1\")\n    .stdin(Stdio::piped())\n    .status()?;","preventionTips":["Launch the provider only through the Astrid host/service","Never expose the provider binary as a user-facing command","In test harnesses, always pass the exact --astrid-provider-stdio-v1 flag"],"tags":["winfsp","cli","launch-guard","stdio"],"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"}