From 04777513b6f9c1840c6a41e832a996dcb5ec3362 Mon Sep 17 00:00:00 2001 From: BaaRai <130491490+BaaRai@users.noreply.github.com> Date: Tue, 3 Nov 2026 23:58:15 +0100 Subject: [PATCH] ci: give the race run its own database The -race step reused the job's ARTEX_PG_DSN, so it ran against the database the plain test step had just populated. The db tests are not idempotent across runs and failed on duplicate llm_profiles names, turning main red right after #144 merged. --- .github/workflows/ci.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f927333..deec2e0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -47,6 +47,11 @@ jobs: - name: go test -race # Race detector on the packages that pass under -race today. ./server is # left out until it has been checked with -race against postgres. + # Its own database: the plain run above leaves rows behind and the db tests + # are not idempotent across runs (duplicate llm_profiles names). + env: + ARTEX_PG_DSN: postgres://artex:testpass@localhost:5432/artextest_race?sslmode=disable + run: >- go test -race -p 1 ./agent ./cmd/artex ./config ./db ./evidence ./guard ./intercept ./llmpool ./llmrec ./mcphttp ./notify ./sidequestion ./traffic