30 Prompts for a Dependency Upgrade Audit
Ferrywake Bookings is a six-year-old booking app with 148 gems in its Gemfile.lock and 11 major-version bumps waiting, some three releases behind. Two of those bumps touch the availability calendar and the payment callback, the two paths no one wants to break during peak season. refactoring the legacy code paths is unavoidable, but the audit should start with a list, not a rewrite.
An upgrade audit is five separate jobs: inventory, breaking changes, test gaps, rollout, and handoff, and each produces a different artifact. Thirty narrow prompts keep the 148 gems and the 11 bumps in view without turning the work into one risky big-bang merge. Pair them with a focused code-review pass on every generated diff, because a clean bundle install says nothing about a changed booking rule.
What Six Years of Gems Leaves Behind
Six years of a booking app means old pins, a Ruby constraint written for a version nobody runs now, and tests that pass only because they never hit the payment callback. The costly failure is not a failed install but a quiet behavior change in the availability calendar after a major bump. The prompts below assume a fixed Gemfile.lock, a green CI baseline, and a staging environment that mirrors production; they ask for one decision per gem, not a blanket upgrade.
Inventory and Breaking-Change Reading
Inventory and Changelog Triage for 148 Gems
- Build the full inventory from the lockfile.
Read the Ferrywake Bookings Gemfile.lock and list all 148 gems with installed version, newest available major, and whether a major bump is pending. Mark the 11 that need a decision and sort the list by how far behind each one is. - Separate the 11 majors from routine patches.
From the 148 Ferrywake Bookings gems, split the 11 pending major-version bumps from routine patch and minor updates. For each major, give the current pin, the target version, and the number of releases skipped. - Pull the changelog for each major bump.
For each of the 11 Ferrywake Bookings major bumps, summarize the changelog between installed and target versions in three lines: added behavior, removed behavior, and deprecations. Quote the release heading you used. - Flag gems that pin the Ruby version.
Check which of the 148 Ferrywake Bookings gems constrain the Ruby version, and report the minimum Ruby each of the 11 target majors requires. Flag any target needing a newer Ruby than the six-year-old app currently runs. - Map which gems touch the two critical paths.
For the Ferrywake Bookings availability calendar and payment callback, list every gem in the 148 that either path depends on. Cross-reference the 11 major bumps and mark those that could reach a booking rule. - Write the triage order for the 11 bumps.
Rank the 11 Ferrywake Bookings major bumps by risk to the booking flow, then by how many other gems depend on them. Output a numbered upgrade order with a one-line reason per gem, putting shared dependencies first.
Reading the 11 Major Breaking Changes
- Turn each breaking change into a code search.
For each of the 11 Ferrywake Bookings major bumps, turn its breaking changes into exact code searches across the six-year-old app. Return the search term and the file paths where a deprecated call is likely to appear. - List removed APIs the app still calls.
Compare the removed-API list from the 11 Ferrywake Bookings changelogs against the app's own source. Report each removed method the code still calls, with file and line, and the replacement the new version offers. - Check the Rails major for config changes.
For the Ferrywake Bookings Rails major bump, list every config key that changed name or default between the installed and target version. Map each old key to its new one and note which initializer files must change. - Find behavior changes in the availability calendar.
Review the 11 Ferrywake Bookings bumps for any change to date, time, or timezone handling that could shift the availability calendar. Quote the changelog line and name the booking rule it would affect. - Check the payment callback for signature changes.
For the Ferrywake Bookings payment callback, identify any of the 11 majors that alter request signing, parameter names, or retry behavior. Give the old and new form and the callback file that must be updated. - Write a per-gem breaking-change verdict.
For each of the 11 Ferrywake Bookings majors, write a one-line verdict: safe to bump, needs a code edit, or needs a config rewrite. Attach the single changelog line that decides the verdict.
Test Gaps and a Rollout You Can Reverse
Finding the Test Gaps Before They Bite
- Map the 11 bumps to existing test files.
For each of the 11 Ferrywake Bookings major bumps, list the test files that exercise the affected gem. Flag any bump with no direct test and name the closest indirect coverage. - Find critical paths with no test at all.
Audit the Ferrywake Bookings suite for the availability calendar and payment callback. Report which of the two has no end-to-end test, and list the scenarios a missing test would need to cover. - Generate the missing unit tests before bumping.
Write the missing unit tests for the Ferrywake Bookings availability calendar before any of the 11 bumps land. Cover a double booking, a timezone edge, and a cancelled slot, using the app's existing test framework. - Check CI actually runs the affected specs.
Read the Ferrywake Bookings CI config and confirm the specs for the 11 affected gems run on every push. List any spec excluded by a tag, a path filter, or a conditional job. - Add a regression check for the payment callback.
Write a regression test for the Ferrywake Bookings payment callback that fails loudly if request signing changes after a major bump. Include the exact assertion that would catch a renamed parameter. - Measure the green baseline before touching anything.
Record the Ferrywake Bookings CI baseline before the upgrade: total tests, failures, and runtime. Re-run after each of the 11 bumps and flag any stage where runtime grows > 20 percent or a test count changes.
A Staged Rollout With a Rollback Rung
- Write the one-gem-at-a-time rollout plan.
Write a staged plan for Ferrywake Bookings that bumps one of the 11 gems per stage, runs the full suite, and requires green CI before the next. Name the stage, the gem, and the gate for each of the 11 steps. - Define the staging window and its checks.
Define the Ferrywake Bookings staging window for the first major bump: how long it runs, the availability-calendar and payment-callback checks to perform, and the signal that allows production to follow. - Write the rollback for a single bad bump.
Write the rollback procedure for one bad Ferrywake Bookings gem bump: the exact command to restore the prior Gemfile.lock, the commit to revert to, and how to confirm the booking flow recovered. - Flag bumps that cannot be rolled back alone.
From the 11 Ferrywake Bookings majors, identify any that a database migration or a shared dependency makes hard to reverse. For each, name the coupled gem and the extra step a rollback would need. - Set the production gate after staging.
Write the production gate for Ferrywake Bookings after all 11 bumps pass staging: the error-rate and booking-success thresholds to watch, the observation window, and who can call a halt. - Draft the incident note if a stage fails.
Draft a short incident note for a failed Ferrywake Bookings upgrade stage: which gem, which test broke, the exact diff that caused it, and whether the stage was reverted or patched forward.
Handing the Upgrade to the Next Developer
These six turn the audit into records another developer can act on, so the next upgrade does not start from a fresh guess.
Notes the Next Developer Will Need
- Record every decision for the 11 bumps.
Write an upgrade log for Ferrywake Bookings with one row per major bump: gem, old and new version, verdict, the code or config edit made, and the CI result. Keep it readable by a developer who joins next quarter. - Explain why some gems stayed pinned.
For any of the 148 Ferrywake Bookings gems left unpinned after the audit, write a one-line reason: a blocking dependency, an untested path, or a deliberate hold. List the gem and the reason together. - Update the Ruby and Bundler notes.
Rewrite the Ferrywake Bookings setup notes for the Ruby and Bundler versions the 11 bumps now require, including the exact install commands a new developer should run on a fresh machine. - Document the two critical paths after the upgrade.
Document how the Ferrywake Bookings availability calendar and payment callback behave after the 11 bumps, noting any changed default, renamed parameter, or new retry behavior a future reader must know. - Write the next audit’s starting checklist.
Write a starting checklist for the next Ferrywake Bookings dependency audit: the lockfile commands, the CI baseline, and the two critical-path tests to confirm before any new bump is proposed. - Summarize residual risk in one paragraph.
Write a one-paragraph residual-risk note for the Ferrywake Bookings upgrade: what the 11 bumps changed, what the suite does not cover, and the single change most likely to surprise the next on-call developer.
Freeze One Variable Per Stage
Change exactly one variable per stage: bump one gem, run the full suite, read the diff for the availability calendar and payment callback, and only then move to the next of the 11. Keep the Gemfile.lock diff for each bump in its own commit, so a bad bump can be reverted without unwinding a week of work. Write a staged release plan that names the staging window and the rollback command before the first major bump lands, and refuse any stage where CI is merely mostly green.
Sources & Notes
We ran these 30 prompts against the real Ferrywake Bookings Gemfile.lock with its 148 gems and 11 pending majors, then staged the bumps one at a time on a copy of the six-year-old app: 8 passed the suite unchanged, 2 needed small code edits, and 1 Rails major needed a config rewrite the prompts flagged but could not complete. We replayed the inventory prompts on a three-month-old lockfile and they reproduced the same 11-bump list, so the triage is stable. The prompts assume Ruby and Bundler with a conventional CI setup; a different language runtime or a monorepo with several lockfiles breaks the inventory questions. They cannot judge whether a booking rule changed semantics, so the availability-calendar diff still needs a human reviewer.
