Files
dongarandClaude Opus 5.5 154a0c3fa8
CI / checks (push) Skipped
CI / checks (pull_request) Successful in 1m42s
CI / e2e (pull_request) Successful in 4m0s
M7.1: extract nisse-core
What isn't the dev agent's moves to nisse-core, unchanged in behaviour,
with its tests: canonical, render, render_anthropic, llm, catalog, probe,
context, views, state, reconcile, worker, cancel, dump, transport, matrix,
execution, testing, vault, memory, oplog, envfile and gitea (whole).

- nisse_core.state.StateStore holds the tables every agent has; an
  agent's subclass adds its tables (version, migrations), roles and
  views. nisse_dev.state.StateStore adds the build VM blocks (v5).
- views.project takes what each role is shown, rather than a fixed table.
- Vault takes the agent's name (agent=), for provenance.
- A test that nisse_core never imports an agent.
- The loop, config, git, delegation, expert, tools and evals stay in
  nisse-dev until nisse-ops has a loop to share.

Docs: the Development Plan marks M7.1 done and notes that Phase 6 waits on
the agent host and Terraform; Architecture Part L names the package.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01J5Utyfzw7gF7UhjRDEtjTk
2026-10-13 18:37:01 +00:00

32 lines
1.3 KiB
Bash
Executable File

#!/usr/bin/env bash
# Delete test repositories a live test run left behind (it died before its
# teardown): the test operator's nisse-e2e-* repositories older than a day,
# or of any age with --all. Needs NISSE_OPERATOR_TOKEN (from .env).
#
# scripts/e2e-cleanup.sh older than a day
# scripts/e2e-cleanup.sh --all every one, e.g. when nothing is running
set -euo pipefail
cd "$(dirname "$0")/.."
if [ -f .env ]; then set -a; . ./.env; set +a; fi
exec uv run python - "$@" <<'PY'
import os, sys
from datetime import datetime, timedelta, timezone
from nisse_core.gitea import GiteaClient
gitea = GiteaClient("https://gitea.dongar.net", os.environ["NISSE_OPERATOR_TOKEN"])
cutoff = datetime.now(timezone.utc) - (timedelta(0) if "--all" in sys.argv else timedelta(days=1))
page, gone = 1, 0
while True:
repos = gitea._request("GET", "/user/repos", params={"page": page, "limit": 50})
if not repos:
break
for repo in repos:
created = datetime.fromisoformat(repo["created_at"].replace("Z", "+00:00"))
if repo["name"].startswith("nisse-e2e-") and created < cutoff:
gitea._request("DELETE", f"/repos/{repo['full_name']}")
print("deleted", repo["full_name"])
gone += 1
page += 1
print(f"{gone} deleted")
PY