validateIndexConsistency() was blind to native providers — it only ran the JS metadata index's own check, so a native provider whose manifest/segments/counts had diverged still read as "healthy". Per ADR-004 §6 it now feature-detects and aggregates each provider's optional validateInvariants() (a never-throwing, <50ms self-report of its own cross-layer invariants), names any failing invariant with its numbers in the recommendation, and exposes the per-provider reports. A provider that violates the never-throw contract is surfaced as unhealthy, never swallowed. repairIndex() now reconciles NATIVE derived state from canonical too: it consults each provider's invariants and calls rebuild() on any whose failing invariant asks for heal:'rebuild' — the native counterpart of detectAndRepairCorruption(). New provider surface: optional validateInvariants(); new exported types ProviderInvariantReport / InvariantResult / InvariantHeal. Additive, no break. Cor implements the hook in 3.0.15 (M2); brainy builds against the shape now (feature-detected, inert until a provider exposes it). 5 tests. |
||
|---|---|---|
| .. | ||
| aggregation | ||
| brainy | ||
| db | ||
| graph | ||
| hnsw | ||
| import | ||
| indexes/columnStore | ||
| neural | ||
| performance | ||
| storage | ||
| transaction | ||
| types | ||
| universal | ||
| utils | ||
| vfs | ||
| boundary-no-native.test.ts | ||
| brainy-core.unit.test.ts | ||
| brainy-get-optimization.test.ts | ||
| cold-open-rebuild-gate.test.ts | ||
| create-entities-default.test.ts | ||
| fieldTypeInference.test.ts | ||
| get-index-status-readiness.test.ts | ||
| metadata-cold-read-guard.test.ts | ||
| migration-lock.test.ts | ||
| plugin-autodetect.test.ts | ||
| plugin-version-coupling.test.ts | ||
| plugin.test.ts | ||
| process-exit-sweep.test.ts | ||
| shutdown-hooks-lifecycle.test.ts | ||
| test-suite-coverage-guard.test.ts | ||
| type-filtering.unit.test.ts | ||
| validate-invariants-delegation.test.ts | ||
| vector-cold-read-guard.test.ts | ||
| vfs-multi-instance-diagnostic.test.ts | ||
| vfs-restart-fix.test.ts | ||
| where-operator-validation.test.ts | ||