claude-dev-env 8.32.1 → 8.32.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -184,3 +184,54 @@ def test_a_node_fix_whose_changed_test_fails_on_head_fails(
184
184
 
185
185
  assert _run_check(repository_root, "fix(bin): sum operands", base_revision) == 1
186
186
  assert "fails on the head" in capsys.readouterr().err
187
+
188
+
189
+ BUGGY_GREETING_TEXT = 'def greet() -> str:\n return "helo"\n'
190
+ FIXED_GREETING_TEXT = 'def greet() -> str:\n return "hello"\n'
191
+ GREETING_TEST_TEXT = (
192
+ "from greet import greet\n\n\ndef test_greet_spells_hello() -> None:\n"
193
+ ' assert greet() == "hello"\n'
194
+ )
195
+ MERGE_REF_FIRST_PARENT = "HEAD^1"
196
+
197
+
198
+ def _merge_ref_after_base_moved(
199
+ tmp_path: Path, all_pull_request_files: dict[str, str]
200
+ ) -> Path:
201
+ repository_root = repository_with_root_pytest_config(tmp_path)
202
+ _commit_files(
203
+ repository_root,
204
+ {"pkg/calc.py": BUGGY_PRODUCTION_TEXT, "other/greet.py": BUGGY_GREETING_TEXT},
205
+ )
206
+ run_git(repository_root, "checkout", "-b", "pull-request")
207
+ _commit_files(repository_root, all_pull_request_files)
208
+ run_git(repository_root, "checkout", "main")
209
+ _commit_files(
210
+ repository_root,
211
+ {"other/greet.py": FIXED_GREETING_TEXT, "other/test_greet.py": GREETING_TEST_TEXT},
212
+ )
213
+ run_git(repository_root, "merge", "--no-ff", "--no-edit", "pull-request")
214
+ return repository_root
215
+
216
+
217
+ def test_a_fix_without_its_own_test_fails_when_the_base_branch_moved_with_a_test(
218
+ tmp_path: Path, capsys: pytest.CaptureFixture[str]
219
+ ) -> None:
220
+ repository_root = _merge_ref_after_base_moved(
221
+ tmp_path, {"pkg/calc.py": FIXED_PRODUCTION_TEXT}
222
+ )
223
+
224
+ assert _run_check(repository_root, "fix: sum operands", MERGE_REF_FIRST_PARENT) == 1
225
+ assert "no Python or Node test" in capsys.readouterr().err
226
+
227
+
228
+ def test_a_fix_on_a_moved_base_branch_judges_only_its_own_test(
229
+ tmp_path: Path, capsys: pytest.CaptureFixture[str]
230
+ ) -> None:
231
+ repository_root = _merge_ref_after_base_moved(
232
+ tmp_path,
233
+ {"pkg/calc.py": FIXED_PRODUCTION_TEXT, "pkg/test_calc.py": PROOF_TEST_TEXT},
234
+ )
235
+
236
+ assert _run_check(repository_root, "fix: sum operands", MERGE_REF_FIRST_PARENT) == 0
237
+ assert "fix_pr_test_proof: 1 changed test(s)" in capsys.readouterr().out
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-dev-env",
3
- "version": "8.32.1",
3
+ "version": "8.32.2",
4
4
  "description": "Claude Code development standards — rules, hooks, agents, commands, and skills",
5
5
  "type": "module",
6
6
  "bin": {