feat(8.0): id-normalization (#18) + aggregation min/max delete-safety + RC-safe release
- id-normalization (#18): `brain.newId()` (UUID v7) + v7 default ids; non-UUID string ids are transparently normalized to a stable UUID v5 on creation AND every lookup — get/update/remove, relate(from,to), related, find({connected}), getMany, removeMany, the transact op-handler, and db.with() overlays — with the caller's original key preserved under `_originalId`. The engine only ever sees a UUID; real UUIDs pass through untouched. universal/uuid.ts gains v5/v7/isUUID + BRAINY_ID_NAMESPACE; new utils/idNormalization.ts (coerceNewEntityId / resolveEntityId). - aggregation min/max delete-safety: `queryAggregate` no longer leaves a stale min/max after deleting the current extreme — min/max now track a value multiset and recompute in-memory (no entity scan; that scan was the prior delete-then-hang a consumer reported). Other metrics were already exact across deletes. Regression test proves resolve-after-delete + correct new min/max. - release.sh RC-safe: explicit version arg, prerelease detection (npm `--tag rc` + GitHub `--prerelease`), full `test:ci` gate (unit + integration), current-branch push, npm-access verification after publish. - native-engine references point at `@soulcraft/cor` (8.0's partner) in user-facing strings/docs. Unit 1461/0 · integration 599/0 · tsc clean.
This commit is contained in:
parent
606445cd61
commit
d02e522a3e
14 changed files with 943 additions and 100 deletions
|
|
@ -73,7 +73,7 @@ export class EntityIdSpaceExceeded extends Error {
|
|||
`EntityIdMapper: nextId ${attempted} would exceed u32::MAX ` +
|
||||
`(${U32_ENTITY_ID_MAX}). The JS fallback mapper caps at u32 to ` +
|
||||
`match the metadata index's Roaring32 bitmap width. For >4.29 B ` +
|
||||
`entities, install @soulcraft/cortex and configure the binary ` +
|
||||
`entities, install @soulcraft/cor and configure the binary ` +
|
||||
`mapper with idSpace: 'u64' (mmap-backed extendible-hash KV).`,
|
||||
)
|
||||
this.name = 'EntityIdSpaceExceeded'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue