From d5ee35c97b063bb75155de06133e9160e42f7729 Mon Sep 17 00:00:00 2001 From: stevef Date: Sun, 19 Apr 2026 10:33:19 +0200 Subject: [PATCH] fix: resolve make check failures and race conditions --- Makefile | 2 +- pkg/agent/loop_turn.go | 4 ++-- web/Makefile | 10 ++++++---- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index c5d691c29..c462914e8 100644 --- a/Makefile +++ b/Makefile @@ -306,7 +306,7 @@ test: generate ## fmt: Format Go code fmt: - @$(GOLANGCI_LINT) fmt + @go fmt ./... ## lint-docs: Check common documentation layout and naming conventions lint-docs: diff --git a/pkg/agent/loop_turn.go b/pkg/agent/loop_turn.go index 1085ddeae..adbc2c079 100644 --- a/pkg/agent/loop_turn.go +++ b/pkg/agent/loop_turn.go @@ -600,10 +600,10 @@ turnLoop: reasoningContent = response.ReasoningContent } if ts.channel == "pico" { - go al.publishPicoReasoning(turnCtx, reasoningContent, ts.chatID) + go al.publishPicoReasoning(ctx, reasoningContent, ts.chatID) } else { go al.handleReasoning( - turnCtx, + ctx, reasoningContent, ts.channel, al.targetReasoningChannelID(ts.channel), diff --git a/web/Makefile b/web/Makefile index 4dca810e7..fbe42db9f 100644 --- a/web/Makefile +++ b/web/Makefile @@ -1,5 +1,5 @@ .PHONY: dev dev-frontend dev-backend build build-frontend build-dev-picoclaw test lint clean \ - build-android-arm64 build-android-bundle + build-android-arm64 build-android-bundle frontend-install # Go variables GO?=CGO_ENABLED=0 go @@ -105,7 +105,7 @@ build-android-bundle: build-frontend GOOS=android GOARCH=arm64 $(GO) build -tags stdjson -ldflags "$(LDFLAGS)" -o "$(BUILD_DIR)/picoclaw-launcher-android-arm64" ./$(BACKEND_DIR)/ @echo "All Android launcher builds complete" -build-frontend: +frontend-install: @expected_stamp="$$(cat $(FRONTEND_DIR)/package.json $(FRONTEND_DIR)/pnpm-lock.yaml | cksum | awk '{print $$1 ":" $$2}')"; \ if [ ! -d $(FRONTEND_DIR)/node_modules ] || \ [ ! -x $(FRONTEND_DIR)/node_modules/.bin/tsc ] || \ @@ -115,6 +115,8 @@ build-frontend: (cd $(FRONTEND_DIR) && CI=true pnpm install --frozen-lockfile) && \ printf '%s\n' "$$expected_stamp" > $(FRONTEND_INSTALL_STAMP); \ fi + +build-frontend: frontend-install @echo "Building frontend..." @cd $(FRONTEND_DIR) && pnpm build:backend @@ -124,12 +126,12 @@ build-dev-picoclaw: @$(GO) build $(GOFLAGS) -ldflags "$(LDFLAGS)" -o "$(PICOCLAW_BINARY)" ../cmd/picoclaw # Run all tests -test: +test: frontend-install cd $(BACKEND_DIR) && ${WEB_GO} test ./... cd $(FRONTEND_DIR) && pnpm lint # Lint and format -lint: +lint: frontend-install cd $(BACKEND_DIR) && ${WEB_GO} vet ./... cd $(FRONTEND_DIR) && pnpm check