v0.2.0
v0.2.0
New Features
- Leader Failover: Checkpoint-based recovery with
LeaderSupervisordetecting leader failure, recovering stale tasks from last checkpoint, and reassigning work to available sub-agents.ColdRestartStrategyfor deterministic recovery. - Runtime Dynamic Graph:
MutableDAGwith thread-safe mutation (add/remove nodes and edges at runtime).DynamicExecutorwithApplyModefor hot-reload without stopping execution. Incremental cycle detection on edge insertion. - Human-in-the-Loop:
InterruptConfigon workflow steps for human approval gates.InterruptHandlerblocks execution until approved.InterruptStoreprovides crash recovery of pending approvals. - Agent Resurrection Plugin: Pluggable
HealthCheckerinterface for custom health detection.HeartbeatAdapterfor heartbeat-based liveness.Supervisorfor automatic agent restart on failure. - Event Sourcing:
EventStoreinterface with optimistic concurrency control.MemoryEventStorefor dev/test,PostgresEventStorefor production. 17 event types covering agent lifecycle, tasks, sessions, workflows, and failover. Pub/sub viaSubscribewith filtered event channels. DLQ auto-retry with configurable retry budgets. - Pluggable Vector Store:
VectorStoreinterface replacing concrete*VectorSearcherin Repository. PostgreSQL + pgvector for production, in-memory for dev/test. Drop-in replacement support for Qdrant, Milvus, SQLite, or custom backends. - WorkflowService API: High-level workflow orchestration abstraction over the DAG engine.
Bug Fixes (46 fixes)
Storage (12 fixes)
- C1: Embedding queue dedup key mismatch causing duplicate embeddings
- C2: Write buffer data loss on
Stop()before flush completes - C3: Embedding enqueue outside transaction leading to orphaned records
- C4:
FetchPendingTaskslock ineffective withFOR UPDATE SKIP LOCKED - C5: Reconcile threshold time arithmetic off by orders of magnitude
- M1:
ManagedRowconnection leak on error paths - M2: Missing migration tables in
migrate.go - M3: Circuit breaker
halfOpenInflightcounter leak - M4:
VectorSearchermissing dimension validation - M6: FileWatcher TOCTOU race in
scanAndLoad - M7: Map reference shared unsafely in callbacks
- M8: Graph
Edge()no validation of node endpoints
Workflow (8 fixes)
- C6: Panic recovery ordering in
executor.go(recovery after cleanup) - C7: Graph executor in-degree tracking incorrect after node removal
- H1: Deadlock false positive in
executor.go(errgroup misuse) - H2:
DynamicExecutorhang on node removal during execution - H3:
stepEg.Wait()concurrent withGo()causing race - H4:
NewDAGsilently dropping duplicate step IDs - M5:
MaxAttempts=0skips execution entirely - M9:
recomputeOrderversion-check race on concurrent access
AHP Protocol (7 fixes)
- C8: Queue
send on closed channelpanic during shutdown - C9:
HeartbeatSenderStart/Stop race condition - H5:
getRandomSuffixnil dereference on empty slice - H6:
SendMessageswallows all errors silently - H7:
Protocolhas noClose()method (resource leak) - M10:
Peek()non-atomic read (race under concurrent access) - M12:
DLQ.Removeleaks trailing pointer after deletion
Agent System (8 fixes)
- L6:
Startpartial validation cleanup (inconsistent state on error) - L7: SubAgent
ProcessStreamgoroutine leak on context cancellation - L8:
doFailoveruses cancelled ctx for Stop (fails to clean up) - L9:
Dispatcherpartial results misleading (reports success on partial failure) - L10: Dynamic executor uses bare
goinstead ofstepEg - L11: Missing
SnapshotWithSteps()onMutableDAG - M11:
NewTaskMessageallows nil payload - BUG-5: Dead verification in
pg_store_testConcurrentAppend
Event Sourcing (5 fixes)
- BUG-1:
FromVersioninclusive/exclusive boundary wrong inmemory_store.go - BUG-2:
Sincefilter inclusive boundary wrong inpg_store.go - BUG-3:
ReadAllincorrectly appliesFromVersionfilter inmemory_store - BUG-4:
Appenddoes not returnErrVersionConflicton unique violation inpg_store - STYLE-1: Bare
gokeyword without context cancellation in event store
Other (6 fixes)
- L1:
safeFormatTablereturning empty string on valid input - L2: Missing immediate retry after flush failure in write buffer
- F1:
workflow_test.goconfig mismatch with actual types - Executor nil pointer check on context cancellation (commit 9565f79)
- STYLE-2: Channel buffer size 64 changed to 1 (backpressure)
- STYLE-3: Empty slice literals replaced with nil returns
Infrastructure
- CI/CD pipeline via GitHub Actions (lint, test, race detection, build)
- Integration tests for workflow engine (5 test cases)
- Benchmark suite (32 benchmarks across 8 categories)
- Bilingual documentation (English + Chinese) in
docs/en/anddocs/zh/ - Reorganized documentation into language-specific directories
.golangci.ymlconfiguration for consistent linting
Breaking Changes
NewLeaderSupervisorsignature changed: addedeventStoreparameterNewColdRestartStrategysignature changed: addedcheckpointparameterMemoryManagerinterface addedGetLatestSessionForLeadermethodVectorStoreinterface replaces concrete*VectorSearcherinRepositoryNewResultAggregatorsignature changed: addedsortBy stringparameterTaskPlanner.Plansignature changed: addedinputText stringparameterResultAggregator.Aggregatesignature changed: addedtasks []*models.Taskparameter- Domain types renamed:
FashionFilters->ResourceFilters,FashionItem->ResourceItem,AgentProfile->AgentUserProfile,AgentRecommendation->TaskRecommendation,OutfitSuggestion->Suggestion,AgentTrend->Trend
What's Changed
- v0.2.0 by @Timwood0x10 in #26
Full Changelog: v0.1.1...v0.2.0