recipe-upgrade: reconcile mirror to upstream main + close merged/superseded PRs
Per operator: an open mirror PR must mean "genuinely still open against true current upstream main". On every run the recipe-upgrade flow now: - force-syncs the recipe-maintainers/<recipe> mirror `main` to be IDENTICAL to upstream main (origin/main of the abra checkout = coopcloud); - closes any open mirror PR whose changes are already in upstream main (merged upstream, no-op merge detected via `git merge-tree` vs main's tree) — even when the recipe is up to date (new `--reconcile-only` mode, run in step 1); - when opening a new upgrade PR, closes any other still-open PR for that recipe (superseded) and opens the new one IN ITS PLACE; same-version re-runs just update the existing same-branch PR. open-recipe-pr.sh gains the --reconcile-only mode + the close logic (with an auto-close comment naming the reason). upgrade-all reconciles every candidate's mirror during the survey so merged PRs are closed fleet-wide. Still never merges. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -32,6 +32,17 @@ ssh cc-ci 'export PATH=/run/current-system/sw/bin:$PATH; \
|
||||
Build `RECIPES_TO_UPGRADE` = recipes with a **clean worktree** AND **≥1 available upgrade**. Others go
|
||||
to `SKIPPED_UPFRONT` with a reason (`dirty-worktree`, `up-to-date`, `not-fetchable`).
|
||||
|
||||
**Reconcile every candidate's mirror during the survey** (even the up-to-date ones), so merged-upstream
|
||||
PRs are closed and every mirror `main` tracks true upstream — fleet-wide, not just where there's a new
|
||||
upgrade:
|
||||
```
|
||||
set -a; . /srv/cc-ci/.testenv; set +a
|
||||
ssh cc-ci "GITEA_USERNAME='$GITEA_USERNAME' GITEA_PASSWORD='$GITEA_PASSWORD' GITEA_URL='$GITEA_URL' bash -s <recipe> --reconcile-only" \
|
||||
< /srv/cc-ci/.claude/skills/recipe-upgrade/open-recipe-pr.sh
|
||||
```
|
||||
(The per-recipe `/recipe-upgrade` also reconciles, so this is belt-and-suspenders for skipped recipes —
|
||||
count closed-merged PRs in the summary.)
|
||||
|
||||
## 2. Print the plan
|
||||
A table — Recipe | Status (will upgrade / skipped:reason) | Available upgrade(s) — plus the mode
|
||||
(`Sequential` default / `Parallel`). If `--dry-run`, **stop here**.
|
||||
|
||||
Reference in New Issue
Block a user