Skip to content

Post-extraction hooks should run with cancellation or time budgets #2877

Description

@Widthdom

Summary

Post-extraction extension hooks currently run synchronously without cancellation or an explicit time budget.

Evidence

src/CodeIndex/Indexer/Hooks/PostExtractionHooks.cs invokes hook methods such as OnSymbolsExtracted and OnReferencesExtracted under the hook runner flow. A buggy or slow hook can block indexing progress.

Impact

The extension point is useful, but one problematic hook can make indexing appear hung or unbounded. This makes hook failures hard to diagnose and can reduce trust in the indexer.

Suggested enhancement

Run hook callbacks with cancellation/time-budget support, record hook duration/failure diagnostics, and make the timeout behavior configurable or at least visible in status/log output.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions