@hmharness/evaluation 0.23.52 → 0.23.55
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/dist/metrics.js +1 -1
- package/dist/score.js +1 -1
- package/dist/types.js +1 -1
- package/package.json +3 -3
package/dist/metrics.js
CHANGED
|
@@ -30,7 +30,7 @@ export function computeMetrics(input) {
|
|
|
30
30
|
if (input.costUsd !== undefined)
|
|
31
31
|
report.costUsd = Number(input.costUsd.toFixed(4));
|
|
32
32
|
if (input.actionLatenciesMs?.length) {
|
|
33
|
-
const sorted =
|
|
33
|
+
const sorted = input.actionLatenciesMs.toSorted((a, b) => a - b);
|
|
34
34
|
report.latency = {
|
|
35
35
|
p50Ms: quantile(sorted, 0.5),
|
|
36
36
|
p95Ms: quantile(sorted, 0.95),
|
package/dist/score.js
CHANGED
|
@@ -156,7 +156,7 @@ export function humanFromJudgeScores(scores) {
|
|
|
156
156
|
*/
|
|
157
157
|
export function formatHMHScore(score) {
|
|
158
158
|
const lines = [`HMH Score v${score.version}: ${score.composite}/100`];
|
|
159
|
-
const sorted =
|
|
159
|
+
const sorted = score.dimensions.toSorted((a, b) => b.score - a.score);
|
|
160
160
|
for (const d of sorted) {
|
|
161
161
|
const bar = '█'.repeat(Math.round(d.score / 10)) + '░'.repeat(10 - Math.round(d.score / 10));
|
|
162
162
|
lines.push(` ${d.dimension.padEnd(16)} ${bar} ${String(d.score).padStart(3)} (${d.method})`);
|
package/dist/types.js
CHANGED
|
@@ -19,7 +19,7 @@ export const EVIDENCE_RANK = {
|
|
|
19
19
|
};
|
|
20
20
|
/** Shared scoring helper: all-or-nothing evidence -> 1 or 0; partial allowed. */
|
|
21
21
|
export function scoreFromEvidence(evidence, failures) {
|
|
22
|
-
const ranked =
|
|
22
|
+
const ranked = evidence.toSorted((a, b) => EVIDENCE_RANK[a.kind] - EVIDENCE_RANK[b.kind]);
|
|
23
23
|
const passing = ranked.filter((e) => e.passed !== false).length;
|
|
24
24
|
// an llmJudge/selfReport-only pass is never a full pass (evidence-first rule)
|
|
25
25
|
const weakestPass = ranked.length > 0 ? EVIDENCE_RANK[ranked[ranked.length - 1].kind] : EVIDENCE_RANK.selfReport;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hmharness/evaluation",
|
|
3
|
-
"version": "0.23.
|
|
3
|
+
"version": "0.23.55",
|
|
4
4
|
"description": "hmharness evaluation: the Evaluator/Judge contract (V2 blueprint M2). Hard evidence outranks LLM judgment - build results, exit codes, exact/regex assertions first; the LLM judge is a last resort and is labeled as such. Evaluations attach to trajectories (judge.completed events).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
"build": "tsc -p tsconfig.build.json"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@hmharness/kernel": "0.23.
|
|
19
|
-
"@hmharness/observability": "0.23.
|
|
18
|
+
"@hmharness/kernel": "0.23.55",
|
|
19
|
+
"@hmharness/observability": "0.23.55"
|
|
20
20
|
},
|
|
21
21
|
"files": [
|
|
22
22
|
"dist"
|