diff --git a/.github/workflows/label-pr-review-state.yml b/.github/workflows/label-pr-review-state.yml index 459dcf50bd..eb6d8fb8e1 100644 --- a/.github/workflows/label-pr-review-state.yml +++ b/.github/workflows/label-pr-review-state.yml @@ -313,7 +313,12 @@ jobs: const codeRabbitLogin = 'coderabbitai[bot]'; const codeRabbitLogins = new Set([codeRabbitLogin, 'coderabbitai']); const codeRabbitActiveLabel = 'coderabbit-review-active'; - const codeRabbitEligibleBotLogins = new Set(['zoomote[bot]']); + // CodeRabbit skips bot-authored PRs and no longer approves + // them, so a bot-authored PR can never complete the + // automated-review wait (issue #2867). No bot login is + // eligible today; keep the set so a login can re-enroll + // if automated review for bot PRs returns. + const codeRabbitEligibleBotLogins = new Set([]); // Advisory priority signal only — kept outside stateLabels so it never // replaces or blocks the review-state queue labels. const communityApprovedLabel = 'community-approved'; diff --git a/contrib/roo/roo/commands/release.md b/contrib/roo/roo/commands/release.md index 62f9abe668..9a05669485 100644 --- a/contrib/roo/roo/commands/release.md +++ b/contrib/roo/roo/commands/release.md @@ -85,6 +85,8 @@ mode: code 11. Once the release PR is open and passing checks, get it approved by a reviewer before proceeding. - Do not create the tag until the PR has at least one approval — the publish workflow enforces this automatically and will fail if no approved PR is found for the tagged commit. + - The `Zoo Code / PR review gate` commit status is set by the `Label PR review state` workflow. It turns green when required CI passes and the review sequence completes. Release PRs are bot-authored, so the automated-review wait is skipped for them: a fresh human maintainer approval on the latest commit turns the gate green. + - Fallback rule: if the gate stays pending only because it still waits for automated review, and the release PR is bot-authored with human approval and green required CI, proceed with the tag. This can happen when the release branch predates the gate fix on `main`, because the workflow change only takes effect after it merges and the gate re-runs. 12. After the PR is approved, create the release tag on the release branch tip and push it: diff --git a/src/services/__tests__/pr-review-state-workflow.test.ts b/src/services/__tests__/pr-review-state-workflow.test.ts index af8ad70f3d..a68838a7f0 100644 --- a/src/services/__tests__/pr-review-state-workflow.test.ts +++ b/src/services/__tests__/pr-review-state-workflow.test.ts @@ -788,16 +788,18 @@ describe("PR review-state workflow", () => { expect(latestGuide(result)).toContain("Review-state labels are managed by this workflow") }) - it("starts CodeRabbit for zoomote-authored PRs after required CI passes", async () => { + it("routes zoomote-authored PRs directly to maintainer review", async () => { const result = await runWorkflow({ prAuthor: { login: "zoomote[bot]", type: "Bot" }, }) - expect(result.addLabels).toHaveBeenCalledWith(expect.objectContaining({ labels: ["coderabbit-review-active"] })) - expect(result.addLabels).toHaveBeenCalledWith(expect.objectContaining({ labels: ["awaiting-coderabbit"] })) - expect(latestGateStatus(result)?.state).toBe("pending") - expect(latestGateStatus(result)?.description).toContain("Waiting for automated review") - expect(result.info).toHaveBeenCalledWith(expect.stringContaining("coderabbit=pending")) + expect(result.addLabels).toHaveBeenCalledWith(expect.objectContaining({ labels: ["awaiting-maintainer"] })) + expect(result.addLabels).not.toHaveBeenCalledWith( + expect.objectContaining({ labels: ["coderabbit-review-active"] }), + ) + expect(latestGateStatus(result)?.state).toBe("success") + expect(latestGateStatus(result)?.description).toContain("Awaiting fresh human maintainer") + expect(result.info).toHaveBeenCalledWith(expect.stringContaining("coderabbit=optional")) }) it("does not start CodeRabbit for draft zoomote-authored PRs", async () => { @@ -855,6 +857,24 @@ describe("PR review-state workflow", () => { expect(latestGateStatus(result)?.state).toBe("success") }) + it("completes zoomote-authored release review after human maintainer approval", async () => { + const result = await runWorkflow({ + prAuthor: { login: "zoomote[bot]", type: "Bot" }, + permissions: { maintainer: "write" }, + reviews: [ + { + login: "maintainer", + type: "User", + state: "APPROVED", + submittedAt: REVIEWED_AT, + }, + ], + }) + + expect(latestGateStatus(result)?.state).toBe("success") + expect(latestGateStatus(result)?.description).toContain("The required review sequence passed") + }) + it("honors manually requested CodeRabbit changes on bot-authored PRs", async () => { const result = await runWorkflow({ prAuthor: { login: "dependabot[bot]", type: "Bot" },