@hmharness/evolution 0.13.0 → 0.13.3

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.
Files changed (2) hide show
  1. package/dist/bench.js +16 -0
  2. package/package.json +1 -1
package/dist/bench.js CHANGED
@@ -101,6 +101,22 @@ export async function runBench(home, run) {
101
101
  }
102
102
  }
103
103
  const passed = results.filter((r) => r.pass).length;
104
+ // persist a history record: readiness's "eval-regression-stable" condition
105
+ // reads evolution/benches/*.json - without these records the RL gate's
106
+ // stability condition can never be met (day-20 audit gap)
107
+ try {
108
+ const dir = join(home, 'evolution', 'benches');
109
+ await mkdir(dir, { recursive: true });
110
+ const record = {
111
+ time: new Date().toISOString(),
112
+ total: cases.length,
113
+ passed,
114
+ passRate: cases.length === 0 ? 1 : passed / cases.length,
115
+ results: results.map((r) => ({ name: r.name, pass: r.pass, detail: r.detail.slice(0, 200) })),
116
+ };
117
+ await writeFile(join(dir, `${record.time.replace(/[:.]/g, '-')}.json`), JSON.stringify(record, null, 2) + '\n', 'utf8');
118
+ }
119
+ catch { /* history is best-effort; the run result still returns */ }
104
120
  return { results, passRate: cases.length === 0 ? 1 : passed / cases.length };
105
121
  }
106
122
  /** Starter cases so the evolve gate has a signal from day one. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hmharness/evolution",
3
- "version": "0.13.0",
3
+ "version": "0.13.3",
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",