brainy/src/utils
David Snelling 16a73b8475 feat: OS-limit detection for pool-scale deployments
- New src/utils/osLimits.ts: reads RLIMIT_NOFILE (soft/hard, from
  /proc/self/limits) and vm.max_map_count at open — once per process,
  Linux-only, measurement-only — and warns loudly when either sits below the
  pool-scale floors (soft NOFILE < 65536, max_map_count < 262144), with the
  exact raise commands. On stock defaults the failure otherwise arrives as
  EMFILE or a failed mmap deep inside an index open, long after the cause
  stopped being visible. An unreadable limit produces NO warning — no
  measurement, no claim — so non-Linux platforms stay silent.
- Exported for ops doors: checkOsLimits() returns the full OsLimitsReport;
  floors exported as constants. Wired fire-and-forget in performInit after
  storage init; the check can never affect open.
- Unit tests pin the parser (incl. 'unlimited'), the floor thresholds, the
  null-never-warns rule, and the off-Linux silent path.
2026-07-17 17:51:54 -07:00
..
roaring docs: rename the native provider to @soulcraft/cor across public docs and JSDoc 2026-07-02 15:11:41 -07:00
adaptiveBackpressure.ts fix: prevent circuit breaker activation and data loss during bulk imports 2025-10-30 08:54:04 -07:00
brainyTypes.ts refactor: remove augmentation system and semantic type matching 2026-02-01 10:48:56 -08:00
callerLocation.ts chore(8.0): final pre-RC1 sweep — API consistency, named errors, orphans, zero-cast codebase 2026-06-11 14:51:00 -07:00
collation.ts docs: rename the native provider to @soulcraft/cor across public docs and JSDoc 2026-07-02 15:11:41 -07:00
contentExtractor.ts feat: expand ContentCategory to universal 6-category set for highlight() 2026-01-27 13:44:58 -08:00
crc32c.ts feat: generation fact log — after-image commit records, dual-written at every commit point 2026-07-15 10:49:02 -07:00
distance.ts perf(8.0): allocation-free distance loops (6x cosine) — evidence-revised Fork X 2026-07-01 10:55:04 -07:00
embedding.ts chore(8.0): final pre-RC1 sweep — API consistency, named errors, orphans, zero-cast codebase 2026-06-11 14:51:00 -07:00
entityIdMapper.ts docs: rename the native provider to @soulcraft/cor across public docs and JSDoc 2026-07-02 15:11:41 -07:00
environment.ts chore(8.0)!: drop browser support, cloud SDKs, legacy pipeline, dead threading 2026-06-09 16:38:30 -07:00
errorClassification.ts fix: spine hardening pass 1 (part) — count symmetry, honest partial-load, flush durability, read-fault propagation 2026-07-13 08:50:07 -07:00
fieldNameTracking.ts 🧠 Brainy 2.0.0 - Zero-Configuration AI Database with Triple Intelligence™ 2025-08-26 12:32:21 -07:00
fieldTypeInference.ts chore(8.0): final pre-RC1 sweep — API consistency, named errors, orphans, zero-cast codebase 2026-06-11 14:51:00 -07:00
idNormalization.ts feat(8.0): id-normalization (#18) + aggregation min/max delete-safety + RC-safe release 2026-06-20 14:46:40 -07:00
import-progress-tracker.ts fix: exclude __words__ keyword index from corruption detection and getStats() 2026-01-27 15:38:21 -08:00
index.ts chore(8.0)!: drop browser support, cloud SDKs, legacy pipeline, dead threading 2026-06-09 16:38:30 -07:00
indexReadiness.ts fix: honest index readiness — no silently-empty queries on a cold index 2026-07-13 13:17:56 -07:00
jsonProcessing.ts 🧠 Brainy 2.0.0 - Zero-Configuration AI Database with Triple Intelligence™ 2025-08-26 12:32:21 -07:00
logger.ts feat: add complete silent mode for TUI applications 2025-09-16 13:18:49 -07:00
memoryDetection.ts fix: exclude __words__ keyword index from corruption detection and getStats() 2026-01-27 15:38:21 -08:00
metadataFilter.ts fix: validate where-operators and align the in-memory matcher to the documented set 2026-07-07 12:23:36 -07:00
metadataIndex.ts fix: validate where-operators and align the in-memory matcher to the documented set 2026-07-07 12:23:36 -07:00
metadataIndexCache.ts 🧠 Brainy 2.0.0 - Zero-Configuration AI Database with Triple Intelligence™ 2025-08-26 12:32:21 -07:00
metadataIndexChunking.ts chore(8.0): final pre-RC1 sweep — API consistency, named errors, orphans, zero-cast codebase 2026-06-11 14:51:00 -07:00
metadataWriteBuffer.ts fix: no script shape can hang on brainy's internals — unref every maintenance timer + one-shot beforeExit 2026-07-02 17:26:22 -07:00
mutex.ts chore(8.0): final pre-RC1 sweep — API consistency, named errors, orphans, zero-cast codebase 2026-06-11 14:51:00 -07:00
operationUtils.ts 🧠 Brainy 2.0.0 - Zero-Configuration AI Database with Triple Intelligence™ 2025-08-26 12:32:21 -07:00
osLimits.ts feat: OS-limit detection for pool-scale deployments 2026-07-17 17:51:54 -07:00
paramValidation.ts fix: aggregation state adoption on reopen + single-flight backfill + query-cap ratchet removal 2026-07-17 09:20:09 -07:00
performanceMonitor.ts chore(8.0)!: drop browser support, cloud SDKs, legacy pipeline, dead threading 2026-06-09 16:38:30 -07:00
rebuildCounts.ts feat(8.0): visibility field (public/internal/system) on nouns + verbs 2026-06-16 15:20:26 -07:00
recallPreset.ts docs: rename the native provider to @soulcraft/cor across public docs and JSDoc 2026-07-02 15:11:41 -07:00
resultRanking.ts docs: rename the native provider to @soulcraft/cor across public docs and JSDoc 2026-07-02 15:11:41 -07:00
statisticsCollector.ts refactor(8.0)!: remove distributed clustering subsystem — inert/orphaned, scale is single-process + native provider 2026-06-15 10:37:39 -07:00
typeUtils.ts 🧠 Brainy 2.0.0 - Zero-Configuration AI Database with Triple Intelligence™ 2025-08-26 12:32:21 -07:00
typeValidation.ts docs(8.0): add module JSDoc to typeValidation.ts (the one file missing a module block) 2026-07-01 15:37:25 -07:00
unifiedCache.ts fix: a bare script now exits cleanly after close() — release every process keep-alive 2026-07-02 16:39:16 -07:00
version.ts fix(8.0): close GA-blocking correctness gaps from the readiness audit 2026-06-29 10:03:38 -07:00