Skip to content

0.2.3 - #34

Merged
Timwood0x10 merged 37 commits into
masterfrom
dev
Jun 24, 2026
Merged

0.2.3#34
Timwood0x10 merged 37 commits into
masterfrom
dev

Conversation

@Timwood0x10

@Timwood0x10 Timwood0x10 commented Jun 24, 2026

Copy link
Copy Markdown
Owner

[0.2.3] - 2026-06-24

New Features

  • Genetic Algorithm Evolution System (Beta): Full GA genome package with Population, Crossover (Inherit/HalfSplit/Uniform modes), TournamentSelection, and strategy mutation engine. Supports deterministic reproduction via seed control, elite preservation, adaptive survival rates, and diversity tracking with fitness sharing. (GA Hardening Plan)
  • Autonomous Evolution (Dream Mode v1): Closed-loop evolution orchestration with Dream Cycle (trigger → mutate → evaluate → adopt → record lineage). Includes arena regression testing with Welch's t-test, bandit feedback loop for experience quality optimization, and full genealogy tracking.
  • Agent Resurrection & Snapshot System: Pluggable health checking for agent recovery, checkpoint-based resurrection with state restoration from EventStore and MemoryStore.
  • Tiered Scoring System: Multi-level scoring pipeline with FailoverScorer integration. Includes scoring cache optimization (atomic hit/miss counters), hybrid scoring with prompt crossover modes, and unevaluated score guardrails.
  • JSONL Training Data Pipeline: End-to-end pipeline for agent strategy evolution and experience distillation data export.
  • Leader Agent Hardening: Nil validation for all constructor parameters (memory manager, aggregator, parser, planner, dispatcher). Session initialization via sync.Once. Comprehensive error collection during Stop() with joined errors from distillation/streaming goroutines.
  • Workflow Engine Hardening: Thread-safe HITL handler/store access via sync.RWMutex. Workflow execution timeout (default 30s) to prevent indefinite blocking. Proper OutputStore.Close() cleanup.
  • Event Store Hardening: Errgroup-based compaction with timeout context (30s). Nil compactor/repo guards in all read paths. MemoryEventStore Close() returns ErrEventStoreClosed on double-close for idempotent shutdown.
  • LLM Client Validation: Config validation enforces required Provider and BaseURL fields. Close() idempotency via sync.Once. OpenAI adapter properly handles io.ReadAll errors instead of silently discarding them.
  • MCP Client Hardening: Nil client guard in tool registration. Godoc-style documentation for all public APIs. SSE transport fixes double-close of resp.Body (deferred close only in receiveLoop).
  • Memory Manager Config Validation: Validates MaxTasks, MaxDistilledTasks, DistilledTaskTTL, and VectorDim are positive. Stop() collects all errors and returns them joined.
  • Crossover & Selection Validation: Crossover.Validate() and TournamentSelection.Validate() methods for post-construction config invariance checking. Defensive nil checks and enum validation.

Improvements

  • Renamed project to ARES (Adaptive Resilient Evolution System)
  • Enhanced scoring cache with atomic counters replacing sync.RWMutex
  • Improved error visibility with structured error wrapping across all modules
  • Added debug logging to TaskDispatcher and planner fallback warnings
  • Default DistilledTaskTTL set to 30 days in DefaultMemoryConfig()
  • Guarded all CompactableEventStore read paths against nil compactor/repo

Bug Fixes

  • Fixed data race in DynamicExecutor recovery path with proper timeout handling
  • Fixed MemoryEventStore.Close() idempotency — second+ calls return ErrEventStoreClosed
  • Fixed SSE transport double resp.Body.Close() causing panic on shutdown
  • Fixed LLM client Close() race condition via sync.Once
  • Fixed OpenAI adapter silently swallowing io.ReadAll errors in error paths
  • Fixed Population.ScoreAgents panic recovery logging with agent context
  • Fixed updateBestEverLocked concurrency safety with deep copy via a.Clone()
  • Fixed NewTaskPlanner/NewTaskPlannerWithConfig silent fallback from invalid maxTasks
  • Added nil validation in leader.New, NewTaskDispatcher, and NewMCPManager
  • fix Rename project #33
  • fix Genetic algorithm #32

…ore paths

   - Thread API-level scorer into wired system adapter so scheduler path
     auto-scores offspring (was nil, breaking scoring loop)
   - Add initScores(0) after RunIdleEvolution in wired Evolve path
   - Add ScoreWithContext(ctx, strategy) to LLMScorer for context propagation
   - Cap lineages at 1000 entries to prevent unbounded memory growth
   - Rename PromptPoolMutation → PromptUniform (enum, comments, wiring)
   - Wire PromptCrossoverMode into createRawComponents (non-wired path)
   - Add categorical tool diversity (Params[tools]) to paramDistance
   - Make SetActive atomic: wrap *sql.DB in a BeginTx/Rollback/Commit
   - Fix default EliteCount 2→3, BreedingPoolRatio doc 0.3→0.6
   - DRY childID generation in Crossover into generateChildID helper
   - Log warning in ParseMutationType default case for unknown strings
   - Add uint/uint64/uint32 support to toFloat64
…across core packages

   - Centralize 3 duplicate deterministic scorer implementations into a single
     DeterministicScore in llm_scorer.go; remove 6 unused constants in service.go
   - Fix ChaosExecutor exchange disconnect deadlock: executeExchangeDisconnect
     no longer re-acquires the mutex already held by Execute (non-reentrant sync.Mutex)
   - Fix GetSurvivalStatus data race: return a deep copy of the events timeline
   - Fix DreamCycle.SetEnabled/IsEnabled data race: guard config.Enabled with mutex
   - Add DefaultChaosExecutor.injectFaults mutex guard for e.rng concurrent access
   - Fix scheduler goroutine leak with cancel-before-start lifecycle pattern
   - Remove 2 unused files (arena_adapter.go, evolution_store.go), VerifyResult,
     VerifyReport, FaultWindowUptime, Skipped field, and other dead code
   - Add runtime warnings in RunScenarioReport for unsupported config fields
   - Replace hardcoded adaptive mutation constants with named constants
   - Add RetrievalGuard.Close() to prevent circuit breaker goroutine leak
   - Map new arena action types to flight diagnostic categories
✦  -  (new) — Project-level FailoverScorer abstraction: chains primary + fallback LLM clients with automatic timeout failover. Rate-limiting on primary only.
   -  — Added Fallbacks []LLMConfig field to LLMConfig.
   -
     - LLMScoreClient now wraps *llm.FailoverScorer instead of managing []*Client directly. Simpler API: NewLLMScoreClient(scorer, heuristic).
     - runRealEvolution() reads from config.Config, builds config list from primary + fallbacks, creates FailoverScorer, and wires it into the evolution system.
     - Removed deprecated ratelimit import (moved inside internal/llm).
   -  — Added fallbacks section with sensenova-u1-fast as backup model
- Ran all 32 core benchmarks with benchtime=3x on darwin/arm64 (M3 Max, Go 1.26.4)
- 7 hot (<1us), 22 normal (1-100us), 3 cold (>100us)
- All zero-allocation paths preserved (eval, tool exec, result creation,
  event conversion, error wrapping, conflict detection)
- Updated README.md Benchmark Highlights and benchmark_report.md
- Added BenchmarkDistillation (76.9us, end-to-end) to report
@Timwood0x10 Timwood0x10 self-assigned this Jun 24, 2026
@Timwood0x10
Timwood0x10 merged commit 6f76e1b into master Jun 24, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rename project Genetic algorithm

1 participant