feat: implement issue #2053 — dev-lead rebase runs on a depth-1 checkout: branch and main look unrelated, so conflict recovery depends on the model remembering to un-shallow

Merged
DO
1mo ago
+561-21

Problem

dev-lead rebase runs on a depth-1 checkout: branch and main look unrelated, so conflict recovery depends on the model remembering to un-shallow

From the issue: dev-lead's rebase intent runs on a depth-1 checkout. With only the newest commit of each ref present, the PR branch and main appear to share no ancestor, so git rebase origin/main sees "unrelated histories". Whether a conflicting PR gets recovered then depends on the model deciding, on its own, to run git fetch --unshallow.

Risk

Low — changes automation shell logic under scripts/, covered by shellcheck (--severity=warning) and the bats suite.

Test plan

Tests added/updated: tests/dev-lead/unit/test_fix_reviews.bats,tests/dev-lead/unit/test_git_history.bats. Verification: bash scripts/dev-lead-lint.sh (shellcheck --severity=warning) ran pre-commit; the bats suite runs in CI.

Rollback

Revert this PR. No non-revertible side effects (no tags, migrations, or external state).

Monitoring

This PR's Lint (shellcheck) and bats checks show pass/fail; watch subsequent dev-lead / pr-review runs for behavioral regressions.

Closes #2053