fix(storage): an unknown nested storage config can never silently land on the shared default root
The factory loudly rejects every REMOVED pre-8.0 path key, but an unknown
nested `config` object (e.g. `storage: { config: { baseDir } }` — a shape
that was never supported) fell through SILENTLY to the zero-config default
directory. Every instance constructed with such a shape wrote to ONE shared
on-disk root while its caller believed each had its own — found live when
two integration tests' brains shared a store across an entire
single-process CI run and a health probe refused on the foreign edges it
sampled. A nested `config` carrying any path-shaped key now throws the same
loud migration error, naming the canonical `path` rename. The two tests are
repaired to the supported shape (and now actually test isolated stores, for
the first time since 8.0).
This commit is contained in:
parent
8cced871a0
commit
ddd5e71928
3 changed files with 17 additions and 14 deletions
|
|
@ -15,13 +15,7 @@ describe('Batch Import with Immediate Relations (v5.7.3 Fix)', () => {
|
|||
|
||||
// Initialize brain
|
||||
brain = new Brainy({ requireSubtype: false,
|
||||
storage: {
|
||||
type: 'filesystem',
|
||||
config: {
|
||||
baseDir: testDir,
|
||||
enableCompression: false // Faster tests
|
||||
}
|
||||
},
|
||||
storage: { type: 'filesystem', path: testDir },
|
||||
dimensions: 384
|
||||
})
|
||||
|
||||
|
|
|
|||
|
|
@ -34,13 +34,7 @@ describe('Read-After-Write Consistency (v5.7.2 Bug Fix)', () => {
|
|||
testDir = join(tmpdir(), `brainy-consistency-${Date.now()}-${Math.random().toString(36).substring(7)}`)
|
||||
|
||||
brain = new Brainy({ requireSubtype: false,
|
||||
storage: {
|
||||
type: 'filesystem',
|
||||
config: {
|
||||
baseDir: testDir,
|
||||
enableCompression: false // Faster tests
|
||||
}
|
||||
},
|
||||
storage: { type: 'filesystem', path: testDir },
|
||||
dimensions: 384
|
||||
})
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue