build(taskfile): drop unused tasks and share the dev State Store wait

This commit is contained in:
sam committed 2026-10-17 17:21:10 +11:00
1 parent b293bf5c5c
commit 4eaf528969
2 files changed
+14 -120

No files matched your search

+13 -119
View File
@@ -4,40 +4,6 @@ vars:
BIN_DIR: "bin"
tasks:
default:
desc: List available tasks
cmds:
- task --list
setup:
desc: Install the pinned tooling and dependencies a checkout needs
cmds:
# Report what this task cannot install for you, so a missing Go, Node or
# Docker fails here by name rather than somewhere inside the gate.
- |
set -eu
missing=
for tool in go task node npm docker; do
command -v "$tool" >/dev/null 2>&1 || missing="$missing $tool"
done
if [ -n "$missing" ]; then
echo "warning: not installed (AGENTS.md, Build and gate):$missing" >&2
fi
# The pin is one file, read here and by .github/workflows, so the linter
# running locally and the one running the gate cannot drift apart.
- |
set -eu
want=$(cat {{.ROOT_DIR}}/.golangci-version)
have=$(golangci-lint --version 2>/dev/null | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | head -1 || true)
if [ "$have" = "${want#v}" ]; then
echo "golangci-lint $want already installed"
else
echo "installing golangci-lint $want (have: ${have:-none})"
GOBIN="$(go env GOPATH)/bin" go install "github.com/golangci/golangci-lint/v2/cmd/golangci-lint@$want"
fi
- task: proto:install
- task: ui:deps
fmt:
desc: Fix and format Go source with the gate's configured formatters
cmds:
@@ -117,23 +83,7 @@ tasks:
desc: Run golangci-lint
cmds:
- golangci-lint run ./...
- task: lint:tools
lint:tools:
desc: Run golangci-lint over the tools module
dir: tools
cmds:
- golangci-lint run ./...
vuln:
desc: Scan for known vulnerabilities (requires network access)
cmds:
- govulncheck ./...
deadcode:
desc: Report unreachable production functions (advisory)
cmds:
- go run golang.org/x/tools/cmd/deadcode@latest -test=false ./cmd/...
- cd tools && golangci-lint run ./...
ui:deps:
desc: Install dashboard dependencies
@@ -165,11 +115,6 @@ tasks:
- npm test
- npm run typecheck
webhook:send:
desc: Send a test event to the dashboard's capture intake (--help for kinds)
cmds:
- bash tools/webhook-send.sh {{.CLI_ARGS}}
bench:prreview:
desc: Run the PR review benchmark on the configured models and write docs/benchmarks/pr-review-*.md (-- -model ALIAS -judge-model REF; --help for flags)
cmds:
@@ -214,17 +159,21 @@ tasks:
echo "postgres did not become healthy within 60s" >&2
exit 1
dev:daemon:
desc: Run archied with live reload
dev:wait-state:
internal: true
cmds:
- |
# The daemon and Gateway read their settings from the State Store at
# boot and exit if it is not up yet; it starts only once PostgreSQL
# is healthy, so wait for its port ([services.state] in
# deployments/dev.toml) first.
# Services read their settings from the State Store at boot and exit
# if it is not up yet, so wait for its port ([services.state] in
# deployments/dev.toml).
for _ in $(seq 1 120); do nc -z 127.0.0.1 9091 && exit 0; sleep 1; done
echo "state store did not come up on 127.0.0.1:9091 within 120s" >&2
exit 1
dev:daemon:
desc: Run archied with live reload
cmds:
- task: dev:wait-state
- air -build.args_bin="-config-overlay,deployments/dev.toml"
dev:dashboard:
@@ -241,20 +190,13 @@ tasks:
dev:gateway:
desc: Run the development Gateway
cmds:
- |
# The daemon and Gateway read their settings from the State Store at
# boot and exit if it is not up yet; it starts only once PostgreSQL
# is healthy, so wait for its port ([services.state] in
# deployments/dev.toml) first.
for _ in $(seq 1 120); do nc -z 127.0.0.1 9091 && exit 0; sleep 1; done
echo "state store did not come up on 127.0.0.1:9091 within 120s" >&2
exit 1
- task: dev:wait-state
- go run ./cmd/archie-gateway -config-overlay deployments/dev.toml
dev:messaging:
desc: Run the development Messaging Service
cmds:
- for _ in $(seq 1 120); do nc -z 127.0.0.1 9091 && exit 0; sleep 1; done; echo "state store did not come up on 127.0.0.1:9091 within 120s" >&2; exit 1
- task: dev:wait-state
- go run ./cmd/archie-messaging -config-overlay deployments/dev.toml
dev:ui:
@@ -280,24 +222,6 @@ tasks:
cmds:
- node e2e/run.cjs {{.CLI_ARGS}}
dev:mobile:
desc: Serve the dashboard on your LAN (token-protected) for phone viewing
deps:
- ui
cmds:
- cmd: |
IP=$(hostname -I | awk '{print $1}')
TOKEN_FILE="${XDG_DATA_HOME:-$HOME/.local/share}/archie/web-token"
go run ./cmd/archie-ui -listen 0.0.0.0:8484 -token-file "$TOKEN_FILE" &
UI_PID=$!
sleep 2
TOKEN=$(cat "$TOKEN_FILE" 2>/dev/null)
URL="http://$IP:8484/?t=$TOKEN"
echo "Phone URL: $URL"
echo "$URL" | qrencode -t ANSIUTF8
trap "kill $UI_PID 2>/dev/null" EXIT
wait $UI_PID
build:
desc: Build archie services and agent binaries
vars:
@@ -332,11 +256,6 @@ tasks:
cmds:
- go test -short ./...
test:full:
desc: Run the whole Go test suite uncached, including the wall-clock-bound tests
cmds:
- go test ./... -count=1
check:
desc: Run the full quality gate
# Finish mutations before starting parallel checks.
@@ -385,28 +304,3 @@ tasks:
- tools/publish.sh {{.VERSION}}
requires:
vars: [VERSION]
clean:
desc: Remove build artifacts
cmds:
- rm -rf {{.BIN_DIR}}
docker-build:
desc: Build the archie-agent sandbox image
cmds:
- docker compose build agent
docker-up:
desc: Start the optional external NATS service via docker compose
cmds:
- docker compose up -d nats
docker-down:
desc: Stop the docker compose stack
cmds:
- docker compose down
docker-logs:
desc: Follow the NATS container logs
cmds:
- docker compose logs -f nats
+1 -1
View File
@@ -75,7 +75,7 @@ services:
# "Started", which reads like a crash loop. Naming the service explicitly
# still works without activating the profile:
#
# docker compose build agent (also: task docker-build)
# docker compose build agent
# docker compose pull agent -- plain `pull` skips profiled services
#
# Routine freshness is handled by the daemon, which pulls this image per