Rename package, CLI, and deploy artifacts to rein-aharness (HARNESS-WP-0002-T02)
agent_harness -> rein_aharness (package + all imports), CLI command agent-harness -> rein-aharness, Docker image tag, k8s namespace/labels/ names, Makefile targets, deploy script env var/paths. In-repo identity strings (hub event source, metrics harness field, default assignee, argparse prog name, commit author identity) updated to match. Historical documents left untouched on purpose: docs/adr/ADR-001-agent-harness-architecture.md, docs/architecture.md (dated v0.1 snapshot), workplans/HARNESS-WP-0001 (completed under the old name), and the SSH host alias "forgejo-agent-harness" (external ~/.ssh/config entry, not owned here). Verified: 47/47 tests pass, CLI runs correctly from a fresh venv, `make image` builds and the resulting container runs correctly. deploy/README.md gained an explicit rename cutover checklist for what this session cannot safely do unattended -- moving the host-side secrets dir and checkout on railiance01, and not deleting the old k8s namespace until the new one is confirmed working. The actual live cutover (running that checklist against the real Railiance deployment) is not attempted here -- real production surgery on binky-control's live automation, needs the operator present. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
parent
08327a34a4
commit
f6930ad115
41 changed files with 214 additions and 158 deletions
|
|
@ -3,6 +3,25 @@
|
|||
Single shared harness instance on **railiance01**. Secrets stay on the host
|
||||
(Lanes 2–3); the container image is the portable runtime package.
|
||||
|
||||
> **Renamed from agent-harness (HARNESS-WP-0002-T02).** Image tag, k8s
|
||||
> namespace/labels, CLI command, and Python package are all renamed in
|
||||
> this repo already. The commands below assume the **rename cutover
|
||||
> checklist** just below has been done on railiance01 first — this is a
|
||||
> live production deployment for `binky-control`, so the cutover itself
|
||||
> is deliberately not automated from a workstation session.
|
||||
|
||||
## Rename cutover checklist (do this on railiance01 before redeploying)
|
||||
|
||||
1. Move the host-side secrets dir: `mv ~/.local/agent-harness ~/.local/rein-aharness`
|
||||
(or symlink, if anything else still reads the old path).
|
||||
2. Move/rename the checkout: `mv ~/agent-harness ~/rein-aharness` (or a fresh
|
||||
`deploy-rsync` to the new path — see Makefile).
|
||||
3. Verify no other host cron/systemd unit still references
|
||||
`~/agent-harness` or the `agent-harness` command directly.
|
||||
4. Once the above is done, `kubectl delete namespace agent-harness` **after**
|
||||
confirming the new `rein-aharness` namespace deploys and smokes clean —
|
||||
don't delete the old one first, in case cutover needs a rollback.
|
||||
|
||||
## Layout
|
||||
|
||||
| Path | Role |
|
||||
|
|
@ -10,31 +29,31 @@ Single shared harness instance on **railiance01**. Secrets stay on the host
|
|||
| `Containerfile` | Image: Python CLI + git + openssh; optional vendored llm-connect |
|
||||
| `deploy/k8s/railiance/` | Namespace, ConfigMap, Deployment, smoke Job |
|
||||
| `deploy/scripts/railiance-smoke.sh` | Host e2e: clone sandbox → commit → push → hub |
|
||||
| `agent-harness smoke` | Deterministic smoke (no Claude Code required) |
|
||||
| `rein-aharness smoke` | Deterministic smoke (no Claude Code required) |
|
||||
|
||||
## Prerequisites (done 2026-07-17)
|
||||
## Prerequisites (done 2026-07-17, paths renamed per checklist above)
|
||||
|
||||
- Lane 2 deploy key on host + Forgejo write on `coulomb/executor-sandbox`
|
||||
- Lane 3 AppRole under `~/.local/agent-harness/approle-binky-mail`
|
||||
- `source ~/.local/agent-harness/env`
|
||||
- Lane 3 AppRole under `~/.local/rein-aharness/approle-binky-mail`
|
||||
- `source ~/.local/rein-aharness/env`
|
||||
- Hub: `http://127.0.0.1:18000` (ops-bridge) or in-cluster `state-hub.state-hub.svc`
|
||||
|
||||
## Build & load image (workstation → railiance01)
|
||||
|
||||
```bash
|
||||
# from agent-harness repo root
|
||||
make image # tags agent-harness:railiance01
|
||||
make image-export # /tmp/agent-harness-railiance01.tar
|
||||
scp /tmp/agent-harness-railiance01.tar railiance01:/tmp/
|
||||
ssh railiance01 sudo k3s ctr images import /tmp/agent-harness-railiance01.tar
|
||||
# from rein-aharness repo root
|
||||
make image # tags rein-aharness:railiance01
|
||||
make image-export # /tmp/rein-aharness-railiance01.tar
|
||||
scp /tmp/rein-aharness-railiance01.tar railiance01:/tmp/
|
||||
ssh railiance01 sudo k3s ctr images import /tmp/rein-aharness-railiance01.tar
|
||||
```
|
||||
|
||||
## Apply k8s
|
||||
|
||||
```bash
|
||||
rsync -a deploy/k8s/railiance/ railiance01:agent-harness/deploy/k8s/railiance/
|
||||
ssh railiance01 kubectl apply -k agent-harness/deploy/k8s/railiance/
|
||||
ssh railiance01 kubectl -n agent-harness rollout status deploy/agent-harness
|
||||
rsync -a deploy/k8s/railiance/ railiance01:rein-aharness/deploy/k8s/railiance/
|
||||
ssh railiance01 kubectl apply -k rein-aharness/deploy/k8s/railiance/
|
||||
ssh railiance01 kubectl -n rein-aharness rollout status deploy/rein-aharness
|
||||
```
|
||||
|
||||
## Host smoke (authoritative e2e gate)
|
||||
|
|
@ -42,7 +61,7 @@ ssh railiance01 kubectl -n agent-harness rollout status deploy/agent-harness
|
|||
Full path uses the host deploy key and hub bridge:
|
||||
|
||||
```bash
|
||||
ssh railiance01 'bash ~/agent-harness/deploy/scripts/railiance-smoke.sh'
|
||||
ssh railiance01 'bash ~/rein-aharness/deploy/scripts/railiance-smoke.sh'
|
||||
```
|
||||
|
||||
Expect: local commit + push to `executor-sandbox`, hub event `harness_smoke`,
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: agent-harness
|
||||
name: rein-aharness
|
||||
labels:
|
||||
app.kubernetes.io/part-of: agent-harness
|
||||
app.kubernetes.io/name: agent-harness
|
||||
app.kubernetes.io/part-of: rein-aharness
|
||||
app.kubernetes.io/name: rein-aharness
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: agent-harness-config
|
||||
namespace: agent-harness
|
||||
name: rein-aharness-config
|
||||
namespace: rein-aharness
|
||||
labels:
|
||||
app.kubernetes.io/name: agent-harness
|
||||
app.kubernetes.io/name: rein-aharness
|
||||
data:
|
||||
# In-cluster State Hub (production). Host-level smoke may override to
|
||||
# http://127.0.0.1:18000 (ops-bridge reverse tunnel to workstation hub).
|
||||
|
|
|
|||
|
|
@ -3,32 +3,32 @@
|
|||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: agent-harness
|
||||
namespace: agent-harness
|
||||
name: rein-aharness
|
||||
namespace: rein-aharness
|
||||
labels:
|
||||
app.kubernetes.io/name: agent-harness
|
||||
app.kubernetes.io/part-of: agent-harness
|
||||
app.kubernetes.io/name: rein-aharness
|
||||
app.kubernetes.io/part-of: rein-aharness
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: agent-harness
|
||||
app.kubernetes.io/name: rein-aharness
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: agent-harness
|
||||
app.kubernetes.io/part-of: agent-harness
|
||||
app.kubernetes.io/name: rein-aharness
|
||||
app.kubernetes.io/part-of: rein-aharness
|
||||
spec:
|
||||
securityContext:
|
||||
fsGroup: 10001
|
||||
containers:
|
||||
- name: agent-harness
|
||||
image: agent-harness:railiance01
|
||||
- name: rein-aharness
|
||||
image: rein-aharness:railiance01
|
||||
imagePullPolicy: Never
|
||||
command: ["sleep", "infinity"]
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: agent-harness-config
|
||||
name: rein-aharness-config
|
||||
resources:
|
||||
requests:
|
||||
cpu: 25m
|
||||
|
|
|
|||
|
|
@ -4,10 +4,10 @@
|
|||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
name: agent-harness-smoke
|
||||
namespace: agent-harness
|
||||
name: rein-aharness-smoke
|
||||
namespace: rein-aharness
|
||||
labels:
|
||||
app.kubernetes.io/name: agent-harness
|
||||
app.kubernetes.io/name: rein-aharness
|
||||
app.kubernetes.io/component: smoke
|
||||
spec:
|
||||
ttlSecondsAfterFinished: 600
|
||||
|
|
@ -15,7 +15,7 @@ spec:
|
|||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: agent-harness
|
||||
app.kubernetes.io/name: rein-aharness
|
||||
app.kubernetes.io/component: smoke
|
||||
spec:
|
||||
restartPolicy: Never
|
||||
|
|
@ -23,13 +23,13 @@ spec:
|
|||
fsGroup: 10001
|
||||
containers:
|
||||
- name: smoke
|
||||
image: agent-harness:railiance01
|
||||
image: rein-aharness:railiance01
|
||||
imagePullPolicy: Never
|
||||
args:
|
||||
- "profiles"
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: agent-harness-config
|
||||
name: rein-aharness-config
|
||||
resources:
|
||||
requests:
|
||||
cpu: 50m
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
namespace: agent-harness
|
||||
namespace: rein-aharness
|
||||
resources:
|
||||
- 00-namespace.yaml
|
||||
- configmap.yaml
|
||||
|
|
|
|||
|
|
@ -1,17 +1,22 @@
|
|||
#!/usr/bin/env bash
|
||||
# Host-level Railiance smoke for agent-harness (HARNESS-WP-0001-T06).
|
||||
# Host-level Railiance smoke for rein-aharness (HARNESS-WP-0001-T06).
|
||||
# Run on railiance01 after install. Uses deploy key + AppRole env + hub :18000.
|
||||
#
|
||||
# HARNESS-WP-0002-T02 rename: ROOT default and the AppRole env path below
|
||||
# changed from agent-harness to rein-aharness. Both must exist under the
|
||||
# NEW name on the host (checkout dir + ~/.local/rein-aharness/) before this
|
||||
# script is deployed — see deploy/README.md "Rename cutover checklist".
|
||||
set -euo pipefail
|
||||
|
||||
ROOT="${AGENT_HARNESS_ROOT:-$HOME/agent-harness}"
|
||||
ROOT="${REIN_AHARNESS_ROOT:-$HOME/rein-aharness}"
|
||||
# shellcheck disable=SC1090
|
||||
source "${HOME}/.local/agent-harness/env"
|
||||
source "${HOME}/.local/rein-aharness/env"
|
||||
export STATE_HUB_URL="${STATE_HUB_URL:-http://127.0.0.1:18000}"
|
||||
export PATH="${HOME}/.local/bin:${PATH}"
|
||||
export PYTHONPATH="${ROOT}:${HOME}/llm-connect${PYTHONPATH:+:$PYTHONPATH}"
|
||||
|
||||
cd "$ROOT"
|
||||
if ! command -v agent-harness >/dev/null 2>&1; then
|
||||
if ! command -v rein-aharness >/dev/null 2>&1; then
|
||||
python3 -m pip install --user -e . -q
|
||||
fi
|
||||
|
||||
|
|
@ -19,6 +24,6 @@ echo "STATE_HUB_URL=$STATE_HUB_URL"
|
|||
curl -sS -m 5 "$STATE_HUB_URL/state/health" || curl -sS -m 5 "${STATE_HUB_URL%/}/" || true
|
||||
echo
|
||||
|
||||
agent-harness smoke \
|
||||
rein-aharness smoke \
|
||||
--work-dir "${HOME}/work/executor-sandbox" \
|
||||
--remote "ssh://git@forgejo-agent-harness/coulomb/executor-sandbox.git"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue