Repository navigation
fix(generation): emit file pages for test infrastructure, fixtures, and e2e helpers (#1497) - #2018
Conversation
|
Thanks @Nithin0620, and sorry this sat three weeks without a reply. To set expectations first: #1842 was open against #1497 from 22 August and @sloemo01 had claimed the issue in-thread, so that one had priority on date and on the claim. It merged a few minutes ago. That does not make this a duplicate, and I want to be clear about why, because the two of you attacked genuinely different layers. #1842 is the Yours is the norm = path.replace("\\", "/")
if norm.startswith("tests/") or "/tests/" in norm:
return FalseSo Two things before this can go in, and please rebase first since #1842 changed the neighbourhood. The substantive one is cost. Replacing a path-prefix check with The smaller one:
|
…ures
- Delegate _passes_importance_floor to is_test_path from test_paths instead of naive path checks
- Exempt test support and fixture files from _PENALTY_TEST in candidate scoring
- Register test fixture stems and suffixes on TypeScript and JavaScript specs
- Add test coverage for test infrastructure and e2e fixture file page selection
Fixes repowise-dev#1497
4b5275e to
4a20c44
Compare
Thanks @RaghavChamadiya for the clear feedback and guidance!
All unit tests and selection contract tests are passing green. Ready for your review! |
|
Thanks @Nithin0620 for rebasing, cleaning up the There is one correctness problem in the updated classifier. For this PR, The rebase and cost evidence are good. Fix that classification leak and the branch is ready for another pass. |
|
Both red tests are the same cause, and it needs a decision rather than a fix. The specs now carry That gives two honest paths:
Either way I would not edit the goldens quietly, since the next person to touch test detection reads them as the contract. For a fast local loop, the two tests are pinned to |
…try parity - Revert test_fixture_stems and test_stem_suffixes additions on JS/TS specs to prevent global classification leaks and restore TestParityGoldens historical sets. - Contextually classify fixture stems (_SUPPORT_STEMS_IN_TEST_TREE) as test support only when under a test directory tree. - Add negative tests asserting production paths like src/fixtures.ts, src/fixtures.py, and lib/fixtures.go stay unclassified as tests.
|
Thanks @RaghavChamadiya and @sloemo01 for Suggesting These changes ! I've updated the branch with the following changes:
|
|
@Nithin0620, sorry this sat three weeks after you answered both rounds of feedback. The shape is right and it is what we want for #1497: spec files stay out ( It conflicts with main now. Please rebase (or merge main in) and I will review it for merge in the next pass. |
Port the selector and scoring change onto main's is_test-based floor: test support (is_test_support_path) passes the importance floor and skips the test penalty. Keep fixture stems as a support demotion inside a test tree only, without widening ambiguous spec/ dirs into test trees.
RaghavChamadiya
left a comment
There was a problem hiding this comment.
Thanks @Nithin0620, and thanks for your patience. Keeping fixtures contextual so src/fixtures.py stays production was the important part. We merged main in, ported the floor and penalty changes onto main's selector, and measured the cost: 16 more file pages on this repo.
Summary
file_pagegeneration so test infrastructure and fixture files are included, allowingget_answerto retrieve test conventions and infrastructure documentation.Related Issues
Closes #1497
Test Plan
pytest)ruff check .)npm run build) (not applicable — no frontend changes)Verification
pytest tests/unit/generation/test_selection_contract.py tests/unit/test_test_paths.py— 187 tests passedChecklist