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

@ -51,7 +51,7 @@ describe('Duplicate Check Optimization', () => {
expect(relationId2).toBe(relationId1)
// Verify only one relationship exists
const relations = await brain.getRelations({ from: personId })
const relations = await brain.related({ from: personId })
expect(relations).toHaveLength(1)
expect(relations[0].id).toBe(relationId1)
})
@ -85,7 +85,7 @@ describe('Duplicate Check Optimization', () => {
expect(relationId2).not.toBe(relationId1)
// Verify both relationships exist
const relations = await brain.getRelations({ from: personId })
const relations = await brain.related({ from: personId })
expect(relations).toHaveLength(2)
// Both relations should exist with different IDs
const relationIds = relations.map(r => r.id)
@ -129,7 +129,7 @@ describe('Duplicate Check Optimization', () => {
expect(elapsed).toBeLessThan(10)
// Verify duplicate was detected
const relations = await brain.getRelations({ from: sourceId })
const relations = await brain.related({ from: sourceId })
expect(relations).toHaveLength(50) // No duplicate created
})
@ -198,7 +198,7 @@ describe('Duplicate Check Optimization', () => {
})
// Verify both relationships exist
let relations = await brain.getRelations({ from: person })
let relations = await brain.related({ from: person })
expect(relations).toHaveLength(2)
const relationIds = relations.map(r => r.id)
expect(relationIds).toContain(rel1)
@ -218,7 +218,7 @@ describe('Duplicate Check Optimization', () => {
expect(duplicate).toBe(rel1)
// Verify still same number of relationships (no duplicate added)
const finalRelations = await brain.getRelations({ from: person })
const finalRelations = await brain.related({ from: person })
expect(finalRelations.length).toBe(relations.length)
})
})