fix: close v1.8 post-merge integration gaps#44
Conversation
Addresses 5 live code gaps left after PRs #39 and #40 merged: 1. Delete orphaned get-component-usage source file (already removed from dispatcher in PR #39, but file remained on disk causing confusion) 2. Remove 'get_component_usage' from INDEX_CONSUMING_TOOL_NAMES allowlist in src/index.ts. The dispatcher no longer routes to this tool, so the allowlist entry created a phantom entry that would be validated during test runs despite not being available. 3. Remove get_component_usage branch from args dispatch ternary in index-versioning-migration test. Now that the tool is removed, this branch is dead code and should not be validated. 4. Replace guidance strings in search-quality.ts that still directed agents to the removed get_component_usage tool. Both instances now point to get_symbol_references, which covers the same use case. 5. Add fallback decision card when intelligence.json is absent in search-codebase.ts. Previously, preflight would silently skip when intelligence was missing, leaving users without guidance. Now returns ready=false with actionable nextAction message. All changes verified: - Zero references to get_component_usage in src/ and tests/ - Index-versioning-migration test passes (5/5) - Full test suite: 231/234 passing (3 pre-existing timeouts)
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Greptile SummaryThis PR systematically removes all remaining references to the deleted Key changes:
All changes are cleanup items ensuring codebase consistency after recent PRs. Test suite shows 231/234 passing (3 pre-existing timeout issues unrelated to this PR). Confidence Score: 5/5
|
| Filename | Overview |
|---|---|
| src/core/search-quality.ts | Updated guidance strings to reference get_symbol_references instead of deleted get_component_usage |
| src/index.ts | Removed get_component_usage from INDEX_CONSUMING_TOOL_NAMES allowlist |
| src/tools/get-component-usage.ts | Deleted orphaned source file (tool was removed from dispatcher in PR #39) |
| src/tools/search-codebase.ts | Added fallback logic when intelligence.json is missing during edit-intent searches |
| tests/index-versioning-migration.test.ts | Removed dead ternary branch for get_component_usage from test args dispatch |
Last reviewed commit: ba81735
There was a problem hiding this comment.
Pull request overview
Closes remaining v1.8 integration gaps after removing get_component_usage and introducing the edit decision card, ensuring allowlists, tests, and guidance strings align with current tooling and adding a clearer preflight fallback when intelligence.json is missing.
Changes:
- Removed the orphaned
get_component_usagetool implementation and eliminated remaining references in allowlists/tests/guidance. - Updated search-quality guidance to recommend
get_symbol_referencesinstead of the deleted tool. - Added a preflight fallback that returns
ready: falsewith a rebuild instruction whenintelligence.jsonis absent for edit-like intents.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/index-versioning-migration.test.ts | Removes dead test arg dispatch branch for the deleted tool. |
| src/tools/search-codebase.ts | Adds preflight fallback when pattern intelligence is missing for edit/refactor/migrate intents. |
| src/tools/get-component-usage.ts | Deletes orphaned tool source file no longer routed by the dispatcher. |
| src/index.ts | Removes phantom allowlist entry for the deleted tool. |
| src/core/search-quality.ts | Updates guidance strings to point to get_symbol_references. |
| internal-docs | Advances submodule pointer to include updated internal tracking docs. |
| CHANGELOG.md | Records the post-merge gap fixes and the new preflight fallback behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| if (intent && preflightIntents.includes(intent)) { | ||
| if (!intelligence) { | ||
| preflight = { | ||
| ready: false, |
There was a problem hiding this comment.
The new fallback preflight object appears to be a different shape than the normal decisionCard assigned later (preflight = decisionCard). If downstream consumers/UI expect a consistent preflight card schema, this can cause rendering/handling inconsistencies. Consider returning a fallback object that matches the same card/schema (e.g., same top-level fields as decisionCard) while still conveying ready: false and the rebuild guidance.
| ready: false, | |
| ready: false, | |
| mode: 'lite', | |
| riskLevel: 'low', | |
| confidence: computeIndexConfidence(), | |
| evidenceLock: null, |
| if (intent && preflightIntents.includes(intent)) { | ||
| if (!intelligence) { | ||
| preflight = { | ||
| ready: false, | ||
| nextAction: 'Run a full index rebuild to generate pattern intelligence before editing.' | ||
| }; | ||
| } else { |
There was a problem hiding this comment.
This introduces new observable behavior when intelligence.json is missing (returning a preflight payload with ready: false and nextAction). Add/extend a test that exercises an edit/refactor/migrate intent with missing intelligence to assert the response includes this fallback, so regressions don't silently bring back the previously-skipped preflight.
Summary
Fixes 5 live code gaps left behind after PRs #39 and #40 merged. These are cleanup items that ensure the codebase is consistent after the removal of
get_component_usageand the introduction of the edit decision card.Changes
Delete orphaned source file —
src/tools/get-component-usage.tswas removed from the dispatcher in feat: references confidence, remove get_component_usage, ranked search hints (#08) #39 but the source file remained on disk, creating confusion about whether the tool still exists.Remove phantom allowlist entry —
'get_component_usage'was still inINDEX_CONSUMING_TOOL_NAMESeven though the dispatcher no longer routes to this tool. This caused the validation test to check for a non-existent tool.Clean up test args dispatch — The ternary in the index-versioning-migration test still had a branch for
get_component_usage. Removed dead code.Update guidance strings — Both
src/core/search-quality.tsguidance strings (zero-results and low-confidence paths) still directed agents to useget_component_usage. Now they point toget_symbol_references, which covers the same use cases.Add fallback preflight logic — When
intelligence.jsonis absent, the preflight card was silently skipped. Now it returnsready: falsewith anextActionmessage telling users to rebuild the index.Documentation
internal-docs/next.mdcapturing 5 deferred gaps from the v1.8.0 audit (non-blocking items for v1.8.1/v1.9.0)Testing
get_component_usagein src/ and tests/Verification
Run the tests:
pnpm vitest run tests/index-versioning-migration.test.ts pnpm testVerify no phantom references:
grep -rn "get_component_usage" src/ tests/