Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@

- Null-pointer crash in GenericAnalyzer when chunk content is undefined.
- Tree-sitter symbol extraction now treats node offsets as UTF-8 byte ranges and evicts cached parsers on failures/timeouts.
- **Post-merge integration gaps** (v1.8 audit): Removed orphaned `get_component_usage` source file, deleted phantom allowlist entry, removed dead guidance strings referencing the deleted tool. Added fallback decision card when `intelligence.json` is absent during edit-intent searches, now returns `ready: false` with actionable guidance instead of silently skipping.

## [1.6.2] - 2026-02-17

Expand Down
2 changes: 1 addition & 1 deletion internal-docs
4 changes: 2 additions & 2 deletions src/core/search-quality.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export function assessSearchQuality(
nextSteps: [
'Try a narrower query with one concrete symbol, route, or file hint.',
'Apply search filters (framework/language/componentType/layer).',
'Use get_component_usage for dependency or wiring lookups.'
'Use get_symbol_references to find where a specific symbol is used across the codebase.'
]
};
}
Expand Down Expand Up @@ -76,7 +76,7 @@ export function assessSearchQuality(
nextSteps: [
'Add one or two concrete symbols, routes, or file hints to the query.',
'Apply filters (framework/language/componentType/layer) to narrow candidates.',
'Use get_component_usage when the question is about wiring or usages.'
'Use get_symbol_references when the question is about where a symbol or function is used.'
]
})
};
Expand Down
1 change: 0 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ const LEGACY_PATHS = {
export const INDEX_CONSUMING_TOOL_NAMES = [
'search_codebase',
'get_symbol_references',
'get_component_usage',
'detect_circular_dependencies',
'get_team_patterns',
'get_codebase_metadata'
Expand Down
108 changes: 0 additions & 108 deletions src/tools/get-component-usage.ts

This file was deleted.

23 changes: 15 additions & 8 deletions src/tools/search-codebase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -439,12 +439,18 @@ export async function handle(
// Compose preflight card for edit/refactor/migrate intents
let preflight: any = undefined;
const preflightIntents = ['edit', 'refactor', 'migrate'];
if (intent && preflightIntents.includes(intent) && intelligence) {
try {
// --- Avoid / Prefer patterns ---
const avoidPatternsList: any[] = [];
const preferredPatternsList: any[] = [];
const patterns = intelligence.patterns || {};
if (intent && preflightIntents.includes(intent)) {
if (!intelligence) {
preflight = {
ready: false,
Copy link

Copilot AI Feb 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
ready: false,
ready: false,
mode: 'lite',
riskLevel: 'low',
confidence: computeIndexConfidence(),
evidenceLock: null,

Copilot uses AI. Check for mistakes.
nextAction: 'Run a full index rebuild to generate pattern intelligence before editing.'
};
} else {
Comment on lines +442 to +448
Copy link

Copilot AI Feb 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
try {
// --- Avoid / Prefer patterns ---
const avoidPatternsList: any[] = [];
const preferredPatternsList: any[] = [];
const patterns = intelligence.patterns || {};
for (const [category, data] of Object.entries<any>(patterns)) {
// Primary pattern = preferred if Rising or Stable
if (data.primary) {
Expand Down Expand Up @@ -658,8 +664,9 @@ export async function handle(
}

preflight = decisionCard;
} catch {
// Preflight construction failed — skip preflight, don't fail the search
} catch {
// Preflight construction failed — skip preflight, don't fail the search
}
}
}

Expand Down
10 changes: 4 additions & 6 deletions tests/index-versioning-migration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -461,13 +461,11 @@ describe('index-consuming allowlist enforcement', () => {
? { query: 'test' }
: toolName === 'get_symbol_references'
? { symbol: 'alpha' }
: toolName === 'get_component_usage'
? { name: 'x' }
: toolName === 'detect_circular_dependencies'
: toolName === 'detect_circular_dependencies'
? {}
: toolName === 'get_team_patterns'
? {}
: toolName === 'get_team_patterns'
? {}
: {}
: {}
}
});

Expand Down
Loading