Repository navigation
fix(dev-lead): repair auto-rebase conflict detection and applied-rate signal - #812
Conversation
… signal The auto-rebase agentic conflict-resolution path was effectively broken and mis-instrumented, surfacing as 0% "applied" in the #737 health report (discussion #735, tracking issue #767). Three fixes: 1. Conflict detection (scripts/dev-lead-fix-reviews.sh): the old `git merge-tree <base> HEAD <base>` 3-arg form prints a "changed in both" section header whose last field is the literal word "both" (the filename is on the indented our/their lines), so `awk '{print $NF}'` fed a bogus "both" path into the rebase prompt. Replace with a version-robust trial merge (`git merge --no-commit` → `git diff --diff-filter=U` → `git merge --abort`) via a new detect_conflicting_paths helper. 2. Prompt hardening (prompts/dev-lead/rebase.md): make the conflicting-file list advisory ("may be empty/incomplete/stale") and instruct the engine to resolve whatever `git rebase` actually flags, so a bad/empty hint can no longer silently block resolution. 3. Applied-rate signal (rebase path): the prompt has the engine force-push the rebased branch itself, so commit_and_push finds nothing to push on success and every successful rebase was recorded as "no-changes" (0% applied). After a successful run, re-check the base conflict state — if no conflicts remain, record status=applied; otherwise no-changes. Verified: shellcheck --severity=warning -x clean; dev-lead bats unit suites and prompt-coverage pass. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QrRBgQJ7QqjMsRySzkPqwJ
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Warning Review limit reached
More reviews will be available in 46 minutes and 21 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Dev-Lead — review-changes (no-changes)No changes were needed for this PR. |
|
Advisory bots were rate-limited; auto-approval is withheld until they recover. pr-review-sweep will re-review this PR after 2026-06-20T01:37:13Z. |
Dev-Lead — fix-bot-comment (no-changes)Agent reasoning |
There was a problem hiding this comment.
Code Review
This pull request improves the merge conflict detection and rebase handling in the dev-lead agent. It replaces a fragile git merge-tree parser with a robust trial-merge helper (detect_conflicting_paths) and updates the rebase prompt to clarify that the conflicting files list is advisory. Additionally, it fixes a telemetry bug where successful force-pushed rebases were incorrectly reported as having "no changes" by re-checking the conflict state after the run. Feedback was provided to add a defensive guard clause in the new helper function to handle empty arguments.
Dev-Lead — fix-reviews (applied)Changes committed and pushed. |
|
Dev-Lead — review-changes (no-changes)No changes were needed for this PR. |
donpetry-bot
left a comment
There was a problem hiding this comment.
Automated review — APPROVED ✓
Risk: LOW
Reviewed commit: cbe4442a705e79bde8885c88d387ccdf46b465a1
Review mode: triage-approved (single reviewer)
Summary
Two-file fix (34+/5-) to the dev-lead auto-rebase path. Replaces a broken 3-arg git merge-tree | grep 'changed in both' | awk '{print $NF}' parser (which always yielded the literal path "both") with a version-robust trial-merge helper detect_conflicting_paths, and fixes a telemetry artifact where engine-self-force-pushed rebases were always recorded as no-changes (the "0% applied" signal) by re-checking base conflict state to emit applied vs no-changes. The rebase prompt's conflicting-file list is downgraded to advisory. Triage cleared this as low-risk; confirmation review agrees.
Linked issue analysis
No formal closing-issue reference, but the PR is well-anchored to discussion #735 and tracking issues #737/#767/#739. The change directly addresses the documented root cause (bogus both path + structurally-unreachable applied status). The PR body also correctly flags that the prior '0% applied' metric was a measurement artifact, not proof that resolution fails — a useful correction for story #739's decision record.
Findings
No blocking issues.
detect_conflicting_pathsguards empty input ([[ -z "$base" ]] && return 0), redirects merge noise, and aborts the trial merge so the worktree is left clean. This satisfies Gemini's only review note (defensive guard), which was addressed in the follow-up commit.- All git refs are quoted;
$BASE_REF/$CONFLICTING_FILEScome from PR metadata and are not interpolated into a shell-eval context — no injection surface. No secrets, auth, crypto, or migrations touched. shellcheck + bats (86) + prompt-coverage all pass in CI. - Non-blocking observation: the post-run
appliedre-check mergesorigin/$BASE_REFinto the local HEAD. If the engine force-pushes the rebased branch without the local checkout advancing, a successful rebase could still read as conflicts-persist →no-changes. The relevant bats suites pass, so this appears handled, but it is the main correctness assumption worth keeping an eye on in the post-fix telemetry window.
CI status
All required checks green (shellcheck/ShellCheck, bats, unit-tests, unit, prompt-coverage, CodeQL, SonarCloud, agent-shield, Agent Security Scan, gitleaks secret scan, validate-* etc.); dependency-audit/dependabot/ci-relay jobs SKIPPED as expected. No failures. mergeStateStatus=BLOCKED is the pending human/required-review gate, not a check failure. Note: MCP secret scan unavailable (no GitHub Advanced Security); gitleaks CI check covers secret detection and passed.
Reviewed automatically by the PR-review agent (single-reviewer mode: fable 5). Reply if you need a human review.
`.github-private` is ring 0 in the agentic release strategy — the self-host canary that runs a release before it is centrally promoted to `dev-lead/stable` for consumer repos. The caller was pinned to `@dev-lead/stable`, so this repo was running the same channel as consumers and never actually exercised new releases first. Point the `uses:` ref and `agent_ref` at `@dev-lead/next` so self-host runs the canary channel. Concretely this picks up dev-lead v1.4.0, which contains the auto-rebase conflict-detection + applied-rate fixes (#812) — so the rebase path and the #737/#767 instrumentation start reflecting the corrected behavior here before stable promotion. Stub validator (tests/dev-lead/integration/test_dev_lead_stub.sh) passes — it accepts any first-party channel tag. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QrRBgQJ7QqjMsRySzkPqwJ
…859) `.github-private` is ring 0 in the agentic release strategy — the self-host canary that runs a release before it is centrally promoted to `dev-lead/stable` for consumer repos. The caller was pinned to `@dev-lead/stable`, so this repo was running the same channel as consumers and never actually exercised new releases first. Point the `uses:` ref and `agent_ref` at `@dev-lead/next` so self-host runs the canary channel. Concretely this picks up dev-lead v1.4.0, which contains the auto-rebase conflict-detection + applied-rate fixes (#812) — so the rebase path and the #737/#767 instrumentation start reflecting the corrected behavior here before stable promotion. Stub validator (tests/dev-lead/integration/test_dev_lead_stub.sh) passes — it accepts any first-party channel tag. Claude-Session: https://claude.ai/code/session_01QrRBgQJ7QqjMsRySzkPqwJ Co-authored-by: donpetry-bot <{}+donpetry-bot@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… signal (#812) * fix(dev-lead): repair auto-rebase conflict detection and applied-rate signal The auto-rebase agentic conflict-resolution path was effectively broken and mis-instrumented, surfacing as 0% "applied" in the #737 health report (discussion #735, tracking issue #767). Three fixes: 1. Conflict detection (scripts/dev-lead-fix-reviews.sh): the old `git merge-tree <base> HEAD <base>` 3-arg form prints a "changed in both" section header whose last field is the literal word "both" (the filename is on the indented our/their lines), so `awk '{print $NF}'` fed a bogus "both" path into the rebase prompt. Replace with a version-robust trial merge (`git merge --no-commit` → `git diff --diff-filter=U` → `git merge --abort`) via a new detect_conflicting_paths helper. 2. Prompt hardening (prompts/dev-lead/rebase.md): make the conflicting-file list advisory ("may be empty/incomplete/stale") and instruct the engine to resolve whatever `git rebase` actually flags, so a bad/empty hint can no longer silently block resolution. 3. Applied-rate signal (rebase path): the prompt has the engine force-push the rebased branch itself, so commit_and_push finds nothing to push on success and every successful rebase was recorded as "no-changes" (0% applied). After a successful run, re-check the base conflict state — if no conflicts remain, record status=applied; otherwise no-changes. Verified: shellcheck --severity=warning -x clean; dev-lead bats unit suites and prompt-coverage pass. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QrRBgQJ7QqjMsRySzkPqwJ * fix(reviews): address review comments [skip ci-relay] --------- Co-authored-by: donpetry-bot <{}+donpetry-bot@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
… signal (#812) * fix(dev-lead): repair auto-rebase conflict detection and applied-rate signal The auto-rebase agentic conflict-resolution path was effectively broken and mis-instrumented, surfacing as 0% "applied" in the #737 health report (discussion #735, tracking issue #767). Three fixes: 1. Conflict detection (scripts/dev-lead-fix-reviews.sh): the old `git merge-tree <base> HEAD <base>` 3-arg form prints a "changed in both" section header whose last field is the literal word "both" (the filename is on the indented our/their lines), so `awk '{print $NF}'` fed a bogus "both" path into the rebase prompt. Replace with a version-robust trial merge (`git merge --no-commit` → `git diff --diff-filter=U` → `git merge --abort`) via a new detect_conflicting_paths helper. 2. Prompt hardening (prompts/dev-lead/rebase.md): make the conflicting-file list advisory ("may be empty/incomplete/stale") and instruct the engine to resolve whatever `git rebase` actually flags, so a bad/empty hint can no longer silently block resolution. 3. Applied-rate signal (rebase path): the prompt has the engine force-push the rebased branch itself, so commit_and_push finds nothing to push on success and every successful rebase was recorded as "no-changes" (0% applied). After a successful run, re-check the base conflict state — if no conflicts remain, record status=applied; otherwise no-changes. Verified: shellcheck --severity=warning -x clean; dev-lead bats unit suites and prompt-coverage pass. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QrRBgQJ7QqjMsRySzkPqwJ * fix(reviews): address review comments [skip ci-relay] --------- Co-authored-by: donpetry-bot <{}+donpetry-bot@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
… signal (#812) * fix(dev-lead): repair auto-rebase conflict detection and applied-rate signal The auto-rebase agentic conflict-resolution path was effectively broken and mis-instrumented, surfacing as 0% "applied" in the #737 health report (discussion #735, tracking issue #767). Three fixes: 1. Conflict detection (scripts/dev-lead-fix-reviews.sh): the old `git merge-tree <base> HEAD <base>` 3-arg form prints a "changed in both" section header whose last field is the literal word "both" (the filename is on the indented our/their lines), so `awk '{print $NF}'` fed a bogus "both" path into the rebase prompt. Replace with a version-robust trial merge (`git merge --no-commit` → `git diff --diff-filter=U` → `git merge --abort`) via a new detect_conflicting_paths helper. 2. Prompt hardening (prompts/dev-lead/rebase.md): make the conflicting-file list advisory ("may be empty/incomplete/stale") and instruct the engine to resolve whatever `git rebase` actually flags, so a bad/empty hint can no longer silently block resolution. 3. Applied-rate signal (rebase path): the prompt has the engine force-push the rebased branch itself, so commit_and_push finds nothing to push on success and every successful rebase was recorded as "no-changes" (0% applied). After a successful run, re-check the base conflict state — if no conflicts remain, record status=applied; otherwise no-changes. Verified: shellcheck --severity=warning -x clean; dev-lead bats unit suites and prompt-coverage pass. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QrRBgQJ7QqjMsRySzkPqwJ * fix(reviews): address review comments [skip ci-relay] --------- Co-authored-by: donpetry-bot <{}+donpetry-bot@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
… signal (#812) * fix(dev-lead): repair auto-rebase conflict detection and applied-rate signal The auto-rebase agentic conflict-resolution path was effectively broken and mis-instrumented, surfacing as 0% "applied" in the #737 health report (discussion #735, tracking issue #767). Three fixes: 1. Conflict detection (scripts/dev-lead-fix-reviews.sh): the old `git merge-tree <base> HEAD <base>` 3-arg form prints a "changed in both" section header whose last field is the literal word "both" (the filename is on the indented our/their lines), so `awk '{print $NF}'` fed a bogus "both" path into the rebase prompt. Replace with a version-robust trial merge (`git merge --no-commit` → `git diff --diff-filter=U` → `git merge --abort`) via a new detect_conflicting_paths helper. 2. Prompt hardening (prompts/dev-lead/rebase.md): make the conflicting-file list advisory ("may be empty/incomplete/stale") and instruct the engine to resolve whatever `git rebase` actually flags, so a bad/empty hint can no longer silently block resolution. 3. Applied-rate signal (rebase path): the prompt has the engine force-push the rebased branch itself, so commit_and_push finds nothing to push on success and every successful rebase was recorded as "no-changes" (0% applied). After a successful run, re-check the base conflict state — if no conflicts remain, record status=applied; otherwise no-changes. Verified: shellcheck --severity=warning -x clean; dev-lead bats unit suites and prompt-coverage pass. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QrRBgQJ7QqjMsRySzkPqwJ * fix(reviews): address review comments [skip ci-relay] --------- Co-authored-by: donpetry-bot <{}+donpetry-bot@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
… signal (#812) * fix(dev-lead): repair auto-rebase conflict detection and applied-rate signal The auto-rebase agentic conflict-resolution path was effectively broken and mis-instrumented, surfacing as 0% "applied" in the #737 health report (discussion #735, tracking issue #767). Three fixes: 1. Conflict detection (scripts/dev-lead-fix-reviews.sh): the old `git merge-tree <base> HEAD <base>` 3-arg form prints a "changed in both" section header whose last field is the literal word "both" (the filename is on the indented our/their lines), so `awk '{print $NF}'` fed a bogus "both" path into the rebase prompt. Replace with a version-robust trial merge (`git merge --no-commit` → `git diff --diff-filter=U` → `git merge --abort`) via a new detect_conflicting_paths helper. 2. Prompt hardening (prompts/dev-lead/rebase.md): make the conflicting-file list advisory ("may be empty/incomplete/stale") and instruct the engine to resolve whatever `git rebase` actually flags, so a bad/empty hint can no longer silently block resolution. 3. Applied-rate signal (rebase path): the prompt has the engine force-push the rebased branch itself, so commit_and_push finds nothing to push on success and every successful rebase was recorded as "no-changes" (0% applied). After a successful run, re-check the base conflict state — if no conflicts remain, record status=applied; otherwise no-changes. Verified: shellcheck --severity=warning -x clean; dev-lead bats unit suites and prompt-coverage pass. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QrRBgQJ7QqjMsRySzkPqwJ * fix(reviews): address review comments [skip ci-relay] --------- Co-authored-by: donpetry-bot <{}+donpetry-bot@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
… signal (#812) * fix(dev-lead): repair auto-rebase conflict detection and applied-rate signal The auto-rebase agentic conflict-resolution path was effectively broken and mis-instrumented, surfacing as 0% "applied" in the #737 health report (discussion #735, tracking issue #767). Three fixes: 1. Conflict detection (scripts/dev-lead-fix-reviews.sh): the old `git merge-tree <base> HEAD <base>` 3-arg form prints a "changed in both" section header whose last field is the literal word "both" (the filename is on the indented our/their lines), so `awk '{print $NF}'` fed a bogus "both" path into the rebase prompt. Replace with a version-robust trial merge (`git merge --no-commit` → `git diff --diff-filter=U` → `git merge --abort`) via a new detect_conflicting_paths helper. 2. Prompt hardening (prompts/dev-lead/rebase.md): make the conflicting-file list advisory ("may be empty/incomplete/stale") and instruct the engine to resolve whatever `git rebase` actually flags, so a bad/empty hint can no longer silently block resolution. 3. Applied-rate signal (rebase path): the prompt has the engine force-push the rebased branch itself, so commit_and_push finds nothing to push on success and every successful rebase was recorded as "no-changes" (0% applied). After a successful run, re-check the base conflict state — if no conflicts remain, record status=applied; otherwise no-changes. Verified: shellcheck --severity=warning -x clean; dev-lead bats unit suites and prompt-coverage pass. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QrRBgQJ7QqjMsRySzkPqwJ * fix(reviews): address review comments [skip ci-relay] --------- Co-authored-by: donpetry-bot <{}+donpetry-bot@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
… signal (#812) * fix(dev-lead): repair auto-rebase conflict detection and applied-rate signal The auto-rebase agentic conflict-resolution path was effectively broken and mis-instrumented, surfacing as 0% "applied" in the #737 health report (discussion #735, tracking issue #767). Three fixes: 1. Conflict detection (scripts/dev-lead-fix-reviews.sh): the old `git merge-tree <base> HEAD <base>` 3-arg form prints a "changed in both" section header whose last field is the literal word "both" (the filename is on the indented our/their lines), so `awk '{print $NF}'` fed a bogus "both" path into the rebase prompt. Replace with a version-robust trial merge (`git merge --no-commit` → `git diff --diff-filter=U` → `git merge --abort`) via a new detect_conflicting_paths helper. 2. Prompt hardening (prompts/dev-lead/rebase.md): make the conflicting-file list advisory ("may be empty/incomplete/stale") and instruct the engine to resolve whatever `git rebase` actually flags, so a bad/empty hint can no longer silently block resolution. 3. Applied-rate signal (rebase path): the prompt has the engine force-push the rebased branch itself, so commit_and_push finds nothing to push on success and every successful rebase was recorded as "no-changes" (0% applied). After a successful run, re-check the base conflict state — if no conflicts remain, record status=applied; otherwise no-changes. Verified: shellcheck --severity=warning -x clean; dev-lead bats unit suites and prompt-coverage pass. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QrRBgQJ7QqjMsRySzkPqwJ * fix(reviews): address review comments [skip ci-relay] --------- Co-authored-by: donpetry-bot <{}+donpetry-bot@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
… signal (#812) * fix(dev-lead): repair auto-rebase conflict detection and applied-rate signal The auto-rebase agentic conflict-resolution path was effectively broken and mis-instrumented, surfacing as 0% "applied" in the #737 health report (discussion #735, tracking issue #767). Three fixes: 1. Conflict detection (scripts/dev-lead-fix-reviews.sh): the old `git merge-tree <base> HEAD <base>` 3-arg form prints a "changed in both" section header whose last field is the literal word "both" (the filename is on the indented our/their lines), so `awk '{print $NF}'` fed a bogus "both" path into the rebase prompt. Replace with a version-robust trial merge (`git merge --no-commit` → `git diff --diff-filter=U` → `git merge --abort`) via a new detect_conflicting_paths helper. 2. Prompt hardening (prompts/dev-lead/rebase.md): make the conflicting-file list advisory ("may be empty/incomplete/stale") and instruct the engine to resolve whatever `git rebase` actually flags, so a bad/empty hint can no longer silently block resolution. 3. Applied-rate signal (rebase path): the prompt has the engine force-push the rebased branch itself, so commit_and_push finds nothing to push on success and every successful rebase was recorded as "no-changes" (0% applied). After a successful run, re-check the base conflict state — if no conflicts remain, record status=applied; otherwise no-changes. Verified: shellcheck --severity=warning -x clean; dev-lead bats unit suites and prompt-coverage pass. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QrRBgQJ7QqjMsRySzkPqwJ * fix(reviews): address review comments [skip ci-relay] --------- Co-authored-by: donpetry-bot <{}+donpetry-bot@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
… signal (#812) * fix(dev-lead): repair auto-rebase conflict detection and applied-rate signal The auto-rebase agentic conflict-resolution path was effectively broken and mis-instrumented, surfacing as 0% "applied" in the #737 health report (discussion #735, tracking issue #767). Three fixes: 1. Conflict detection (scripts/dev-lead-fix-reviews.sh): the old `git merge-tree <base> HEAD <base>` 3-arg form prints a "changed in both" section header whose last field is the literal word "both" (the filename is on the indented our/their lines), so `awk '{print $NF}'` fed a bogus "both" path into the rebase prompt. Replace with a version-robust trial merge (`git merge --no-commit` → `git diff --diff-filter=U` → `git merge --abort`) via a new detect_conflicting_paths helper. 2. Prompt hardening (prompts/dev-lead/rebase.md): make the conflicting-file list advisory ("may be empty/incomplete/stale") and instruct the engine to resolve whatever `git rebase` actually flags, so a bad/empty hint can no longer silently block resolution. 3. Applied-rate signal (rebase path): the prompt has the engine force-push the rebased branch itself, so commit_and_push finds nothing to push on success and every successful rebase was recorded as "no-changes" (0% applied). After a successful run, re-check the base conflict state — if no conflicts remain, record status=applied; otherwise no-changes. Verified: shellcheck --severity=warning -x clean; dev-lead bats unit suites and prompt-coverage pass. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QrRBgQJ7QqjMsRySzkPqwJ * fix(reviews): address review comments [skip ci-relay] --------- Co-authored-by: donpetry-bot <{}+donpetry-bot@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
… signal (#812) * fix(dev-lead): repair auto-rebase conflict detection and applied-rate signal The auto-rebase agentic conflict-resolution path was effectively broken and mis-instrumented, surfacing as 0% "applied" in the #737 health report (discussion #735, tracking issue #767). Three fixes: 1. Conflict detection (scripts/dev-lead-fix-reviews.sh): the old `git merge-tree <base> HEAD <base>` 3-arg form prints a "changed in both" section header whose last field is the literal word "both" (the filename is on the indented our/their lines), so `awk '{print $NF}'` fed a bogus "both" path into the rebase prompt. Replace with a version-robust trial merge (`git merge --no-commit` → `git diff --diff-filter=U` → `git merge --abort`) via a new detect_conflicting_paths helper. 2. Prompt hardening (prompts/dev-lead/rebase.md): make the conflicting-file list advisory ("may be empty/incomplete/stale") and instruct the engine to resolve whatever `git rebase` actually flags, so a bad/empty hint can no longer silently block resolution. 3. Applied-rate signal (rebase path): the prompt has the engine force-push the rebased branch itself, so commit_and_push finds nothing to push on success and every successful rebase was recorded as "no-changes" (0% applied). After a successful run, re-check the base conflict state — if no conflicts remain, record status=applied; otherwise no-changes. Verified: shellcheck --severity=warning -x clean; dev-lead bats unit suites and prompt-coverage pass. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QrRBgQJ7QqjMsRySzkPqwJ * fix(reviews): address review comments [skip ci-relay] --------- Co-authored-by: donpetry-bot <{}+donpetry-bot@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
… signal (#812) * fix(dev-lead): repair auto-rebase conflict detection and applied-rate signal The auto-rebase agentic conflict-resolution path was effectively broken and mis-instrumented, surfacing as 0% "applied" in the #737 health report (discussion #735, tracking issue #767). Three fixes: 1. Conflict detection (scripts/dev-lead-fix-reviews.sh): the old `git merge-tree <base> HEAD <base>` 3-arg form prints a "changed in both" section header whose last field is the literal word "both" (the filename is on the indented our/their lines), so `awk '{print $NF}'` fed a bogus "both" path into the rebase prompt. Replace with a version-robust trial merge (`git merge --no-commit` → `git diff --diff-filter=U` → `git merge --abort`) via a new detect_conflicting_paths helper. 2. Prompt hardening (prompts/dev-lead/rebase.md): make the conflicting-file list advisory ("may be empty/incomplete/stale") and instruct the engine to resolve whatever `git rebase` actually flags, so a bad/empty hint can no longer silently block resolution. 3. Applied-rate signal (rebase path): the prompt has the engine force-push the rebased branch itself, so commit_and_push finds nothing to push on success and every successful rebase was recorded as "no-changes" (0% applied). After a successful run, re-check the base conflict state — if no conflicts remain, record status=applied; otherwise no-changes. Verified: shellcheck --severity=warning -x clean; dev-lead bats unit suites and prompt-coverage pass. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QrRBgQJ7QqjMsRySzkPqwJ * fix(reviews): address review comments [skip ci-relay] --------- Co-authored-by: donpetry-bot <{}+donpetry-bot@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
… signal (#812) * fix(dev-lead): repair auto-rebase conflict detection and applied-rate signal The auto-rebase agentic conflict-resolution path was effectively broken and mis-instrumented, surfacing as 0% "applied" in the #737 health report (discussion #735, tracking issue #767). Three fixes: 1. Conflict detection (scripts/dev-lead-fix-reviews.sh): the old `git merge-tree <base> HEAD <base>` 3-arg form prints a "changed in both" section header whose last field is the literal word "both" (the filename is on the indented our/their lines), so `awk '{print $NF}'` fed a bogus "both" path into the rebase prompt. Replace with a version-robust trial merge (`git merge --no-commit` → `git diff --diff-filter=U` → `git merge --abort`) via a new detect_conflicting_paths helper. 2. Prompt hardening (prompts/dev-lead/rebase.md): make the conflicting-file list advisory ("may be empty/incomplete/stale") and instruct the engine to resolve whatever `git rebase` actually flags, so a bad/empty hint can no longer silently block resolution. 3. Applied-rate signal (rebase path): the prompt has the engine force-push the rebased branch itself, so commit_and_push finds nothing to push on success and every successful rebase was recorded as "no-changes" (0% applied). After a successful run, re-check the base conflict state — if no conflicts remain, record status=applied; otherwise no-changes. Verified: shellcheck --severity=warning -x clean; dev-lead bats unit suites and prompt-coverage pass. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QrRBgQJ7QqjMsRySzkPqwJ * fix(reviews): address review comments [skip ci-relay] --------- Co-authored-by: donpetry-bot <{}+donpetry-bot@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
… signal (#812) * fix(dev-lead): repair auto-rebase conflict detection and applied-rate signal The auto-rebase agentic conflict-resolution path was effectively broken and mis-instrumented, surfacing as 0% "applied" in the #737 health report (discussion #735, tracking issue #767). Three fixes: 1. Conflict detection (scripts/dev-lead-fix-reviews.sh): the old `git merge-tree <base> HEAD <base>` 3-arg form prints a "changed in both" section header whose last field is the literal word "both" (the filename is on the indented our/their lines), so `awk '{print $NF}'` fed a bogus "both" path into the rebase prompt. Replace with a version-robust trial merge (`git merge --no-commit` → `git diff --diff-filter=U` → `git merge --abort`) via a new detect_conflicting_paths helper. 2. Prompt hardening (prompts/dev-lead/rebase.md): make the conflicting-file list advisory ("may be empty/incomplete/stale") and instruct the engine to resolve whatever `git rebase` actually flags, so a bad/empty hint can no longer silently block resolution. 3. Applied-rate signal (rebase path): the prompt has the engine force-push the rebased branch itself, so commit_and_push finds nothing to push on success and every successful rebase was recorded as "no-changes" (0% applied). After a successful run, re-check the base conflict state — if no conflicts remain, record status=applied; otherwise no-changes. Verified: shellcheck --severity=warning -x clean; dev-lead bats unit suites and prompt-coverage pass. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QrRBgQJ7QqjMsRySzkPqwJ * fix(reviews): address review comments [skip ci-relay] --------- Co-authored-by: donpetry-bot <{}+donpetry-bot@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>



Why
The #737 auto-rebase health report (tracking issue #767) shows 0% applied every day despite 50–86 conflict sentinels/week and ~70% "responses". Investigation (discussion #735) found the agentic conflict-resolution path is both mis-instrumented and carrying a real conflict-detection bug — so "0% applied" was not a clean signal that resolution fails, but it was hiding genuine breakage.
Root cause
scripts/dev-lead-fix-reviews.shused the deprecated 3-arggit merge-tree <base> HEAD <base>and parsed it withgrep "^changed in both" | awk '{print $NF}'. The last field of thechanged in bothsection header is the literal wordboth— the filenames are on the indentedour/theirlines. SoCONFLICTING_FILESwas set toboth(a nonexistent path) on every conflict.prompts/dev-lead/rebase.mdinjected that list and constrained the engine to "only modify the conflicting files listed above" — i.e. onlyboth— so the engine couldn't touch the actually-conflicted files and aborted →no-changes.appliedwas structurally unreachable. The prompt has the engine force-push the rebased branch itself (step 6), so on successcommit_and_pushfinds nothing to push and postsno-changes.status=appliedonly fired if the engine committed but forgot to push — so even successful rebases were recorded asno-changes, making the metric ~0 by construction.Changes
scripts/dev-lead-fix-reviews.shdetect_conflicting_paths <base_ref>helper: version-robust trial merge (git merge --no-commit --no-ff→git diff --name-only --diff-filter=U→git merge --abort).CONFLICTING_FILES, and after a successful run re-checks the base conflict state to recordapplied(no conflicts remain) vsno-changes(conflicts persist) instead of relying oncommit_and_pushseeing leftover work.prompts/dev-lead/rebase.mdgit rebaseactually flags and not to skip a real conflict just because it isn't listed.Verification
shellcheck --severity=warning -x scripts/dev-lead-fix-reviews.sh— clean.bats tests/dev-lead/unit/test_fix_reviews.bats(86),test_intent_reviews.bats,test_auto_rebase_retry.bats— pass.tests/dev-lead/integration/test_prompt_coverage.sh— pass (rebase.md variable declarations intact).Note for the initiative (epic #736 / story #739)
This corrects the premise behind the earlier "0% applied" reading: that number was not evidence that agentic conflict-resolution is non-functional — it was a measurement artifact plus the detection bug. Story #739's decision record should source resolution-rate numbers from the post-fix report window, not the broken metric.
🤖 Generated with Claude Code
Generated by Claude Code