From dc11ca47e6187f1017144f147a21740fb939a629 Mon Sep 17 00:00:00 2001 From: dee-see Date: Tue, 1 Sep 2026 11:19:47 +0100 Subject: [PATCH 1/3] Fix failing test --- pkg/ai/normalizer_test.go | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/pkg/ai/normalizer_test.go b/pkg/ai/normalizer_test.go index 6b43e27..2f67133 100644 --- a/pkg/ai/normalizer_test.go +++ b/pkg/ai/normalizer_test.go @@ -97,7 +97,17 @@ func TestNormalizerScenarios(t *testing.T) { t.Run("sanitize deduplicates", func(t *testing.T) { in := []string{"Example.COM ", " example.com", " "} out := sanitizeTargets(in) - if len(out) != 1 || out[0] != "example.com" { + if !reflect.DeepEqual(out, []string{"Example.COM"}) { + t.Fatalf("sanitize failed: %v", out) + } + }) + + // Casing is the model's call: it lowercases domains but keeps descriptive + // text verbatim, so sanitizeTargets must not lowercase on its own. + t.Run("sanitize preserves casing", func(t *testing.T) { + in := []string{"Any other asset is Out of Scope"} + out := sanitizeTargets(in) + if !reflect.DeepEqual(out, in) { t.Fatalf("sanitize failed: %v", out) } }) From 2ea673652dc86a12e79196973efdb72430b54c5b Mon Sep 17 00:00:00 2001 From: dee-see Date: Tue, 1 Sep 2026 11:19:56 +0100 Subject: [PATCH 2/3] Run go mod tidy --- go.mod | 3 +-- go.sum | 2 -- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/go.mod b/go.mod index 9f40df7..847e367 100644 --- a/go.mod +++ b/go.mod @@ -13,12 +13,12 @@ require ( github.com/tidwall/gjson v1.8.1 github.com/weppos/publicsuffix-go v0.50.0 golang.org/x/net v0.44.0 + maragu.dev/gomponents v1.1.0 ) require ( github.com/andybalholm/cascadia v1.1.0 // indirect github.com/fsnotify/fsnotify v1.4.9 // indirect - github.com/gomarkdown/markdown v0.0.0-20260217112301-37c66b85d6ab // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/inconshreveable/mousetrap v1.0.0 // indirect @@ -39,5 +39,4 @@ require ( gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect gopkg.in/ini.v1 v1.62.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect - maragu.dev/gomponents v1.1.0 // indirect ) diff --git a/go.sum b/go.sum index 134409e..b0ee858 100644 --- a/go.sum +++ b/go.sum @@ -109,8 +109,6 @@ github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/gomarkdown/markdown v0.0.0-20260217112301-37c66b85d6ab h1:VYNivV7P8IRHUam2swVUNkhIdp0LRRFKe4hXNnoZKTc= -github.com/gomarkdown/markdown v0.0.0-20260217112301-37c66b85d6ab/go.mod h1:JDGcbDT52eL4fju3sZ4TeHGsQwhG9nbDV21aMyhwPoA= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= From 6db8466a2afe43c81aa59ce559cc52a09eecd2f1 Mon Sep 17 00:00:00 2001 From: dee-see Date: Tue, 1 Sep 2026 11:20:03 +0100 Subject: [PATCH 3/3] Run go checks in CI --- .github/workflows/ci.yml | 46 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..d90dbf0 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,46 @@ +name: CI + +on: + push: + branches: [ "main" ] + paths-ignore: + - 'README.md' + - '*.md' + - 'website/**' + - 'docs/**' + pull_request: + paths-ignore: + - 'README.md' + - '*.md' + - 'website/**' + - 'docs/**' + +jobs: + + test: + + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version-file: go.mod + cache: true + + - name: Build + run: go build ./... + + - name: Vet + run: go vet ./... + + - name: Test + run: go test -race ./... + + - name: Check go.mod and go.sum are tidy + run: | + go mod tidy + git diff --exit-code go.mod go.sum