SDK-8: the seat set's test reads a whole seat's new optional verbs as additions

Claude-Session: https://claude.ai/code/session_01JG73KJNrH5EgFXMKKYSrig
This commit is contained in:
2026-11-04 12:33:59 +01:00
parent 0bb3a2c392
commit da653ce593
3 changed files with 15 additions and 13 deletions
+7 -1
View File
@@ -103,7 +103,13 @@ func TestUseSeatsReplacesTheSetButNeverEmptiesIt(t *testing.T) {
kept = append(kept, byName[v.Name])
}
g.Serves, g.Emits, g.Accepts = kept, want.Emits, want.Accepts
g.Optional = slices.DeleteFunc(g.Optional, func(n string) bool { return n == "renames" || n == "retire" })
// A verb the whole seat added (new, optional while its holders catch up) is no verb of the compiled list.
g.Optional = slices.DeleteFunc(g.Optional, func(n string) bool {
return !slices.ContainsFunc(want.Serves, func(v Verb) bool { return v.Name == n })
})
if len(g.Optional) == 0 {
g.Optional = nil
}
want.Optional = slices.DeleteFunc(want.Optional, func(n string) bool { return dropped[want.Name+"."+n] })
want.Serves = slices.DeleteFunc(slices.Clone(want.Serves), func(v Verb) bool { return dropped[want.Name+"."+v.Name] })
}