Applies the four-reviewer pass over the forge/dashboard-actions work. The through-line is that several capabilities were wired but inert, and one of them could cost real work. DUPLICATE WORK. "Closes #N" was dropped from PR bodies in favour of LinkBranch, which is sidebar linkage on Gitea and a no-op stub on GitHub -- neither closes anything, and nothing else did either. So a merged task left its issue open, labelled and assigned; the next poll re-enqueued it, and once the dashboard's Clear removed the task row that became a second implementation and a second PR for work already merged. reconcilePRs now closes the issue on merge, and a rejected task closes its issue too. A PR closed without merging deliberately leaves the issue open: that usually means "try again". MAX RETRIES. Configured, defaulted and reported by /api/config, and enforced nowhere -- markDead was unreachable and EffectiveMaxRetries had no callers, so the dashboard's retry incremented retry_count forever. The retry action now retires a task to dead at the cap. DEAD ON ARRIVAL. Tasks() never selected plan or source, so the "Decision required" panel could not render and chat tasks -- whose issue number is synthetic -- linked to forge issues that do not exist. COSMETIC FAILURE, FATAL RESULT. OpenPR failed the whole stage when LinkBranch errored, so the pull request was never opened and the task parked; a retry re-links the same branch, which Gitea answers with a conflict, so every retry parked again. It is best-effort now. INVISIBLE ACTIONS. Approve/retry/reject wrote store rows and nothing else, so the timeline and activity stream never showed that a human had intervened. They emit events now. Also: store write failures answer 500 rather than 409; the dashboard surfaces the server's actual reason instead of "409 Conflict"; action buttons stop propagation (acting on a task no longer also expands it), disable in flight, keep per-task errors instead of one shared string, and confirm before rejecting. Removed: the maybeRetryParked shim and markDead with their now-vacuous tests, WaitingTasks (no consumers; its tests were rewritten to assert the same routing through TaskByID), write-only Daemon.Runtime, and dir/dirs response bloat from /api/skills. skillSource checked workDir before sharedDir, mislabelling every shared skill when the two are equal. DefaultRoots now dedupes roots differing only by a trailing separator. The air build rule claiming to keep ui/dist current never ran -- it required one file to satisfy include_dir and include_file together, and ui/ is excluded from the walk. Deleted with the comment that promised it. task test:ui joins task check and CI; it ran nowhere before, so the dashboard suite could rot silently. Docs corrected where they described behaviour that no longer exists: parks no longer comment on the issue, state labels no longer drive retries, and forgerpc's doc claimed four proxied methods while listing three of five.
162 lines
4.5 KiB
YAML
162 lines
4.5 KiB
YAML
version: "3"
|
|
|
|
vars:
|
|
BIN_DIR: "bin"
|
|
|
|
tasks:
|
|
default:
|
|
desc: List available tasks
|
|
cmds:
|
|
- task --list
|
|
|
|
fmt:
|
|
desc: Format and fix Go source (gofumpt, go fix)
|
|
cmds:
|
|
- gofumpt -w .
|
|
- go fix ./...
|
|
|
|
vet:
|
|
desc: Run go vet
|
|
cmds:
|
|
- go vet ./...
|
|
|
|
lint:
|
|
desc: Run golangci-lint
|
|
cmds:
|
|
- golangci-lint run ./...
|
|
|
|
ui:
|
|
desc: Build the dashboard into ui/dist (committed; the Go build embeds it)
|
|
dir: ui
|
|
cmds:
|
|
- npm install --no-audit --no-fund
|
|
- npm run build
|
|
|
|
test:ui:
|
|
desc: Run the dashboard's node tests (DOM-building primitives)
|
|
dir: ui
|
|
cmds:
|
|
- npm test
|
|
|
|
dev:
|
|
desc: "Develop: archied live-reload + Vite HMR together. Open http://localhost:5173"
|
|
summary: |
|
|
Runs both halves of the dev loop in one terminal:
|
|
|
|
* air rebuilds and restarts archied on Go changes
|
|
* vite serves the dashboard with hot reload on :5173,
|
|
proxying /api and /events through to archied on :8484
|
|
|
|
Open http://localhost:5173 -- not :8484. The Vite server is the one with
|
|
hot reload; :8484 serves the last built dist/ and will look stale.
|
|
|
|
Ctrl-C stops both.
|
|
deps: [dev:daemon, dev:ui]
|
|
|
|
dev:daemon:
|
|
desc: archied only, live-reloading via air (prefer `task dev`)
|
|
cmds:
|
|
- air
|
|
|
|
dev:ui:
|
|
desc: Vite dev server only, expects archied already running (prefer `task dev`)
|
|
dir: ui
|
|
cmds:
|
|
- npm install --no-audit --no-fund
|
|
- npm run dev
|
|
|
|
dev:mobile:
|
|
desc: Serve the dashboard on your LAN (token-protected) for phone viewing
|
|
summary: |
|
|
Starts archied with the [web] bind on 0.0.0.0 so the dashboard is
|
|
reachable from your phone, printing the URL (LAN IP + token) and a QR
|
|
code to scan. Stop `task dev` first: both use port 8484, and two daemons
|
|
sharing the bot identity would double-poll the forge. Frontend served is
|
|
the embedded dist, so run `task ui` if you changed the frontend.
|
|
deps:
|
|
- ui
|
|
cmds:
|
|
- cmd: |
|
|
IP=$(hostname -I | awk '{print $1}')
|
|
TOKEN=$(cat "${XDG_DATA_HOME:-$HOME/.local/share}/archie/web-token" 2>/dev/null)
|
|
URL="http://$IP:8484/?t=$TOKEN"
|
|
echo "Phone URL: $URL"
|
|
echo "$URL" | qrencode -t ANSIUTF8
|
|
- go run ./cmd/archied -config-overlay ~/.config/archie/mobile.toml
|
|
|
|
build:
|
|
desc: Build archied and archie-agent binaries
|
|
sources:
|
|
- "**/*.go"
|
|
- go.mod
|
|
- go.sum
|
|
generates:
|
|
- "{{.BIN_DIR}}/archied"
|
|
- "{{.BIN_DIR}}/archie-agent"
|
|
cmds:
|
|
- go build -o {{.BIN_DIR}}/archied ./cmd/archied
|
|
- go build -o {{.BIN_DIR}}/archie-agent ./cmd/archie-agent
|
|
|
|
test:
|
|
desc: Run the Go test suite
|
|
cmds:
|
|
- go test ./... -count=1
|
|
|
|
check:
|
|
desc: "Full quality gate: fmt, go fix, vet, build, test, ui tests (matches [[repos.gate]] in config.toml)"
|
|
cmds:
|
|
- task: fmt
|
|
- go fix ./...
|
|
- task: vet
|
|
- task: build
|
|
- task: test
|
|
# The dashboard's suite runs here too. Left out of the gate it rots
|
|
# silently: nothing else executes it, so a broken DOM primitive ships.
|
|
- task: test:ui
|
|
|
|
release:preview:
|
|
desc: "Show the release notes that would be generated (VERSION=1.2.0, or GATEWAY=/RUNTIME= to version the two components separately)"
|
|
cmds:
|
|
- tools/release.sh --gateway {{.GATEWAY | default .VERSION}} --runtime {{.RUNTIME | default .VERSION}} --dry-run
|
|
requires:
|
|
vars: [VERSION]
|
|
|
|
release:prepare:
|
|
desc: "Write the generated notes into the changelogs, uncommitted, for editing (VERSION=1.2.0)"
|
|
cmds:
|
|
- tools/release.sh --gateway {{.GATEWAY | default .VERSION}} --runtime {{.RUNTIME | default .VERSION}} --prepare
|
|
requires:
|
|
vars: [VERSION]
|
|
|
|
release:
|
|
desc: "Freeze the edited changelogs into a release commit and tags (VERSION=1.2.0). Run release:prepare first."
|
|
cmds:
|
|
- tools/release.sh --gateway {{.GATEWAY | default .VERSION}} --runtime {{.RUNTIME | default .VERSION}} --tag
|
|
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 archied + NATS stack via docker compose
|
|
cmds:
|
|
- docker compose up -d
|
|
|
|
docker-down:
|
|
desc: Stop the docker compose stack
|
|
cmds:
|
|
- docker compose down
|
|
|
|
docker-logs:
|
|
desc: Follow the archied container logs
|
|
cmds:
|
|
- docker compose logs -f archied
|