OpenClaw / ClawSweeper
Merged upstreamCorrectnessMerged Aug 31, 2026

Recover exact review for merged base history

Fixed clawsweeper's managed review checkout so complete pull-request and base ancestry remains available when an exact review analyzes a branch that has merged recent base history.

openclaw/clawsweeper · #1326

Review correctness fix

Pull requests that merge their base branch can now receive exact analysis instead of remaining permanently blocked by a false `incomplete_source` result.

Problem

Fetching a pull-request head with a repository-wide depth limit could leave the managed checkout shallow. For branches containing a merge from the base, the true merge base could fall behind that boundary, causing review admission to report `incomplete_source` indefinitely even though the required history existed upstream.

Approach

Fetches the pull-request head without creating repository-wide shallow boundaries and explicitly unshallows checkouts left behind by the previous behavior. The blobless operation remains bounded by a 30-second timeout, while the admission policy still fails closed when ancestry is genuinely incomplete.

Impact and scope

  • Restores exact review for GitHub Update branch and other merge-from-base workflows without forcing contributors to rebase solely to repair analysis state.
  • Automatically repairs existing managed checkouts that were made shallow by the earlier fetch strategy.
  • Preserves the security and correctness boundary: unverifiable ancestry still cannot pass exact-review admission.

Validation

  • Added real-Git regression coverage with 61 base commits, 61 feature commits, and a two-parent base merge beyond the previous bounded hydration window.
  • Proved shallow-to-complete recovery and verified merge-base status while retaining the existing fail-closed case; all focused cases passed.
  • Builds, static checks, lint, `pnpm check`, CodeQL, Windows, and sparse-repair checks passed; the GitHub-verified merge commit credits Goutam Adwant and closed GH-1325.