Skip to content

test: delete dead and trivial test files (#4598) - #4616

Merged
Trecek merged 6 commits into
developfrom
impl-delete-dead-test-files-4598-2026-08-15
Aug 16, 2026
Merged

test: delete dead and trivial test files (#4598)#4616
Trecek merged 6 commits into
developfrom
impl-delete-dead-test-files-4598-2026-08-15

Conversation

@Trecek

@Trecek Trecek commented Aug 16, 2026

Copy link
Copy Markdown
Collaborator

Summary

Remove four test files / sections that the audit-tests review validated as dead or trivial — they exercise shutil.copy2 semantics, Python's import machinery, or are unconditionally skipped — and add no production-behavior coverage. The substantive tests in tests/cli/test_cli_marketplace.py (the TestInstallPluginInstallCapableGuard class) are preserved.

ID File Action Verdict
C1.1 tests/recipe/test_audit_trail_artifacts.py DELETE entire file HIGH
C1.3 tests/workspace/test_clone_split.py DELETE entire file HIGH
C1.8 tests/cli/test_cli_marketplace.py (8 useless tests) DELETE; KEEP test_install_requires_typed_request + TestInstallPluginInstallCapableGuard MEDIUM
C6.1 tests/recipe/test_research_sub_recipes.py DELETE entire file HIGH (upgraded from MEDIUM)

Changes

  • tests/recipe/test_audit_trail_artifacts.py — 63 lines / 3 tests deleted. Tests exercised shutil.copy2 (stdlib) directly; never invoked create_worktree.sh.
  • tests/workspace/test_clone_split.py — 27 lines / 3 tests deleted. Tests only asserted callable() / is not None after import — Python import machinery, not production behavior. Sibling test_clone_*.py files provide robust behavioral coverage.
  • tests/recipe/test_research_sub_recipes.py — 111 lines / 4 classes × 4 tests deleted. Class-level fixtures looked in recipes/sub-recipes/ (only research.json/research.yaml); the recipes live in recipes/. All 16 tests unconditionally pytest.skip()-ed at fixture level. Coverage is provided by sibling test_research_{implement,review,archive}_recipe.py and test_bundled_recipes_research_design.py.
  • tests/cli/test_cli_marketplace.py — 56 lines / 8 useless tests removed. Retained test_install_requires_typed_request (real signature contract: install() raises TypeError matching "request") + TestInstallPluginInstallCapableGuard (2 methods driving the real install() guard with monkeypatch-stubbed config/backend). Module-level pytestmark = [pytest.mark.layer("cli"), pytest.mark.small] preserved.
  • .autoskillit/test-source-map.json — regenerated via task coverage-audit; 591 source files mapped, 0 references to deleted paths, 3 surviving references to test_cli_marketplace.py.

Verification

  • pre-commit run --all-files passes on the committed code.
  • Trimmed tests/cli/test_cli_marketplace.py collects exactly 3 tests: test_install_requires_typed_request, TestInstallPluginInstallCapableGuard::test_rejects_when_plugin_install_not_capable, TestInstallPluginInstallCapableGuard::test_passes_guard_when_plugin_install_capable.
  • Cross-reference grep: zero orphan references to deleted file paths in *.py/*.yaml/*.json/*.md (the single match test_research_sub_recipes_declare_food_truck_kind lives in the surviving test_research_sub_recipe_rules.py and is independent of the deleted file).

Closes #4598

Implementation Plan

Plan file: .autoskillit/temp/make-plan/delete_dead_test_files_4598_plan_2026-08-15_120000.md

🤖 Generated with Claude Code via AutoSkillit

Trecek added 6 commits August 15, 2026 17:07
…reate_worktree.sh)

C1.1 from issue #4598 audit-tests review. The 3 tests in this file
exercised shutil.copy2 (stdlib) directly — never invoking
src/autoskillit/recipes/scripts/create_worktree.sh. They verified
stdlib behavior, not production behavior.

No sibling coverage loss: tests/recipe/test_create_worktree_script.py
and tests/recipe/test_create_worktree_functional.py already exist
and are independent of this module.

Issue: #4598
Finding: C1.1 (HIGH)
C1.3 from issue #4598 audit-tests review. The 3 tests in this file
only asserted callable() or is not None after import — they verify
Python's import machinery, not production behavior.

Sibling coverage is robust:
- tests/workspace/test_clone_detect.py: TestClassifyRemoteUrl (11+ tests)
- tests/workspace/test_clone_remote.py: TestCloneRemoteUrlResolution,
  TestProbeSingleRemote, TestProbeCloneSourceUrl
- tests/workspace/test_clone_core.py: 20+ behavioral tests calling
  clone_repo() directly

Issue: #4598
Finding: C1.3 (HIGH)
…ctory)

C6.1 from issue #4598 audit-tests review. The 4 test classes
(TestResearchDesignSubRecipe, TestResearchImplementSubRecipe,
TestResearchReviewSubRecipe, TestResearchArchiveSubRecipe) all
use class-scoped fixtures that look in builtin_sub_recipes_dir()
('recipes/sub-recipes/') — but research-{design,implement,review,
archive}.yaml live at builtin_recipes_dir() ('recipes/').

src/autoskillit/recipes/sub-recipes/ contains only research.json and
research.yaml. Every test in this file exits via pytest.skip() before
reaching any assertion. Deletion removes zero coverage.

Coverage is provided by sibling files (existed before this change):
- tests/recipe/test_bundled_recipes_research_design.py
- tests/recipe/test_research_implement_recipe.py
- tests/recipe/test_research_review_recipe.py
- tests/recipe/test_research_archive_recipe.py

Issue: #4598
Finding: C6.1 (HIGH, upgraded from MEDIUM)
…tive tests)

C1.8 from issue #4598 audit-tests review. Removed 8 tests that only
verified Python import machinery, string-source substring matches,
or hasattr() checks — none asserted real production behavior:

Deleted (lines 23-30, 39-82 of the pre-trim file):
- test_marketplace_module_exists (line 23) -- pass with comment
- test_install_importable_from_marketplace (line 28) -- bare import
- test_upgrade_importable_from_marketplace (line 40) -- bare import
- test_ensure_marketplace_importable_from_marketplace (line 45)
- test_install_defined_in_app_module (line 50) -- inspect.getsource substring
- test_install_registered_as_cli_command (line 61) -- hasattr()
- test_upgrade_is_registered_as_cli_command (line 69) -- substring
- test_marketplace_module_still_importable (line 80) -- bare import

Preserved (the 3 real tests):
- test_install_requires_typed_request (real signature contract:
  install() raises TypeError matching 'request' without request kwarg)
- TestInstallPluginInstallCapableGuard.test_rejects_when_plugin_install_not_capable
- TestInstallPluginInstallCapableGuard.test_passes_guard_when_plugin_install_capable

Module-level pytestmark preserved (layer + small markers intact).
Imports and _direct_request() helper preserved.

Issue: #4598
Finding: C1.8 (MEDIUM)
Auto-generated by scripts/compare-coverage-ast.py --mode build-test-source-map
via 'task coverage-audit'. This derived artifact dropped the deleted file
paths (test_audit_trail_artifacts, test_clone_split, test_research_sub_recipes)
and retained the surviving test_cli_marketplace.py reference (3 entries).
591 source files mapped.
Reviewer finding (warning/bugs) flagged that deletion of MK-DEP-2 removed
the only test verifying 'def upgrade(' is exposed in cli/app.py. While
tests/cli/test_install.py already covers the install CLI surface via
app(['install']) and test_app_install_* family tests, no test covered
the upgrade command registration — only test_upgrade_uses_atomic_write
imports upgrade from autoskillit.cli._marketplace, not cli.app.

Add a regression guard that exercises app(['upgrade']) and asserts the
command dispatches to the registered @app.command wrapper. Tests the
actual dispatch boundary, not source-text grep.
@Trecek
Trecek added this pull request to the merge queue Aug 16, 2026
Merged via the queue into develop with commit ce74666 Aug 16, 2026
4 checks passed
@Trecek
Trecek deleted the impl-delete-dead-test-files-4598-2026-08-15 branch August 16, 2026 02:21
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