Skip to the content.

Task 50 — Distributed reflection

Phase: 4 Initiative: 20 Status: done Owner: — Slug: distributed-reflection

Goal

Отчёты рефлексии включают производительность peer-агентов, routing-решения, паттерны сбоев и предлагают улучшения: новые skills, routing-правила, peer-связи. Формируют proposals, а не unreviewed prod-изменения.

Acceptance criteria

Sub-tasks

Dependencies

Validation

dotnet build src/agent/Hercules.csproj                            → 0 errors
dotnet test --filter "FullyQualifiedName~DistributedReflection"  → 14/14 pass
dotnet test --filter "FullyQualifiedName~ReflectionProposalStore" → 12/12 pass
dotnet test tests/Hercules.Agent.Tests/                           → 1338/1348 pass
                                                                  (10 pre-existing failures in OtelServiceTests,
                                                                   NumericValidatorTests, BudgetGuardTests,
                                                                   WasmToolTests, HerculesBusTests — unrelated)

Implementation notes

Bug fix: CollectFailurePatterns() returned empty when auditService was null — circuit breaker check was nested inside the audit null-guard. Fixed by moving CB check outside the guard so it always runs regardless of audit availability.

Risks / Rollback

Перегрузка шумными proposals; rate-limit + ранжирование + человек-в-контуре.