Drop no-op suggestions where replacement equals original

The checkpoint model sometimes "flags" a correct sentence and echoes it
verbatim as the replacement, producing a card whose before/after are
identical and whose explanation says it's already fine — a suggestion
that suggests nothing. ParseCheckpoint already dropped empty-original
items; also drop these no-ops. Awareness-only families (voice) carry an
empty replacement, so the guard only fires on the edit families.

Claude-Session: https://claude.ai/code/session_016Yr6jELuRc7hyzYLccQKZd
This commit is contained in:
prosolis
2026-06-27 00:18:10 -07:00
parent dd1dd7879b
commit 08b801e752
2 changed files with 27 additions and 0 deletions

View File

@@ -89,6 +89,14 @@ func ParseCheckpoint(raw string) ([]RawSuggestion, error) {
if s.Original == "" {
continue
}
// Drop no-ops: the model sometimes "flags" a correct sentence and echoes
// it verbatim as the replacement, producing a card whose before/after are
// identical and whose explanation says it's already fine — a suggestion
// that suggests nothing. Awareness-only families (voice) carry an empty
// replacement, so this only ever fires on the edit families.
if s.Replacement != "" && s.Original == s.Replacement {
continue
}
out = append(out, s)
}
return out, nil