Skip to content

Commit 68c0352

Browse files
igerberclaude
andcommitted
Fix parse_uncertain unconditional, stale previous-review, gpt-5.4 pricing
P1: parse_uncertain now unconditionally skips all write_review_state() calls regardless of whether prior findings exist. Prevents advancing delta baseline after any parse failure, not just when structured_findings is truthy. P1: Branch/base mismatch block now also deletes local-review-previous.md to prevent stale findings from leaking via --previous-review after branch switch. P2: Update gpt-5.4 pricing to $2.50/$15.00 per 1M tokens (was $2.00/$8.00). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 6fc3237 commit 68c0352

2 files changed

Lines changed: 8 additions & 5 deletions

File tree

.claude/commands/ai-review-local.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,7 @@ if [ -f .claude/reviews/review-state.json ]; then
228228
if [ "$stored_branch" != "$branch_name" ] || [ "$stored_base" != "$comparison_ref" ]; then
229229
echo "Warning: review-state.json is from branch '$stored_branch' (base: '$stored_base'), but current is '$branch_name' (base: '$comparison_ref'). Discarding stale state."
230230
rm -f .claude/reviews/review-state.json
231+
rm -f .claude/reviews/local-review-previous.md
231232
last_reviewed_commit=""
232233
fi
233234

.claude/scripts/openai_review.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -750,7 +750,7 @@ def apply_token_budget(
750750
# Source: https://platform.openai.com/docs/pricing
751751
# MAINTENANCE: Update when OpenAI changes pricing.
752752
PRICING = {
753-
"gpt-5.4": (2.00, 8.00),
753+
"gpt-5.4": (2.50, 15.00),
754754
"gpt-4.1": (2.00, 8.00),
755755
"gpt-4.1-mini": (0.40, 1.60),
756756
"o3": (2.00, 8.00),
@@ -1440,14 +1440,16 @@ def main() -> None:
14401440
current_findings, parse_uncertain = parse_review_findings(
14411441
review_content, current_round
14421442
)
1443-
if parse_uncertain and structured_findings:
1443+
if parse_uncertain:
14441444
print(
14451445
"Warning: Could not parse findings from review output. "
1446-
"Preserving prior findings and review state baseline.",
1446+
"Preserving prior review state baseline (not advancing "
1447+
"last_reviewed_commit).",
14471448
file=sys.stderr,
14481449
)
1449-
# Do NOT write review state — keep prior baseline intact so the
1450-
# next delta review doesn't skip unparsed code
1450+
# Do NOT write review state at all — keep prior baseline intact
1451+
# regardless of whether prior findings exist, so the next delta
1452+
# review doesn't skip unparsed code
14511453
elif structured_findings:
14521454
final_findings = merge_findings(structured_findings, current_findings)
14531455
write_review_state(

0 commit comments

Comments
 (0)