Sharding required a 32-hex UUID and threw "Invalid UUID format" on every non-UUID id, even though add()'s own docs show `id: "user-12345"` and the u64 id-mapper happily assigns ints to any string. So custom ids mapped fine in memory then threw on save — breaking documented usage and any 7.x consumer using friendly ids (`'user-123'`, slugs, emails) on upgrade. getShardId() (renamed from getShardIdFromUuid) now buckets UUID-format ids by their first byte (on-disk layout unchanged, so existing data never moves) and hashes any other id via FNV-1a into the same 256-bucket space. The hash is part of the on-disk contract and must not change. Verbs stay Brainy-generated UUIDs by contract; only custom noun ids take the hash path. Adds getShardId unit coverage: dual scheme, determinism, even distribution across buckets, and the empty-id guard. |
||
|---|---|---|
| .. | ||
| blobStorage.compression-policy.test.ts | ||
| blobStorage.test.ts | ||
| sharding.test.ts | ||
| storage-path-config.test.ts | ||
| vfs-mkdir-bug.test.ts | ||