v0.2.5
[0.2.5] - 2026-07-02
Performance
- GA Diversity Sampling: Added
DiversitySampleSizeconfig (default 200) to estimate numeric diversity via random neighbor sampling instead of O(n²) exact computation. Stats(pop=1000) latency dropped 38% (69.5ms → 43.3ms). Configurable perPopulationConfig.DiversitySampleSize. - Fitness Sharing Optimization: Replaced per-agent Fisher-Yates full permutation with Reservoir Sampling in
applyFitnessSharingSampled. Allocation reduced 44% for all population sizes (pop=100: 185→106 allocs, pop=500: 905→506 allocs). GC pressure halved in large evolution runs. - Subscribe Allocation Reduction: Replaced UUID subscription IDs with
atomic.Int64counter and removed*sync.Onceper subscriber. Allocs reduced 33% (900→600 per 100 subscribers). Channel buffer increased from 1→64 to reduce burst drops. - Benchmark Report: Comprehensive benchmark report across all modules (events, GA genome/evaluation, memory distillation, tools core, handlers, errors) with full platform config (Apple M3 Max, Go 1.26, 3-run average).
New Features
- Memory Pipeline Complete: End-to-end memory pipeline with
ReportGenerator,PushService, and report formatting for human-readable evolution summaries. Full cycle: evaluation → distillation → report → push. - Agent Age Eviction:
AgentMaxAgeconfig limits strategy lifespan;GenerationCreatedtracking ensures agents survive exactlyAgentMaxAgegenerations. Legacy strategies (GenerationCreated==0) exempted. - Confidence Calculation: Added sample-based confidence to
AggregateEvidenceCrossTask, enabling evidence quality scoring in cross-task aggregation.
Refactors
- Truncate Utility Consolidation: Unified
internal/ares_memory/internal/truncatepackage for reusable truncation logic across memory and LLM modules. - Evidence Logic Cleanup:
AggregateEvidencerefactored for clarity; cross-task evidence aggregation now filters mixed-task noise withAggregateEvidenceCrossTask. - FIXME Cleanup (22 files): Removed stale FIXME comments in
internal/ares_quant/,internal/api_impl/,api/client/,internal/ares_events/,internal/storage/postgres/services/. All had already been implemented but comments were not updated. - Promotion Logic: Tightened statistical bands (5-20x → 6-18x) in
selection_extra_test.goand reduced low-scorer threshold (5% → 0.2%) for more deterministic selection verification.
Bug Fixes
- Ignored json.Marshal Errors: Fixed 4 ignored
json.Marshalcalls ininternal/ares_events/summary_repository.go— previously would silently producenullDB values on serialization failure. Now errors propagate withfmt.Errorf("marshal %s: %w", ...). - Errgroup Context Propagation: In
internal/api_impl/service.go,errgroup.WithContext(ctx)returned a derived context cancelled on sibling errors — but it was discarded with_. Fix:s.g, s.ctx = errgroup.WithContext(ctx)to enable proper error propagation. - SSE Health Probe: Implemented real SSE health check via
ConnectSSEinstead of hardcoded assumed healthy. - Generation Logging: Fixed generation=0 in logs by using absolute
Population.Generationin callback_gen. - GenerationCreated Off-by-One: Use Generation+1 so agents survive exactly
AgentMaxAgegenerations. - Guardrail Config Default: Inverted
PromptDiversityGuardEnabled→DisablePromptDiversityGuard(default enabled).
Code Quality
- Unit Test Coverage (service.go): Added
internal/ares_evolution/service/service_test.go(383 lines, 23 test cases). Coverage ofservice.goincreased 16.3% → 47.2%. Key functions:NewService93.3%,Evolve80.4%,toAPIStrategy/toInternalStrategy/cloneDimensionScoresall 100%. - LLM Scorer Tests: Added pure-logic tests for
extractScoreFromText,fallbackScore,buildPrompt,parseScore(35 table-driven test cases). No LLM required. - Task Planner Tests: Consolidated 10 repetitive test functions into 2 table-driven tests with meaningful
result.Errorcontent assertions.TestFormatToolsListconverted to table-driven. - Test Weakness Assessment: Sampled 20+ non-testify test files — confirmed they have meaningful multi-field assertions (not perfunctory). Postgres integration tests properly isolated behind
//go:build integration. - Docker Compose Update: Added Ollama service for local LLM fallback in development stack. Updated benchmark links in both EN and CN README.
What's Changed
- 0.2.5 by @Timwood0x10 in #36
Full Changelog: v0.2.4...v0.2.5