Route scripts/*.py files through manifest in test filter#3388
Merged
Trecek merged 3 commits intoMay 31, 2026
Conversation
Modify build_test_scope() so .py files outside src/ and tests/ consult the manifest before returning UNMAPPED_FILE, mirroring the existing non-.py branch. Add per-script manifest entries for all 10 scripts/*.py files, mapping each to its verified test consumer. Add orphan detection function that includes Python files outside src/ and tests/ (so the 10 new patterns pass the orphan test). Update docstrings/comments that incorrectly restricted the manifest to non-Python files. Add 5 tests: 4 unit tests covering manifest match/no-match/None-manifest/mixed scenarios, and 1 integration test using the real manifest file. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Move 4 script manifest routing tests from test_test_filter.py (1032 lines) to test_test_filter_script_manifest.py, bringing the main file to 972 lines and satisfying the test_test_suite_oversized_files_split arch constraint. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The test_scope_mixed_script_and_src_py test claimed to verify both manifest and cascade contributions but only asserted 'infra' (manifest half). Add assertion for 'core' (cascade half) so cascade regression is detected. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
6047410 to
229ab7c
Compare
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.
Summary
Modify
build_test_scope()intests/_test_filter.pyso that.pyfiles outsidesrc/andtests/consult the manifest before returningUNMAPPED_FILE. Add per-script manifest entries to.autoskillit/test-filter-manifest.yamlmapping eachscripts/*.pyto its verified test consumer directory. Update the manifest orphan detection test to handle Python-file patterns. Update docstrings and comments that incorrectly restrict the manifest to "non-Python" files.Motivation
The test filter currently routes
scripts/*.pyfiles toUNMAPPED_FILE(causing a full run) because they fall through the.pybranch without a manifest lookup. Tenscripts/*.pyfiles have verified test consumers intests/infra/,tests/docs/,tests/arch/, andtests/hooks/, but the manifest only covered.shfiles underscripts/. This change routes those Python scripts through the same manifest mechanism, reducing unnecessary full runs.Requirements
build_test_scope()line 1330–1331 to attempt manifest lookup for non-src/non-test.pyfiles before returningUNMAPPED_FILE.autoskillit/test-filter-manifest.yamlwith correct test directory mappingsscripts/*.pymanifest routing worksscripts/*.shandscripts/recipe/*.shentries remain unaffectedChanges
New Files
tests/test_test_filter_script_manifest.py— unit tests forscripts/*.pymanifest routingModified Files
.autoskillit/test-filter-manifest.yaml— added 10scripts/*.pyentries with verified test directory mappingssrc/autoskillit/_test_filter.py—build_test_scope()now callsapply_manifest()for non-src/non-test.pyfiles; updated docstrings to remove "non-Python" qualifiertests/_test_filter.py— addedTestBuildTestScopecases for script manifest routingtests/CLAUDE.md— updated classification description to reflect that "other Python" also uses manifest lookuptests/infra/test_filter_activation.py— added integration test with real manifesttests/infra/test_manifest_completeness.py— added_tracked_files_for_orphan_check()to includescripts/*.pyfiles in orphan detection; updated docstringsTest Plan
tests/test_test_filter_script_manifest.pypass (4 cases: manifest match, no match, None manifest, mixed with src/*.py)test_build_test_scope_routes_known_script_via_manifestintests/infra/test_filter_activation.pypassestest_manifest_pattern_matches_real_filepasses for all 10 newscripts/*.pypatternstest_file_covered_by_manifestcontinues to parametrize over non-Python files onlytask test-checkpassespre-commit run --all-filespassesClosing Issue
Fixes #3369.
Plan:
.autoskillit/temp/make-plan/add_scripts_py_manifest_entry_plan_2026-05-30_210500.md🤖 Generated with Claude Code via AutoSkillit
Token Usage Summary
* Step used a non-Anthropic provider; caching behavior may differ.
Token Efficiency
Model Usage Breakdown