The brain.graph.subgraph/export NATIVE routing (graphSubgraphNative / graphExportNative / hydrateNativeSubgraph + provider resolution) had ZERO brainy CI coverage — in production it's exercised only cross-layer against cor's engine, so a columnar return-shape or hydration-alignment drift would pass brainy CI silently. This registers a faithful MOCK GraphAccelerationProvider returning a columnar Subgraph built from the brain's REAL ints, locking the seam: - subgraph() routes native (traverse called) and hydrates node int->id, the nodeDepth column aligned to the node column, node type via batchGet, and edge verb-int->Relation via verbIntsToIds + getVerbsBatchCached. - node<->depth alignment is preserved when a node int does NOT resolve (deleted/unknown) — the unresolvable int is dropped, not collapsed (which would shift every later depth). This is the exact hydration risk the release audit flagged. - export() routes to the graph cursor, hydrates chunks, and ALWAYS closes the handle. Also fixes a latent contract bug found writing the test: graphAccelerationProvider() only accepted a ready instance, so a provider registered as a (storage)=>provider FACTORY (the convention graphIndex/metadataIndex/vector use) would fail the duck-test and the native path would silently never engage. Now resolves instance OR factory, cached. Covered by the factory-registration test. |
||
|---|---|---|
| .. | ||
| aggregation | ||
| cli | ||
| db | ||
| embeddings | ||
| errors | ||
| graph | ||
| hnsw | ||
| import | ||
| importers | ||
| indexes/columnStore | ||
| integrations | ||
| mcp | ||
| migration | ||
| neural | ||
| patterns | ||
| storage | ||
| streaming | ||
| transaction | ||
| triple | ||
| types | ||
| universal | ||
| utils | ||
| vfs | ||
| brainy.ts | ||
| coreTypes.ts | ||
| index.ts | ||
| internals.ts | ||
| plugin.ts | ||
| setup.ts | ||
| unified.ts | ||