v1.80.6

EvoMap/evolverv1.80.6May 9, 2026by autogame-17

AI Summary

Improves data integrity by validating Gene and Capsule schemas before persistence and fixes memory usage in long-running daemons by implementing tail-reading for large event logs.

Key Highlights

  • Validate Gene/Capsule schemas before persisting and publishing.
  • Fixed `Capsule.asset_id` computation to be unique per cycle.
  • Bound `readAllEvents` memory footprint using tail-reading for large files.
  • Added `createTask` helper under `src/gep/schemas/task.js`.

New Features

  • Schema validation before persistence.
  • Memory optimization for event logs.
  • Task schema factory.

Full Release Notes

## Bug fixes

- **Validate Gene/Capsule before persisting and publishing.** `upsertGene`, `upsertCapsule`, `appendCapsule` and the publish builders now run the canonical schema validators and emit a `console.warn` on failure. Validation is warn-only on the client; the hub re-validates server-side. (#31, audit issue #30 H1)
- **Compute `Capsule.asset_id` exactly once per cycle.** A previous code path called `upsertCapsule` twice -- first with a stale `asset_id` (computed before `success_streak` and `a2a` were finalized), then again with the correct one. The duplicate write is now removed; `appendEventJsonl(event)` runs before `computeCapsuleSuccessStreak` so the just-completed event still counts toward its own streak. (#31, audit issue #30 H5)
- **Bound `readAllEvents` memory footprint.** Long-running daemons accumulated dozens of MB in `events.jsonl`, causing heap spikes on every successful `solidify` cycle. `readAllEvents` now stat()s the file and tail-reads when above the configurable cap (`EVOLVER_EVENTS_FULL_READ_MAX_BYTES`, default 2MB). The first-line discard only triggers when the read truly starts mid-file, never when the chunk covers the whole file. (#31, audit issue #30 H6)

## Schemas

- **Task schema factory.** New `createTask` / `validateTask` helpers under `src/gep/schemas/task.js`, mirroring the Gene and Capsule factories shipped earlier. Adopted by `taskReceiver.js`. (#28)

## Internal-only

- New tunables `EVOLVER_EVENTS_FULL_READ_MAX_BYTES` and `EVOLVER_EVENTS_TAIL_READ_BYTES` for operators that want to cap memory more aggressively on resource-constrained hosts.