mozilla / mozilla/blender

feat(fix): comment on PR with summary of what Claude tried

Open
#8 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
6
Forks
2
Avg merge
1d 11h
Merged PRs (30d)
17

Description

When the fix workflow runs on a Dependabot PR (whether it succeeds or hits the max-turns/budget limit), it should leave a comment on the PR summarizing what Claude attempted.

Why

An engineer picking up a PR where BLEnder failed should know:

  • Which CI checks were failing
  • What Claude tried to fix
  • Whether it ran out of turns or hit another limit
  • What files it changed (if any)

Without this, the engineer starts from scratch.

Implementation

After Claude exits in run-claude.sh, post a comment via the GitHub API with:

  • The failing check names (already gathered by gather-context.sh)
  • Claude exit code and reason (max-turns, budget, success)
  • A git diff --stat of any changes Claude made
  • Optionally, the last few lines of Claude output as context

The comment step needs GH_TOKEN, which is currently stripped from run-claude.sh for security. The comment should be posted in a separate workflow step after Claude finishes, using the app token that already exists in the workflow.

Approach (from #11)

  • Add a system prompt instruction telling Claude to write a .blender-summary.md file
  • Add Write to --allowedTools so Claude can create the file
  • Add a fallback summary when Claude crashes before writing one
  • Post the summary as a PR comment after Claude finishes (success or failure)
  • Guard against nonce leaks in the summary file

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading run-claude.sh, gather-context.sh, and the workflow that invokes them; trace how the app token and Claude exit status flow between steps. Done means the workflow comments on the Dependabot PR after both success and failure with checks, attempt outcome, diff stat, and a summary or fallback, while guarding against nonce leaks.

Written by the indexing model from the issue text.

Assessment

Tech stack
github, github-actions, shell
Domain
ci-cd, devops, security
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.