diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9f43494 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,6 @@ +# FIX CRLF always when developer has not set +# Linux/Mac: git config --global core.autocrlf input +# Windows: git config --global core.autocrlf true +# Auto detect text files and perform LF normalization +* text=auto +* eol=lf diff --git a/packages/meta-fuse-core/src/kv/RedisClient.ts b/packages/meta-fuse-core/src/kv/RedisClient.ts index 5f80b26..3fb5efc 100644 --- a/packages/meta-fuse-core/src/kv/RedisClient.ts +++ b/packages/meta-fuse-core/src/kv/RedisClient.ts @@ -647,8 +647,16 @@ export class RedisClient implements Partial { mtime, ctime: data.ctime ? parseFloat(data.ctime) : mtime, - // Identification - hashId: hashId ?? data.cid_midhash256 ?? data.hashId, + // Identification. + // + // `hashId` is always supplied by the caller — every `parseMetadata` + // call site derives it from the Redis key (`file:/…`), so the + // fallbacks below it were already unreachable. The two that used to sit + // here (`data.cid_midhash256`, then `data.hashId`) were also the wrong + // shape: `cid_*` fields no longer exist on records, and meta-core + // rejects them at the write boundary. Kept as a single defensive `??` + // rather than a chain of dead ones. See METADATA_KEYS.md §14.13. + hashId: hashId ?? data.hashId, // Title information title: data.title,