Skip to content

ci: improve PR label reconciliation with CI gating and event triggers#228

Merged
edelauna merged 2 commits into
mainfrom
roomote/repro-204-zoocode-e2e-followup
Jun 30, 2026
Merged

ci: improve PR label reconciliation with CI gating and event triggers#228
edelauna merged 2 commits into
mainfrom
roomote/repro-204-zoocode-e2e-followup

Conversation

@roomote

@roomote roomote Bot commented May 21, 2026

Copy link
Copy Markdown
Contributor

What problem this solves

The existing label-pr-review-state workflow had several gaps in its state machine:

  • awaiting-review was only reachable via one narrow path (change-requester re-requested after author pushed), leaving new PRs, draft→ready transitions, and comment-only reviews unlabeled
  • DISMISSED reviews incorrectly counted as active CHANGES_REQUESTED, blocking awaiting-review when they shouldn't
  • The workflow ran hourly only — labels could be stale for up to 60 minutes after author/reviewer actions
  • No CI awareness: reviewers could be tagged on PRs with failing or still-running CI

What changed

State machine overhaul:

  • Draft PRs always strip both state labels
  • CI pending/running → strip labels, wait (don't assign reviewers prematurely)
  • CI failed/errored → strip labels (CI is the signal, not the label)
  • CI passing + no outstanding change requests → awaiting-review (new default)
  • CI passing + unaddressed CHANGES_REQUESTEDawaiting-author
  • CI passing + all approved, no pending reviewers → no label

Bug fixes:

  • DISMISSED reviews are now treated as neutral (excluded from the latest-state map), not as active change requests
  • checks.listForRef is now paginated (was capped at 100 runs, silently missing failed checks on large matrix builds)
  • Commit status error state now correctly treated as CI failure (was only checking failure)
  • removeLabel 404s are swallowed as benign (label already gone)
  • Octokit error details (status, response.data.message) now included in failure logs

Event triggers added:

  • pull_request: opened, reopened, ready_for_review, synchronize, review_requested
  • pull_request_review: submitted, dismissed
  • Event-triggered runs reconcile only the single PR from the payload; hourly cron remains as a full-sweep fallback

Observability:

  • core.info on every decision path (draft / CI-pending / CI-failed / label chosen)
  • core.debug for individual check run details
  • Removed label loop extracted into reconcileLabels(pr, desiredLabel) helper, also handling stale-awaiting-author cleanup

Behavior change note

stale-awaiting-author is now stripped on draft and CI-pending/failed paths (previously only stripped post-CI-passing). A PR with failing CI that then goes silent will fall out of stale-tracking — which is the correct behavior since failing-CI PRs shouldn't wear stale labels.

@roomote roomote Bot added the roomote:auto-resolve-conflicts Allow Roomote to auto-resolve merge conflicts for this PR label May 21, 2026
@roomote

roomote Bot commented May 21, 2026

Copy link
Copy Markdown
Contributor Author

2 issues outstanding. Action required. See task

  • apps/vscode-e2e/src/runTest.ts now provisions the multi-root workspace for the default unfiltered mock-suite path as well as targeted multi-root runs, so the new suite no longer falls back to a single-root workspace in e2e-mock.
  • apps/vscode-e2e/src/runTest.ts now enables the two-root workspace for every unfiltered test:ci:mock run, and e2e-mock is red in src/suite/tools/execute-command.test.ts because those suites still assume the default single-root workspace. — resolved on the rebased head 430d19c09634cb51a28a1810fc22b786ab210784; local pnpm --filter @roo-code/vscode-e2e test:ci:mock passes and the fresh GitHub e2e-mock rerun is green.
  • platform-unit-test (windows-latest) was still pending after the 10-minute watch cap, so this sync review could not confirm the latest update is green on that lane yet. — resolved after rebasing onto #225; both platform-unit-test (ubuntu-latest) and platform-unit-test (windows-latest) are green on 430d19c09634cb51a28a1810fc22b786ab210784.
  • apps/cli/src/lib/storage/settings.ts now returns persisted CLI settings without migrating legacy provider: "roo" / onboardingProviderChoice: "roo" values, so upgrading an existing CLI install can now fail at startup with Invalid provider: roo before the default-provider fallback or onboarding path runs.
  • platform-unit-test (windows-latest) was still pending after the 10-minute watch cap on abe85a31f797a0724006057368db142d0bb9f663, so this sync review still cannot confirm the latest update is green on that lane yet.

Comment thread apps/vscode-e2e/src/runTest.ts Outdated
@codecov

codecov Bot commented May 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@roomote

roomote Bot commented May 21, 2026

Copy link
Copy Markdown
Contributor Author

Rebased and force-pushed 430d19c09 on #228.

What changed:

  • rebased roomote/repro-204-zoocode-e2e-followup onto the latest #225 base commit d4df00b6e, so the follow-up PR now carries the current Windows-path fixes from the product branch
  • kept the #228 diff itself unchanged: the branch still only contains the multi-root e2e fixture and runner follow-up under apps/vscode-e2e

Validation:

  • pnpm --filter @roo-code/vscode-e2e test:ci:mock
  • pnpm --dir apps/web-roo-code test

Visual proof: not applicable for this change because it only rebases the e2e/harness follow-up branch.

Final CI state on 430d19c09: e2e-mock, Analyze, check-translations, compile, knip, CodeQL, codecov/patch, platform-unit-test (ubuntu-latest), and platform-unit-test (windows-latest) are all green.

Comment thread apps/vscode-e2e/src/runTest.ts Outdated
@roomote
roomote Bot force-pushed the roomote/repro-204-zoocode-e2e-followup branch from 9bf3bb5 to 430d19c Compare May 21, 2026 13:26
@roomote

roomote Bot commented May 27, 2026

Copy link
Copy Markdown
Contributor Author

I see some merge conflicts here. Working on them now...

@edelauna
edelauna force-pushed the roomote/repro-204-zoocode-e2e branch from 8a98d56 to 5053feb Compare June 7, 2026 03:15
@roomote

roomote Bot commented Jun 7, 2026

Copy link
Copy Markdown
Contributor Author

I detected merge conflicts but could not start a task to address them.

@roomote

roomote Bot commented Jun 7, 2026

Copy link
Copy Markdown
Contributor Author

This PR has merge conflicts that need to be resolved.

2 similar comments
@roomote

roomote Bot commented Jun 7, 2026

Copy link
Copy Markdown
Contributor Author

This PR has merge conflicts that need to be resolved.

@roomote

roomote Bot commented Jun 7, 2026

Copy link
Copy Markdown
Contributor Author

This PR has merge conflicts that need to be resolved.

Base automatically changed from roomote/repro-204-zoocode-e2e to main June 8, 2026 00:53
@roomote

roomote Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor Author

I detected merge conflicts but could not start a task to address them.

2 similar comments
@roomote

roomote Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor Author

I detected merge conflicts but could not start a task to address them.

@roomote

roomote Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor Author

I detected merge conflicts but could not start a task to address them.

@roomote

roomote Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor Author

This PR has merge conflicts that need to be resolved.

4 similar comments
@roomote

roomote Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor Author

This PR has merge conflicts that need to be resolved.

@roomote

roomote Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor Author

This PR has merge conflicts that need to be resolved.

@roomote

roomote Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor Author

This PR has merge conflicts that need to be resolved.

@roomote

roomote Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor Author

This PR has merge conflicts that need to be resolved.

@roomote

roomote Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor Author

I detected merge conflicts but could not start a task to address them.

@roomote

roomote Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor Author

This PR has merge conflicts that need to be resolved.

1 similar comment
@roomote

roomote Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor Author

This PR has merge conflicts that need to be resolved.

@roomote

roomote Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor Author

I detected merge conflicts but could not start a task to address them.

@roomote

roomote Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor Author

This PR has merge conflicts that need to be resolved.

1 similar comment
@roomote

roomote Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor Author

This PR has merge conflicts that need to be resolved.

@roomote

roomote Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor Author

I detected merge conflicts but could not start a task to address them.

@roomote

roomote Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor Author

I detected merge conflicts but could not start a task to address them.

2 similar comments
@roomote

roomote Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor Author

I detected merge conflicts but could not start a task to address them.

@roomote

roomote Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor Author

I detected merge conflicts but could not start a task to address them.

@roomote

roomote Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor Author

This PR has merge conflicts that need to be resolved.

@roomote

roomote Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor Author

I detected merge conflicts but could not start a task to address them.

@roomote

roomote Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor Author

This PR has merge conflicts that need to be resolved.

4 similar comments
@roomote

roomote Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor Author

This PR has merge conflicts that need to be resolved.

@roomote

roomote Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor Author

This PR has merge conflicts that need to be resolved.

@roomote

roomote Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor Author

This PR has merge conflicts that need to be resolved.

@roomote

roomote Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor Author

This PR has merge conflicts that need to be resolved.

@roomote

roomote Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor Author

I detected merge conflicts but could not start a task to address them.

@edelauna
edelauna force-pushed the roomote/repro-204-zoocode-e2e-followup branch from abe85a3 to 617ff95 Compare June 30, 2026 02:32
@edelauna
edelauna marked this pull request as ready for review June 30, 2026 02:46
@edelauna edelauna changed the title [Chore] Isolate multi-root e2e coverage from the #204 fix ci: improve PR label reconciliation with CI gating and event triggers Jun 30, 2026
@github-actions github-actions Bot added the awaiting-review PR changes are ready and waiting for maintainer re-review label Jun 30, 2026
@edelauna
edelauna added this pull request to the merge queue Jun 30, 2026
@edelauna
edelauna removed this pull request from the merge queue due to a manual request Jun 30, 2026
@edelauna
edelauna added this pull request to the merge queue Jun 30, 2026
Merged via the queue into main with commit 80fb159 Jun 30, 2026
12 checks passed
@edelauna
edelauna deleted the roomote/repro-204-zoocode-e2e-followup branch June 30, 2026 03:22
hacker-b2k pushed a commit to hacker-b2k/Zoo-Code that referenced this pull request Jul 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting-review PR changes are ready and waiting for maintainer re-review roomote:auto-resolve-conflicts Allow Roomote to auto-resolve merge conflicts for this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant