A removal of an approved replacement names the registered text's fingerprint; the cases ADR 0642 cites are tests

Claude-Session: https://claude.ai/code/session_01NcbgfFSnn24M3GcqttoU7i
This commit is contained in:
2026-11-05 23:16:23 +01:00
parent 6fb27549c9
commit b3fc5b4580
2 changed files with 78 additions and 3 deletions
@@ -208,12 +208,13 @@ func (p Proposal) glanceAsk() oc.Ask {
}
var d strings.Builder
if p.Action == ActionRemove {
removes := "The approved text it removes"
removes, print := "The approved text it removes", p.Fingerprint()
if p.Over != "" {
removes = "The registered text it removes"
// The registered text, never the replacement's: a removal of a replacement removes both.
removes, print = "The registered text it removes", fingerprintOf(p.Over)
}
fmt.Fprintf(&d, "Proposed through the claude-code module on %s at %s UTC. %s has the fingerprint %s.",
p.From, p.At.UTC().Format("15:04 on 2 Jan"), removes, p.Fingerprint())
p.From, p.At.UTC().Format("15:04 on 2 Jan"), removes, print)
} else {
if whole {
d.WriteString("The text:\n" + shown + "\n")