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.
114 lines
3.9 KiB
YAML
114 lines
3.9 KiB
YAML
# Builds and pushes the archied and archie-agent images on every merge
|
|
# to main. carina's watchtower container (see docker-compose.yml) picks
|
|
# up the new images and restarts the running daemons -- this workflow
|
|
# never touches carina directly.
|
|
name: deploy
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
tags: ["archied/v*", "archie/v*"]
|
|
|
|
jobs:
|
|
gate:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: "1.26"
|
|
|
|
- name: Set up Node
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: "22"
|
|
|
|
- name: Quality gate
|
|
run: |
|
|
gofumpt -w .
|
|
go fix ./...
|
|
go vet ./...
|
|
go build ./...
|
|
go test ./... -count=1
|
|
|
|
# The dashboard suite runs in CI too, or it only ever runs when
|
|
# someone remembers to; the Go steps above never touch it.
|
|
- name: Dashboard tests
|
|
run: |
|
|
npm ci --prefix ui || npm install --prefix ui
|
|
npm test --prefix ui
|
|
|
|
- name: Release tags must match changelogs
|
|
run: |
|
|
set -e
|
|
fail=0
|
|
for tag in $(git tag --points-at HEAD); do
|
|
case "$tag" in
|
|
archied/v*)
|
|
ver="${tag#archied/}"
|
|
echo " archied tag $tag -> looking for [$ver] in CHANGELOG.archied.md"
|
|
grep -q "^## \\[$ver\\]" CHANGELOG.archied.md || {
|
|
echo " FAIL: CHANGELOG.archied.md has no [$ver] section"
|
|
fail=1
|
|
}
|
|
;;
|
|
archie/v*)
|
|
ver="${tag#archie/}"
|
|
echo " archie tag $tag -> looking for [$ver] in CHANGELOG.archie.md"
|
|
grep -q "^## \\[$ver\\]" CHANGELOG.archie.md || {
|
|
echo " FAIL: CHANGELOG.archie.md has no [$ver] section"
|
|
fail=1
|
|
}
|
|
;;
|
|
esac
|
|
done
|
|
if [ $fail -ne 0 ]; then
|
|
echo
|
|
echo "A release tag points at this commit but its changelog does not"
|
|
echo "describe that version. Run: task release:prepare VERSION=<ver>"
|
|
echo "edit the generated notes, then: task release VERSION=<ver>"
|
|
exit 1
|
|
fi
|
|
if ! git tag --points-at HEAD | grep -qE 'archie' ; then
|
|
echo "::warning ::No release tags at HEAD -- images will be stamped 'dev'"
|
|
fi
|
|
|
|
build-and-push:
|
|
needs: gate
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Log in to registry
|
|
run: echo "${{ secrets.DEPLOY_TOKEN }}" | docker login git.catlow.cloud -u sam --password-stdin
|
|
|
|
- name: Build and push archied
|
|
run: |
|
|
GATEWAY_TAG="$(git tag --points-at HEAD --list 'archied/v*' | sort -V | tail -1)"
|
|
RUNTIME_TAG="$(git tag --points-at HEAD --list 'archie/v*' | sort -V | tail -1)"
|
|
GATEWAY_VERSION="${GATEWAY_TAG#archied/}"
|
|
RUNTIME_VERSION="${RUNTIME_TAG#archie/}"
|
|
[ -n "$GATEWAY_VERSION" ] || GATEWAY_VERSION=dev
|
|
[ -n "$RUNTIME_VERSION" ] || RUNTIME_VERSION=dev
|
|
docker build \
|
|
--build-arg GATEWAY_VERSION="$GATEWAY_VERSION" \
|
|
--build-arg RUNTIME_VERSION="$RUNTIME_VERSION" \
|
|
-f Dockerfile.archied -t git.catlow.cloud/sam/archied:latest .
|
|
docker push git.catlow.cloud/sam/archied:latest
|
|
|
|
- name: Build and push archie-agent
|
|
run: |
|
|
RUNTIME_TAG="$(git tag --points-at HEAD --list 'archie/v*' | sort -V | tail -1)"
|
|
RUNTIME_VERSION="${RUNTIME_TAG#archie/}"
|
|
[ -n "$RUNTIME_VERSION" ] || RUNTIME_VERSION=dev
|
|
docker build --build-arg RUNTIME_VERSION="$RUNTIME_VERSION" -f Dockerfile -t git.catlow.cloud/sam/archie-agent:latest .
|
|
docker push git.catlow.cloud/sam/archie-agent:latest
|