fix: metadata batch reading from correct directory

Fixed bug where getMetadataBatch() was reading from wrong directory:
- FileSystemStorage: Changed to use getNounMetadata() instead of getMetadata()
- OPFSStorage: Changed to use getNounMetadata() instead of getMetadata()
- MetadataIndex fallback: Fixed to use getNounMetadata()
- Added getNounMetadata() to StorageAdapter interface

This resolves 0% success rate during metadata index rebuild.

Also added comprehensive API documentation for return values and data field behavior.
This commit is contained in:
David Snelling 2025-10-06 15:43:45 -07:00
parent b066fbd333
commit 32f5ac6fee
6 changed files with 179 additions and 18 deletions

View file

@ -38,6 +38,8 @@ export abstract class BaseStorageAdapter implements StorageAdapter {
abstract getMetadata(id: string): Promise<any | null>
abstract getNounMetadata(id: string): Promise<any | null>
abstract saveVerbMetadata(id: string, metadata: any): Promise<void>
abstract getVerbMetadata(id: string): Promise<any | null>