Skip to content

Fix cancellation propagation through plain search - #5428

Merged
Widthdom merged 3 commits into
mainfrom
fix-issue5421
Sep 23, 2026
Merged

Widthdom merged 3 commits into
mainfrom
fix-issue5421

Conversation

@Widthdom

@Widthdom Widthdom commented Sep 22, 2026 •

Copy link
Copy Markdown
Owner

Plain search previously discarded the caller's cancellation token, so even a pre-cancelled strict count query could return a normal result. Carry the token through the execution plan and database setup, apply scoped reader cancellation and SQLite interruption, and preserve cancellation through managed classification, source loading and aggregation before output.

Regression coverage exercises pre-cancelled rows/counts/aggregations and cancellation inside real SQLite statements through direct calls, the CLI, and serial/parallel batches. It also checks managed C#/Python classification, reader token restoration, and cancellation at the first/last aggregation group. FTS hits, exact misses and --allow-partial retain interruption precedence. Update both languages in USER_GUIDE.md and TESTING_GUIDE.md, with changelog fragment changelog.d/unreleased/5421.fixed.md.

Fixes #5421

Validation

  • make lint: passed.
  • dotnet build: passed, no warnings or errors.
  • The pre-cancelled reproduction failed before the fix. The new cancellation fixture passed afterward in Debug net8.0 and Release net8.0/net9.0.
  • Final Release search/batch/find/core, scoped cancellation, origin and same-symbol regression groups: 476 passed on each runtime.
  • Final Release envelope/search fixture groups: net8.0 101 passed; net9.0 100 passed, 1 existing skip.
  • Initial Release CLI/envelope test groups also passed: net8.0 263; net9.0 136, with 82 existing skips.
  • dotnet run --project tools/CodeIndex.Changelog -- check: passed.
  • git diff --check: passed.
  • Post-commit rebuild and root/workspace index health checks: passed.
  • Codex adversarial review: addressed all three first-round findings; second round reported No blocking/actionable issues found.

Follow-up

#5427

@Widthdom
Widthdom merged commit 0070379 into main Sep 23, 2026
12 checks passed
@Widthdom
Widthdom deleted the fix-issue5421 branch September 23, 2026 00:55
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 cancellation from RunSearch to plain search execution

1 participant