Skip to content

cowork-bot: automated improvements (cowork/improve-deploydiff)#46

Merged
Coding-Dev-Tools merged 12 commits into
mainfrom
cowork/improve-deploydiff
Jul 22, 2026
Merged

cowork-bot: automated improvements (cowork/improve-deploydiff)#46
Coding-Dev-Tools merged 12 commits into
mainfrom
cowork/improve-deploydiff

Conversation

@Coding-Dev-Tools

Copy link
Copy Markdown
Owner

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.

DevForge Engineer and others added 12 commits May 29, 2026 08:39
- 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.
@github-actions

Copy link
Copy Markdown

🤖 Automated Code Review

✅ Ruff Lint — No issues

⚠️ Ruff Format — Formatting needed

Would reformat: src/deploydiff/cli.py
Would reformat: src/deploydiff/cloudformation_parser.py
Would reformat: src/deploydiff/cost_estimator.py
Would reformat: src/deploydiff/diff_renderer.py
Would reformat: src/deploydiff/pulumi_parser.py
Would reformat: src/deploydiff/rollback.py
Would reformat: src/deploydiff/terraform_parser.py
Would reformat: tests/test_deploydiff.py
Would reformat: tests/test_edge_cases.py
9 files would be reformatted, 7 files already formatted

✅ Secret Detection — Clean

✅ Large Files — Within limits

📊 Diff Stats — 13 file(s) changed

 .github/workflows/ci.yml        |  2 +-
 .github/workflows/publish.yml   |  2 +-
 .gitignore                      |  3 --
 AGENTS.md                       |  5 +--
 README.md                       | 19 +++-----
 eslint.config.mjs               | 21 ---------
 package.json                    | 97 +++++++++++++++++++----------------------
 pyproject.toml                  |  4 +-
 src/deploydiff/cli.py           |  2 +-
 src/deploydiff/diff_renderer.py |  2 +
 src/deploydiff/mcp_server.py    |  4 +-
 tests/smoke.test.js             | 26 -----------
 tests/test_deploydiff.py        | 85 +-----------------------------------
 13 files changed, 60 insertions(+), 212 deletions(-)

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

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

@Coding-Dev-Tools
Coding-Dev-Tools merged commit acb3fc1 into main Jul 22, 2026
10 of 11 checks passed
@Coding-Dev-Tools
Coding-Dev-Tools deleted the cowork/improve-deploydiff branch July 22, 2026 00:35
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