Skip to content

Commit 9fefb72

Browse files
chowbaoclaude
andcommitted
patch: give the Claude workflow full git history
Check out with fetch-depth: 0 instead of 1. The agent is frequently asked whether a ticket is already done, which needs git log / git blame; with a depth-1 checkout it has neither and infers history from HEAD instead. On stellar-dbt#1101 that produced a correct conclusion supported by a fabricated commit attribution. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent b4e0958 commit 9fefb72

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

.github/workflows/claude.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,16 @@ jobs:
8282
with:
8383
repository: ${{ steps.checkout-target.outputs.repository || github.repository }}
8484
ref: ${{ steps.checkout-target.outputs.ref || github.ref }}
85-
fetch-depth: 1
85+
# Full history. The agent routinely has to decide whether a ticket is
86+
# already done, and a depth-1 checkout leaves it with no `git log`,
87+
# `git blame` or `git log -S` to answer that with. It then infers
88+
# history from HEAD and gets it wrong: on stellar-dbt#1101 it
89+
# correctly found the models already present, but attributed them to
90+
# the commit at HEAD -- which touched only this workflow file --
91+
# implying a repo-hygiene problem that did not exist. A wrong
92+
# justification for a right answer is harder to catch than a wrong
93+
# answer, so pay the clone cost and give it real history.
94+
fetch-depth: 0
8695

8796
- name: Exchange GitHub OIDC token for Anthropic access token
8897
id: anthropic-auth

0 commit comments

Comments
 (0)