Verified against ChatGPT · 2026-08-14
Plan a major dependency upgrade so breaking changes get caught before your users find them
Turns a scary major-version dependency bump into a scoped upgrade plan — breaking-change inventory, migration order, and a rollback trigger — based on the actual changelog and codebase usage instead of a blind bump-and-hope.
The prompt
Ready to copy — highlighted parts are example details you can swap.
I need to upgrade SQLAlchemy from 1.4.51 to 2.0.29 and I want a real migration plan, not just 'bump the version and run the tests.' DEPENDENCY AND VERSIONS SQLAlchemy from 1.4.51 to 2.0.29 HOW WE USE IT Used across ~30 model files with the legacy Query API and implicit autocommit sessions in a Flask app; no async usage CHANGELOG OR RELEASE NOTES I HAVE Migration guide states Query.get() is removed in favor of Session.get(), and autocommit mode is removed entirely in 2.0 TEST COVERAGE ON AFFECTED CODE Model layer has maybe 40% coverage, mostly happy-path CRUD tests, nothing testing transaction/rollback behavior Go through this as a plan, not a single answer dump: Step 1 — From the changelog excerpt given, list every breaking change that plausibly touches the usage pattern I described. If the changelog excerpt doesn't mention something you'd expect to be relevant (e.g., a known common breaking pattern for this kind of library), say so and tell me what to go check in the full release notes rather than guessing at what it says. Step 2 — For each breaking change identified, state the specific code pattern in our codebase that would need to change, based on the usage pattern described, and roughly how mechanical versus how risky that specific change is. Step 3 — Given the test coverage state described, tell me plainly whether it's safe to make this upgrade with confidence, or whether specific tests should be written first before touching the dependency — name what those tests should assert, not just 'add more tests.' Step 4 — Propose a migration order (e.g., which breaking changes to fix first, whether to do it in one PR or several) and a concrete rollback trigger: what specific signal after deploy would tell us this upgrade needs to be reverted, not a vague 'if something breaks.' Do not invent specific breaking changes that aren't grounded in the changelog excerpt I gave you — if you're inferring a likely issue rather than reading it directly from the changelog, label it explicitly as an inference to verify against the real release notes. OUTPUT FORMAT 1. Breaking changes table: change, why it matters to our usage, mechanical or risky, source (from changelog / inferred - verify). 2. Test coverage verdict and any tests to write first. 3. Migration order and PR-splitting recommendation. 4. The specific rollback trigger signal(s) to watch post-deploy.
Customize
Optional — swap in your own details for the highlighted parts above.
Why this works
Grounding the breaking-change inventory explicitly in the changelog excerpt provided, with a required label distinguishing 'from the changelog' versus 'inferred, verify yourself,' is the single most important guard here: major-version migration guides are exactly the kind of specific, verifiable technical content where an LLM will otherwise blend real changes it has seen in training with plausible-sounding ones it's pattern-matching from similar libraries, and for something like a SQLAlchemy 1.4-to-2.0 upgrade, an invented breaking change that isn't real wastes engineering time chasing a non-issue while a real one that gets missed ships silently. Sequencing this as four dependent steps rather than one combined answer mirrors how the actual risk assessment has to work — you cannot sensibly recommend a rollback trigger before knowing which breaking changes are risky, and you cannot judge whether existing tests are sufficient without first knowing what specifically needs to keep working, so a flattened single-pass prompt tends to produce a rollback trigger like 'watch error rates' that's too vague to act on because it wasn't derived from the actual risky code paths identified two steps earlier. The requirement to name what specific tests to write, rather than a generic 'improve test coverage' recommendation, matters because 'add more tests' is unfalsifiable advice that every migration plan could say regardless of the dependency; naming the actual assertion (in the example output, transaction rollback behavior under the new engine) ties the recommendation to the exact gap the test-coverage description revealed. Asking for a concrete post-deploy rollback signal rather than accepting 'monitor closely' forces the plan to commit to something operationally checkable, which is the difference between a migration plan a team can actually execute against and one that reads well but leaves the hardest judgment call — when do we actually revert — unanswered.
What you get back
Breaking change: Query.get() removed, replaced by Session.get() (source: changelog, directly stated). Affects roughly 30 model files using the legacy Query API — mechanical find-and-replace with a signature change, low risk. Breaking change: autocommit mode removed entirely (source: changelog). This is the risky one given your Flask app relies on implicit autocommit — every place a session currently commits implicitly now needs an explicit commit() call, and since your test coverage doesn't currently assert transaction/rollback behavior, this is the specific gap to close with tests before touching the dependency, not the CRUD happy-path tests you already have...
Verified against
ChatGPT GPT-5.1 · 2026-08-14
Changelog
- 2026-08-14 — Initial publish, verified against ChatGPT GPT-5.1.
Need this built into your business?
If a prompt isn't enough — custom software, built and maintained for you — that's Scult's day job.
EXPLORE CUSTOM SOFTWARE
