Found while dogfooding the locally built cdidx on branch codex/search-audit-issues-20260619.
Duplicate check: no open issue found for BackgroundTaskObserver shutdown cancellation Task.Run CancellationToken.None.
Evidence:
BackgroundTaskObserver observes background work via Task.Run using a non-shutdown cancellation token.
Problem:
Observer tasks should participate in process shutdown so cancellation, disposal, and test teardown do not depend on fire-and-forget scheduling behavior.
Acceptance criteria:
- Thread an appropriate shutdown token into background observer scheduling.
- Preserve existing exception observation behavior.
- Add tests or teardown coverage proving observer work does not outlive shutdown unexpectedly.
Found while dogfooding the locally built
cdidxon branchcodex/search-audit-issues-20260619.Duplicate check: no open issue found for
BackgroundTaskObserver shutdown cancellation Task.Run CancellationToken.None.Evidence:
BackgroundTaskObserverobserves background work viaTask.Runusing a non-shutdown cancellation token.Problem:
Observer tasks should participate in process shutdown so cancellation, disposal, and test teardown do not depend on fire-and-forget scheduling behavior.
Acceptance criteria: