test(agent): ScenarioTests join the SerialThreading collection

The V2 Core integration scenarios drive the real orchestrator against
wall-clock budgets (5 s per signal, 10 s for Completed / uploader). In
isolation every scenario finishes in under a second; inside the fully
parallel suite on a 4-core runner the same scenarios took 4-7 s locally
and blew the budgets on two slow GitHub runners (CI runs 33564658714 and
33565773888). Serialising them after the parallel phase, like
EnrollmentOrchestratorTests and RecoveryPathTests already are, brings
them back under 700 ms without changing the budgets.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Oliver Kieselbach
2026-09-02 00:52:56 +02:00
parent 45a1620f6b
commit e99a7d67c0
@@ -27,6 +27,14 @@ namespace AutopilotMonitor.Agent.V2.Core.Tests.Integration
/// ESP-Terminal-Failure, Late-AADJ. DevPrep-v2 variants land with M5 (no M3 fixture yet).
/// </para>
/// </summary>
// Drives the real orchestrator (dedicated ingress thread + fsync-per-step persistence +
// ThreadPool-scheduled drain loop) and waits on wall-clock budgets (PostFixture 5 s per
// signal, WaitForStage / uploader 10 s). In isolation every scenario finishes in < 1 s;
// under the full parallel suite on a 4-core CI runner the same scenarios took 4-5 s
// locally and blew the budgets on slow GitHub runners (CI runs 33564658714 and
// 33565773888, 2026-09-01). Serialised via SerialThreading like EnrollmentOrchestratorTests
// and RecoveryPathTests so the budgets measure the pipeline, not the neighbours.
[Collection("SerialThreading")]
public sealed class ScenarioTests
{
private const int DefaultTerminalTimeoutMs = 10_000;