@hmharness/evolution 0.9.0 → 0.12.1

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/evolve.js +12 -0
  2. package/package.json +1 -1
package/dist/evolve.js CHANGED
@@ -59,14 +59,26 @@ export async function runEvolution(opts) {
59
59
  // anything but cycles - the documented budget was decorative).
60
60
  const budget = await readBudget(home);
61
61
  const today = new Date().toISOString().slice(0, 10);
62
+ // Skipped cycles ARE data (SELFFEED honesty rule #2: absent/empty days must
63
+ // be visible). The early returns used to bypass the durable log entirely -
64
+ // a day's skips vanished without a trace and "0 skips" was unauditable
65
+ // (caught by the day-16 meta-audit). Persist before returning.
66
+ const persistSkip = async () => {
67
+ report.estTokens = 0;
68
+ const logDir = join(home, 'evolution');
69
+ await mkdir(logDir, { recursive: true });
70
+ await appendFile(join(logDir, 'log.jsonl'), JSON.stringify(report) + '\n', 'utf8');
71
+ };
62
72
  if (budget.maxCyclesPerDay && budget.cyclesToday >= budget.maxCyclesPerDay) {
63
73
  report.outcomes.push({ name: '(budget)', action: 'error', reason: `daily cycle limit reached (${budget.cyclesToday}/${budget.maxCyclesPerDay} today) - skipped` });
74
+ await persistSkip();
64
75
  return report;
65
76
  }
66
77
  if (budget.maxCyclesPerDay && budget.maxTokensPerCycle) {
67
78
  const dailyCap = budget.maxCyclesPerDay * budget.maxTokensPerCycle;
68
79
  if ((budget.tokensToday ?? 0) >= dailyCap) {
69
80
  report.outcomes.push({ name: '(budget)', action: 'error', reason: `daily token limit reached (~${budget.tokensToday}/${dailyCap} est-tokens today) - skipped` });
81
+ await persistSkip();
70
82
  return report;
71
83
  }
72
84
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hmharness/evolution",
3
- "version": "0.9.0",
3
+ "version": "0.12.1",
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",