Phase 6c fix: hide companion tags from FUSE
Build with clawstor cache / Cargo build (clawstor-cached) (pull_request) Successful in 10s

Companion tags store a fingerprint, not a blob-id. Filter them
out of /tags so ls does not show unreadable entries.
This commit is contained in:
Omar Sobh
2026-07-14 12:32:18 -07:00
parent 6071fdb7d9
commit cf8acadbc1
+19
View File
@@ -447,6 +447,25 @@ impl Filesystem for ClawFuse {
Some(s) => s,
None => continue,
};
// Only expose tags whose 32-byte value is a real
// blob-id (manifest present). Companion tags like
// `<name>.fingerprint` hold a fingerprint hash
// with no backing blob — reading them would just
// error, so hide them from the listing.
let value = match entry.decode_value() {
Ok(v) => v,
Err(_) => continue,
};
let blob_id = BlobId::from_bytes(value);
let exists = self
.runtime
.block_on(self.store.load_manifest(&blob_id))
.ok()
.flatten()
.is_some();
if !exists {
continue;
}
let ino = self.alloc_tag_ino(&sanitized, &entry.key);
entries.push((ino, FileType::RegularFile, sanitized));
}