From 5394c324af0a19ecc1c8fdf1d292db5d9a0b8330 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 20 Apr 2026 12:31:29 +0000 Subject: [PATCH 1/6] Initial plan From e43bccf4ae847f3e2375726034d79863323273b9 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 20 Apr 2026 12:37:15 +0000 Subject: [PATCH 2/6] integration-batch: label integration PR when snapshots were auto-updated Agent-Logs-Url: https://github.com/rockcarver/frodo-cli/sessions/8f69d39c-9bb8-4dd7-97ac-de057fae5ee7 Co-authored-by: vscheuber <28791378+vscheuber@users.noreply.github.com> --- .github/workflows/integration-batch.yml | 8 +++++++- docs/INTEGRATION.md | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/integration-batch.yml b/.github/workflows/integration-batch.yml index eac45447d..50c9610c2 100644 --- a/.github/workflows/integration-batch.yml +++ b/.github/workflows/integration-batch.yml @@ -242,8 +242,14 @@ jobs: existing="$(gh pr list --repo "$REPO" --state open --head integration --base main --json number --jq '.[0].number // empty')" if [ -n "$existing" ]; then gh pr edit "$existing" --repo "$REPO" --title "integration" --body "$body" + integration_pr_number="$existing" else - gh pr create --repo "$REPO" --head integration --base main --title "integration" --body "$body" + created_pr_url="$(gh pr create --repo "$REPO" --head integration --base main --title "integration" --body "$body")" + integration_pr_number="${created_pr_url##*/}" + fi + + if echo "$snapshot_updates" | jq -e '.files | length > 0' >/dev/null; then + gh pr edit "$integration_pr_number" --repo "$REPO" --add-label integration-needs-snapshot-review fi - name: Job summary diff --git a/docs/INTEGRATION.md b/docs/INTEGRATION.md index f15e4559a..e9699242c 100644 --- a/docs/INTEGRATION.md +++ b/docs/INTEGRATION.md @@ -7,6 +7,7 @@ The [`integration-batch` workflow](../.github/workflows/integration-batch.yml) a - `integration-batch`: PR is queued for integration batching. - `integrated`: PR was successfully merged into the `integration` branch by automation. - `integration-failed`: automation attempted integration but hit a merge conflict. +- `integration-needs-snapshot-review`: generated `integration -> main` PR where snapshot auto-recovery updated snapshot files. ## Selection rules From 3d2fed8164d8ba53a68d506664092f3823fe33fa Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 20 Apr 2026 12:38:55 +0000 Subject: [PATCH 3/6] integration-batch: robustly resolve integration PR number before labeling Agent-Logs-Url: https://github.com/rockcarver/frodo-cli/sessions/8f69d39c-9bb8-4dd7-97ac-de057fae5ee7 Co-authored-by: vscheuber <28791378+vscheuber@users.noreply.github.com> --- .github/workflows/integration-batch.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/integration-batch.yml b/.github/workflows/integration-batch.yml index 50c9610c2..5987024fd 100644 --- a/.github/workflows/integration-batch.yml +++ b/.github/workflows/integration-batch.yml @@ -244,8 +244,8 @@ jobs: gh pr edit "$existing" --repo "$REPO" --title "integration" --body "$body" integration_pr_number="$existing" else - created_pr_url="$(gh pr create --repo "$REPO" --head integration --base main --title "integration" --body "$body")" - integration_pr_number="${created_pr_url##*/}" + gh pr create --repo "$REPO" --head integration --base main --title "integration" --body "$body" + integration_pr_number="$(gh pr list --repo "$REPO" --state open --head integration --base main --json number --jq '.[0].number // empty')" fi if echo "$snapshot_updates" | jq -e '.files | length > 0' >/dev/null; then From d32e94485859afae62c638fb05bc80eadfdbfab8 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 20 Apr 2026 12:40:02 +0000 Subject: [PATCH 4/6] integration-batch: parse created PR URL for reliable label targeting Agent-Logs-Url: https://github.com/rockcarver/frodo-cli/sessions/8f69d39c-9bb8-4dd7-97ac-de057fae5ee7 Co-authored-by: vscheuber <28791378+vscheuber@users.noreply.github.com> --- .github/workflows/integration-batch.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/integration-batch.yml b/.github/workflows/integration-batch.yml index 5987024fd..264756ba0 100644 --- a/.github/workflows/integration-batch.yml +++ b/.github/workflows/integration-batch.yml @@ -244,8 +244,11 @@ jobs: gh pr edit "$existing" --repo "$REPO" --title "integration" --body "$body" integration_pr_number="$existing" else - gh pr create --repo "$REPO" --head integration --base main --title "integration" --body "$body" - integration_pr_number="$(gh pr list --repo "$REPO" --state open --head integration --base main --json number --jq '.[0].number // empty')" + created_pr_url="$(gh pr create --repo "$REPO" --head integration --base main --title "integration" --body "$body")" + integration_pr_number="$(echo "$created_pr_url" | sed -E 's#^https://github.com/[^/]+/[^/]+/pull/([0-9]+)([?#].*)?$#\1#')" + if ! [[ "$integration_pr_number" =~ ^[0-9]+$ ]]; then + integration_pr_number="$(gh pr list --repo "$REPO" --state open --head integration --base main --json number --jq '.[0].number // empty')" + fi fi if echo "$snapshot_updates" | jq -e '.files | length > 0' >/dev/null; then From b892ce587799650fa3c6b4759b74d365a41fc929 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 20 Apr 2026 12:40:55 +0000 Subject: [PATCH 5/6] integration-batch: retry integration PR lookup after create Agent-Logs-Url: https://github.com/rockcarver/frodo-cli/sessions/8f69d39c-9bb8-4dd7-97ac-de057fae5ee7 Co-authored-by: vscheuber <28791378+vscheuber@users.noreply.github.com> --- .github/workflows/integration-batch.yml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/integration-batch.yml b/.github/workflows/integration-batch.yml index 264756ba0..81feb6873 100644 --- a/.github/workflows/integration-batch.yml +++ b/.github/workflows/integration-batch.yml @@ -244,10 +244,18 @@ jobs: gh pr edit "$existing" --repo "$REPO" --title "integration" --body "$body" integration_pr_number="$existing" else - created_pr_url="$(gh pr create --repo "$REPO" --head integration --base main --title "integration" --body "$body")" - integration_pr_number="$(echo "$created_pr_url" | sed -E 's#^https://github.com/[^/]+/[^/]+/pull/([0-9]+)([?#].*)?$#\1#')" - if ! [[ "$integration_pr_number" =~ ^[0-9]+$ ]]; then + gh pr create --repo "$REPO" --head integration --base main --title "integration" --body "$body" + integration_pr_number="" + for _ in 1 2 3 4 5; do integration_pr_number="$(gh pr list --repo "$REPO" --state open --head integration --base main --json number --jq '.[0].number // empty')" + if [[ "$integration_pr_number" =~ ^[0-9]+$ ]]; then + break + fi + sleep 2 + done + if ! [[ "$integration_pr_number" =~ ^[0-9]+$ ]]; then + echo "Unable to resolve integration PR number after creation" >&2 + exit 1 fi fi From 828bdf0832f1c34954516b1805d5dbe8a912ce0a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 20 Apr 2026 12:41:40 +0000 Subject: [PATCH 6/6] integration-batch: improve integration PR lookup retry diagnostics Agent-Logs-Url: https://github.com/rockcarver/frodo-cli/sessions/8f69d39c-9bb8-4dd7-97ac-de057fae5ee7 Co-authored-by: vscheuber <28791378+vscheuber@users.noreply.github.com> --- .github/workflows/integration-batch.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/integration-batch.yml b/.github/workflows/integration-batch.yml index 81feb6873..e74344cd8 100644 --- a/.github/workflows/integration-batch.yml +++ b/.github/workflows/integration-batch.yml @@ -246,7 +246,8 @@ jobs: else gh pr create --repo "$REPO" --head integration --base main --title "integration" --body "$body" integration_pr_number="" - for _ in 1 2 3 4 5; do + max_attempts=5 + for _ in $(seq 1 "$max_attempts"); do integration_pr_number="$(gh pr list --repo "$REPO" --state open --head integration --base main --json number --jq '.[0].number // empty')" if [[ "$integration_pr_number" =~ ^[0-9]+$ ]]; then break @@ -254,7 +255,7 @@ jobs: sleep 2 done if ! [[ "$integration_pr_number" =~ ^[0-9]+$ ]]; then - echo "Unable to resolve integration PR number after creation" >&2 + echo "Unable to resolve integration PR number after $max_attempts retry attempts" >&2 exit 1 fi fi