Skip to content

fix(rollback): prevent dangerous blanket destroy and add rollback safety tests - #50

Open
Coding-Dev-Tools wants to merge 2 commits into
mainfrom
sync/rollback-safety-and-install-fix
Open

Coding-Dev-Tools wants to merge 2 commits into
mainfrom
sync/rollback-safety-and-install-fix

Conversation

@Coding-Dev-Tools

Copy link
Copy Markdown
Owner

Implements short-circuit for empty plans, fixes contradictory create-before-delete rollback commands, adds regression test suite, and updates package-lock.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@github-actions

github-actions Bot commented Oct 2, 2026

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 — 5 file(s) changed

 AGENTS.md                     |    3 +-
 package-lock.json             | 1106 +++++++++++++++++++++++++++++++++++++++++
 src/deploydiff/rollback.py    |   43 +-
 tests/test_edge_cases.py      |    5 +-
 tests/test_rollback_safety.py |   50 ++
 5 files changed, 1195 insertions(+), 12 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.

2 participants