Trim comments to the non-obvious why
Test and deploy / test (push) Successful in 28s
Test and deploy / deploy (push) Successful in 31s

Drop narration, history and restated-code comments across the repo,
keep short ones for security boundaries, upstream quirks and ordering
constraints, and record the convention in CLAUDE.md.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
2026-11-24 20:49:03 +00:00
co-authored by Claude Opus 5.5
parent effddd2794
commit 4530cb8dc4
222 changed files with 1173 additions and 5423 deletions
+15 -60
View File
@@ -1,60 +1,29 @@
// =============================================================================
// renovate.json5 — dependency-update PRs (this repo's Dependabot).
//
// WHY RENOVATE AND NOT DEPENDABOT
// Dependabot only runs on GitHub, and this repo lives on the self-hosted
// Gitea. Renovate does the same job against Gitea's API. It is run by
// .gitea/workflows/renovate.yaml on the stack's own runner, which is where
// the platform, endpoint and token are set; this file is only *what* to
// update.
//
// WHAT IT WATCHES
// gomod backend/go.mod (go.sum and `go mod tidy` come along)
// npm vue/package.json + package-lock.json
// pip_requirements python/requirements.txt, requirements-dev.txt
// dockerfile every */Dockerfile FROM line
// docker-compose every image: in docker-compose*.yml
// custom (below) the images deploy.yaml and renovate.yaml `docker run`,
// and the Caddy plugins caddy/Dockerfile compiles in
//
// NOTHING IS AUTOMERGED, on purpose: a merge to main IS a deploy. Each
// Renovate branch is pushed to Gitea, so deploy.yaml's `test` job runs on it
// (go vet/test and pytest) — but that job skips the Vue build, so an npm PR is
// only proven by `make check-vue` locally or by the deploy itself (where a
// failed build stops before any container is replaced).
// =============================================================================
// What Renovate updates; how it runs is .gitea/workflows/renovate.yaml.
// Nothing automerges: merging to main is deploying. The CI test job skips the
// Vue build, so check npm PRs with `make check-vue`.
{
$schema: "https://docs.renovatebot.com/renovate-schema.json",
extends: ["config:recommended"],
timezone: "Europe/London",
// Replaces config:recommended's list rather than adding to it. .deprecated/
// holds parked services whose manifests are not built any more.
// Replaces config:recommended's list; .deprecated/ isn't built.
ignorePaths: ["**/node_modules/**", ".deprecated/**"],
// A release has to have been out this long before a PR proposes it, so a
// compromised or quickly-yanked version never reaches a branch.
minimumReleaseAge: "3 days",
postUpdateOptions: ["gomodTidy"],
customManagers: [
{
// deploy.yaml runs the tests in `docker run golang:… / python:…`, which
// no built-in manager reads. They must match backend/Dockerfile and
// python/Dockerfile (see deploy.yaml's header), so they share those
// images' groups below and land in the same PR. Also matches the
// Renovate image in renovate.yaml, and the copies in comments, which
// keeps those accurate.
// The `docker run` images in the workflows; grouped with the matching
// Dockerfile bases so they move together.
customType: "regex",
managerFilePatterns: ["/^\\.gitea/workflows/[^/]+\\.ya?ml$/"],
matchStrings: ["(?<depName>golang|python|renovate/renovate):(?<currentValue>[0-9][\\w.-]*)"],
datasourceTemplate: "docker",
},
{
// The Caddy plugins compiled in by caddy/Dockerfile's `xcaddy build
// --with <module>@<version>`. Only versions starting with v match, so
// caddy-ratelimit, pinned to a commit, is left for a hand bump.
// xcaddy plugins; caddy-ratelimit is a commit pin, bumped by hand.
customType: "regex",
managerFilePatterns: ["/^caddy/Dockerfile$/"],
matchStrings: ["--with (?<depName>[\\w./-]+)@(?<currentValue>v[0-9][\\w.-]*)"],
@@ -63,18 +32,14 @@
],
packageRules: [
// The job tracker, usaco and activity-tracker images are built by their
// own repos and roll themselves out on `:latest`; there is nothing here
// to bump.
// Built and rolled out by their own repos.
{
matchDatasources: ["docker"],
matchPackageNames: ["adam-french.co.uk/**"],
enabled: false,
},
// A Postgres major needs a dump and restore of the dbdata volume (the new
// server refuses the old data directory), so it is done by hand, never
// from a PR.
// A Postgres major needs a dump and restore, so never from a PR.
{
matchDatasources: ["docker"],
matchPackageNames: ["postgres"],
@@ -82,10 +47,8 @@
enabled: false,
},
// Non-major updates batched per ecosystem, so the runner tests one branch
// a week per language instead of one per package. Majors stay separate.
// These come before the named groups below because a later matching rule
// wins: gqlgen and the go directive must not be swept in here.
// Non-majors batched per ecosystem. Before the named groups, since a later
// matching rule wins.
{
matchManagers: ["gomod"],
matchUpdateTypes: ["minor", "patch", "digest"],
@@ -102,8 +65,6 @@
groupName: "Python packages (non-major)",
},
// One PR per toolchain: the Dockerfile base, the CI test image and (for
// Go) the go.mod `go` directive move together.
{
matchPackageNames: ["golang", "go"],
groupName: "Go toolchain",
@@ -113,26 +74,20 @@
matchPackageNames: ["python"],
groupName: "Python image",
},
// caddy/Dockerfile's builder and runtime images must be the same release
// (the builder compiles the version its image sets), so one PR moves
// both, along with the plugins.
// Builder and runtime must be the same release.
{
matchFileNames: ["caddy/Dockerfile"],
groupName: "Caddy",
},
// @mdit/plugin-katex renders with its own katex dependency (^0.16), and
// Markdown.vue takes only the stylesheet from the top-level katex, so the
// two must stay on the same minor or the CSS no longer matches the HTML.
// Lift this when the plugin moves its katex range.
// Must match @mdit/plugin-katex's own katex minor, or the CSS won't fit the
// HTML. Lift when the plugin moves its range.
{
matchPackageNames: ["katex"],
allowedVersions: "<0.17",
},
// gqlgen's runtime and gqlparser are versioned together. If a bump breaks
// the build, regenerate (`go run github.com/99designs/gqlgen generate`)
// on the branch.
// If a bump breaks the build, regenerate on the branch.
{
matchPackageNames: ["github.com/99designs/gqlgen", "github.com/vektah/gqlparser/**"],
groupName: "gqlgen",