{"record":{"id":"58b1fb6958b22f41","repo":"astrid-runtime/astrid","slug":"fuse-callback-path-is-not-the-kernel-lease-endpoin","errorCode":null,"errorMessage":"FUSE callback path is not the kernel lease endpoint","messagePattern":"FUSE callback path is not the kernel lease endpoint","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/astrid-storage-provider-fuse/src/service.rs","lineNumber":222,"sourceCode":"fn validate_lease(lease: &StorageMountLeaseV1) -> Result<()> {\n    if lease.lease_token.len() < 16\n        || lease.lease_token.len() > 4096\n        || lease.lease_token.chars().any(char::is_control)\n    {\n        bail!(\"invalid FUSE callback token\");\n    }\n    let now = SystemTime::now()\n        .duration_since(UNIX_EPOCH)\n        .context(\"read system clock\")?\n        .as_secs();\n    if lease.expires_at_epoch_secs < now {\n        bail!(\"FUSE lease is expired\");\n    }\n    if !lease.resource_path.is_absolute() || !lease.callback_path.is_absolute() {\n        bail!(\"FUSE lease paths must be absolute\");\n    }\n    if lease.callback_path != lease.resource_path.join(\"control.sock\") {\n        bail!(\"FUSE callback path is not the kernel lease endpoint\");\n    }\n    platform_fs::validate_private_directory(&lease.resource_path)\n        .context(\"validate private FUSE lease resource\")?;\n    platform_fs::verify_no_redirects(&lease.resource_path)\n        .context(\"reject redirected FUSE lease resource\")?;\n    let manifest_path = lease.resource_path.join(\"lease.json\");\n    platform_fs::validate_private_file(&manifest_path)\n        .context(\"validate private FUSE lease manifest\")?;\n    let manifest = std::fs::read(&manifest_path).context(\"read FUSE lease manifest\")?;\n    if manifest.len() > 64 * 1024 {\n        bail!(\"FUSE lease manifest exceeds the bounded size\");\n    }\n    let admitted: StorageMountLeaseV1 =\n        serde_json::from_slice(&manifest).context(\"decode FUSE lease manifest\")?;\n    if admitted != *lease {\n        bail!(\"FUSE launch lease does not match the kernel manifest\");\n    }\n    Ok(())","sourceCodeStart":204,"sourceCodeEnd":240,"githubUrl":"https://github.com/astrid-runtime/astrid/blob/affd8760f44190dbdfbec23403f4c4b642c33112/crates/astrid-storage-provider-fuse/src/service.rs#L204-L240","documentation":"The callback path must be exactly `<resource_path>/control.sock` — the fixed endpoint the kernel/parent expects for lease control traffic. A callback path pointing anywhere else is rejected so the helper and parent always agree on the control socket location.","triggerScenarios":"`validate_lease` compares `lease.callback_path != lease.resource_path.join(\"control.sock\")` and bails when they differ during `validate_launch`.","commonSituations":"Hand-written lease.json with a custom socket name; two mounts configured with colliding paths moved the callback elsewhere; a refactor renamed the socket on one side only; copied lease config from another mount with a different resource path.","solutions":["Derive `callback_path` as `resource_path.join(\"control.sock\")` instead of setting it independently.","Regenerate the lease with the standard broker so both paths are consistent.","Fix lease.json (or lease-construction code) so callback_path matches the required endpoint.","If you need a different socket location, change the resource_path — the callback follows it."],"exampleFix":"// before\ncallback_path: PathBuf::from(\"/run/astrid/fuse.sock\"),\n// after\ncallback_path: resource_path.join(\"control.sock\"),","handlingStrategy":"validation","validationCode":"fn callback_matches(lease: &StorageMountLeaseV1) -> bool {\n    lease.callback_path == lease.resource_path.join(\"control.sock\")\n}\nif !callback_matches(&lease) { return Err(\"callback path mismatch\"); }","typeGuard":"fn has_kernel_lease_endpoint(lease: &StorageMountLeaseV1) -> bool {\n    lease.callback_path == lease.resource_path.join(\"control.sock\")\n}","tryCatchPattern":null,"preventionTips":["Always derive callback_path as resource_path.join(\"control.sock\")","Never hand-edit callback_path in lease.json","Let the broker generate both paths together so they stay consistent"],"tags":["fuse","paths","validation","ipc"],"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"}