validateNoDuplicateMemoryIDs checks for duplicate memory IDs and returns an error if found. Uses the generic validateNoDuplicateIDs helper for consistent duplicate detection.
(memories []RepoMemoryEntry)
| 60 | // validateNoDuplicateMemoryIDs checks for duplicate memory IDs and returns an error if found. |
| 61 | // Uses the generic validateNoDuplicateIDs helper for consistent duplicate detection. |
| 62 | func validateNoDuplicateMemoryIDs(memories []RepoMemoryEntry) error { |
| 63 | repoMemValidationLog.Printf("Validating %d memory entries for duplicate IDs", len(memories)) |
| 64 | return validateNoDuplicateIDs(memories, func(m RepoMemoryEntry) string { return m.ID }, func(id string) error { |
| 65 | return fmt.Errorf("duplicate memory ID found: '%s'. Each memory must have a unique ID", id) |
| 66 | }) |
| 67 | } |
no test coverage detected