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
+8 -5
View File
@@ -2,6 +2,7 @@ package main
import (
"fmt"
"gorm.io/driver/sqlite"
"gorm.io/gorm"
)
@@ -20,16 +21,18 @@ func main() {
fmt.Println("ERROR:", err)
return
}
db.AutoMigrate(&TestSettings{})
if err := db.AutoMigrate(&TestSettings{}); err != nil {
panic(err)
}
// Approach: Create with AutoProvision=true (non-zero), then update to false
s := TestSettings{AccountID: 1, Name: "test1", AutoProvision: true, Active: true}
db.Create(&s)
fmt.Printf("After Create: ID=%d\n", s.ID)
// Now update AutoProvision to false
db.Model(&TestSettings{}).Where("id = ?", s.ID).Update("auto_provision", false)
var r TestSettings
db.First(&r, s.ID)
fmt.Printf("Final: AutoProvision=%v, Active=%v, ID=%d\n", r.AutoProvision, r.Active, r.ID)
@@ -38,8 +41,8 @@ func main() {
s2 := TestSettings{AccountID: 2, Name: "test2", AutoProvision: true, Active: true}
db.Create(&s2)
db.Model(&TestSettings{}).Where("id = ?", s2.ID).Updates(map[string]interface{}{"auto_provision": false, "active": false})
var r2 TestSettings
db.First(&r2, s2.ID)
fmt.Printf("Final2: AutoProvision=%v, Active=%v\n", r2.AutoProvision, r2.Active)
}
}