Skip to content

fix(rollback): suppress no-op and unsafe blanket destroys - #49

Open
Coding-Dev-Tools wants to merge 1 commit into
mainfrom
cleanup/local-rollback-20260925
Open

Coding-Dev-Tools wants to merge 1 commit into
mainfrom
cleanup/local-rollback-20260925

Conversation

@Coding-Dev-Tools

Copy link
Copy Markdown
Owner

Summary

Treat read/no-op plans as no work, emit one targeted restore for replacements, and remove the blanket stack destroy suggestion.

Co-authored-by: CommandCodeBot <noreply@commandcode.ai>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-25T09:50:58.000977Z 473a211 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

Copy link
Copy Markdown

🤖 Automated Code Review

✅ Ruff Lint — No issues

⚠️ Ruff Format — Formatting needed

unformatted: File would be reformatted
   --> src/deploydiff/cli.py:76:15
    |
75  | )
76  + @click.option("-v", "--verbose", is_flag=True, help="Show before/after details for each change")
77  | @click.option(
    -     "-v", "--verbose", is_flag=True, help="Show before/after details for each change"
    - )
    - @click.option(
78  |     "--exit-on-destroy",
79  |     is_flag=True,
80  |     help="Exit with code 1 if the plan contains destructive changes (deletes or replaces)",
81  | )
    - def preview(
    -     terraform_file, cloudformation_file, pulumi_file, verbose, exit_on_destroy
    - ) -> None:
82  + def preview(terraform_file, cloudformation_file, pulumi_file, verbose, exit_on_destroy) -> None:
83  |     """Preview infrastructure changes from a plan file."""
--------------------------------------------------------------------------------
129 | )
    - def cost(
    -     terraform_file, cloudformation_file, pulumi_file, pricing_file, threshold
    - ) -> None:
130 + def cost(terraform_file, cloudformation_file, pulumi_file, pricing_file, threshold) -> None:
131 |     """Estimate monthly cost impact of infrastructure changes. (Pro feature)"""
--------------------------------------------------------------------------------
199 |     if len(provided) > 1:
    -         console.print(
    -             "[red]Error: Provide only one source file (--tf, --cfn, or --pulumi)[/red]"
    -         )

✅ Secret Detection — Clean

✅ Large Files — Within limits

📊 Diff Stats — 4 file(s) changed

 AGENTS.md                     |  3 +-
 src/deploydiff/rollback.py    | 55 ++++++++++++++++++++++++----------
 tests/test_edge_cases.py      |  5 ++--
 tests/test_rollback_safety.py | 70 +++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 114 insertions(+), 19 deletions(-)

Verdict: ⚠️ Warnings — Lint/format issues found. Recommend fixing before merge.

Automated by Coding-Dev-Tools/.github reusable workflow.

This branch has not been deployed

No deployments
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