ci(claude): fetch-depth cleanup + review-side git ops#63
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Mirrors HarperFast/harper#402's fetch-depth + git-ops changes. Chris's
fetch-depth: 0feedback 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 towardgit log/git blame.Review
Keep
fetch-depth: 0. Make the depth actually useful.--allowedToolsgains:Bash(git diff:*),Bash(git log:*),Bash(git blame:*),Bash(git show:*)Bash(git:*)(which would permit destructive write ops)Bash(gh pr diff:*)sincegit diff <base>...HEADreplaces it with no API round-tripgh 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 blamefor the "is this code the PR introduced vs pre-existing" judgment (which the layered scope's Testing section already cares about), andgit log/git showfor "why is this load-bearing" context before flagging something as a blocker.🤖 Generated with Claude Code