fix(storage): clean directory architecture - FileSystemStorage uses entities/nouns/hnsw and entities/verbs/hnsw
- FileSystemStorage now uses clean hardcoded paths - Noun vectors: entities/nouns/hnsw (was: nouns/) - Verb vectors: entities/verbs/hnsw (was: verbs/) - Noun metadata: entities/nouns/metadata - Verb metadata: entities/verbs/metadata - Removed dual read/write backward compatibility code - Removed mergeStatistics method (no longer needed) - Added deprecation stubs for other adapters (to be migrated in v4.7.3) This fixes VFS bug where verb vector files were written to wrong directory. Workshop team: Delete brainy-data folder and reimport with v4.7.2.
This commit is contained in:
parent
5a245f95f8
commit
f69d79bf77
3 changed files with 46 additions and 195 deletions
|
|
@ -1,17 +1,15 @@
|
|||
/**
|
||||
* Storage backward compatibility layer for legacy data migrations
|
||||
* DEPRECATED (v4.7.2): Backward compatibility stubs
|
||||
* TODO: Remove in v4.7.3 after migrating s3CompatibleStorage
|
||||
*/
|
||||
|
||||
export class StorageCompatibilityLayer {
|
||||
static logMigrationEvent(event: string, details?: any): void {
|
||||
// Simplified logging for migration events
|
||||
if (process.env.DEBUG_MIGRATION) {
|
||||
console.log(`[Migration] ${event}`, details)
|
||||
}
|
||||
// No-op
|
||||
}
|
||||
|
||||
|
||||
static async migrateIfNeeded(storagePath: string): Promise<void> {
|
||||
// No-op for now - can be extended later if needed
|
||||
// No-op
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -24,14 +22,13 @@ export interface StoragePaths {
|
|||
statistics: string
|
||||
}
|
||||
|
||||
// Helper to get default paths
|
||||
export function getDefaultStoragePaths(basePath: string): StoragePaths {
|
||||
return {
|
||||
nouns: `${basePath}/nouns`,
|
||||
verbs: `${basePath}/verbs`,
|
||||
metadata: `${basePath}/metadata`,
|
||||
index: `${basePath}/index`,
|
||||
system: `${basePath}/system`,
|
||||
statistics: `${basePath}/statistics.json`
|
||||
nouns: `${basePath}/entities/nouns/hnsw`,
|
||||
verbs: `${basePath}/entities/verbs/hnsw`,
|
||||
metadata: `${basePath}/entities/nouns/metadata`,
|
||||
index: `${basePath}/indexes`,
|
||||
system: `${basePath}/_system`,
|
||||
statistics: `${basePath}/_system/statistics.json`
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue