Skip to content

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

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

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

Conversation

@mhenrixon

Copy link
Copy Markdown
Collaborator

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)

  • Detection: gh pr view --json mergeable,mergeStateStatus,baseRefName, with a local fallback for UNKNOWNgit fetch origin pull/<PR>/head + git merge-tree --write-tree --name-only origin/<base> FETCH_HEAD against the PR's ACTUAL head (never HEAD), with git rev-parse --verify on both refs before trusting exit codes; the --name-only output is the work list.
  • Resolution: gh pr checkout on a clean tree, MERGE never rebase, semantic per-file rules, verification gates before pushing, plain push (a merge commit never needs force).
  • Phase C report gains a Phase A0 summary, an end-state mergeability check (re-checked because the base can move under a long pass), and A0/A loop-back rules.
  • allowed-tools frontmatter now covers every command the text instructs (gh pr checkout, git switch/fetch/merge/merge-tree/rev-parse/status, go mod, go build).

/github-review-failures

  • Detection-only pre-flight: CONFLICTING → 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

  • Which branch to merge is fork-aware: Phase A0 first merges origin/main forward (the sanctioned direction per .claude/rules/git-workflow.md); merging dash into an upstream-PR-able feature branch is contamination and requires asking the user. Notes that git rerere is enabled.
  • Per-file rules defer to the existing playbook in .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/release stay upstream's; workflow YAML keeps the SHA-pin + version-comment pattern.
  • Lockfile rule is Go-shaped: never hand-merge go.sum — resolve go.mod semantically (keep go-acme/lego/v4), then go mod tidy.
  • Verification gates are this repo's real ones: gofmt -l internal/ cmd/, make build, make test; make lint (golangci-lint) noted as CI-only.
  • No CHANGELOG/version-file rules — this repo has neither (releases are four-segment tags via script/release-dash), so those phlex-reactive-specific rules were dropped.

Backport of zoolutions/phlex-reactive#220.

mhenrixon added 2 commits July 9, 2026 10:47
…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).
@mhenrixon
mhenrixon merged commit f6d1f6b into dash Jul 10, 2026
2 checks passed
@mhenrixon
mhenrixon deleted the chore/review-pr-merge-conflicts branch July 29, 2026 13:59
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