File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -108,6 +108,13 @@ describe("qa suite", () => {
108108 OPENCLAW_QA_TRANSPORT_READY_TIMEOUT_MS : "bad" ,
109109 } ) ,
110110 ) . toBe ( 120_000 ) ;
111+ for ( const value of [ "0x10" , "1e3" , "10.5" ] ) {
112+ expect (
113+ qaSuiteProgressTesting . resolveQaSuiteTransportReadyTimeoutMs ( undefined , {
114+ OPENCLAW_QA_TRANSPORT_READY_TIMEOUT_MS : value ,
115+ } ) ,
116+ ) . toBe ( 120_000 ) ;
117+ }
111118 expect ( qaSuiteProgressTesting . resolveQaSuiteTransportReadyTimeoutMs ( 90_000 , { } ) ) . toBe ( 90_000 ) ;
112119 } ) ;
113120
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import { setTimeout as sleep } from "node:timers/promises";
44import { disposeRegisteredAgentHarnesses } from "openclaw/plugin-sdk/agent-harness" ;
55import type { OpenClawConfig } from "openclaw/plugin-sdk/config-contracts" ;
66import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime" ;
7+ import { parseStrictPositiveInteger } from "openclaw/plugin-sdk/number-runtime" ;
78import {
89 renderQaMarkdownReport ,
910 type QaReportCheck ,
@@ -152,11 +153,11 @@ function resolveQaSuiteTransportReadyTimeoutMs(
152153 if ( ! raw ) {
153154 return 120_000 ;
154155 }
155- const parsed = Number ( raw ) ;
156- if ( ! Number . isFinite ( parsed ) || parsed < 1 ) {
156+ const parsed = parseStrictPositiveInteger ( raw ) ;
157+ if ( parsed === undefined ) {
157158 return 120_000 ;
158159 }
159- return Math . floor ( parsed ) ;
160+ return parsed ;
160161}
161162
162163function writeQaSuiteProgress ( enabled : boolean , message : string ) {
You can’t perform that action at this time.
0 commit comments