@remnic/bench 9.69.40 → 9.69.41
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.
|
@@ -2776,6 +2776,26 @@ function optionalFiniteNumber(where, container, key) {
|
|
|
2776
2776
|
}
|
|
2777
2777
|
return container[key];
|
|
2778
2778
|
}
|
|
2779
|
+
function optionalNonNegativeInteger(where, container, key) {
|
|
2780
|
+
if (!(key in container)) {
|
|
2781
|
+
return void 0;
|
|
2782
|
+
}
|
|
2783
|
+
const value = container[key];
|
|
2784
|
+
if (typeof value !== "number" || !Number.isInteger(value) || value < 0) {
|
|
2785
|
+
reject(`${where} must be a non-negative integer when present`);
|
|
2786
|
+
}
|
|
2787
|
+
return value;
|
|
2788
|
+
}
|
|
2789
|
+
function isDeclaredMultiSample(legacy) {
|
|
2790
|
+
if (!isRecord2(legacy.meta)) {
|
|
2791
|
+
return false;
|
|
2792
|
+
}
|
|
2793
|
+
const runCount = legacy.meta.runCount;
|
|
2794
|
+
if (typeof runCount === "number" && Number.isFinite(runCount) && runCount > 1) {
|
|
2795
|
+
return true;
|
|
2796
|
+
}
|
|
2797
|
+
return Array.isArray(legacy.meta.seeds) && legacy.meta.seeds.length > 1;
|
|
2798
|
+
}
|
|
2779
2799
|
function optionalMode(where, container) {
|
|
2780
2800
|
if (!("mode" in container)) {
|
|
2781
2801
|
return void 0;
|
|
@@ -2811,68 +2831,52 @@ function optionalSeeds(where, value) {
|
|
|
2811
2831
|
if (value === void 0) {
|
|
2812
2832
|
return void 0;
|
|
2813
2833
|
}
|
|
2814
|
-
if (!Array.isArray(value) || !value.every(
|
|
2815
|
-
reject(`${where} must be an array of
|
|
2834
|
+
if (!Array.isArray(value) || !value.every((item) => typeof item === "number" && Number.isInteger(item))) {
|
|
2835
|
+
reject(`${where} must be an array of integers when present`);
|
|
2816
2836
|
}
|
|
2817
2837
|
return value;
|
|
2818
2838
|
}
|
|
2819
2839
|
function isBenchRuntimeProfile(value) {
|
|
2820
2840
|
return value === "baseline" || value === "real" || value === "openclaw-chain" || value === "local-lab";
|
|
2821
2841
|
}
|
|
2822
|
-
function normalizeMetricAggregate(where, raw, taskCount) {
|
|
2842
|
+
function normalizeMetricAggregate(where, raw, taskCount, declaredMultiSample) {
|
|
2823
2843
|
if (isRecord2(raw) && isFiniteNumber(raw.mean) && isFiniteNumber(raw.median) && isFiniteNumber(raw.stdDev) && isFiniteNumber(raw.min) && isFiniteNumber(raw.max)) {
|
|
2824
2844
|
return raw;
|
|
2825
2845
|
}
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
mean2 = raw;
|
|
2833
|
-
} else if (isRecord2(raw)) {
|
|
2834
|
-
for (const field of ["mean", "median", "stdDev", "min", "max"]) {
|
|
2835
|
-
if (field in raw && !isFiniteNumber(raw[field])) {
|
|
2836
|
-
reject(`${where}.${field} must be a finite number when present`);
|
|
2837
|
-
}
|
|
2838
|
-
}
|
|
2839
|
-
if (isFiniteNumber(raw.mean)) {
|
|
2840
|
-
mean2 = raw.mean;
|
|
2841
|
-
}
|
|
2842
|
-
if (isFiniteNumber(raw.median)) {
|
|
2843
|
-
rawMedian = raw.median;
|
|
2844
|
-
}
|
|
2845
|
-
if (isFiniteNumber(raw.stdDev)) {
|
|
2846
|
-
rawStdDev = raw.stdDev;
|
|
2847
|
-
}
|
|
2848
|
-
if (isFiniteNumber(raw.min)) {
|
|
2849
|
-
rawMin = raw.min;
|
|
2850
|
-
}
|
|
2851
|
-
if (isFiniteNumber(raw.max)) {
|
|
2852
|
-
rawMax = raw.max;
|
|
2846
|
+
if (!isRecord2(raw)) {
|
|
2847
|
+
reject(`${where} must be an object with a finite mean number`);
|
|
2848
|
+
}
|
|
2849
|
+
for (const field of ["mean", "median", "stdDev", "min", "max"]) {
|
|
2850
|
+
if (field in raw && !isFiniteNumber(raw[field])) {
|
|
2851
|
+
reject(`${where}.${field} must be a finite number when present`);
|
|
2853
2852
|
}
|
|
2854
2853
|
}
|
|
2855
|
-
if (
|
|
2856
|
-
reject(`${where} must be
|
|
2854
|
+
if (!isFiniteNumber(raw.mean)) {
|
|
2855
|
+
reject(`${where} must be an object with a finite mean number`);
|
|
2857
2856
|
}
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
max
|
|
2865
|
-
|
|
2857
|
+
const rawMedian = isFiniteNumber(raw.median) ? raw.median : void 0;
|
|
2858
|
+
const rawStdDev = isFiniteNumber(raw.stdDev) ? raw.stdDev : void 0;
|
|
2859
|
+
const rawMin = isFiniteNumber(raw.min) ? raw.min : void 0;
|
|
2860
|
+
const rawMax = isFiniteNumber(raw.max) ? raw.max : void 0;
|
|
2861
|
+
if (rawMedian !== void 0 || rawStdDev !== void 0 || rawMin !== void 0 || rawMax !== void 0) {
|
|
2862
|
+
reject(
|
|
2863
|
+
`${where} missing required fields (median, stdDev, min, max); partial aggregates cannot mix persisted and synthesized values`
|
|
2864
|
+
);
|
|
2866
2865
|
}
|
|
2867
|
-
if (taskCount === 1) {
|
|
2866
|
+
if (taskCount === 1 && !declaredMultiSample) {
|
|
2868
2867
|
return {
|
|
2869
|
-
mean:
|
|
2870
|
-
median:
|
|
2871
|
-
stdDev:
|
|
2872
|
-
min:
|
|
2873
|
-
max:
|
|
2868
|
+
mean: raw.mean,
|
|
2869
|
+
median: raw.mean,
|
|
2870
|
+
stdDev: 0,
|
|
2871
|
+
min: raw.mean,
|
|
2872
|
+
max: raw.mean
|
|
2874
2873
|
};
|
|
2875
2874
|
}
|
|
2875
|
+
if (declaredMultiSample) {
|
|
2876
|
+
reject(
|
|
2877
|
+
`${where} missing required multi-sample fields (median, stdDev, min, max) for declared multi-run artifact`
|
|
2878
|
+
);
|
|
2879
|
+
}
|
|
2876
2880
|
if (taskCount === 0) {
|
|
2877
2881
|
reject(
|
|
2878
2882
|
`${where} missing required fields (median, stdDev, min, max); mean-only upgrade requires exactly one recognized task`
|
|
@@ -2893,6 +2897,9 @@ function upgradeMeta(legacy, recognizedTaskCount) {
|
|
|
2893
2897
|
reject(`meta.${key} must be a non-empty string`);
|
|
2894
2898
|
}
|
|
2895
2899
|
}
|
|
2900
|
+
if (!Number.isFinite(Date.parse(meta.timestamp))) {
|
|
2901
|
+
reject("meta.timestamp must be a parseable date");
|
|
2902
|
+
}
|
|
2896
2903
|
const taskCount = recognizedTaskCount;
|
|
2897
2904
|
const upgraded = {
|
|
2898
2905
|
id: meta.id,
|
|
@@ -2909,7 +2916,7 @@ function upgradeMeta(legacy, recognizedTaskCount) {
|
|
|
2909
2916
|
// Old UI display default for an absent mode.
|
|
2910
2917
|
mode: optionalMode("meta.mode", meta) ?? "quick",
|
|
2911
2918
|
// Old UI fell back to the task count when runCount was absent.
|
|
2912
|
-
runCount:
|
|
2919
|
+
runCount: optionalNonNegativeInteger("meta.runCount", meta, "runCount") ?? taskCount,
|
|
2913
2920
|
seeds: optionalSeeds("meta.seeds", meta.seeds) ?? []
|
|
2914
2921
|
};
|
|
2915
2922
|
const metaExtras = upgraded;
|
|
@@ -3089,6 +3096,7 @@ function upgradeResults(legacy) {
|
|
|
3089
3096
|
reject("results must be an object when present");
|
|
3090
3097
|
}
|
|
3091
3098
|
const results = legacy.results;
|
|
3099
|
+
const declaredMultiSample = isDeclaredMultiSample(legacy);
|
|
3092
3100
|
if ("tasks" in results) {
|
|
3093
3101
|
if (!Array.isArray(results.tasks)) {
|
|
3094
3102
|
reject("results.tasks must be an array when present");
|
|
@@ -3104,7 +3112,8 @@ function upgradeResults(legacy) {
|
|
|
3104
3112
|
normalizedAggregates[metricName] = normalizeMetricAggregate(
|
|
3105
3113
|
`results.aggregates.${metricName}`,
|
|
3106
3114
|
rawValue,
|
|
3107
|
-
upgraded.tasks.length
|
|
3115
|
+
upgraded.tasks.length,
|
|
3116
|
+
declaredMultiSample
|
|
3108
3117
|
);
|
|
3109
3118
|
}
|
|
3110
3119
|
upgraded.aggregates = normalizedAggregates;
|
|
@@ -3124,7 +3133,8 @@ function upgradeResults(legacy) {
|
|
|
3124
3133
|
catNormalized[metricName] = normalizeMetricAggregate(
|
|
3125
3134
|
`results.categoryAggregates.${catName}.${metricName}`,
|
|
3126
3135
|
rawVal,
|
|
3127
|
-
upgraded.tasks.length
|
|
3136
|
+
upgraded.tasks.length,
|
|
3137
|
+
declaredMultiSample
|
|
3128
3138
|
);
|
|
3129
3139
|
}
|
|
3130
3140
|
normalizedCategoryAggregates[catName] = catNormalized;
|
package/dist/index.js
CHANGED
|
@@ -187,7 +187,7 @@ import {
|
|
|
187
187
|
writeLeaderboardArtifactsForResult,
|
|
188
188
|
writeRepeatedFailureRunMetadata,
|
|
189
189
|
writeRepeatedFailureStatistics
|
|
190
|
-
} from "./chunk-
|
|
190
|
+
} from "./chunk-QW6VEGZN.js";
|
|
191
191
|
|
|
192
192
|
// src/build-week-evidence-receipt.ts
|
|
193
193
|
import { createHash as createHash2 } from "crypto";
|
|
@@ -48984,7 +48984,7 @@ async function writeRepeatedFailurePaperArtifacts(options) {
|
|
|
48984
48984
|
}
|
|
48985
48985
|
async function runRepeatedFailurePaperReportCliCommand(options) {
|
|
48986
48986
|
try {
|
|
48987
|
-
const { replayRepeatedFailureStatistics: replayRepeatedFailureStatistics2 } = await import("./repeated-failure-suite-runner-
|
|
48987
|
+
const { replayRepeatedFailureStatistics: replayRepeatedFailureStatistics2 } = await import("./repeated-failure-suite-runner-GEBPBTNL.js");
|
|
48988
48988
|
const replay = await replayRepeatedFailureStatistics2(options);
|
|
48989
48989
|
if (replay.exitCode !== 0) return replay;
|
|
48990
48990
|
const result = await writeRepeatedFailurePaperArtifacts(options);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remnic/bench",
|
|
3
|
-
"version": "9.69.
|
|
3
|
+
"version": "9.69.41",
|
|
4
4
|
"description": "Retrieval latency ladder benchmarks + CI regression gates for @remnic/core",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
"hyparquet": "^1.25.7",
|
|
42
42
|
"yaml": "^2.4.2",
|
|
43
43
|
"zod": "^3.24.0",
|
|
44
|
-
"@remnic/coding-graph": "^9.69.
|
|
45
|
-
"@remnic/core": "^9.69.
|
|
44
|
+
"@remnic/coding-graph": "^9.69.41",
|
|
45
|
+
"@remnic/core": "^9.69.41"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"tsup": "^8.5.1",
|