{"record":{"id":"e36f8a7667932246","repo":"astrid-runtime/astrid","slug":"detached-fuse-service-access-access-does-not-m","errorCode":null,"errorMessage":"detached FUSE service access {access:?} does not match lease","messagePattern":"detached FUSE service access (.+?) does not match lease","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/astrid-storage-provider-fuse/src/main.rs","lineNumber":363,"sourceCode":"        ControlResponse::Done => {\n            bail!(\"detached FUSE service returned an incompatible readiness response\")\n        },\n    }\n}\n\nasync fn sync(\n    client: &mut AdminClient,\n    acting_principal: &astrid_core::PrincipalId,\n    selector: &StorageMountSelectorV1,\n) -> Result<StorageProviderSuccessV1> {\n    let record = registry::resolve_record(selector)?;\n    let status = require_live_lease(client, acting_principal, &record).await?;\n    validate_record(&record, &status)?;\n    let control = live_control_status(client, acting_principal, &record).await?;\n    match control {\n        ControlResponse::Status { access } if access == record.access => {},\n        ControlResponse::Status { access } => {\n            bail!(\"detached FUSE service access {access:?} does not match lease\")\n        },\n        ControlResponse::Done => bail!(\"FUSE service returned an incompatible status response\"),\n        ControlResponse::Failure { code, message } => {\n            bail!(\"FUSE service status failed [{code}]: {message}\")\n        },\n    }\n    into_success(\n        client\n            .request(AdminRequestKind::StorageMountSync {\n                mount_id: record.mount_id,\n            })\n            .await?,\n    )?;\n    Ok(StorageProviderSuccessV1::Synced {\n        mount_id: record.mount_id,\n    })\n}\n","sourceCodeStart":345,"sourceCodeEnd":381,"githubUrl":"https://github.com/astrid-runtime/astrid/blob/affd8760f44190dbdfbec23403f4c4b642c33112/crates/astrid-storage-provider-fuse/src/main.rs#L345-L381","documentation":"This error means a live FUSE service's control status returned `ControlResponse::Status` whose `access` does not match the `record.access` stored for that lease. During sync/validation, the library cross-checks the service's live configuration against the persisted record; a mismatch means the running mount does not correspond to the recorded lease. It is thrown in main.rs:363 after `require_live_lease` and `validate_record` succeed.","triggerScenarios":"Calling the sync/status path where `live_control_status` yields `Status { access }` with access != record.access — different access mode, owner, or lease token than recorded.","commonSituations":"A service started with older parameters still running while the lease record was updated; manual mutation of records; partial upgrade where service and admin client use different access struct versions; two services sharing one control socket path.","solutions":["Restart the detached service from the current lease record so its access matches.","Update or reconcile the lease record if the service's access is actually the intended one.","Ensure only one service owns the control socket path; kill duplicates and clean artifacts.","Verify both sides use the same crate version so StorageProviderAccessV1 equality is reliable."],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":null,"typeGuard":"fn access_matches(control: &ControlResponse, record: &LeaseRecord) -> bool {\n    matches!(control, ControlResponse::Status { access } if access == &record.access)\n}","tryCatchPattern":"match sync(client, principal, record).await {\n    Err(e) if e.to_string().contains(\"does not match lease\") => {\n        // restart service from current record or reconcile the record\n    }\n    r => r?,\n}","preventionTips":["Restart the service whenever the lease record's access changes","Ensure a single service owns each control socket path","Keep admin client and service on the same crate version"],"tags":["fuse","lease","access-control","consistency"],"backgroundTag":"invalid-state-transition","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"}