package runnerproto import ( "strings" "testing" ) func TestPendingContextCannotBeTrimmed(t *testing.T) { c := CoordinatorContext{ConversationID: "chat", Revision: 1, Pending: []string{"first", "last"}, Recent: []MessageRef{{ID: "first", Body: strings.Repeat("a", 20000)}, {ID: "last", Body: strings.Repeat("b", 20000)}}} if _, err := BoundCoordinatorContext(c); err != ErrPromptTooLarge { t.Fatal("silently dropped a pending request", err) } c.Pending = []string{"last"} if _, err := BoundCoordinatorContext(c); err != nil { t.Fatal(err) } }