@empiricalrun/playwright-utils 0.58.6 → 0.60.0
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.
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# @empiricalrun/playwright-utils
|
|
2
2
|
|
|
3
|
+
## 0.60.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 12c3b00: feat: report per-project worker caps as scheduling groups
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- @empiricalrun/cua@0.4.2
|
|
12
|
+
- @empiricalrun/llm@0.27.1
|
|
13
|
+
- @empiricalrun/reporter@0.30.0
|
|
14
|
+
|
|
15
|
+
## 0.59.0
|
|
16
|
+
|
|
17
|
+
### Minor Changes
|
|
18
|
+
|
|
19
|
+
- 17d8ac5: feat: report Playwright default-mode groups for scheduling
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- @empiricalrun/cua@0.4.2
|
|
24
|
+
- @empiricalrun/llm@0.27.1
|
|
25
|
+
- @empiricalrun/reporter@0.30.0
|
|
26
|
+
|
|
3
27
|
## 0.58.6
|
|
4
28
|
|
|
5
29
|
### Patch Changes
|
|
@@ -255,6 +255,26 @@ export interface paths {
|
|
|
255
255
|
patch?: never;
|
|
256
256
|
trace?: never;
|
|
257
257
|
};
|
|
258
|
+
"/api/test-runs/{id}/shard-plan": {
|
|
259
|
+
parameters: {
|
|
260
|
+
query?: never;
|
|
261
|
+
header?: never;
|
|
262
|
+
path?: never;
|
|
263
|
+
cookie?: never;
|
|
264
|
+
};
|
|
265
|
+
get?: never;
|
|
266
|
+
put?: never;
|
|
267
|
+
/**
|
|
268
|
+
* ⚙️ 🧪 Store a test run's shard plan
|
|
269
|
+
* @description Stores the partition of a run's test selection across its run_test shards, keyed by the external run_id. Each shard reads its own slice back from `/{id}/shards/{shard_index}/assigned-tests` to build a `--test-list`. Idempotent: the first plan for a run wins.
|
|
270
|
+
*/
|
|
271
|
+
post: operations["createTestRunShardPlan"];
|
|
272
|
+
delete?: never;
|
|
273
|
+
options?: never;
|
|
274
|
+
head?: never;
|
|
275
|
+
patch?: never;
|
|
276
|
+
trace?: never;
|
|
277
|
+
};
|
|
258
278
|
"/api/test-runs/{id}/shards": {
|
|
259
279
|
parameters: {
|
|
260
280
|
query?: never;
|
|
@@ -275,6 +295,26 @@ export interface paths {
|
|
|
275
295
|
patch?: never;
|
|
276
296
|
trace?: never;
|
|
277
297
|
};
|
|
298
|
+
"/api/test-runs/{id}/shards/{shard_index}/assigned-tests": {
|
|
299
|
+
parameters: {
|
|
300
|
+
query?: never;
|
|
301
|
+
header?: never;
|
|
302
|
+
path?: never;
|
|
303
|
+
cookie?: never;
|
|
304
|
+
};
|
|
305
|
+
/**
|
|
306
|
+
* ⚙️ 🧪 Get test run shard assigned tests
|
|
307
|
+
* @description Returns the duration-based shard plan's test-case ids for one shard, addressed by the run's external run_id. Used by the test-run-worker to build its `--test-list`. Returns 417 when the run has no plan, so the worker falls back to Playwright's `--shard=i/N` split.
|
|
308
|
+
*/
|
|
309
|
+
get: operations["getTestRunShardAssignedTests"];
|
|
310
|
+
put?: never;
|
|
311
|
+
post?: never;
|
|
312
|
+
delete?: never;
|
|
313
|
+
options?: never;
|
|
314
|
+
head?: never;
|
|
315
|
+
patch?: never;
|
|
316
|
+
trace?: never;
|
|
317
|
+
};
|
|
278
318
|
"/api/test-runs/{id}/shards/{shard_index}/resume": {
|
|
279
319
|
parameters: {
|
|
280
320
|
query?: never;
|
|
@@ -355,6 +395,26 @@ export interface paths {
|
|
|
355
395
|
patch?: never;
|
|
356
396
|
trace?: never;
|
|
357
397
|
};
|
|
398
|
+
"/api/test-runs/{id}/test-case-durations": {
|
|
399
|
+
parameters: {
|
|
400
|
+
query?: never;
|
|
401
|
+
header?: never;
|
|
402
|
+
path?: never;
|
|
403
|
+
cookie?: never;
|
|
404
|
+
};
|
|
405
|
+
/**
|
|
406
|
+
* ⚙️ 🧪 Get test case durations for shard planning
|
|
407
|
+
* @description Returns the run's project's 7-day average duration per test case, keyed by the normalized 41-char Playwright test id, addressed by the run's external run_id. Used by the `run_setup` container to pack a shard plan: the analytics token is account-scoped and cannot be handed to a sandbox running customer test code, so the api-worker holds it and serves the numbers. Project-wide rather than per-run — the container filters to the tests it listed. A project with no history returns an empty object; a broken analytics query returns 503, so the container can tell the two apart and fall back rather than plan off nothing.
|
|
408
|
+
*/
|
|
409
|
+
get: operations["getTestRunTestCaseDurations"];
|
|
410
|
+
put?: never;
|
|
411
|
+
post?: never;
|
|
412
|
+
delete?: never;
|
|
413
|
+
options?: never;
|
|
414
|
+
head?: never;
|
|
415
|
+
patch?: never;
|
|
416
|
+
trace?: never;
|
|
417
|
+
};
|
|
358
418
|
"/api/test-runs/{id}/triage-session": {
|
|
359
419
|
parameters: {
|
|
360
420
|
query?: never;
|
|
@@ -10361,7 +10421,6 @@ export interface components {
|
|
|
10361
10421
|
/** @enum {string} */
|
|
10362
10422
|
job_type: "merge_reports";
|
|
10363
10423
|
storage_bucket?: string;
|
|
10364
|
-
assigned_shard_manifest_formula?: string;
|
|
10365
10424
|
resume_run_from_shard?: number;
|
|
10366
10425
|
} | null;
|
|
10367
10426
|
};
|
|
@@ -10549,6 +10608,29 @@ export interface components {
|
|
|
10549
10608
|
resume_from: number | null;
|
|
10550
10609
|
};
|
|
10551
10610
|
};
|
|
10611
|
+
TestRunTestCaseDurationsResponse: {
|
|
10612
|
+
data: {
|
|
10613
|
+
/** @description Length of the analytics window the averages cover. */
|
|
10614
|
+
days: number;
|
|
10615
|
+
/** @description Per-test-case history, keyed by the normalized 41-char Playwright test id. */
|
|
10616
|
+
durations: {
|
|
10617
|
+
[key: string]: {
|
|
10618
|
+
/** @description Mean total duration over the window, in ms. */
|
|
10619
|
+
avg_duration_total: number;
|
|
10620
|
+
/** @description Results the average was taken over. */
|
|
10621
|
+
total_runs: number;
|
|
10622
|
+
};
|
|
10623
|
+
};
|
|
10624
|
+
};
|
|
10625
|
+
};
|
|
10626
|
+
TestRunShardAssignedTestsResponse: {
|
|
10627
|
+
data: {
|
|
10628
|
+
/** @description Playwright test-case ids this shard is assigned to execute. */
|
|
10629
|
+
test_case_ids: string[];
|
|
10630
|
+
/** @description Shard count the plan was built for. */
|
|
10631
|
+
total_shards: number;
|
|
10632
|
+
};
|
|
10633
|
+
};
|
|
10552
10634
|
TestRunLogsResponse: {
|
|
10553
10635
|
/** @description Response payload. */
|
|
10554
10636
|
data: {
|
|
@@ -10601,7 +10683,7 @@ export interface components {
|
|
|
10601
10683
|
/** @description Zero-based shard index, when stopping a sharded run. */
|
|
10602
10684
|
shard_index?: number;
|
|
10603
10685
|
/**
|
|
10604
|
-
* @description Job type of the shard to stop. merge_reports and run_setup share shard_index 0.
|
|
10686
|
+
* @description Job type of the shard to stop. merge_reports and run_setup share shard_index 0. When omitted, the job is resolved from the run's shard rows; an index that carries more than one stoppable job is a 400. `run_setup` is never stoppable and is always rejected.
|
|
10605
10687
|
* @enum {string}
|
|
10606
10688
|
*/
|
|
10607
10689
|
job_type?: "run_test" | "merge_reports" | "run_setup";
|
|
@@ -10649,8 +10731,8 @@ export interface components {
|
|
|
10649
10731
|
};
|
|
10650
10732
|
};
|
|
10651
10733
|
PutRunManifestRequest: {
|
|
10652
|
-
/** @description Structured scheduled tests
|
|
10653
|
-
tests
|
|
10734
|
+
/** @description Structured scheduled tests. */
|
|
10735
|
+
tests: {
|
|
10654
10736
|
/** @description Full test title. */
|
|
10655
10737
|
name: string;
|
|
10656
10738
|
/** @description Playwright test id, if known. */
|
|
@@ -10673,13 +10755,46 @@ export interface components {
|
|
|
10673
10755
|
dependency_order: number;
|
|
10674
10756
|
}[];
|
|
10675
10757
|
}[];
|
|
10676
|
-
/** @description Legacy base64-gzip manifest blob. Ignored when `tests` is present. */
|
|
10677
|
-
run_manifest?: string;
|
|
10678
10758
|
/** @description Zero-based shard index, when the run is sharded. */
|
|
10679
10759
|
shard_index?: number;
|
|
10680
10760
|
/** @description Total number of shards, when the run is sharded. */
|
|
10681
10761
|
total_shards?: number;
|
|
10682
10762
|
};
|
|
10763
|
+
ShardPlanResponse: {
|
|
10764
|
+
/** @description Response payload. */
|
|
10765
|
+
data: {
|
|
10766
|
+
/** @description Rows inserted. Zero when the run was already planned — the first plan wins and a retried POST is a no-op. */
|
|
10767
|
+
shards_written: number;
|
|
10768
|
+
/** @description Tests across the posted partition. */
|
|
10769
|
+
total_tests: number;
|
|
10770
|
+
};
|
|
10771
|
+
};
|
|
10772
|
+
PostShardPlanRequest: {
|
|
10773
|
+
/** @description Shard count this partition was built for. Stored on every row and checked against the shard's own total_shards when the plan is read. */
|
|
10774
|
+
total_shards: number;
|
|
10775
|
+
/** @description One entry per run_test shard. */
|
|
10776
|
+
shards: {
|
|
10777
|
+
/** @description 1-based index of the run_test shard. Index 0 is the run_setup job and never carries an assignment. */
|
|
10778
|
+
shard_index: number;
|
|
10779
|
+
/** @description Tests assigned to this shard. */
|
|
10780
|
+
tests: {
|
|
10781
|
+
/** @description Playwright test id (`pw_test_id`) assigned to this shard. */
|
|
10782
|
+
id: string;
|
|
10783
|
+
/** @description Scheduled test line (`[project] › file › suite › title`). Not stored yet; the server-written run manifest is its consumer. */
|
|
10784
|
+
name: string;
|
|
10785
|
+
}[];
|
|
10786
|
+
}[];
|
|
10787
|
+
/** @description How the partition was chosen, stored verbatim for provenance (e.g. `equal split over the canonical listing`). */
|
|
10788
|
+
reason?: string;
|
|
10789
|
+
/** @description Modelled wall-clock of the slowest shard, in ms. */
|
|
10790
|
+
predicted_makespan_ms?: number;
|
|
10791
|
+
/** @description Modelled wall-clock at the ceiling — what the run would have done without the reduction, in ms. */
|
|
10792
|
+
baseline_makespan_ms?: number;
|
|
10793
|
+
/** @description Heaviest single schedulable unit, in ms. The floor no shard count can beat. */
|
|
10794
|
+
longest_unit_ms?: number;
|
|
10795
|
+
/** @description Fraction of planned tests that had a real historical duration. */
|
|
10796
|
+
coverage?: number;
|
|
10797
|
+
};
|
|
10683
10798
|
SkipTestRunResponse: {
|
|
10684
10799
|
data: {
|
|
10685
10800
|
/** @description ID of the GitHub check run created as skipped, or null if no GitHub reporter app is installed for the repo. */
|
|
@@ -13035,6 +13150,51 @@ export interface operations {
|
|
|
13035
13150
|
};
|
|
13036
13151
|
};
|
|
13037
13152
|
};
|
|
13153
|
+
createTestRunShardPlan: {
|
|
13154
|
+
parameters: {
|
|
13155
|
+
query?: never;
|
|
13156
|
+
header?: never;
|
|
13157
|
+
path: {
|
|
13158
|
+
/** @description External run_id of the test run. */
|
|
13159
|
+
id: number;
|
|
13160
|
+
};
|
|
13161
|
+
cookie?: never;
|
|
13162
|
+
};
|
|
13163
|
+
requestBody?: {
|
|
13164
|
+
content: {
|
|
13165
|
+
"application/json": components["schemas"]["PostShardPlanRequest"];
|
|
13166
|
+
};
|
|
13167
|
+
};
|
|
13168
|
+
responses: {
|
|
13169
|
+
/** @description The shard plan was stored. */
|
|
13170
|
+
200: {
|
|
13171
|
+
headers: {
|
|
13172
|
+
[name: string]: unknown;
|
|
13173
|
+
};
|
|
13174
|
+
content: {
|
|
13175
|
+
"application/json": components["schemas"]["ShardPlanResponse"];
|
|
13176
|
+
};
|
|
13177
|
+
};
|
|
13178
|
+
/** @description The posted plan is not a valid partition. */
|
|
13179
|
+
400: {
|
|
13180
|
+
headers: {
|
|
13181
|
+
[name: string]: unknown;
|
|
13182
|
+
};
|
|
13183
|
+
content: {
|
|
13184
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
13185
|
+
};
|
|
13186
|
+
};
|
|
13187
|
+
/** @description Test run not found. */
|
|
13188
|
+
404: {
|
|
13189
|
+
headers: {
|
|
13190
|
+
[name: string]: unknown;
|
|
13191
|
+
};
|
|
13192
|
+
content: {
|
|
13193
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
13194
|
+
};
|
|
13195
|
+
};
|
|
13196
|
+
};
|
|
13197
|
+
};
|
|
13038
13198
|
listTestRunShards: {
|
|
13039
13199
|
parameters: {
|
|
13040
13200
|
query?: never;
|
|
@@ -13067,6 +13227,49 @@ export interface operations {
|
|
|
13067
13227
|
};
|
|
13068
13228
|
};
|
|
13069
13229
|
};
|
|
13230
|
+
getTestRunShardAssignedTests: {
|
|
13231
|
+
parameters: {
|
|
13232
|
+
query?: never;
|
|
13233
|
+
header?: never;
|
|
13234
|
+
path: {
|
|
13235
|
+
/** @description External run_id of the test run. */
|
|
13236
|
+
id: number;
|
|
13237
|
+
/** @description Zero-based shard index within the run. */
|
|
13238
|
+
shard_index: number | null;
|
|
13239
|
+
};
|
|
13240
|
+
cookie?: never;
|
|
13241
|
+
};
|
|
13242
|
+
requestBody?: never;
|
|
13243
|
+
responses: {
|
|
13244
|
+
/** @description The shard's assigned test-case ids. */
|
|
13245
|
+
200: {
|
|
13246
|
+
headers: {
|
|
13247
|
+
[name: string]: unknown;
|
|
13248
|
+
};
|
|
13249
|
+
content: {
|
|
13250
|
+
"application/json": components["schemas"]["TestRunShardAssignedTestsResponse"];
|
|
13251
|
+
};
|
|
13252
|
+
};
|
|
13253
|
+
/** @description Test run not found. */
|
|
13254
|
+
404: {
|
|
13255
|
+
headers: {
|
|
13256
|
+
[name: string]: unknown;
|
|
13257
|
+
};
|
|
13258
|
+
content: {
|
|
13259
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
13260
|
+
};
|
|
13261
|
+
};
|
|
13262
|
+
/** @description No shard plan for this run or shard. */
|
|
13263
|
+
417: {
|
|
13264
|
+
headers: {
|
|
13265
|
+
[name: string]: unknown;
|
|
13266
|
+
};
|
|
13267
|
+
content: {
|
|
13268
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
13269
|
+
};
|
|
13270
|
+
};
|
|
13271
|
+
};
|
|
13272
|
+
};
|
|
13070
13273
|
getTestRunShardResume: {
|
|
13071
13274
|
parameters: {
|
|
13072
13275
|
query?: never;
|
|
@@ -13230,6 +13433,47 @@ export interface operations {
|
|
|
13230
13433
|
};
|
|
13231
13434
|
};
|
|
13232
13435
|
};
|
|
13436
|
+
getTestRunTestCaseDurations: {
|
|
13437
|
+
parameters: {
|
|
13438
|
+
query?: never;
|
|
13439
|
+
header?: never;
|
|
13440
|
+
path: {
|
|
13441
|
+
/** @description Test run identifier (database id or external run_id). */
|
|
13442
|
+
id: number;
|
|
13443
|
+
};
|
|
13444
|
+
cookie?: never;
|
|
13445
|
+
};
|
|
13446
|
+
requestBody?: never;
|
|
13447
|
+
responses: {
|
|
13448
|
+
/** @description The project's test-case duration history. */
|
|
13449
|
+
200: {
|
|
13450
|
+
headers: {
|
|
13451
|
+
[name: string]: unknown;
|
|
13452
|
+
};
|
|
13453
|
+
content: {
|
|
13454
|
+
"application/json": components["schemas"]["TestRunTestCaseDurationsResponse"];
|
|
13455
|
+
};
|
|
13456
|
+
};
|
|
13457
|
+
/** @description Test run not found. */
|
|
13458
|
+
404: {
|
|
13459
|
+
headers: {
|
|
13460
|
+
[name: string]: unknown;
|
|
13461
|
+
};
|
|
13462
|
+
content: {
|
|
13463
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
13464
|
+
};
|
|
13465
|
+
};
|
|
13466
|
+
/** @description Analytics is unavailable. */
|
|
13467
|
+
503: {
|
|
13468
|
+
headers: {
|
|
13469
|
+
[name: string]: unknown;
|
|
13470
|
+
};
|
|
13471
|
+
content: {
|
|
13472
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
13473
|
+
};
|
|
13474
|
+
};
|
|
13475
|
+
};
|
|
13476
|
+
};
|
|
13233
13477
|
createTestRunTriageSession: {
|
|
13234
13478
|
parameters: {
|
|
13235
13479
|
query?: never;
|
|
@@ -17354,7 +17598,7 @@ export interface operations {
|
|
|
17354
17598
|
"application/json": components["schemas"]["GithubProxyError"];
|
|
17355
17599
|
};
|
|
17356
17600
|
};
|
|
17357
|
-
/** @description
|
|
17601
|
+
/** @description The target repository is blocked, or a sandbox proxy rule forbade the request. */
|
|
17358
17602
|
403: {
|
|
17359
17603
|
headers: {
|
|
17360
17604
|
[name: string]: unknown;
|
|
@@ -18776,8 +19020,8 @@ export interface operations {
|
|
|
18776
19020
|
content: {
|
|
18777
19021
|
"application/json": {
|
|
18778
19022
|
message: string;
|
|
18779
|
-
/** @enum {string
|
|
18780
|
-
send_action
|
|
19023
|
+
/** @enum {string} */
|
|
19024
|
+
send_action: "steer" | "follow_up" | "stop";
|
|
18781
19025
|
created_by?: string | null;
|
|
18782
19026
|
};
|
|
18783
19027
|
};
|