feat(review): file triage stage — classify changed files to drive packing order and prompt selection [v0.8]
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 28/100
Research direction
Start with the size-based ordering and First-Fit-Decreasing packing in DiffBudgetPlanner.java (around lines 609-736), then read FindingPipeline.java and ThrillhouseConfig.java to see how the plan is consumed and where config gates live. The new review/FileTriage collaborator would classify files by path signals before packing. Done means unit tests cover the deterministic classifier, and a plan inspection test shows high-risk files reviewed before low-risk ones under a forced spend ceiling. The issue is design-heavy and has no discussion yet, so confirm scope with the maintainer first.
Written by the indexing model from the issue text.
Description
Problem Statement
Batch packing is size-based only: DiffBudgetPlanner orders files by additions+deletions descending and packs First-Fit-Decreasing (DiffBudgetPlanner.java:609-736). Importance never enters the picture, so when the spend ceiling (REVIEW_MAX_TOKENS_PER_REVIEW), the call cap, or a batch failure forces degradation, what gets skipped is whatever happened to pack last — possibly the auth change, while a giant generated file got a full-budget batch.
Proposed Solution
Add a triage stage between diff load and budget planning that classifies every changed file:
- Deterministic first (free): category from path/content signals — source / test / config / IaC / docs / generated / lockfile — plus coarse risk signals (security-sensitive paths, public API surface, migration files). Most files classify without any model call.
- Optional cheap LLM call (
concisebinding, ledger-gated, counted inmaxAiCallsaccounting): rank only the ambiguous remainder by review priority. One small call with file paths + hunk headers, not diffs — predictable, tiny prompt. Config-gated, default off.
Consumers of the classification:
- Packing order: importance-first (risk tier, then size) instead of size-only, so degradation always sheds the lowest-value files. The existing disclosure machinery (
omittedFiles,spendCeilingSkippedFiles, withheld-material notice) keeps reporting honestly. - Dimension routing input: batch composition by category makes per-batch dimension selection (the v0.7 routing issue) sharper — e.g. pack config/IaC files together so only those batches carry IaC rules.
- Lightweight lane: docs/generated/lockfile tiers can share a minimal sanity-check prompt or be summarized-only, rather than consuming full-prompt budget.
- Model routing: the risk tier is exactly the signal #43 (risk-based model routing) needs — this issue provides the classifier, #43 consumes it.
Touchpoints
New review/FileTriage collaborator; review/DiffBudgetPlanner.java (ordering + lane assignment), review/FindingPipeline.java, config/ThrillhouseConfig.java (gate + tier globs, extensible via .github/thrillhousebot.yml like review.ignored-files).
Acceptance criteria
- Deterministic classifier covered by unit tests over representative path sets; LLM ranking optional and fail-open (falls back to deterministic order).
- Under a forced spend ceiling, high-risk files are demonstrably reviewed before low-risk ones (test via
DiffBudgetPlannerplan inspection). - No change in behavior when the feature gate is off.
Alternatives Considered
- Pure LLM classification — unpredictable cost and an extra call on every review; deterministic-first keeps the common case free.
- Dominant language
- Java
- Stars
- 35
- Forks
- 7
- Avg merge
- 9h 10m
- Merged PRs (30d)
- 166
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from devops-thiago/ThrillhouseBot
-
docs(site): repeated code-block landmarks fail landmark-uniquePossibly taken @devops-thiago claimed this today. Opendocumentation
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
devops-thiago/ThrillhouseBot#1164 · 1 assignee ·
Maintainers usually reply within 1 day
-
docs(site): Architecture tables are not keyboard-scrollable at narrow widthsPossibly taken @devops-thiago claimed this today. Opendocumentation
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
devops-thiago/ThrillhouseBot#1163 · 1 assignee ·
Maintainers usually reply within 1 day
-
docs(site): Mermaid edge-label contrast on Architecture and a table header on How it comparesPossibly taken @devops-thiago claimed this 3 days ago. Opendocumentation
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
devops-thiago/ThrillhouseBot#1132 · 1 comment · 1 assignee ·
Maintainers usually reply within 1 day
-
fix(review): always name the linked issue and its unmet criterion in the summaryPossibly taken @devops-thiago claimed this 4 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
devops-thiago/ThrillhouseBot#1093 · 1 assignee ·
Maintainers usually reply within 1 day
-
documentation enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
devops-thiago/ThrillhouseBot#321 ·
Maintainers usually reply within 1 day
All issues in devops-thiago/ThrillhouseBot
Similar issues
-
ChaosEngine: backup-remote doctor row passes while consumer mode hides bot memory from gitPossibly taken @MohabMohie claimed this today. Openagentic
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
ShaftHQ/SHAFT_ENGINE#7263 ·
Maintainers usually reply within 1 day
-
bug/错误
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
FCL-Team/FoldCraftLauncher#1951 ·
Maintainers usually reply within 4 days
-
Difficulty 1/5 Under an hour Newbie friendliness 68/100
quarkusio/quarkus-agent-mcp#296 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
commons-app/apps-android-commons#7072 ·
Maintainers usually reply within 1 day
-
Type: Bug
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
hypherionmc/sdlink#240 ·