From 5c444db9ad8a3a2dffebbd62f1c047dd6640afc7 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Fri, 21 Aug 2026 09:40:33 -0700 Subject: [PATCH] fix(qa): reserve Matrix no-reply cleanup budget --- .../matrix/matrix-scenario-flows.test.ts | 38 ++++++++++++++++++- .../matrix-allowbots-default-block.yaml | 2 +- ...-mentions-unmentioned-open-room-block.yaml | 2 +- ...ots-room-override-blocks-account-true.yaml | 2 +- .../matrix-allowbots-self-sender-ignored.yaml | 2 +- .../matrix-attachment-only-ignored.yaml | 2 +- .../matrix-e2ee-thread-follow-up.yaml | 1 - .../channels/matrix-inbound-edit-ignored.yaml | 2 +- ...rix-inbound-edit-no-duplicate-trigger.yaml | 1 - .../matrix-mention-metadata-spoof-block.yaml | 2 +- .../matrix-mxid-prefixed-command-block.yaml | 2 +- .../channels/matrix-reaction-not-a-reply.yaml | 2 +- .../matrix-thread-nested-reply-shape.yaml | 1 - 13 files changed, 46 insertions(+), 13 deletions(-) diff --git a/extensions/qa-lab/src/live-transports/matrix/matrix-scenario-flows.test.ts b/extensions/qa-lab/src/live-transports/matrix/matrix-scenario-flows.test.ts index 2914434f0031..e3fb1db911cc 100644 --- a/extensions/qa-lab/src/live-transports/matrix/matrix-scenario-flows.test.ts +++ b/extensions/qa-lab/src/live-transports/matrix/matrix-scenario-flows.test.ts @@ -24,6 +24,26 @@ const MATRIX_ISOLATED_ALLOWBOTS_ADMISSION_SCENARIOS = [ "matrix-allowbots-true-unmentioned-open-room", ] as const; +const MATRIX_NO_REPLY_SCENARIOS = [ + "matrix-allowbots-default-block", + "matrix-allowbots-mentions-unmentioned-open-room-block", + "matrix-allowbots-room-override-blocks-account-true", + "matrix-allowbots-self-sender-ignored", + "matrix-attachment-only-ignored", + "matrix-inbound-edit-ignored", + "matrix-mention-metadata-spoof-block", + "matrix-mxid-prefixed-command-block", + "matrix-reaction-not-a-reply", +] as const; + +const MATRIX_NO_REPLY_WINDOW_MS = 8_000; + +const MATRIX_PROVIDER_DEADLINE_SCENARIOS = new Set([ + "matrix-e2ee-thread-follow-up", + "matrix-inbound-edit-no-duplicate-trigger", + "matrix-thread-nested-reply-shape", +]); + function readModuleBinding( scenario: ReturnType["scenarios"][number], ) { @@ -93,7 +113,9 @@ describe("Matrix QA Lab scenario flows", () => { } expect(scenario.execution.channel, scenario.id).toBe("matrix"); expect(scenario.execution.retryCount, scenario.id).toBe(0); - expect(scenario.execution.timeoutMs, scenario.id).toBeGreaterThan(0); + if (!MATRIX_PROVIDER_DEADLINE_SCENARIOS.has(scenario.id)) { + expect(scenario.execution.timeoutMs, scenario.id).toBeGreaterThan(0); + } expect(scenario.execution.flow?.steps.at(-1)?.detailsExpr, scenario.id).toBe( "result.details ?? (result.artifacts ? JSON.stringify(result.artifacts, null, 2) : undefined)", ); @@ -118,6 +140,20 @@ describe("Matrix QA Lab scenario flows", () => { } }); + it("reserves flow cleanup time after the no-reply observation window", () => { + for (const scenarioId of MATRIX_NO_REPLY_SCENARIOS) { + const execution = requireFlowScenario(readQaScenarioById(scenarioId)).execution; + expect(execution.timeoutMs, scenarioId).toBeGreaterThan(MATRIX_NO_REPLY_WINDOW_MS); + } + }); + + it("uses provider-owned deadlines for model-driven multi-phase Matrix flows", () => { + for (const scenarioId of MATRIX_PROVIDER_DEADLINE_SCENARIOS) { + const execution = requireFlowScenario(readQaScenarioById(scenarioId)).execution; + expect(execution.timeoutMs, scenarioId).toBeUndefined(); + } + }); + it("applies the portable thread override through Matrix flow preparation", () => { expect(readQaScenarioById("thread-reply-override").execution).toMatchObject({ kind: "flow", diff --git a/qa/scenarios/channels/matrix-allowbots-default-block.yaml b/qa/scenarios/channels/matrix-allowbots-default-block.yaml index d042c2705952..c5ece7156aba 100644 --- a/qa/scenarios/channels/matrix-allowbots-default-block.yaml +++ b/qa/scenarios/channels/matrix-allowbots-default-block.yaml @@ -8,7 +8,7 @@ scenario: execution: kind: flow channel: matrix - timeoutMs: 8000 + timeoutMs: 15000 retryCount: 0 config: matrixConfigOverrides: diff --git a/qa/scenarios/channels/matrix-allowbots-mentions-unmentioned-open-room-block.yaml b/qa/scenarios/channels/matrix-allowbots-mentions-unmentioned-open-room-block.yaml index 9392f56561bd..d95d70284190 100644 --- a/qa/scenarios/channels/matrix-allowbots-mentions-unmentioned-open-room-block.yaml +++ b/qa/scenarios/channels/matrix-allowbots-mentions-unmentioned-open-room-block.yaml @@ -8,7 +8,7 @@ scenario: execution: kind: flow channel: matrix - timeoutMs: 8000 + timeoutMs: 15000 retryCount: 0 config: matrixConfigOverrides: diff --git a/qa/scenarios/channels/matrix-allowbots-room-override-blocks-account-true.yaml b/qa/scenarios/channels/matrix-allowbots-room-override-blocks-account-true.yaml index 028697b5c1ca..1890b2e0fc5f 100644 --- a/qa/scenarios/channels/matrix-allowbots-room-override-blocks-account-true.yaml +++ b/qa/scenarios/channels/matrix-allowbots-room-override-blocks-account-true.yaml @@ -8,7 +8,7 @@ scenario: execution: kind: flow channel: matrix - timeoutMs: 8000 + timeoutMs: 15000 retryCount: 0 config: matrixConfigOverrides: diff --git a/qa/scenarios/channels/matrix-allowbots-self-sender-ignored.yaml b/qa/scenarios/channels/matrix-allowbots-self-sender-ignored.yaml index e91343a91c20..6cd692f50f0b 100644 --- a/qa/scenarios/channels/matrix-allowbots-self-sender-ignored.yaml +++ b/qa/scenarios/channels/matrix-allowbots-self-sender-ignored.yaml @@ -8,7 +8,7 @@ scenario: execution: kind: flow channel: matrix - timeoutMs: 8000 + timeoutMs: 15000 retryCount: 0 config: matrixConfigOverrides: diff --git a/qa/scenarios/channels/matrix-attachment-only-ignored.yaml b/qa/scenarios/channels/matrix-attachment-only-ignored.yaml index 203f8391d6b8..97aa6bc722e9 100644 --- a/qa/scenarios/channels/matrix-attachment-only-ignored.yaml +++ b/qa/scenarios/channels/matrix-attachment-only-ignored.yaml @@ -10,7 +10,7 @@ scenario: execution: kind: flow channel: matrix - timeoutMs: 8000 + timeoutMs: 15000 retryCount: 0 config: matrixTopology: diff --git a/qa/scenarios/channels/matrix-e2ee-thread-follow-up.yaml b/qa/scenarios/channels/matrix-e2ee-thread-follow-up.yaml index b43ce747b072..476a431fd4d6 100644 --- a/qa/scenarios/channels/matrix-e2ee-thread-follow-up.yaml +++ b/qa/scenarios/channels/matrix-e2ee-thread-follow-up.yaml @@ -8,7 +8,6 @@ scenario: execution: kind: flow channel: matrix - timeoutMs: 75000 retryCount: 0 config: matrixConfigOverrides: diff --git a/qa/scenarios/channels/matrix-inbound-edit-ignored.yaml b/qa/scenarios/channels/matrix-inbound-edit-ignored.yaml index 38ab0db6eed3..2118502e8202 100644 --- a/qa/scenarios/channels/matrix-inbound-edit-ignored.yaml +++ b/qa/scenarios/channels/matrix-inbound-edit-ignored.yaml @@ -8,7 +8,7 @@ scenario: execution: kind: flow channel: matrix - timeoutMs: 8000 + timeoutMs: 15000 retryCount: 0 flow: diff --git a/qa/scenarios/channels/matrix-inbound-edit-no-duplicate-trigger.yaml b/qa/scenarios/channels/matrix-inbound-edit-no-duplicate-trigger.yaml index bd6aeecd439c..c84c16e7c6c0 100644 --- a/qa/scenarios/channels/matrix-inbound-edit-no-duplicate-trigger.yaml +++ b/qa/scenarios/channels/matrix-inbound-edit-no-duplicate-trigger.yaml @@ -8,7 +8,6 @@ scenario: execution: kind: flow channel: matrix - timeoutMs: 45000 retryCount: 0 flow: diff --git a/qa/scenarios/channels/matrix-mention-metadata-spoof-block.yaml b/qa/scenarios/channels/matrix-mention-metadata-spoof-block.yaml index 322a7dd4b91b..473c675daf2e 100644 --- a/qa/scenarios/channels/matrix-mention-metadata-spoof-block.yaml +++ b/qa/scenarios/channels/matrix-mention-metadata-spoof-block.yaml @@ -8,7 +8,7 @@ scenario: execution: kind: flow channel: matrix - timeoutMs: 8000 + timeoutMs: 15000 retryCount: 0 flow: diff --git a/qa/scenarios/channels/matrix-mxid-prefixed-command-block.yaml b/qa/scenarios/channels/matrix-mxid-prefixed-command-block.yaml index e6c734a39e18..9cf62517288d 100644 --- a/qa/scenarios/channels/matrix-mxid-prefixed-command-block.yaml +++ b/qa/scenarios/channels/matrix-mxid-prefixed-command-block.yaml @@ -10,7 +10,7 @@ scenario: execution: kind: flow channel: matrix - timeoutMs: 8000 + timeoutMs: 15000 retryCount: 0 config: matrixConfigOverrides: diff --git a/qa/scenarios/channels/matrix-reaction-not-a-reply.yaml b/qa/scenarios/channels/matrix-reaction-not-a-reply.yaml index f7ae5802dcef..b0ca67f09223 100644 --- a/qa/scenarios/channels/matrix-reaction-not-a-reply.yaml +++ b/qa/scenarios/channels/matrix-reaction-not-a-reply.yaml @@ -10,7 +10,7 @@ scenario: channel: matrix suiteIsolation: isolated isolationReason: Posts native reaction state against a fresh canary reply and cannot inherit a shared Matrix session. - timeoutMs: 8000 + timeoutMs: 15000 retryCount: 0 config: matrixRequireCanary: true diff --git a/qa/scenarios/channels/matrix-thread-nested-reply-shape.yaml b/qa/scenarios/channels/matrix-thread-nested-reply-shape.yaml index 7362b3b0fa45..6d1e8a07f373 100644 --- a/qa/scenarios/channels/matrix-thread-nested-reply-shape.yaml +++ b/qa/scenarios/channels/matrix-thread-nested-reply-shape.yaml @@ -8,7 +8,6 @@ scenario: execution: kind: flow channel: matrix - timeoutMs: 60000 retryCount: 0 flow: