Skip to content

Every agent's model. One place. Codex on DeepSeek, Claude Code on Kimi, from the menu bar.

redact: the masking evaluation starts with nothing known

yetone033990e642af
diff --git a/internal/redact/eval_test.go b/internal/redact/eval_test.go
index 8fa8b1625..66e833339 100644
--- a/internal/redact/eval_test.go
+++ b/internal/redact/eval_test.go
@@ -68,6 +68,7 @@ func TestMaskEval(t *testing.T) {
return out
}
+ redact.Forget()
var tally evalTally
for _, c := range evalCases {
rules := redact.Preview(c.Text, redact.Options{Secrets: true, Personal: true})
diff --git a/internal/redact/export_test.go b/internal/redact/export_test.go
index 9bc032e8d..7db3e8e57 100644
--- a/internal/redact/export_test.go
+++ b/internal/redact/export_test.go
@@ -3,3 +3,15 @@ package redact
// ModelKinds is modelKinds, for the evaluation in package redact_test,
// which reads the real model through internal/pii (eval_test.go).
var ModelKinds = modelKinds
+
+// Forget lets go of every value masked so far, so that what the
+// evaluation scores is what its texts make masked, not what the tests
+// before it masked and left known.
+func Forget() {
+ mu.Lock()
+ values = map[string]string{}
+ shapes = map[string]string{}
+ reindexKnown()
+ mu.Unlock()
+ resetSent()
+}