Skip to content

Renovate and Taskbase: Fully Automatic Dependency Upgrades

Status

Proposed 2026-10-18 (Taskbase task #99, epic #9). It gates #100, #101 and #102. Three choices are left to the owner in decision tasks:

  • #1160: where backups are stored.
  • #1161: how Flux recovers when an upgrade breaks Gitea.
  • #2421: how the operator holds agent work while an upgrade takes Gitea or Taskbase's database offline (Drain). Decided 2026-11-03: operator runs pause and resume their organizations, and review hands drain-class merges to the operator; built in Taskbase task #2422.

Everything else below is decided. The follow-up plan is the list the project manager works from.

Date

2026-10-18

Context

Epic #9 wants Renovate to scan every Skatzi and Kodexet repository and to turn what it finds into work. On 2026-10-18 the owner widened the goal. Updates are to go through without a person, including major versions and breaking changes, and agents are to know how to do such an upgrade. Escalating to a person is no longer the default. It is kept for a short list of explicit triggers.

What exists today (read on 2026-10-18)

Fact Source
Gitea is 1.25.5 (chart 12.5.0). It is single-replica with a Recreate strategy and runs the chart's bundled PostgreSQL on its own Hetzner volume. components/gitea/base/helmrelease.yaml, GET /api/v1/version
On hetzner-mgmt, Flux pulls Skatzi/platform from that Gitea (gitea-platform GitRepository). A GitHub bootstrap-cluster GitRepository still exists; since #1167 Gitea push-mirrors Skatzi/platform to it, and since #1168 a guarded switch can point Flux at it and back. components/flux/gitea-overlay/, cluster/hetzner-mgmt/flux/config/gitrepository.yaml, Flux component docs
No backups exist. No CNPG Backup/ScheduledBackup, no Gitea dump and no object storage are defined anywhere in components/, cluster/ or terraform/. grep -ri "backup\|barman\|objectstore" over those trees
The Hetzner CSI driver has no volume snapshots. Its controller advertises only create/delete, expand, list and publish. hetznercloud/csi-driver, the ControllerServiceCapability_RPC_* values in the driver source
Skatzi/platform has no pull-request CI. Its workflows build the docs and the Keycloak image on tags and run Terraform; nothing renders or validates manifests on a PR. .gitea/workflows/
Skatzi/taskbase has PR CI (Go build, test, vet, tidy). On merge it releases to dev, then promote-prod soaks dev for 15 minutes (SOAK_DURATION=900, /healthz) and promotes to prod, or stops and notifies Mattermost. taskbase/.gitea/workflows/{ci,deploy-dev}.yaml, .gitea/scripts/promote-prod.sh
Taskbase already receives Gitea issues, issue_comment and pull_request webhooks for every linked repository. It drops events from its own bot. It completes a task when a PR that a run recorded is merged. Gitea integration
Agents run in agent runners. They have Gitea and Taskbase tokens but no cluster access. Cluster runners, ADR-0006
The reviewer persona updates the branch, re-runs the checks and merges. skatzi-agents/personas/reviewer.md, ADR-0007

What Renovate and its neighbours can do (primary sources)

Fact Source
The Mend-hosted Renovate apps support only GitHub, Bitbucket Cloud and Azure DevOps. Gitea needs self-hosted Renovate. renovate/docs/usage/mend-hosted/overview.md
Renovate is AGPL-3.0. Running it unmodified inside our cluster creates no obligation for us. renovate/LICENSE
On Gitea, Renovate authenticates with a PAT only. Scopes: repo read/write, user read, issue read/write and organization read (Gitea ≥ 1.20). The account needs a full name and an email address. renovate/lib/modules/platform/gitea/readme.md
Gitea-native automerge (platformAutomerge) needs Gitea ≥ 1.24, which 1.25.5 meets. Renovate's docs warn that the platform must require status checks in branch protection, or Gitea may merge before the tests finish. same readme; configuration-options.md#platformautomerge
Renovate sets labels when it creates a Gitea PR, so the pull_request opened payload already carries them. renovate/lib/modules/platform/gitea/index.ts (createPr)
When another author commits to a Renovate branch, Renovate treats the PR as modified and stops pushing to it (gitIgnoredAuthors changes this). configuration-options.md#gitignoredauthors
postUpgradeTasks run before the commit, only for commands on the admin's allowedCommands list. configuration-options.md#postupgradetasks, self-hosted-configuration.md#allowedcommands
Merge Confidence badges work on any platform (preset mergeConfidence:all-badges). The Merge Confidence workflows (matchConfidence, "automerge Very High") need a paid Mend plan or Mend's OSS cloud. Mend keeps the algorithm private. docs/usage/merge-confidence.md, self-hosted-configuration.md#mergeconfidenceendpoint
Changelogs come from GitHub/GitLab/Bitbucket. Off github.com this needs a github.com token. configuration-options.md#fetchchangelogs
minimumReleaseAge holds an update behind a pending status check until the release is old enough. It needs a release timestamp from the datasource: under the default minimumReleaseAgeBehaviour: timestamp-required, a release without one (quay.io images, Docker Hub library images such as postgres) never becomes old enough. Renovate checks this before dependencyDashboardApproval, so such an update stays under Pending Status Checks rather than Pending Approval (checked in #1317). configuration-options.md#minimumreleaseage, #minimumreleaseagebehaviour; lib/workers/repository/update/branch/index.ts
osvVulnerabilityAlerts raises security PRs from OSV on any platform, for direct dependencies. configuration-options.md#osvvulnerabilityalerts
The flux manager reads HelmRelease charts and the Docker images inside values, but only for files that managerFilePatterns matches. A bare image.tag without a repository, as in our Gitea values, needs a # renovate: comment and a custom regex manager. lib/modules/manager/flux/readme.md
The official chart (renovatebot/helm-charts, chart renovate) runs Renovate as a CronJob. charts/renovate/values.yaml
A Flux Kustomization waits for every dependsOn from the same source to have applied the current revision before it applies. A Job counts as healthy when it completes. kustomize.toolkit.fluxcd.io/force: Enabled recreates an immutable Job when its spec changes. kustomize-controller checkDependencies; docs/spec/v1/kustomizations.md
Gitea 1.25 can send status (commit status) and workflow_run webhooks besides pull_request. go-gitea/gitea modules/webhook/type.go (release/v1.25)
CNPG backs up through the Barman Cloud Plugin; the in-tree barmanObjectStore is deprecated since 1.26. CNPG does offline in-place PostgreSQL major upgrades when the image moves to a higher major. If the upgrade fails, reverting the image restarts the cluster on the old major, usually without a restore. cloudnative-pg/docs/src/{backup,postgres_upgrades}.md
Gitea: downgrading across database changes needs a backup. gitea dump is the backup tool, and the instance must be stopped for a consistent dump. gitea/docs: installation/upgrade-from-gitea.md, administration/backup-and-restore.md

Decision summary

Question Decision
Hosting Self-hosted Renovate on hetzner-mgmt: the official chart as a CronJob, deployed by Flux. Mend Cloud cannot reach Gitea.
Auth A dedicated Gitea user renovate-bot with a PAT (the scopes above), stored in OpenBao and synced by External Secrets. A read-only github.com token is used for changelogs. No Gitea app, because Renovate does not support one.
Data flow ©: Renovate opens a PR for every update. Safe updates are automerged by Gitea once CI is green. Taskbase gets a task only when an agent has to act: a PR labelled for an agent, or an automerge that stalled.
Mechanism No Renovate-side integration. Taskbase reads Renovate's PRs from the Gitea pull_request webhook it already receives, plus an hourly sweep for stalled automerges.
Task shape kind: dependency_update with a dependency object: repository, branch, PR, packages (name, datasource, from, to, update type) and class. The class comes from Renovate labels: trivial, standard, breaking, stateful or core.
Deduplication (repository, Renovate branch). Renovate keeps one branch and one PR per package line and rewrites them as newer versions arrive.
Lifecycle Done when the PR merges, or when Renovate autocloses it. A failure after the merge opens a new follow-up task from a Flux alert.
Agent boundary The agent skill is the upgrade playbook, a section of the personas that do upgrades. Taskbase only routes the task by class to a persona and size: standard to junior-developer, the risky classes and every post-merge failure to operator on the ops-agent runner.
Breaking changes Automatic, following the playbook: read every release in between, migrate, keep the tests green and attach evidence.
Stateful upgrades Automatic behind a verified pre-upgrade backup, run as a Flux-gated Job, with rollback by restore. They are not enabled for a component until it has a backup and a passing restore drill.
v1 scope Go, npm, Dockerfile base images, Gitea Actions, and Helm charts and images in platform. Not in v1: Talos, Kubernetes and Terraform providers; their upgrades stay manual, done by the owner. Flux, Cilium, hcloud CSI and MetalLB are core: automatic, with no approval (owner, 2026-10-21, #1334).

1. Hosting

Decision: self-hosted Renovate on hetzner-mgmt, as the renovate component (components/renovate/, official renovatebot/helm-charts chart, HelmRelease). It runs as a CronJob: hourly, so automerges land promptly, with concurrencyPolicy: Forbid. Renovate's own schedule decides when PRs open; the CronJob only decides how often Renovate looks. It uses autodiscover with autodiscoverFilter limited to the onboarded repositories, and no onboarding PRs (onboarding: false, requireConfig: required): a repository is in scope when it has a renovate.json.

Implemented in task #100; see the Renovate component for what runs, the schedule and where the secrets live.

Rejected: Mend Renovate Cloud. It supports only GitHub, Bitbucket Cloud and Azure DevOps, so it cannot serve Gitea at all. It would also need Gitea reachable from the internet with REQUIRE_SIGNIN_VIEW relaxed.

2. Auth

Decision: a dedicated Gitea user renovate-bot (full name and email set) with one PAT. Scopes: write:repository, read:user, write:issue (for the Dependency Dashboard issue) and read:organization. The user is a member with Write on the onboarded repositories, not Admin. It needs no webhooks. Renovate merges through Gitea's auto-merge, which branch protection still governs.

  • The PAT lives at hetzner-mgmt/renovate/gitea in OpenBao and is synced by an ExternalSecret. This is the pattern Taskbase's bot uses.
  • A github.com token with no scopes (public read only) lives at hetzner-mgmt/renovate/github, for changelogs and GitHub-hosted datasources. Creating it is a person step.
  • Harbor: a docker host rule on harbor.prod.skatzi.com uses the existing read-only pull robot from hetzner-mgmt/harbor/pull-secret, the key harbor-pull-secret uses. With it the docker datasource can list tags in the private project skatzi (owner, 2026-11-01, #2281). No new credential.
  • renovate-bot must not be taskbase-bot. Taskbase drops webhook events from its own bot as loop echoes, so if both bots were the same account, every Renovate PR would be invisible to Taskbase.

Rejected: a Gitea OAuth2 app. Renovate's Gitea platform supports only a PAT. Gitea 28 adds managed bot accounts; renovate-bot can move to one after the Gitea upgrade without changing anything else.

3. Data flow

Decision: option ©. Renovate opens PRs for everything. Gitea automerges the safe classes. Taskbase creates a task only for the PRs an agent must work on.

sequenceDiagram
    participant R as Renovate (CronJob)
    participant G as Gitea
    participant T as Taskbase
    participant A as Agent persona
    participant V as Reviewer persona
    participant F as Flux
    R->>G: open/refresh PR on renovate/<dep> (labels: upgrade/<class>)
    alt class = trivial
        G->>G: CI green + release age reached → native automerge
        T-->>G: hourly sweep: still open after 24 h or CI red? → task (class standard)
    else class = standard | breaking | stateful | core
        G->>T: pull_request opened (webhook already registered)
        T->>T: create/refresh dependency_update task (dedup on repo+branch)
        T->>A: dispatch by class → persona + size
        A->>G: push migration commits to the Renovate branch, evidence comment
        V->>G: update branch, check evidence, merge
    end
    G->>T: pull_request merged → task done
    F->>F: reconcile; health checks; remediation
    F-->>T: Alert (error) → follow-up task "post-merge failure"
  • Rejected: (a) PRs plus a mirror task for every PR. A linked project opens a Gitea issue for every task, so each patch bump would cost an issue, a task and possibly an agent run. That is noise for work nobody has to do.
  • Rejected: (b) tasks only, with no Renovate PRs. The agent would have to redo what Renovate does well: branch, lockfile, the matching Go and npm updates, release notes in the body, and refreshing the PR as new versions arrive.

4. Mechanism

Decision: Taskbase consumes Gitea events. There is no Renovate-to-Taskbase integration.

  1. Webhook. In the existing pull_request handler, an event whose PR author is RENOVATE_BOT_LOGIN and whose head branch starts with renovate/ creates or refreshes a dependency-update task when the PR carries an upgrade/standard, upgrade/breaking, upgrade/stateful or upgrade/core label. The package details come from the PR. Renovate's title and body name the package, the from and to versions and the release notes. A small prBodyNotes template adds one machine-readable line per update, so Taskbase does not parse prose: <!-- taskbase:dep {"name":"{{depName}}","datasource":"{{datasource}}","from":"{{currentVersion}}","to":"{{newVersion}}","type":"{{updateType}}","released_at":"{{releaseTimestamp}}"} -->. released_at is Renovate's releaseTimestamp (RFC 3339, empty when Renovate does not know it); Taskbase skips a value it cannot parse, and the line stays valid JSON either way. Checked in #101: Renovate compiles prBodyNotes per upgrade and drops only identical lines (getPrNotes, lib/workers/repository/update/pr/body/notes.ts), so a grouped PR carries one line per upgrade. Agent-class PRs stay ungrouped in the base preset anyway, except the per-app stateful groups.
  2. Sweep. Hourly, Taskbase lists the open renovate/ PRs labelled upgrade/trivial in linked repositories. When one has been open more than 24 hours or has a failing combined status, Taskbase creates the task with class standard. Typical causes are red CI, a conflict or an expired check. The sweep reuses the commit-status read behind get_task_pull_request. Implemented in Taskbase task #1171 (Taskbase PR #514); see Stalled trivial upgrades.

  3. Rejected: a webhook called from Renovate's postUpgradeTasks. Those tasks run inside the branch before the commit, only with allow-listed commands. The Taskbase API key would have to be in Renovate's environment, and the hook fires before there is a PR to point at.

  4. Rejected: a sidecar that parses Renovate's JSON log. The log format is not an API and would break silently on upgrades.
  5. Rejected: a custom Renovate manager. Managers find dependencies; they cannot report to an external system.

5. Task shape and classification

Decision. #102 adds kind: dependency_update (tasks already have kind) and a nullable dependency object:

Field Example From
repository Skatzi/platform webhook
branch renovate/gitea-28.x webhook (dedup key)
pull_request Skatzi/platform#412 webhook
packages[] {name: "gitea/gitea", datasource: "docker", from: "1.25.5", to: "28.1.0", type: "major"} taskbase:dep notes
class stateful label; an agent may raise it, never lower it
release_notes_url the PR webhook

The task's title is Renovate's PR title. Its description links the PR and the playbook. It belongs to the project linked to the repository, so the existing merge-completion logic applies unchanged.

Classes, set by labels in the base preset (ordered packageRules that set labels, so each pull request carries exactly one class label):

Class Rule Who acts Route (persona / size)
trivial patch, minor, digest or pin, on a ≥1.0 version, outside the stateful and core lists, in a repo whose PR CI exercises it Gitea automerge none, unless the sweep escalates it to standard
standard anything else that is not major: minors without CI coverage (most of platform), escalated trivials agent junior-developer / small
breaking major, or a 0.x minor; any major or minor of a cluster add-on that brings CRDs and is not stateful or core (external-secrets, cert-manager, kube-prometheus-stack / prometheus-operator), because Helm rollback does not revert CRDs (§10) and external-secrets 0.10 → 0.16 broke on a minor (#1334) agent operator / large, on a role=ops runner
stateful servers that hold data, on the stateful list: Gitea, PostgreSQL images, CNPG, Keycloak, Mattermost, Harbor, OpenBao, any chart with a bundled database. Client libraries and dev or CI copies (docker-compose, workflow services) store nothing and take the other classes agent, behind the backup gate operator / large, on a role=ops runner
core Flux, Cilium, hcloud CSI, MetalLB, Talos, Kubernetes agent, with no Dependency Dashboard approval and no heads-up to the owner; the operator agent does the upgrade and recovers a failed rollout, with the disaster-recovery runner on the Mac mini (ADR 0020). Talos and Kubernetes are out of scope (§14) and stay manual, done by the owner operator / large, on a role=ops runner

Routing (updated 2026-10-24 for Taskbase task #1333, Taskbase PR #571; api/internal/task/dependency.go, read 2026-10-24). Taskbase sets the route when it creates the task. A later raise of the class that changes the route, such as standard → breaking, re-routes the task while it is open, has no unfinished run and still has its old route; a task a person reassigned keeps its assignment (Taskbase task #1515, Taskbase PR #575; details in Renovate pull requests).

  • standard goes to junior-developer, model small, effort low, on any runner.
  • breaking, stateful and core go to operator, model large, effort high, with required_labels: ["role=ops"], so only the ops-agent runner takes them. Those upgrades can break a cluster, and the operator has the cluster access to see and repair it (ADR 0020).
  • Owner guard. A task whose packages concern Talos, Kubernetes itself, Terraform, or Hetzner tools that need credentials outside the cluster (the hcloud CLI) goes to the owner, the person dunk, with no model, effort or labels: the operator has no access to those, and their upgrades stay manual (§14). Renovate disables most of these packages, so the guard is for tasks that arrive another way. The exact match is in Owner-only upgrades.
  • hcloud CSI goes to operator (owner, 2026-10-24, on Taskbase task #1526; Taskbase task #1531, Taskbase PR #577, in prod from v1.233.1). Upgrades of the hcloud CSI chart, the driver image and the HelmRelease hcloud-csi follow their class core, and their post-merge failures go to operator as well: operator, model large, on a role=ops runner. The upgrade is a chart or image change through Git and Flux, checked with kubectl and undone with Helm remediation or a Git revert. The driver uses its own in-cluster hcloud-token Secret, so the operator needs no Hetzner credentials of its own, and ADR 0020 §7 is unchanged.

Open question (2026-10-24, task #1528): Taskbase re-routes a raised task only when it has no unfinished run (RerouteDependency in api/internal/task/dependency_pg.go). A raise the upgrading agent makes in its own run (§9 step 8) therefore leaves the task on the junior-developer route, and nothing re-routes it when that run ends. Taskbase PR #575 does not say whether that is intended.

The full table, with effort, is in the Taskbase docs under Renovate pull requests.

Rejected: the April complexity field filled in by a separate "evaluate" run (#103). A separate assessment run costs a run and still leaves the upgrade undone. The class is known from the version jump and the package list. The upgrading agent records anything surprising in the PR evidence and raises the class if needed.

6. Deduplication

Decision: one task per (repository, Renovate branch). By default Renovate keeps one branch per package line (renovate/<dep> and, with separateMajorMinor, renovate/<dep>-<major>.x). It updates that PR in place when a newer version arrives.

  • Re-scans with no new version change nothing.
  • A newer version while the task is waiting rewrites the PR. Taskbase updates packages[].to from the synchronized event.
  • A newer version once an agent has pushed leaves the PR alone, because Renovate treats it as modified; we keep the default gitIgnoredAuthors. The newer version gets a new PR after the merge. This is deliberate: Renovate never overwrites an agent's migration work.
  • A PR closed without merge and then reopened by Renovate reopens the same task.

Rejected: the April key (repo, package, target version). Every new release would make another task for the same work.

7. Lifecycle

Decision:

  • Merged → the task is done. This is the existing merge webhook, extended to match dependency.pull_request as well as a run's pr_url.
  • Autoclosed by Renovate (no longer needed or superseded; Renovate adds - autoclosed to the title) → done, with a comment saying why.
  • Closed by a person → done as won't do. Renovate then ignores that version, which is its documented behaviour for closed PRs.
  • Post-merge failure → a new task, follow_up_of the dependency task. The trigger is a Flux Alert (error severity, HelmRelease and Kustomization events on hetzner-mgmt) sent through a generic-hmac Provider to a new Taskbase endpoint. For applications it is the promote-prod failure step. The merged task stays merged; the follow-up carries the rollback evidence. The follow-up always goes to operator / large on a role=ops runner, whatever the class of the upgrade that caused it, because a failure needs cluster access; the owner guard (§5) still applies, to the failing object's name as well as the packages (Taskbase task #1333). See §10.

8. Boundary with agent dispatch

Decision: the agent is just another assignee. Taskbase sets assignee (persona), model (size), effort and required runner labels from the class (§5). The knowledge of how to upgrade lives in the personas (Skatzi/skatzi-agents). standard upgrades go to junior-developer; the risky classes (breaking, stateful, core) and post-merge failures go to operator, which follows this playbook and, for operators that bring CRDs, the ops runbook's pre-flight. The Upgrading a dependency section is also in developer and senior-developer, which no longer get upgrades by route. The reviewer persona gets a matching Reviewing an upgrade checklist. Taskbase has no upgrade-specific agent logic. #103 (the old agent skill) stays closed; its guidance moves into this section.

The agent works on the Renovate PR's branch and never opens a parallel PR. Its final output names that PR, so the run records it as pr_url.

9. The upgrade playbook

This is the agent-facing procedure. Its full, runtime-agnostic text goes into the personas through the follow-up task in skatzi-agents. Summary:

  1. Scope the jump. List every release between from and to. Read the release notes, changelog and migration guide of each one, not only the target's. Primary sources only: the project's own release page, CHANGELOG, upgrade docs, and the chart's Chart.yaml, values.yaml and README diff. Write down every breaking, deprecated or renamed item that touches this repository, with its source link.
  2. Step through majors when the project says so. Examples: Kubernetes minors, CNPG and PostgreSQL majors, and charts whose upgrade notes say "upgrade to X first". In that case the agent does one major per commit on the same branch and verifies each step. If an intermediate step needs its own deploy (a stored-data migration that must run per step), split it into one PR per step: the agent changes Renovate's PR to the first step, and follow-up tasks do the next ones.
  3. Use the project's tools first. Codemods (npx @next/codemod, go fix, gofmt -r), migration commands (gitea doctor, helm chart values migration notes), go mod tidy, npm install with the lockfile, kustomize build and helm template with the new chart.
  4. Fix what the notes name. Update call sites, config keys, Helm values that were renamed or removed, CRD API versions and deprecated settings. Search the repository for every removed key or symbol; do not rely on the compiler alone for YAML and Helm.
  5. Keep it green and prove the risky part. Run the repository's build, tests and linters in full. When the notes describe changed behaviour this code relies on, add a test at a public seam that would fail on the old behaviour or on the new one. Never weaken an existing test to pass.
  6. Stateful? Stop unless the component has a backup gate. If it has none, add depends_on the backup task and leave the PR open. Otherwise make sure the PR changes the gate's target version, so the pre-upgrade backup runs. Exception: when the PR changes only the component's backup tooling (the images of its dump, restore or rollback pods) and not the server that holds the data, leave the gate's target as it is; see Backup tooling only.
  7. Write the evidence as a PR comment whose first line is the heading ## Upgrade evidence (the list below), and hand over to review. A later run that changes the evidence posts a new comment with the same heading; the newest one counts.
  8. Raise the class when the notes reveal something the labels missed: standard → breaking → stateful. A raise made during your own run does not re-route the task: Taskbase re-routes only a task with no unfinished run (see Routing in §5). Whether it should is an open question in §5. Stop for a person only on a trigger, giving 2–4 options.
  9. Drain-class? When the merge takes Gitea or Taskbase's database offline, add the label drain-before-merge to the PR before handing it to review, so the review ends in merge_handoff and the merge run holds agent work and drains it around the merge (Drain). This applies whatever the class; say so in the evidence. A change to the pod template of gitea-preupgrade that leaves its TARGET_VERSION alone, such as a digest bump of bitnami/kubectl or amazon/aws-cli, is no longer drain-class: the gate passes without a backup when Gitea already runs its target (owner's decision #3453, 2026-11-22; Backup tooling only). Only an operator run can drain; on another route the merge run cannot (see The steps there).

Upgrade evidence that every agent-class PR carries, and that the reviewer persona checks before merging:

  • the version path (from → … → to) and one line per release read, with links;
  • the breaking items that touch this repository, each with the change that answers it, or "not used here" with the search that shows it;
  • the commands run (build, tests, codemods, kustomize build/helm template/kubeconform for manifests) and their result;
  • for manifests: the rendered diff of every affected cluster path, from the PR CI;
  • for a container image whose tag changes: the platforms its target tag's index lists, which must include linux/amd64, the platform of every hetzner-mgmt and webshop node (Hetzner cx servers). A tag can exist before its images do, and one published in the last hours may still have an empty index: every postgres:19* tag did on 2026-11-20, so postgres:19.0-alpine could not be pulled (incident report). Until the index lists linux/amd64, the PR is not ready to merge. The command is in the ops runbook;
  • the tests added for risky behaviour, or why none was needed;
  • for stateful: the gate's target version and the name of the last passing restore drill; for a backup-tooling-only PR, also why the target stays and which drill runs the new image first;
  • the post-merge checks that will run (smoke, soak) and the rollback that applies;
  • for a drain-class upgrade: the drain timeline (held at, drained at, down from and to, resumed at) and what was still running at the 30-minute cap.

Decision: the evidence is a PR comment, not the PR description. Renovate owns the description. In the version we run (44.168.3), ensurePr hashes the current body and the body it would write, and replaces the whole body when they differ (lib/workers/repository/update/pr/index.ts, hashBody in lib/modules/platform/pr-body.ts). Once its PR cache expires, it overwrites any text an agent added, whether the branch has agent commits or not. Renovate never edits comments by other users. This was seen on Skatzi/emiliero#23 (#1366): the evidence in the body was gone within a day, and review asked for it again (#1401).

  • Rejected: stop Renovate rewriting the body. No option does that. prBodyTemplate, prHeader and prFooter only change what Renovate writes. Text after <!-- Reviewable:start --> is left out of the hash, but the Gitea updatePr still replaces it.
  • Rejected: evidence in a commit on the branch. A Renovate PR with no migration commit would then get a commit just to hold text. Any commit by someone other than Renovate also stops Renovate from rebasing the branch and bringing in newer versions, and a reviewer would have to read the evidence out of the git log.

10. Verification gates that replace the person

Each type gets a pre-merge gate (evidence in the PR), a post-merge gate (automatic) and an automatic rollback.

Type Pre-merge (in PR CI) Post-merge smoke + soak Automatic rollback
Go module go build, go test, go vet; go mod tidy leaves no diff the app's deploy: dev deploy → 15-min soak on /healthz → prod promotion (Taskbase's promote-prod today) prod is not promoted. The failure creates a follow-up task, whose agent reverts or fixes forward on dev.
npm package clean install from the lockfile, typecheck, build, unit tests as above (UI served and / returns 200 in dev) as above
App image / Dockerfile base image builds; container starts and answers its health endpoint in CI as above as above
Helm chart / image (stateless add-on in platform) new platform PR CI: kustomize build of every cluster/* path, helm template with the new chart, kubeconform (with CRD schemas), rendered diff posted to the PR Flux Kustomization health checks with wait; chart tests (spec.test.enable) where the chart ships them; a component smoke check (HTTP 200 on its route, or its Ready CRs) as a Job in a dependent Kustomization; soak = the next 30 minutes without a Flux error alert HelmRelease upgrade.remediation: {retries: 1, strategy: rollback} returns to the previous Helm revision. The Flux alert creates the follow-up task.
Cluster add-on with CRDs (cert-manager, external-secrets, prometheus-stack, CNPG operator) as above, plus a diff of the CRDs as above, plus the add-on's own CRs Ready (certificates, ClusterSecretStore, CNPG Clusters) Helm rollback does not revert CRDs, so the class is at least breaking, and the rollback is a forward fix by the follow-up task.
Database operator / PostgreSQL major as above; the backup gate is in the PR every CNPG Cluster Ready; the app's smoke check PostgreSQL major: revert imageName, and CNPG restarts on the old major (CNPG docs). Otherwise, restore from the pre-upgrade backup.
Stateful app (Gitea, Keycloak, Mattermost, Harbor) as above; backup gate the app's smoke check, e.g. Gitea /api/healthz and an authenticated GET /api/v1/version reporting to restore by Job from the pre-upgrade backup, then pin from (§11)

CRDs that a chart renders from templates/ (external-secrets with installCRDs, cert-manager) are the exception: Helm rolls them back with the release, and that rollback fails once the new storage version is in status.storedVersions (2026-10-20). The ops runbook has the checks, roll-forward and roll-back steps for this and the other CRD failures, and the pre-flight to run before such an upgrade.

The "replace the person" part is the evidence plus three automatic gates:

  • CI blocks the merge;
  • Flux health and remediation block a broken rollout;
  • the soak and promotion block a broken release from reaching prod.

When a rollback fires, a task is always created, and it goes to operator on a role=ops runner (§7). No failure is left only in Mattermost.

Blast radius. At most one stateful or core upgrade in flight per repository. Taskbase sets depends_on from each new stateful/core dependency task to the previous unfinished one in the same repository, so they run in order. Platform trivial automerge stays off until the platform PR CI exists.

11. Stateful and irreversible upgrades

Decision: automatic, behind a gate that Flux enforces. No agent or reviewer has to remember the gate.

  1. Pre-upgrade backup Job. The component gets a <component>-preupgrade Flux Kustomization. It contains a Job that:
  2. stops writes: scale to 0, or Gitea's maintenance mode once Gitea is ≥ 1.26;
  3. takes the backup: gitea dump, an on-demand CNPG Backup, or pg_dump for the plain PostgreSQL StatefulSets;
  4. uploads it to the off-site store (decision #1160);
  5. verifies it by restoring into a throwaway database or volume in a scratch namespace and running a query or git fsck against it.

The Job carries the target version in its spec and kustomize.toolkit.fluxcd.io/force: Enabled, so a version change recreates it. The component's own Kustomization dependsOn the preupgrade Kustomization. Flux therefore applies the new version only after the backup of the old version is complete and verified. A failed backup means no upgrade, and that failure raises an alert and a task.

The CNPG operator has its own gate, cloudnative-pg-preupgrade (#1593). An operator upgrade restarts every CNPG Cluster, so its Job backs up and restores each backed-up Cluster in turn before the operator HelmRelease moves. A CNPG chart PR changes TARGET_VERSION in every cluster's gate Job (cluster/<cluster>/cloudnative-pg/preupgrade/job.yaml, hetzner-mgmt and webshop) to the new chart version in the same commit, and a unit test fails the PR while any of them differs. botyard-prod-db has no backups, so an operator upgrade restarts it unprotected (CNPG: operator upgrade gate).

Backup tooling only. Some stateful PRs change no data server. Renovate labels every PostgreSQL image stateful (§5), including the postgres client image in Gitea's dump, restore and rollback pods, while gitea-postgresql runs its own image. The gate's target cannot move in such a PR: Gitea's TARGET_VERSION must equal image.tag (Gitea backups), so moving it would upgrade Gitea. When the tool image is outside the gate Job's pod template, as in Gitea's dump, restore and rollback pods, the gate Job is therefore not recreated, and no pre-upgrade backup runs; none is needed, since no data changes. The owner accepted this on #1654 for Skatzi/platform#825 (postgres 17.6 → 17.11, 2026-10-27). When it is inside, as alpine/helm, amazon/aws-cli and bitnami/kubectl are in Harbor's harbor-preupgrade (Harbor backups), amazon/aws-cli and bitnami/kubectl are in Gitea's gitea-preupgrade (Gitea backups), and alpine/k8s is in mattermost-preupgrade (Mattermost backups) and keycloak-preupgrade (Keycloak backups), the image change recreates the Job (force: Enabled) against the unchanged target. Those four gates then pass without a backup, because the component already runs the target: they stop no writers and leave their record (latest.env for Gitea and Harbor, the ConfigMaps mattermost-backup-latest and keycloak-backup-latest) naming the backup taken before the last upgrade (owner's decisions #3453, 2026-11-22, for Gitea and Harbor, and #3616, 2026-11-26, for Mattermost and Keycloak). Until then such a merge ran a full gate, and for Gitea it was drain-class: three such bumps on 2026-11-18 each took Gitea down for about 10 minutes and held agent work for over an hour (incident report). A backup of the running version, for a rollback rehearsal or a first backup, is forced with the annotation platform.skatzi.com/preupgrade-force on the component's Deployment, or for Keycloak on its Keycloak CR (Gitea, Harbor, Mattermost, Keycloak). openbao-preupgrade still runs in full on such a change; it takes its snapshot with OpenBao up, so it is not drain-class. Such a PR:

  • leaves the gate's target version unchanged, and says why in the evidence;
  • is not drain-class for the Gitea or Harbor gate: it needs no drain-before-merge label;
  • keeps the tool's PostgreSQL major equal to the server's: pg_dump refuses a newer server, and a restore into an older major is not supported. A major bump of the tool waits for the server's major upgrade;
  • cites the last passing drill, and names the first run of the new image as the post-merge check: the next weekly drill, or a manual drill run after the merge (for #825, task #1753).

  • Restore drill. A weekly CronJob per component restores the latest backup into the scratch namespace, starts the same version there, and runs the smoke check. Its last success is what the PR evidence cites. A component without a passing drill is not stateful-enabled: the agent links the drill task instead of upgrading. Renovate holds no PR for it on the Dependency Dashboard (owner, 2026-10-21, #1334). The pre-upgrade gates of Gitea, Keycloak, Mattermost and CNPG passed on 2026-10-21; their weekly drills run on their own schedules. Harbor's gate also passed that day, but without a backup: it ran the script from before the move to S3, which skipped the backup when no chart upgrade was pending. A component's drill can only pass once its gate has published latest.env, so Harbor became stateful-enabled on 2026-10-25, when a re-run of the gate on chart 1.18.1 published its first backup and a drill of it passed (#1623, Skatzi/platform#770). This ADR keeps no list of drill passes. Each component's backup page says where its drill records a pass and how to read it: Gitea, Keycloak, Mattermost, Harbor and CNPG. OpenBao has a monthly drill and, since #1548, the openbao-preupgrade gate. The gate unseals its restored copy with the real keys on every upgrade (owner's decision #1547); its drill stays monthly (OpenBao backups).

  • Staging copy where possible. For applications whose data fits (Gitea at 20 GiB, Keycloak, Mattermost), the drill instance doubles as staging. Before the real upgrade, the preupgrade Job can start the new version against the restored copy and run the smoke check: a rehearsal. This is enabled per component in its preupgrade Kustomization.
  • Rollback by restore. A <component>-rollback Job, deployed but suspended, can be resumed by the post-upgrade smoke Job on failure. It:
  • suspends the HelmRelease;
  • restores the pre-upgrade backup;
  • pins the previous image and chart through a patch the Job applies;
  • resumes.

A follow-up task then reverts the upgrade commit in Git (image and chart) and records what failed.

Two details found while building it for Gitea (#1182, Gitea rollback). First, the patch alone does not hold: Flux re-applies the version from Git, so the Job also suspends the component's Flux Kustomization until Git carries the pinned version again. Second, the smoke Kustomization dependsOn the preupgrade Kustomization, not the component's. Flux applies a dependent only once its dependencies are Ready, and a failed upgrade leaves the component not Ready.

Harbor (#1185, Harbor rollback) adds a third. Its bundled harbor-db image upgrades PostgreSQL in place and deletes the old data directory, and an older image starts an empty cluster beside a newer one. The rollback therefore pins the old chart with Harbor's writers at 0 before it restores the database.

A CNPG-backed app adds two more, found building it for Mattermost (#1183, Mattermost backups). The restore and the rollback recover the gate's own Backup with recoveryTarget: {backupID, targetImmediate: true}: recovering to the latest WAL would replay the new version's migrations. And an app that keeps its configuration in its database (Mattermost) carries production's connection string into the restored copy, so the copy overrides it and is fenced off by a network policy.

Drain before a gate takes a shared service offline

Why. Gitea 28.1.0 merged at 10:18 UTC on 2026-11-03, and gitea-preupgrade scaled Gitea to 0 from 10:22:16 to about 10:29 for its dumps. Agents and CI kept working, so every git push and pull, PR API call, CI checkout and Taskbase → Gitea sync in those minutes failed (task #2418). The gates keep upgrades automatic; the drain keeps them from breaking work in flight.

Drain-class upgrades take down something every agent run needs:

  • Gitea: its gate and the restart into the new version (Gitea backups), that is, a pull request that moves TARGET_VERSION of the gitea-preupgrade Job. A pull request that changes only that Job's other containers (a new amazon/aws-cli or bitnami/kubectl) is not drain-class since the owner's decision #3453 (2026-11-22): the merge recreates the Job (kustomize.toolkit.fluxcd.io/force: Enabled), but the gate passes without a backup when Gitea already runs TARGET_VERSION, and stops nothing. From Skatzi/platform#1538 (task #3368) until then, such a PR was drain-class, because the gate scaled Gitea to 0 for its dumps. A change to its scripts or pod templates in gitea-backup-scripts alone does not recreate it, because that ConfigMap keeps a stable name (components/gitea/backup/kustomization.yaml). A forced backup of the running version, as in the rollback rehearsal, takes Gitea down and is drained like a merge;
  • Taskbase's database, tasks-prod-db in tasks-prod: its PostgreSQL image (in Skatzi/taskbase), and the CNPG operator, whose upgrade restarts every Cluster (CNPG: operator upgrade gate). The image is gated by taskbase-prod-preupgrade, whose online backup leaves Taskbase up; the restart onto the new image is what takes it down. Its pass is ConfigMap cnpg-drill/preupgrade-taskbase-prod with targetVersion the new image tag and lastSuccess after the merge (CNPG: Taskbase's image gates);
  • Keycloak, when the owner asks for it on the task: Taskbase looks up callers' groups through Keycloak's Admin REST API with taskbase-service. The first was 26.8.2, whose Admin REST API audience check refuses that client with 401 until it has the kc-admin-api scope (owner, #2631, 2026-11-18; Admin REST API for agents). Its gate is keycloak-preupgrade (Keycloak backups).
  • The Barman Cloud plugin, plugin-barman-cloud in components/cloudnative-pg/barman-cloud: a pull request that moves its chart or its sidecar image. A new SIDECAR_IMAGE makes the CNPG operator restart every Cluster that uses the plugin, tasks-prod-db included, like an operator upgrade (CNPG: A plugin upgrade restarts every Cluster that uses it); every chart release so far has moved it, since it defaults to the plugin's version. The plugin has no backup gate, because it changes no data server (Backup tooling only). The restarts come up to 17 minutes after the plugin is back, so the watch in step 3 lasts until every Cluster that uses the plugin runs the new sidecar and is healthy, not only until the HelmRelease is Ready; then Taskbase /api/health and an authenticated read (owner, #3643, 2026-11-26, for Skatzi/platform#1694).

Another component opts in by being listed here.

The steps. The operator merges a drain-class PR itself, after the review approves it. The agent that works the PR labels it drain-before-merge (playbook step 9); the reviewer approves it with the verdict merge_handoff and does not merge, and Taskbase gives the task back to its assignee for a merge run, whose claim's revision.verdict is merge_handoff (Merge hand-off). If the merge run ends with the PR still open, the next merge_handoff parks the task for a person.

The merge run must be an operator run on a role=ops runner: every other run is refused pause_organization and list_runners (MCP Server: Draining agent work). A drain-class task on another route, such as a standard digest bump on junior-developer (§5), gets its merge run on that route, cannot drain, and must end without merging. That happened on task #3368 (Skatzi/platform#1538): triage then reassigned the task to operator, keeping its class standard, and the operator's merge run held agent work and merged it at the 30-minute cap on 2026-11-18, with Gitea down for its gate from about 16:01 to 16:22 UTC (evidence on #1538). See the open question below.

Open question (2026-11-18, task #3373): nothing routes a drain-class task to operator before its merge run. The class decides the route (§5), and draining is about how the merge is done, not its risk, so raising the class is not the answer. Whether Taskbase should route a merge_handoff merge run to operator, or the label should, is open (Taskbase task #3387); until then a person or triage reassigns the task.

  1. Hold. Pause every organization the operator's runner serves (on the instance runner ops-agent, every organization in Taskbase), with the MCP tool pause_organization, so no runner claims a task, and first record which organizations were already paused (list_organizations lists those the runner serves, list_roles gives each one's agents_paused_at and agents_paused_by; Taskbase task #3231): only what the operator paused is released in step 4. A runner or organization a person paused (for example the runner dunk-windows-pc) stays as it is; resume_organization refuses a pause the operator did not set with 409 (Team: Operator runs).
  2. Drain, at most 30 minutes. Wait until list_runners shows no run in progress (runs_in_progress) and Gitea Actions has no job running or waiting in every Gitea organization, not only Skatzi: list them with GET /api/v1/admin/orgs (the operator's Gitea account is an admin), then check that GET /api/v1/orgs/{org}/actions/jobs?status=in_progress and ?status=waiting both report total_count: 0 for each (Gitea 28.1.0, /swagger.v1.json). After 30 minutes, proceed anyway and list what was still running in the evidence.
  3. Merge and watch. Merge, then follow the gate Job and the post-upgrade smoke check to success, or the rollback to its end, and confirm the service answers: Gitea /api/healthz; Taskbase /api/health and an authenticated read. The push workflows the merge itself starts race the gate; rerun any that failed while the service was down.
  4. Resume, always. Release the hold recorded in step 1 with resume_organization, in a finally-style step that also runs when the upgrade fails, rolls back or the watch times out. Never end the run with work held.
  5. Evidence. Add the timeline to the Upgrade evidence: held at, drained at, down from and to, resumed at, the organizations paused and those already paused, and what step 2 left running.

What the hold covers. The hold stops Taskbase runners from claiming tasks in the organizations the operator's runner serves. It does not stop work that is not a Taskbase claim, such as a person pushing, a scheduled or manually started Gitea Actions workflow, or Renovate. Step 2 waits for that work up to the cap but cannot stop it.

The hold was partial on 2026-11-12 and covers every organization today. Before Taskbase v1.265.0, list_organizations gave an operator run only its own organization. So the Gitea 28.1.0 → 28.2.0 merge (task #2401, run 6262) paused only Skatzi (org 2). The other organizations on the same Gitea kept claiming tasks, Gitea Actions in the eloro organization started runs 11495–11499 during the drain, and the merge went ahead at the 30-minute cap (evidence on #1147). The pause itself was already open for every served organization (#2422). Task #3231 (taskbase#736, v1.265.0) lets the operator list those organizations and read their pause (MCP Server: Draining agent work). The next drain was the tasks-prod-db merge on 2026-11-15 (task #3219, run 6673). It paused organizations 2, 3, 4, 5, 8, 9, 10 and 11, and it drained in 14m44s with no Gitea Actions job left in any organization (evidence on taskbase#734).

Status (2026-11-16): in production. The owner chose the hold on decision #2421. Taskbase task #2422 (taskbase#688, merged 2026-11-03) lets operator runs pause and resume their organizations and read list_runners (MCP Server: Draining agent work), and adds the merge_handoff verdict (ADR-0007). Changing a runner's desired state stays closed to agent runs (Runner owners), so the hold is the organization pause, not a runner pause. Task #2423 added the step to the operator and reviewer personas. #2422 shipped in Taskbase v1.254.0 and #3231 in v1.265.0. On 2026-11-16, production's /api/version reported v1.265.0.

Later. Once Taskbase can start a task at a set time (#2405, start_after), drain-class merges run at night, Europe/Copenhagen, when the fewest runs are in flight.

Worked example: Gitea 1.25.5 → 28.1.0, chart 12.5.0 → 12.7.0

The jump.

  • Releases in between: 1.26.0, 1.27.0, 28.0.0, 28.1.0 (28.2.0 came out on 2026-10-18).
  • Gitea's upgrade docs allow a direct jump; the database migrations run in sequence on start. The playbook still reads each release's BREAKING section. Items to answer:
  • 1.26.0 removes the GET registration-token API. Our act runner reads a static token from a secret, so this is not used here.
  • 1.26.0 makes PUBLIC_URL_DETECTION default to auto. Check it against the gateway's forwarded headers.
  • 1.27.0 changes reusable workflows and adds a CSP script nonce. Check our workflows and the Keycloak theme.
  • 28.0.0 routes Git network operations through an internal proxy and changes the egress settings. Check mirrors and migrations.
  • 28.0.0 adds RUN_RETENTION_DAYS, which deletes old Actions runs. Decide the value explicitly.
  • Chart 12.7.0 is built for app 1.27.0 (appVersion), and we pin image.tag separately. Running 28.1.0 on it is a known gap, recorded in the evidence. The bundled PostgreSQL subchart stays at 16.7.27 from 12.5.0 to 12.7.0, so the chart bump is not a PostgreSQL major.
  • The chart changes in 12.5 → 12.7 are Gateway API support, DNS fixes for init and environment variables from files. Nothing removes a value we set.

Class: stateful (one-way database migration). Renovate needs a # renovate: datasource=docker depName=gitea/gitea comment on image.tag and the gitea group, so the chart and the image arrive in one PR.

What had to exist before this upgrade could be automatic (all done):

Needed Why it blocked Status
an off-site backup store done: decision #1160, then the backup store (Backups, #1228) —
gitea-preupgrade Job done: stops Gitea, takes gitea dump + pg_dump of gitea-postgresql, uploads and verifies (Gitea backups, #1181) —
a weekly Gitea restore drill done: the gitea-restore-drill CronJob (Gitea backups, #1181) —
gitea-rollback Job done: the gitea-smoke check resumes it; it restores the gate's backup, pins the old image and chart, and runs the source switch both ways (Gitea rollback, #1182) —
a Flux source that survives a broken Gitea done (decision #1161): push mirror to GitHub (#1167) and the guarded switch the rollback Job runs, switch-git-source.py (Flux: switching to the fallback, #1168) —
platform PR CI (render, kubeconform, diff) done: .gitea/workflows/ci-manifests.yaml renders the base and the PR, validates with kubeconform and posts the diff —
Renovate seeing image.tag done: the # renovate: comment and the preset's regex manager (#101) —
HelmRelease remediation on gitea done: set in the component (#1175) —

Until all of these existed, Renovate's Gitea PR waited on the Dependency Dashboard, and the agent's task depends_on the Gitea backup gate task. This is "no backup yet", which is agent work, not a person trigger.

12. What still needs a person

Everything not listed here is automatic. An agent that hits one of these triggers stops with 2–4 options in Needs attention (#1071):

  1. Licence change. The new version's licence differs from the old one's SPDX identifier, or moves to a non-OSI licence. Examples: BSL, SSPL, a commercial edition.
  2. Payment or new credentials. The upgrade needs a paid plan, a licence key, a new external account or a credential only a person can create. The github.com token and the backup store in this ADR are examples.
  3. No backup is possible. The component's state cannot be backed up and restored by a Job, as opposed to a backup that simply has not been built yet.
  4. Recovery needs access an agent does not have. A failed rollout cannot be undone from Git, by an in-cluster Job, or by the operator agent: Talos and Kubernetes, which Terraform applies and the owner upgrades by hand. The rest of the core class (Flux, Cilium, CSI, MetalLB) is no longer a trigger (owner, 2026-10-21, #1334): the operator agent recovers it with the break-glass access of the disaster-recovery runner on the Mac mini (ADR 0020), and nobody ticks a Dependency Dashboard box. Gitea is not in it either: its rollback Job restores it with the #1161 fallback source.
  5. Destructive by design. The migration guide requires deleting data that the backup cannot bring back, or a manual step outside the repository (for example, re-keying OpenBao).

13. Renovate's own features

Feature Use Replaces or complements Taskbase
Automerge (platformAutomerge) trivial class only, in repos with required status checks replaces a task and a run for most updates
minimumReleaseAge 3 days by default (npm's unpublish window); 14 days for breaking, stateful and core; none for security PRs. Docker updates and stateful set minimumReleaseAgeBehaviour: timestamp-optional: a release without a timestamp (quay.io, Docker Hub library images) opens a PR with no wait instead of staying pending and never being updated; a release with a timestamp keeps the wait. Nothing automerges yet, so such an update is reviewed; turning on trivial automerge must keep Docker updates out or accept no wait for them (#1321) replaces "wait and see" judgement
Grouping and schedules group non-major updates per repo (group:allNonMajor) on a weekly schedule; one group per stateful app (chart and image together); prHourlyLimit: 2, prConcurrentLimit: 5 complements: fewer, larger tasks
Merge Confidence badges only (mergeConfidence:age-confidence-badges), as evidence. No workflows: matchConfidence needs a paid Mend plan, and the data's algorithm is private. complements the evidence
Changelog fetching default pr, with the github.com token replaces the agent fetching notes for the target release; the agent still reads the releases in between
Dependency Dashboard on, as the inventory only: no class sets dependencyDashboardApproval (owner, 2026-10-21, #1334) complements: Taskbase stays the work queue, the dashboard the inventory
postUpgradeTasks v1: none. Later, allowedCommands for deterministic generators (go mod tidy, npm dedupe) complements; never used for calling Taskbase
osvVulnerabilityAlerts on; security PRs skip schedule and release age complements: security PRs follow the same classes

14. Scope of components (v1)

In v1:

  • Go modules and npm packages in Skatzi/taskbase, Skatzi/agent-runner and the Kodexet apps.
  • Dockerfile base images and Gitea Actions uses:.
  • Helm charts and images in platform HelmReleases, and images in raw manifests. trivial automerge for these is held until the platform PR CI exists.
  • Stateful components, each enabled once its backup gate and drill pass.
  • Flux, Cilium, hcloud CSI and MetalLB (core), with no Dependency Dashboard approval (#1334).

Not in v1:

  • Talos, Kubernetes and Terraform providers. They are applied by Terraform with credentials and cluster access that agents do not have. Their upgrades stay manual, done by the owner.
  • Our own images (harbor.prod.skatzi.com/skatzi/*) in Skatzi/* repositories. Their tags are written by release CI. Exception (owner, 2026-11-01, #2281): consumer repositories (eloro/*) pin these images in the demo's deploy/demo and each shop's deploy/prod. Renovate updates the shops' pins. The demo's pin is raised by eloro/webshop-platform's own release CI since #2439: each release opens a chore(demo) pull request, and its merge starts the staging gate that publishes the chart and the SDK. The operator persona lands those pull requests (owner, 2026-11-11, #2835) by the ops runbook's Land a demo release bump. Renovate reads Harbor with the pull robot (§2) and proposes only vX.Y.Z / X.Y.Z tags, never the per-architecture -amd64 / -arm64 tags.
  • Floating tags (latest, stable). Renovate cannot track them until they are pinned.

Rollout order (#101): Skatzi/taskbase first, because it already has PR CI and dev → soak → prod. Then Skatzi/agent-runner, then Skatzi/platform. The Kodexet repositories are archived (owner, 2026-10-20) and are not onboarded. Status: Rollout status.

15. Risks, limits and measuring success

  • Upgrade storms. Onboarding a repository surfaces months of updates at once. Mitigations:
  • prHourlyLimit: 2 and prConcurrentLimit: 5 per repository;
  • weekly grouping for non-majors;
  • stateful and core upgrades run in order per repository (§10);
  • repositories are onboarded one at a time.
  • Cost. A trivial update costs no agent run. Agent-class updates cost one implementation run plus one review run. Taskbase's Usage already records tokens and cost per task and run (ADR-0008), so kind: dependency_update with class is enough to report cost per class.
  • Silent bad automerge. A green-CI patch that breaks at runtime is caught by the soak (apps) or by Flux health (platform), and the follow-up task records it. Repos without meaningful CI do not get trivial automerge.
  • Agents' commits stop Renovate's updates on that PR. This is accepted (§6).
  • Backup Jobs stop Gitea for the length of a dump. That is minutes at today's 20 GiB, and Flux keeps its last artifact meanwhile.

Success measures, reported monthly by the project manager:

  • median days from release to merge, per class;
  • the share of updates merged with no person involved (target ≥ 95 %);
  • the rollback rate (follow-up tasks from post-merge failures ÷ merged upgrades);
  • cost per merged upgrade, per class;
  • the number of person triggers hit, by trigger.

16. Follow-up plan

In order. Dependencies are noted. The project manager creates and queues the tasks that do not exist yet (Taskbase task #1164).

  1. #100 Deploy Renovate (platform): the chart as an hourly CronJob, renovate-bot and its PAT in OpenBao, autodiscoverFilter, dryRun: full against Skatzi/taskbase first. Person steps: create the renovate-bot Gitea user and PAT, and the github.com token, and put them in OpenBao.
  2. #101 Base preset and rollout (platform): a shared preset in Skatzi/renovate-config covering the classes and labels (§5), §13's settings, the flux manager patterns and the # renovate: regex manager for bare tags. Rollout follows §14's order. Person step: branch protection with required status checks on each repo before trivial automerge is turned on there.
  3. #102 Taskbase ingestion (taskbase), reshaped by this ADR: kind: dependency_update and the dependency object, webhook ingestion keyed on (repo, branch), the hourly stalled-automerge sweep, routing by class, stateful/core serialization, completion on merge or autoclose. The endpoint POST /api/integrations/renovate/updates from the April draft is dropped.
  4. Upgrade playbook in the personas (skatzi-agents): Upgrading a dependency in the three developer personas and Reviewing an upgrade in reviewer (§8, §9). This is Taskbase task #1165.
  5. Platform PR CI (platform): render every cluster/* path, helm template, kubeconform, and post the rendered diff. This is the prerequisite for platform automerge and for reviewable platform upgrades.
  6. Flux failure → Taskbase (taskbase and platform): a Taskbase endpoint for Flux generic-hmac events, plus the Alert and Provider on hetzner-mgmt. The promote-prod failure step also calls it.
  7. HelmRelease remediation defaults (platform): upgrade.remediation: {retries: 1, strategy: rollback} and install.remediation.retries on every HelmRelease that lacks them.
  8. Pin floating tags (platform): gitea/act_runner:latest, docker:dind, bitnami/kubectl:latest, ghcr.io/gnzsnz/ib-gateway:stable.
  9. Backup store (platform), after #1160.
  10. CNPG backups and drill (platform): the Barman Cloud Plugin, a ScheduledBackup per CNPG Cluster (taskbase dev/prod, mattermost, terraform-state-db, nightgain), and a weekly restore drill.
  11. Gitea backup gate (platform), after 9 and #1161: gitea-preupgrade, the weekly drill, gitea-rollback, which runs the fallback Flux source switch (#1168). Then the Gitea 28.x upgrade goes through Renovate as the first stateful upgrade.
  12. Backup gates for Keycloak, Mattermost and Harbor (platform): the same pattern, one task each, after 10.
  13. Upgrade metrics (taskbase): Usage grouped by dependency.class, plus the rollback rate (§15).

Items 1–4 can start as soon as this ADR is merged. 5–8 are independent of each other. 9–12 wait on the decisions.

Consequences

  • Most updates merge with no task and no run. Taskbase sees only the updates that need work, and each of those carries its evidence.
  • Breaking and stateful upgrades become routine agent work. The cost is real infrastructure: a backup store, backup and restore Jobs, platform PR CI and Flux alerting. That is the price of removing the person, and the backups are worth having anyway.
  • Taskbase grows a small, generic surface: a task kind, a webhook rule, a sweep and an alert endpoint. All upgrade judgement stays in the personas.
  • ADR index: this document is listed in the ADR index as the Renovate ADR, at the path the task set.