Commit 492c1ba
authored
[CI] Preserve Claude execution logs for review inspection (#8381)
## Summary
Expose two opt-in controls on the reusable Claude workflow:
- `show_full_output` streams the complete Claude SDK event sequence into
the GitHub Actions log.
- `upload_execution_log` uploads the action's existing
`claude-execution-output.json` after completion without modifying or
forking `anthropics/claude-code-action`.
Execution logs are keyed both by the triggering comment and by workflow
run:
```text
review-logs/claude-code/<owner>/<repo>/<issue-or-pr>/<comment-id>.json
review-logs/claude-code/<owner>/<repo>/<issue-or-pr>/runs/<run-id>_<attempt>.json
```
The comment-keyed object lets a viewer start from a PR, enumerate its
`@claude` mentions through the GitHub API, and load each review
independently without maintaining a separate S3 manifest.
Both options default to `false`, so existing callers are unchanged.
## Validation
CIForge temporarily enabled both options for one probe and was then
restored to `test-infra@main`.
- Run: https://github.com/pytorch/ciforge/actions/runs/30318082793
- Job:
https://github.com/pytorch/ciforge/actions/runs/30318082793/job/90147956380
- Claude step succeeded with full assistant and tool events visible in
the job log.
- Upload step succeeded.
- Both S3 keys returned the same 10-event execution stream with a
successful four-turn result.
The CIForge prototype viewer enumerated all eight `@claude` mentions on
issue #527 and rendered the newly persisted trace selected by comment
ID.
## Security model
This is opt-in and follows the existing distributed-triage model: full
output may contain assistant text, tool arguments, and tool results.
Callers should enable it only where that exposure is acceptable.1 parent 592772d commit 492c1ba
1 file changed
Lines changed: 43 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
31 | 43 | | |
32 | 44 | | |
33 | 45 | | |
| |||
185 | 197 | | |
186 | 198 | | |
187 | 199 | | |
| 200 | + | |
188 | 201 | | |
189 | 202 | | |
190 | 203 | | |
| |||
193 | 206 | | |
194 | 207 | | |
195 | 208 | | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
0 commit comments