Skip to content

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

Merged
mhenrixon merged 1 commit into
mainfrom
chore/review-pr-merge-conflicts
Jul 10, 2026
Merged

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

Conversation

@mhenrixon

Copy link
Copy Markdown
Collaborator

Summary

Adds the merge-conflict-aware review command trio under .claude/commands/ (this repo previously had none):

  • /github-review-pr — full-pass orchestrator with a new Phase A0: merge conflicts that runs BEFORE CI-failure diagnosis. Detection via gh pr view --json mergeable, with a local fallback for UNKNOWN that tests the PR's ACTUAL head (git fetch origin pull/<PR>/head + FETCH_HEAD), verifies both refs with git rev-parse --verify before trusting merge-tree exit codes, and uses git merge-tree --write-tree --name-only output as the work list. Resolution: gh pr checkout, MERGE never rebase, semantic per-file rules, verification gates before push, plain push. Loop-back rules (new conflict mid-pass → back to A0; new failure in Phase B → back to A) and Phase C report additions.
  • /github-review-failures — CI-failure runbook with a detection-only merge-conflict pre-flight that STOPs on CONFLICTING and hands off to the orchestrator (this command's toolset deliberately excludes the merge machinery).
  • /github-review-comments — review-thread runbook (fetch via GraphQL, categorise, fix, reply with SHAs, resolve threads).

All three carry allowed-tools frontmatter covering every command their text instructs.

Repo-specific adaptations (verified against this repo, not copied)

  • Verification gates / CI check names: CI is one job type — bundle exec rake (spec + rubocop, per the Rakefile) on a Ruby matrix, so the failures table lists rake (Ruby 3.2) / rake (Ruby 3.3) / rake (Ruby 3.4); gates are bundle exec rubocop, bundle exec rspec, or bundle exec rake.
  • lib/locallingo/version.rb conflict rule: kept the "the branch bumped on purpose" heuristic because it holds here — rake release[X.Y.Z] bumps, commits, and pushes directly on main (no PR).
  • Lockfiles: docs/bun.lock is the ONLY tracked lockfile (root Gemfile.lock is gitignored; docs/Gemfile.lock isn't committed) — conflict rule: take base, re-run bun install --cwd docs, never hand-edit.
  • No generated-artifact rules: this repo tracks no generated artifacts (docs' compiled Tailwind CSS under docs/app/assets/builds/ is gitignored), so phlex-reactive's min.js/vendored-twin rules were dropped entirely; added a note that docs/ has no PR CI safety net (its deploy fires on release).
  • Ruby floor: notes that a single-matrix-version failure is a version bug, not flakiness, and fixes must not use 3.3+/3.4-only syntax (required_ruby_version >= 3.2, TargetRubyVersion: 3.2).
  • API examples point at mhenrixon/locallingo; convention references cite the README / docs/AGENTS.md (no CLAUDE.md here).

Backport of zoolutions/phlex-reactive#220.

…failures

Backport of zoolutions/phlex-reactive#220 adapted to this repo: adds the
github-review-pr / github-review-failures / github-review-comments command
trio with a merge-conflict phase (A0) that runs before CI diagnosis.
Adapted to locallingo's realities: single `bundle exec rake` CI job on a
Ruby 3.2–3.4 matrix, releases bumping lib/locallingo/version.rb directly
on main via rake release, docs/bun.lock as the only tracked lockfile, and
no tracked generated artifacts.
@mhenrixon
mhenrixon merged commit 4095205 into main Jul 10, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant