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

@ -11,7 +11,7 @@
* 1. Option A: Never skip a verb type that's explicitly requested in the filter
* 2. Option B: Added fast path for sourceId + verbType combo (common VFS pattern)
*
* Bug Report: /home/dpsifr/Projects/workshop/docs/BRAINY_VFS_BUG_REPORT.md
* Originally reported by a downstream application using the VFS.
*/
import { describe, it, expect, beforeEach, afterEach } from 'vitest'
@ -84,7 +84,7 @@ describe('VFS mkdir() Bug Fix (v6.2.9)', () => {
})
})
describe('getRelations should query Contains relationships correctly', () => {
describe('related should query Contains relationships correctly', () => {
it('should find Contains relationships via sourceId + verbType filter', async () => {
// Create some entities and relationships
const parent = await brain.add({
@ -110,7 +110,7 @@ describe('VFS mkdir() Bug Fix (v6.2.9)', () => {
await brain.relate({ from: parent, to: child2, type: VerbType.Contains })
// Query relationships (this is what getChildren() does)
const relations = await brain.getRelations({
const relations = await brain.related({
from: parent,
type: VerbType.Contains
})
@ -132,7 +132,7 @@ describe('VFS mkdir() Bug Fix (v6.2.9)', () => {
await brain.relate({ from: entityA, to: entityC, type: VerbType.RelatedTo })
// Query only Contains relationships
const containsRelations = await brain.getRelations({
const containsRelations = await brain.related({
from: entityA,
type: VerbType.Contains
})
@ -141,7 +141,7 @@ describe('VFS mkdir() Bug Fix (v6.2.9)', () => {
expect(containsRelations[0].to).toBe(entityB)
// Query only RelatedTo relationships
const relatedRelations = await brain.getRelations({
const relatedRelations = await brain.related({
from: entityA,
type: VerbType.RelatedTo
})
@ -174,7 +174,7 @@ describe('VFS mkdir() Bug Fix (v6.2.9)', () => {
// Query should use the new fast path
const startTime = performance.now()
const relations = await brain.getRelations({
const relations = await brain.related({
from: parent,
type: VerbType.Contains
})