astrid-runtime/astrid · error
FUSE provider registry filename does not match its mount…
Error message
FUSE provider registry filename does not match its mount identity: {} What it means
When loading the FUSE provider registry, each record file's filename stem must equal the mount_id stored inside the JSON record. A mismatch means the file was renamed, copied, or corrupted, so load_registry bails rather than trusting inconsistent registry state.
Solutions
- Rename the file so its stem matches the record's mount_id field
- Delete the offending record file if the mount is stale
- Regenerate the registry by re-registering the mount
- Inspect the JSON record to confirm its mount_id before renaming
Example fix
// before mv abc123.json deadbeef.json # stem no longer matches mount_id // after # keep filename stem equal to record.mount_id mv deadbeef.json abc123.json
Defensive patterns
Strategy: validation
Validate before calling
fn record_filename_matches(path: &std::path::Path, mount_id: uuid::Uuid) -> bool {
path.file_stem()
.map(|s| s.to_string_lossy() == mount_id.to_string())
.unwrap_or(false)
} Try / catch
match load_registry() {
Err(e) if e.to_string().contains("does not match its mount identity") => {
eprintln!("registry file renamed/corrupted; remove or rename the offending record");
}
other => other?,
} Prevention
- Never rename registry record files manually or in scripts
- Let the library create and clean up registry records
- Back up and restore the registry directory atomically (whole directory)
- Validate registry consistency after restoring from backups
When it happens
Trigger: Manually renaming a record file in the registry directory; copying a record file to a new name; a crash or tooling writing a record under the wrong filename; restoring backups with stale names.
Common situations: Hand-editing or scripts renaming registry files; syncing registry dirs between machines; partial cleanup that renamed but did not rewrite records.
Understand the failure class
Background: "This is a bug, please report it": internal invariant violations, unreachable panics, and SNH errors explained — this error's family across 47 libraries.
Related errors
- capsule disappeared during durable contracts scan
- capsule disappeared during introspection
- capsule ' ' not found in registry
- capsule name ' ' is invalid (must match ^[a-z][a-z0-9-]*$)
- corpus label must contain only lowercase ASCII letters…
AI-assisted analysis of astrid-runtime/astrid@affd8760f4 (2026-09-09).
Data as JSON: /api/errors/3a9ebec64c4cdd76.
Report an issue: GitHub.
Appendix: source
Thrown at crates/astrid-storage-provider-fuse/src/registry.rs:68
let entries = std::fs::read_dir(&directory);
let entries = match entries {
Ok(entries) => entries,
Err(error) if error.kind() == std::io::ErrorKind::NotFound => return Ok(records),
Err(error) => return Err(error).context("read FUSE provider registry"),
};
for entry in entries {
let entry = entry?;
let path = entry.path();
if path.extension().is_none_or(|extension| extension != "json") {
continue;
}
let record: MountRecord = serde_json::from_slice(&std::fs::read(&path)?)
.with_context(|| format!("decode FUSE provider record {}", path.display()))?;
if path
.file_stem()
.is_none_or(|stem| stem.to_string_lossy() != record.mount_id.to_string())
{
anyhow::bail!(
"FUSE provider registry filename does not match its mount identity: {}",
path.display()
);
}
let key = path_key(&record.mountpoint)?;
if let Some(existing) = records.insert(key, record.clone()) {
anyhow::bail!(
"duplicate FUSE provider mountpoint {} in records {} and {}",
record.mountpoint.display(),
existing.mount_id,
record.mount_id
);
}
}
Ok(records)
}
/// Atomically persist one private record.View on GitHub (pinned to affd8760f4)