testchimp-runner-core 0.0.30 → 0.0.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1047,8 +1047,15 @@ export class ScenarioWorker extends EventEmitter {
1047
1047
  context: any,
1048
1048
  command: string
1049
1049
  ): Promise<void> {
1050
- // Keep default timeout for element operations
1051
- page.setDefaultTimeout(5000);
1050
+ // Detect if command contains navigation or load state operations that need longer timeout
1051
+ const needsLongerTimeout = command.includes('waitForLoadState') ||
1052
+ command.includes('goto(') ||
1053
+ command.includes('waitForURL') ||
1054
+ command.includes('waitForNavigation');
1055
+
1056
+ // Use appropriate timeout based on operation type
1057
+ const timeout = needsLongerTimeout ? 30000 : 5000;
1058
+ page.setDefaultTimeout(timeout);
1052
1059
 
1053
1060
  try {
1054
1061
  // Execute command directly without validation
@@ -1063,7 +1070,7 @@ export class ScenarioWorker extends EventEmitter {
1063
1070
  await commandFunction(page, browser, context, expect);
1064
1071
 
1065
1072
  } finally {
1066
- // Ensure timeout is consistent
1073
+ // Reset to default timeout for element operations
1067
1074
  page.setDefaultTimeout(5000);
1068
1075
  }
1069
1076
  }
package/src/types.ts CHANGED
@@ -170,14 +170,21 @@ export interface ScriptExecutionRequest {
170
170
  script?: string; // Optional if scriptFilePath is provided
171
171
  scriptFilePath?: string; // Path to script file (alternative to script content)
172
172
  mode: ExecutionMode;
173
- repair_flexibility?: number; // 0-5, defaults to 3
173
+ repairFlexibility?: number; // 0-5, defaults to 3
174
174
  playwrightConfig?: PlaywrightConfig;
175
175
  playwrightConfigFilePath?: string; // Path to playwright config file (alternative to playwrightConfig content)
176
176
  model?: string;
177
177
  headless?: boolean; // defaults to false (headed)
178
- deflake_run_count?: number; // defaults to 1
178
+ deflakeRunCount?: number; // Number of deflake attempts (defaults to 0, no deflaking)
179
179
  jobId?: string; // Optional job ID for progress tracking
180
180
 
181
+ // For RUN_WITH_AI_REPAIR mode: whether to attempt runExactly first
182
+ attemptRunExactlyFirst?: boolean; // defaults to false
183
+
184
+ // For RUN_WITH_AI_REPAIR mode: pre-parsed steps (if provided, skip parsing)
185
+ // This preserves step IDs from sources like canonical trees
186
+ steps?: ScriptStep[]; // Optional pre-parsed steps with IDs
187
+
181
188
  // Optional: Provide existing browser/page/context (for server-side usage)
182
189
  // If not provided, runner-core will create its own
183
190
  existingBrowser?: any; // Browser instance
@@ -189,13 +196,13 @@ export interface ScriptExecutionRequest {
189
196
  * Script execution response with repair information
190
197
  */
191
198
  export interface ScriptExecutionResponse {
192
- run_status: 'success' | 'failed';
193
- repair_status?: 'success' | 'failed' | 'partial';
194
- repair_confidence?: number; // 0-5
195
- repair_advice?: string;
196
- updated_script?: string;
199
+ runStatus: 'success' | 'failed';
200
+ repairStatus?: 'success' | 'failed' | 'partial';
201
+ repairConfidence?: number; // 0-5
202
+ repairAdvice?: string;
203
+ updatedScript?: string;
197
204
  executionTime: number;
198
- num_deflake_runs?: number; // Number of deflaking runs made (excluding original run)
205
+ numDeflakeRuns?: number; // Number of deflaking runs made (excluding original run)
199
206
  error?: string;
200
207
  }
201
208
 
@@ -203,6 +210,7 @@ export interface ScriptExecutionResponse {
203
210
  * Individual script step for AI repair
204
211
  */
205
212
  export interface ScriptStep {
213
+ id?: string; // Optional step ID (preserved from source, e.g., canonical tree)
206
214
  description: string;
207
215
  code: string;
208
216
  success?: boolean;
Binary file