Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

feat(review): per-PR spend cap and token-budget guardrail

Open
#42 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Quiet
Tech stack
java

Research direction

Start by locating the review flow that sends diff content to the model, then trace how retries and review passes are counted; the issue does not name specific files or tests. Identify where per-PR and per-review usage can be measured, and how the dashboard receives spend data. Done means configurable caps stop review work at the limit, post a truncation message, and show the cap and actual spend.

Written by the indexing model from the issue text.

Description

enhancement java
Problem Statement

There is no guardrail on per-PR spend. A very large diff or a retry storm against an expensive model can run up unexpected cost, which matters most for the self-hosted, bring-your-own-key audience.

Proposed Solution

Add a configurable per-PR (and per-review) spend/token cap. When a review would exceed the cap, stop early and post a clear message (e.g. "review truncated: per-PR budget reached") rather than continuing. Surface the cap and actual spend in the dashboard.

Alternatives Considered
  • Rely on max-diff-lines only — bounds input size but not total spend across retries/passes.
Priority

Important

Code of Conduct
  • I have searched for existing issues and this is not a duplicate.
Dominant language
Java
Stars
35
Forks
7
Avg merge
9h 32m
Merged PRs (30d)
144

Getting set up

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.

More from devops-thiago/ThrillhouseBot

All issues in devops-thiago/ThrillhouseBot

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.