fix: correct reexport query direction and add exports integration tests#276
fix: correct reexport query direction and add exports integration tests#276carlos-alm merged 1 commit intomainfrom
Conversation
|
Claude finished @carlos-alm's task —— View job PR Review Complete ⭐⭐☆☆☆ (2/5 stars)Todo List:
Root Cause AnalysisProblem Being Solved: Add a command to show exported symbols with their consumers. Why This Approach:
Risk Assessment: HIGH - Multiple unrelated major features bundled together. Critical Concerns
|
Greptile SummaryFixes critical reexport detection bug in
Confidence Score: 5/5
Important Files Changed
Last reviewed commit: e223d47 |
Swap source_id/target_id join in reexport detection so barrel files are correctly identified as re-exporters. Add DISTINCT to prevent duplicates. Add comprehensive integration tests for the exports command covering consumer detection, noTests filtering, pagination, and reexport edges. Impact: 1 functions changed, 4 affected
d3cd2e6 to
e223d47
Compare
|
Claude finished @carlos-alm's task —— View job PR Review Complete ⭐⭐⭐⭐☆ (4/5 stars)Todo List:
Phase 1: Root Cause Analysis ✅Problem Being Solved: Fix incorrect reexport query direction in the exports command and add comprehensive test coverage. Why This Approach: This is a targeted bug fix. The reexport detection query was incorrectly joining source_id/target_id, causing barrel files to not be properly identified as re-exporters. The fix swaps the join direction and adds DISTINCT to prevent duplicates. Risk Assessment: LOW - This is a focused bug fix to existing functionality with only 6 line changes and comprehensive test coverage added. Phase 2: Configuration Change Detection ✅No risky configuration changes detected - Phase 3: Test Integrity ✅Strong test quality:
Phase 4: Code Quality ✅Strong implementation quality: Security ✅
SQL Query Analysis ✅
Error Handling ✅
Minor Improvements (Non-blocking)
Final RecommendationStrengths:
Minor Areas for Future Consideration:
This PR represents excellent engineering practices: identify the problem, fix it precisely, test it thoroughly. |
exports <file> command for per-symbol consumer analysis|
All concerns from the review have been addressed by splitting this PR. Scope creep resolved: The AST, CFG, expanded node types, and exports command features were extracted into separate focused PRs and merged independently:
This PR now contains only 2 changes (previously missing from the split):
All regressions (builder.js CFG purge removal, stale docs references) were dropped during the rebase. Full test suite passes: 1306 passed, 0 failed. |
Summary
exportsData— thesource_id/target_idjoin was swapped, causing barrel files to be missed. AddDISTINCTto prevent duplicate entries.exportscommand (tests/integration/exports.test.js) — 6 tests covering exported symbols with consumers, counts, reexport detection,noTestsfiltering, empty results, and pagination.Context
This PR was originally bundled with AST, CFG, and expanded node type features (16 files, 2000+ lines). Those features have been extracted into focused PRs and merged separately:
This PR now contains only the 2 changes that were missing from the split PRs:
src/queries.js)Test plan
npx vitest run tests/integration/exports.test.js(6/6)git diff --stat origin/mainconfirms only 2 files changed