Preserve manager skill bootstrap work

This commit is contained in:
2026-10-18 15:03:22 +01:00
parent 88595ebd55
commit ab9181eee9
13 changed files with 362 additions and 4 deletions
+18
View File
@@ -395,3 +395,21 @@ func TestOpenChatRejectsUnrunnableCLI(t *testing.T) {
t.Fatal("a missing CLI must fail detection, not open an endpoint")
}
}
func TestChatActivateSkillV2Shape(t *testing.T) {
var path, body string
srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
path = r.URL.Path
data := make([]byte, r.ContentLength)
_, _ = r.Body.Read(data)
body = string(data)
w.WriteHeader(http.StatusNoContent)
}))
defer srv.Close()
if err := NewChat(&Connection{Backend: "v2", URL: srv.URL}).ActivateSkill(context.Background(), "ses_1", "pipelines-manager"); err != nil {
t.Fatal(err)
}
if path != "/api/experimental/session/ses_1/skill" || body != `{"id":"pipelines-manager","resume":false}` {
t.Fatalf("activate request = %s %s", path, body)
}
}