Java framework minor + patch upgrades
A minimum version per major line. SBOM data shows who's behind, so no repo scan is needed.
Learned: "already up to date" is a valid result, not an empty PR.
Murali K
November 25, 2026
You’ve probably seen this message: “Please upgrade to the new version of the framework by the end of the quarter.” It goes out to hundreds of teams. Some do it. Some put it off. Some never see it. Next quarter, the same message goes out again.
No single upgrade is hard. What’s hard is doing it hundreds of times, across teams who all have something more important to work on. Work that is repetitive, well defined and easy to check is a good job for an AI agent.
The catch: you don’t want an agent loose in hundreds of repos. You want it inside a system that is predictable everywhere except the one step that needs a bit of judgement. Here’s how we built that.
Then it runs again, so anything new that falls behind gets picked up.
It starts with a policy: one document that says what “good” looks like. Policies are stored as documents in a database (we use MongoDB), so starting a new upgrade campaign means adding a document, not writing a new service. Here’s a simplified one:
{
"id": "framework-v4",
"appliesTo": {
"source": "inventory-db",
"filter": { "language": "java" },
"schedule": "every 4h"
},
"observed": {
"mode": "repo-detection",
"detector": "detectors/framework-version"
},
"desired": { "framework.major": 4 },
"checks": [
{ "name": "on-supported-major",
"cel": "observed.framework.major >= desired.framework.major" }
],
"remediation": { "skill": "upgrade-framework", "maxAttempts": 3 }
}Then the system has to answer one question for every service: does it pass the rule? There’s no single place that knows everything about every service, so the scan pulls facts from wherever they already live:
| Source | What it tells us | How we read it |
|---|---|---|
| Inventory database | Which services exist, which repo each lives in, who owns it | Simple lookups to decide which services a rule applies to |
| Data lake | Build, deploy and runtime data across the company | A SQL query, run in bulk on a schedule |
| SBOMs (from the artifact repository) | Exactly which libraries and versions are inside each built artifact | Read in bulk. This is often the most accurate answer to “what version is it really running?” |
| GitHub Actions | Anything you can only learn by looking at the code | A job clones the repo read-only and runs a detector, which can be anything: a shell or Python script, an API call, or a headless coding agent like Claude Code |
There’s no single best source. Each policy says where its facts come from, using two fields:
appliesTo says which services are in scope. That can be a lookup in the inventory database, a query against the data lake, or a fixed list for a pilot.observed.mode says how to collect the facts to check:
The check itself is a short CEL expression: simple, safe, and readable by anyone. Changing how a policy scans means editing the document, not the code.
When every service has been checked, the rule runs against the collected facts. Services that fail become findings, and findings that now pass are closed automatically.
Each finding is handed to an AI agent along with the name of a playbook. A playbook is a short, written set of instructions for one kind of fix, like the runbook you’d give a new teammate.
The agent doesn’t get every playbook at once. First it asks “which playbook fits this problem?”, then it reads only that one. That keeps it focused, and it’s the same reason you’d hand someone one runbook page instead of the whole wiki.
Here’s what a playbook looks like (simplified):
# upgrade-framework
1. Change the framework version from 3 to 4.
2. Run the migration script to rename old config keys.
3. Fix any compile errors.
4. Don't change business logic. If the fix needs that, stop and ask a human.
Check before you finish: the build passes, the tests pass, the version is 4.Line 4 is the most important one. A good playbook tells the agent when to give up. An agent that says “this one needs a human” is far more useful than one that “fixes” a failing test by deleting it.
Three pieces make a fix happen, and none of them is the orchestrator:
Opening a pull request isn’t success. A merged pull request is.
Every change has already passed in its own ephemeral environment before anyone is asked to review it. The service owner reviews it like any other pull request. The only difference is that they didn’t have to write it.
Once an hour, the system checks which pull requests have merged and closes their findings. It also tracks who fixed each one, the agent or a person, so the numbers stay honest.
These aren’t exciting, but each one has saved us at least once:
Here’s everything together: the three journeys, find, fix and close, playing one after another on the same map. The orchestrator in the middle is the only part that remembers anything. Everything around it does one job and reports back.
Each of these is just a policy and a skill. The rest of the system is the same every time.
A minimum version per major line. SBOM data shows who's behind, so no repo scan is needed.
Learned: "already up to date" is a valid result, not an empty PR.
Swap the base image in both the code repo and the deployment repo, each validated separately.
Learned: keep validation as a hard gate, even when owners ask to merge anyway.
Reused the existing end-of-life detector, so it only needed a new policy and skill. Rolling out in waves.
Learned: simpler skills fail less and are easier to review.
A replacement, not a bump: "desired" says use this library instead of that one.
Why it's harder: bigger code changes, so stop rules and validation matter most.
Rolling out an upgrade across the fleet used to mean tickets for hundreds of teams, a tracking spreadsheet, reminder emails and weeks of follow-up. Now it’s three things:
From there the system scans the fleet, opens a pull request for every service that’s behind, proves each one in an ephemeral environment, and closes each finding when its owner merges.
For the services it covers, that has cut manual upgrade work by about 90% and the time to get a service up to date by about 75%. The conversation has changed too. It used to be “please do this upgrade”. Now it’s “there’s a pull request waiting for your review”.