chore: review workflow supports merge conflicts — Phase A0 before CI failures - #60
Merged
Merged
Conversation
…failures Backport of zoolutions/phlex-reactive#220, adapted to docs-kit: - /github-review-pr gains Phase A0 (merge-conflict detection via gh pr view --json mergeable, with a local git merge-tree fallback against the PR's actual head), a semantic resolution runbook with docs-kit-specific per-file rules (CHANGELOG Unreleased union, lib/docs_kit/version.rb release-on-main semantics, tracked docs/Gemfile.lock + docs/bun.lock regeneration, vendored Lucide SVGs, append-only doc.rb/routes registries), verification gates matching what CI actually runs, 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.
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
Backport of zoolutions/phlex-reactive#220.
Adds a Phase A0: merge conflicts phase to
/github-review-prthat runs BEFORE the CI-failures phase, so CI is diagnosed against the post-merge reality instead of a stale base:gh pr view --json mergeable,mergeStateStatus,baseRefName; onUNKNOWN, a local fallback that tests the PR's ACTUAL head (git fetch origin pull/<PR>/head+FETCH_HEAD, ref verification viagit rev-parse --verifybefore trusting exit codes,git merge-tree --write-tree --name-onlyoutput as the work list).gh pr checkouton a clean tree, MERGE never rebase (shared branch — no force-push), semantic per-file rules, verification gates before pushing, plaingit push./github-review-failuresgains a detection-only pre-flight: onCONFLICTINGit stops and hands off to the orchestrator (its toolset deliberately excludes the merge machinery); onUNKNOWNit proceeds.allowed-toolsfrontmatter in the orchestrator now covers every command the new text instructs (gh pr checkout,git status/switch/fetch/merge/merge-tree/rev-parse,bundle install,bun,cd).Repo-specific adaptations (verified against this repo, not copied from phlex-reactive)
lib/docs_kit/version.rb:rake release[X.Y.Z]commits the bump directly onmain(the task aborts off-main), so the "a version conflict means the branch bumped on purpose" rule holds here verbatim.Gemfile.lockis gitignored (can never conflict);docs/Gemfile.lockIS tracked (deployable dogfood app) → take base +bundle installindocs/.docs/bun.lockis tracked too (CI runsbun install --frozen-lockfile) → take base +bun install.docs/app/assets/builds/*andtailwind.sources.cssare gitignored), so phlex-reactive's min.js/vendored-twin rules were dropped. The vendored Lucide SVGs underdocs/app/assets/svg/icons/**got a take-one-side-wholesale rule instead.docs/app/models/doc.rb'spagelines anddocs/config/routes.rb.bundle exec rake(therake (Ruby 3.x)job) for gem files;cd docs && bundle exec rspec(thedocs sitejob) plus docs' own rubocop (with explicit files — the gem's rubocop deliberately excludesdocs/) for docs files.opus/sonnet), and repo-specific notes intact.Backport of zoolutions/phlex-reactive#220.