@opensearch-project/agent-health 0.5.2 → 0.7.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/README.md +1 -0
- package/cli/dist/index.js +2325 -961
- package/dist/assets/index-D-Np_l_T.js +246 -0
- package/dist/assets/index-vZt9QZKf.css +1 -0
- package/dist/index.html +2 -2
- package/docs/CLI.md +183 -3
- package/docs/CONFIGURATION.md +1 -1
- package/docs/CONNECTORS.md +1 -1
- package/docs/INSTRUMENT_WITH_OTEL.md +7 -0
- package/docs/SDK.md +178 -5
- package/docs/STORAGE_INDEX_FIELD_LIMITS.md +216 -0
- package/docs/skills/AGENT_HEALTH.md +55 -1
- package/docs/skills/add-connector/SKILL.md +5 -1
- package/examples/eval-files/demo.eval.js +1 -1
- package/examples/eval-files/ops-rca-classification.eval.js +71 -0
- package/examples/eval-files/ops-rca-evaluator.json +15 -0
- package/examples/eval-files/sdk-demo.eval.js +72 -0
- package/examples/eval-files/sdk-describe-demo.eval.js +50 -0
- package/examples/eval-files/sdk-hooks-demo.eval.js +1 -1
- package/lib/dist/lib/agentTrends.d.ts +210 -0
- package/lib/dist/lib/agentTrends.d.ts.map +1 -0
- package/lib/dist/lib/agentTrends.js +360 -0
- package/lib/dist/lib/agentTrends.js.map +1 -0
- package/lib/dist/lib/bedrockCompat.d.ts +27 -0
- package/lib/dist/lib/bedrockCompat.d.ts.map +1 -0
- package/lib/dist/lib/bedrockCompat.js +83 -0
- package/lib/dist/lib/bedrockCompat.js.map +1 -0
- package/lib/dist/lib/benchmarkCaseReview.d.ts +114 -0
- package/lib/dist/lib/benchmarkCaseReview.d.ts.map +1 -0
- package/lib/dist/lib/benchmarkCaseReview.js +177 -0
- package/lib/dist/lib/benchmarkCaseReview.js.map +1 -0
- package/lib/dist/lib/benchmarkImage.d.ts +52 -0
- package/lib/dist/lib/benchmarkImage.d.ts.map +1 -0
- package/lib/dist/lib/benchmarkImage.js +113 -0
- package/lib/dist/lib/benchmarkImage.js.map +1 -0
- package/lib/dist/lib/benchmarkRunsTable.d.ts +109 -0
- package/lib/dist/lib/benchmarkRunsTable.d.ts.map +1 -0
- package/lib/dist/lib/benchmarkRunsTable.js +212 -0
- package/lib/dist/lib/benchmarkRunsTable.js.map +1 -0
- package/lib/dist/lib/benchmarkVersionUtils.d.ts +13 -0
- package/lib/dist/lib/benchmarkVersionUtils.d.ts.map +1 -1
- package/lib/dist/lib/benchmarkVersionUtils.js +21 -0
- package/lib/dist/lib/benchmarkVersionUtils.js.map +1 -1
- package/lib/dist/lib/chunkedFetch.d.ts +18 -0
- package/lib/dist/lib/chunkedFetch.d.ts.map +1 -0
- package/lib/dist/lib/chunkedFetch.js +40 -0
- package/lib/dist/lib/chunkedFetch.js.map +1 -0
- package/lib/dist/lib/comparisonInsights.d.ts +151 -0
- package/lib/dist/lib/comparisonInsights.d.ts.map +1 -0
- package/lib/dist/lib/comparisonInsights.js +270 -0
- package/lib/dist/lib/comparisonInsights.js.map +1 -0
- package/lib/dist/lib/config/loader.d.ts.map +1 -1
- package/lib/dist/lib/config/loader.js +16 -1
- package/lib/dist/lib/config/loader.js.map +1 -1
- package/lib/dist/lib/config/types.d.ts +14 -0
- package/lib/dist/lib/config/types.d.ts.map +1 -1
- package/lib/dist/lib/constants.d.ts +11 -0
- package/lib/dist/lib/constants.d.ts.map +1 -1
- package/lib/dist/lib/constants.js +10 -1
- package/lib/dist/lib/constants.js.map +1 -1
- package/lib/dist/lib/contextFormat.d.ts +26 -0
- package/lib/dist/lib/contextFormat.d.ts.map +1 -0
- package/lib/dist/lib/contextFormat.js +28 -0
- package/lib/dist/lib/contextFormat.js.map +1 -0
- package/lib/dist/lib/dashboardMetrics.d.ts +11 -2
- package/lib/dist/lib/dashboardMetrics.d.ts.map +1 -1
- package/lib/dist/lib/dashboardMetrics.js +38 -3
- package/lib/dist/lib/dashboardMetrics.js.map +1 -1
- package/lib/dist/lib/envCompat.d.ts.map +1 -1
- package/lib/dist/lib/envCompat.js +14 -5
- package/lib/dist/lib/envCompat.js.map +1 -1
- package/lib/dist/lib/evaluationRerun.d.ts +102 -0
- package/lib/dist/lib/evaluationRerun.d.ts.map +1 -0
- package/lib/dist/lib/evaluationRerun.js +134 -0
- package/lib/dist/lib/evaluationRerun.js.map +1 -0
- package/lib/dist/lib/judgeFailureSummary.d.ts +66 -0
- package/lib/dist/lib/judgeFailureSummary.d.ts.map +1 -0
- package/lib/dist/lib/judgeFailureSummary.js +68 -0
- package/lib/dist/lib/judgeFailureSummary.js.map +1 -0
- package/lib/dist/lib/judgeStrategies.d.ts +108 -0
- package/lib/dist/lib/judgeStrategies.d.ts.map +1 -0
- package/lib/dist/lib/judgeStrategies.js +135 -0
- package/lib/dist/lib/judgeStrategies.js.map +1 -0
- package/lib/dist/lib/matchers/expect.d.ts +21 -1
- package/lib/dist/lib/matchers/expect.d.ts.map +1 -1
- package/lib/dist/lib/matchers/expect.js +51 -0
- package/lib/dist/lib/matchers/expect.js.map +1 -1
- package/lib/dist/lib/matchers/judgeAccessor.d.ts +4 -0
- package/lib/dist/lib/matchers/judgeAccessor.d.ts.map +1 -1
- package/lib/dist/lib/matchers/judgeAccessor.js +13 -2
- package/lib/dist/lib/matchers/judgeAccessor.js.map +1 -1
- package/lib/dist/lib/matchers/judgeReasoningParse.d.ts +49 -0
- package/lib/dist/lib/matchers/judgeReasoningParse.d.ts.map +1 -0
- package/lib/dist/lib/matchers/judgeReasoningParse.js +128 -0
- package/lib/dist/lib/matchers/judgeReasoningParse.js.map +1 -0
- package/lib/dist/lib/matchers/traces.d.ts +17 -2
- package/lib/dist/lib/matchers/traces.d.ts.map +1 -1
- package/lib/dist/lib/matchers/traces.js +136 -16
- package/lib/dist/lib/matchers/traces.js.map +1 -1
- package/lib/dist/lib/matchers/tracesPricing.d.ts +38 -0
- package/lib/dist/lib/matchers/tracesPricing.d.ts.map +1 -0
- package/lib/dist/lib/matchers/tracesPricing.js +64 -0
- package/lib/dist/lib/matchers/tracesPricing.js.map +1 -0
- package/lib/dist/lib/matchers/types.d.ts +25 -0
- package/lib/dist/lib/matchers/types.d.ts.map +1 -1
- package/lib/dist/lib/resolveCanonicalRun.d.ts +23 -0
- package/lib/dist/lib/resolveCanonicalRun.d.ts.map +1 -0
- package/lib/dist/lib/resolveCanonicalRun.js +26 -0
- package/lib/dist/lib/resolveCanonicalRun.js.map +1 -0
- package/lib/dist/lib/runActions.d.ts +120 -0
- package/lib/dist/lib/runActions.d.ts.map +1 -0
- package/lib/dist/lib/runActions.js +130 -0
- package/lib/dist/lib/runActions.js.map +1 -0
- package/lib/dist/lib/runInsights.d.ts +86 -0
- package/lib/dist/lib/runInsights.d.ts.map +1 -0
- package/lib/dist/lib/runInsights.js +185 -0
- package/lib/dist/lib/runInsights.js.map +1 -0
- package/lib/dist/lib/runName.d.ts +29 -0
- package/lib/dist/lib/runName.d.ts.map +1 -0
- package/lib/dist/lib/runName.js +38 -0
- package/lib/dist/lib/runName.js.map +1 -0
- package/lib/dist/lib/runReportPath.d.ts +16 -0
- package/lib/dist/lib/runReportPath.d.ts.map +1 -0
- package/lib/dist/lib/runReportPath.js +22 -0
- package/lib/dist/lib/runReportPath.js.map +1 -0
- package/lib/dist/lib/runSort.d.ts +27 -0
- package/lib/dist/lib/runSort.d.ts.map +1 -0
- package/lib/dist/lib/runSort.js +31 -0
- package/lib/dist/lib/runSort.js.map +1 -0
- package/lib/dist/lib/runStats.d.ts +109 -5
- package/lib/dist/lib/runStats.d.ts.map +1 -1
- package/lib/dist/lib/runStats.js +193 -10
- package/lib/dist/lib/runStats.js.map +1 -1
- package/lib/dist/lib/testCases/define.d.ts.map +1 -1
- package/lib/dist/lib/testCases/define.js +93 -46
- package/lib/dist/lib/testCases/define.js.map +1 -1
- package/lib/dist/lib/testCases/judge.d.ts.map +1 -1
- package/lib/dist/lib/testCases/judge.js +22 -4
- package/lib/dist/lib/testCases/judge.js.map +1 -1
- package/lib/dist/lib/testCases/loader.d.ts +35 -1
- package/lib/dist/lib/testCases/loader.d.ts.map +1 -1
- package/lib/dist/lib/testCases/loader.js +278 -31
- package/lib/dist/lib/testCases/loader.js.map +1 -1
- package/lib/dist/lib/trajectoryStepDisplay.d.ts +25 -0
- package/lib/dist/lib/trajectoryStepDisplay.d.ts.map +1 -0
- package/lib/dist/lib/trajectoryStepDisplay.js +42 -0
- package/lib/dist/lib/trajectoryStepDisplay.js.map +1 -0
- package/lib/dist/lib/utils.d.ts +34 -0
- package/lib/dist/lib/utils.d.ts.map +1 -1
- package/lib/dist/lib/utils.js +49 -0
- package/lib/dist/lib/utils.js.map +1 -1
- package/lib/dist/services/connectors/claude-code/ClaudeCodeConnector.d.ts +68 -22
- package/lib/dist/services/connectors/claude-code/ClaudeCodeConnector.d.ts.map +1 -1
- package/lib/dist/services/connectors/claude-code/ClaudeCodeConnector.js +148 -111
- package/lib/dist/services/connectors/claude-code/ClaudeCodeConnector.js.map +1 -1
- package/lib/dist/services/connectors/kiro/KiroConnector.d.ts +21 -13
- package/lib/dist/services/connectors/kiro/KiroConnector.d.ts.map +1 -1
- package/lib/dist/services/connectors/kiro/KiroConnector.js +22 -25
- package/lib/dist/services/connectors/kiro/KiroConnector.js.map +1 -1
- package/lib/dist/services/connectors/pi/PiConnector.d.ts +49 -10
- package/lib/dist/services/connectors/pi/PiConnector.d.ts.map +1 -1
- package/lib/dist/services/connectors/pi/PiConnector.js +102 -86
- package/lib/dist/services/connectors/pi/PiConnector.js.map +1 -1
- package/lib/dist/services/connectors/subprocess/SubprocessConnector.d.ts +59 -14
- package/lib/dist/services/connectors/subprocess/SubprocessConnector.d.ts.map +1 -1
- package/lib/dist/services/connectors/subprocess/SubprocessConnector.js +95 -61
- package/lib/dist/services/connectors/subprocess/SubprocessConnector.js.map +1 -1
- package/lib/dist/services/evaluation/bedrockJudge.d.ts +18 -0
- package/lib/dist/services/evaluation/bedrockJudge.d.ts.map +1 -1
- package/lib/dist/services/evaluation/bedrockJudge.js +4 -0
- package/lib/dist/services/evaluation/bedrockJudge.js.map +1 -1
- package/lib/dist/services/evaluation/index.d.ts +18 -1
- package/lib/dist/services/evaluation/index.d.ts.map +1 -1
- package/lib/dist/services/evaluation/index.js +156 -19
- package/lib/dist/services/evaluation/index.js.map +1 -1
- package/lib/dist/services/metrics.d.ts +55 -0
- package/lib/dist/services/metrics.d.ts.map +1 -0
- package/lib/dist/services/metrics.js +89 -0
- package/lib/dist/services/metrics.js.map +1 -0
- package/lib/dist/services/storage/asyncBenchmarkStorage.d.ts +1 -1
- package/lib/dist/services/storage/asyncBenchmarkStorage.d.ts.map +1 -1
- package/lib/dist/services/storage/asyncBenchmarkStorage.js +30 -3
- package/lib/dist/services/storage/asyncBenchmarkStorage.js.map +1 -1
- package/lib/dist/services/storage/asyncRunStorage.d.ts +20 -1
- package/lib/dist/services/storage/asyncRunStorage.d.ts.map +1 -1
- package/lib/dist/services/storage/asyncRunStorage.js +125 -2
- package/lib/dist/services/storage/asyncRunStorage.js.map +1 -1
- package/lib/dist/services/storage/asyncTestCaseStorage.d.ts +18 -4
- package/lib/dist/services/storage/asyncTestCaseStorage.d.ts.map +1 -1
- package/lib/dist/services/storage/asyncTestCaseStorage.js +21 -4
- package/lib/dist/services/storage/asyncTestCaseStorage.js.map +1 -1
- package/lib/dist/services/storage/opensearchClient.d.ts +47 -12
- package/lib/dist/services/storage/opensearchClient.d.ts.map +1 -1
- package/lib/dist/services/storage/opensearchClient.js +12 -5
- package/lib/dist/services/storage/opensearchClient.js.map +1 -1
- package/lib/dist/services/traces/browserRecovery.d.ts +12 -1
- package/lib/dist/services/traces/browserRecovery.d.ts.map +1 -1
- package/lib/dist/services/traces/browserRecovery.js +35 -5
- package/lib/dist/services/traces/browserRecovery.js.map +1 -1
- package/lib/dist/services/traces/index.d.ts +8 -1
- package/lib/dist/services/traces/index.d.ts.map +1 -1
- package/lib/dist/services/traces/index.js +33 -12
- package/lib/dist/services/traces/index.js.map +1 -1
- package/lib/dist/services/traces/judgeAgentsHints.d.ts +98 -3
- package/lib/dist/services/traces/judgeAgentsHints.d.ts.map +1 -1
- package/lib/dist/services/traces/judgeAgentsHints.js +144 -3
- package/lib/dist/services/traces/judgeAgentsHints.js.map +1 -1
- package/lib/dist/services/traces/messageExtraction.d.ts.map +1 -1
- package/lib/dist/services/traces/messageExtraction.js +95 -33
- package/lib/dist/services/traces/messageExtraction.js.map +1 -1
- package/lib/dist/services/traces/spansToTrajectory.d.ts.map +1 -1
- package/lib/dist/services/traces/spansToTrajectory.js +51 -13
- package/lib/dist/services/traces/spansToTrajectory.js.map +1 -1
- package/lib/dist/services/traces/tracePoller.d.ts +27 -3
- package/lib/dist/services/traces/tracePoller.d.ts.map +1 -1
- package/lib/dist/services/traces/tracePoller.js +196 -33
- package/lib/dist/services/traces/tracePoller.js.map +1 -1
- package/lib/dist/services/traces/trajectoryMerge.d.ts +79 -0
- package/lib/dist/services/traces/trajectoryMerge.d.ts.map +1 -0
- package/lib/dist/services/traces/trajectoryMerge.js +109 -0
- package/lib/dist/services/traces/trajectoryMerge.js.map +1 -0
- package/lib/dist/types/index.d.ts +250 -3
- package/lib/dist/types/index.d.ts.map +1 -1
- package/lib/dist/types/index.js +24 -0
- package/lib/dist/types/index.js.map +1 -1
- package/package.json +8 -5
- package/server/dist/app.js +5490 -1557
- package/server/dist/index.js +5490 -1557
- package/dist/assets/index-CCQRDlO0.js +0 -243
- package/dist/assets/index-CNHQVbcj.css +0 -1
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright OpenSearch Contributors
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Canonical run-report path for a run surfaced on the compare page.
|
|
7
|
+
*
|
|
8
|
+
* Benchmark runs (embedded in a benchmark's `runs[]`) resolve at
|
|
9
|
+
* `/evaluations/benchmarks/:benchmarkId/runs/:runId`; everything else —
|
|
10
|
+
* ad-hoc / SDK eval-runs, or runs whose `benchmarkId` is merely a label — goes
|
|
11
|
+
* to the bare `/evaluations/runs/:runId` route (the benchmark route would
|
|
12
|
+
* 404/redirect for those, and the bare route 404s for benchmark run ids).
|
|
13
|
+
*
|
|
14
|
+
* Shared by the scoreboard's run-name link, its "Open run" icon, and the
|
|
15
|
+
* per-case table's run headers so the three can never disagree. Callers pass
|
|
16
|
+
* the benchmarkId from `ComparisonPage`'s `runBenchmarkIdById` map (which is
|
|
17
|
+
* `undefined` unless the run is a real benchmark member).
|
|
18
|
+
*/
|
|
19
|
+
export const runReportPath = (runId, benchmarkId) => benchmarkId
|
|
20
|
+
? `/evaluations/benchmarks/${encodeURIComponent(benchmarkId)}/runs/${encodeURIComponent(runId)}`
|
|
21
|
+
: `/evaluations/runs/${encodeURIComponent(runId)}`;
|
|
22
|
+
//# sourceMappingURL=runReportPath.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runReportPath.js","sourceRoot":"","sources":["../../runReportPath.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,KAAa,EAAE,WAAoB,EAAU,EAAE,CAC3E,WAAW;IACT,CAAC,CAAC,2BAA2B,kBAAkB,CAAC,WAAW,CAAC,SAAS,kBAAkB,CAAC,KAAK,CAAC,EAAE;IAChG,CAAC,CAAC,qBAAqB,kBAAkB,CAAC,KAAK,CAAC,EAAE,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Comparators for sorting evaluation-run rows and run-groups newest-first.
|
|
3
|
+
*
|
|
4
|
+
* Extracted from EvalRunsPage so the "grouped view sorts groups by most
|
|
5
|
+
* recent run, not alphabetically by benchmark name" rule is a plain,
|
|
6
|
+
* unit-testable function instead of logic buried inside a `useMemo`.
|
|
7
|
+
*/
|
|
8
|
+
export interface HasCreatedAt {
|
|
9
|
+
createdAt: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Most recent `createdAt` timestamp (ms since epoch) across a list of runs.
|
|
13
|
+
* Empty/all-invalid input returns 0 so a group with no valid timestamps
|
|
14
|
+
* sorts to the oldest position rather than throwing or sorting first.
|
|
15
|
+
*/
|
|
16
|
+
export declare function mostRecentTime(items: HasCreatedAt[]): number;
|
|
17
|
+
/**
|
|
18
|
+
* Sort groups (e.g. "runs grouped by benchmark") by each group's most
|
|
19
|
+
* recent run — descending, so the group with the latest activity is first.
|
|
20
|
+
* Ties (including empty groups, which compare equal at 0) preserve the
|
|
21
|
+
* original relative order (stable sort).
|
|
22
|
+
*
|
|
23
|
+
* @param groups - the groups to sort
|
|
24
|
+
* @param getItems - extracts the timestamped items (e.g. runs) from a group
|
|
25
|
+
*/
|
|
26
|
+
export declare function sortGroupsByRecency<T>(groups: T[], getItems: (group: T) => HasCreatedAt[]): T[];
|
|
27
|
+
//# sourceMappingURL=runSort.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runSort.d.ts","sourceRoot":"","sources":["../../runSort.ts"],"names":[],"mappings":"AAKA;;;;;;GAMG;AAEH,MAAM,WAAW,YAAY;IAC3B,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,YAAY,EAAE,GAAG,MAAM,CAO5D;AAED;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,YAAY,EAAE,GAAG,CAAC,EAAE,CAE/F"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright OpenSearch Contributors
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Most recent `createdAt` timestamp (ms since epoch) across a list of runs.
|
|
7
|
+
* Empty/all-invalid input returns 0 so a group with no valid timestamps
|
|
8
|
+
* sorts to the oldest position rather than throwing or sorting first.
|
|
9
|
+
*/
|
|
10
|
+
export function mostRecentTime(items) {
|
|
11
|
+
let max = 0;
|
|
12
|
+
for (const item of items) {
|
|
13
|
+
const t = new Date(item.createdAt).getTime();
|
|
14
|
+
if (Number.isFinite(t) && t > max)
|
|
15
|
+
max = t;
|
|
16
|
+
}
|
|
17
|
+
return max;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Sort groups (e.g. "runs grouped by benchmark") by each group's most
|
|
21
|
+
* recent run — descending, so the group with the latest activity is first.
|
|
22
|
+
* Ties (including empty groups, which compare equal at 0) preserve the
|
|
23
|
+
* original relative order (stable sort).
|
|
24
|
+
*
|
|
25
|
+
* @param groups - the groups to sort
|
|
26
|
+
* @param getItems - extracts the timestamped items (e.g. runs) from a group
|
|
27
|
+
*/
|
|
28
|
+
export function sortGroupsByRecency(groups, getItems) {
|
|
29
|
+
return [...groups].sort((a, b) => mostRecentTime(getItems(b)) - mostRecentTime(getItems(a)));
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=runSort.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runSort.js","sourceRoot":"","sources":["../../runSort.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAcH;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAAC,KAAqB;IAClD,IAAI,GAAG,GAAG,CAAC,CAAC;IACZ,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,MAAM,CAAC,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,OAAO,EAAE,CAAC;QAC7C,IAAI,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,GAAG;YAAE,GAAG,GAAG,CAAC,CAAC;IAC7C,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,mBAAmB,CAAI,MAAW,EAAE,QAAsC;IACxF,OAAO,CAAC,GAAG,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,GAAG,cAAc,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAC/F,CAAC"}
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* For performance optimization, stats are denormalized onto BenchmarkRun.stats
|
|
13
13
|
* and updated incrementally as test cases complete.
|
|
14
14
|
*/
|
|
15
|
-
import type { BenchmarkRun, EvaluationReport, RunStats as RunStatsType } from '../types/index.js';
|
|
15
|
+
import type { BenchmarkRun, EvaluationReport, RunStats as RunStatsType, BenchmarkRunStatus } from '../types/index.js';
|
|
16
16
|
/**
|
|
17
17
|
* Statistics for a benchmark run
|
|
18
18
|
*/
|
|
@@ -30,15 +30,27 @@ export interface RunStats {
|
|
|
30
30
|
* pass rates. Issue #242.
|
|
31
31
|
*/
|
|
32
32
|
errored: number;
|
|
33
|
+
/**
|
|
34
|
+
* Number of planned test cases that never executed (or never finished)
|
|
35
|
+
* because the run reached a TERMINAL status first — cancelled mid-way, or
|
|
36
|
+
* the executor crashed. Neither a pass, a fail, nor "pending": nothing is
|
|
37
|
+
* ever going to happen to them. Excluded from the pass-rate denominator
|
|
38
|
+
* and rendered as "n not run" (never with an in-progress spinner).
|
|
39
|
+
*/
|
|
40
|
+
notRun: number;
|
|
33
41
|
/** Total number of test cases in the run */
|
|
34
42
|
total: number;
|
|
35
43
|
/**
|
|
36
|
-
* Pass rate as a percentage (0-100). Computed over `total - errored
|
|
37
|
-
* (the *evaluable* set), not over `total`, so a non-retryable
|
|
38
|
-
* failure can't masquerade as the agent
|
|
44
|
+
* Pass rate as a percentage (0-100). Computed over `total - errored -
|
|
45
|
+
* notRun` (the *evaluable* set), not over `total`, so a non-retryable
|
|
46
|
+
* judge failure — or a cancellation — can't masquerade as the agent
|
|
47
|
+
* scoring 0%.
|
|
39
48
|
*/
|
|
40
49
|
passRate: number;
|
|
41
50
|
}
|
|
51
|
+
/** Run statuses after which no further per-case progress can happen. */
|
|
52
|
+
export declare const TERMINAL_RUN_STATUSES: ReadonlySet<BenchmarkRunStatus>;
|
|
53
|
+
export declare function isTerminalRunStatus(status: BenchmarkRunStatus | undefined): boolean;
|
|
42
54
|
/**
|
|
43
55
|
* Bucket a run's per-test-case results into passed/failed/errored/pending using
|
|
44
56
|
* ONLY the persisted result fields (status + passFailStatus) — no reports
|
|
@@ -55,11 +67,49 @@ export interface RunStats {
|
|
|
55
67
|
* the evaluator couldn't produce one (judge validation error, trace timeout).
|
|
56
68
|
* Excluded from passed/failed — exactly as calculateRunStats does via the
|
|
57
69
|
* report's metricsStatus.
|
|
70
|
+
*
|
|
71
|
+
* `plannedTotal` (bug: runs list showed no in-flight indication, 2026-09-01):
|
|
72
|
+
* for a genuinely in-progress run, `results` only gets an entry once a test
|
|
73
|
+
* case has actually STARTED — a run 9 cases into a planned 62 has a
|
|
74
|
+
* `results` map of length 9, so `total` here would report 9, not 62. Pass
|
|
75
|
+
* the run's snapshotted test-case count (`testCaseSnapshots.length`) as
|
|
76
|
+
* `plannedTotal` and the shortfall (planned - observed) is folded into
|
|
77
|
+
* `pending` so the invariant `total === passed+failed+errored+pending+notRun`
|
|
78
|
+
* still holds and callers see the true "53 more to go" total instead of a
|
|
79
|
+
* misleadingly small, already-100%-accounted-for total that looks finished.
|
|
80
|
+
*
|
|
81
|
+
* `runStatus` (bug: cancelled/failed runs rendered a phantom "n pending ⟳"
|
|
82
|
+
* forever, 2026-09-04): the shortfall above is only *pending* while the run
|
|
83
|
+
* can still make progress. Once the run is TERMINAL (cancelled / failed /
|
|
84
|
+
* completed) nothing will ever start those cases, so they are bucketed as
|
|
85
|
+
* `notRun` instead — a cancelled 34/62 run reads "34 executed · 28 not run",
|
|
86
|
+
* not "28 pending" with a spinner. The same applies to per-case entries a
|
|
87
|
+
* terminal run left behind in `pending`/`running` (an executor that died
|
|
88
|
+
* mid-case) and to entries explicitly marked `status: 'cancelled'` (written
|
|
89
|
+
* for never-started cases when a run is cancelled — see
|
|
90
|
+
* `EvaluationRun.results` in types/index.ts). Without `runStatus` the legacy
|
|
91
|
+
* behaviour (shortfall = pending) is preserved.
|
|
58
92
|
*/
|
|
59
93
|
export declare function bucketRunResults(results: Record<string, {
|
|
60
94
|
status?: string;
|
|
61
95
|
passFailStatus?: string;
|
|
62
|
-
}> | undefined): Pick<RunStats, 'passed' | 'failed' | 'errored' | 'pending' | 'total'>;
|
|
96
|
+
}> | undefined, plannedTotal?: number, runStatus?: BenchmarkRunStatus): Pick<RunStats, 'passed' | 'failed' | 'errored' | 'pending' | 'notRun' | 'total'>;
|
|
97
|
+
/**
|
|
98
|
+
* Pass rate (0-100) over the JUDGED set only: `passed / (passed + failed)`.
|
|
99
|
+
* Excluded: errored (executed, but the evaluator produced no verdict — the
|
|
100
|
+
* repo-wide #242 convention, same as the benchmark runs table and the run
|
|
101
|
+
* inspector), pending (not finished) and notRun (never started). So a run
|
|
102
|
+
* cancelled at 34/62 reports the pass rate of the cases that were actually
|
|
103
|
+
* judged, and an in-flight run doesn't read as "12%" because 50 cases
|
|
104
|
+
* haven't happened yet. Named for what it is — callers that surface it
|
|
105
|
+
* should footnote the excluded errored/notRun counts (the detail page does).
|
|
106
|
+
* Returns `null` when nothing has been judged so callers can render "—"
|
|
107
|
+
* rather than a fabricated 0%.
|
|
108
|
+
*/
|
|
109
|
+
export declare function passRateOverJudged(stats: {
|
|
110
|
+
passed: number;
|
|
111
|
+
failed: number;
|
|
112
|
+
}): number | null;
|
|
63
113
|
/**
|
|
64
114
|
* Calculate statistics for a benchmark run.
|
|
65
115
|
*
|
|
@@ -88,5 +138,59 @@ export declare function getReportIdsFromRun(run: BenchmarkRun): string[];
|
|
|
88
138
|
* @param reports - Array of reports for this run
|
|
89
139
|
* @returns Denormalized stats object (passed, failed, pending, total)
|
|
90
140
|
*/
|
|
141
|
+
/**
|
|
142
|
+
* Canonical "display" stats for a run detail/list view: prefer recomputing
|
|
143
|
+
* from the persisted per-test-case verdicts (`run.results`) via
|
|
144
|
+
* {@link bucketRunResults} — the single source of truth — and only fall
|
|
145
|
+
* back to the denormalized `run.stats` when `results` is empty (e.g. a run
|
|
146
|
+
* that hasn't started, or legacy data with no results map at all).
|
|
147
|
+
*
|
|
148
|
+
* This is THE single shared helper for pass/fail/errored/pending/total
|
|
149
|
+
* across every surface that renders run stats (runs list, benchmark runs
|
|
150
|
+
* list, run detail page, comparison page) — do not reimplement this logic
|
|
151
|
+
* locally in a component or add a differently-named twin. Historically this
|
|
152
|
+
* logic was duplicated per-page (each with its own subtly different bugs,
|
|
153
|
+
* e.g. `errored` not tracked, or `run.stats` trusted directly even when
|
|
154
|
+
* stale/inflated for trace-judged runs — a 66/84-real-passed run displaying
|
|
155
|
+
* as 84/84). Callers that only need `{passed, failed, errored, total}` can
|
|
156
|
+
* simply ignore the extra `pending` field.
|
|
157
|
+
*/
|
|
158
|
+
export declare function computeRunStats(run: {
|
|
159
|
+
status?: BenchmarkRunStatus;
|
|
160
|
+
results?: Record<string, {
|
|
161
|
+
status?: string;
|
|
162
|
+
passFailStatus?: string;
|
|
163
|
+
}>;
|
|
164
|
+
stats?: Partial<RunStatsType> | null;
|
|
165
|
+
testCaseSnapshots?: unknown[];
|
|
166
|
+
}): Pick<RunStatsType, 'passed' | 'failed' | 'errored' | 'pending' | 'total'> & {
|
|
167
|
+
notRun: number;
|
|
168
|
+
};
|
|
91
169
|
export declare function computeRunStatsFromReports(run: BenchmarkRun, reports: EvaluationReport[]): RunStatsType;
|
|
170
|
+
/**
|
|
171
|
+
* Single canonical "is this run actively in progress" check, shared by every
|
|
172
|
+
* runs-list surface (bug: the Evaluation Runs page and the benchmark-scoped
|
|
173
|
+
* Runs panel each grew their own copy of this, and only one of them actually
|
|
174
|
+
* rendered a running indicator). `status` is authoritative when present
|
|
175
|
+
* (always true for `EvaluationRun`; `BenchmarkRun.status` is only undefined
|
|
176
|
+
* for legacy pre-status data). Falls back to inspecting `results` so legacy
|
|
177
|
+
* runs without a top-level `status` still get a sensible effective status.
|
|
178
|
+
*/
|
|
179
|
+
export declare function getEffectiveRunStatus(run: {
|
|
180
|
+
status?: BenchmarkRunStatus;
|
|
181
|
+
results?: Record<string, {
|
|
182
|
+
status?: string;
|
|
183
|
+
}>;
|
|
184
|
+
}): BenchmarkRunStatus;
|
|
185
|
+
/**
|
|
186
|
+
* True when a run has neither reached a terminal status nor accounted for
|
|
187
|
+
* every planned test case yet. Used to decide whether a runs-list page
|
|
188
|
+
* should keep polling for live updates.
|
|
189
|
+
*/
|
|
190
|
+
export declare function isRunInProgress(run: {
|
|
191
|
+
status?: BenchmarkRunStatus;
|
|
192
|
+
results?: Record<string, {
|
|
193
|
+
status?: string;
|
|
194
|
+
}>;
|
|
195
|
+
}): boolean;
|
|
92
196
|
//# sourceMappingURL=runStats.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runStats.d.ts","sourceRoot":"","sources":["../../runStats.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,QAAQ,IAAI,YAAY,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"runStats.d.ts","sourceRoot":"","sources":["../../runStats.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,QAAQ,IAAI,YAAY,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAErH;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB,qEAAqE;IACrE,MAAM,EAAE,MAAM,CAAC;IACf,yFAAyF;IACzF,MAAM,EAAE,MAAM,CAAC;IACf,gFAAgF;IAChF,OAAO,EAAE,MAAM,CAAC;IAChB;;;;;OAKG;IACH,OAAO,EAAE,MAAM,C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AAC;IAC5B,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,cAAc,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACvE,KAAK,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC;IACrC,iBAAiB,CAAC,EAAE,OAAO,EAAE,CAAC;CAC/B,GACA,IAAI,CAAC,YAAY,EAAE,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC,GAAG;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,CA6ChG;AA0BD,wBAAgB,0BAA0B,CACxC,GAAG,EAAE,YAAY,EACjB,OAAO,EAAE,gBAAgB,EAAE,GAC1B,YAAY,CAgBd;AAED;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CACnC,GAAG,EAAE;IAAE,MAAM,CAAC,EAAE,kBAAkB,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAAE,GAClF,kBAAkB,CAQpB;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAC7B,GAAG,EAAE;IAAE,MAAM,CAAC,EAAE,kBAAkB,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAAE,GAClF,OAAO,CAET"}
|
package/lib/dist/lib/runStats.js
CHANGED
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
* Copyright OpenSearch Contributors
|
|
3
3
|
* SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
*/
|
|
5
|
+
/** Run statuses after which no further per-case progress can happen. */
|
|
6
|
+
export const TERMINAL_RUN_STATUSES = new Set(['completed', 'failed', 'cancelled']);
|
|
7
|
+
export function isTerminalRunStatus(status) {
|
|
8
|
+
return status !== undefined && TERMINAL_RUN_STATUSES.has(status);
|
|
9
|
+
}
|
|
5
10
|
/**
|
|
6
11
|
* Bucket a run's per-test-case results into passed/failed/errored/pending using
|
|
7
12
|
* ONLY the persisted result fields (status + passFailStatus) — no reports
|
|
@@ -18,16 +23,46 @@
|
|
|
18
23
|
* the evaluator couldn't produce one (judge validation error, trace timeout).
|
|
19
24
|
* Excluded from passed/failed — exactly as calculateRunStats does via the
|
|
20
25
|
* report's metricsStatus.
|
|
26
|
+
*
|
|
27
|
+
* `plannedTotal` (bug: runs list showed no in-flight indication, 2026-09-01):
|
|
28
|
+
* for a genuinely in-progress run, `results` only gets an entry once a test
|
|
29
|
+
* case has actually STARTED — a run 9 cases into a planned 62 has a
|
|
30
|
+
* `results` map of length 9, so `total` here would report 9, not 62. Pass
|
|
31
|
+
* the run's snapshotted test-case count (`testCaseSnapshots.length`) as
|
|
32
|
+
* `plannedTotal` and the shortfall (planned - observed) is folded into
|
|
33
|
+
* `pending` so the invariant `total === passed+failed+errored+pending+notRun`
|
|
34
|
+
* still holds and callers see the true "53 more to go" total instead of a
|
|
35
|
+
* misleadingly small, already-100%-accounted-for total that looks finished.
|
|
36
|
+
*
|
|
37
|
+
* `runStatus` (bug: cancelled/failed runs rendered a phantom "n pending ⟳"
|
|
38
|
+
* forever, 2026-09-04): the shortfall above is only *pending* while the run
|
|
39
|
+
* can still make progress. Once the run is TERMINAL (cancelled / failed /
|
|
40
|
+
* completed) nothing will ever start those cases, so they are bucketed as
|
|
41
|
+
* `notRun` instead — a cancelled 34/62 run reads "34 executed · 28 not run",
|
|
42
|
+
* not "28 pending" with a spinner. The same applies to per-case entries a
|
|
43
|
+
* terminal run left behind in `pending`/`running` (an executor that died
|
|
44
|
+
* mid-case) and to entries explicitly marked `status: 'cancelled'` (written
|
|
45
|
+
* for never-started cases when a run is cancelled — see
|
|
46
|
+
* `EvaluationRun.results` in types/index.ts). Without `runStatus` the legacy
|
|
47
|
+
* behaviour (shortfall = pending) is preserved.
|
|
21
48
|
*/
|
|
22
|
-
export function bucketRunResults(results) {
|
|
23
|
-
|
|
49
|
+
export function bucketRunResults(results, plannedTotal, runStatus) {
|
|
50
|
+
const terminal = isTerminalRunStatus(runStatus);
|
|
51
|
+
let passed = 0, failed = 0, errored = 0, pending = 0, notRun = 0, total = 0;
|
|
24
52
|
for (const r of Object.values(results || {})) {
|
|
25
53
|
total++;
|
|
54
|
+
if (r.status === 'cancelled') {
|
|
55
|
+
notRun++;
|
|
56
|
+
continue;
|
|
57
|
+
}
|
|
26
58
|
if (r.status === 'pending' || r.status === 'running') {
|
|
27
|
-
|
|
59
|
+
if (terminal)
|
|
60
|
+
notRun++;
|
|
61
|
+
else
|
|
62
|
+
pending++;
|
|
28
63
|
continue;
|
|
29
64
|
}
|
|
30
|
-
if (r.status === 'failed'
|
|
65
|
+
if (r.status === 'failed') {
|
|
31
66
|
failed++;
|
|
32
67
|
continue;
|
|
33
68
|
}
|
|
@@ -40,9 +75,39 @@ export function bucketRunResults(results) {
|
|
|
40
75
|
errored++; // completed without a verdict = judge errored (#242)
|
|
41
76
|
continue;
|
|
42
77
|
}
|
|
43
|
-
|
|
78
|
+
// Unknown / missing status: while the run is live this is "not settled
|
|
79
|
+
// yet" (pending). On a TERMINAL run an entry with no recognised status is
|
|
80
|
+
// schema drift or a bad writer — surface it as `errored` (amber ⚠) rather
|
|
81
|
+
// than hide it in the neutral notRun bucket (codex review).
|
|
82
|
+
if (terminal)
|
|
83
|
+
errored++;
|
|
84
|
+
else
|
|
85
|
+
pending++;
|
|
44
86
|
}
|
|
45
|
-
|
|
87
|
+
if (plannedTotal !== undefined && plannedTotal > total) {
|
|
88
|
+
if (terminal)
|
|
89
|
+
notRun += plannedTotal - total;
|
|
90
|
+
else
|
|
91
|
+
pending += plannedTotal - total;
|
|
92
|
+
total = plannedTotal;
|
|
93
|
+
}
|
|
94
|
+
return { passed, failed, errored, pending, notRun, total };
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Pass rate (0-100) over the JUDGED set only: `passed / (passed + failed)`.
|
|
98
|
+
* Excluded: errored (executed, but the evaluator produced no verdict — the
|
|
99
|
+
* repo-wide #242 convention, same as the benchmark runs table and the run
|
|
100
|
+
* inspector), pending (not finished) and notRun (never started). So a run
|
|
101
|
+
* cancelled at 34/62 reports the pass rate of the cases that were actually
|
|
102
|
+
* judged, and an in-flight run doesn't read as "12%" because 50 cases
|
|
103
|
+
* haven't happened yet. Named for what it is — callers that surface it
|
|
104
|
+
* should footnote the excluded errored/notRun counts (the detail page does).
|
|
105
|
+
* Returns `null` when nothing has been judged so callers can render "—"
|
|
106
|
+
* rather than a fabricated 0%.
|
|
107
|
+
*/
|
|
108
|
+
export function passRateOverJudged(stats) {
|
|
109
|
+
const judged = stats.passed + stats.failed;
|
|
110
|
+
return judged > 0 ? Math.round((stats.passed / judged) * 100) : null;
|
|
46
111
|
}
|
|
47
112
|
/**
|
|
48
113
|
* Calculate statistics for a benchmark run.
|
|
@@ -61,6 +126,7 @@ export function calculateRunStats(run, reports) {
|
|
|
61
126
|
let failed = 0;
|
|
62
127
|
let pending = 0;
|
|
63
128
|
let errored = 0;
|
|
129
|
+
let notRun = 0;
|
|
64
130
|
let total = 0;
|
|
65
131
|
Object.entries(run.results || {}).forEach(([testCaseId, result]) => {
|
|
66
132
|
total++;
|
|
@@ -69,7 +135,12 @@ export function calculateRunStats(run, reports) {
|
|
|
69
135
|
pending++;
|
|
70
136
|
return;
|
|
71
137
|
}
|
|
72
|
-
|
|
138
|
+
// Never started (run cancelled before reaching it) — not a failure.
|
|
139
|
+
if (result.status === 'cancelled') {
|
|
140
|
+
notRun++;
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
143
|
+
if (result.status === 'failed') {
|
|
73
144
|
failed++;
|
|
74
145
|
return;
|
|
75
146
|
}
|
|
@@ -107,15 +178,16 @@ export function calculateRunStats(run, reports) {
|
|
|
107
178
|
pending++;
|
|
108
179
|
}
|
|
109
180
|
});
|
|
110
|
-
// Pass rate is computed over the evaluable set (total minus errored
|
|
111
|
-
// If every run errored, expose 0% rather than dividing by zero.
|
|
112
|
-
const evaluable = Math.max(0, total - errored);
|
|
181
|
+
// Pass rate is computed over the evaluable set (total minus errored minus
|
|
182
|
+
// never-run). If every run errored, expose 0% rather than dividing by zero.
|
|
183
|
+
const evaluable = Math.max(0, total - errored - notRun);
|
|
113
184
|
const passRate = evaluable > 0 ? Math.round((passed / evaluable) * 100) : 0;
|
|
114
185
|
return {
|
|
115
186
|
passed,
|
|
116
187
|
failed,
|
|
117
188
|
pending,
|
|
118
189
|
errored,
|
|
190
|
+
notRun,
|
|
119
191
|
total,
|
|
120
192
|
passRate,
|
|
121
193
|
};
|
|
@@ -143,6 +215,86 @@ export function getReportIdsFromRun(run) {
|
|
|
143
215
|
* @param reports - Array of reports for this run
|
|
144
216
|
* @returns Denormalized stats object (passed, failed, pending, total)
|
|
145
217
|
*/
|
|
218
|
+
/**
|
|
219
|
+
* Canonical "display" stats for a run detail/list view: prefer recomputing
|
|
220
|
+
* from the persisted per-test-case verdicts (`run.results`) via
|
|
221
|
+
* {@link bucketRunResults} — the single source of truth — and only fall
|
|
222
|
+
* back to the denormalized `run.stats` when `results` is empty (e.g. a run
|
|
223
|
+
* that hasn't started, or legacy data with no results map at all).
|
|
224
|
+
*
|
|
225
|
+
* This is THE single shared helper for pass/fail/errored/pending/total
|
|
226
|
+
* across every surface that renders run stats (runs list, benchmark runs
|
|
227
|
+
* list, run detail page, comparison page) — do not reimplement this logic
|
|
228
|
+
* locally in a component or add a differently-named twin. Historically this
|
|
229
|
+
* logic was duplicated per-page (each with its own subtly different bugs,
|
|
230
|
+
* e.g. `errored` not tracked, or `run.stats` trusted directly even when
|
|
231
|
+
* stale/inflated for trace-judged runs — a 66/84-real-passed run displaying
|
|
232
|
+
* as 84/84). Callers that only need `{passed, failed, errored, total}` can
|
|
233
|
+
* simply ignore the extra `pending` field.
|
|
234
|
+
*/
|
|
235
|
+
export function computeRunStats(run) {
|
|
236
|
+
const plannedTotal = run.testCaseSnapshots?.length;
|
|
237
|
+
// Terminal-aware bucketing (see bucketRunResults): the planned-but-absent
|
|
238
|
+
// remainder is `pending` only while the run is still running. Only the
|
|
239
|
+
// EXPLICIT persisted status is trusted here — the results-derived legacy
|
|
240
|
+
// fallback in getEffectiveRunStatus reports 'completed' for any status-less
|
|
241
|
+
// run whose observed results happen to all be settled, which is exactly
|
|
242
|
+
// what an in-flight legacy run looks like between two cases.
|
|
243
|
+
const effectiveStatus = run.status;
|
|
244
|
+
if (run.results && Object.keys(run.results).length > 0) {
|
|
245
|
+
const bucketed = bucketRunResults(run.results, plannedTotal, effectiveStatus);
|
|
246
|
+
// Legacy-shape fallback (goyamegh/pr-run-report-v2, run-list all-errored bug):
|
|
247
|
+
// runs created before per-result passFailStatus denormalization landed
|
|
248
|
+
// (evaluationRunner.ts writing `results[testCaseId].passFailStatus`) only
|
|
249
|
+
// persisted `{ reportId, status: 'completed' }` on each result -- no
|
|
250
|
+
// verdict field at all. bucketRunResults correctly treats a 'completed'
|
|
251
|
+
// result with no passFailStatus as `errored` (#242), which is right for a
|
|
252
|
+
// genuine judge failure, but wrong here: EVERY case in the run buckets as
|
|
253
|
+
// errored (0 passed, 0 failed) even though the run actually has real
|
|
254
|
+
// verdicts. Detect that specific signature and, only when the
|
|
255
|
+
// denormalized `run.stats` independently shows real pass/fail evidence
|
|
256
|
+
// (computed by the report-fetching `computeStatsForRun`, verified against
|
|
257
|
+
// linked reports' actual passFailStatus -- see tests/unit/lib/runStats.test.ts
|
|
258
|
+
// 'legacy run shape' cases), trust `run.stats` instead of asserting the
|
|
259
|
+
// whole run errored. A run that is genuinely all-errored (no result ever
|
|
260
|
+
// resolved a verdict) will have run.stats.passed === run.stats.failed === 0
|
|
261
|
+
// too, so it still falls through to the errored bucketing below.
|
|
262
|
+
const allBucketedAsErrored = bucketed.errored > 0 && bucketed.passed === 0 && bucketed.failed === 0;
|
|
263
|
+
const statsHaveRealVerdicts = !!run.stats && ((run.stats.passed ?? 0) > 0 || (run.stats.failed ?? 0) > 0);
|
|
264
|
+
if (allBucketedAsErrored && statsHaveRealVerdicts && run.stats) {
|
|
265
|
+
return statsFallback(run.stats, run.stats.total ?? bucketed.total, effectiveStatus);
|
|
266
|
+
}
|
|
267
|
+
return bucketed;
|
|
268
|
+
}
|
|
269
|
+
if (run.stats && (run.stats.total ?? 0) > 0) {
|
|
270
|
+
return statsFallback(run.stats, run.stats.total ?? 0, effectiveStatus);
|
|
271
|
+
}
|
|
272
|
+
// No results and no stats: a run that never started a case. Terminal →
|
|
273
|
+
// every planned case is "not run"; otherwise they're all still pending.
|
|
274
|
+
const planned = plannedTotal || 0;
|
|
275
|
+
return isTerminalRunStatus(effectiveStatus)
|
|
276
|
+
? { passed: 0, failed: 0, errored: 0, pending: 0, notRun: planned, total: planned }
|
|
277
|
+
: { passed: 0, failed: 0, errored: 0, pending: planned, notRun: 0, total: planned };
|
|
278
|
+
}
|
|
279
|
+
/**
|
|
280
|
+
* Denormalized `run.stats` fallback, made terminal-aware: stats persisted
|
|
281
|
+
* before `notRun` existed carry the never-started remainder in `pending`
|
|
282
|
+
* even for a cancelled run. Re-home that remainder so a legacy cancelled
|
|
283
|
+
* run can't render a phantom spinner either.
|
|
284
|
+
*/
|
|
285
|
+
function statsFallback(stats, total, effectiveStatus) {
|
|
286
|
+
const pending = stats.pending ?? 0;
|
|
287
|
+
const notRun = stats.notRun ?? 0;
|
|
288
|
+
const terminal = isTerminalRunStatus(effectiveStatus);
|
|
289
|
+
return {
|
|
290
|
+
passed: stats.passed ?? 0,
|
|
291
|
+
failed: stats.failed ?? 0,
|
|
292
|
+
errored: stats.errored ?? 0,
|
|
293
|
+
pending: terminal ? 0 : pending,
|
|
294
|
+
notRun: terminal ? notRun + pending : notRun,
|
|
295
|
+
total,
|
|
296
|
+
};
|
|
297
|
+
}
|
|
146
298
|
export function computeRunStatsFromReports(run, reports) {
|
|
147
299
|
const reportsMap = {};
|
|
148
300
|
reports.forEach(report => {
|
|
@@ -154,7 +306,38 @@ export function computeRunStatsFromReports(run, reports) {
|
|
|
154
306
|
failed: fullStats.failed,
|
|
155
307
|
pending: fullStats.pending,
|
|
156
308
|
errored: fullStats.errored,
|
|
309
|
+
notRun: fullStats.notRun,
|
|
157
310
|
total: fullStats.total,
|
|
158
311
|
};
|
|
159
312
|
}
|
|
313
|
+
/**
|
|
314
|
+
* Single canonical "is this run actively in progress" check, shared by every
|
|
315
|
+
* runs-list surface (bug: the Evaluation Runs page and the benchmark-scoped
|
|
316
|
+
* Runs panel each grew their own copy of this, and only one of them actually
|
|
317
|
+
* rendered a running indicator). `status` is authoritative when present
|
|
318
|
+
* (always true for `EvaluationRun`; `BenchmarkRun.status` is only undefined
|
|
319
|
+
* for legacy pre-status data). Falls back to inspecting `results` so legacy
|
|
320
|
+
* runs without a top-level `status` still get a sensible effective status.
|
|
321
|
+
*/
|
|
322
|
+
export function getEffectiveRunStatus(run) {
|
|
323
|
+
if (run.status)
|
|
324
|
+
return run.status;
|
|
325
|
+
const results = Object.values(run.results || {});
|
|
326
|
+
if (results.some(r => r.status === 'running'))
|
|
327
|
+
return 'running';
|
|
328
|
+
if (results.some(r => r.status === 'pending') &&
|
|
329
|
+
!results.some(r => r.status === 'completed' || r.status === 'failed'))
|
|
330
|
+
return 'running';
|
|
331
|
+
if (results.some(r => r.status === 'completed') || results.some(r => r.status === 'failed'))
|
|
332
|
+
return 'completed';
|
|
333
|
+
return 'failed';
|
|
334
|
+
}
|
|
335
|
+
/**
|
|
336
|
+
* True when a run has neither reached a terminal status nor accounted for
|
|
337
|
+
* every planned test case yet. Used to decide whether a runs-list page
|
|
338
|
+
* should keep polling for live updates.
|
|
339
|
+
*/
|
|
340
|
+
export function isRunInProgress(run) {
|
|
341
|
+
return getEffectiveRunStatus(run) === 'running';
|
|
342
|
+
}
|
|
160
343
|
//# sourceMappingURL=runStats.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runStats.js","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,WAAW,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,QAAQ,CAAC;QAAE,OAAO,WAAW,CAAC;IAChH,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,eAAe,CAC7B,GAAmF;IAEnF,OAAO,qBAAqB,CAAC,GAAG,CAAC,KAAK,SAAS,CAAC;AAClD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"define.d.ts","sourceRoot":"","sources":["../../../testCases/define.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EACV,YAAY,EACZ,WAAW,EACX,UAAU,EACV,MAAM,EAEN,cAAc,EACf,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"define.d.ts","sourceRoot":"","sources":["../../../testCases/define.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EACV,YAAY,EACZ,WAAW,EACX,UAAU,EACV,MAAM,EAEN,cAAc,EACf,MAAM,YAAY,CAAC;AAkFpB,gBAAgB;AAChB,wBAAgB,yBAAyB,IAAI,IAAI,CAEhD;AAED,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CASpD;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,IAAI,CAClB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,GACjD,IAAI,CAAC;AACR,wBAAgB,IAAI,CAClB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,WAAW,EACpB,IAAI,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,GACjD,IAAI,CAAC;AAwDR;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,IAA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