MCPcopy Create free account
hub / github.com/github/gh-aw / validateNoDuplicateMemoryIDs

Function validateNoDuplicateMemoryIDs

pkg/workflow/repo_memory_validation.go:62–67  ·  view source on GitHub ↗

validateNoDuplicateMemoryIDs checks for duplicate memory IDs and returns an error if found. Uses the generic validateNoDuplicateIDs helper for consistent duplicate detection.

(memories []RepoMemoryEntry)

Source from the content-addressed store, hash-verified

60// validateNoDuplicateMemoryIDs checks for duplicate memory IDs and returns an error if found.
61// Uses the generic validateNoDuplicateIDs helper for consistent duplicate detection.
62func 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}

Callers 1

Calls 3

validateNoDuplicateIDsFunction · 0.85
PrintfMethod · 0.45
ErrorfMethod · 0.45

Tested by

no test coverage detected