H-300: wire Captain Skills into Web runtime (#48)

* H-300: wire Captain Skills into Web runtime

* H-300: enforce effective model and conservative skill budget

* H-300: fix CI gosec step

* ci: extend golangci-lint timeout

* fix lint findings across backend

* fix(push): resolve delivery protocol blockers

* test(repository): close SQLite test databases

* test(repository): reuse SQLite schema per package

* H-307: restore backend Go cache in CI

* H-307: prefetch modules before cold lint

* H-307: resolve govulncheck security gate

* H-307: build lint with patched Go toolchain

* H-307: clear remaining security scan findings

---------

Co-authored-by: Rogee <rogee@ipao.vip>
This commit is contained in:
Rogee
2026-08-19 07:08:14 +08:00
committed by GitHub
co-authored by rogee
parent f50eacdc92
commit 2b182f9956
224 changed files with 3814 additions and 10626 deletions
@@ -126,7 +126,9 @@ func TestLinearIntegration_Delete_BadAccountID(t *testing.T) {
assert.Equal(t, http.StatusBadRequest, w.Code)
var resp map[string]interface{}
json.Unmarshal(w.Body.Bytes(), &resp)
if err := json.Unmarshal(w.Body.Bytes(), &resp); err != nil {
panic(err)
}
errBody := resp["error"].(map[string]interface{})
assert.Contains(t, errBody["message"], "invalid account_id")
}
@@ -141,7 +143,9 @@ func TestLinearIntegration_GetTeams_BadAccountID(t *testing.T) {
assert.Equal(t, http.StatusBadRequest, w.Code)
var resp map[string]interface{}
json.Unmarshal(w.Body.Bytes(), &resp)
if err := json.Unmarshal(w.Body.Bytes(), &resp); err != nil {
panic(err)
}
errBody := resp["error"].(map[string]interface{})
assert.Contains(t, errBody["message"], "invalid account_id")
}
@@ -156,7 +160,9 @@ func TestLinearIntegration_GetTeamEntities_BadAccountID(t *testing.T) {
assert.Equal(t, http.StatusBadRequest, w.Code)
var resp map[string]interface{}
json.Unmarshal(w.Body.Bytes(), &resp)
if err := json.Unmarshal(w.Body.Bytes(), &resp); err != nil {
panic(err)
}
errBody := resp["error"].(map[string]interface{})
assert.Contains(t, errBody["message"], "invalid account_id")
}
@@ -171,7 +177,9 @@ func TestLinearIntegration_CreateIssue_BadAccountID(t *testing.T) {
assert.Equal(t, http.StatusBadRequest, w.Code)
var resp map[string]interface{}
json.Unmarshal(w.Body.Bytes(), &resp)
if err := json.Unmarshal(w.Body.Bytes(), &resp); err != nil {
panic(err)
}
errBody := resp["error"].(map[string]interface{})
assert.Contains(t, errBody["message"], "invalid account_id")
}
@@ -188,7 +196,9 @@ func TestLinearIntegration_CreateIssue_InvalidJSON(t *testing.T) {
assert.Equal(t, http.StatusBadRequest, w.Code)
var resp map[string]interface{}
json.Unmarshal(w.Body.Bytes(), &resp)
if err := json.Unmarshal(w.Body.Bytes(), &resp); err != nil {
panic(err)
}
assert.False(t, resp["success"].(bool))
}
@@ -202,7 +212,9 @@ func TestLinearIntegration_LinkIssue_BadAccountID(t *testing.T) {
assert.Equal(t, http.StatusBadRequest, w.Code)
var resp map[string]interface{}
json.Unmarshal(w.Body.Bytes(), &resp)
if err := json.Unmarshal(w.Body.Bytes(), &resp); err != nil {
panic(err)
}
errBody := resp["error"].(map[string]interface{})
assert.Contains(t, errBody["message"], "invalid account_id")
}
@@ -219,7 +231,9 @@ func TestLinearIntegration_LinkIssue_InvalidJSON(t *testing.T) {
assert.Equal(t, http.StatusBadRequest, w.Code)
var resp map[string]interface{}
json.Unmarshal(w.Body.Bytes(), &resp)
if err := json.Unmarshal(w.Body.Bytes(), &resp); err != nil {
panic(err)
}
assert.False(t, resp["success"].(bool))
}
@@ -233,7 +247,9 @@ func TestLinearIntegration_UnlinkIssue_BadAccountID(t *testing.T) {
assert.Equal(t, http.StatusBadRequest, w.Code)
var resp map[string]interface{}
json.Unmarshal(w.Body.Bytes(), &resp)
if err := json.Unmarshal(w.Body.Bytes(), &resp); err != nil {
panic(err)
}
errBody := resp["error"].(map[string]interface{})
assert.Contains(t, errBody["message"], "invalid account_id")
}
@@ -250,7 +266,9 @@ func TestLinearIntegration_UnlinkIssue_InvalidJSON(t *testing.T) {
assert.Equal(t, http.StatusBadRequest, w.Code)
var resp map[string]interface{}
json.Unmarshal(w.Body.Bytes(), &resp)
if err := json.Unmarshal(w.Body.Bytes(), &resp); err != nil {
panic(err)
}
assert.False(t, resp["success"].(bool))
}
@@ -264,7 +282,9 @@ func TestLinearIntegration_SearchIssue_BadAccountID(t *testing.T) {
assert.Equal(t, http.StatusBadRequest, w.Code)
var resp map[string]interface{}
json.Unmarshal(w.Body.Bytes(), &resp)
if err := json.Unmarshal(w.Body.Bytes(), &resp); err != nil {
panic(err)
}
errBody := resp["error"].(map[string]interface{})
assert.Contains(t, errBody["message"], "invalid account_id")
}
@@ -279,7 +299,9 @@ func TestLinearIntegration_SearchIssue_BlankQuery(t *testing.T) {
assert.Equal(t, http.StatusUnprocessableEntity, w.Code)
var resp map[string]interface{}
json.Unmarshal(w.Body.Bytes(), &resp)
if err := json.Unmarshal(w.Body.Bytes(), &resp); err != nil {
panic(err)
}
assert.Equal(t, "Specify search string with parameter q", resp["error"])
}
@@ -293,7 +315,9 @@ func TestLinearIntegration_GetLinkedIssues_BadAccountID(t *testing.T) {
assert.Equal(t, http.StatusBadRequest, w.Code)
var resp map[string]interface{}
json.Unmarshal(w.Body.Bytes(), &resp)
if err := json.Unmarshal(w.Body.Bytes(), &resp); err != nil {
panic(err)
}
errBody := resp["error"].(map[string]interface{})
assert.Contains(t, errBody["message"], "invalid account_id")
}