chore: review workflow supports merge conflicts — Phase A0 before CI failures - #23
Merged
Merged
Conversation
…failures Backport of zoolutions/phlex-reactive#220 adapted to this repo: - /github-review-pr gains Phase A0 (detection via gh pr view --json mergeable with a local git-merge-tree fallback against the PR's actual head, semantic per-file resolution, verification gates, plain push) running BEFORE the CI-failures phase, plus Phase C report additions and loop-back rules. - /github-review-failures gains a detection-only pre-flight that stops on CONFLICTING and hands off to the orchestrator. - Adapted to the fork's branch model: merge origin/main forward first (never dash into an upstream-PR-able branch), defer to .claude/rules/upstream-sync.md's conflict playbook for the cert overlap zone, go mod tidy for go.sum, and the repo's real gates (gofmt -l, make build, make test; golangci-lint is CI-only).
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 a Phase A0: Merge conflicts stage to the review workflow, running BEFORE the CI-failures phase — CI is only worth diagnosing against the post-merge reality.
/github-review-pr(orchestrator)gh pr view --json mergeable,mergeStateStatus,baseRefName, with a local fallback forUNKNOWN—git fetch origin pull/<PR>/head+git merge-tree --write-tree --name-only origin/<base> FETCH_HEADagainst the PR's ACTUAL head (neverHEAD), withgit rev-parse --verifyon both refs before trusting exit codes; the--name-onlyoutput is the work list.gh pr checkouton a clean tree, MERGE never rebase, semantic per-file rules, verification gates before pushing, plain push (a merge commit never needs force).gh pr checkout,git switch/fetch/merge/merge-tree/rev-parse/status,go mod,go build)./github-review-failuresCONFLICTING→ stop and hand off to the orchestrator's Phase A0 (this command's toolset deliberately excludes the merge machinery);UNKNOWN→ note and proceed.Repo-specific adaptations
origin/mainforward (the sanctioned direction per.claude/rules/git-workflow.md); mergingdashinto an upstream-PR-able feature branch is contamination and requires asking the user. Notes thatgit rerereis enabled..claude/rules/upstream-sync.md: the cert overlap zone (internal/cmd/run.go,internal/server/{config,router,service}.go) uses its union rules;Dockerfile/Makefile/script/releasestay upstream's; workflow YAML keeps the SHA-pin + version-comment pattern.go.sum— resolvego.modsemantically (keepgo-acme/lego/v4), thengo mod tidy.gofmt -l internal/ cmd/,make build,make test;make lint(golangci-lint) noted as CI-only.script/release-dash), so those phlex-reactive-specific rules were dropped.Backport of zoolutions/phlex-reactive#220.