From 2d373ae77a33f76a5d8f0a1dc38a90c70b9898cb Mon Sep 17 00:00:00 2001 From: GRAB Racem Date: Tue, 3 Nov 2026 23:30:08 +0100 Subject: [PATCH 1/2] ci: add a race-detector step and shellcheck for the install scripts go test -race runs on every package that passes under the race detector locally (all but ./server, which needs a -race check against postgres first). A new shell job runs shellcheck on install.sh, update.sh, start.sh and scripts/backup.sh. --- .github/workflows/ci.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b3d18fe..159a0a9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,6 +44,19 @@ jobs: # as rotating failures in the agent package). Serial package execution # keeps the database state deterministic. run: go test -p 1 ./... + - 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. + run: >- + go test -race -p 1 ./agent ./cmd/artex ./config ./db ./evidence ./guard + ./intercept ./llmpool ./llmrec ./mcphttp ./notify ./sidequestion ./traffic + + shell: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + # shellcheck is preinstalled on the ubuntu runners. + - run: shellcheck install.sh update.sh start.sh scripts/backup.sh web: runs-on: ubuntu-latest From 3322ecd6a6a243a1b4e235a6459db4c2bbff120b Mon Sep 17 00:00:00 2001 From: GRAB Racem Date: Tue, 3 Nov 2026 23:36:00 +0100 Subject: [PATCH 2/2] ci: run shellcheck at warning severity The first run reported only info-level notes (SC2015 in update.sh, SC2012 and SC2086 on the intentional glob in backup.sh), which made the job fail. --- .github/workflows/ci.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 159a0a9..f927333 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -55,8 +55,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - # shellcheck is preinstalled on the ubuntu runners. - - run: shellcheck install.sh update.sh start.sh scripts/backup.sh + # shellcheck is preinstalled on the ubuntu runners. -S warning: the scripts + # currently have only info-level notes (intentional A && B || C chains in + # update.sh, an unquoted glob in backup.sh's prune), so fail on warnings. + - run: shellcheck -S warning install.sh update.sh start.sh scripts/backup.sh web: runs-on: ubuntu-latest