Skip to content

The cross-harness, self-improving memory layer for AI agents. Join our community: https://discord.com/invite/zdNChS2fBu

Rename RedactString's removed-copy variable

Claude0ac314020071
diff --git a/pkg/asymptoteobserve/privacy.go b/pkg/asymptoteobserve/privacy.go
index 36a5d703..9af5dde7 100644
--- a/pkg/asymptoteobserve/privacy.go
+++ b/pkg/asymptoteobserve/privacy.go
@@ -94,8 +94,9 @@ func RedactString(value string) string {
for _, rule := range secretRules {
value = rule.pattern.ReplaceAllString(value, rule.replacement)
}
- for _, secret := range assigned {
- value = strings.ReplaceAll(value, secret, redactedValue)
+ // Each copy is searched for and removed; none of it survives into the result.
+ for _, copied := range assigned {
+ value = strings.ReplaceAll(value, copied, redactedValue)
}
return value
}