Apply a dependency-update PR
Workflow for landing a Dependabot dependency bump in carrot2. Dependabot updates
gradle/libs.versions.toml and the Gradle wrapper but does not regenerate the
root versions.lock; because this repo uses a lockfile, the check task fails
against a stale lock. So the lock must be regenerated locally, verified, committed
back to the PR branch, and only then merged.
Steps
Pick the PR. If the user didn't name one, list candidates and ask which to apply:
gh pr list --label dependencies --state open --limit 20Checkout the PR branch:
gh pr checkout <num>Regenerate the lock and run the full check (compiles against the new deps and runs the whole test suite — this is the authoritative gate). Takes a few minutes:
./gradlew writeLocks checkEvaluate the result:
- BUILD FAILED or test regressions → stop. Report the failing task/output to the user. Do not commit or merge; investigate first.
- BUILD SUCCESSFUL, no regressions → continue.
- Watch behavioral-change risk areas: minor Lucene bumps (analysis/tokenization tests) and morfologik bumps (Polish stemming/spell tests).
Inspect and commit the regenerated lock.
writeLocksnormally only touchesversions.lock; confirm the diff is pure version bumps for the expected deps:git diff versions.lock git add versions.lock # plus any other files writeLocks changed git commit -m "Regenerate versions.lock for java-deps bump (#<num>)" git pushSkip this step if
writeLocksproduced no changes.Squash-merge and delete the branch (matches the repo's dependency-merge history):
gh pr merge <num> --squash --delete-branchVerify:
gh pr view <num> --json state,mergedAt # state == MERGED git log --oneline -3 # squashed commit on master
Notes
- Do not add a
Co-Authored-By/ Claude attribution trailer to the commit. - Local
checkpassing is the authoritative signal; the merge does not wait on remote CI unless the user asks otherwise. - Default merge method is squash + delete-branch. Confirm with the user if they want a merge-commit or rebase instead.