chore(8.0): final pre-RC1 sweep — API consistency, named errors, orphans, zero-cast codebase

This commit is contained in:
David Snelling 2026-06-11 14:51:00 -07:00
parent 970e08c466
commit 1f7e365a4e
237 changed files with 1951 additions and 49413 deletions

View file

@ -76,7 +76,7 @@ describe('Brainy 3.0 Core (Unit Tests)', () => {
expect(await brain.get(id)).toBeTruthy()
// Delete it
await brain.delete(id)
await brain.remove(id)
// Verify it's gone
expect(await brain.get(id)).toBeNull()
@ -96,7 +96,7 @@ describe('Brainy 3.0 Core (Unit Tests)', () => {
})).rejects.toThrow()
// delete should not throw for non-existent ID
await expect(brain.delete(fakeId)).resolves.not.toThrow()
await expect(brain.remove(fakeId)).resolves.not.toThrow()
})
})
@ -199,9 +199,11 @@ describe('Brainy 3.0 Core (Unit Tests)', () => {
data: { name: 'Test2' },
type: NounType.Concept
})
// Statistics would be available through augmentation system
// The exact API depends on augmentation configuration
const stats = await brain.stats()
expect(stats.mode).toBe('writer')
expect(stats.entityCount).toBeGreaterThanOrEqual(2)
expect(stats.entitiesByType[NounType.Concept]).toBeGreaterThanOrEqual(2)
})
})