You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(ai): support main branch diffing and base resolution in review branch #220
priority/p1-highPriority P1: high-impact work for the next planned milestonescope/aiAI review pipeline, personas, prompts, LLM client, or RAGtype/bugType bug: the code does not do what it must
When running devops ai review branch on the main branch, or when executing devops ai review branch main from another branch (e.g. release/v0.2.19), the CLI resolves branch_name="main" and effective_base="main". This causes git diff main...main to run, producing zero differences and immediately exiting with No differences found between branches.
Root Cause
_prepare_branch_content does not account for:
Running devops review branch <base> from a different active branch where the positional argument specifies the base to compare against.
Running review directly on the primary main branch, where comparison against main is a no-op instead of comparing uncommitted working tree changes against HEAD or comparing against the latest release tag / parent commit (main~1).
Proposed Fix
Detect when target_branch == effective_base:
If current active branch differs from target_branch, interpret the argument as the target base and review the active branch against it.
If current active branch is main (or matching base), inspect uncommitted working tree changes (git diff HEAD).
If working tree is clean, fallback to comparing against the latest release tag or HEAD~1.
Add comprehensive unit tests in tests/test_review_runner.py covering all branch resolution permutations.
priority/p1-highPriority P1: high-impact work for the next planned milestonescope/aiAI review pipeline, personas, prompts, LLM client, or RAGtype/bugType bug: the code does not do what it must
Activity
fix(ai): support main branch diffing and base resolution in review br…
feat(release): v0.2.19 (#217)