@hmharness/evolution 0.14.4 → 0.14.7
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/candidates.d.ts +6 -0
- package/dist/candidates.js +8 -2
- package/dist/evolve.js +12 -8
- package/package.json +1 -1
package/dist/candidates.d.ts
CHANGED
|
@@ -46,6 +46,12 @@ export interface ExperimentArm {
|
|
|
46
46
|
n: number;
|
|
47
47
|
passRate: number;
|
|
48
48
|
tokens: number;
|
|
49
|
+
/** per-case rows (day-56): which case flipped is the point of a diff */
|
|
50
|
+
results?: Array<{
|
|
51
|
+
name: string;
|
|
52
|
+
pass: boolean;
|
|
53
|
+
tokens: number;
|
|
54
|
+
}>;
|
|
49
55
|
}
|
|
50
56
|
export interface ExperimentReport {
|
|
51
57
|
candidateId: string;
|
package/dist/candidates.js
CHANGED
|
@@ -105,23 +105,29 @@ export async function runCandidateExperiment(home, candidateId, opts) {
|
|
|
105
105
|
// holdout cases are excluded from promotion gates (bench.ts anti-memorization)
|
|
106
106
|
const gate = opts.cases.filter((c) => !c.holdout).slice(0, Math.max(1, opts.maxCases ?? 12));
|
|
107
107
|
let cPass = 0, cTok = 0, tPass = 0, tTok = 0;
|
|
108
|
+
// per-case rows (day-56 observability: which case flipped is the whole
|
|
109
|
+
// point of a diff - aggregates alone cannot answer it)
|
|
110
|
+
const ctlRows = [];
|
|
111
|
+
const trtRows = [];
|
|
108
112
|
for (const c of gate) {
|
|
109
113
|
const ctl = await opts.runCase(c, 'control');
|
|
110
114
|
if (ctl.pass)
|
|
111
115
|
cPass++;
|
|
112
116
|
cTok += ctl.tokens;
|
|
117
|
+
ctlRows.push({ name: c.name, pass: ctl.pass, tokens: ctl.tokens });
|
|
113
118
|
const trt = await opts.runCase(c, 'treatment');
|
|
114
119
|
if (trt.pass)
|
|
115
120
|
tPass++;
|
|
116
121
|
tTok += trt.tokens;
|
|
122
|
+
trtRows.push({ name: c.name, pass: trt.pass, tokens: trt.tokens });
|
|
117
123
|
}
|
|
118
124
|
const v = verdictFor({ pass: cPass, n: gate.length }, { pass: tPass, n: gate.length });
|
|
119
125
|
const report = {
|
|
120
126
|
candidateId,
|
|
121
127
|
ranAt: new Date().toISOString(),
|
|
122
128
|
cases: gate.length,
|
|
123
|
-
control: { pass: cPass, n: gate.length, passRate: gate.length ? cPass / gate.length : 0, tokens: cTok },
|
|
124
|
-
treatment: { pass: tPass, n: gate.length, passRate: gate.length ? tPass / gate.length : 0, tokens: tTok },
|
|
129
|
+
control: { pass: cPass, n: gate.length, passRate: gate.length ? cPass / gate.length : 0, tokens: cTok, results: ctlRows },
|
|
130
|
+
treatment: { pass: tPass, n: gate.length, passRate: gate.length ? tPass / gate.length : 0, tokens: tTok, results: trtRows },
|
|
125
131
|
...v,
|
|
126
132
|
};
|
|
127
133
|
const dir = join(home, 'evolution', 'experiments', candidateId);
|
package/dist/evolve.js
CHANGED
|
@@ -167,14 +167,18 @@ export async function runEvolution(opts) {
|
|
|
167
167
|
}
|
|
168
168
|
else {
|
|
169
169
|
proposals = await proposeSkills(provider, signals, say, ancestor ?? undefined, mergeWith ?? undefined);
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
170
|
+
// AWM is ADDITIVE, not fallback-only (design intent: "higher abstraction
|
|
171
|
+
// than per-mistake reflection"). With batch-produced task archetypes
|
|
172
|
+
// repeating 100+ times/day, the workflow path must get its turn even
|
|
173
|
+
// when the meta-model also proposes - the -workflow naming + gate still
|
|
174
|
+
// decides promotion. Guard: only append when clusters are real (>=5).
|
|
175
|
+
try {
|
|
176
|
+
const { workflowProposals } = await import("./workflows.js");
|
|
177
|
+
const wf = await workflowProposals(provider, home, say);
|
|
178
|
+
proposals = [...proposals, ...wf];
|
|
179
|
+
}
|
|
180
|
+
catch (err) {
|
|
181
|
+
say(` awm skipped: ${String(err).slice(0, 80)}`);
|
|
178
182
|
}
|
|
179
183
|
}
|
|
180
184
|
report.proposals = proposals;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hmharness/evolution",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.7",
|
|
4
4
|
"description": "hmharness evolution subsystem: persistent memory, insight capture, skill library, and the bench that gives evolution its fitness signal. First-class kernel citizen, not a plugin.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|