7.28 + cortex 2.5 fails to initialize against existing on-disk data (setConnectionsCodec is not a function) #3
Closed
opened 2026-05-29 22:40:20 +02:00 by dpsifr
·
3 comments
No Branch/Tag specified
main
feat/8.0-u64-ids
feat/3.0-diskann
feat/aggregation-percentile-distinct
feat/v4.0.0-vector-metadata-separation
brainy-2.0-clean
feature/enterprise-improvements
cleanup-1.0
v8.9.0
v8.8.2
v8.8.1
v8.8.0
v8.7.1
v8.7.0
v8.6.0
v8.5.2
v8.5.1
v8.5.0
v8.4.0
v8.3.3
v8.3.2
v8.3.1
v8.3.0
v8.2.8
v8.2.7
v8.2.6
v8.2.5
v8.2.4
v8.2.3
v8.2.2
v8.2.1
v8.2.0
v8.1.0
v8.0.17
v8.0.16
v8.0.15
v8.0.14
v8.0.13
v8.0.12
v8.0.11
v8.0.10
v8.0.9
v8.0.8
v8.0.7
v7.33.5
v8.0.0-rc.9
v8.0.0-rc.8
v8.0.0-rc.7
v7.33.4
v8.0.0-rc.6
v8.0.0-rc.5
v7.33.3
v8.0.0-rc.4
v7.33.2
v8.0.0-rc.3
v7.33.1
v8.0.0-rc.2
v8.0.0-rc.1
v7.33.0
v7.32.2
v7.32.1
v7.32.0
v7.31.8
v7.31.7
v7.31.6
v7.31.5
v7.31.4
v7.31.3
v7.31.2
v7.31.1
v7.31.0
v7.30.2
v7.30.1
v7.30.0
v7.29.0
v7.28.0
v7.27.0
v7.26.0
v7.25.0
v7.24.0
v7.23.0
v7.22.1
v7.22.0
v7.21.0
v7.20.0
v7.19.19
v7.19.18
v7.19.17
v7.19.16
v7.19.15
v7.19.14
v7.19.13
v7.19.11
v7.19.10
v7.19.9
v7.19.8
v7.19.7
v7.19.6
v7.19.5
v7.19.2
v7.19.1
v7.19.0
v7.18.0
v7.17.0
v7.16.0
v7.15.5
v7.15.4
v7.15.3
v7.15.2
v7.15.0
v7.14.0
v7.13.0
v7.12.0
v7.11.0
v7.10.0
v7.9.3
v7.9.2
v7.9.1
v7.9.0
v7.8.0
v7.7.0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3.40.3
v3.40.2
v3.40.1
v3.40.0
v3.39.0
v3.38.0
v3.37.8
v3.37.7
v3.37.6
v3.37.5
v3.37.4
v3.37.3
v3.37.2
v3.37.1
v3.37.0
v3.36.1
v3.36.0
v3.35.0
v3.34.0
v3.32.2
v3.32.1
v3.32.0
v3.31.0
v3.30.2
v3.30.1
v3.30.0
v3.29.1
v3.29.0
v3.28.0
v3.27.1
v3.27.0
v3.26.0
v3.25.2
v3.25.1
v3.25.0
v3.24.0
v3.23.1
v3.23.0
v3.22.0
v3.21.0
v3.20.5
v3.20.4
v3.20.3
v3.20.2
v3.20.1
v3.20.0
v3.19.2
v3.19.1
v3.19.0
v3.18.0
v3.17.0
v3.16.0
v3.15.0
v3.14.2
v3.14.1
v3.14.0
v3.13.0
v3.12.0
v3.10.1
v3.10.0
v3.9.1
v3.9.0
v3.8.3
v3.8.2
v3.8.1
v3.8.0
v3.7.1
v3.7.0
v3.6.0
v3.5.1
v3.5.0
v3.3.1
v3.3.0
v3.2.0
v3.1.1
v3.1.0
v3.0.1
v3.0.0
recovery-v3.0-20250910
v2.15.0
v2.14.3
v2.14.2
v2.14.1
v2.14.0
v2.12.0
v2.11.0
v2.10.1
v2.10.0
v2.9.0
v2.8.0
v2.7.4
v2.7.3
v2.7.2
v2.7.1
v2.7.0
v2.6.0
v2.5.0
v2.4.0
models-v2
v2.3.0
v2.1.0
v2.0.2
v2.0.1
models-v1
v2.0.0
session-4-optimizations
v1.5.0
v1.4.0
v1.2.0
v1.1.2
v1.1.1
v1.1.0
v0.62.3
v0.62.2
v0.62.1
v0.62.0
v0.61.3
v0.61.2
v0.61.1
v0.61.0
v0.60.0
v0.59.3
v0.59.2
v0.59.0
v0.58.1
v0.58.0
v0.57.1
v0.57.0
v0.56.0
v0.55.0
v0.54.7
v0.54.6
v0.54.5
v0.54.4
v0.54.3
v0.54.2
v0.54.1
v0.54.0
v0.53.0
v0.52.0
v0.49.0
v0.48.1
v0.48.0
v0.47.0
v0.46.0
v0.45.0
v0.44.0
v0.43.0
brainy-models-v1.0.0
v0.41.0
v0.40.0
v0.39.0
v0.38.0
v0.37.0
v0.36.0
v0.35.0
v0.34.0
models-package-v0.7.0
brainy-models-v0.7.0
models-package-v0.6.0
brainy-models-v0.6.0
brainy-models-v0.5.0
v0.1.0
v0.33.0
v0.32.0
v0.31.0
v0.30.0
v0.29.0
v0.28.0
v0.27.1
v0.27.0
v0.26.0
v0.25.0
v0.24.0
v0.23.0
v0.22.0
v0.21.0
v0.20.0
v0.19.0
v0.18.0
v0.17.0
v0.16.0
v0.15.0
v0.14.0
v0.13.0
v0.12.0
v0.11.0
v0.10.0
v0.9.37
v0.9.36
v0.9.35
v0.9.34
v0.9.33
v0.9.32
v0.9.31
v0.9.29
v0.9.28
v0.9.26
v0.9.23
v0.9.22
v0.9.21
v0.9.20
v0.9.19
v0.9.18
v0.9.17
v0.9.16
v0.9.15
v0.9.14
v0.9.13
v0.9.12
v0.9.11
v0.9.10
v0.9.9
v0.9.8
v0.9.7
v0.9.6
v0.9.5
test
v0.9.4
v0.9.3
v0.9.2
v0.9.1
v0.9.0
v0.8.11
v0.8.10
v0.8.9
v0.8.8
v0.8.7
v0.8.6
v0.8.5
v0.8.4
v0.8.3
v0.8.2
v0.8.1
v0.8.0
v0.7.7
v0.7.6
v0.7.5
v0.7.4
v0.7.3
v0.7.2
v0.7.1
v0.7.0
v0.6.0
v0.5.3
v0.5.2
v0.5.1
v0.5.0
v0.4.1
v0.4.0
v0.3.6
v0.3.5
v0.3.4
v0.3.3
v0.3.2
v0.3.1
v0.3.0
v0.2.6
v0.2.5
v0.2.4
v0.2.3
v0.2.1
v0.2.0
Labels
Clear labels
Something isn't working
Improvements or additions to documentation
This issue or pull request already exists
New feature or request
Good for newcomers
Extra attention is needed
This doesn't seem right
Further information is requested
This will not be worked on
bug
Something isn't working
documentation
Improvements or additions to documentation
duplicate
This issue or pull request already exists
enhancement
New feature or request
good first issue
Good for newcomers
help wanted
Extra attention is needed
invalid
This doesn't seem right
question
Further information is requested
wontfix
This will not be worked on
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".
No due date set.
Dependencies
No dependencies set.
Reference: soulcraft/brainy#3
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Brainy 7.28 / Cortex 2.5 fails to initialize against existing on-disk data
Symptom
Every RPC against an existing user brain (data written by Brainy ≤ 7.27 / Cortex ≤ 2.4) fails. Production trace from Memory service v0.2.17 on Bun 1.3:
User cannot read or write anything — every method goes through
resolveBrain→ init failure.Versions
@soulcraft/brainy7.28.0 (latest on npm, 2026-05-28)@soulcraft/cortex2.5.0 (latest on npm, 2026-05-28)mmap-filesystemWhat we tried
bun.lockb+bun install --productionon the VM → same.mmap-filesystemstorage, scoped per-tenant bysha256(email)(one Brainy per user).Three things in one trace — likely related
Re-acquiring writer lock … held by the same process— sounds like the pool is constructing a second Brainy for the same tenant before the first one is closed, or Brainy is internally re-acquiring without releasing. The "this is a bug — close it first" message implies Brainy itself believes this is illegal.mmap-vector backend not wired (Capacity must be > 0)— Cortex's mmap vector store reports zero capacity when initializing against the existing on-disk segments. Possibly a format/version mismatch with files written by older Cortex.this.index.setConnectionsCodec is not a function— the actual exception.setConnectionsCodecappears to be expected onthis.indexduring the codec configuration step of init. Either an HNSW codec method that Brainy 7.28 expects Cortex 2.5 to expose (or vice versa), or a method that's defined only on one of two index implementations and Brainy is dispatching to the wrong one when loading existing data.If you point me at where
setConnectionsCodecshould live, I can run a focused repro against just an existing user dir.What works
A fresh user with no existing on-disk data has not been tested yet (about to). If a fresh brain initialises cleanly, this is specifically a backward-compat issue with on-disk data written by older versions — the same shape of issue as the R5 follow-up.
Repro asset
I can tar up one of the affected user dirs from the VM if it would help. They contain only test-time content (no real PII), but I'd rather hand it over via a private channel than attach to this issue.
Impact
Memory v0.2.17 is currently unable to serve any user who tested in March/April 2026. Workshop's Muse integration depends on this and is effectively blocked.
Asks
Brainy.create({ storage: mmapFilesystem(…) })against an existing 7.22-era dir is a supported upgrade path, or if a migration step is required.setConnectionsCodecundefined call — which side owns the codec method.brainy migrateCLI command or a documented one-shot script.Update: a FRESH user (no existing on-disk data) fails identically. Just curl-tested against the live VM:
So this is not an upgrade-from-older-data issue.
@soulcraft/brainy@7.28.0+@soulcraft/cortex@2.5.0cannot initialize a brain at all in our setup (mmap-filesystem storage, Bun 1.3, Linux x64).setConnectionsCodecis missing onthis.indexfor every newly-created brain, not just legacy ones.Memory is currently downgrading to a known-good pair to unblock production. Will report which pair works.
Bisect result:
Regression landed somewhere in the 7.25 → 7.27 / cortex 2.3 → 2.4 window (all published 2026-05-27 / 28). Memory pinned to 7.24.0 / 2.2.1 for now. Repro is just
brain.add()against mmap-filesystem in distributed mode on a clean dir.Fixed in @soulcraft/cortex@2.5.1 (2026-05-29). Memory v0.2.22 deployed on brainy@7.28.0 + cortex@2.5.1; smoke-tested fresh-user remember+list, existing-user list, panel SSE — all green against memory.soulcraft.com. Thanks team.