chore: review workflow supports merge conflicts — Phase A0 before CI failures - #1
Merged
Merged
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 viagh pr view --json mergeable, with a local fallback forUNKNOWNthat tests the PR's ACTUAL head (git fetch origin pull/<PR>/head+FETCH_HEAD), verifies both refs withgit rev-parse --verifybefore trusting merge-tree exit codes, and usesgit merge-tree --write-tree --name-onlyoutput 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 onCONFLICTINGand 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-toolsfrontmatter covering every command their text instructs.Repo-specific adaptations (verified against this repo, not copied)
bundle exec rake(spec + rubocop, per the Rakefile) on a Ruby matrix, so the failures table listsrake (Ruby 3.2)/rake (Ruby 3.3)/rake (Ruby 3.4); gates arebundle exec rubocop,bundle exec rspec, orbundle exec rake.lib/locallingo/version.rbconflict rule: kept the "the branch bumped on purpose" heuristic because it holds here —rake release[X.Y.Z]bumps, commits, and pushes directly onmain(no PR).docs/bun.lockis the ONLY tracked lockfile (rootGemfile.lockis gitignored;docs/Gemfile.lockisn't committed) — conflict rule: take base, re-runbun install --cwd docs, never hand-edit.docs/app/assets/builds/is gitignored), so phlex-reactive's min.js/vendored-twin rules were dropped entirely; added a note thatdocs/has no PR CI safety net (its deploy fires on release).required_ruby_version >= 3.2,TargetRubyVersion: 3.2).mhenrixon/locallingo; convention references cite the README /docs/AGENTS.md(no CLAUDE.md here).Backport of zoolutions/phlex-reactive#220.