Reduce CI plan output verbosity and merge PR comments#68
Merged
Conversation
- run-plan.sh: Filter state refresh/read noise from CI log, write clean output to plan-clean.txt alongside the full plan-output.txt - post-plan-comment.sh: Use filtered output for PR comment, extract Plan summary line as header, append LLM review into the same comment - Remove post-review-comment.sh (merged into plan comment) - Reorder workflow steps: run LLM review before posting PR comment so both plan and review appear in a single notification
Terraform Plan🚧 Changes detected — Plan: 4 to add, 0 to change, 0 to destroy. Plan outputLLM ReviewRisk: 🟢 LOW Adding ALB integration for password reset Lambda function with proper routing and permissions.
|
Alexanderamiri
added a commit
that referenced
this pull request
May 9, 2026
## Summary - **Filter refresh noise from CI logs** — `run-plan.sh` now strips `Refreshing state...`, `Reading...`, `Read complete...` lines from console output. Full output still saved to `plan-output.txt` for the LLM review. - **Filter refresh noise from PR comments** — `post-plan-comment.sh` uses the clean output, reducing comment size from ~28KB to just the actual plan diff - **Single PR comment** — Plan output and LLM review are now combined into one comment instead of two, halving email notifications - **Plan summary in header** — The `Plan: X to add, Y to change, Z to destroy` line is extracted and shown prominently - **Remove `post-review-comment.sh`** — No longer needed since review is appended to the plan comment ## Test plan - [ ] Open a PR with infra changes and verify the PR comment is a single, clean comment with plan + review - [ ] Verify CI log output is concise (no refresh lines) - [ ] Verify LLM review still works (receives full plan-output.txt, not the filtered version) - [ ] Verify app repo tf-plan workflow also produces clean comments
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.
Summary
run-plan.shnow stripsRefreshing state...,Reading...,Read complete...lines from console output. Full output still saved toplan-output.txtfor the LLM review.post-plan-comment.shuses the clean output, reducing comment size from ~28KB to just the actual plan diffPlan: X to add, Y to change, Z to destroyline is extracted and shown prominentlypost-review-comment.sh— No longer needed since review is appended to the plan commentTest plan