Files
poimen-workflows/k8s/worker-deployment.yaml
T
Test 6a87833c7f
ci / test (push) Failing after 1m2s
feat: implement proper orchestrator workflow with reconciliation loop
Rewrite OrchestratorWorkflow as true reconciliation loop:
- PlanningActivity decides what tasks to dispatch
- Fan-out TaskUnit workflows for parallel execution
- Each TaskUnit runs Implementer → Test → Judge → Commit
- Judge reviews code quality, retries on failure with lessons
- Fan-in waits for all TaskUnits
- Board update and squash merge on success
- continue-as-new for long-running workflows
- Proper error handling and signal support

Key changes:
- statemachine/orchestrator.go: Reconciliation loop (Plan → Dispatch → Review → Repeat)
- statemachine/taskunit.go: Task execution with retry loop & judge review
- statemachine/types.go: Updated TaskUnitInput/Output for new workflow
- cmd/worker/main.go: Register RunIntegrationTestActivity
- action/integration.go: Renamed from integration_test.go (fix Go build issue)

Models:
- Planner: reasoning (OpenAI-compatible from local LLM API)
- Judge: reasoning (reviews diff + tests, gates success)
- Implementer: ornith:35b (executes tasks)

Verification: go build ./cmd/worker ./cmd/starter ✓
2026-08-26 15:00:42 -07:00

69 lines
2.0 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: poimen-worker
namespace: poimen
spec:
replicas: 2
selector:
matchLabels:
app: poimen-worker
template:
metadata:
labels:
app: poimen-worker
annotations:
git-commit: "9fb58ae" # ✅ Updated on each push, triggers rolling restart
deployment-date: "2026-08-26"
spec:
containers:
- name: worker
image: golang:latest
imagePullPolicy: Always # ✅ Force pull latest image on pod startup
workingDir: /app
command: ["/bin/sh", "-c"]
args:
- |
set -e
echo "[$(date)] Starting poimen worker pod..."
apt-get update && apt-get install -y --no-install-recommends git
echo "[$(date)] Cloning latest code from git..."
git clone https://forgejo.riotpiao.com/rock/poimen-workflows.git /app
cd /app
echo "[$(date)] Latest commit: $(git rev-parse HEAD)"
echo "[$(date)] Downloading dependencies..."
go mod download
echo "[$(date)] Starting orchestrator worker..."
go run ./cmd/worker
env:
- name: TEMPORAL_NAMESPACE
valueFrom:
configMapKeyRef:
name: poimen-config
key: TEMPORAL_NAMESPACE
- name: TEMPORAL_HOSTPORT
valueFrom:
configMapKeyRef:
name: poimen-config
key: TEMPORAL_HOSTPORT
- name: ANTHROPIC_API_KEY
valueFrom:
secretKeyRef:
name: poimen-secrets
key: ANTHROPIC_API_KEY
resources:
requests:
memory: "512Mi"
cpu: "500m"
limits:
memory: "2Gi"
cpu: "2000m"
livenessProbe:
exec:
command:
- /bin/sh
- -c
- ps aux | grep -q "go run ./cmd/worker" && echo ok || exit 1
initialDelaySeconds: 30
periodSeconds: 10