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 e3fb1db911cc..af44568fedcb 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,20 +24,6 @@ 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", @@ -140,13 +126,6 @@ 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; diff --git a/extensions/qa-lab/src/live-transports/matrix/scenarios/scenario-runtime-shared.test.ts b/extensions/qa-lab/src/live-transports/matrix/scenarios/scenario-runtime-shared.test.ts index 58a87389c17a..3d88c38b6d98 100644 --- a/extensions/qa-lab/src/live-transports/matrix/scenarios/scenario-runtime-shared.test.ts +++ b/extensions/qa-lab/src/live-transports/matrix/scenarios/scenario-runtime-shared.test.ts @@ -17,8 +17,7 @@ describe("matrix scenario runtime shared", () => { vi.stubEnv("OPENCLAW_QA_MATRIX_NO_REPLY_WINDOW_MS", "12000"); expect(resolveMatrixQaNoReplyWindowMs(30_000)).toBe(12_000); - expect(resolveMatrixQaNoReplyWindowMs(15_000)).toBe(10_000); - expect(resolveMatrixQaNoReplyWindowMs(5_000)).toBe(1); + expect(resolveMatrixQaNoReplyWindowMs(5_000)).toBe(5_000); for (const value of ["1e3", "0x1000", "1.5", "nope"]) { vi.stubEnv("OPENCLAW_QA_MATRIX_NO_REPLY_WINDOW_MS", value); diff --git a/extensions/qa-lab/src/live-transports/matrix/scenarios/scenario-runtime-shared.ts b/extensions/qa-lab/src/live-transports/matrix/scenarios/scenario-runtime-shared.ts index accccf6c8699..f1916af5ac4d 100644 --- a/extensions/qa-lab/src/live-transports/matrix/scenarios/scenario-runtime-shared.ts +++ b/extensions/qa-lab/src/live-transports/matrix/scenarios/scenario-runtime-shared.ts @@ -81,8 +81,6 @@ export type MatrixQaScenarioContext = { const NO_REPLY_WINDOW_MS = 8_000; const NO_REPLY_WINDOW_ENV = "OPENCLAW_QA_MATRIX_NO_REPLY_WINDOW_MS"; -// The outer deadline starts before Matrix preparation and must also cover cleanup. -const NO_REPLY_DEADLINE_RESERVE_MS = 5_000; const MATRIX_QA_PREVIEW_LIMIT = 200; export function truncateMatrixQaPreview(value: string | null | undefined) { @@ -96,8 +94,7 @@ export function resolveMatrixQaNoReplyWindowMs(timeoutMs: number) { const parsed = raw === undefined ? NO_REPLY_WINDOW_MS : /^\d+$/.test(raw) ? Number(raw) : Number.NaN; const windowMs = Number.isSafeInteger(parsed) && parsed >= 1 ? parsed : NO_REPLY_WINDOW_MS; - const availableWindowMs = Math.max(1, timeoutMs - NO_REPLY_DEADLINE_RESERVE_MS); - return Math.min(windowMs, availableWindowMs); + return Math.min(windowMs, timeoutMs); } export { diff --git a/qa/scenarios/channels/matrix-allowbots-default-block.yaml b/qa/scenarios/channels/matrix-allowbots-default-block.yaml index c5ece7156aba..d042c2705952 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: 15000 + timeoutMs: 8000 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 d95d70284190..9392f56561bd 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: 15000 + timeoutMs: 8000 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 1890b2e0fc5f..028697b5c1ca 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: 15000 + timeoutMs: 8000 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 6cd692f50f0b..e91343a91c20 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: 15000 + timeoutMs: 8000 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 97aa6bc722e9..203f8391d6b8 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: 15000 + timeoutMs: 8000 retryCount: 0 config: matrixTopology: diff --git a/qa/scenarios/channels/matrix-inbound-edit-ignored.yaml b/qa/scenarios/channels/matrix-inbound-edit-ignored.yaml index 2118502e8202..38ab0db6eed3 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: 15000 + timeoutMs: 8000 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 473c675daf2e..322a7dd4b91b 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: 15000 + timeoutMs: 8000 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 9cf62517288d..e6c734a39e18 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: 15000 + timeoutMs: 8000 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 b0ca67f09223..f7ae5802dcef 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: 15000 + timeoutMs: 8000 retryCount: 0 config: matrixRequireCanary: true