Skip to content

chore: review workflow supports merge conflicts — Phase A0 before CI failures - #220

Merged
mhenrixon merged 2 commits into
mainfrom
chore/review-pr-merge-conflicts
Jul 9, 2026
Merged

chore: review workflow supports merge conflicts — Phase A0 before CI failures#220
mhenrixon merged 2 commits into
mainfrom
chore/review-pr-merge-conflicts

Conversation

@mhenrixon

Copy link
Copy Markdown
Collaborator

Summary

/github-review-pr gains Phase A0: merge conflicts, running BEFORE the CI-failures phase — CI results only matter for the code that will actually merge, and resolving conflicts first means failure diagnosis reads the post-merge reality (one extra CI cycle instead of two).

  • Detection: gh pr view --json mergeable with a local git merge-tree --write-tree fallback for the sticky UNKNOWN state (no polling).
  • Resolution: merge the base in (never rebase — the branch is shared; git-workflow.md forbids the force-push a rebase needs), resolve semantically, with repo-specific rules:
    • generated client artifacts (*.min.js, maps, spec/dummy/public/vendor/*.js): never hand-merge — resolve the source, rake build:js, re-sync (the existing guards catch violations)
    • CHANGELOG.md Unreleased: union both sides
    • lib/phlex/reactive/version.rb: base wins (releases bump on main via rake release)
    • docs/Gemfile.lock (the only tracked lockfile): base wins, then bundle install in docs/
    • append-only registries (doc.rb, routes): keep both lines
  • Verification gates before pushing the merge commit; a merge push never needs force.
  • Loop-back rule: a conflict appearing mid-pass returns to Phase A0 (mirrors the existing Phase B → A loop); Phase C reports conflict resolution + final mergeability; an already-MERGED PR short-circuits.
  • /github-review-failures gets a pre-flight mergeability guard pointing at Phase A0.
  • allowed-tools extended for the new git/rake/bun invocations.

Test plan

Doc-only change to two command runbooks; exercised by the next /github-review-pr run. An adversarial verification pass (repo-rule consistency + scenario probing) runs in the background — any findings land as a follow-up commit on this PR.

Deviations & judgment calls

  • The gem root's Gemfile.lock is gitignored — the lockfile rule names only docs/Gemfile.lock (verified via git ls-files).
  • Merge over rebase is a hard rule here, derived from git-workflow.md's never-force-push-shared-branches; documented as such rather than left to taste.

mhenrixon added 2 commits July 9, 2026 10:00
…failures

/github-review-pr gains a conflicts-first phase: detect via mergeable (with a
local git merge-tree fallback for the sticky UNKNOWN state), merge the base in
(never rebase a shared branch), resolve semantically with repo-specific rules
(regenerate min.js + vendored twins from source, union CHANGELOG entries, base
wins version.rb, base + bundle install for docs/Gemfile.lock, keep both sides
of append-only registries), gate before pushing. Loop-back rules, final-report
sections, and a pre-flight guard in /github-review-failures included; a
merged PR now short-circuits with a report instead of a phantom review.
- UNKNOWN fallback now tests the PR's ACTUAL head (fetch pull/<PR>/head +
  merge-tree against FETCH_HEAD), verifies both refs resolve first (a bad ref
  also exits 1 — exit code alone is untrustworthy), and reads --name-only
  output as the work list; checkout moved to the resolution procedure's start.
- version.rb rule inverted where it matters: releases land direct-to-main via
  rake release, so a version.rb conflict means the BRANCH bumped on purpose —
  keep the branch's bump or ask, never silently revert a release-prep PR.
- Vendored-artifact rule scoped to the FIVE generated twins from the sync
  spec's map; stimulus/turbo/shims/dummy reducers are ordinary sources.
- Docs gate cites the canonical rake lint (bare rubocop in docs/ inspects 0
  files); allowed-tools now covers everything Phase A0 runs (gh pr checkout,
  git switch/rev-parse, bundle install, cp, cd).
- /github-review-failures pre-flight reduced to detection-only + hand-off —
  its own toolset can't run the resolution, by design.
@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 26 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: b6603e1b-137a-400d-acf3-36ecfd15452b

📥 Commits

Reviewing files that changed from the base of the PR and between 0d9b593 and 93187a4.

📒 Files selected for processing (2)
  • .claude/commands/github-review-failures.md
  • .claude/commands/github-review-pr.md

Comment @coderabbitai help to get the list of available commands.

@mhenrixon mhenrixon self-assigned this Jul 9, 2026
@mhenrixon mhenrixon added the enhancement New feature or request label Jul 9, 2026
@mhenrixon
mhenrixon merged commit 0dbbc8e into main Jul 9, 2026
11 checks passed
@mhenrixon
mhenrixon deleted the chore/review-pr-merge-conflicts branch July 9, 2026 08:35
mhenrixon added a commit to zoolutions/daisyui that referenced this pull request Jul 9, 2026
…failures (#35)

* chore: review workflow supports merge conflicts — Phase A0 before CI failures

Backport of zoolutions/phlex-reactive#220, adapted to this repo:

- New /github-review-pr orchestrator: Phase A0 (merge conflicts) runs
  before CI failures, which run before review comments. Detection via
  gh pr view --json mergeable with a local git merge-tree fallback that
  tests the PR's actual head (git fetch origin pull/<PR>/head +
  FETCH_HEAD), ref verification before trusting exit codes, and the
  --name-only conflict list as the work list. Resolution is
  merge-never-rebase with repo-specific semantic rules.
- /github-ci-failures gains a detection-only merge-conflict pre-flight
  that hands off to the orchestrator, plus a check-name table matching
  the actual CI jobs (Lint, Gem Tests, Docs Lint, Docs Tests).
- allowed-tools frontmatter now covers every command each runbook
  instructs (gh pr list/checkout, git fetch/merge/merge-tree/rev-parse/
  status/switch, bundle install, bun, docs bin/rubocop).

* fix: address backport verification findings
mhenrixon added a commit to zoolutions/pgbus that referenced this pull request Jul 9, 2026
…failures (#349)

* chore: review workflow supports merge conflicts — Phase A0 before CI failures

Backport of zoolutions/phlex-reactive#220 adapted to pgbus.

/github-review-pr gains Phase A0: detect conflicts via gh pr view
--json mergeable with a local git-merge-tree fallback against the
PR's actual head (fetch pull/<PR>/head, verify refs before trusting
exit codes), then resolve with a merge (never rebase), semantic
per-file rules adapted to this repo (CHANGELOG union, version.rb
stays with base per RELEASING.md, frozen lockfiles never bundle
lock'd, compiled style.css + vendored turbo/apexcharts never
hand-merged, append-only registries), CI-mirroring verification
gates, and a plain push. Phase C re-checks mergeability; new
conflicts loop back to A0.

/github-review-failures gains a detection-only pre-flight that
hands CONFLICTING PRs to the orchestrator, and its check-name
table now matches main.yml's actual job names.

* fix: address backport verification findings

The style.css conflict rule instructed regenerating with the Tailwind
CLI, but pgbus ships no build tooling for the dashboard CSS (no
tailwindcss dep in the root package.json, no rake/bin task; docs/'s CLI
is a newer version wired to the docs app). Soften the rule to the
vendor-file treatment — resolve the source, take one side of the
compiled file whole — and name the exact ad-hoc regeneration command
(version-pinned bunx) for the both-sides-changed case, adding
Bash(bunx:*) to allowed-tools so it is executable.
mhenrixon added a commit to zoolutions/sidekiq-unique-jobs that referenced this pull request Jul 9, 2026
…failures (#973)

* chore: review workflow supports merge conflicts — Phase A0 before CI failures

Backport of zoolutions/phlex-reactive#220 adapted to this repo.

- New /github-review-pr orchestrator: Phase A0 detects conflicts via
  gh pr view --json mergeable with a local git merge-tree fallback
  against the PR's actual head (git fetch origin pull/<PR>/head +
  FETCH_HEAD, refs verified before trusting exit codes), resolves by
  MERGE (never rebase), and gates the push on rubocop + the touched
  specs.
- Repo-specific resolution rules: generated CHANGELOG.md
  (github_changelog_generator) and doc/ (YARD) are never hand-merged;
  version.rb conflicts mean a deliberate release-prep bump (releases
  land directly on main via rake release); myapp/Gemfile.lock and
  myapp/bun.lock re-resolve via bundle/bun install; Lua sources merge
  semantically with the script + lock specs as the gate.
- github-ci-failures.md renamed to github-review-failures.md (the name
  the orchestrator invokes) and given a detection-only merge-conflict
  pre-flight that hands off to /github-review-pr.
- github-review-comments.md unchanged — #220 did not touch it and the
  existing copy is already adapted to this repo.

* fix: address backport verification findings

- github-review-failures.md: add Bash(gh pr list:*) and Bash(git branch:*)
  to allowed-tools — Phase 0's auto-detect instructs both, but neither was
  allowlisted, forcing a permission prompt on standalone runs.
- github-review-pr.md: phrase the lockfile rule generically (any committed
  Gemfile.lock/bun.lock, re-resolve in that directory) so it stays true when
  the docs-kit site (#972) adds tracked docs/ lockfiles.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant