Work project · internal platform
Dependency updates a human still merges
At work I built a self-hosted dependency-update platform, Renovate running as a GitHub App, and rolled it out to 16 repositories. Deterministic rules settle most bump PRs. Headless Claude Code grades the rest with evidence and, on repositories that opt in, fixes what a bump broke. A person merges every one. It replaced the vendor-hosted bot the team used before. This page describes the design in general terms and leaves out the employer's systems, data and names.
The problem
Opening bump PRs was never the expensive part. Deciding about each one was: safe to merge, needs a closer look, or blocked on a real code change. That decision was scattered across every repository's PR tab, and security fixes arrived by a second route, so the same package could be raised twice. Merging without a person was not an option, because a compromised release does its damage in its first hours.
What it does
Raises the bumps
Renovate runs every night, one repository per job. A fleet-wide base config sits under each repository's own and forces the settings that keep the platform in charge: no automerge, and a three-day release cooldown.
One route for security fixes
The platform's vulnerability alerts are only a feed; Renovate raises the fixes, so security and routine updates pass the same checks. For a vulnerable transitive Ruby gem, a small raiser opens a PR that moves only that gem.
Batches the routine
Routine patch bumps roll up into one weekly PR. Packages with a wide blast radius stay on their own PRs, so one failure can't hold up the batch.
Decides what rules can
A deterministic engine applies its gates to every open bot PR first: cooldown, CI state per check, merge conflicts, stale branches, and failures caused by the CI rather than the bump.
Grades the rest
A single-turn headless Claude Code call reads the upstream release notes and issues for regressions in range and checks the real call sites. It returns GREEN, RED or ESCALATE with its evidence. The grade is advice; the engine owns the verdict.
Fixes on opt-in
On repositories that turn it on, a fixer changes only what the bump broke and commits onto the bump's own branch, for at most three rounds. A merely stale branch gets a rebase instead.
Takes plain-English requests
Maintainers can comment "cap it at v5". A model with no tools maps the text onto a closed set of intents, and config changes come back as a draft PR.
Architecture
A nightly scheduler starts one chain per repository on CI runners. Renovate raises or refreshes bump PRs using a token scoped to that one repository. The engine classifies every open bot PR, and the ones it can't settle go to the assessor, which runs in a locked-down container with read access only. On repositories with auto-fix on, the fixer runs next in a separate container. It is the only stage that holds a write token. Results land as one comment per PR, edited in place, plus a dashboard issue for the whole fleet. A comment poller feeds maintainers' requests back into the same chain. Public repositories never see the model's reasoning; it goes to a private issue instead.
Design decisions
Rules first, the model for what's left
Cooldown and CI state settle most bumps. The model only sees what rules can't decide, which keeps cost and surprises down.
Recommend-only, enforced
Automerge is off as a forced setting, not as a default a repository can override, so the only route to the default branch is a person.
A commit gate on the fixer
Its first live fix changed CI resources to make a stale-branch failure go away. Now a fix needs positive evidence that the bump caused the failure, and it may not touch CI infrastructure. A stale branch gets a rebase, not a commit.
Least privilege, learned the hard way
One write token once reached every managed repository, and package managers run code from what they install. Tokens are now minted per repository and per job. Model steps run in pinned, non-root containers with capabilities dropped and the cloud metadata endpoint blocked. The App's signing key is usable only from the default branch.
Every model turn has a price
Each turn runs under its own dollar cap and logs its spend. A failure that a new commit leaves unchanged doesn't get diagnosed twice.
How it was proven
It went live on four repositories first, recommend-only, with a read-only preview mode that shows every comment it would post. It then grew to 16. A preflight checks each repository's security feed on every run, because a dead feed fails silently: no alerts looks like no vulnerabilities. Each production surprise, such as the fixer's first bad commit or a cancelled CI run read as a failure, became a rule with a test behind it.
Outcome
One review surface replaced a tab per repository: a verdict with reasons on each PR, and one dashboard for the whole queue. The vendor-hosted bot is gone, security and routine updates share one route, and a person still merges every PR.
What it doesn't do
It never merges, and automerge can't be switched on without a policy change. The fixer is off by default and stays off for public repositories. Upgrading to a new major version is still a person's decision.
Built with
- Renovate
- GitHub App
- GitHub Actions
- Claude Code (headless)
- Node.js
- Docker
Built through my own coding-agent loop.