Repository navigation
feat(review): allow search tools and upload execution log #21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
65dd0ac
fe9936f
8e9815c
cc29162
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -147,7 +147,35 @@ jobs: | |
|
|
||
| ${{ steps.prompt.outputs.content }} | ||
| claude_args: | | ||
| --allowedTools "mcp__github_inline_comment__create_inline_comment,Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),Bash(gh pr review:*),Read" | ||
| --allowedTools "mcp__github_inline_comment__create_inline_comment,Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),Bash(gh pr review:*),Read,Grep,Glob" | ||
|
|
||
| # Grep/Glob above were added because 64% of runs (256/400 sampled) hit at least | ||
| # one permission denial — 1,562 denials across 7,819 turns. Search is the only | ||
| # tool class the prompt's "read affected files for context" step needs that the | ||
| # allowlist withheld. This artifact is how we confirm that: the action writes | ||
| # every tool_use with its full input here, and without the upload it dies with | ||
| # the runner (the job log only records init + result, and the check-run summary | ||
| # is empty under track_progress: false). | ||
| # The review step is continue-on-error, so this runs even when it failed and | ||
| # wrote nothing; an empty execution_file would make upload-artifact fail on a | ||
| # missing `path`, hence the output guard rather than if-no-files-found alone. | ||
| # This step is diagnostic only and gates a required org-wide check, so it must | ||
| # never turn a passing review red: continue-on-error covers upload failures, and | ||
| # overwrite covers re-running a job in a run that already uploaded this name | ||
| # (v4+ artifacts are immutable, so a same-name upload is otherwise a conflict). | ||
| - name: Upload Claude execution log | ||
| continue-on-error: true | ||
| if: github.event.pull_request.user.login != 'dependabot[bot]' && steps.review.outputs.execution_file != '' | ||
| uses: actions/upload-artifact@v7.0.1 | ||
| with: | ||
| name: claude-execution-log-pr-${{ github.event.pull_request.number }} | ||
| path: ${{ steps.review.outputs.execution_file }} | ||
| if-no-files-found: ignore | ||
| overwrite: true | ||
| # Long enough to compare denial rates before and after the allowlist change | ||
| # (~100 review runs/week org-wide), short enough that a full-conversation log | ||
| # of every PR in the org is not sitting in billable storage for a quarter. | ||
| retention-days: 14 | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Blocking: uploading the raw execution log turns the agent's conversation into a downloadable copy of any credential it happened to read. The workspace contains a live installation token in plaintext. In this very review run,
Also note The fix that matches the stated goal: don't upload the transcript, upload the projection you actually need. The question is "which tools did the reviewer reach for, and which were denied" — that needs tool names and denial records, not inputs or results. A (I've deliberately not put this in a One immediate follow-up regardless of how you fix it: this workflow runs from the PR head on same-repo PRs, so the upload step is already live on this run and the artifact on it may contain the token above. Worth deleting that artifact — |
||
|
|
||
| - name: Notify on review failure | ||
| if: github.event.pull_request.user.login != 'dependabot[bot]' && (steps.review.outcome == 'failure' || steps.review.outcome == 'cancelled') | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
super nit: worth a line in
README.md(not blocking).The README describes what this workflow does for every repo in the org, and after this change each PR gets an artifact attached. A sentence under "Claude PR Review" noting the execution log, its retention, and that it exists for diagnosing tool-permission denials saves the next person from reverse-engineering it from the workflow comments.