From 1443ccaea5eb86f48fe314dea350717af9d30503 Mon Sep 17 00:00:00 2001 From: autonomic-bot Date: Mon, 22 Jun 2026 20:21:16 +0000 Subject: [PATCH] weekly upgrade: optional backend/model via /srv/cc-ci/upgrader.env MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit cc-ci-upgrade-all now reads an optional EnvironmentFile so the weekly run can switch backend/model (e.g. LOOP_BACKEND=opencode LOOP_MODEL=opencode-go/glm-5.2) without a rebuild. Absent file → claude/sonnet (unchanged). Built+switched on cc-ci-orchestrator-hetzner, host verified healthy. Co-Authored-By: Claude Opus 4.8 --- cc-ci-plan/launch-upgrader.py | 2 +- nix/hosts/cc-ci-orchestrator-hetzner/configuration.nix | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/cc-ci-plan/launch-upgrader.py b/cc-ci-plan/launch-upgrader.py index 834d873..c4f50ca 100644 --- a/cc-ci-plan/launch-upgrader.py +++ b/cc-ci-plan/launch-upgrader.py @@ -17,7 +17,7 @@ Env: LOOP_BACKEND claude (default) | opencode — also accepts UPGRADER_BACKEND LOOP_MODEL model flag (overrides UPGRADER_MODEL) UPGRADER_MODEL sonnet (default for claude) | provider/model for opencode, e.g. - opencode/glm-5.1 (opencode Zen "go" subscription) or tinfoil/deepseek-v4-pro + opencode-go/glm-5.2 (OpenCode Go subscription) or tinfoil/deepseek-v4-pro UPGRADER_ARGS extra args passed to /upgrade-all (e.g. "n8n ghost", "--dry-run") claude backend: diff --git a/nix/hosts/cc-ci-orchestrator-hetzner/configuration.nix b/nix/hosts/cc-ci-orchestrator-hetzner/configuration.nix index 900932c..152b10d 100644 --- a/nix/hosts/cc-ci-orchestrator-hetzner/configuration.nix +++ b/nix/hosts/cc-ci-orchestrator-hetzner/configuration.nix @@ -198,6 +198,14 @@ SSHCFG Type = "oneshot"; # launch-upgrader.py spawns the cc-ci-upgrader tmux session and returns User = "loops"; Group = "users"; WorkingDirectory = "/srv/cc-ci"; + # Optional per-run overrides for backend/model (LOOP_BACKEND, LOOP_MODEL, OPENCODE_SHARE, + # UPGRADER_ARGS, …). The leading "-" makes it optional: absent file → claude/sonnet defaults + # (current behavior). To run the weekly job on e.g. opencode-go/glm-5.2, drop a file with + # LOOP_BACKEND=opencode + # LOOP_MODEL=opencode-go/glm-5.2 + # No rebuild needed to switch — the env file is read at each timer fire. Holds no secrets + # (the opencode-go API key lives in ~/.local/share/opencode/auth.json, mode 600). + EnvironmentFile = "-/srv/cc-ci/upgrader.env"; }; environment = { HOME = "/home/loops"; CLAUDE_BIN = "/home/loops/.local/bin/claude"; }; path = [ pkgs.bash pkgs.tmux pkgs.git pkgs.python3 pkgs.openssh pkgs.nettools ];