{"record":{"id":"1ea4d9387879979a","repo":"astrid-runtime/astrid","slug":"fskit-service-control-path-is-not-the-kernel-endpo","errorCode":null,"errorMessage":"FSKit service control path is not the kernel endpoint","messagePattern":"FSKit service control path is not the kernel endpoint","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/astrid-storage-provider-fskit/src/service.rs","lineNumber":198,"sourceCode":"}\n\nfn validate_control_path(control_path: &Path, resource_path: &Path) -> Result<()> {\n    if !control_path.is_absolute()\n        || control_path\n            .components()\n            .any(|component| matches!(component, std::path::Component::ParentDir))\n    {\n        bail!(\"FSKit service control path is malformed\");\n    }\n    let parent = control_path\n        .parent()\n        .context(\"FSKit service control path has no parent\")?;\n    platform_fs::validate_private_directory(parent)\n        .context(\"validate private FSKit control parent\")?;\n    platform_fs::verify_no_redirects(control_path)\n        .context(\"reject redirected FSKit control path\")?;\n    if control_path != resource_path.join(\"process-control.sock\") {\n        bail!(\"FSKit service control path is not the kernel endpoint\");\n    }\n    if local_transport::endpoint_is_present(control_path)\n        .context(\"inspect FSKit service control endpoint\")?\n    {\n        bail!(\"FSKit service control endpoint is already present\");\n    }\n    Ok(())\n}\n\nfn bind_control(path: &Path) -> Result<LocalListener> {\n    local_transport::bind(path)\n        .with_context(|| format!(\"bind FSKit service control {}\", path.display()))\n}\n\nasync fn probe_callback(launch: &StorageProviderServiceLaunchV1) -> Result<()> {\n    let mut stream = local_transport::connect(&launch.lease.callback_path)\n        .await\n        .context(\"connect FSKit lease callback\")?;","sourceCodeStart":180,"sourceCodeEnd":216,"githubUrl":"https://github.com/astrid-runtime/astrid/blob/affd8760f44190dbdfbec23403f4c4b642c33112/crates/astrid-storage-provider-fskit/src/service.rs#L180-L216","documentation":"validate_control_path enforces that the control socket lives exactly at resource_path/process-control.sock, the fixed kernel endpoint. Any other location breaks the kernel's discovery contract and is rejected after redirect checks.","triggerScenarios":"validate_launch supplies a control_path that is absolute and clean but differs from resource_path.join(\"process-control.sock\") — e.g. a custom socket filename or a path under another directory.","commonSituations":"Hand-edited service configs renaming the socket; moving the control socket to /tmp or a run directory; providers generated by older versions with a different naming scheme.","solutions":["Set control_path to resource_path.join(\"process-control.sock\")","Regenerate the service launch config using the provider defaults","Remove overrides of the control path in config/templates"],"exampleFix":"// before\ncontrol_path: PathBuf::from(\"/run/fskit/ctl.sock\")\n// after\ncontrol_path: launch.lease.resource_path.join(\"process-control.sock\")","handlingStrategy":"validation","validationCode":"fn control_at_kernel_endpoint(lease: &StorageMountLeaseV1, control: &std::path::Path) -> bool {\n    control == lease.resource_path.join(\"process-control.sock\")\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Derive control_path from resource_path programmatically instead of configuring it","Pin provider versions so endpoint naming is consistent","Add a config-lint that asserts the endpoint layout before launch"],"tags":["fskit","control-path","socket","validation"],"backgroundTag":"invalid-argument-value","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"}