# cleveragents controller — master EnvironmentFile # Copy to /etc/cleveragents/master.env (mode 0640, owned by cleveragents:cleveragents) # then customize for your deployment. # ─── identity (REQUIRED) ────────────────────────────────────────── # The (owner, repo) this master singleton manages. Plan v9 enforces # one master process per (owner, repo). Run a second master unit for # a second repo. OWNER=cleveragents REPO=cleveragents-core # ─── infrastructure (REQUIRED) ──────────────────────────────────── # Postgres URL for the controller DB. The application creates the # schema on first run; the DB user must have CREATE on this database. # For local dev only: sqlite:///./controller.db (NOT multi-machine # safe; production MUST use Postgres). CLEVERAGENTS_DB_URL=postgresql+psycopg2://cleveragents:CHANGEME@db.internal:5432/cleveragents_controller # OpenCode server URL. Master doesn't actually invoke OpenCode (the # workers do); this is logged at startup for operator visibility. CONTROLLER_OPENCODE_URL=http://opencode.internal:4096 # Forgejo connection — read by ForgejoCfg in tools/_mcp_common.py # (the existing pipeline shares this config; reuse it here for now). FORGEJO_URL=https://git.cleverthis.com FORGEJO_TOKEN=CHANGEME-forgejo-pat FORGEJO_USER=cleveragents-bot # ─── opt-in label (Phase 1k) ────────────────────────────────────── # Only PRs/issues carrying this label are managed by the controller. # Default is 'controller-managed'. To disable the gate entirely, add # --no-opt-in-label to the ExecStart line in the unit file. CONTROLLER_OPT_IN_LABEL=controller-managed # ─── cadences ───────────────────────────────────────────────────── # Tick interval — how often the state-machine + scheduler run. CONTROLLER_MASTER_TICK_INTERVAL_S=30 # Reaper interval — how often stale-heartbeat in_progress attempts # are reset to pending. CONTROLLER_REAPER_INTERVAL_S=60 # Reconciliation interval — how often the DB ↔ Forgejo sync runs. CONTROLLER_RECONCILIATION_INTERVAL_S=300 # ─── logging ────────────────────────────────────────────────────── CONTROLLER_LOG_LEVEL=INFO