What the agent does
The agent installs a Temurin JDK 17, since the sandbox had none, runs ./gradlew test on the untouched clone, then upgrades in three steps with the tests after each: 2.6.3 to 2.7.18, to 3.5.16 (Gradle 8.14.3, Java 17, javax to jakarta, a SecurityFilterChain bean replacing WebSecurityConfigurerAdapter), and to 4.0.9 (renamed starters, @MockitoBean, Jackson 3 in JacksonCustomizations and ErrorResourceSerializer).
Boot 4 first failed 28 tests. JwtTokenFilter was registered both as a servlet filter bean and in the security chain, and the servlet copy's authentication was discarded, so signed-in requests got 401. The global UNWRAP_ROOT_VALUE setting also broke POST /graphql; six request DTOs now wrap with @JsonTypeInfo instead.
Start it with one API call
POST https://api.phoenix.so/o/{org}/sessions with this body:
{
"agent": "claude",
"input": "Upgrade this app from Spring Boot 2.6 to Spring Boot 4 following the official upgrade guide step by step. Run the tests after each step and fix what breaks. Open a pull request that lists each change and anything you left for a person to decide.",
"resources": [
{
"url": "https://github.com/your-org/your-app"
}
]
}- Get an API key. In the console, open Settings, then API keys, and create a key for your org. Send it in the Authorization header as a Bearer token.
- Send the request. POST the body in request.json to https://api.phoenix.so/o/{org}/sessions, with your repository as the resources URL. The run starts in its own cloud sandbox.
- Read what came back. Follow the run on its live stream or wait for the run.completed webhook, then read the result and its trajectory.
What comes back
Tried on gothinkster/spring-boot-realworld-example-app at ee17e31: 43 files changed, 356 insertions(+), 295 deletions(-), in five local commits. ./gradlew test --no-daemon exited 0 before (BUILD SUCCESSFUL in 1m 18s, 68 tests, 0 failures). After the upgrade, the last spotlessApply test run passed tests=68 skipped=0 failures=0 errors=0, the final test was up to date (5 actionable tasks: 5 up-to-date), and spotlessCheck exited 0. On bootRun, register, login, article, comment and a GraphQL articles query answered 200 or 201, an invalid registration got 422, and GET /user without a token got 401. The run copied two diffs to /workspace/.rush/artifacts/; capture keeps no .diff file, so neither came back. No pull request was opened.
For the reviewer: DGS is pinned to 11.1.0 because 12.x needs a json-path Boot 4.0.9 does not manage, and the target is 4.0.9 although 4.1.2 is published; the run tried neither alternative.
Run it on every Monday morning, then switch it off
An automation with the recipe's schedule trigger, cron 0 9 * * 1, and this prompt runs the upgrade the next Monday. A move to Boot 4 is a one-time job, not a weekly bump: switch the automation off after that run, because a second run would start the whole upgrade again.
The use case this job follows, with its automation and trigger: Upgrade dependencies weekly.
Why run it on Rush?
The tests missed one break: the GraphQL tests call DgsQueryExecutor directly, so the 400 from POST /graphql showed only when the agent ran the upgraded app and sent real requests. The 401s came from a filter registered twice, which only broke under Boot 4, where the servlet copy ran first.
Frequently asked questions
What did the run leave alone?
jjwt 0.11.2, joda-time and sqlite-jdbc 3.36 were not upgraded. Deprecation warnings under Boot 4 were not reviewed, and only one GraphQL operation was tried over HTTP.
Does the app still run on Java 11?
No. Boot 4 needs Java 17, so build.gradle targets 17 and the README now says Java 17 or newer. The run tested on JDK 17 only.
The same job on other stacks
- Upgrade Laravel 11 to Laravel 13 (Laravel)
- Upgrade Next.js 13 to Next.js 16 (Next.js)
- Upgrade Phoenix 1.7 to Phoenix 1.8 (Phoenix)
- Upgrade React 18 to React 19 (React 18)