Run on the stack host, react to Matrix events, keep the repo current
The stack moved to AWS Lightsail, so the maintainer now runs on that host as ubuntu and is triggered by events rather than polling: - A long-poll /sync delivers operator messages and #stack-alerts within about a second. Follow-ups resume the Claude session, so the Stack Maintenance room works like a chat. status, cancel, new, upgrade and help are answered even while a run is in progress. - FIRING alerts from the Alertmanager bridge are batched and triaged in a thread, with a per-fingerprint cooldown. - Agent runs go one at a time from a persisted priority queue, so an unusable agent defers work instead of losing it. - Health checks add host resources (disk, memory, OOM kills, restart loops, stale Kuma) and reboot detection; one cycle's findings share a run. - The daily report and the weekly upgrade run at fixed UTC times; the upgrade covers every image on the host. - Applied changes are committed to semprini-core main and pushed. The daemon fast-forwards before a run and pushes leftovers after it. - The Claude credential comes from `claude setup-token` via --set-claude-token. Self-update runs hourly, gated by --check. - install.sh renders the unit for the current user and configures the git credential helper. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
46a1ec1e01
commit
556ffb6561
7 files changed
+2132
-863
No files matched your search
+33
-9
@@ -1,24 +1,47 @@
|
||||
{
|
||||
"repo_dir": "/home/paul/Dev/semprini-core",
|
||||
"extra_dirs": ["/home/paul/Dev"],
|
||||
"repo_dir": "/home/ubuntu/semprini-core",
|
||||
"extra_dirs": ["/home/ubuntu/semprini-blog", "/home/ubuntu/conk"],
|
||||
"agent_file": "agents/stack-support.agent.md",
|
||||
"runbook_file": "docs/stack-support-runbook.md",
|
||||
"claude_bin": "/home/paul/.local/bin/claude",
|
||||
"claude_model": "claude-sonnet-4-6",
|
||||
"claude_bin": "/home/ubuntu/.local/bin/claude",
|
||||
"claude_model": "claude-opus-5",
|
||||
"claude_oauth_token": "",
|
||||
"claude_extra_args": [],
|
||||
"agent_timeout_seconds": 1800,
|
||||
"agent_timeout_seconds": 2700,
|
||||
|
||||
"kuma_volume": "uptime-kuma-data",
|
||||
"sqlite_image": "keinos/sqlite3",
|
||||
|
||||
"autonomy": "full",
|
||||
"health_interval_seconds": 300,
|
||||
"upgrade_interval_seconds": 604800,
|
||||
"matrix_poll_seconds": 30,
|
||||
"down_confirmations": 2,
|
||||
"heartbeat_interval_seconds": 86400,
|
||||
"upgrade_weekday": 5,
|
||||
"upgrade_hour_utc": 22,
|
||||
"digest_hour_utc": 21,
|
||||
"conversation_ttl_seconds": 14400,
|
||||
"escalation_expiry_seconds": 604800,
|
||||
"self_update_interval_seconds": 3600,
|
||||
|
||||
"state_file": "/home/paul/.local/state/semprini-maintainer/state.json",
|
||||
"state_file": "/home/ubuntu/.local/state/semprini-maintainer/state.json",
|
||||
|
||||
"alerts": {
|
||||
"sender": "@alerts:semprini.me",
|
||||
"batch_seconds": 60,
|
||||
"cooldown_seconds": 43200,
|
||||
"ignore": ["PipelineTest"]
|
||||
},
|
||||
|
||||
"host": {
|
||||
"disk_warn_percent": 85,
|
||||
"mem_available_min_mb": 400,
|
||||
"kuma_stale_seconds": 600,
|
||||
"check_cooldown_seconds": 43200
|
||||
},
|
||||
|
||||
"git": {
|
||||
"repos": [{"path": "/home/ubuntu/semprini-core", "slug": "paul/semprini-core"}],
|
||||
"branch": "main"
|
||||
},
|
||||
|
||||
"gitea": {
|
||||
"api_base": "https://git.semprini.me/api/v1",
|
||||
@@ -35,6 +58,7 @@
|
||||
"user_id": "@maintainer-bot:semprini.me",
|
||||
"access_token": "FILLED_BY_register-matrix-bot.sh",
|
||||
"room_id": "FILLED_BY_register-matrix-bot.sh",
|
||||
"alerts_room": "#stack-alerts:semprini.me",
|
||||
"admin_user_id": "@paul:semprini.me"
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user