cowork-bot: automated improvements (cowork/improve-deploydiff)#46
Merged
Conversation
- Adds include-package-data + [tool.setuptools.package-data] deploydiff = ['py.typed'] - Fixes known-first-party from ['*'] to ['deploydiff'] - Adds test_edge_cases.py with 11 tests (render cost decrease/increase, load_plan no-input, load_pricing nonexistent/custom, pulumi rollback, cloudformation rollback with/without raw_data, packaging parity) - Fixes ruff import sorting (I001) across 1 source + nested imports in tests
…nstalled cli.py imported run_for_app from mcp_server at module level; mcp_server.py imported click_to_mcp at module level. click_to_mcp is an optional dep, so any environment without it (CI, pip install deploydiff without [mcp]) raised ModuleNotFoundError on import of cli — making the entire test suite fail at collection time. Fix: lazy imports in both files — click_to_mcp is now imported only inside the functions that need it (run_mcp / run_for_app / mcp()), with a clear error message + exit 1 when missing. All 97 existing tests pass; ruff clean.
…ng defaults - Remove DELETE_BEFORE_CREATE from the zero-after-cost guard so replacements report the new resource cost instead of $0. - Use copy.deepcopy for DEFAULT_PRICICING to prevent global state mutation from custom pricing loads leaking across calls/tests. - Add regression test for delete-before-create after cost.
…rser input All three parsers (Terraform, CloudFormation, Pulumi) now validate the input path before open() and raise a clear FileNotFoundError when the input is neither valid JSON nor an existing file, instead of a cryptic error from open(). Also removed dead no-op .get() calls in terraform_parser and cloudformation_parser that silently discarded results (silent-failure traps). Adds tests/test_parse_errors.py (9 tests). 119 passed, ruff clean.
The previous copy omitted actions/checkout, so gh pr create failed with 'not a git repository' and no PR was ever opened. Add the checkout step (fetch-depth: 0) so the server-side workflow can diff head against base and open the PR.
🤖 Automated Code Review✅ Ruff Lint — No issues
|
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.
Automated improvement PR from the Cowork repo-improver rotation (one coherent senior-dev improvement per run; see individual commit messages). Subsequent runs push additional commits to this PR rather than opening new ones.