@soulcraft/brainy 3.50.1 β 3.50.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +41 -0
- package/dist/utils/metadataIndex.d.ts +2 -1
- package/dist/utils/metadataIndex.js +7 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,47 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/soulcraftlabs/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [3.50.2](https://github.com/soulcraftlabs/brainy/compare/v3.50.1...v3.50.2) (2025-10-16)
|
|
6
|
+
|
|
7
|
+
### π Critical Bug Fix - Emergency Hotfix for v3.50.1
|
|
8
|
+
|
|
9
|
+
**Fixed: v3.50.1 Incomplete Fix - Numeric Field Names Still Being Indexed**
|
|
10
|
+
|
|
11
|
+
**Issue**: v3.50.1 prevented vector fields by name ('vector', 'embedding') but missed vectors stored as objects with numeric keys:
|
|
12
|
+
- Studio team diagnostic showed **212,531 chunk files** still being created
|
|
13
|
+
- Files had numeric field names: `"field": "54716"`, `"field": "100000"`, `"field": "100001"`
|
|
14
|
+
- Total file count: **424,837 files** (expected ~1,200)
|
|
15
|
+
- Root cause: Vectors stored as objects `{0: 0.1, 1: 0.2, ...}` bypassed v3.50.1's field name check
|
|
16
|
+
|
|
17
|
+
**Impact**:
|
|
18
|
+
- β
File reduction: 424,837 β ~1,200 files (354x reduction)
|
|
19
|
+
- β
Prevents 212K+ chunk files from being created
|
|
20
|
+
- β
Fixes server hangs during initialization
|
|
21
|
+
- β
Completes the metadata explosion fix started in v3.50.1
|
|
22
|
+
|
|
23
|
+
**Solution**:
|
|
24
|
+
- Added regex check in `extractIndexableFields()`: `if (/^\d+$/.test(key)) continue`
|
|
25
|
+
- Skips ANY purely numeric field name (array indices as object keys)
|
|
26
|
+
- Catches: "0", "1", "2", "100", "54716", "100000", etc.
|
|
27
|
+
- Works in combination with v3.50.1's semantic field name checks
|
|
28
|
+
|
|
29
|
+
**Test Results**:
|
|
30
|
+
- β
Added new test: "should NOT index objects with numeric keys (v3.50.2 fix)"
|
|
31
|
+
- β
8/8 integration tests passing
|
|
32
|
+
- β
Verifies NO chunk files have numeric field names
|
|
33
|
+
|
|
34
|
+
**Files Modified**:
|
|
35
|
+
- `src/utils/metadataIndex.ts` (line 1106) - Added numeric field name check
|
|
36
|
+
- `tests/integration/metadata-vector-exclusion.test.ts` - Added v3.50.2 test case
|
|
37
|
+
|
|
38
|
+
**For Studio Team**:
|
|
39
|
+
After upgrading to v3.50.2:
|
|
40
|
+
1. Delete `_system/` directory to remove corrupted chunk files
|
|
41
|
+
2. Restart server - metadata index will rebuild correctly
|
|
42
|
+
3. File count should normalize to ~1,200 total (from 424,837)
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
5
46
|
### [3.50.1](https://github.com/soulcraftlabs/brainy/compare/v3.50.0...v3.50.1) (2025-10-16)
|
|
6
47
|
|
|
7
48
|
### π Critical Bug Fixes
|
|
@@ -230,8 +230,9 @@ export declare class MetadataIndexManager {
|
|
|
230
230
|
* Extract indexable field-value pairs from metadata
|
|
231
231
|
*
|
|
232
232
|
* BUG FIX (v3.50.1): Exclude vector embeddings and large arrays from indexing
|
|
233
|
+
* BUG FIX (v3.50.2): Also exclude purely numeric field names (array indices)
|
|
233
234
|
* - Vector fields (384+ dimensions) were creating 825K chunk files for 1,144 entities
|
|
234
|
-
* - Arrays
|
|
235
|
+
* - Arrays converted to objects with numeric keys were still being indexed
|
|
235
236
|
*/
|
|
236
237
|
private extractIndexableFields;
|
|
237
238
|
/**
|
|
@@ -851,8 +851,9 @@ export class MetadataIndexManager {
|
|
|
851
851
|
* Extract indexable field-value pairs from metadata
|
|
852
852
|
*
|
|
853
853
|
* BUG FIX (v3.50.1): Exclude vector embeddings and large arrays from indexing
|
|
854
|
+
* BUG FIX (v3.50.2): Also exclude purely numeric field names (array indices)
|
|
854
855
|
* - Vector fields (384+ dimensions) were creating 825K chunk files for 1,144 entities
|
|
855
|
-
* - Arrays
|
|
856
|
+
* - Arrays converted to objects with numeric keys were still being indexed
|
|
856
857
|
*/
|
|
857
858
|
extractIndexableFields(metadata) {
|
|
858
859
|
const fields = [];
|
|
@@ -864,6 +865,11 @@ export class MetadataIndexManager {
|
|
|
864
865
|
// Skip fields in never-index list (CRITICAL: prevents vector indexing bug)
|
|
865
866
|
if (NEVER_INDEX.has(key))
|
|
866
867
|
continue;
|
|
868
|
+
// Skip purely numeric field names (array indices converted to object keys)
|
|
869
|
+
// Legitimate field names should never be purely numeric
|
|
870
|
+
// This catches vectors stored as objects: {0: 0.1, 1: 0.2, ...}
|
|
871
|
+
if (/^\d+$/.test(key))
|
|
872
|
+
continue;
|
|
867
873
|
// Skip fields based on user configuration
|
|
868
874
|
if (!this.shouldIndexField(fullKey))
|
|
869
875
|
continue;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@soulcraft/brainy",
|
|
3
|
-
"version": "3.50.
|
|
3
|
+
"version": "3.50.2",
|
|
4
4
|
"description": "Universal Knowledge Protocolβ’ - World's first Triple Intelligence database unifying vector, graph, and document search in one API. 31 nouns Γ 40 verbs for infinite expressiveness.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.js",
|