5 Tests I Write Before I Trust a Multi-Agent Workflow in .NET 10
Описание и применение
Тесты для проверки отказов в многоагентных рабочих процессах .NET 10
Задача
Ensuring reliability of multi‑agent workflows by testing failure paths before deployment.
Результат
All tests pass without API keys or network, confirming that the workflow correctly blocks over‑eager refunds, routes security tickets to escalation, and limits model calls.
Рабочий процесс
- Build deterministic OfflineTriageChatClient to simulate model responses
- Define TriageRoutingPolicy to route tickets based on category and urgency
- Implement ReplyPolicyGuard to enforce reply constraints
- Write unit tests for specialist over‑eager replies
- Write integration tests for routing and model call counts
Доказательства
The full suite is 58 tests (51 unit, 7 integration), and all of them run with no API key and no network.
The bug: a specialist writes something no human would approve.
The routing rules live in a plain TriageRoutingPolicy class, and security or critical urgency goes straight to the escape step, even at low confidence.
- Дата записи: 2026-10-20T12:41:41.799Z