Repository navigation
fix(ci): keep a 2M-char safety ceiling on review input - #149
Merged
Merged
Conversation
Review feedback on #147: with no ceiling, a plan beyond the model's context would fail the review outright. Default REVIEW_MAX_PLAN_CHARS to 2M chars (2.4x the largest real plan), so real plans are still sent whole and only a pathological one falls back to the change-list mode. Also clarify '(known after apply)' in the prompt and remove the temp file in post-plan-comment.sh. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Terraform Plan🚧 Changes detected — Plan: 0 to add, 2 to change, 0 to destroy. Plan outputLLM ReviewRisk: 🟢 LOW Plan updates two existing Lambda functions in place (javabin-plan-review and javabin-team-provisioner) with new source code hashes; no resources are created or destroyed.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #147, which merged before this review fix was pushed.
Why
With no ceiling, a plan beyond Haiku 5.5's 1M-token context fails the review with a Bedrock ValidationException, which blocks the apply until a board override. The review of #147 recommended a ceiling well above any real plan.
What changed
REVIEW_MAX_PLAN_CHARSdefaults to 2,000,000 chars, about 500–800k tokens and 2.4× the largest real plan (fix(ci): create team CI roles only for registry teams #135, 830k chars). Real plans are still sent whole. Only a pathological plan falls back to the change-list mode (every change listed, diff cut at a resource boundary, with a notice).(known after apply)explanation is corrected: the value is derived from other resources too, so judge the expression, not a value.post-plan-comment.shremoves its temp file.Checks
Both test suites pass, with new tests for real-size plans sent whole and the fallback above the ceiling.
🤖 Generated with Claude Code