From 6129dfe5905f292c6c72f1700104ce744d4a2ad0 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Thu, 23 Apr 2026 08:25:32 +0100 Subject: [PATCH] test(matrix): extend live QA waits --- .../src/runners/contract/scenario-catalog.ts | 12 ++++++++---- .../src/runners/contract/scenarios.test.ts | 13 +++++++++++++ 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/extensions/qa-matrix/src/runners/contract/scenario-catalog.ts b/extensions/qa-matrix/src/runners/contract/scenario-catalog.ts index 88d3c9f4f78..dc5ef8cbaaa 100644 --- a/extensions/qa-matrix/src/runners/contract/scenario-catalog.ts +++ b/extensions/qa-matrix/src/runners/contract/scenario-catalog.ts @@ -86,6 +86,10 @@ export const MATRIX_QA_MEMBERSHIP_ROOM_KEY = "membership"; export const MATRIX_QA_RESTART_ROOM_KEY = "restart"; export const MATRIX_QA_SECONDARY_ROOM_KEY = "secondary"; +const MATRIX_QA_LIVE_MODEL_TIMEOUT_MS = 120_000; +const MATRIX_QA_E2EE_REPLY_TIMEOUT_MS = 150_000; +const MATRIX_QA_E2EE_MEDIA_TIMEOUT_MS = 180_000; + function buildMatrixQaDmTopology( rooms: Array<{ key: string; @@ -238,7 +242,7 @@ export const MATRIX_QA_SCENARIOS: MatrixQaScenarioDefinition[] = [ }, { id: "matrix-subagent-thread-spawn", - timeoutMs: 75_000, + timeoutMs: MATRIX_QA_LIVE_MODEL_TIMEOUT_MS, title: "Matrix sessions_spawn thread=true creates a bound child thread", configOverrides: { groupsByKey: { @@ -594,7 +598,7 @@ export const MATRIX_QA_SCENARIOS: MatrixQaScenarioDefinition[] = [ }, { id: "matrix-e2ee-restart-resume", - timeoutMs: 90_000, + timeoutMs: MATRIX_QA_E2EE_REPLY_TIMEOUT_MS, title: "Matrix E2EE encrypted rooms resume after gateway restart", topology: buildMatrixQaE2eeScenarioTopology({ scenarioId: "matrix-e2ee-restart-resume", @@ -614,7 +618,7 @@ export const MATRIX_QA_SCENARIOS: MatrixQaScenarioDefinition[] = [ }, { id: "matrix-e2ee-artifact-redaction", - timeoutMs: 75_000, + timeoutMs: MATRIX_QA_E2EE_REPLY_TIMEOUT_MS, title: "Matrix E2EE decrypted payloads stay out of default event artifacts", topology: buildMatrixQaE2eeScenarioTopology({ scenarioId: "matrix-e2ee-artifact-redaction", @@ -624,7 +628,7 @@ export const MATRIX_QA_SCENARIOS: MatrixQaScenarioDefinition[] = [ }, { id: "matrix-e2ee-media-image", - timeoutMs: 90_000, + timeoutMs: MATRIX_QA_E2EE_MEDIA_TIMEOUT_MS, title: "Matrix E2EE encrypted image attachments reach the model vision path", topology: buildMatrixQaE2eeScenarioTopology({ scenarioId: "matrix-e2ee-media-image", diff --git a/extensions/qa-matrix/src/runners/contract/scenarios.test.ts b/extensions/qa-matrix/src/runners/contract/scenarios.test.ts index 90930e40970..b56db27bd39 100644 --- a/extensions/qa-matrix/src/runners/contract/scenarios.test.ts +++ b/extensions/qa-matrix/src/runners/contract/scenarios.test.ts @@ -163,6 +163,19 @@ describe("matrix live qa scenarios", () => { ).toBe("@sut:matrix-qa.test reply with only this exact marker: MATRIX_QA_CANARY_TOKEN"); }); + it("keeps live Matrix model and E2EE waits above observed CI latency", () => { + const scenarios = new Map(MATRIX_QA_SCENARIOS.map((scenario) => [scenario.id, scenario])); + + expect(scenarios.get("matrix-subagent-thread-spawn")?.timeoutMs).toBeGreaterThanOrEqual( + 120_000, + ); + expect(scenarios.get("matrix-e2ee-restart-resume")?.timeoutMs).toBeGreaterThanOrEqual(150_000); + expect(scenarios.get("matrix-e2ee-artifact-redaction")?.timeoutMs).toBeGreaterThanOrEqual( + 150_000, + ); + expect(scenarios.get("matrix-e2ee-media-image")?.timeoutMs).toBeGreaterThanOrEqual(180_000); + }); + it("requires Matrix replies to match the exact marker body", () => { expect( scenarioTesting.buildMatrixReplyArtifact(