Skip to content

ci(claude): fetch-depth cleanup + review-side git ops#63

Merged
heskew merged 1 commit intomainfrom
workflow/review-git-ops
Apr 24, 2026
Merged

ci(claude): fetch-depth cleanup + review-side git ops#63
heskew merged 1 commit intomainfrom
workflow/review-git-ops

Conversation

@heskew
Copy link
Copy Markdown
Member

@heskew heskew commented Apr 24, 2026

Summary

Mirrors HarperFast/harper#402's fetch-depth + git-ops changes. Chris's fetch-depth: 0 feedback there was the starting point; taking the opportunity to upgrade the review-side tool scope at the same time.

Mention / issue-to-PR

Drop fetch-depth: 0. Default shallow is fine. Agents commit and push — neither needs deep history. Current prompts don't direct the agent toward git log / git blame.

Review

Keep fetch-depth: 0. Make the depth actually useful.

  • --allowedTools gains: Bash(git diff:*), Bash(git log:*), Bash(git blame:*), Bash(git show:*)
  • Individually scoped — deliberately NOT Bash(git:*) (which would permit destructive write ops)
  • Drops Bash(gh pr diff:*) since git diff <base>...HEAD replaces it with no API round-trip
  • Keeps gh pr view, gh pr comment, and the MCP inline-comment tool — they all do different things (metadata, top-level summary, per-line anchored findings; and yes, the inline tool is in active use — 16+ inline comments from the bot on fix: withOAuthValidation reads request from getContext() (closes #33) #48 alone)

Review prompt now directs the agent to use git blame for the "is this code the PR introduced vs pre-existing" judgment (which the layered scope's Testing section already cares about), and git log / git show for "why is this load-bearing" context before flagging something as a blocker.

🤖 Generated with Claude Code

Mirror of harper #402. Chris's feedback there was about fetch-depth;
taking the opportunity to upgrade the review-side tool scope too.

- Mention / issue-to-PR: drop `fetch-depth: 0`. Shallow is fine —
  agents commit/push, don't reach for history in the current prompts.
- Review: keep `fetch-depth: 0` and make the depth actually useful.
  `--allowedTools` gains `Bash(git diff:*)`, `Bash(git log:*)`,
  `Bash(git blame:*)`, `Bash(git show:*)` — individually scoped (NOT
  `Bash(git:*)`, which would permit destructive write ops). Drops
  `Bash(gh pr diff:*)` — `git diff <base>...HEAD` replaces it
  locally. `gh pr view`, `gh pr comment`, and the MCP inline-comment
  tool stay.
- Review prompt now tells the agent to use `git blame` for the
  "new vs pre-existing" judgment the layered Testing section cares
  about, and `git log` / `git show` for "why is this load-bearing"
  context before flagging.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@heskew heskew requested a review from a team as a code owner April 24, 2026 14:22
@heskew heskew merged commit c788bb4 into main Apr 24, 2026
4 of 5 checks passed
@heskew heskew deleted the workflow/review-git-ops branch April 24, 2026 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant