v0.2.0#26
Merged
Merged
Conversation
Rename domain types, upgrade default models, implement TTL query cache, fix tests, add migration guide
…framework - Add ProcessStream for SSE streaming support - Implement LoopConfig and Evaluator for iterative refinement - Create ToolFactory and PluginRegistry for dynamic tool loading - Add evaluation framework with YAML test suites and report generation - Fix security issues: path traversal, file permissions, context usage 🤖 Generated with CodeArts Agent
…c graph engine Leader Failover: - HeartbeatMonitor: add TimeoutCallback and RegisterCallback for agent timeout notifications - CheckpointRepository: persist leader state (sessionID) to leader_checkpoints table for recovery - TaskRecovery: mark orphaned pending/running tasks as failed after leader crash - LeaderSupervisor: monitor leader health, trigger ColdRestartStrategy on failure, recover session - Leader agent: initMemoryContext attempts checkpoint recovery before creating new session Runtime Dynamic Graph: - MutableDAG: thread-safe AddNode/RemoveNode/AddEdge/RemoveEdge with incremental cycle detection - GraphEventHub: pub/sub for graph mutation events with non-blocking publish - DynamicExecutor: ExecuteDynamic with ApplyAtCheckpoint/ApplyImmediate modes, DAG version tracking Infrastructure: - Add leader_checkpoints migration with status index - MemoryManager: add GetLatestSessionForLeader interface method - Fix bare keywords: replace with errgroup (distillEg, streamEg, stepEg) - Fix Stop() race: move status transitions into cleanupOnce.Do - Extract hardcoded default_user to config.UserID - Add tenant guard to GetLatestSessionForLeader - Add sentinel errors for checkpoint operations
…chmarks Leader Failover: - HeartbeatMonitor: add TimeoutCallback for agent timeout notifications - CheckpointRepository: persist leader state to leader_checkpoints table - TaskRecovery: mark orphaned tasks as failed after leader crash - LeaderSupervisor: auto-detect failure, create successor, recover session - Leader agent: checkpoint recovery in initMemoryContext Runtime Dynamic Graph: - MutableDAG: thread-safe AddNode/RemoveNode/AddEdge/RemoveEdge with incremental BFS cycle detection - DynamicExecutor: ExecuteDynamic with ApplyAtCheckpoint/ApplyImmediate modes - GraphEventHub: pub/sub for graph mutation events API Abstraction: - WorkflowService interface (Execute, ExecuteStream, ListWorkflows, GetWorkflow) - Workflow service implementation composing MutableDAG + DynamicExecutor - Client.Workflow() accessor Infrastructure: - Replace bare with errgroup (distillEg, streamEg, stepEg) - Fix Stop() race: move status transitions into cleanupOnce.Do - Extract hardcoded default_user to config.UserID - Add tenant guard to GetLatestSessionForLeader - Add sentinel errors for checkpoint operations - Fix SA5011 nil-pointer warnings in 17 test files (28 replacements) Documentation: - Reorganize docs into en/ and zh/ directories - Add leader-failover, dynamic-graph, v2-architecture docs (bilingual) - Update framework-comparison with GoAgent positioning Benchmarks: - Run all 54 benchmarks with -count=3 - Update benchmark report with v2 component results - Save raw logs to benchmarks/logs/
…gable vector store New Features: - Runtime layer: agent lifecycle management, resurrection, event-sourced recovery - Event Store: MemoryEventStore + PostgresEventStore with optimistic concurrency - Dynamic Workflow: MutableDAG, DynamicExecutor, GraphEventHub - Human-in-the-Loop: InterruptConfig, InterruptHandler, InterruptStore - Agent Resurrection Plugin: pluggable HealthChecker, factory-based recovery - Pluggable VectorStore: interface-based, PostgreSQL + in-memory implementations - WorkflowService API: Execute, ExecuteStream, ListWorkflows, GetWorkflow - StatefulAgent interface: RestoreState, ReplayEvents, Snapshot Bug Fixes (50): - Storage: dedup key, write buffer, transactional enqueue, FOR UPDATE SKIP LOCKED - Workflow: panic recovery, in-degree tracking, deadlock false positive - AHP: closed channel panic, HeartbeatSender race, error preservation - Agent: WaitGroup panic, Start/Stop TOCTOU, Process mutual exclusion - Runtime: nil errgroup, Stop() data race, unbounded replay Infrastructure: - CI/CD pipeline, integration tests, benchmarks, bilingual docs - 6 runnable examples in examples/advanced/ Tests: 2642 pass with -race across 50 packages, 0 lint issues
…n example - Fix 32 errcheck/ineffassign/SA1012/unused lint issues across 7 test files - Add GetAgent(agentID) method to runtime.Manager for agent lookup - Wire verifyRestoredState() call in runtime_resurrection example - Remove ineffectual assignment in pg_store_test.go - Add nolint directive for intentional nil context test
- Implement HITL workflow integration tests in hitl_workflow_test.go to validate agent execution, approval/rejection handling, and data modification during interrupts. - Create runtime_resurrection_test.go to test the full resurrection flow of agents, including state recovery, concurrent kills, and handling of maximum restart limits. - Introduce a new knowledge-base file for documentation purposes. - Add a PID file for the embedding service to track the running process.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
v0.2.0
New Features
LeaderSupervisordetecting leader failure, recovering stale tasks from last checkpoint, and reassigning work to available sub-agents.ColdRestartStrategyfor deterministic recovery.MutableDAGwith thread-safe mutation (add/remove nodes and edges at runtime).DynamicExecutorwithApplyModefor hot-reload without stopping execution. Incremental cycle detection on edge insertion.InterruptConfigon workflow steps for human approval gates.InterruptHandlerblocks execution until approved.InterruptStoreprovides crash recovery of pending approvals.HealthCheckerinterface for custom health detection.HeartbeatAdapterfor heartbeat-based liveness.Supervisorfor automatic agent restart on failure.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.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.Bug Fixes (46 fixes)
Storage (12 fixes)
Stop()before flush completesFetchPendingTaskslock ineffective withFOR UPDATE SKIP LOCKEDManagedRowconnection leak on error pathsmigrate.gohalfOpenInflightcounter leakVectorSearchermissing dimension validationscanAndLoadEdge()no validation of node endpointsWorkflow (8 fixes)
executor.go(recovery after cleanup)executor.go(errgroup misuse)DynamicExecutorhang on node removal during executionstepEg.Wait()concurrent withGo()causing raceNewDAGsilently dropping duplicate step IDsMaxAttempts=0skips execution entirelyrecomputeOrderversion-check race on concurrent accessAHP Protocol (7 fixes)
send on closed channelpanic during shutdownHeartbeatSenderStart/Stop race conditiongetRandomSuffixnil dereference on empty sliceSendMessageswallows all errors silentlyProtocolhas noClose()method (resource leak)Peek()non-atomic read (race under concurrent access)DLQ.Removeleaks trailing pointer after deletionAgent System (8 fixes)
Startpartial validation cleanup (inconsistent state on error)ProcessStreamgoroutine leak on context cancellationdoFailoveruses cancelled ctx for Stop (fails to clean up)Dispatcherpartial results misleading (reports success on partial failure)goinstead ofstepEgSnapshotWithSteps()onMutableDAGNewTaskMessageallows nil payloadpg_store_testConcurrentAppendEvent Sourcing (5 fixes)
FromVersioninclusive/exclusive boundary wrong inmemory_store.goSincefilter inclusive boundary wrong inpg_store.goReadAllincorrectly appliesFromVersionfilter inmemory_storeAppenddoes not returnErrVersionConflicton unique violation inpg_storegokeyword without context cancellation in event storeOther (6 fixes)
safeFormatTablereturning empty string on valid inputworkflow_test.goconfig mismatch with actual typesInfrastructure
docs/en/anddocs/zh/.golangci.ymlconfiguration for consistent lintingBreaking Changes
NewLeaderSupervisorsignature changed: addedeventStoreparameterNewColdRestartStrategysignature changed: addedcheckpointparameterMemoryManagerinterface addedGetLatestSessionForLeadermethodVectorStoreinterface replaces concrete*VectorSearcherinRepositoryNewResultAggregatorsignature changed: addedsortBy stringparameterTaskPlanner.Plansignature changed: addedinputText stringparameterResultAggregator.Aggregatesignature changed: addedtasks []*models.TaskparameterFashionFilters->ResourceFilters,FashionItem->ResourceItem,AgentProfile->AgentUserProfile,AgentRecommendation->TaskRecommendation,OutfitSuggestion->Suggestion,AgentTrend->Trend