Skip to content

Commit fe9936f

Browse files
committed
fix(review): make execution-log upload non-fatal and short-lived
1 parent 65dd0ac commit fe9936f

2 files changed

Lines changed: 15 additions & 1 deletion

File tree

.github/workflows/claude-pr-review.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,14 +159,23 @@ jobs:
159159
# The review step is continue-on-error, so this runs even when it failed and
160160
# wrote nothing; an empty execution_file would make upload-artifact fail on a
161161
# missing `path`, hence the output guard rather than if-no-files-found alone.
162+
# This step is diagnostic only and gates a required org-wide check, so it must
163+
# never turn a passing review red: continue-on-error covers upload failures, and
164+
# overwrite covers re-running a job in a run that already uploaded this name
165+
# (v4+ artifacts are immutable, so a same-name upload is otherwise a conflict).
162166
- name: Upload Claude execution log
167+
continue-on-error: true
163168
if: github.event.pull_request.user.login != 'dependabot[bot]' && steps.review.outputs.execution_file != ''
164169
uses: actions/upload-artifact@v7.0.1
165170
with:
166171
name: claude-execution-log-pr-${{ github.event.pull_request.number }}
167172
path: ${{ steps.review.outputs.execution_file }}
168173
if-no-files-found: ignore
169-
retention-days: 90
174+
overwrite: true
175+
# Long enough to compare denial rates before and after the allowlist change
176+
# (~100 review runs/week org-wide), short enough that a full-conversation log
177+
# of every PR in the org is not sitting in billable storage for a quarter.
178+
retention-days: 14
170179

171180
- name: Notify on review failure
172181
if: github.event.pull_request.user.login != 'dependabot[bot]' && (steps.review.outcome == 'failure' || steps.review.outcome == 'cancelled')

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ Automated code review on every pull request using [claude-code-action](https://g
1414

1515
The review prompt lives in [`docs/claude-pr-review-prompt.md`](docs/claude-pr-review-prompt.md).
1616

17+
Each run attaches a `claude-execution-log-pr-<number>` artifact (14-day retention) holding the
18+
agent's full tool-call record. The job log itself keeps only the start and end of the run, so this
19+
artifact is the only way to see which tools the reviewer reached for — it exists to diagnose
20+
permission denials against the workflow's `--allowedTools` list. Upload failures are non-fatal.
21+
1722
## Setup
1823

1924
Requires:

0 commit comments

Comments
 (0)