S02-03 - Dependency Updates
Purpose: How Renovate keeps every pin current, and what it leaves to the maintainer.
Design
Section titled “Design”Dependency updates
Section titled “Dependency updates”Renovate keeps every pin current: the
.mise.toml tools and mise.lock, the Go module, the docs site’s
package.json and bun.lock, the Swift package’s Package.swift and
Package.resolved, the GitHub Actions, and Renovate’s own image.
renovate.json is the policy, and .github/workflows/renovate.yml
runs it as a GitHub App of the wraithbox organization, on this
repository only (docs/github-settings.md, “Renovate”).
- Renovate’s image tag is written once, in
.github/workflows/renovate.yml, and therenovate:validatetask reads it from there. Renovate runsmise lockwith the names of the dependencies it updates in.mise.toml, and mise refuses a name that isn’t a mise tool, so Renovate extracts no other dependency from.mise.toml(I769I769 (closed): Renovate: the mise.lock update fails because the Renovate image pin is extracted from .mise.tomlRenovate can't update mise.lock when one pull request bumps both a mise tool and Renovate's own image.). - Every version is pinned exactly. Actions are pinned to a commit SHA with the version in a comment.
- A release is proposed 7 days after it was published
(
minimumReleaseAge). New pull requests open on Mondays. All non-major updates go into one pull request, and each major into its own. - Renovate merges its own pull request, by rebase, once every check on it has passed, the vulnerability scan included. A red check stops it, and the pull request waits for the maintainer.
- Vulnerability fixes, from GitHub’s alerts and OSV, skip the Monday schedule but wait the same 7 days as every other update. A release rushed out as a security fix is what a supply-chain attack looks like, so the wait applies most when an advisory is pushing for speed. A fix that can’t wait is applied by hand, after reviewing the release (I732I732 (closed): Renovate: vulnerability fixes skip the 7-day release-age waitRenovate's built-in vulnerabilityAlerts config sets minimumReleaseAge: null.).
- Once a week, Renovate refreshes
bun.lockandmise.lock(lock file maintenance). A refresh has no release date, so it skips the 7-day wait. Each tool’s own cooldown ages the transitive packages it pulls in:minimum_release_agein.mise.tomlandminimumReleaseAgeinpackages/wraithbox-doc/bunfig.toml. - Renovate never moves TypeScript to a new major. 6 to 7 needs the
maintainer’s agreement, and
astro checkneeds the TypeScript 6 API. It leaves theoverridesadvisory floors in the docs site’spackage.jsonalone, except to fix a vulnerability. - A Go module major changes the import path, and Renovate rewrites the
imports with it (
gomodUpdateImportPaths). Forgo.yaml.in/yaml, v4 needs code changes (I770I770 (open): ON HOLD policyfile: move go.yaml.in/yaml from v3 to v4, and refuse the node kinds v4 addsRenovate proposes go.yaml.in/yaml/v3 v3.0.6 to go.yaml.in/yaml/v4 v4.0.0 in #768.), so Renovate holds it on v3 until then. - Linux jobs run on an explicit Ubuntu image (
ubuntu-26.04), neverubuntu-latest, which lags behind the newest stable image. Renovate proposes the next stable image, but doesn’t merge it: PR CI runs onlyci.yml. The maintainer runsfuzz.yml,deploy.yml,codeql.ymlandrenovate.ymlby hand first. Until actionlint knows a new image’s label,.github/actionlint.yamllists it. The macOS runner stays on the oldest v1 host (S02-05-swift-contracts-dotnetS02-05-swift-contracts-dotnet: Swift, Contracts and .NETWhere the Swift toolchain comes from, the Swift tasks, the contract tools, and the .NET toolchain to come., “Swift comes from Xcode, not mise”), and Renovate leaves it alone. - Renovate updates the direct pins of
Package.resolvedand nothing else, because it does not run SwiftPM. When a bump needs a transitive package to move too, the Swift job fails on--force-resolved-versions, and the maintainer resolves it. - The Dependency Dashboard issue lists pending, held, and failed updates.
go.work.sum
Section titled “go.work.sum”go.work.sum holds the checksums of the Go workspace’s module graph
that no go.sum holds. Renovate’s gomod manager doesn’t update it, and
the go command adds lines to it but never removes one. A stale file
changes the working tree on the next go list -m all, and the
build-version check of swift:build then refuses the tree (I759I759 (closed): go.work.sum goes stale after Go dependency updates, and every local mise run ci then fails in swift:buildmise run ci on a clean checkout of main fails.).
internal/tools/worksumwrites the file from nothing, in a temporary copy of the workspace. It lists the module graph, then the packages of each GOOS ofgo:crosswith their tests and thetooldirectives. On darwin it lists them without cgo, and again with cgo and the build tags that select files.- It sets the Go environment of those commands itself.
GOFLAGSis empty, and every module is checked againstsum.golang.organd fetched only through the module proxy (GOVCS=*:off). It leavesGOTOOLCHAINalone, so a Go update can switch to its new toolchain. mise run go:worksumwrites the file.go:worksum-checkfails when the file in git’s index differs from a fresh one, and refuses to run whilego.work, ago.modor ago.sumdiffers from the index. A changed hash for the same module version is reported as a checksum mismatch, for the maintainer to look into, not as a stale file.- After each gomod update, Renovate runs
worksum writeas a post-upgrade task, once per branch.fileFilterslimits what the task may add to the branch togo.work.sum. - The task runs where the App token is. So worksum imports only the
standard library, and
TestStandardLibraryOnlyfails when it imports anything else. Renovate runs the code of the branch it updates, which is main’s code with new dependency versions that worksum doesn’t use. - Renovate is self-hosted, and runs a post-upgrade command only when
RENOVATE_ALLOWED_COMMANDSin.github/workflows/renovate.ymlmatches it. That holds one regular expression, anchored at both ends, for the one command (docs/github-settings.md, “Renovate”). - Renovate installs Go for its own Go commands. Without a constraint it
installs the newest Go 1.x, so
constraints.goandconstraints.golanginrenovate.jsonpin it to the other Go pins. A regex manager moves both in the same pull request as the mise pin,go.workand thego.modgo directive, which moves only withrangeStrategy: "bump".
What the Renovate run may execute
Section titled “What the Renovate run may execute”The Renovate step holds the GitHub App token, which can write contents,
workflows and pull requests, and merge once CI is green. It runs these
programs, and nothing else (docs/github-settings.md, “Renovate”):
go mod tidyandgo get, from the gomod manager, withgoat the version ofconstraints.go.mod upgrade, fromgomodUpdateImportPaths, after a Go module major update. Renovate installs it withgo install github.com/marwan-at-work/mod/cmd/mod@<version>, andconstraints.gomodModsets the version. The checksum database authenticates the download.mise trustandmise lock, with the App token inGITHUB_TOKEN.RENOVATE_ALLOWED_UNSAFE_EXECUTIONSnamesmise, somise lockruns the branch’s own.mise.toml. Renovate installs mise, node, npm, Go and ruby for it (constraints.mise,node,npm,goandruby). node, npm and ruby are only for the backends that resolve versions through them.bun install --ignore-scripts, from the bun manager, after a change topackages/wraithbox-doc, with bun atconstraints.bun.- The one post-upgrade command,
worksum write, withgolangatconstraints.golang.
Every tool that Renovate’s installer (Containerbase) fetches for these
has an exact version in constraints, with a regex manager in
renovate.json that keeps it current. A new release waits the same 7
days as any other update, so no tool runs at a floating version next to
the token, as the supply-chain rule of AGENTS.md requires. A tool that
a new Renovate release starts to install on its own, or a new manager
that runs one, needs a pin before it ships. Renovate’s debug log lists
each tool it installs. The GitHub Actions lockfile step
(gh-actions-lock) is inactive, because the repository has no
.github/workflows/actions.lock.
gomodMod is pinned and gomodUpdateImportPaths stays on. Renovate
supports the pin, and a Go major update with a new import path, such as
go.yaml.in/yaml, still needs it (I770I770 (open): ON HOLD policyfile: move go.yaml.in/yaml from v3 to v4, and refuse the node kinds v4 addsRenovate proposes go.yaml.in/yaml/v3 v3.0.6 to go.yaml.in/yaml/v4 v4.0.0 in #768.).
Renovate 44 can run mise lock in safe mode (MISE_SAFE=1) when
mise isn’t in RENOVATE_ALLOWED_UNSAFE_EXECUTIONS. Then it installs
only mise, and the branch’s .mise.toml can’t run code. Not adopted: it
is untested with the go: backend of .mise.toml, and the pins above
already close the finding that asked for them (I788I788 (closed): Renovate: tools in the token-holding run float at latest (gomodUpdateImportPaths' mod@latest, mise and Containerbase tools)From the security review of #784 (F2).).
Decisions
Section titled “Decisions”Renovate instead of Dependabot
Section titled “Renovate instead of Dependabot”- Decided: PR639PR639 (merged): build(deps): move from Dependabot to RenovateReplaces Dependabot with a self-hosted Renovate, modeled on the maintainer's lsimons/.github setup but fully independent of it: its own config, workflow, GitHub App and secrets.. The
.mise.tomltools were refreshed by hand before. - Why: Renovate covers the tools,
mise.lockand thegodirective that Dependabot doesn’t, groups updates into one pull request, and merges them once CI passes. The policy follows the maintainer’s other repositories, but the configuration, the App, and the workflow are this repository’s own.
The tools of the Renovate run are pinned
Section titled “The tools of the Renovate run are pinned”- Decided: I788I788 (closed): Renovate: tools in the token-holding run float at latest (gomodUpdateImportPaths' mod@latest, mise and Containerbase tools)From the security review of #784 (F2)., from the security review of PR784PR784 (merged): fix(ci): write go.work.sum from nothing and fail a change that leaves it staleThe workspace checksum file went stale after every Go dependency update..
- Why: Containerbase installs mise, node, npm, Go, ruby, bun, and the
marwan-at-work/mod tool at their newest versions unless
renovate.jsonconstrains them. They run beside the App token, so a compromised release would run there before any review. Pinning each, and letting Renovate move the pin after 7 days, applies the same rule as the.mise.tomltools.
go.work.sum is written from nothing
Section titled “go.work.sum is written from nothing”- Decided: PR784PR784 (merged): fix(ci): write go.work.sum from nothing and fail a change that leaves it staleThe workspace checksum file went stale after every Go dependency update., for I759I759 (closed): go.work.sum goes stale after Go dependency updates, and every local mise run ci then fails in swift:buildmise run ci on a clean checkout of main fails..
- Why: A file the go command keeps only grows, so a check that runs
go list -m alland diffs the tree would miss lines no longer needed. The check compares with git’s index, because a Go task running beside it inmise run cican fill in the working tree first.
Status: Active