fix(ci): satisfy rtt lint rules · openclaw/openclaw@8751464
vincentkoc
·
2026-05-01
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -16,12 +16,13 @@ const maxWarmFailures = Number(
|
16 | 16 | process.env.OPENCLAW_NPM_TELEGRAM_MAX_FAILURES ?? String(warmSampleCount), |
17 | 17 | ); |
18 | 18 | const successMarker = process.env.OPENCLAW_NPM_TELEGRAM_SUCCESS_MARKER ?? "OPENCLAW_E2E_OK"; |
19 | | -const scenarioIds = ( |
20 | | -process.env.OPENCLAW_NPM_TELEGRAM_SCENARIOS ?? "telegram-mentioned-message-reply" |
21 | | -) |
22 | | -.split(",") |
23 | | -.map((value) => value.trim()) |
24 | | -.filter(Boolean); |
| 19 | +const scenarioIds = new Set( |
| 20 | +process.env.OPENCLAW_NPM_TELEGRAM_SCENARIOS ?? |
| 21 | +"telegram-mentioned-message-reply" |
| 22 | +.split(",") |
| 23 | +.map((value) => value.trim()) |
| 24 | +.filter(Boolean), |
| 25 | +); |
25 | 26 | |
26 | 27 | if (!groupId || !driverToken || !sutToken) { |
27 | 28 | throw new Error( |
@@ -203,7 +204,7 @@ function percentile(sortedValues, percentileValue) {
|
203 | 204 | |
204 | 205 | function summarizeSamples(samples) { |
205 | 206 | const passed = samples.filter((sample) => sample.status === "pass" && sample.rttMs !== undefined); |
206 | | -const sorted = passed.map((sample) => sample.rttMs).sort((a, b) => a - b); |
| 207 | +const sorted = passed.map((sample) => sample.rttMs).toSorted((a, b) => a - b); |
207 | 208 | const sum = sorted.reduce((total, value) => total + value, 0); |
208 | 209 | return { |
209 | 210 | total: samples.length, |
@@ -309,7 +310,7 @@ async function main() {
|
309 | 310 | }); |
310 | 311 | scenarios.push(canary); |
311 | 312 | |
312 | | -if (scenarioIds.includes("telegram-mentioned-message-reply")) { |
| 313 | +if (scenarioIds.has("telegram-mentioned-message-reply")) { |
313 | 314 | scenarios.push( |
314 | 315 | await runWarmScenario({ |
315 | 316 | id: "telegram-mentioned-message-reply", |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。