[PR #2516] [MERGED] ci(bunny-review): retarget review brain to the web monorepo #5634

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/2516
Author: @Romuromylus
Created: 6/7/2026
Status: ✅ Merged
Merged: 6/7/2026
Merged by: @SpicyMarinara

Base: staging ← Head: ci/bunny-review-web-retarget


📝 Commits (1)

  • 4e0db2f ci(bunny-review): retarget review brain to the web monorepo

📊 Changes

3 files changed (+127 additions, -51 deletions)

View changed files

📝 .github/bunny-review/bunny_review.py (+9 -9)
📝 .github/bunny-review/reviewer-prompt.md (+13 -10)
📝 .github/bunny-review/rules.json (+105 -32)

📄 Description

Linked issue

No dedicated tracking issue exists yet for the Bunny rewrite. This builds directly on the base-ref enablement work in #2513 (added staging as an allowed Bunny base ref) and #2514 (the staging to main carry of the same), where @Promansis noted that the tooling itself would still need a rewrite because it was authored against the refactor layout. Happy to open a tracking issue if you would prefer one, @Promansis, since this is your component.

Closes #

Why this change

The Bunny review tooling was built for the refactor (Tauri) tree, so its review brain still describes a codebase that does not exist on staging. rules.json path rules and the reviewer prompt point at src/engine, src/features, src/shared/api, src-tauri, the Rust capability layer, raw invokeTauri, and the in-repo discipline skills (marinara-architecture-guard, marinara-mode-separation, marinara-bugfix-discipline, marinara-getting-started). None of those paths or guidance files are present on the web monorepo (packages/server, packages/client, packages/shared on Fastify + React + Vite), so on staging-based PRs Bunny loads dead path rules and points at guidance docs that are not in the tree.

#2513 / #2514 enabled Bunny to run on staging-based PRs. This PR is the brain retarget @Promansis flagged as the remaining work: it swaps the refactor-specific architecture out of Bunny's review guidance and points it at the web stack and the repo's own docs. I have done the bulk of the rewrite so it is reviewable as a concrete starting point, but the intent is for @Promansis to review, adjust, and own it, since the design (persona, pass structure, output contract) is theirs.

What changed

  • rules.json — replaced the four refactor path groups with eight web path groups: shared contract, client conventions, server conventions, mode separation, generation/prompt/parser pipeline, storage/migrations/import-export, build/CI/deployment, and docs/version-truth/agent-guidance. The path globs now match packages/shared/**, packages/client/**, packages/server/src/**, Dockerfile / Dockerfile.lite, packages/server/src/db/**, and the prompt/parser/generation hot paths. Per-path guidance now points at the repo's own docs (CLAUDE.md, packages/client/.instructions.md, CONTRIBUTING.md, docs/ARCHITECTURE_MAP.md, docs/FRONTEND.md, docs/FILE_STORAGE_MIGRATION.md, the mode docs, docs/installation/containers.md). The severity_policy, nitpick_policy, control_warn_types, and the import/persistence invariant checks (parent-from-child population, pre-scan vs write-loop eligibility, rollback consistency) are kept as-is, since they are codebase-neutral and were the strongest part of the original.
  • reviewer-prompt.md — retargeted the Setup guidance pointers and the high-signal concerns list to the web stack: package boundaries (shared stays runtime-agnostic), the server Pino-logger rule vs the client console.* rule, the @/lib/api-client wrapper vs raw fetch(), the Zustand / React Query split, mode ownership as it exists here, storage/migration/import safety, and the SSE token/event contract. The Bunny / Dottore reviewer voice, the three-pass structure (broad, skeptical specialist, judge), the FINAL_REVIEW JSON output contract, and the bounded-packet protocol are unchanged.
  • bunny_review.py — minimal retarget only. The rules.json-absent guidance fallback markers now match the web packages and point at web docs, and the stale-CI text heuristic now keys off pnpm / build instead of cargo / rust check. No behavior change beyond path and term retargeting; the produce/render/post/status-state machinery is untouched.
  • ci-checks.json — left unchanged. It already lists the real web gating checks (pnpm-validate, container-build-test), which I confirmed against the actual check-run names on a recent staging-based PR.

Validation

  • pnpm check passes locally
  • Container (Docker / Podman) built and ran without issue
  • Ran the app, clicked through the changes manually
  • Checked edge cases (light + dark mode, mobile viewport, empty states, error paths)
  • Above manual verification completed (describe below)
  • Read and followed CONTRIBUTING.md

Manual verification notes

This PR only touches the Bunny review tooling under .github/bunny-review/, so the app-build checkboxes above are not the relevant validation surface and I have left them unticked. What I actually verified:

  • python -m py_compile .github/bunny-review/bunny_review.py succeeds.
  • rules.json and ci-checks.json parse as valid JSON; rules.json deserializes to 8 path groups with the expected schema (name / prefixes / guidance / checks).
  • Confirmed the ci-checks.json names (pnpm-validate, container-build-test) match the real check-run names produced on a recent staging-based PR via gh api .../commits/<sha>/check-runs.
  • Grepped the whole .github/bunny-review/ directory for residual refactor vocabulary (tauri, src-tauri, cargo, rust, src/engine, the discipline-skill paths, the refactor CI check names): none remain.
  • Confirmed every guidance doc referenced by the new rules.json and prompt exists on staging.

What I could not do: I cannot exercise Bunny end-to-end before merge. The reviewer run needs the workflow secrets (OPENAI_API_KEY, LLM_BASE_URL) and the trusted dispatcher, which copies the review brain from the base branch. So the retargeted brain only takes effect once this lands on staging. The safest way to smoke-test it is to merge and watch Bunny's first staging-based review, or run a throwaway PR afterward. I would value @Promansis confirming the guidance and path groups match how Bunny is meant to weight them.

One follow-up I left for you, @Promansis: the trusted bunny-review.yml workflow still has a hardcoded fallback ci-checks.json heredoc with the three refactor check names ("Frontend, Architecture, and Organization", "Rust Capability Layer", "Browser Smoke and Performance"). It is dormant on staging because ci-checks.json is present and non-empty, so the fallback never fires. I deliberately did not touch any workflow file here to keep this diff to the review brain only (and to avoid a workflow-scope change on your dispatchers), but you may want to update that fallback in a separate pass.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed
  • Version/release files updated (only if this PR includes a version bump)

UI evidence (if applicable)

Not applicable; this PR changes CI review tooling only, with no user-facing UI.


🔄 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/2516 **Author:** [@Romuromylus](https://github.com/Romuromylus) **Created:** 6/7/2026 **Status:** ✅ Merged **Merged:** 6/7/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `ci/bunny-review-web-retarget` --- ### 📝 Commits (1) - [`4e0db2f`](https://github.com/Pasta-Devs/Marinara-Engine/commit/4e0db2f3151c8fcff5c62d0512a15657fd0aed07) ci(bunny-review): retarget review brain to the web monorepo ### 📊 Changes **3 files changed** (+127 additions, -51 deletions) <details> <summary>View changed files</summary> 📝 `.github/bunny-review/bunny_review.py` (+9 -9) 📝 `.github/bunny-review/reviewer-prompt.md` (+13 -10) 📝 `.github/bunny-review/rules.json` (+105 -32) </details> ### 📄 Description ## Linked issue No dedicated tracking issue exists yet for the Bunny rewrite. This builds directly on the base-ref enablement work in #2513 (added `staging` as an allowed Bunny base ref) and #2514 (the staging to main carry of the same), where @Promansis noted that the tooling itself would still need a rewrite because it was authored against the refactor layout. Happy to open a tracking issue if you would prefer one, @Promansis, since this is your component. Closes # <!-- intentionally left without an issue number; see note above --> ## Why this change The Bunny review tooling was built for the refactor (Tauri) tree, so its review brain still describes a codebase that does not exist on `staging`. `rules.json` path rules and the reviewer prompt point at `src/engine`, `src/features`, `src/shared/api`, `src-tauri`, the Rust capability layer, raw `invokeTauri`, and the in-repo discipline skills (`marinara-architecture-guard`, `marinara-mode-separation`, `marinara-bugfix-discipline`, `marinara-getting-started`). None of those paths or guidance files are present on the web monorepo (`packages/server`, `packages/client`, `packages/shared` on Fastify + React + Vite), so on `staging`-based PRs Bunny loads dead path rules and points at guidance docs that are not in the tree. #2513 / #2514 enabled Bunny to *run* on `staging`-based PRs. This PR is the brain retarget @Promansis flagged as the remaining work: it swaps the refactor-specific architecture out of Bunny's review guidance and points it at the web stack and the repo's own docs. I have done the bulk of the rewrite so it is reviewable as a concrete starting point, but the intent is for @Promansis to review, adjust, and own it, since the design (persona, pass structure, output contract) is theirs. ## What changed - **`rules.json`** — replaced the four refactor path groups with eight web path groups: shared contract, client conventions, server conventions, mode separation, generation/prompt/parser pipeline, storage/migrations/import-export, build/CI/deployment, and docs/version-truth/agent-guidance. The path globs now match `packages/shared/**`, `packages/client/**`, `packages/server/src/**`, `Dockerfile` / `Dockerfile.lite`, `packages/server/src/db/**`, and the prompt/parser/generation hot paths. Per-path `guidance` now points at the repo's own docs (`CLAUDE.md`, `packages/client/.instructions.md`, `CONTRIBUTING.md`, `docs/ARCHITECTURE_MAP.md`, `docs/FRONTEND.md`, `docs/FILE_STORAGE_MIGRATION.md`, the mode docs, `docs/installation/containers.md`). The `severity_policy`, `nitpick_policy`, `control_warn_types`, and the import/persistence invariant checks (parent-from-child population, pre-scan vs write-loop eligibility, rollback consistency) are kept as-is, since they are codebase-neutral and were the strongest part of the original. - **`reviewer-prompt.md`** — retargeted the Setup guidance pointers and the high-signal concerns list to the web stack: package boundaries (shared stays runtime-agnostic), the server Pino-logger rule vs the client `console.*` rule, the `@/lib/api-client` wrapper vs raw `fetch()`, the Zustand / React Query split, mode ownership as it exists here, storage/migration/import safety, and the SSE token/event contract. The Bunny / Dottore reviewer voice, the three-pass structure (broad, skeptical specialist, judge), the `FINAL_REVIEW` JSON output contract, and the bounded-packet protocol are unchanged. - **`bunny_review.py`** — minimal retarget only. The `rules.json`-absent guidance fallback markers now match the web packages and point at web docs, and the stale-CI text heuristic now keys off `pnpm` / `build` instead of `cargo` / `rust check`. No behavior change beyond path and term retargeting; the produce/render/post/status-state machinery is untouched. - **`ci-checks.json`** — left unchanged. It already lists the real web gating checks (`pnpm-validate`, `container-build-test`), which I confirmed against the actual check-run names on a recent `staging`-based PR. ## Validation - [ ] `pnpm check` passes locally - [ ] Container (Docker / Podman) built and ran without issue - [ ] Ran the app, clicked through the changes manually - [ ] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [ ] Above manual verification completed (describe below) - [ ] Read and followed `CONTRIBUTING.md` ### Manual verification notes This PR only touches the Bunny review tooling under `.github/bunny-review/`, so the app-build checkboxes above are not the relevant validation surface and I have left them unticked. What I actually verified: - `python -m py_compile .github/bunny-review/bunny_review.py` succeeds. - `rules.json` and `ci-checks.json` parse as valid JSON; `rules.json` deserializes to 8 path groups with the expected schema (`name` / `prefixes` / `guidance` / `checks`). - Confirmed the `ci-checks.json` names (`pnpm-validate`, `container-build-test`) match the real check-run names produced on a recent `staging`-based PR via `gh api .../commits/<sha>/check-runs`. - Grepped the whole `.github/bunny-review/` directory for residual refactor vocabulary (`tauri`, `src-tauri`, `cargo`, `rust`, `src/engine`, the discipline-skill paths, the refactor CI check names): none remain. - Confirmed every guidance doc referenced by the new `rules.json` and prompt exists on `staging`. **What I could not do:** I cannot exercise Bunny end-to-end before merge. The reviewer run needs the workflow secrets (`OPENAI_API_KEY`, `LLM_BASE_URL`) and the trusted dispatcher, which copies the review brain from the *base* branch. So the retargeted brain only takes effect once this lands on `staging`. The safest way to smoke-test it is to merge and watch Bunny's first `staging`-based review, or run a throwaway PR afterward. I would value @Promansis confirming the guidance and path groups match how Bunny is meant to weight them. **One follow-up I left for you, @Promansis:** the trusted `bunny-review.yml` workflow still has a hardcoded fallback `ci-checks.json` heredoc with the three refactor check names ("Frontend, Architecture, and Organization", "Rust Capability Layer", "Browser Smoke and Performance"). It is dormant on `staging` because `ci-checks.json` is present and non-empty, so the fallback never fires. I deliberately did not touch any workflow file here to keep this diff to the review brain only (and to avoid a `workflow`-scope change on your dispatchers), but you may want to update that fallback in a separate pass. ## Docs and release impact - [x] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [ ] Version/release files updated (only if this PR includes a version bump) ## UI evidence (if applicable) Not applicable; this PR changes CI review tooling only, with no user-facing UI. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:18:00 +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#5634
No description provided.