Both shapes confirmed with cor for the lockstep (cor builds the native side
against these; the JS index is a no-op / unchanged):
- probeConsistency?(): Promise<boolean> — OPTIONAL O(1) cold-open consistency
sampler on MetadataIndexProvider. brainy calls it ONCE per brain on the first
read; on `false` it self-heals via detectAndRepairCorruption() — the metadata
counterpart of the 7.33.2 graph cold-load guard, completing the phantom triad's
detect-and-repair-on-open. Best-effort: a probe failure never breaks a read
(the one-shot guard resets so a transient failure retries). The JS index omits
the method, so it is simply never probed.
- getIdsForFilter(filter, opts?: { limit?; offset? }) — brainy passes a page
bound on the UNSORTED find({ type, where, limit }) path so a native provider can
early-stop and return only the [0, limit) prefix, killing the O(N) FFI marshal
at billion scale (pairs with cor #75). brainy passes offset:0 and ALWAYS
re-windows the result itself (visibility filter + slice); the JS index ignores
opts and returns all matches (behaviour unchanged).
New unit tests cover brainy's call behaviour for both (probe→repair on false,
healthy→no-repair, failure-is-best-effort, once-per-brain; opts passed with
offset 0 on the unsorted path). Full gate green: unit 1718, integration 607.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
||
|---|---|---|
| .. | ||
| add.test.ts | ||
| batch-operations.test.ts | ||
| counts-by-type-fix.test.ts | ||
| fill-subtypes.test.ts | ||
| find-agg-edge-cases.test.ts | ||
| find-complement-operators.test.ts | ||
| find-include-vectors.test.ts | ||
| find-index-integrity-guard.test.ts | ||
| find-orderby-pagek.test.ts | ||
| find.test.ts | ||
| get.test.ts | ||
| graph-analytics.test.ts | ||
| graph-export.test.ts | ||
| graph-native-routing.test.ts | ||
| graph-subgraph.test.ts | ||
| hybrid-search.test.ts | ||
| metadata-provider-contract.test.ts | ||
| relate-duplicate-optimization.test.ts | ||
| relate.test.ts | ||
| related-node-bidirectional.test.ts | ||
| related-visibility-fast-path.test.ts | ||
| reserved-field-policy.test.ts | ||
| similar-threshold.test.ts | ||
| update-reserved-metadata-remap.test.ts | ||
| update.test.ts | ||
| upsert.test.ts | ||
| visibility.test.ts | ||