feat: in-process HTTP search; /get /stats /audit /ingest. (#13)
Tests / Test (push) Failing after 5s
Tests / Release (semver) (push) Skipped

bin/brain/serve.go (ladybug tags) calls internal/brain instead of exec.
HTTP tests inject a fake API so CI stays cgo-free. ExecSearcher remains
the fallback when the binary is built without system_ladybug.
This commit is contained in:
2026-08-13 17:52:15 +01:00
committed by GitHub
co-authored by GitHub
parent 20b78a9a20
commit 66c87842e2
10 changed files with 380 additions and 63 deletions
+20
View File
@@ -0,0 +1,20 @@
//go:build brain_serve && !system_ladybug
//
// Fallback serve when ladybug cgo is not in the build (CI / tags=brain_serve).
// Production shebang is serve.go (in-process).
package main
import (
"os"
"github.com/eSlider/2dph/internal/httpapi"
)
func main() {
if os.Getenv("KB_ROOT") == "" {
if wd, err := os.Getwd(); err == nil {
os.Setenv("KB_ROOT", wd)
}
}
httpapi.Run(nil)
}