Skip to content

ci(triage): triage issues with Claude and repository tools - #867

Merged
LargeModGames merged 1 commit into
mainfrom
ci/triage-more-context
Oct 16, 2026
Merged

LargeModGames merged 1 commit into
mainfrom
ci/triage-more-context

Conversation

@LargeModGames

@LargeModGames LargeModGames commented Oct 16, 2026 •

Copy link
Copy Markdown
Owner

Summary

The triage bot moves from DeepSeek to Claude Opus 5.5 (claude-opus-5-5) through the official @anthropic-ai/sdk (pinned to 0.131.0 in .github/scripts/package.json).

  • The model reads the repository through three read-only tools: search_code (git grep), read_file (files git tracks only, so .git and the environment stay out of reach) and view_issue.
  • The prompt carries the build and architecture sections of AGENTS.md, CONTRIBUTING.md, the source file list, the top of the CHANGELOG, and the open and recently closed issues with the start of each body.
  • The comment gets a "Where to look" list (only paths that exist), asks for missing details on bugs only, hides low-confidence duplicates, and marks each duplicate open or closed.
  • A good first issue gets three extra sections for new contributors: numbered start steps, the commands to run before the PR, and the file and line pointers of the issue that moved since it was written.
  • Issues I open are triaged too.
  • The workflow authenticates with workload identity federation: the job has id-token: write, and the script gets a new GitHub OIDC token for each exchange. The rule only accepts triage.yml on main. The ids come from three repository variables; no API key is stored.

Testing

  • node --check .github/scripts/triage.mjs
  • npm ci --ignore-scripts in .github/scripts: 0 vulnerabilities
  • A run for feat(tui): Add ability to pin playlists #863 and Show a short hint when the ALSA default device is missing #848 against a local capture server in place of the API: the request has the fallback beta header, effort: "high", the JSON schema and the three tools; about 21k input tokens on the first call (28k for a good first issue).
  • --render with sample triage.json files, for a normal issue and a good first issue.
  • The federation path against a fake GitHub token endpoint: the script requested the token with the https://api.anthropic.com audience and the SDK sent it to the real exchange endpoint, which refused the fake rule id as expected.

No real model run yet: the federation rule only matches triage.yml on main. After the merge I run gh workflow run triage.yml -f issue_number=863 to check it end to end.

Additional notes

DEEPSEEK_API_KEY can be deleted after the merge.


💬 Questions or want to chat with other contributors? Join the spotatui Discord.

Summary by CodeRabbit

  • Improvements
    • Issue triage summaries now include relevant repository file pointers, possible duplicate issues with their open or closed status, and contributor steps for good-first-issue items.
    • Bug reports can include details about missing information.
    • Triage results identify the model used and compare issues against both open and recently closed issues.

Replace the DeepSeek triage with Claude Opus 5.5 through the Anthropic SDK.
The model reads the code through read-only tools (git grep, tracked files,
issue bodies), so comments point at real files and check duplicates
against open and recently closed issues. A good first issue gets start
steps, the commands to run and pointers that moved. The workflow
authenticates with workload identity federation, so no API key is stored.
@coderabbitai

coderabbitai Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: LargeModGames/spotatui/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 0e3143c0-3e53-4c99-9e61-2269b95b85ae
📥 Commits

Reviewing files that changed from the base of the PR and between 1f2cee0 and 88adf91.

⛔ Files ignored due to path filters: 1
  • .github/scripts/package-lock.json is excluded by !**/package-lock.json, !**/package-lock.json
📒 Files selected for processing: 4
  • .github/scripts/package.json
  • .github/scripts/triage.mjs
  • .github/workflows/triage.yml
  • .gitignore

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 2 remain after this review.

📝 Walkthrough

The triage workflow now uses Anthropic’s Claude SDK, supplies open and recently closed issue context, and allows the model to search tracked files and inspect known issues. Results include validated file pointers, duplicate candidates, and additional guidance for good-first issues.

Changes: Issue Triage

Layer / File(s) Summary
Runtime and workflow setup
.github/scripts/package.json, .github/scripts/triage.mjs, .github/workflows/triage.yml, .gitignore
The script switches to the Anthropic SDK and claude-opus-5-5. The workflow installs the SDK, grants OIDC token access, and configures Claude triage. .gitignore excludes the script’s node_modules directory.
Issue context and repository tools
.github/scripts/triage.mjs, .github/workflows/triage.yml
The workflow gathers labels and bodies for the target issue and up to 100 open and 100 closed issues. The script creates federation credentials when the required values are present, loads issue and tracked-file data, and provides search, file-read, and issue-view tools.
Triage schema and model instructions
.github/scripts/triage.mjs
The strict output schema and prompts cover classification, duplicate details, tracked-file pointers, and good-first-issue contributor steps. Model input includes bounded issue text and snippets from open and recently closed issues.
Model execution and rendered results
.github/scripts/triage.mjs
The script runs the Anthropic tool runner and validates file pointers, duplicate candidates, and output fields. Rendering includes model information, pointers, good-first-issue guidance, duplicate states, and separate open and closed comparison counts.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant Actions as GitHub Actions
  participant Triage as triage.mjs
  participant Claude as Anthropic SDK
  participant Git as Tracked repository files
  participant Issues as Issue lookup
  Actions->>Triage: Provide issue context and federation settings
  Triage->>Claude: Start schema-constrained tool run
  Claude->>Triage: Request search_code, read_file, or view_issue
  Triage->>Git: Search or read tracked files
  Git->>Triage: Return search results or file content
  Triage->>Issues: Look up a known open or recently closed issue
  Issues->>Triage: Return issue details or not-found result
  Triage->>Claude: Return tool results
  Claude->>Triage: Return structured triage result
  Triage->>Actions: Render triage summary
Loading
Merge Risk: ⚪ Minimal · up to 88adf

No actionable issue was established that would block merging the triage workflow after normal checks.

Pre-merge checks: Passed 4
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title uses the allowed ci: prefix, includes an optional scope, concisely describes the Claude-based issue triage and repository tools, and uses an imperative subject.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
✨ Simplify code
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Oct 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@LargeModGames
LargeModGames merged commit d76bb93 into main Oct 16, 2026
36 of 37 checks passed
@LargeModGames
LargeModGames deleted the ci/triage-more-context branch October 16, 2026 10:23
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