fix: prevent infinite loop in pagination when storage returns phantom items
- Fix FileSystemStorage counting non-existent files in totalCount - Add safety check in BaseStorage to prevent hasMore:true with empty items - Ensure pagination terminates correctly even with corrupted storage state
This commit is contained in:
parent
8f7eed05e0
commit
5f10f8d9ab
10 changed files with 340 additions and 22 deletions
|
|
@ -4053,4 +4053,6 @@ export const PATTERNS_METADATA = {
|
|||
}
|
||||
}
|
||||
|
||||
console.log(`🧠 Brainy Pattern Library loaded: ${EMBEDDED_PATTERNS.length} patterns, ${(PATTERNS_METADATA.sizeBytes.total / 1024).toFixed(1)}KB total`)
|
||||
// Only log if not suppressed - controlled by logging configuration
|
||||
import { prodLog } from '../utils/logger.js'
|
||||
prodLog.info(`🧠 Brainy Pattern Library loaded: ${EMBEDDED_PATTERNS.length} patterns, ${(PATTERNS_METADATA.sizeBytes.total / 1024).toFixed(1)}KB total`)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue