Commit acb3fc1
cowork-bot: automated improvements (cowork/improve-deploydiff) (#46)
* build, test: fix packaging config and add edge-case tests
- 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
* style: fix ruff I001 import ordering in test_edge_cases.py
* fix: remove unused imports in edge case tests (ruff F401)
* cowork-bot: fix click_to_mcp eager import breaks all tests when not installed
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.
* cowork-bot: seed cowork-auto-pr workflow for PR automation
* chore: declare revenueholdings_license as optional 'license' extra
* cowork-bot: fix duplicate optional-dependency key in pyproject.toml
* cowork-bot: fix DELETE_BEFORE_CREATE cost estimation + deepcopy pricing 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.
* cowork-bot: raise explicit FileNotFoundError for non-JSON/non-file parser 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.
* cowork-bot: fix cowork-auto-pr workflow (add checkout step so PR opens)
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.
---------
Co-authored-by: DevForge Engineer <engineer@devforge.dev>
Co-authored-by: cowork-bot <cowork@revenueholdings.dev>1 parent 71aa2f4 commit acb3fc1
0 file changed
0 commit comments