Files
second-brain/docs/RELEASE_CHECKLIST.md

106 lines
3.5 KiB
Markdown

# Second-Brain 2.0 — Release Checklist (Grundversion + FastAPI)
Scope: OpenClaw workspace at `/root/.openclaw/workspace` with `second-brain/` and the shipped `second-brain/systemd/` unit files.
This checklist is copy/paste friendly. Run as a user with `sudo` (systemd commands need it).
## 0) Preconditions (one-time per host)
### Repo + Python sanity
```bash
cd /root/.openclaw/workspace
test -d second-brain || { echo "missing: second-brain/"; exit 1; }
python3 --version
```
### Ensure systemd units are installed (copy/symlink)
```bash
ls -la /etc/systemd/system/openclaw-secondbrain-*.timer /etc/systemd/system/openclaw-secondbrain-*.service 2>/dev/null || true
ls -la /etc/systemd/system/openclaw-memory-archive.* 2>/dev/null || true
```
If missing, install them (symlink is fine; copy is fine too):
```bash
sudo ln -sf /root/.openclaw/workspace/second-brain/systemd/openclaw-secondbrain-*.service /etc/systemd/system/
sudo ln -sf /root/.openclaw/workspace/second-brain/systemd/openclaw-secondbrain-*.timer /etc/systemd/system/
sudo ln -sf /root/.openclaw/workspace/second-brain/systemd/openclaw-memory-archive.* /etc/systemd/system/
sudo ln -sf /root/.openclaw/workspace/second-brain/systemd/openclaw-secondbrain-dashboard.service /etc/systemd/system/
sudo systemctl daemon-reload
```
### Enable timers
```bash
sudo systemctl enable --now openclaw-secondbrain-backup.timer
sudo systemctl enable --now openclaw-secondbrain-ingest-memory.timer
sudo systemctl enable --now openclaw-secondbrain-index-vectors.timer
sudo systemctl enable --now openclaw-secondbrain-review.timer
sudo systemctl enable --now openclaw-secondbrain-heartbeat.timer
sudo systemctl enable --now openclaw-secondbrain-proactive-search.timer
sudo systemctl enable --now openclaw-memory-archive.timer
```
## 1) Release QA — systemd status + timers
### Verify timers are active and scheduled
```bash
sudo systemctl list-timers --all | grep -E 'openclaw-(secondbrain|memory-archive)' || true
sudo systemctl --failed --no-pager || true
```
### Verify the oneshot services can run successfully (manual trigger)
```bash
sudo systemctl start openclaw-secondbrain-ingest-memory.service
sudo systemctl start openclaw-secondbrain-index-vectors.service
sudo systemctl start openclaw-secondbrain-review.service
sudo systemctl start openclaw-secondbrain-backup.service
sudo systemctl start openclaw-secondbrain-heartbeat.service
sudo systemctl start openclaw-secondbrain-proactive-search.service
sudo systemctl start openclaw-memory-archive.service
```
Logs:
```bash
tail -n 200 /root/.openclaw/workspace/cron_wrapper.log
sudo journalctl -u openclaw-secondbrain-review.service -n 200 --no-pager
```
## 2) Release QA — data + DB invariants
```bash
ls -la /root/.openclaw/workspace/second-brain/data/brain.sqlite
python3 - <<'PY'
import sqlite3
db="/root/.openclaw/workspace/second-brain/data/brain.sqlite"
con=sqlite3.connect(db)
cur=con.cursor()
print("integrity_check:", cur.execute("PRAGMA integrity_check").fetchone()[0])
print("engrams:", cur.execute("SELECT COUNT(*) FROM engrams").fetchone()[0])
con.close()
PY
```
## 3) Release QA — FastAPI (HTTP endpoints + logs)
FastAPI service:
```bash
sudo systemctl enable --now openclaw-secondbrain-dashboard.service
sudo systemctl status openclaw-secondbrain-dashboard.service --no-pager
```
Endpoint checks:
```bash
curl -fsS http://127.0.0.1:8501/healthz && echo
curl -fsS http://127.0.0.1:8501/api/config
curl -fsS http://127.0.0.1:8501/api/stats
curl -fsS "http://127.0.0.1:8501/api/engrams?limit=1&offset=0"
```