Skip to content

full-scan symbol extraction timeouts should ensure extractor tasks stop #3048

Description

@Widthdom

Problem

The full-scan path starts symbol extraction in a task, cancels the linked token after a timeout, waits one additional second, and then throws even if the extraction task is still running.

Evidence:

  • src/CodeIndex/Cli/IndexCommandRunner.FullScan.cs:116
  • src/CodeIndex/Cli/IndexCommandRunner.FullScan.cs:133
  • src/CodeIndex/Cli/IndexCommandRunner.FullScan.cs:145

A non-cooperative extractor can continue consuming CPU or holding resources after the index command has already failed.

Suggested fix

Ensure extractors observe cancellation promptly, wait for a confirmed stop before returning failure, or isolate timeout-bounded extraction so abandoned work cannot continue in the process. Add a regression test with a deliberately non-cooperative extractor.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions