ReviewOS

stacks/buddy

Wire AI major upgrades into PR creation, with multi-release span notes

#1396
Closed chris opened this 8 days ago ·
8 days ago

Follow-up to #1388, which landed the analysis, usage discovery, plan normalization, report and agent hand-off.

Multi-release span notes

  • release-notes-fetcher currently returns the newest releases; a 5.x → 7.x upgrade needs the 6.0 and 7.0 notes too, since that is where the breaking changes are described
  • Walk the tag list between currentVersion and newVersion, keeping only major/minor boundaries to bound the size
  • Feed the result to attemptMajorUpgrade's releaseNotes

PR creation integration

  • Call attemptMajorUpgrade from createPullRequests for one-per-major groups when ai.majorUpgrades.enabled
  • Append result.report to the PR body (after the tables, before the manifest)
  • Open as draft when result.draft — needs draft threading through createPullRequest
  • Respect ai.majorUpgrades.packages globs

Re-scoping

  • When a migration fails for one package in a group, drop it from the PR and note why, rather than leaving the whole group broken
  • Preserve the failed attempt on a sub-branch so a human starts from the agent's work rather than from zero

Rule integration

  • matchUpdateTypes: ['major'] rules should be able to set autoMigrate per package (#1395 threads rule effects into PR creation)
8 days ago

Landed in b5255e1.

Fixed the input as well as the wiring: release notes were fetched one page deep, which is right for a patch bump and wrong for a major one — a 5.x → 7.x upgrade is described by the 6.0.0 and 7.0.0 notes, which an active project pushes past the newest fifty tags. fetchSpanReleases pages back until it passes the installed version; collectSpanNotes keeps the x.y.0 boundaries and reports what it dropped, so a partial analysis never reads as complete.

The report is spliced after the tables and before the manifest (which must stay last for the rebase path), and a plan below the confidence floor opens the PR as a draft.

With no key configured the PR is byte-identical to before; a package outside ai.majorUpgrades.packages is listed as not analysed rather than silently passed over; an analysis that throws skips that package rather than blocking the update.

Sign in to comment on this issue.