A dependency-upgrade prompt should identify the exact old and new versions, package source, lockfile diff, affected imports, changed behavior, and tests that exercise those paths. A security advisory or automated update proposal is a trigger for review, not proof that the application is safe after the change. Prefer official release notes and locally observed behavior for compatibility claims. Keep transitive additions and package scripts visible to the reviewer. If the upgrade changes serialization, authentication, or data formats, add a regression check at that boundary before promotion.
Dependency upgrade prompts: trace behavior, not only versions
Operational case
An order service upgrades a CSV parsing library from version 4.3 to 5.1. The manifest changes one direct package, but the lockfile also adds a transitive decoder. The assistant identifies the import used by OrderFeedParser and proposes tests for quoted line breaks, duplicate headers, and a 31-megabyte feed under the service's size cap. One old fixture passes yet the quoted-line-break case changes row count from 208 to 209. The team blocks promotion until it determines whether the new parser or the historical fixture is correct; the model cannot settle that by preferring the newer version.
OrderFeedParser upgrade: 4.3 -> 5.1.
Review: manifest, lockfile, transitive decoder, package scripts.
Boundary cases: quoted newline; duplicate header; 31 MB feed.
Observed row counts: old 208, new 209 -> investigate.
Release gate: reconcile expected rows and record exact build digest.Performance and operating cost
With P changed packages and C affected call sites, the initial inventory is O(P+C), while tests and dependency resolution dominate wall-clock time. Scanning every repository file for every package wastes context; start with imports, public APIs, and lockfile changes, then expand around a behavioral difference. A large version jump can require several focused compatibility tests, but more generated tests are not useful if their expected results copy the new library's output. Track build digest, dependency tree, and test evidence so rollback can restore the same artifact rather than an approximate manifest.
Common Mistakes
- Do not approve an upgrade from its version number alone.
- Do not ignore transitive packages and install scripts.
- Do not treat the newer parser's output as the test oracle.
Connected lessons
- Prompt engineering applications
- Prompt Engineering
- Coding prompts: name the files, behavior, and proof
- Generated tests: verify the oracle before trusting coverage
- Dependency patch campaigns: update, test, and prove the running image
- Diff-scoped code review: make every finding reproducible
- Incident triage prompts: build a timestamped evidence ledger
- Schema migration prompts: check old and new clients together
- Project: review a checkout release from diff to incident
- Prompt engineering for software delivery
