fix: make review call estimates demand-driven - #71
EmersonBraun wants to merge 1 commit into
Conversation
EmersonBraun
left a comment
There was a problem hiding this comment.
Code review — COMMENT
1 finding(s) (1 med) across 8 file(s). 8/8 lens executions succeeded.
| const perFile = Math.max(1, (batched ? 1 : enabledLenses.length) * (1 + retries) + (maxFindingsPerFile ?? enabledLenses.length) * auditVotes * (1 + retries)) | ||
| const perFile = Math.max(1, (batched ? 1 : enabledLenses.length) * (1 + retries)) | ||
| plan.overBudget.push(`${estimatedProviderCalls} estimated provider calls exceed maxCalls ${maxCalls}`) | ||
| plan.suggestions.push(`reduce scope to at most ${Math.max(1, Math.floor((maxCalls - 1) / perFile))} files or lower --votes`) |
There was a problem hiding this comment.
🟡 med · correctness — Preflight recommendation cannot reduce the estimate it is based on
Why this needs correction
estimatedProviderCalls only includes primary calls and a consolidation reserve, not skeptic votes. Consequently, suggesting --votes as a remedy is ineffective: changing votes does not change the condition at line 713, so the same preflight rejection remains.
Required change
Remove or lower --votes from this recommendation, or include a bounded vote allowance in the estimate if votes are intended to affect preflight.
Acceptance check
Verify the changed behavior prevents this condition and preserves the intended flow.
Review evidence
Verified finding · confidence 0.94
plan.suggestions.push(`reduce scope to at most ${Math.max(1, Math.floor((maxCalls - 1) / perFile))} files`)
AgentsKit review · COMMENT1 finding(s) (1 med) across 8 file(s). 8/8 lens executions succeeded. Result: 🟡 1 med · 8/8 lens executions Actionable findings are attached inline to the relevant changed lines. 1 candidate finding(s) were rejected during verification or thresholding. Review evidence
|
|
Closing without merge: this PR is now |
Summary
Validation
Package version: 0.3.0; intended release tag: v0.3.0.