diff --git a/cc-ci-plan/task-consolidate-recipe-prs.md b/cc-ci-plan/task-consolidate-recipe-prs.md new file mode 100644 index 0000000..5151eb8 --- /dev/null +++ b/cc-ci-plan/task-consolidate-recipe-prs.md @@ -0,0 +1,43 @@ +# Assistant task — consolidate open recipe PRs (one open PR per recipe) + +**Dispatched:** 2026-06-02 by the orchestrator. **Owner:** the Assistant (one-shot). **Not** the +Builder/Adversary loops — they are busy on the regression phase; do not touch their clones. + +## Goal +Every recipe mirror should have **at most ONE open PR**. For any recipe with more than one open PR, +combine them into a single open PR (the union of their changes) and close the rest. + +## Steps + +1. **Survey.** Creds in `/srv/cc-ci/.testenv` (`GITEA_USERNAME`/`GITEA_PASSWORD`/`GITEA_URL`). For every + **recipe** mirror under the `recipe-maintainers` org, list its open PRs: + - `GET /api/v1/orgs/recipe-maintainers/repos?limit=100` + - `GET /api/v1/repos/recipe-maintainers//pulls?state=open` + Recipes = real recipe mirrors only — **exclude** infra repos: `cc-ci`, `cc-ci-orchestrator`, + `cc-ci-secrets`, `archived-*`. Build the list of recipes with **>1** open PR. + +2. **Consolidate** each such recipe into ONE open PR holding the union of the changes, then close the others: + - Work in a **fresh clone** of the mirror (e.g. under `/tmp`). **Never** use the loops' clones + (`/srv/cc-ci/cc-ci`, `/srv/cc-ci/cc-ci-adv`). + - Combine the open PR branches onto one branch (cherry-pick/merge). **Never force-push over unmerged + work** — preserve every change. Prefer **extending the lowest-numbered open PR** by pushing the + combined branch onto its head (the no-force "commit on top" pattern in + `/srv/cc-ci/.claude/skills/recipe-upgrade/open-recipe-pr.sh`). + - **Conflict policy:** two upgrade PRs to different versions → keep the **newest** version. An upgrade + PR + a different-purpose PR (e.g. a backup/restore fix) → include **both** changes. + - **Close** the now-redundant PRs with a comment: `Consolidated into # — one open PR per recipe.` + - **Re-test** the surviving consolidated PR by commenting `!testme` on it (real CI; results show in + the PR; iterate up to 3×). If a genuine pre-existing failure blocks it, leave an explanatory + comment — do **not** weaken/skip/delete any test. + +3. **Report & stop.** Summarise: which recipes had >1 open PR, what you consolidated, the surviving PR + URL per recipe, conflicts resolved, and any PR left red with an explanatory comment. Then go idle + (one-shot — do not loop). + +## Guardrails +- **NEVER merge any PR into `main`** — the operator merges. "Merge them together" = consolidate multiple + open PRs into ONE open PR, **not** merge to main. +- Only touch **recipe mirror** PRs. Do **not** touch cc-ci-repo PRs (build/test PRs). +- Recipes with 0 or 1 open PR: leave untouched. +- Known starting point (re-verify live — state may have changed): `custom-html` had 2 upgrade PRs + (#1 1.12.0, #2 1.13.0); `ghost` had #1 (backup fix) + #2 (upgrade). Survey fresh for the full set.