Skip to content

ci: add label-gated issue investigation via Claude - #1316

Merged
abueide merged 2 commits into
masterfrom
abueide/claude-issue-investigate
Aug 28, 2026
Merged

ci: add label-gated issue investigation via Claude#1316
abueide merged 2 commits into
masterfrom
abueide/claude-issue-investigate

Conversation

@abueide

@abueide abueide commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Adds .github/workflows/claude-issue-investigate.yml: when a maintainer adds the investigate label to an issue, Claude reads it, attempts a real reproduction using the repo's own tooling (installs deps, writes and runs a small repro script/test), and writes a diagnosis to investigation-report.md, uploaded as a job artifact.

Update: if Claude reproduces the issue and is confident the fix is small, narrow, and clearly correct, it now branches (fix/issue-<number>), commits, pushes, and opens a PR against master with gh pr create (including "Fixes #"). If the right fix is unclear, needs broader changes, or it isn't confident, it still just notes that in the report — no PR. It never comments on the issue itself either way.

Why label-gated, not issues: opened: this is a public repo and anyone can open an issue. Triggering on every new issue with no gate would let any user (including spam) kick off a real, paid Claude session — now with write access, that gate matters even more. A maintainer adding the investigate label puts a human trust decision in front of both the spend and the write access.

Permissions: contents: write and pull-requests: write (needed for the fix-PR path), issues: read, and id-token: write for the existing ./.github/actions/artifactory-oidc step yarn install depends on. Any PR Claude opens still needs human review to merge — master's branch protection isn't bypassed here, so a bad or injected fix can't land without someone approving it.

Issue title/body are never spliced into the shell script that builds the prompt — only the numeric issue number is (not attacker-influenceable). Claude fetches the actual issue content itself via gh issue view as a tool call, so untrusted text never touches our own bash.

No turn/budget cap — runs until it either reproduces the issue or concludes it needs more information.

Also creates the investigate label on the repo (didn't exist before), so there's actually something to apply.

🤖 Generated with Claude Code

abueide and others added 2 commits August 28, 2026 10:57
Adds .github/workflows/claude-issue-investigate.yml: when a maintainer
adds the 'investigate' label to an issue, has Claude read it, attempt
a real reproduction using the repo's own tooling, and write a
diagnosis to investigation-report.md, uploaded as a job artifact.

Gated on issues: labeled (checking for the 'investigate' label)
rather than issues: opened, since this is a public repo and anyone
can open an issue - a maintainer triages first, so no budget gets
spent on spam/junk issues.

Read-only permissions throughout (contents: read, issues: read) plus
id-token: write for the existing Artifactory OIDC step yarn install
depends on - Claude has no path to commit, push, open a PR, or write
to the issue even if it tried, regardless of what's in the issue body.
Issue title/body are never spliced into our own shell script; only the
numeric issue number is, and Claude fetches the actual content itself
via `gh issue view`.

No turn/budget cap for now, by request - it runs until it reproduces
the issue or concludes it needs more information.

Also creates the 'investigate' label on the repo so it's actually
assignable (didn't exist before this).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Elevates permissions from read-only to contents: write and
pull-requests: write, since Claude may now branch, commit, push, and
open a PR when it both reproduces an issue and is confident the fix is
small and clearly correct. Ambiguous or broad fixes still just get
noted in the report, no PR.

The investigate label remains the trust gate: a maintainer decides an
issue is worth Claude's time (and now write access) before this runs
at all, same reasoning as before, just now justifying the wider
permission set. Any PR still needs human review to merge - branch
protection on master isn't bypassed by this workflow.

No cap on reproduction effort, per earlier direction - runs until it
reproduces or concludes it needs more information.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@abueide
abueide enabled auto-merge (squash) August 28, 2026 16:17
@abueide
abueide disabled auto-merge August 28, 2026 16:17
@abueide
abueide merged commit 0ae89ca into master Aug 28, 2026
9 checks passed
@abueide
abueide deleted the abueide/claude-issue-investigate branch August 28, 2026 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant