[PR #1925] [MERGED] Fix Bunny review CI state handling #5350

Closed
opened 2026-10-22 04:15:28 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/1925
Author: @Promansis
Created: 6/2/2026
Status: ✅ Merged
Merged: 6/2/2026
Merged by: @Promansis

Base: refactor ← Head: fix/bunny-review-ci


📝 Commits (5)

  • d86f260 Fix remote storage write guard parity
  • 062f4e5 Merge remote-tracking branch 'upstream/refactor' into resolve-pr-1906
  • eeadc7f Fix Bunny review CI state handling
  • cf9b9d3 Refine Bunny review metadata labels
  • 711aa59 Allow Bunny review on draft PRs

📊 Changes

5 files changed (+318 additions, -188 deletions)

View changed files

📝 .github/bunny-review/bunny_review.py (+170 -54)
📝 .github/workflows/bunny-review-auto.yml (+2 -3)
📝 .github/workflows/bunny-review.yml (+28 -40)
📝 src-tauri/src/commands/storage/commands/entities.rs (+2 -7)
📝 src-tauri/src/http_dispatch.rs (+116 -84)

📄 Description

Summary

Fixes Bunny Review CI state handling, PR status reporting, and draft PR coverage.

  • keeps incremental review pinned to the actual current PR head before building the review packet
  • ignores failed/unexamined Bunny comments when choosing the last reviewed SHA
  • falls back to full review after force-push when the previous reviewed SHA is no longer an ancestor
  • posts a Bunny Review commit status on the PR head instead of relying on a custom check-run
  • retries one schema-repair turn when the model response is not JSON
  • renders failed model reviews as unexamined rather than implying clean no-findings review
  • removes the implementation-handoff prose from repair prompts
  • changes the review note label from Commit to Head, and includes a subject on Base when resolvable
  • allows automatic Bunny dispatch on draft PRs targeting refactor

Why

The previous workflow could stamp the latest PR SHA while reviewing an older checkout, advance incremental state after failed model runs, and fail to show Bunny as a PR-head status/check. Draft PRs were also skipped by the auto-dispatch gate, which meant Bunny would not run until the PR became ready for review.

Validation

Local:

  • python3 -m py_compile .github/bunny-review/bunny_review.py
  • Python AST parse for .github/bunny-review/bunny_review.py
  • local render harness for failed-review state, nitpick validation, repair-prompt text, and metadata labels
  • node scripts/check-workflow-names.mjs
  • git diff --check

Live fork test PRs targeting Promansis:fix/bunny-review-ci:

Upstream note

The code and workflow are repository-agnostic, but automatic dispatch still depends on upstream Actions token policy. If upstream has read-only workflow tokens, the pull_request_target dispatcher can still be blocked from gh workflow run until upstream allows write tokens or uses an app/PAT-backed dispatch path.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/1925 **Author:** [@Promansis](https://github.com/Promansis) **Created:** 6/2/2026 **Status:** ✅ Merged **Merged:** 6/2/2026 **Merged by:** [@Promansis](https://github.com/Promansis) **Base:** `refactor` ← **Head:** `fix/bunny-review-ci` --- ### 📝 Commits (5) - [`d86f260`](https://github.com/Pasta-Devs/Marinara-Engine/commit/d86f2605b68f51aace383192ab8ef8a440b7b4e1) Fix remote storage write guard parity - [`062f4e5`](https://github.com/Pasta-Devs/Marinara-Engine/commit/062f4e5f988d8b7e984816171642b913a22592d3) Merge remote-tracking branch 'upstream/refactor' into resolve-pr-1906 - [`eeadc7f`](https://github.com/Pasta-Devs/Marinara-Engine/commit/eeadc7f351baca8afe5945e19332cdedb733e35f) Fix Bunny review CI state handling - [`cf9b9d3`](https://github.com/Pasta-Devs/Marinara-Engine/commit/cf9b9d3d972c10408f4f03bc7fdc874729f7abd3) Refine Bunny review metadata labels - [`711aa59`](https://github.com/Pasta-Devs/Marinara-Engine/commit/711aa59b0ad20c56cb15be27000cc752bb92008a) Allow Bunny review on draft PRs ### 📊 Changes **5 files changed** (+318 additions, -188 deletions) <details> <summary>View changed files</summary> 📝 `.github/bunny-review/bunny_review.py` (+170 -54) 📝 `.github/workflows/bunny-review-auto.yml` (+2 -3) 📝 `.github/workflows/bunny-review.yml` (+28 -40) 📝 `src-tauri/src/commands/storage/commands/entities.rs` (+2 -7) 📝 `src-tauri/src/http_dispatch.rs` (+116 -84) </details> ### 📄 Description ## Summary Fixes Bunny Review CI state handling, PR status reporting, and draft PR coverage. - keeps incremental review pinned to the actual current PR head before building the review packet - ignores failed/unexamined Bunny comments when choosing the last reviewed SHA - falls back to full review after force-push when the previous reviewed SHA is no longer an ancestor - posts a `Bunny Review` commit status on the PR head instead of relying on a custom check-run - retries one schema-repair turn when the model response is not JSON - renders failed model reviews as unexamined rather than implying clean no-findings review - removes the implementation-handoff prose from repair prompts - changes the review note label from `Commit` to `Head`, and includes a subject on `Base` when resolvable - allows automatic Bunny dispatch on draft PRs targeting `refactor` ## Why The previous workflow could stamp the latest PR SHA while reviewing an older checkout, advance incremental state after failed model runs, and fail to show Bunny as a PR-head status/check. Draft PRs were also skipped by the auto-dispatch gate, which meant Bunny would not run until the PR became ready for review. ## Validation Local: - `python3 -m py_compile .github/bunny-review/bunny_review.py` - Python AST parse for `.github/bunny-review/bunny_review.py` - local render harness for failed-review state, nitpick validation, repair-prompt text, and metadata labels - `node scripts/check-workflow-names.mjs` - `git diff --check` Live fork test PRs targeting `Promansis:fix/bunny-review-ci`: - Promansis/Marinara-Engine#44 verified `Bunny Review` status context appears on the PR head and clean full review completes - Promansis/Marinara-Engine#45 verified full fallback after rebase/force-push, then incremental mode with `Head`/`Base` labels and base subject - Promansis/Marinara-Engine#46 verified a real code nitpick is emitted and rendered as `NITPICK` - Promansis/Marinara-Engine#47 verified the draft PR workflow file loads; the dispatcher still skipped there because the safety gate only dispatches for PRs targeting `refactor` ## Upstream note The code and workflow are repository-agnostic, but automatic dispatch still depends on upstream Actions token policy. If upstream has read-only workflow tokens, the `pull_request_target` dispatcher can still be blocked from `gh workflow run` until upstream allows write tokens or uses an app/PAT-backed dispatch path. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:15:28 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#5350
No description provided.