{"record":{"id":"0c59b0bf36451879","repo":"astrid-runtime/astrid","slug":"fuse-service-mountpoint-overlaps-the-lease-resourc","errorCode":null,"errorMessage":"FUSE service mountpoint overlaps the lease resource","messagePattern":"FUSE service mountpoint overlaps the lease resource","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/astrid-storage-provider-fuse/src/service.rs","lineNumber":256,"sourceCode":"        bail!(\"FUSE launch lease does not match the kernel manifest\");\n    }\n    Ok(())\n}\n\nfn validate_mountpoint(mountpoint: &Path, resource_path: &Path) -> Result<()> {\n    if !mountpoint.is_absolute()\n        || mountpoint\n            .components()\n            .any(|component| matches!(component, std::path::Component::ParentDir))\n        || mountpoint.parent().is_none()\n    {\n        bail!(\"FUSE service mountpoint is malformed\");\n    }\n    if mountpoint == resource_path\n        || mountpoint.starts_with(resource_path)\n        || resource_path.starts_with(mountpoint)\n    {\n        bail!(\"FUSE service mountpoint overlaps the lease resource\");\n    }\n    platform_fs::validate_private_directory(mountpoint)\n        .context(\"validate private FUSE service mountpoint\")?;\n    platform_fs::verify_no_redirects(mountpoint)\n        .context(\"reject redirected FUSE service mountpoint\")?;\n    if std::fs::read_dir(mountpoint)?.next().is_some() {\n        bail!(\"FUSE service mountpoint is not empty\");\n    }\n    if mountpoint::mountinfo_contains(mountpoint)? {\n        bail!(\"FUSE service mountpoint is already mounted\");\n    }\n    Ok(())\n}\n\nfn validate_control_path(control_path: &Path, resource_path: &Path) -> Result<()> {\n    if !control_path.is_absolute()\n        || control_path\n            .components()","sourceCodeStart":238,"sourceCodeEnd":274,"githubUrl":"https://github.com/astrid-runtime/astrid/blob/affd8760f44190dbdfbec23403f4c4b642c33112/crates/astrid-storage-provider-fuse/src/service.rs#L238-L274","documentation":"validate_mountpoint rejects any mountpoint that equals the lease resource_path, lies under it, or contains it. Mounting FUSE over the directory that holds the lease manifest (or nesting the two) would shadow or corrupt the lease data the service itself needs, so the launch is aborted.","triggerScenarios":"Calling validate_launch where mountpoint == resource_path, mountpoint.starts_with(resource_path), or resource_path.starts_with(mountpoint) — i.e. the mount target and the lease directory overlap.","commonSituations":"Configuring both the lease directory and the mountpoint to the same path (e.g. /run/astrid/leases/x for both); nesting the mountpoint inside the lease directory; pointing resource_path at an existing user mount directory by mistake.","solutions":["Choose a mountpoint path that is fully disjoint from the lease resource_path (neither is a prefix of the other)","Use separate directory conventions, e.g. /run/astrid/leases/<id> for resource_path and /run/astrid/mounts/<id> for the mountpoint","Review generated config so path templating cannot yield the same base directory for both fields"],"exampleFix":"// before\nresource_path = /run/astrid/leases/demo\nmountpoint    = /run/astrid/leases/demo/mnt  // overlaps\n\n// after\nresource_path = /run/astrid/leases/demo\nmountpoint    = /run/astrid/mounts/demo","handlingStrategy":"validation","validationCode":"let m = std::path::absolute(mountpoint)?;\nlet r = std::path::absolute(resource_path)?;\nif m == r || m.starts_with(&r) || r.starts_with(&m) { /* pick a disjoint path */ }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep lease dirs (/run/astrid/leases/<id>) and mount dirs (/run/astrid/mounts/<id>) in disjoint trees","Validate overlap in config tooling before launching"],"tags":["fuse","path-validation","mountpoint","path-overlap"],"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"}