{"record":{"id":"02fbcb3ec7c72fc3","repo":"astrid-runtime/astrid","slug":"unsupported-winfsp-service-launch-schema","errorCode":null,"errorMessage":"unsupported WinFsp service launch schema {}","messagePattern":"unsupported WinFsp service launch schema (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/astrid-storage-provider-winfsp/src/win.rs","lineNumber":238,"sourceCode":"        mount_id: launch.lease.mount_id.as_uuid(),\n        control_path: launch.control_path.clone(),\n        challenge,\n    };\n    let mut stdout = std::io::stdout().lock();\n    serde_json::to_writer(&mut stdout, &ready).context(\"encode WinFsp readiness\")?;\n    stdout\n        .write_all(b\"\\n\")\n        .context(\"terminate WinFsp readiness response\")?;\n    stdout.flush().context(\"flush WinFsp readiness\")?;\n\n    let result = private_service_loop(filesystem, listener, &launch).await;\n    let _ = local_transport::remove_endpoint(&launch.control_path);\n    result\n}\n\nfn validate_service_launch(launch: &StorageProviderServiceLaunchV1) -> Result<()> {\n    if launch.schema != STORAGE_FILESYSTEM_SERVICE_LAUNCH_SCHEMA_V1 {\n        bail!(\"unsupported WinFsp service launch schema {}\", launch.schema);\n    }\n    if launch.parent.pid <= 1 || launch.parent.pid == std::process::id() {\n        bail!(\"WinFsp service parent PID is invalid\");\n    }\n    if launch.parent.token.len() < 16\n        || launch.parent.token.len() > 512\n        || launch.parent.token.chars().any(char::is_control)\n    {\n        bail!(\"WinFsp service parent token is invalid\");\n    }\n    if let Some(identity) = launch.parent.start_identity.as_deref()\n        && (identity.is_empty() || identity.len() > 512 || identity.chars().any(char::is_control))\n    {\n        bail!(\"WinFsp service parent start identity is invalid\");\n    }\n    if launch.parent.start_identity.is_none() {\n        bail!(\"WinFsp service parent start identity is required on Windows\");\n    }","sourceCodeStart":220,"sourceCodeEnd":256,"githubUrl":"https://github.com/astrid-runtime/astrid/blob/affd8760f44190dbdfbec23403f4c4b642c33112/crates/astrid-storage-provider-winfsp/src/win.rs#L220-L256","documentation":"validate_service_launch rejects a StorageProviderServiceLaunchV1 whose schema field does not equal STORAGE_FILESYSTEM_SERVICE_LAUNCH_SCHEMA_V1. The schema constant is a compatibility marker between parent and service; a mismatch means the payload layout may differ in unsafe ways, so the service refuses to interpret it.","triggerScenarios":"service_main calls validate_service_launch with a launch document whose schema string differs from the compiled-in V1 constant — typically a launch produced by a different version of the crate, or a hand-edited/templated launch file.","commonSituations":"Mixing versions of astrid-storage-provider-winfsp binaries (old parent, new service); a partial upgrade leaving mismatched binaries on PATH; hand-crafting the launch JSON for testing with the wrong schema string.","solutions":["Ensure the parent and the WinFsp service binary come from the same build/version of the crate","Rebuild/redeploy both components together after any schema change","Fix the schema field in generated or hand-written launch documents to STORAGE_FILESYSTEM_SERVICE_LAUNCH_SCHEMA_V1","Check PATH/shadowing: an older service exe may be the one being launched"],"exampleFix":"// before\n{\"schema\":\"storage.filesystem.service.launch.v0\", ...}\n// after\n{\"schema\":\"storage.filesystem.service.launch.v1\", ...}","handlingStrategy":"validation","validationCode":"if launch.schema != STORAGE_FILESYSTEM_SERVICE_LAUNCH_SCHEMA_V1 {\n    return Err(format!(\"expected schema {}, got {}\", STORAGE_FILESYSTEM_SERVICE_LAUNCH_SCHEMA_V1, launch.schema));\n}","typeGuard":"fn is_v1_launch(launch: &StorageProviderServiceLaunchV1) -> bool {\n    launch.schema == STORAGE_FILESYSTEM_SERVICE_LAUNCH_SCHEMA_V1\n}","tryCatchPattern":"match service_err {\n    Err(e) if e.to_string().contains(\"unsupported\") && e.to_string().contains(\"schema\") => {\n        eprintln!(\"version mismatch: align parent and service binaries\");\n    }\n    other => other?,\n}","preventionTips":["Deploy parent and service binaries from the same build","Version-check the service on PATH before launch","Never hand-edit the schema field in launch documents"],"tags":["windows","winfsp","schema","versioning"],"backgroundTag":"schema-validation-failed","analyzedSha":"affd8760f44190dbdfbec23403f4c4b642c33112","analyzedAt":"2026-09-09T21:28:12.402Z","contentChangedAt":"2026-09-09T21:28:12.402Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}