Skip to content

Propagate index cancellation through scan and extraction - #2674

Merged
Widthdom merged 11 commits into
mainfrom
codex/fix-issue1841-1818
May 25, 2026
Merged

Propagate index cancellation through scan and extraction#2674
Widthdom merged 11 commits into
mainfrom
codex/fix-issue1841-1818

Conversation

@Widthdom

Copy link
Copy Markdown
Owner

Summary

  • Propagates cancellation tokens through CLI/MCP index scanning, raw file reads, symbol extraction, and reference extraction.
  • Normalizes scan-time cancellation into the existing interrupted JSON/exit-code contract.
  • Adds regression coverage for fresh-index cancellation, dry-run scan cancellation, scanner cancellation, and extractor cancelled-token entry points.

Fixes #1841
Fixes #1818

Validation

  • dotnet build CodeIndex.sln
  • dotnet test tests/CodeIndex.Tests/CodeIndex.Tests.csproj --filter "FullyQualifiedName~FileIndexerTests|FullyQualifiedName~SymbolExtractorTests|FullyQualifiedName~ReferenceExtractorTests|FullyQualifiedName~IndexCommandRunnerTests.Run_CancelDuringFreshIndex_ReturnsInterruptedJson|FullyQualifiedName~IndexCommandRunnerTests.Run_CancelDuringDryRunScan_ReturnsInterruptedJson|FullyQualifiedName~IndexCommandRunnerTests.Run_CancelBeforeFreshScan_ReturnsInterruptedJson"
  • dotnet run --project tools/CodeIndex.Changelog -- check
  • git diff --check
  • Codex adversarial review: No blocking/actionable issues found.

Documentation and changelog

  • TESTING_GUIDE.md
  • changelog.d/unreleased/1818.fixed.md
  • changelog.d/unreleased/1841.fixed.md

Notes

@Widthdom
Widthdom marked this pull request as ready for review May 25, 2026 00:36
# Conflicts:
#	src/CodeIndex/Indexer/Scanning/FileIndexer.cs
@Widthdom
Widthdom merged commit d913058 into main May 25, 2026
10 checks passed
@Widthdom
Widthdom deleted the codex/fix-issue1841-1818 branch May 25, 2026 03:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Propagate CancellationToken through extractor and IO call sites Add signal-injection tests for SIGINT/SIGTERM mid-operation

1 participant