Summary
The full test suite can intermittently fail IndexWatchRunnerTests.RunCore_StartupHandoff_ReconcilesMutationAndDrainsBeforeReady_Issue4594 under parallel load because the expected startup-drain event is absent even though startup rescan and watch readiness are emitted.
Observed during unrelated adversarial validation for #4848.
Reproduction evidence
Command:
The failure was at IndexWatchRunnerTests.cs:1291:
Assert.True(startupDrain > startupRescan, capturedOut)
The captured JSON transcript contained the startup rescanned event and later watching/stopped events, but no "status":"updated","phase":"startup" event in the required position. The same test passed when rerun alone on net8.0 (about 13 seconds), which suggests a scheduling/load-sensitive handoff assertion rather than a deterministic product failure.
Expected behavior
The startup-handoff fixture should deterministically prove that a mutation queued at the scan-to-watch boundary is reconciled before readiness, without depending on whether the initial rescan already observes that mutation under full-suite scheduling.
Suggested scope
- Make the fixture's scan/handoff ordering deterministic, or accept the equivalent transcript where the startup rescan already contains the mutation.
- Preserve the core assertion that
AfterHandoff is indexed, BeforeHandoff is removed, and readiness is not emitted before reconciliation.
- Exercise the test under the normal multi-target full-suite load.
Summary
The full test suite can intermittently fail
IndexWatchRunnerTests.RunCore_StartupHandoff_ReconcilesMutationAndDrainsBeforeReady_Issue4594under parallel load because the expected startup-drain event is absent even though startup rescan and watch readiness are emitted.Observed during unrelated adversarial validation for #4848.
Reproduction evidence
Command:
dotnet test --no-restoreThe failure was at
IndexWatchRunnerTests.cs:1291:The captured JSON transcript contained the startup
rescannedevent and laterwatching/stoppedevents, but no"status":"updated","phase":"startup"event in the required position. The same test passed when rerun alone on net8.0 (about 13 seconds), which suggests a scheduling/load-sensitive handoff assertion rather than a deterministic product failure.Expected behavior
The startup-handoff fixture should deterministically prove that a mutation queued at the scan-to-watch boundary is reconciled before readiness, without depending on whether the initial rescan already observes that mutation under full-suite scheduling.
Suggested scope
AfterHandoffis indexed,BeforeHandoffis removed, and readiness is not emitted before reconciliation.