From 0699c620c47ea24b04e8e35eea79ff7a4221ddc3 Mon Sep 17 00:00:00 2001 From: realtonyyoung <6655045+realtonyyoung@users.noreply.github.com> Date: Mon, 31 Aug 2026 15:13:53 -0400 Subject: [PATCH 1/2] Exclude the Cursor telemetry spawn test from the whole assembly (#720) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The spawn override is a process-wide static, so the class's env-override key let a concurrent peer's spawn land in this test's list — the id it saw was another class's session-id constant. Co-Authored-By: Claude Opus 5 --- .../Commands/Harness/CursorHookCommandTests.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/Capacitor.Cli.Tests.Unit/Commands/Harness/CursorHookCommandTests.cs b/test/Capacitor.Cli.Tests.Unit/Commands/Harness/CursorHookCommandTests.cs index 22bbb1038..975bb0bdb 100644 --- a/test/Capacitor.Cli.Tests.Unit/Commands/Harness/CursorHookCommandTests.cs +++ b/test/Capacitor.Cli.Tests.Unit/Commands/Harness/CursorHookCommandTests.cs @@ -144,7 +144,9 @@ public async Task spool_drain_runs_before_current_event_under_budget() { // is still stuck undelivered. Simulates: sessionStart is already spooled from a prior failed // invocation; this invocation's top-of-method drain retries it and hits a transient failure // (503) so it stays queued, while postToolUse's own POST succeeds. - [Test] + // Bare NotInParallel: the spawn override is process-wide, so any concurrent peer's spawn lands + // in this list. The class key is not enough — its cohort excludes only the env-override readers. + [Test, NotInParallel] public async Task telemetry_hook_does_not_recovery_spawn_while_an_earlier_canonical_event_is_still_stuck() { var sid = Guid.NewGuid().ToString("N"); var spool = new HookSpool(Config.PathTo("spool")); From f34827bd4b3bb658b20a2bed03945d40d5601828 Mon Sep 17 00:00:00 2001 From: realtonyyoung <6655045+realtonyyoung@users.noreply.github.com> Date: Mon, 31 Aug 2026 16:20:02 -0400 Subject: [PATCH 2/2] Exclude the guard tests that install the watcher process starter Same seam as the spawn override above it: process-global, written and nulled per test, and every other writer of it already runs alone. Co-Authored-By: Claude Opus 5 --- .../Commands/UnusableUrlGuardTests.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/Capacitor.Cli.Tests.Unit/Commands/UnusableUrlGuardTests.cs b/test/Capacitor.Cli.Tests.Unit/Commands/UnusableUrlGuardTests.cs index 9c33d5900..dcefad7fb 100644 --- a/test/Capacitor.Cli.Tests.Unit/Commands/UnusableUrlGuardTests.cs +++ b/test/Capacitor.Cli.Tests.Unit/Commands/UnusableUrlGuardTests.cs @@ -13,6 +13,10 @@ namespace Capacitor.Cli.Tests.Unit.Commands; /// catch-all every one of these paths already has, so an effect-only assertion passes with the guard /// deleted; six review rounds found exactly that, repeatedly. /// +// The two spawn guards below install WatcherManager.ProcessStarterForTesting and Dispose nulls it, +// both process-global: a concurrent peer's spawn lands in this class's counter, and its own override +// is cleared under it. Bare, as every other writer of that seam already carries. +[NotInParallel] public class UnusableUrlGuardTests : IDisposable { [TempHome] public required TempHome Home { get; init; }