package bot import "testing" // TestScrubSelfNotes pins the output scrub: the "[note to self: …]" history // annotation must never reach a posted reply, however the model weaves it in. func TestScrubSelfNotes(t *testing.T) { cases := []struct{ in, want string }{ {"Tap to see your issues:\n[note to self: this reply attached 1 button(s) via tool calls]", "Tap to see your issues:"}, {"[note to self: this reply attached 2 button(s) via tool calls]", ""}, {"Before [note to self: x] after", "Before after"}, {"No notes here.", "No notes here."}, {"A [bracket] that is not a note survives.", "A [bracket] that is not a note survives."}, } for _, c := range cases { if got := scrubSelfNotes(c.in); got != c.want { t.Errorf("scrubSelfNotes(%q) = %q, want %q", c.in, got, c.want) } } }