Skip to content

ci(lens): let /lens recheck opt into the raised verify budget - #4806

Merged
cmgrote merged 2 commits into
mainfrom
fix/lens-recheck-verify-budget
Nov 9, 2026
Merged

cmgrote merged 2 commits into
mainfrom
fix/lens-recheck-verify-budget

Conversation

@cmgrote

@cmgrote cmgrote commented Nov 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

/lens recheck always called the model with verify_max_tokens (8,000). Reasoning tokens count against that limit, so a hard finding can use all of it before the model writes a verdict. The recheck then reports only "no verdict came back", and the author can't give it more room. Rounds already have an opt-in for this (/lens verify-budget); rechecks didn't.

This happened on #4731: two rechecks of one finding, both with evidence, each ended at out=8000 reasoning=8000 and returned no verdict.

Changes

  • /lens recheck verify-budget F-… [reason] makes the recheck use verify_max_tokens_opt_in (24,000), the same budget /lens verify-budget gives a round. The word counts as the opt-in only right after recheck; anywhere later it is part of the reason.
  • _recheck_call now reports when the call stopped at its output limit, using the existing _out_of_output_budget check.
  • When a recheck runs out of budget:
    • the header says re-check: ran out of output budget;
    • the verdict comment names the exact retry command and the raised budget;
    • each kept finding says it was "not re-judged", which is different from "kept".
  • If the recheck already used the raised budget, the comment says so and doesn't offer the opt-in again.
  • The usage text, the event.py docstring and the .github/lens/config.toml comment are updated.

Testing

  • 8 new tests in test_lens.py:
    • parsing the opt-in;
    • a cut-off recheck naming the opt-in;
    • an opt-in recheck sending max_tokens=24000;
    • an opt-in cut-off not offering the opt-in again;
    • a recheck that fails for another reason not mentioning the budget;
    • the CLI passing the opt-in through.
  • Red/green: against main's lens code, 7 of the 8 fail. The one that passes covers the unchanged "no verdict for another reason" case.
  • The full lens suite passes locally, apart from the tag-signing tests that only run in CI. Pre-commit and the scripts pyright baseline pass.

🤖 Generated with Claude Code

https://claude.ai/code/session_01AbKqGbjx7uUk6aM6jzSxNF

A recheck always ran at verify_max_tokens (8,000). A reasoning model can spend all of it before answering, and the recheck then reported only "no verdict came back", with no way to give it more room. /lens recheck verify-budget F-… [reason] now uses verify_max_tokens_opt_in, as /lens verify-budget does for a round, and a recheck that runs out of output budget says so and names the opt-in.
@cmgrote

cmgrote commented Nov 9, 2026

Copy link
Copy Markdown
Collaborator Author

/lens

@atlan-app-fleet

atlan-app-fleet Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

lens summary · updated after round 2 (re-review · only commits since c48dd16)

✅ Ready to merge — every finding is resolved

Open findings: 🔴 0 critical · 🟠 0 high · 🟡 0 medium · ⚪ 0 low (nit)

lens reads this PR as — A one-off /lens recheck has only the standard 8,000-token verify budget. When reasoning consumes that output allowance before a verdict, the finding remains unresolved without a clear retry path, even though review rounds already support an opt-in raised budget. How: The PR accepts verify-budget only immediately after recheck, passes that choice through the CLI, and selects the same configured standard or opt-in budget used by round verification. It also reuses the existing output-budget detection to distinguish a cutoff from other no-verdict outcomes and explains that findings were not re-judged, with retry guidance only when the raised budget was not already used.

Approach check — sound.

✔️ Resolved (1)
id severity where finding found resolved how
F-e3d515 🟡 medium .github/scripts/lens/review.py:1200 Output cutoffs with partial tool calls aren't reported round 1 round 2 its code was removed or rewritten
🕘 Round history (2)
round run commits new resolved blocking open cost log
1 first review 377cd57..c48dd16 1 0 0 $0.021 run
2 re-review · only commits since c48dd16 c48dd16..c0b10bb 0 1 0 $0.016 run

round 2 · $0.037 of $1.00 · 24 model calls · 0 failed requests · 79% prompt cache hits · gpt-6-luna

A provider that stops at its output cap after starting the verdicts call returns truncated arguments that parse to no verdict. That was reported as {} and not a cut-off, so the opt-in went unnamed. A capped call now counts as cut off whenever any finding lacks a verdict; completed verdicts are kept, and the retry line names only the findings left unjudged.
@cmgrote

cmgrote commented Nov 9, 2026

Copy link
Copy Markdown
Collaborator Author

/lens

@atlan-app-fleet

Copy link
Copy Markdown
Contributor

✅ lens · round 2 · re-review · only commits since c48dd16 — ready to merge — every finding resolved · $0.04

Open findings: 🔴 0 critical · 🟠 0 high · 🟡 0 medium · ⚪ 0 low (nit)
Resolved this round: 1

Approach check — ✅ sound

  • Problem: A one-off /lens recheck has only the standard 8,000-token verify budget. When reasoning consumes that output allowance before a verdict, the finding remains unresolved without a clear retry path, even though review rounds already support an opt-in raised budget.
  • How the PR solves it: The PR accepts verify-budget only immediately after recheck, passes that choice through the CLI, and selects the same configured standard or opt-in budget used by round verification. It also reuses the existing output-budget detection to distinguish a cutoff from other no-verdict outcomes and explains that findings were not re-judged, with retry guidance only when the raised budget was not already used.

$0.037 of $1.00 · 24 model calls · 0 failed requests

Full summary · Run log

@cmgrote
cmgrote merged commit 2e2f813 into main Nov 9, 2026
30 checks passed
@cmgrote
cmgrote deleted the fix/lens-recheck-verify-budget branch November 9, 2026 12: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